[MediaWiki-commits] [Gerrit] mediawiki...PoolCounter[master]: Add README.md

2017-07-26 Thread Tim Starling (Code Review)
Tim Starling has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/368126 )

Change subject: Add README.md
..


Add README.md

Change-Id: Iad03c9ef47cef99056f19bbaf1672952399279d7
---
A README.md
1 file changed, 35 insertions(+), 0 deletions(-)

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



diff --git a/README.md b/README.md
new file mode 100644
index 000..5fd0114
--- /dev/null
+++ b/README.md
@@ -0,0 +1,35 @@
+# PoolCounter
+
+## Contributing
+
+### MediaWiki extension
+
+Test the PHP code in PHP via [Composer](https://getcomposer.org/).
+
+$ composer install
+$ composer test
+
+
+Lint interface messages in Node.js via [npm](https://www.npmjs.com/get-npm):
+
+$ npm install
+$ npm test
+
+
+### C Daemon
+
+Build using Make. Requires libevent to be installed.
+(`libevent-dev` package on Debian-based systems.)
+
+$ cd daemon/
+$ make install
+
+
+Test the C code in Ruby with Cucumber. Install using 
[Bundler](https://bundler.io/):
+
+$ gem install bundler
+$ bundle install
+
+$ cd daemon/
+$ make test
+

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iad03c9ef47cef99056f19bbaf1672952399279d7
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/PoolCounter
Gerrit-Branch: master
Gerrit-Owner: Krinkle 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: Tim Starling 
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...PoolCounter[master]: Fix hour count in stats

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

Change subject: Fix hour count in stats
..


Fix hour count in stats

Change-Id: If886a9ac864ae063c1a121840fbb80f88b6ab1b7
---
M daemon/stats.c
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/daemon/stats.c b/daemon/stats.c
index 279feba..5eea602 100644
--- a/daemon/stats.c
+++ b/daemon/stats.c
@@ -23,6 +23,7 @@
int hours = minutes / 60;
minutes %= 60;
unsigned int days = hours / 24;
+   hours %= 60;
 
int n;
n = sprintf( stats_buffer, "uptime: %u days, %dh %dm %ds\n", days, 
hours, minutes, seconds );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If886a9ac864ae063c1a121840fbb80f88b6ab1b7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/PoolCounter
Gerrit-Branch: master
Gerrit-Owner: Tim Starling 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...PoolCounter[master]: Add README.md

2017-07-26 Thread Krinkle (Code Review)
Krinkle has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/368126 )

Change subject: Add README.md
..

Add README.md

Change-Id: Iad03c9ef47cef99056f19bbaf1672952399279d7
---
A README.md
1 file changed, 35 insertions(+), 0 deletions(-)


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

diff --git a/README.md b/README.md
new file mode 100644
index 000..956de7a
--- /dev/null
+++ b/README.md
@@ -0,0 +1,35 @@
+# PoolCounter
+
+## Contributing
+
+### MediaWiki extension
+
+Test the PHP code in PHP via [Composer](https://getcomposer.org/).
+
+$ composer install
+$ composer test
+
+
+Lint interface messages in Node.js via [npm](https://www.npmjs.com/get-npm):
+
+$ npm install
+$ npm test
+
+
+### C Daemon
+
+Install using Make. Requires libevent to be installed.
+(`libevent-dev` package on Debian-based systems.)
+
+$ cd daemon/
+$ make install
+
+
+Test the C code in Ruby via [Bundler](https://bundler.io/):
+
+$ gem install bundler
+$ bundle install
+
+$ cd daemon/
+$ make test
+

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iad03c9ef47cef99056f19bbaf1672952399279d7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/PoolCounter
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] wikimedia...crm[master]: Fix duplicate check logic

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

Change subject: Fix duplicate check logic
..


Fix duplicate check logic

Bug: T171349
Change-Id: I547e40b74bb3a3b4216436bc6f63f11c402618f9
---
M sites/all/modules/wmf_civicrm/wmf_civicrm.module
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/sites/all/modules/wmf_civicrm/wmf_civicrm.module 
b/sites/all/modules/wmf_civicrm/wmf_civicrm.module
index a692882..2540666 100644
--- a/sites/all/modules/wmf_civicrm/wmf_civicrm.module
+++ b/sites/all/modules/wmf_civicrm/wmf_civicrm.module
@@ -452,7 +452,7 @@
 $invoice_id = $contribution['invoice_id'];
 $duplicate = civicrm_api3( "Contribution", "getSingle", array( 
"invoice_id" => $invoice_id ) );
 }
-if ( $duplicate ) {
+if ( $duplicate && array_key_exists('id', $duplicate ) ) {
 $contribution['invoice_id'] = $contribution['invoice_id'] . 
'|dup-' . UtcDate::getUtcTimeStamp();
 watchdog( 'wmf_civicrm', 'Found duplicate invoice ID, changing 
this one to ' . $contribution['invoice_id'], NULL, WATCHDOG_INFO );
 $contribution_result = civicrm_api3( "Contribution", "Create", 
$contribution );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I547e40b74bb3a3b4216436bc6f63f11c402618f9
Gerrit-PatchSet: 5
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: master
Gerrit-Owner: Mepps 
Gerrit-Reviewer: Cdentinger 
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] wikimedia...crm[master]: Limit Silverpop group import to Opt In by default

2017-07-26 Thread Eileen (Code Review)
Eileen has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/368125 )

Change subject: Limit Silverpop group import to Opt In by default
..

Limit Silverpop group import to Opt In by default

(updating composer didn't fix the date :-()

Bug T160949

Change-Id: Iaa1877889ecece796ecb96128345170c7fcdb8b2
---
M composer.lock
M 
sites/default/civicrm/extensions/org.wikimedia.omnimail/CRM/Omnimail/Omnigroupmembers.php
M 
sites/default/civicrm/extensions/org.wikimedia.omnimail/api/v3/Omnigroupmember/Get.php
3 files changed, 12 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/25/368125/1

diff --git a/composer.lock b/composer.lock
index b6be6ff..01914d9 100644
--- a/composer.lock
+++ b/composer.lock
@@ -1842,7 +1842,7 @@
 "source": {
 "type": "git",
 "url": 
"https://github.com/eileenmcnaughton/omnimail-silverpop.git;,
-"reference": "cd3933b8ee7b263d0472cc44d047b82f3ec4029c"
+"reference": "c3248b3932e62cd2812aa3502d875b7c12c25c66"
 },
 "require": {
 "league/csv": "^8.0",
@@ -1881,7 +1881,7 @@
 "omnimail",
 "silverpop"
 ],
-"time": "2017-07-09T22:55:21+00:00"
+"time": "2017-07-27 02:53:46"
 },
 {
 "name": "wikimedia/smash-pig",
diff --git 
a/sites/default/civicrm/extensions/org.wikimedia.omnimail/CRM/Omnimail/Omnigroupmembers.php
 
b/sites/default/civicrm/extensions/org.wikimedia.omnimail/CRM/Omnimail/Omnigroupmembers.php
index 465a01a..30aa718 100644
--- 
a/sites/default/civicrm/extensions/org.wikimedia.omnimail/CRM/Omnimail/Omnigroupmembers.php
+++ 
b/sites/default/civicrm/extensions/org.wikimedia.omnimail/CRM/Omnimail/Omnigroupmembers.php
@@ -35,6 +35,10 @@
 $settings = CRM_Omnimail_Helper::getSettings();
 
 $mailerCredentials = CRM_Omnimail_Helper::getCredentials($params);
+$jobParameters = array();
+if ($params['is_opt_in_only']) {
+  $jobParameters['exportType'] = 'OPT_IN';
+}
 
 $request = Omnimail::create($params['mail_provider'], 
$mailerCredentials)->getGroupMembers();
 
diff --git 
a/sites/default/civicrm/extensions/org.wikimedia.omnimail/api/v3/Omnigroupmember/Get.php
 
b/sites/default/civicrm/extensions/org.wikimedia.omnimail/api/v3/Omnigroupmember/Get.php
index 0f179f6..0281f62 100644
--- 
a/sites/default/civicrm/extensions/org.wikimedia.omnimail/api/v3/Omnigroupmember/Get.php
+++ 
b/sites/default/civicrm/extensions/org.wikimedia.omnimail/api/v3/Omnigroupmember/Get.php
@@ -83,5 +83,11 @@
   'country' => 'rml_country',
 ),
   );
+  $params['is_opt_in_only'] = array(
+'type' => CRM_Utils_Type::T_BOOLEAN,
+'title' => ts('Opted in contacts only'),
+'description' => array('Restrict to opted in contacts'),
+'api.default' => 1,
+  );
 
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iaa1877889ecece796ecb96128345170c7fcdb8b2
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: master
Gerrit-Owner: Eileen 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Re-introduce use of mime_content_type()

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

Change subject: Re-introduce use of mime_content_type()
..


Re-introduce use of mime_content_type()

Follows-up eac059c7224. See also https://stackoverflow.com/a/39676272/319266.

This function was never deprecated. For a short time, the www.php.net
manual page for `mime_content_type` wrongly documented it as having been
deprecated in PHP 5.3, but this wasn't true, and it has been present in
every PHP version since PHP 4.3, including PHP 7 and HHVM 2.3+.

Between PHP 4.3.0-4.3.2 and PHP 5.0-5.3, the function would be absent
if the Mimemagic extension was not enabled at compile-time. However, while
mime_content_type was first introduced by the Mimemagic PHP ext, it is
backend by the Finfo extension since PHP 5.3.0.

Confirmed via https://3v4l.org/IQC1Q.

* CSSMin: Revert conditional use of finfo back to unconditional use
  of mime_content_type.

* MimeAnalyzer: Replace conditional use of finfo with unconditional use
  use of mime_content_type. Also remove the now-redundant 'else' branch.
  The 'else' branch existed because this code was written at a time where
  MediaWiki still supported PHP 4, of which some minor versions could
  sometimes be compiled without this function.

Change-Id: Iee4a0b6f616a469bb779c40e386045f9c3200446
---
M includes/DefaultSettings.php
M includes/libs/CSSMin.php
M includes/libs/filebackend/FileBackendStore.php
M includes/libs/mime/MimeAnalyzer.php
4 files changed, 5 insertions(+), 31 deletions(-)

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



diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php
index f35715e..74d5fa4 100644
--- a/includes/DefaultSettings.php
+++ b/includes/DefaultSettings.php
@@ -1304,7 +1304,7 @@
  * Sets an external MIME detector program. The command must print only
  * the MIME type to standard output.
  * The name of the file to process will be appended to the command given here.
- * If not set or NULL, PHP's fileinfo extension will be used if available.
+ * If not set or NULL, PHP's mime_content_type function will be used.
  *
  * @par Example:
  * @code
diff --git a/includes/libs/CSSMin.php b/includes/libs/CSSMin.php
index 9e060cd..4c672f4 100644
--- a/includes/libs/CSSMin.php
+++ b/includes/libs/CSSMin.php
@@ -188,17 +188,7 @@
return self::$mimeTypes[$ext];
}
 
-   $realpath = realpath( $file );
-   if (
-   $realpath
-   && function_exists( 'finfo_file' )
-   && function_exists( 'finfo_open' )
-   && defined( 'FILEINFO_MIME_TYPE' )
-   ) {
-   return finfo_file( finfo_open( FILEINFO_MIME_TYPE ), 
$realpath );
-   }
-
-   return false;
+   return mime_content_type( realpath( $file ) );
}
 
/**
diff --git a/includes/libs/filebackend/FileBackendStore.php 
b/includes/libs/filebackend/FileBackendStore.php
index 9bfdbe8..77473d1 100644
--- a/includes/libs/filebackend/FileBackendStore.php
+++ b/includes/libs/filebackend/FileBackendStore.php
@@ -1840,14 +1840,8 @@
return call_user_func_array( $this->mimeCallback, 
func_get_args() );
}
 
-   $mime = null;
-   if ( $fsPath !== null && function_exists( 'finfo_file' ) ) {
-   $finfo = finfo_open( FILEINFO_MIME_TYPE );
-   $mime = finfo_file( $finfo, $fsPath );
-   finfo_close( $finfo );
-   }
-
-   return is_string( $mime ) ? $mime : 'unknown/unknown';
+   $mime = ( $fsPath !== null ) ? mime_content_type( $fsPath ) : 
false;
+   return $mime ?: 'unknown/unknown';
}
 }
 
diff --git a/includes/libs/mime/MimeAnalyzer.php 
b/includes/libs/mime/MimeAnalyzer.php
index 631bb17..4d860bb 100644
--- a/includes/libs/mime/MimeAnalyzer.php
+++ b/includes/libs/mime/MimeAnalyzer.php
@@ -988,18 +988,8 @@
$m = null;
if ( $callback ) {
$m = $callback( $file );
-   } elseif ( function_exists( "finfo_open" ) && function_exists( 
"finfo_file" ) ) {
-   $mime_magic_resource = finfo_open( FILEINFO_MIME );
-
-   if ( $mime_magic_resource ) {
-   $m = finfo_file( $mime_magic_resource, $file );
-   finfo_close( $mime_magic_resource );
-   } else {
-   $this->logger->info( __METHOD__ .
-   ": finfo_open failed on " . 
FILEINFO_MIME . "!\n" );
-   }
} else {
-   $this->logger->info( __METHOD__ . ": no magic mime 
detector 

[MediaWiki-commits] [Gerrit] mediawiki...InputBox[master]: Don't add url parameters to an input box, if the parameter i...

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

Change subject: Don't add url parameters to an input box, if the parameter is 
empty
..


Don't add url parameters to an input box, if the parameter is empty

If a parameter isn't set, it shouldn't be added to the form.

Bug: T147048
Change-Id: I7e5aa21528fbc98e9e4d52baca93870f213d4c15
---
M InputBox.classes.php
M tests/inputBoxParserTests.txt
2 files changed, 279 insertions(+), 23 deletions(-)

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



diff --git a/InputBox.classes.php b/InputBox.classes.php
index 0536747..ffa21dd 100644
--- a/InputBox.classes.php
+++ b/InputBox.classes.php
@@ -14,13 +14,13 @@
private $mParser;
private $mType = '';
private $mWidth = 50;
-   private $mPreload = '';
-   private $mPreloadparams = [];
-   private $mEditIntro = '';
-   private $mUseVE = '';
-   private $mSummary = '';
-   private $mNosummary = '';
-   private $mMinor = '';
+   private $mPreload = null;
+   private $mPreloadparams = null;
+   private $mEditIntro = null;
+   private $mUseVE = null;
+   private $mSummary = null;
+   private $mNosummary = null;
+   private $mMinor = null;
private $mPage = '';
private $mBR = 'yes';
private $mDefaultText = '';
@@ -97,7 +97,7 @@
'value' => 'edit',
];
// check, if VE is installed and VE editor is requested
-   if ( ExtensionRegistry::getInstance()->isLoaded( 'VisualEditor' 
) && $this->mUseVE ) {
+   if ( $this->shouldUseVE() ) {
$args = [
'name' => 'veaction',
'value' => 'edit',
@@ -393,15 +393,29 @@
$htmlOut .= Xml::openElement( 'form', $createBoxParams );
$editArgs = $this->getEditActionArgs();
$htmlOut .= Html::hidden( $editArgs['name'], $editArgs['value'] 
);
-   $htmlOut .= Html::hidden( 'preload', $this->mPreload );
-   foreach ( $this->mPreloadparams as $preloadparams ) {
-   $htmlOut .= Html::hidden( 'preloadparams[]', 
$preloadparams );
+   if ( $this->mPreload !== null ) {
+   $htmlOut .= Html::hidden( 'preload', $this->mPreload );
}
-   $htmlOut .= Html::hidden( 'editintro', $this->mEditIntro );
-   $htmlOut .= Html::hidden( 'summary', $this->mSummary );
-   $htmlOut .= Html::hidden( 'nosummary', $this->mNosummary );
-   $htmlOut .= Html::hidden( 'prefix', $this->mPrefix );
-   $htmlOut .= Html::hidden( 'minor', $this->mMinor );
+   if ( is_array( $this->mPreloadparams ) ) {
+   foreach ( $this->mPreloadparams as $preloadparams ) {
+   $htmlOut .= Html::hidden( 'preloadparams[]', 
$preloadparams );
+   }
+   }
+   if ( $this->mEditIntro !== null ) {
+   $htmlOut .= Html::hidden( 'editintro', 
$this->mEditIntro );
+   }
+   if ( $this->mSummary !== null ) {
+   $htmlOut .= Html::hidden( 'summary', $this->mSummary );
+   }
+   if ( $this->mNosummary !== null ) {
+   $htmlOut .= Html::hidden( 'nosummary', 
$this->mNosummary );
+   }
+   if ( $this->mPrefix !== '' ) {
+   $htmlOut .= Html::hidden( 'prefix', $this->mPrefix );
+   }
+   if ( $this->mMinor !== null ) {
+   $htmlOut .= Html::hidden( 'minor', $this->mMinor );
+   }
if ( $this->mType == 'comment' ) {
$htmlOut .= Html::hidden( 'section', 'new' );
}
@@ -517,11 +531,17 @@
$htmlOut .= Xml::openElement( 'form', $commentFormParams );
$editArgs = $this->getEditActionArgs();
$htmlOut .= Html::hidden( $editArgs['name'], $editArgs['value'] 
);
-   $htmlOut .= Html::hidden( 'preload', $this->mPreload );
-   foreach ( $this->mPreloadparams as $preloadparams ) {
-   $htmlOut .= Html::hidden( 'preloadparams[]', 
$preloadparams );
+   if ( $this->mPreload !== null ) {
+   $htmlOut .= Html::hidden( 'preload', $this->mPreload );
}
-   $htmlOut .= Html::hidden( 'editintro', $this->mEditIntro );
+   if ( is_array( $this->mPreloadparams ) ) {
+   foreach ( $this->mPreloadparams as $preloadparams ) {
+   $htmlOut .= Html::hidden( 'preloadparams[]', 
$preloadparams );
+   }
+

[MediaWiki-commits] [Gerrit] operations/puppet[production]: base::monitoring: make it possible to disable monitoring

2017-07-26 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/368124 )

Change subject: base::monitoring: make it possible to disable monitoring
..

base::monitoring: make it possible to disable monitoring

Change-Id: Idff6a66567390c438ba2b79dda7e74b8483d3e61
---
M modules/base/manifests/monitoring/host.pp
M modules/profile/manifests/base.pp
2 files changed, 100 insertions(+), 67 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/24/368124/1

diff --git a/modules/base/manifests/monitoring/host.pp 
b/modules/base/manifests/monitoring/host.pp
index c99aec4..d6943df 100644
--- a/modules/base/manifests/monitoring/host.pp
+++ b/modules/base/manifests/monitoring/host.pp
@@ -29,54 +29,78 @@
 $nrpe_check_disk_options = '-w 6% -c 3% -l -e -A -i "/srv/sd[a-b][1-3]" 
--exclude-type=tracefs',
 $nrpe_check_disk_critical = false,
 $raid_write_cache_policy = undef,
+$enabled = true,
 ) {
 include ::base::puppet::params # In order to be able to use some variables
 
-# RAID checks
-class { 'raid':
-write_cache_policy => $raid_write_cache_policy,
+$ensure = $enabled ? {
+true  => 'present',
+false => 'absent',
 }
 
-::monitoring::host { $::hostname: }
+if $enabled {
+# TODO: FIX ALL THE THINGS in RAID CLASS TOO, SIGH
+# RAID checks
+class { 'raid':
+write_cache_policy => $raid_write_cache_policy,
+}
+
+
+}
+
+::sudo::user { 'nagios_puppetrun':
+ensure => $ensure,
+user   => 'nagios',
+privileges => ['ALL = NOPASSWD: 
/usr/local/lib/nagios/plugins/check_puppetrun'],
+}
+
+::monitoring::host { $::hostname:
+ensure => $ensure,
+}
 
 ::monitoring::service { 'ssh':
+ensure=> $ensure,
 description   => 'SSH',
 check_command => 'check_ssh',
 }
 
-file { '/usr/local/lib/nagios/plugins/check_puppetrun':
-ensure => present,
-owner  => 'root',
-group  => 'root',
-mode   => '0555',
-source => 'puppet:///modules/base/monitoring/check_puppetrun';
+::nrpe::monitor_service { 'disk_space':
+ensure   => $ensure,
+description  => 'Disk space',
+critical => $nrpe_check_disk_critical,
+nrpe_command => "/usr/lib/nagios/plugins/check_disk 
${nrpe_check_disk_options}",
 }
-file { '/usr/local/lib/nagios/plugins/check_eth':
-ensure  => present,
-owner   => 'root',
-group   => 'root',
-mode=> '0555',
-content => template('base/check_eth.erb'),
-}
-file { '/usr/lib/nagios/plugins/check_sysctl':
-ensure => present,
-owner  => 'root',
-group  => 'root',
-mode   => '0555',
-source => 'puppet:///modules/base/check_sysctl',
+
+::nrpe::monitor_service { 'dpkg':
+ensure   => $ensure,
+description  => 'DPKG',
+nrpe_command => '/usr/local/lib/nagios/plugins/check_dpkg',
 }
 
-file { '/usr/lib/nagios/plugins/check-fresh-files-in-dir.py':
-ensure => present,
-owner  => 'root',
-group  => 'root',
-mode   => '0555',
-source => 
'puppet:///modules/base/monitoring/check-fresh-files-in-dir.py',
+$warninginterval = $base::puppet::params::freshnessinterval
+$criticalinterval = $base::puppet::params::freshnessinterval * 2
+::nrpe::monitor_service { 'puppet_checkpuppetrun':
+ensure   => $ensure,
+description  => 'puppet last run',
+nrpe_command => "/usr/bin/sudo 
/usr/local/lib/nagios/plugins/check_puppetrun -w ${warninginterval} -c 
${criticalinterval}",
 }
 
-::sudo::user { 'nagios_puppetrun':
-user   => 'nagios',
-privileges => ['ALL = NOPASSWD: 
/usr/local/lib/nagios/plugins/check_puppetrun'],
+::nrpe::monitor_service {'check_eth':
+ensure   => $ensure,
+description  => 'configured eth',
+nrpe_command => '/usr/local/lib/nagios/plugins/check_eth',
+}
+
+::nrpe::monitor_service { 'check_dhclient':
+ensure   => $ensure,
+description  => 'dhclient process',
+nrpe_command => '/usr/lib/nagios/plugins/check_procs -w 0:0 -c 0:0 -C 
dhclient',
+}
+
+::nrpe::monitor_service { 'check_salt_minion':
+ensure   => $ensure,
+description  => 'salt-minion processes',
+nrpe_command => "/usr/lib/nagios/plugins/check_procs -w 1: -c 1:5 
--ereg-argument-array '/usr/bin/python /usr/bin/salt-minion'",
 }
 
 # Check for disk usage on the root partition for labs instances
@@ -85,57 +109,66 @@
 # to reflect this check name
 if $::realm == 'labs' {
 ::nrpe::monitor_service { 'root_disk_space':
+ensure   => $ensure,
 description  => 'Disk space on /',
 nrpe_command 

[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: TEST

2017-07-26 Thread Mholloway (Code Review)
Mholloway has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/368123 )

Change subject: TEST
..

TEST

Change-Id: I084bdcf5b4aeb326a4d4a19aa25ba722c6e06b45
---
M .gitignore
1 file changed, 5 insertions(+), 1 deletion(-)


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

diff --git a/.gitignore b/.gitignore
index d559456..5e5902a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -43,4 +43,8 @@
 
 # diff-screenshots
 /app/screenshots
-/app/screenshots-diff
\ No newline at end of file
+/app/screenshots-diff
+
+.sdk/build-tools
+.sdk/platforms
+.sdk/platform-tools

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: resourceloader: Include lessVars in FileModule definition su...

2017-07-26 Thread Krinkle (Code Review)
Krinkle has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/368122 )

Change subject: resourceloader: Include lessVars in FileModule definition 
summary
..

resourceloader: Include lessVars in FileModule definition summary

This already worked as expected for any module that uses the new
enableModuleContentVersion model, but for the majority of file modules
this is not yet the case for performance reasons. As such, make
sure lessVars are included in our manual tracking.

Include it conditionally to avoid changing the array for other modules,
which would needlessly invalidate their cache.

Bug: T171809
Change-Id: Ib250068e0ecfc29a09ca33c23bef901ee0482bf2
---
M includes/resourceloader/ResourceLoaderFileModule.php
M tests/phpunit/ResourceLoaderTestCase.php
M tests/phpunit/includes/resourceloader/ResourceLoaderFileModuleTest.php
3 files changed, 41 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/22/368122/1

diff --git a/includes/resourceloader/ResourceLoaderFileModule.php 
b/includes/resourceloader/ResourceLoaderFileModule.php
index 79b8e79..4675191 100644
--- a/includes/resourceloader/ResourceLoaderFileModule.php
+++ b/includes/resourceloader/ResourceLoaderFileModule.php
@@ -580,6 +580,12 @@
'fileHashes' => $this->getFileHashes( $context ),
'messageBlob' => $this->getMessageBlob( $context ),
];
+
+   $lessVars = $this->getLessVars( $context );
+   if ( $lessVars ) {
+   $summary[] = [ 'lessVars' => $lessVars ];
+   }
+
return $summary;
}
 
diff --git a/tests/phpunit/ResourceLoaderTestCase.php 
b/tests/phpunit/ResourceLoaderTestCase.php
index d8f89fb..f75cc22 100644
--- a/tests/phpunit/ResourceLoaderTestCase.php
+++ b/tests/phpunit/ResourceLoaderTestCase.php
@@ -153,6 +153,22 @@
}
 }
 
+class ResourceLoaderFileTestModule extends ResourceLoaderFileModule {
+   protected $lessVars = [];
+
+   public function __construct( $options = [], $test = [] ) {
+   parent::__construct( $options );
+
+   foreach ( $test as $key => $value ) {
+   $this->$key = $value;
+   }
+   }
+
+   public function getLessVars( ResourceLoaderContext $context ) {
+   return $this->lessVars;
+   }
+}
+
 class ResourceLoaderFileModuleTestModule extends ResourceLoaderFileModule {
 }
 
diff --git 
a/tests/phpunit/includes/resourceloader/ResourceLoaderFileModuleTest.php 
b/tests/phpunit/includes/resourceloader/ResourceLoaderFileModuleTest.php
index ded56e9..e82bab7 100644
--- a/tests/phpunit/includes/resourceloader/ResourceLoaderFileModuleTest.php
+++ b/tests/phpunit/includes/resourceloader/ResourceLoaderFileModuleTest.php
@@ -331,4 +331,23 @@
'Leading BOM removed when concatenating files'
);
}
+
+   /**
+* @covers ResourceLoaderFileModule::getDefinitionSummary
+*/
+   public function testGetVersionHash() {
+   $context = $this->getResourceLoaderContext();
+
+   // Less variables
+   $module = new ResourceLoaderFileTestModule();
+   $version = $module->getVersionHash( $context );
+   $module = new ResourceLoaderFileTestModule( [], [
+   'lessVars' => [ 'key' => 'value' ],
+   ] );
+   $this->assertNotEquals(
+   $version,
+   $module->getVersionHash( $context ),
+   'Using less variables is significant'
+   );
+   }
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib250068e0ecfc29a09ca33c23bef901ee0482bf2
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...WikimediaMaintenance[master]: phpcs for WikimediaMaintenance

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

Change subject: phpcs for WikimediaMaintenance
..


phpcs for WikimediaMaintenance

Change-Id: I26914255fe19b6723778b6442d0a9b29bfa931fb
---
M addWiki.php
M bug-53687/fixOrphans.php
M changeSkinPref.php
M checkTranscacheEmpty.php
M cleanupBug31576.php
M cleanupBug41615.php
M cleanupMl.php
M cleanupPageProps.php
M cleanupT92775.php
A composer.json
M createExtensionTables.php
M createHumanReadableProjectNameFiles.php
M dumpInterwiki.php
M filebackend/measureZoneSizes.php
M filebackend/setZoneAccess.php
M fixBeXOldRenames.php
M fixBug41778.php
M fixCleanupTitles/revertCleanupTitles.php
M fixJobQueueExplosion.php
M fixUsabilityPrefs.php
M fixUsabilityPrefs2.php
M getJobQueueLengths.php
M getPageCounts.php
M importUseModWikipedia.php
M makeDumpList.php
M makeSizeDBLists.php
M migrateWlmUploads.php
M ourUsers.php
M passwordAudit.php
A phpcs.xml
M purgeStaleMemcachedText.php
M purgeUrls.php
M rcParamsTypeCheck.php
M removeDeletedWikis.php
M renameInvalidUsernames.php
M renameWiki.php
M sanityCheck.php
M socket-test.php
M storage/testRctComplete.php
M unsuppressCrossWiki.php
40 files changed, 440 insertions(+), 414 deletions(-)

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



diff --git a/addWiki.php b/addWiki.php
index 968e6e4..360a5a8 100644
--- a/addWiki.php
+++ b/addWiki.php
@@ -87,7 +87,7 @@
null,
null,
__METHOD__,
-   array( $this, 'noExecuteCommands' )
+   [ $this, 'noExecuteCommands' ]
);
$dbw->sourceFile( 
"$IP/extensions/AntiSpoof/sql/patch-antispoof.mysql.sql" );
$dbw->sourceFile( "$IP/extensions/Babel/babel.sql" );
@@ -153,18 +153,18 @@
if ( is_array( $wgDefaultExternalStore ) ) {
$stores = $wgDefaultExternalStore;
} elseif ( $wgDefaultExternalStore ) {
-   $stores = array( $wgDefaultExternalStore );
+   $stores = [ $wgDefaultExternalStore ];
} else {
-   $stores = array();
+   $stores = [];
}
 
// Flow External Store (may be the same, so there is an 
array_unique)
if ( is_array( $wgFlowExternalStore ) ) {
$flowStores = $wgFlowExternalStore;
} elseif ( $wgFlowExternalStore ) {
-   $flowStores = array( $wgFlowExternalStore );
+   $flowStores = [ $wgFlowExternalStore ];
} else {
-   $flowStores = array();
+   $flowStores = [];
}
 
$stores = array_unique( array_merge( $stores, $flowStores ) );
@@ -172,7 +172,7 @@
if ( count( $stores ) ) {
global $wgDBuser, $wgDBpassword, $wgExternalServers;
foreach ( $stores as $storeURL ) {
-   $m = array();
+   $m = [];
if ( !preg_match( '!^DB://(.*)$!', $storeURL, 
$m ) ) {
continue;
}
@@ -337,7 +337,6 @@
 * @return Status
 */
private function setFundraisingLink( $domain, $language ) {
-
$title = Title::newFromText( "Mediawiki:Sitesupport-url" );
$this->output( "Writing sidebar donate link to " . 
$title->getPrefixedDBkey() . "\n" );
$article = WikiPage::factory( $title );
diff --git a/bug-53687/fixOrphans.php b/bug-53687/fixOrphans.php
index 6b6bdf9..ad18695 100644
--- a/bug-53687/fixOrphans.php
+++ b/bug-53687/fixOrphans.php
@@ -23,7 +23,7 @@
}
$dbw = wfGetDB( DB_MASTER );
 
-   $verifyPairs = array(
+   $verifyPairs = [
'ar_comment' => 'rev_comment',
'ar_user' => 'rev_user',
'ar_user_text' => 'rev_user_text',
@@ -35,7 +35,7 @@
'ar_page_id' => 'rev_page',
'ar_parent_id' => 'rev_parent_id',
'ar_sha1' => 'rev_sha1',
-   );
+   ];
 
while ( !feof( $f ) ) {
$line = fgets( $f );
@@ -52,23 +52,23 @@
$this->error( "XXX: ERROR Invalid line 
$lineNumber\n" );
continue;
}
-   $info = array_combine( array( 'up_page', 
'up_timestamp', 'log_namespace',
-   'log_title', 'rev_id', 'ar_rev_match', 
'ar_text_match' ), $parts );
+   $info = array_combine( [ 'up_page', 

[MediaWiki-commits] [Gerrit] data-values/value-view[master]: Make tests compatible with QUnit 2

2017-07-26 Thread Krinkle (Code Review)
Krinkle has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/368121 )

Change subject: Make tests compatible with QUnit 2
..

Make tests compatible with QUnit 2

Avoid QUnit.asyncTest, QUnit.start/stop (deprecated in 1.x, removed in 2.0).

Bug: T170515
Change-Id: I15fc0b75832308cf7865e79b8156432717063631
---
M tests/src/ExpertExtender/ExpertExtender.Listrotator.tests.js
1 file changed, 3 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/data-values/value-view 
refs/changes/21/368121/1

diff --git a/tests/src/ExpertExtender/ExpertExtender.Listrotator.tests.js 
b/tests/src/ExpertExtender/ExpertExtender.Listrotator.tests.js
index 14b2271..522deed 100644
--- a/tests/src/ExpertExtender/ExpertExtender.Listrotator.tests.js
+++ b/tests/src/ExpertExtender/ExpertExtender.Listrotator.tests.js
@@ -39,8 +39,9 @@
assert.equal( listrotator.getValue(), 'custom value' );
} );
 
-   QUnit.asyncTest( 'supports switching away from custom values', 
function( assert ) {
+   QUnit.test( 'supports switching away from custom values', function( 
assert ) {
assert.expect( 2 );
+   var done = assert.async();
var onValueChange = sinon.spy();
var upstreamValue = {
custom: true,
@@ -67,7 +68,7 @@
sinon.assert.calledOnce( onValueChange );
assert.equal( listrotator.getValue(), 'fixed value' );
 
-   QUnit.start();
+   done();
}, 200 );
 
} );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I15fc0b75832308cf7865e79b8156432717063631
Gerrit-PatchSet: 1
Gerrit-Project: data-values/value-view
Gerrit-Branch: master
Gerrit-Owner: Krinkle 

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Add setup for https://www.mediawiki.org/ontology

2017-07-26 Thread Smalyshev (Code Review)
Smalyshev has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/368120 )

Change subject: Add setup for https://www.mediawiki.org/ontology
..

Add setup for https://www.mediawiki.org/ontology

Bug: T171807
Change-Id: I4aa708202c86e65de489dd800a7a4535e4a4af83
---
A docroot/mediawiki/ontology/index.html
A docroot/mediawiki/ontology/ontology.owl
2 files changed, 5 insertions(+), 0 deletions(-)


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

diff --git a/docroot/mediawiki/ontology/index.html 
b/docroot/mediawiki/ontology/index.html
new file mode 100644
index 000..d3d7496
--- /dev/null
+++ b/docroot/mediawiki/ontology/index.html
@@ -0,0 +1,4 @@
+This URL is just for the namespace.
+In theory there could be documentation here..
+
+For OWL definition of the Mediawiki ontology, please see the Ontology OWL file.
diff --git a/docroot/mediawiki/ontology/ontology.owl 
b/docroot/mediawiki/ontology/ontology.owl
new file mode 12
index 000..759b200
--- /dev/null
+++ b/docroot/mediawiki/ontology/ontology.owl
@@ -0,0 +1 @@
+/srv/mediawiki/php/docs/ontology.owl
\ No newline at end of file

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4aa708202c86e65de489dd800a7a4535e4a4af83
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
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] mediawiki...WikimediaMaintenance[master]: phpcs for WikimediaMaintenance

2017-07-26 Thread Reedy (Code Review)
Reedy has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/368119 )

Change subject: phpcs for WikimediaMaintenance
..

phpcs for WikimediaMaintenance

Change-Id: I26914255fe19b6723778b6442d0a9b29bfa931fb
---
A composer.json
A phpcs.xml
2 files changed, 27 insertions(+), 0 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikimediaMaintenance 
refs/changes/19/368119/1

diff --git a/composer.json b/composer.json
new file mode 100644
index 000..f498b4c
--- /dev/null
+++ b/composer.json
@@ -0,0 +1,20 @@
+{
+   "require-dev": {
+   "jakub-onderka/php-parallel-lint": "0.9.2",
+   "mediawiki/mediawiki-codesniffer": "0.10.1"
+   },
+   "scripts": {
+   "lint": "parallel-lint --exclude vendor --ignore-fails .",
+   "phpcs": "phpcs -p -s",
+   "fix": "phpcbf",
+   "test": [
+   "composer lint",
+   "composer phpcs"
+   ]
+   },
+   "config": {
+   "optimize-autoloader": true,
+   "prepend-autoloader": false
+   }
+}
+
diff --git a/phpcs.xml b/phpcs.xml
new file mode 100644
index 000..c97589d
--- /dev/null
+++ b/phpcs.xml
@@ -0,0 +1,7 @@
+
+
+   
+   .
+   
+   
+

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I26914255fe19b6723778b6442d0a9b29bfa931fb
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikimediaMaintenance
Gerrit-Branch: master
Gerrit-Owner: Reedy 

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


[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: [DONOTMERGE] SDK installation test

2017-07-26 Thread Mholloway (Code Review)
Mholloway has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/368118 )

Change subject: [DONOTMERGE] SDK installation test
..

[DONOTMERGE] SDK installation test

Change-Id: If5801d0556e6d084e236136e9b2957a7cef32538
---
M scripts/apps-android-wikipedia-test
1 file changed, 0 insertions(+), 2 deletions(-)


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

diff --git a/scripts/apps-android-wikipedia-test 
b/scripts/apps-android-wikipedia-test
index 7b741bf..fa306d4 100755
--- a/scripts/apps-android-wikipedia-test
+++ b/scripts/apps-android-wikipedia-test
@@ -3,6 +3,4 @@
 
 scripts/missing-qq.py
 
-export ANDROID_HOME="$PWD/.sdk"
-
 ./gradlew clean checkstyle assembleAlphaRelease lintAlphaRelease 
testAlphaRelease compileAlphaReleaseAndroidTestSources

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

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

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


[MediaWiki-commits] [Gerrit] wikidata...gui[master]: Extract tags for example dialog in JS

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

Change subject: Extract tags for example dialog in JS
..


Extract tags for example dialog in JS

Extracts entity IDs as tags from SPARQL query.
Sorts them by weight and use first 50.
Then fetches labels via Wikibase API and builds tag cloud with labels.


Change-Id: Ic9bce71837e2a2d92aa3f6660460d465da0d4a30
---
M wikibase/queryService/api/QuerySamples.js
M wikibase/queryService/api/Wikibase.js
M wikibase/queryService/ui/QueryExampleDialog.js
3 files changed, 108 insertions(+), 43 deletions(-)

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



diff --git a/wikibase/queryService/api/QuerySamples.js 
b/wikibase/queryService/api/QuerySamples.js
index 2f92872..8e62ed6 100644
--- a/wikibase/queryService/api/QuerySamples.js
+++ b/wikibase/queryService/api/QuerySamples.js
@@ -97,15 +97,14 @@
return prev;
};
 
-   /**
-* Get list of tags from UL list
-*
-* @param {Element} tagUL
-* @return {string[]}
- * @private
- */
-   SELF.prototype._extractTagsFromUL = function( tagUL ) {
-   return tagUL.find( 'a[rel="mw:WikiLink"]' ).map( function() { 
return $( this ).text().trim(); } ).get();
+   SELF.prototype._extractTagsFromSPARQL = function ( sparql ) {
+   var tags = sparql.replace( /\n/g, '' ).match( /(Q|P)[0-9]+/g );
+
+   if ( !tags ) {
+   return [];
+   }
+
+   return tags;
};
 
SELF.prototype._parseHTML = function ( html ) {
@@ -141,14 +140,12 @@
return null;
}
var title = titleEl.text().trim();
-   // Get UL elements between header and query text
-   var tagUL = $this.prevUntil( titleEl ).filter( 'ul' );
 
return {
title:title,
query:query,
href: PAGE_URL + '#' + encodeURIComponent( 
title.replace( / /g, '_' ) ).replace( /%/g, '.' ),
-   tags: self._extractTagsFromUL( tagUL ),
+   tags: self._extractTagsFromSPARQL( query ),
category: self._findPrevHeader( titleEl 
).text().trim()
};
} ).get();
diff --git a/wikibase/queryService/api/Wikibase.js 
b/wikibase/queryService/api/Wikibase.js
index c84bc99..4a9dac9 100644
--- a/wikibase/queryService/api/Wikibase.js
+++ b/wikibase/queryService/api/Wikibase.js
@@ -12,7 +12,7 @@
action: 'wbsearchentities',
format: 'json',
continue: 0,
-   language: LANGUAGE,
+   languages: LANGUAGE,
uselang: LANGUAGE
};
 
@@ -21,6 +21,14 @@
meta: 'siteinfo',
format: 'json',
siprop: 'languages'
+   };
+
+   var QUERY_LABELS = {
+   action: 'wbgetentities',
+   props: 'labels',
+   format: 'json',
+   languages: LANGUAGE,
+   languagefallback: '1'
};
 
/**
@@ -91,6 +99,27 @@
};
 
/**
+* Get labels for given entities
+*
+* @return {jQuery.Promise}
+*/
+   SELF.prototype.getLabels = function( ids ) {
+
+   if ( typeof ids === 'string' ) {
+   ids = [ ids ];
+   }
+
+   var query = QUERY_LABELS;
+   query.ids = ids.join( '|' );
+
+   if ( this._language  ) {
+   query.languages = this._language;
+   }
+
+   return this._query( query );
+   };
+
+   /**
 * @private
 */
SELF.prototype._query = function( query ) {
diff --git a/wikibase/queryService/ui/QueryExampleDialog.js 
b/wikibase/queryService/ui/QueryExampleDialog.js
index 30c9948..6ad7e0b 100644
--- a/wikibase/queryService/ui/QueryExampleDialog.js
+++ b/wikibase/queryService/ui/QueryExampleDialog.js
@@ -38,6 +38,12 @@
SELF.prototype._querySamplesApi = null;
 
/**
+* @property {wikibase.queryService.api.Wikibase}
+* @private
+*/
+   SELF.prototype._wikibaseApi = null;
+
+   /**
 * @property {Function}
 * @private
 */
@@ -74,6 +80,8 @@
if ( !this._trackingApi ) {
this._trackingApi = new 
wikibase.queryService.api.Tracking();
}
+
+   this._wikibaseApi = new wikibase.queryService.api.Wikibase();
 
this._initFilter();
this._initExamples();
@@ -146,32 +154,38 @@
var self = this,
 

[MediaWiki-commits] [Gerrit] mediawiki...ORES[master]: Follow-up a93bd12: also ignore RC_LOG/RC_EXTERNAL in non-RCF...

2017-07-26 Thread Catrope (Code Review)
Catrope has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/368117 )

Change subject: Follow-up a93bd12: also ignore RC_LOG/RC_EXTERNAL in 
non-RCFilters UI
..

Follow-up a93bd12: also ignore RC_LOG/RC_EXTERNAL in non-RCFilters UI

Filter out RC_LOG and RC_EXTERNAL when hidenondamaging=1 is set,
and never apply the 'r' or highlighting to such rows.

Bug: T168487
Change-Id: I06f9985a40e4ab8269d35d10ffa30834d5c35e09
---
M includes/Hooks.php
1 file changed, 7 insertions(+), 1 deletion(-)


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

diff --git a/includes/Hooks.php b/includes/Hooks.php
index 59ef2bd..fbc3f1b 100644
--- a/includes/Hooks.php
+++ b/includes/Hooks.php
@@ -241,7 +241,11 @@
'queryCallable' => function ( 
$specialClassName, $ctx, $dbr, &$tables,
&$fields, 
&$conds, &$query_options, &$join_conds ) {

self::hideNonDamagingFilter( $fields, $conds, true, $ctx->getUser() );
+   // Filter out 
incompatible types; log actions and external rows are not scorable
+   $conds[] = 'rc_type NOT 
IN (' . $dbr->makeList( [ RC_LOG, RC_EXTERNAL ] ) . ')';
+   // Filter out patrolled 
edits: the 'r' doesn't appear for them
$conds['rc_patrolled'] 
= 0;
+   // Make the joins INNER 
JOINs instead of LEFT JOINs

$join_conds['ores_damaging_mdl'][0] = 'INNER JOIN';

$join_conds['ores_damaging_cls'][0] = 'INNER JOIN';
// Performance hack: 
add STRAIGHT_JOIN (146111)
@@ -632,8 +636,10 @@
}
$score = $rcObj->getAttribute( 'ores_damaging_score' );
$patrolled = $rcObj->getAttribute( 'rc_patrolled' );
+   $type = $rcObj->getAttribute( 'rc_type' );
 
-   if ( !$score || $threshold === null ) {
+   // Log actions and external rows are not scorable; if such a 
row does have a score, ignore it
+   if ( !$score || $threshold === null || in_array( $type, [ 
RC_LOG, RC_EXTERNAL ] ) ) {
// Shorten out
return false;
}

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...WikimediaMaintenance[master]: Create new wmfManageJobs.php for deleting queues from delete...

2017-07-26 Thread Krinkle (Code Review)
Krinkle has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/368116 )

Change subject: Create new wmfManageJobs.php for deleting queues from deleted 
wikis
..

Create new wmfManageJobs.php for deleting queues from deleted wikis

Bug: T171371
Change-Id: I29895db8c719abdd56ec773a79ef4287af2ac68b
---
A wmfManageJobs.php
1 file changed, 119 insertions(+), 0 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikimediaMaintenance 
refs/changes/16/368116/1

diff --git a/wmfManageJobs.php b/wmfManageJobs.php
new file mode 100644
index 000..8f92de0
--- /dev/null
+++ b/wmfManageJobs.php
@@ -0,0 +1,119 @@
+http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup Maintenance
+ */
+
+require_once __DIR__ . '/WikimediaMaintenance.php';
+
+/**
+ * WMF-specific version of mediawiki/maintenance/manageJobs.php.
+ *
+ * Main use case is to be able to perform actions on the job queue even for
+ * Wiki IDs that are no longer recognised by MediaWiki.
+ * It communicates directly with the job queue using the Job Config of
+ * the wiki the script was run from, under the assumption that all wikis
+ * share the same job queue configuration. (Or at least the target wiki,
+ * and the used wiki).
+ *
+ * For regular wikis that still exist and operate normally, prefer
+ * using MediaWiki core's manageJobs.php instead.
+ *
+ * Usage:
+ *
+ *  $ mwscript extensions/WikimediaMaintenance/wmfManageJobs.php --wiki=aawiki 
--target=example
+ */
+class WmfManageJobs extends Maintenance {
+   public function __construct() {
+   parent::__construct();
+   $this->addDescription( 'Manage job queue for a particular 
wiki-id' );
+   $this->addOption( 'target', 'Which Wiki-ID to operate on', 
true, true );
+   $this->addOption( 'delete', 'Delete all queues for this wiki 
ID', false, false );
+   }
+
+   public function execute() {
+   $target = $this->getOption( 'target' );
+   $delete = $this->hasOption( 'delete' );
+
+   $group = JobQueueGroup::singleton( $target );
+
+   // Get a list of job types for this wiki
+   // - Can't use $group->getQueueTypes() because that it uses 
SiteConfig
+   //   to read 'wgJobClasses' from the target wiki, which may not 
exist
+   // - Can't use `$this->getConfig()->get( 'JobClasses' )` 
because which
+   //   jobs are recognised varies from one wiki to another (which 
extensions
+   //   are installed etc, there is no "catch-all" registry)
+   // - Workaround it by levering JobQueueAggregator, which tracks 
jobs
+   //   in a structured globally keyed by job type first.
+   $aggregator = JobQueueAggregator::singleton();
+   $types = array_keys( $aggregator->getAllReadyWikiQueues() );
+
+   $deleteTypes = [];
+   $total = 0;
+
+   // Show current job queue status
+   // (Based on mediawiki/maintenance/showJobs.php)
+   foreach ( $types as $type ) {
+   $queue = $group->get( $type );
+   if ( !$queue ) {
+   $this->output( "{$type}: (does not exist for 
this wiki)" );
+   continue;
+   }
+   $pending = $queue->getSize();
+   $delayed = $queue->getDelayedCount();
+   $claimed = $queue->getAcquiredCount();
+   $abandoned = $queue->getAbandonedCount();
+   $subtotal = $pending + $delayed + $claimed + $abandoned;
+   if ( $subtotal ) {
+   $active = max( 0, $claimed - $abandoned );
+   $this->output(
+   "{$type}: $pending queued; " .
+   "$claimed claimed ($active active, 
$abandoned abandoned); " .
+   "$delayed delayed\n"
+   );
+   $deleteTypes[$type] = $queue;
+   $total += $subtotal;
+   }
+   }
+
+   if ( !$deleteTypes ) {
+   $this->output( "\nNo queues found for $target.\n" );
+   return;
+   }
+
+   if ( !$delete ) {
+   $this->output( "\nRun the script again with --delete to 
delete these queues.\n" );
+   return;
+   }
+
+   $count = count( $deleteTypes );
+   $this->output( "\n\nThe script will now delete $total job(s), " 
.
+   "from $count different type(s), for this wiki: 
$target\n" );
+   $this->output( 'Abort with 

[MediaWiki-commits] [Gerrit] mediawiki...MobileFrontend[master]: DONOTMERGE: testing someting

2017-07-26 Thread Jdlrobson (Code Review)
Jdlrobson has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/368115 )

Change subject: DONOTMERGE: testing someting
..

DONOTMERGE: testing someting

Change-Id: I6908872ece922772ddcf5f22daae6bb61ab8ddaa
---
M resources/mobile.startup/toast.js
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/resources/mobile.startup/toast.js 
b/resources/mobile.startup/toast.js
index 91687af..59a91dc 100644
--- a/resources/mobile.startup/toast.js
+++ b/resources/mobile.startup/toast.js
@@ -28,7 +28,7 @@
}
 
options = $.extend( {
-   tag: 'toast'
+   tag: 'toast toast-class'
}, options );
 
this.notification = mw.notify( msg, options );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6908872ece922772ddcf5f22daae6bb61ab8ddaa
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
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...MinervaNeue[master]: Hygiene: Toast selector should be more flexible

2017-07-26 Thread Jdlrobson (Code Review)
Jdlrobson has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/368114 )

Change subject: Hygiene: Toast selector should be more flexible
..

Hygiene: Toast selector should be more flexible

A toast can carry other classes.
I have a hunch that using class here is wrong as class will not
match a toast with other classes.

Bug: T170890
Change-Id: I9fbb21f8d262890d4c9d2a508351f33fe2023297
---
M tests/browser/features/support/pages/article_page.rb
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/MinervaNeue 
refs/changes/14/368114/1

diff --git a/tests/browser/features/support/pages/article_page.rb 
b/tests/browser/features/support/pages/article_page.rb
index 064e9a7..e7c14e8 100644
--- a/tests/browser/features/support/pages/article_page.rb
+++ b/tests/browser/features/support/pages/article_page.rb
@@ -144,7 +144,7 @@
   div(:spinner_loading, class: 'spinner loading')
 
   # toast
-  div(:toast, class: 'mw-notification')
+  div(:toast, css: '.mw-notification')
 
   # loader
   div(:content_wrapper, id: 'content')

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9fbb21f8d262890d4c9d2a508351f33fe2023297
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/MinervaNeue
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] operations/puppet[production]: lists/icinga: remove I/O monitoring on lists server

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

Change subject: lists/icinga: remove I/O monitoring on lists server
..


lists/icinga: remove I/O monitoring on lists server

This check hasn't been as useful as we hoped it would be.

It has once been added as a reaction to an outage but it has
almost exclusively reported false positives which were natural spikes.

We have added a new check for size of exim queues on MX servers today
and as also suggested by Filippo, we should remove this old check while
at it in exchange for that.

Bug: T133110
Change-Id: I1b8006d323b8ba390d6a96aa69a4ec853ee2a28f
---
M modules/profile/manifests/lists.pp
1 file changed, 0 insertions(+), 26 deletions(-)

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



diff --git a/modules/profile/manifests/lists.pp 
b/modules/profile/manifests/lists.pp
index 573e7dc..1675939 100644
--- a/modules/profile/manifests/lists.pp
+++ b/modules/profile/manifests/lists.pp
@@ -105,32 +105,6 @@
 nrpe_command => '/usr/bin/sudo -u list 
/usr/local/lib/nagios/plugins/check_mailman_queue 25 25 25',
 }
 
-# on list servers we monitor I/O with iostat
-# the icinga plugin needs bc to compare floating point numbers
-package { 'bc':
-ensure => present,
-}
-
-file { '/usr/local/lib/nagios/plugins/check_iostat':
-ensure => present,
-owner  => 'root',
-group  => 'root',
-mode   => '0755',
-source => 'puppet:///modules/icinga/check_iostat.sh',
-}
-
-$iostat_device = $facts['is_virtual'] ? {
-true=> 'vda',
-false   => 'sda',
-}
-
-nrpe::monitor_service { 'mailman_iostat':
-description  => 'mailman I/O stats',
-nrpe_command => "/usr/local/lib/nagios/plugins/check_iostat \
--i -w 250,350,300,14000,7500 -c 
500,400,600,28000,11000 -d ${iostat_device}",
-timeout  => '30',
-}
-
 ferm::service { 'mailman-smtp':
 proto => 'tcp',
 port  => '25',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1b8006d323b8ba390d6a96aa69a4ec853ee2a28f
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn 
Gerrit-Reviewer: Alexandros Kosiaris 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: Filippo Giunchedi 
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]: Make emails for minor edits always available; keep defaults

2017-07-26 Thread Mattflaschen (Code Review)
Mattflaschen has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/368113 )

Change subject: Make emails for minor edits always available; keep defaults
..

Make emails for minor edits always available; keep defaults

Instead of blocking the feature entirely, make it always available.
But start the defaults based on the old setting (whether the feature
was usable at all).

This also slightly mitigates a pretty bad bug (T29884) where emails are
blocked.

Bug: T29884
Bug: T142727
Change-Id: Ifd3b76e39aa24d17d41c66e63bbba1e9fd31a473
---
M wmf-config/CommonSettings.php
M wmf-config/InitialiseSettings.php
2 files changed, 11 insertions(+), 1 deletion(-)


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

diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index d913d60..2228aba 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -1333,6 +1333,10 @@
 
 $wgEnotifUseJobQ = true;
 
+// Keep this true; it's just whether the feature is available at all, not the 
default
+// setting. T142727
+$wgEnotifMinorEdits = true;
+
 // Username spoofing / mixed-script / similarity check detection
 wfLoadExtension( 'AntiSpoof' );
 
@@ -1978,7 +1982,10 @@
 } else {
$wgDefaultUserOptions['watchdefault'] = 0;
 }
+
+$wgDefaultUserOptions['enotifminoredits'] = $wmgEnotifMinorEditsUserDefault;
 $wgDefaultUserOptions['enotifwatchlistpages'] = 0;
+
 $wgDefaultUserOptions['usenewrc'] = 0;
 $wgDefaultUserOptions['extendwatchlist'] = 0;
 
diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index f8096bc..94c0246 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -11527,7 +11527,10 @@
'default' => true,
 ],
 
-'wgEnotifMinorEdits' => [
+// This controls whether minor edits trigger
+// an email notification by default.
+// The feature is always available ($wgEnotifMinorEdits).
+'wmgEnotifMinorEditsUserDefault' => [
'default' => false,
'hiwiki' => true,
'huwiki' => true, // T125351

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

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

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


[MediaWiki-commits] [Gerrit] wikimedia...crm[deployment]: Update vendor submodule e2f13e9 Update silverpopXmlConnector

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

Change subject: Update vendor submodule e2f13e9 Update silverpopXmlConnector
..


Update vendor submodule
e2f13e9 Update silverpopXmlConnector

Change-Id: I62abe9075729d7eaa8b4b9ef8d521063f5d078d6
---
M vendor
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/vendor b/vendor
index 0e1e603..e2f13e9 16
--- a/vendor
+++ b/vendor
@@ -1 +1 @@
-Subproject commit 0e1e6032f2385632ba86658ba9cc916de470d50e
+Subproject commit e2f13e902077af0e2f3997b61727fe9eba275410

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I62abe9075729d7eaa8b4b9ef8d521063f5d078d6
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: deployment
Gerrit-Owner: Eileen 
Gerrit-Reviewer: Eileen 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] wikimedia...crm[deployment]: Update vendor submodule e2f13e9 Update silverpopXmlConnector

2017-07-26 Thread Eileen (Code Review)
Eileen has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/368112 )

Change subject: Update vendor submodule e2f13e9 Update silverpopXmlConnector
..

Update vendor submodule
e2f13e9 Update silverpopXmlConnector

Change-Id: I62abe9075729d7eaa8b4b9ef8d521063f5d078d6
---
M vendor
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/12/368112/1

diff --git a/vendor b/vendor
index 0e1e603..e2f13e9 16
--- a/vendor
+++ b/vendor
@@ -1 +1 @@
-Subproject commit 0e1e6032f2385632ba86658ba9cc916de470d50e
+Subproject commit e2f13e902077af0e2f3997b61727fe9eba275410

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I62abe9075729d7eaa8b4b9ef8d521063f5d078d6
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: deployment
Gerrit-Owner: Eileen 

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


[MediaWiki-commits] [Gerrit] wikimedia...crm[deployment]: Merge branch 'master' of https://gerrit.wikimedia.org/r/wiki...

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

Change subject: Merge branch 'master' of 
https://gerrit.wikimedia.org/r/wikimedia/fundraising/crm into deployment
..


Merge branch 'master' of 
https://gerrit.wikimedia.org/r/wikimedia/fundraising/crm into deployment

+ e2b0465075bebbd7a2cd5387886f138cffa28a8b Add filters to mailing report.
+ b5fb091c82d7f1139121fb3dc32526e77206ebfa Omnimailing - extendeded mailing 
report - add suppressed
+ d46685d6cb802b59a70dff77500dbd30b4aac2b8 Update Omnimail GET to add rml fields

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

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




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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7064e0798eada407f83afe5857b99e7d683c89f4
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: deployment
Gerrit-Owner: Eileen 
Gerrit-Reviewer: Eileen 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] wikimedia...crm[deployment]: Merge branch 'master' of https://gerrit.wikimedia.org/r/wiki...

2017-07-26 Thread Eileen (Code Review)
Eileen has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/368111 )

Change subject: Merge branch 'master' of 
https://gerrit.wikimedia.org/r/wikimedia/fundraising/crm into deployment
..

Merge branch 'master' of 
https://gerrit.wikimedia.org/r/wikimedia/fundraising/crm into deployment

+ e2b0465075bebbd7a2cd5387886f138cffa28a8b Add filters to mailing report.
+ b5fb091c82d7f1139121fb3dc32526e77206ebfa Omnimailing - extendeded mailing 
report - add suppressed
+ d46685d6cb802b59a70dff77500dbd30b4aac2b8 Update Omnimail GET to add rml fields

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


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/11/368111/1


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7064e0798eada407f83afe5857b99e7d683c89f4
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: deployment
Gerrit-Owner: Eileen 

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


[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Update Omnimail GET to add rml fields

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

Change subject: Update Omnimail GET to add rml fields
..


Update Omnimail GET to add rml fields

I think these fields are specific to our DB so have treated them like custom 
data,
rather than adding getLanguage() etc functions.

Add Omnimmembergroup load functions

Perhaps I'm just Silverpopped out but this felt a bit harder to keep generic &
keep the lines between what should do what. I've cut a few corners, trying to 
do more
wmf-like handling in the main load function. Hopefully I've mitigated that 
somewhat
with tests & comments.

This should allow us to get our group of contacts with no id & to create into 
our DB with

drush cvapi 'Omnigroupmember', 'load', array('mail_provider' => 'Silverpop', 
'group_identifier' => 18468760, 'group_id' => 777);

Whre group_identifier is the id in the phab & group_id is the id of an 
as-yet-to-be-created
group in CiviCRM.

Data brought in is
- email
- language (if we can figure out what it is)
- country (if matching DB countries)
- source is a combo of the fact it is silverpop + the source in the rml form + 
the submit date
I thought about putting submit date in created_date but it's arguable whether 
that is a good idea as there are 2 separate events. That can't be done through 
the api on create if we do wish to.
- is_opt_out  - see notes below

Is OPT out
in the data set I got some contacts were already opted out. I need to dig a 
little
more here as there is opt in and opt out and I'm not sure if opt in is the 
absence of opt
out or an active opt in. There are some flags that can be set when fetching 
data that
can manipulate what is fetched to I need to answer that here.

Also, although I was purposely not setting the 'skip ones already downloaded' 
some of
my later downloads seemed a little light - I need to do a little more testing 
to check that
out.

I think clarifying these opt-out questions is probably the last step in the 
silverpop chunk of
work

Bug T160949

Change-Id: Ia0dc97b84603ca3cd32aba17094593cfad95900f
---
M composer.lock
M 
sites/default/civicrm/extensions/org.wikimedia.omnimail/api/v3/Omnigroupmember/Get.php
A 
sites/default/civicrm/extensions/org.wikimedia.omnimail/api/v3/Omnigroupmember/Load.php
M 
sites/default/civicrm/extensions/org.wikimedia.omnimail/tests/phpunit/OmnigroupmemberGetTest.php
A 
sites/default/civicrm/extensions/org.wikimedia.omnimail/tests/phpunit/OmnigroupmemberLoadTest.php
M 
sites/default/civicrm/extensions/org.wikimedia.omnimail/tests/phpunit/Responses/20170509_noCID
 - All - Jul 5 2017 06-27-45 AM.csv
6 files changed, 252 insertions(+), 4 deletions(-)

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



diff --git a/composer.lock b/composer.lock
index eb004f2..b6be6ff 100644
--- a/composer.lock
+++ b/composer.lock
@@ -1842,7 +1842,7 @@
 "source": {
 "type": "git",
 "url": 
"https://github.com/eileenmcnaughton/omnimail-silverpop.git;,
-"reference": "c48de4450ec495a8fd1cb26ba5e656876321e025"
+"reference": "cd3933b8ee7b263d0472cc44d047b82f3ec4029c"
 },
 "require": {
 "league/csv": "^8.0",
diff --git 
a/sites/default/civicrm/extensions/org.wikimedia.omnimail/api/v3/Omnigroupmember/Get.php
 
b/sites/default/civicrm/extensions/org.wikimedia.omnimail/api/v3/Omnigroupmember/Get.php
index e813920..0f179f6 100644
--- 
a/sites/default/civicrm/extensions/org.wikimedia.omnimail/api/v3/Omnigroupmember/Get.php
+++ 
b/sites/default/civicrm/extensions/org.wikimedia.omnimail/api/v3/Omnigroupmember/Get.php
@@ -19,7 +19,7 @@
   $options = _civicrm_api3_get_options_from_params($params);
   $values = array();
   foreach ($result as $groupMember) {
-$values[] = array(
+$value = array(
   'email' => (string) $groupMember->getEmail(),
   'is_opt_out' => (string) $groupMember->isOptOut(),
   'opt_in_date' => (string) $groupMember->getOptInIsoDateTime(),
@@ -28,6 +28,10 @@
   'opt_out_date' => (string) $groupMember->getOptOutIsoDateTime(),
   'contact_id' => (string) $groupMember->getContactReference(),
 );
+foreach ($params['custom_data_map'] as $fieldName => $dataKey) {
+  $value[$fieldName] = (string) $groupMember->getCustomData($dataKey);
+}
+$values[] = $value;
 if ($options['limit'] > 0 && count($values) === (int) $options['limit']) {
   break;
 }
@@ -68,5 +72,16 @@
   $params['retrieval_parameters'] = array(
 'title' => ts('Additional information for retrieval of pre-stored 
requests'),
   );
+  $params['custom_data_map'] = array(
+'type' => CRM_Utils_Type::T_STRING,
+'title' => ts('Custom fields map'),
+'description' => array('custom mappings pertaining to the mail provider 
fields'),
+'api.default' => array(
+  'language' => 'rml_language',
+  

[MediaWiki-commits] [Gerrit] operations/puppet[production]: lists/icinga: remove I/O monitoring on lists server

2017-07-26 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/368110 )

Change subject: lists/icinga: remove I/O monitoring on lists server
..

lists/icinga: remove I/O monitoring on lists server

This check hasn't been as useful as we hoped it would be.

It has once been added as a reaction to an outage but it has
almost exclusively reported false positives which were natural spikes.

We have added a new check for size of exim queues on MX servers today
and as also suggested by Filippo, we should remove this old check while
at it in exchange for that.

Bug: T133110
Change-Id: I1b8006d323b8ba390d6a96aa69a4ec853ee2a28f
---
M modules/profile/manifests/lists.pp
1 file changed, 0 insertions(+), 26 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/10/368110/1

diff --git a/modules/profile/manifests/lists.pp 
b/modules/profile/manifests/lists.pp
index 573e7dc..1675939 100644
--- a/modules/profile/manifests/lists.pp
+++ b/modules/profile/manifests/lists.pp
@@ -105,32 +105,6 @@
 nrpe_command => '/usr/bin/sudo -u list 
/usr/local/lib/nagios/plugins/check_mailman_queue 25 25 25',
 }
 
-# on list servers we monitor I/O with iostat
-# the icinga plugin needs bc to compare floating point numbers
-package { 'bc':
-ensure => present,
-}
-
-file { '/usr/local/lib/nagios/plugins/check_iostat':
-ensure => present,
-owner  => 'root',
-group  => 'root',
-mode   => '0755',
-source => 'puppet:///modules/icinga/check_iostat.sh',
-}
-
-$iostat_device = $facts['is_virtual'] ? {
-true=> 'vda',
-false   => 'sda',
-}
-
-nrpe::monitor_service { 'mailman_iostat':
-description  => 'mailman I/O stats',
-nrpe_command => "/usr/local/lib/nagios/plugins/check_iostat \
--i -w 250,350,300,14000,7500 -c 
500,400,600,28000,11000 -d ${iostat_device}",
-timeout  => '30',
-}
-
 ferm::service { 'mailman-smtp':
 proto => 'tcp',
 port  => '25',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1b8006d323b8ba390d6a96aa69a4ec853ee2a28f
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] wikimedia...vendor[master]: Update silverpopXmlConnector

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

Change subject: Update silverpopXmlConnector
..


Update silverpopXmlConnector

Get update to group member - 
https://github.com/eileenmcnaughton/omnimail-silverpop/commit/cd3933b8ee7b263d0472cc44d047b82f3ec4029c

Change-Id: I87ba8b35ce65f79c13cec80d47129ae29b7ceb44
---
M composer/installed.json
M wikimedia/omnimail-silverpop/src/Responses/Contact.php
2 files changed, 114 insertions(+), 110 deletions(-)

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



diff --git a/composer/installed.json b/composer/installed.json
index c7242bf..4a3c9b4 100644
--- a/composer/installed.json
+++ b/composer/installed.json
@@ -1746,55 +1746,6 @@
 ]
 },
 {
-"name": "wikimedia/omnimail-silverpop",
-"version": "dev-master",
-"version_normalized": "999-dev",
-"source": {
-"type": "git",
-"url": 
"https://github.com/eileenmcnaughton/omnimail-silverpop.git;,
-"reference": "c48de4450ec495a8fd1cb26ba5e656876321e025"
-},
-"require": {
-"league/csv": "^8.0",
-"mrmarkfrench/silverpop-php-connector": "dev-master",
-"omnimail/omnimail": "dev-master",
-"phpseclib/phpseclib": "~2.0"
-},
-"require-dev": {
-"guzzlehttp/guzzle": "*"
-},
-"time": "2017-07-09T22:55:21+00:00",
-"type": "library",
-"installation-source": "source",
-"autoload": {
-"psr-4": {
-"Omnimail\\Silverpop\\": "src"
-}
-},
-"autoload-dev": {
-"psr-4": {
-"Omnimail\\Silverpop\\Tests\\": "test/tests"
-}
-},
-"license": [
-"MIT"
-],
-"authors": [
-{
-"name": "Eileen McNaughton",
-"email": "emcnaugh...@wikimedia.org"
-}
-],
-"description": "Silverpop plugin for Omnimail",
-"keywords": [
-"delivery",
-"email",
-"mail",
-"omnimail",
-"silverpop"
-]
-},
-{
 "name": "mrmarkfrench/silverpop-php-connector",
 "version": "dev-master",
 "version_normalized": "999-dev",
@@ -1883,66 +1834,6 @@
 ],
 "description": "Powerful command-line option toolkit",
 "homepage": "http://github.com/c9s/GetOptionKit;
-},
-{
-"name": "symfony/polyfill-php54",
-"version": "v1.3.0",
-"version_normalized": "1.3.0.0",
-"source": {
-"type": "git",
-"url": "https://github.com/symfony/polyfill-php54.git;,
-"reference": "90e085822963fdcc9d1c5b73deb3d2e5783b16a0"
-},
-"dist": {
-"type": "zip",
-"url": 
"https://api.github.com/repos/symfony/polyfill-php54/zipball/90e085822963fdcc9d1c5b73deb3d2e5783b16a0;,
-"reference": "90e085822963fdcc9d1c5b73deb3d2e5783b16a0",
-"shasum": ""
-},
-"require": {
-"php": ">=5.3.3"
-},
-"time": "2016-11-14T01:06:16+00:00",
-"type": "library",
-"extra": {
-"branch-alias": {
-"dev-master": "1.3-dev"
-}
-},
-"installation-source": "dist",
-"autoload": {
-"psr-4": {
-"Symfony\\Polyfill\\Php54\\": ""
-},
-"files": [
-"bootstrap.php"
-],
-"classmap": [
-"Resources/stubs"
-]
-},
-"notification-url": "https://packagist.org/downloads/;,
-"license": [
-"MIT"
-],
-"authors": [
-{
-"name": "Nicolas Grekas",
-"email": "p...@tchwork.com"
-},
-{
-"name": "Symfony Community",
-"homepage": "https://symfony.com/contributors;
-}
-],
-"description": "Symfony polyfill backporting some PHP 5.4+ features to 
lower PHP versions",
-"homepage": "https://symfony.com;,
-"keywords": [
-"compatibility",
-"polyfill",
-"portable",
-"shim"
-]
 },
 {
 "name": "wikimedia/donation-interface",
@@ -2056,5 +1947,114 @@
 "donations",
 "payments"
 ]
+},
+{
+"name": "symfony/polyfill-php54",
+"version": "v1.3.0",
+"version_normalized": "1.3.0.0",
+"source": {
+"type": "git",
+"url": "https://github.com/symfony/polyfill-php54.git;,
+"reference": "90e085822963fdcc9d1c5b73deb3d2e5783b16a0"
+},
+"dist": {
+

[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Omnimailing - extendeded mailing report - add suppressed

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

Change subject: Omnimailing - extendeded mailing report - add suppressed
..


Omnimailing - extendeded mailing report - add suppressed

Add suppressed column to the report.

Bug: T161758
Change-Id: I35afe14deaf579cb69ba8b8196678607440de30c
---
M 
sites/default/civicrm/extensions/civicrm-extendedmailingstats/CRM/ExtendedMailingStats/Form/Report/ExtendedMailingStats.php
1 file changed, 9 insertions(+), 2 deletions(-)

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



diff --git 
a/sites/default/civicrm/extensions/civicrm-extendedmailingstats/CRM/ExtendedMailingStats/Form/Report/ExtendedMailingStats.php
 
b/sites/default/civicrm/extensions/civicrm-extendedmailingstats/CRM/ExtendedMailingStats/Form/Report/ExtendedMailingStats.php
index b59a4b8..92433f4 100644
--- 
a/sites/default/civicrm/extensions/civicrm-extendedmailingstats/CRM/ExtendedMailingStats/Form/Report/ExtendedMailingStats.php
+++ 
b/sites/default/civicrm/extensions/civicrm-extendedmailingstats/CRM/ExtendedMailingStats/Form/Report/ExtendedMailingStats.php
@@ -289,7 +289,7 @@
 'type' => CRM_Utils_Type::T_DATE,
   ),
   'recipients' => array(
-'title' => ts('Number of recipients'),
+'title' => ts('Number Sent'),
 'is_filters' => TRUE,
 'is_order_bys' => TRUE,
 'is_fields' => TRUE,
@@ -298,7 +298,7 @@
 'type' => CRM_Utils_Type::T_INT,
   ),
   'delivered' => array(
-'title' => ts('delivered'),
+'title' => ts('Number delivered'),
 'is_filters' => TRUE,
 'is_order_bys' => TRUE,
 'is_fields' => TRUE,
@@ -318,6 +318,13 @@
 'is_fields' => TRUE,
 'type' => CRM_Utils_Type::T_INT,
   ),
+  'suppressed' => array(
+'title' => ts('Number Supressed by Provider'),
+'is_filters' => TRUE,
+'is_order_bys' => TRUE,
+'is_fields' => TRUE,
+'type' => CRM_Utils_Type::T_INT,
+  ),
   'opened_total' => array(
 'title' => ts('Total Opens'),
 'is_filters' => TRUE,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I35afe14deaf579cb69ba8b8196678607440de30c
Gerrit-PatchSet: 2
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: master
Gerrit-Owner: Eileen 
Gerrit-Reviewer: Cdentinger 
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] operations/mediawiki-config[master]: Enable Echo per-user blacklist on meta

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

Change subject: Enable Echo per-user blacklist on meta
..


Enable Echo per-user blacklist on meta

Bug: T150419
Change-Id: Ib08ade77f388395a100f62f81c8090cc67b710e6
---
M wmf-config/InitialiseSettings.php
1 file changed, 5 insertions(+), 0 deletions(-)

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



diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 34d2c5c..f8096bc 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -17168,6 +17168,11 @@
'default' => true,
 ],
 
+'wgEchoPerUserBlacklist' => [
+   'default' => false,
+   'metawiki' => true,
+],
+
 // Thanks should be enabled for wikis with Echo
 'wmgUseThanks' => [
'default' => true,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib08ade77f388395a100f62f81c8090cc67b710e6
Gerrit-PatchSet: 2
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Catrope 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: Florianschmidtwelzow 
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]: Use double quotes instead of singe quotes for HTML attributes

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

Change subject: Use double quotes instead of singe quotes for HTML attributes
..


Use double quotes instead of singe quotes for HTML attributes

htmlspecialchars[1] encodes only double quotes not single quotes.
Therefor the HTML attribute must enclosed with double quotes for
correct output encoding.

[1] https://secure.php.net/manual/en/function.htmlspecialchars.php

Change-Id: I3fec5299585187ed70d62b9248007af34b0db85b
---
M includes/diff/DifferenceEngine.php
M includes/logging/BlockLogFormatter.php
2 files changed, 14 insertions(+), 14 deletions(-)

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



diff --git a/includes/diff/DifferenceEngine.php 
b/includes/diff/DifferenceEngine.php
index d4bee29..7f9af60 100644
--- a/includes/diff/DifferenceEngine.php
+++ b/includes/diff/DifferenceEngine.php
@@ -1174,17 +1174,17 @@
 
if ( !$diff && !$otitle ) {
$header .= "
-   
-   {$ntitle}
+   
+   {$ntitle}
";
$multiColspan = 1;
} else {
if ( $diff ) { // Safari/Chrome show broken output if 
cols not used
$header .= "
-   
-   
-   
-   ";
+   
+   
+   
+   ";
$colspan = 2;
$multiColspan = 4;
} else {
@@ -1193,20 +1193,20 @@
}
if ( $otitle || $ntitle ) {
$header .= "
-   
-   {$otitle}
-   {$ntitle}
+   
+   {$otitle}
+   {$ntitle}
";
}
}
 
if ( $multi != '' ) {
-   $header .= "{$multi}";
+   $header .= "{$multi}";
}
if ( $notice != '' ) {
-   $header .= "{$notice}";
+   $header .= "{$notice}";
}
 
return $header . $diff . "";
diff --git a/includes/logging/BlockLogFormatter.php 
b/includes/logging/BlockLogFormatter.php
index a0bfb59..1ed18cd 100644
--- a/includes/logging/BlockLogFormatter.php
+++ b/includes/logging/BlockLogFormatter.php
@@ -60,7 +60,7 @@
// is shown on the correct side of the tooltip text.
$durationTooltip = '' . htmlspecialchars( 
$params[4] );
$params[4] = Message::rawParam(
-   "" .
+   "" .

$this->context->getLanguage()->translateBlockExpiry(
$params[4],
$this->context->getUser(),

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3fec5299585187ed70d62b9248007af34b0db85b
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Fomafix 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: Thiemo Mättig (WMDE) 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Add filters to mailing report.

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

Change subject: Add filters to mailing report.
..


Add filters to mailing report.

Primary goal here is to add an order by to received date on the mailing report
here civicrm/report/instance/99?reset=1=1 so Caitlin can better review, 
use it.

As a byproduct added a bunch more order bys & filters & a link to view mailing 
text

Upstream PR
https://github.com/australiangreens/au.org.greens.extendedmailingstats/pull/3

Bug: T161758

Change-Id: I04fff923322e23586d222dfe582cdbfafe61876d
---
M 
sites/default/civicrm/extensions/civicrm-extendedmailingstats/CRM/ExtendedMailingStats/Form/Report/ExtendedMailingStats.php
M sites/default/civicrm/extensions/civicrm-extendedmailingstats/info.xml
2 files changed, 208 insertions(+), 144 deletions(-)

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



diff --git 
a/sites/default/civicrm/extensions/civicrm-extendedmailingstats/CRM/ExtendedMailingStats/Form/Report/ExtendedMailingStats.php
 
b/sites/default/civicrm/extensions/civicrm-extendedmailingstats/CRM/ExtendedMailingStats/Form/Report/ExtendedMailingStats.php
index e06745f..b59a4b8 100644
--- 
a/sites/default/civicrm/extensions/civicrm-extendedmailingstats/CRM/ExtendedMailingStats/Form/Report/ExtendedMailingStats.php
+++ 
b/sites/default/civicrm/extensions/civicrm-extendedmailingstats/CRM/ExtendedMailingStats/Form/Report/ExtendedMailingStats.php
@@ -1,11 +1,9 @@
 _columns['civicrm_mailing'] = array(
 'fields' => array(
+  'mailing_id' => array(
+'title' => ts('Mailing ID'),
+'name' => 'id',
+'required' => TRUE,
+  ),
   'mailing_campaign_id' => array(
 'title' => ts('Campaign'),
 'name' => 'campaign_id',
@@ -75,126 +73,23 @@
   );
 }
 
-$this->_columns = array_merge($this->_columns, 
$this->getCampaignColumns());
+$this->_columns = array_merge($this->_columns, 
$this->getCampaignColumns(), $this->getMailingStatColumns());
 
-$this->_columns['civicrm_mailing_stats'] = array(
-  'dao' => 'CRM_Mailing_DAO_Mailing',
-  'fields' => array(
-'mailing_id' => array(
-  'title' => ts('Mailing ID'),
-  'required' => TRUE,
-),
-'mailing_name' => array(
-  'title' => ts('Mailing Name'),
-  'default' => TRUE,
-),
-'is_completed' => array(
-  'title' => ts('Is Completed'),
-  'default' => TRUE,
-),
-'created_date' => array(
-  'title' => ts('Date Created'),
-  'default' => TRUE,
-),
-'start' => array(
-  'title' => ts('Start Date'),
-  'default' => TRUE,
-),
-'finish' => array(
-  'title' => ts('End Date'),
-),
-'recipients' => array(
-  'title' => ts('recipients'),
-  'default' => TRUE,
-),
-'delivered' => array(
-  'title' => ts('delivered'),
-  'default' => TRUE,
-),
-'send_rate' => array(
-  'title' => ts('Send Rate'),
-  'default' => TRUE,
-),
-'bounced' => array(
-  'title' => ts('bounced'),
-  'default' => TRUE,
-),
-'opened_total' => array(
-  'title' => ts('Total Opens'),
-  'default' => TRUE,
-),
-'opened_unique' => array(
-  'title' => ts('Unique Opens'),
-  'default' => TRUE,
-),
-'unsubscribed' => array(
-  'title' => ts('unsubscribed'),
-  'default' => TRUE,
-),
-'forwarded' => array(
-  'title' => ts('forwarded'),
-  'default' => TRUE,
-),
-'clicked_total' => array(
-  'title' => ts('clicked_total'),
-  'default' => TRUE,
-),
-'clicked_unique' => array(
-  'title' => ts('clicked_unique'),
-  'default' => TRUE,
-),
-'trackable_urls' => array(
-  'title' => ts('trackable_urls'),
-  'default' => TRUE,
-),
-'clicked_contribution_page' => array(
-  'title' => ts('clicked_contribution_page'),
-  'default' => TRUE,
-),
-'contribution_count' => array(
-  'title' => ts('Contribution Count'),
-  'default' => TRUE,
-),
-'contribution_total' => array(
-  'title' => ts('contributions_total'),
-  'default' => TRUE,
-),
-  ),
-  'filters' => array(
-'is_completed' => array(
-  'title' => ts('Mailing Status'),
-  'operatorType' => CRM_Report_Form::OP_SELECT,
-  'type' => CRM_Utils_Type::T_INT,
-  'options' => array(
-0 => 'Incomplete',
-1 => 'Complete',
-  ),
-  //'operator' => 'like',
-  'default' => 1,
-

[MediaWiki-commits] [Gerrit] mediawiki...MobileFrontend[master]: DONOTMERGE: Remove main page special casing code

2017-07-26 Thread Jdlrobson (Code Review)
Jdlrobson has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/368109 )

Change subject: DONOTMERGE: Remove main page special casing code
..

DONOTMERGE: Remove main page special casing code

Change-Id: I1c23fce015fd058eff6766b95e85db1befe4b3eb
---
M README.md
M extension.json
M includes/MobileFormatter.php
M includes/api/ApiMobileView.php
4 files changed, 4 insertions(+), 155 deletions(-)


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

diff --git a/README.md b/README.md
index 07b303d..ae0385b 100644
--- a/README.md
+++ b/README.md
@@ -213,19 +213,6 @@
 * Type: `Array`
 * Default: `['h1', 'h2', 'h3', 'h4', 'h5', 'h6']`
 
- $wgMFSpecialCaseMainPage
-
-If set to true, main page HTML will receive special massaging.
-
-See 
-
-Use is discouraged as it leads to unnecessary technical debt and on the long
-term the goal is to deprecate usage of this config variable. Use at your own
-risk!
-
-* Type: `Boolean`
-* Default: `false`
-
  $wgMFMobileHeader
 
 Requests containing header with this name will be considered as coming from
diff --git a/extension.json b/extension.json
index e80cc56..d79b9b3 100644
--- a/extension.json
+++ b/extension.json
@@ -1281,7 +1281,6 @@
"h5",
"h6"
],
-   "MFSpecialCaseMainPage": false,
"MFMobileHeader": "X-Subdomain",
"MFRemovableClasses": {
"beta": [],
diff --git a/includes/MobileFormatter.php b/includes/MobileFormatter.php
index 53ab00d..8b5a34b 100644
--- a/includes/MobileFormatter.php
+++ b/includes/MobileFormatter.php
@@ -58,11 +58,6 @@
 * @var boolean $expandableSections
 */
protected $expandableSections = false;
-   /**
-* Whether actual page is the main page
-* @var boolean $mainPage
-*/
-   protected $mainPage = false;
 
/**
 * Name of the transformation option
@@ -107,18 +102,14 @@
IContentProvider $provider,
$enableSections = false, $includeTOC = false
) {
-   $mfSpecialCaseMainPage = $context->getMFConfig()->get( 
'MFSpecialCaseMainPage' );
 
$title = $context->getTitle();
-   $isMainPage = $title->isMainPage() && $mfSpecialCaseMainPage;
$isFilePage = $title->inNamespace( NS_FILE );
$isSpecialPage = $title->isSpecialPage();
 
$html = self::wrapHTML( $provider->getHTML() );
$formatter = new MobileFormatter( $html, $title );
-   $formatter->enableExpandableSections( !$isMainPage && 
!$isSpecialPage );
-
-   $formatter->setIsMainPage( $isMainPage );
+   $formatter->enableExpandableSections( !$isSpecialPage );
 
$formatter->enableExpandableSections( $enableSections );
$formatter->enableTOCPlaceholder( $includeTOC );
@@ -142,14 +133,6 @@
 */
public function enableExpandableSections( $flag = true ) {
$this->expandableSections = $flag;
-   }
-
-   /**
-* Change mainPage (is this the main page) to $value (standard: true)
-* @param boolean $value
-*/
-   public function setIsMainPage( $value = true ) {
-   $this->mainPage = $value;
}
 
/**
@@ -191,7 +174,7 @@
self::SHOW_FIRST_PARAGRAPH_BEFORE_INFOBOX => 
$showFirstParagraphBeforeInfobox
];
// Sectionify the content and transform it if necessary per 
section
-   if ( !$this->mainPage && $this->expandableSections ) {
+   if ( $this->expandableSections ) {
list( $headings, $subheadings ) = $this->getHeadings( 
$doc );
$this->makeHeadingsEditable( $subheadings );
$this->makeSections( $doc, $headings, $transformOptions 
);
@@ -547,10 +530,6 @@
 * @return string Processed HTML
 */
public function getText( $element = null ) {
-   if ( $this->mainPage ) {
-   $element = $this->parseMainPage( $this->getDoc() );
-   }
-
return parent::getText( $element );
}
 
@@ -561,81 +540,6 @@
 */
protected function msg( $key ) {
return wfMessage( $key )->text();
-   }
-
-   /**
-* Performs transformations specific to main page
-* @param DOMDocument $mainPage Tree to process
-* @return DOMElement|null
-*/
-   protected function parseMainPage( DOMDocument $mainPage ) {
-   $featuredArticle = $mainPage->getElementById( 'mp-tfa' );
-   $newsItems = $mainPage->getElementById( 'mp-itn' );
-

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Cap 'days' param in RC/Watchlist at $wgRCMaxAge

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

Change subject: Cap 'days' param in RC/Watchlist at $wgRCMaxAge
..


Cap 'days' param in RC/Watchlist at $wgRCMaxAge

Without this, setting the 'days' param to a very high value
causes exceptions while doing timestamp math.

Bug: T149890
Change-Id: I5aee5f027cced8860eb966e2d6bdb07764ce861a
---
M includes/specials/SpecialRecentchanges.php
M includes/specials/SpecialWatchlist.php
2 files changed, 12 insertions(+), 4 deletions(-)

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



diff --git a/includes/specials/SpecialRecentchanges.php 
b/includes/specials/SpecialRecentchanges.php
index 1248007..f0c2bc4 100644
--- a/includes/specials/SpecialRecentchanges.php
+++ b/includes/specials/SpecialRecentchanges.php
@@ -373,6 +373,7 @@
 
public function validateOptions( FormOptions $opts ) {
$opts->validateIntBounds( 'limit', 0, 5000 );
+   $opts->validateBounds( 'days', 0, $this->getConfig()->get( 
'RCMaxAge' ) / ( 3600 * 24 ) );
parent::validateOptions( $opts );
}
 
@@ -387,7 +388,7 @@
$query_options, $join_conds, $opts );
 
// Calculate cutoff
-   $cutoff_unixtime = time() - ( $opts['days'] * 86400 );
+   $cutoff_unixtime = time() - $opts['days'] * 3600 * 24;
$cutoff = $dbr->timestamp( $cutoff_unixtime );
 
$fromValid = preg_match( '/^[0-9]{14}$/', $opts['from'] );
diff --git a/includes/specials/SpecialWatchlist.php 
b/includes/specials/SpecialWatchlist.php
index 65131ec..549362f 100644
--- a/includes/specials/SpecialWatchlist.php
+++ b/includes/specials/SpecialWatchlist.php
@@ -34,6 +34,8 @@
 class SpecialWatchlist extends ChangesListSpecialPage {
public function __construct( $page = 'Watchlist', $restriction = 
'viewmywatchlist' ) {
parent::__construct( $page, $restriction );
+
+   $this->maxDays = $this->getConfig()->get( 'RCMaxAge' ) / ( 3600 
* 24 );
}
 
public function doesWrites() {
@@ -173,6 +175,11 @@
return $opts;
}
 
+   public function validateOptions( FormOptions $opts ) {
+   $opts->validateBounds( 'days', 0, $this->maxDays );
+   parent::validateOptions( $opts );
+   }
+
/**
 * Get all custom filters
 *
@@ -255,7 +262,7 @@
// Calculate cutoff
if ( $opts['days'] > 0 ) {
$conds[] = 'rc_timestamp > ' .
-   $dbr->addQuotes( $dbr->timestamp( time() - 
intval( $opts['days'] * 86400 ) ) );
+   $dbr->addQuotes( $dbr->timestamp( time() - 
$opts['days'] * 3600 * 24 ) );
}
}
 
@@ -499,7 +506,7 @@
if ( $opts['days'] > 0 ) {
$days = $opts['days'];
} else {
-   $days = $this->getConfig()->get( 'RCMaxAge' ) / ( 3600 
* 24 );
+   $days = $this->maxDays;
}
$timestamp = wfTimestampNow();
$wlInfo = $this->msg( 'wlnote' )->numParams( $numRows, round( 
$days * 24 ) )->params(
@@ -599,7 +606,7 @@
$days[] = $userWatchlistOption;
}
 
-   $maxDays = (string)( $this->getConfig()->get( 'RCMaxAge' ) / ( 
3600 * 24 ) );
+   $maxDays = (string)$this->maxDays;
// add the maximum possible value, if it isn't available already
if ( !in_array( $maxDays, $days ) ) {
$days[] = $maxDays;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5aee5f027cced8860eb966e2d6bdb07764ce861a
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Catrope 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: Sbisson 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...DonationInterface[master]: Fix blank i18n message added by TranslateWiki

2017-07-26 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/368108 )

Change subject: Fix blank i18n message added by TranslateWiki
..

Fix blank i18n message added by TranslateWiki

This is breaking unrelated things, and probably shouldn't have been
allowed in the first place!

Change-Id: I71168377c940df2abb07e47f07a2c30cc61196fc
---
M amazon_gateway/i18n/de.json
1 file changed, 0 insertions(+), 1 deletion(-)


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

diff --git a/amazon_gateway/i18n/de.json b/amazon_gateway/i18n/de.json
index 9dbdf1b..511e14a 100644
--- a/amazon_gateway/i18n/de.json
+++ b/amazon_gateway/i18n/de.json
@@ -6,5 +6,4 @@
]
},
"amazon_gateway-desc": "Ermöglicht die Verarbeitung von Zahlungen über 
Amazon",
-   "apihelp-di_amazon_bill-param-currency": ""
 }

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: [WIP] ParserOutput: Implement getText() post-cache transform...

2017-07-26 Thread Krinkle (Code Review)
Krinkle has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/368107 )

Change subject: [WIP] ParserOutput: Implement getText() post-cache transform 
options
..

[WIP] ParserOutput: Implement getText() post-cache transform options

Bug: T171797
Change-Id: If2fb32fcc06a54634b613828f558c1f68eafb159
---
M includes/parser/ParserOutput.php
1 file changed, 42 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/07/368107/1

diff --git a/includes/parser/ParserOutput.php b/includes/parser/ParserOutput.php
index cfb0c3e..ba40744 100644
--- a/includes/parser/ParserOutput.php
+++ b/includes/parser/ParserOutput.php
@@ -144,7 +144,8 @@
public $mSections = [];
 
/**
-* @var bool $mEditSectionTokens prefix/suffix markers if edit sections 
were output as tokens.
+* @deprecated since 1.30 Use getText() options.
+* @var bool $mEditSectionTokens Whether to strip or to expand edit 
section tokens.
 */
public $mEditSectionTokens = false;
 
@@ -164,6 +165,7 @@
public $mTimestamp;
 
/**
+* @deprecated since 1.30 Use getText() options.
 * @var bool $mTOCEnabled Whether TOC should be shown, can't override 
__NOTOC__.
 */
public $mTOCEnabled = true;
@@ -244,14 +246,44 @@
 * for display to the user.
 *
 * @since 1.27
+* @return string HTML
 */
public function getRawText() {
return $this->mText;
}
 
-   public function getText() {
+   /**
+* Get the parser output HTML.
+*
+* @param array $options (since 1.30) Transformation options.
+*  For backwards-compatibility with the stateful setEditSectionTokens 
and setTOCHTML
+*  methods, if called without options parameter, the internal state is 
used.
+*  If the parameter is passed as array (empty or with some options), 
then the
+*  internal state is ignored, and the real defaults will consistently 
apply instead.
+*  - 'allowTOC' (bool) Whether a TOC may be included (can't override 
__NOTOC__).
+*If false, any TOC will be removed.
+*Default: true.
+*  - 'enableSectionEditLinks' (bool) Whether section edit links may be 
included.
+*If true, edit section tokens will be expanded into links. 
Otherwise, they
+*will be removed.
+* @return string HTML
+*/
+   public function getText( array $options = null ) {
+   if ( $options === null ) {
+   $options = [
+   // ParserCache serialises this object. Old 
values might lack this property.
+   'allowTOC' => isset( $this->mTOCEnabled ) && 
$this->mTOCEnabled,
+   'enableSectionEditLinks' => 
$this->mEditSectionTokens,
+   ];
+   } else {
+   // Defaults
+   $options += [
+   'allowTOC' => true,
+   'enableSectionEditLinks' => true,
+   ];
+   }
$text = $this->mText;
-   if ( $this->mEditSectionTokens ) {
+   if ( $options['enableSectionEditLinks'] ) {
$text = preg_replace_callback(
self::EDITSECTION_REGEX,
function ( $m ) {
@@ -277,8 +309,7 @@
$text = preg_replace( self::EDITSECTION_REGEX, '', 
$text );
}
 
-   // If you have an old cached version of this class - sorry, you 
can't disable the TOC
-   if ( isset( $this->mTOCEnabled ) && $this->mTOCEnabled ) {
+   if ( $options['allowTOC'] ) {
$text = str_replace( [ Parser::TOC_START, 
Parser::TOC_END ], '', $text );
} else {
$text = preg_replace(
@@ -446,6 +477,9 @@
return wfSetVar( $this->mSections, $toc );
}
 
+   /**
+* @deprecated since 1.30 Use getText() options.
+*/
public function setEditSectionTokens( $t ) {
return wfSetVar( $this->mEditSectionTokens, $t );
}
@@ -454,6 +488,9 @@
return wfSetVar( $this->mIndexPolicy, $policy );
}
 
+   /**
+* @deprecated since 1.30 Use getText() options.
+*/
public function setTOCHTML( $tochtml ) {
return wfSetVar( $this->mTOCHTML, $tochtml );
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If2fb32fcc06a54634b613828f558c1f68eafb159
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master

[MediaWiki-commits] [Gerrit] wikimedia...vendor[master]: Update silverpopXmlConnector

2017-07-26 Thread Eileen (Code Review)
Eileen has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/368106 )

Change subject: Update silverpopXmlConnector
..

Update silverpopXmlConnector

Get update to group member - 
https://github.com/eileenmcnaughton/omnimail-silverpop/commit/cd3933b8ee7b263d0472cc44d047b82f3ec4029c

Change-Id: I87ba8b35ce65f79c13cec80d47129ae29b7ceb44
---
M composer/installed.json
M wikimedia/omnimail-silverpop/src/Responses/Contact.php
2 files changed, 114 insertions(+), 110 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm/vendor 
refs/changes/06/368106/1

diff --git a/composer/installed.json b/composer/installed.json
index c7242bf..4a3c9b4 100644
--- a/composer/installed.json
+++ b/composer/installed.json
@@ -1746,55 +1746,6 @@
 ]
 },
 {
-"name": "wikimedia/omnimail-silverpop",
-"version": "dev-master",
-"version_normalized": "999-dev",
-"source": {
-"type": "git",
-"url": 
"https://github.com/eileenmcnaughton/omnimail-silverpop.git;,
-"reference": "c48de4450ec495a8fd1cb26ba5e656876321e025"
-},
-"require": {
-"league/csv": "^8.0",
-"mrmarkfrench/silverpop-php-connector": "dev-master",
-"omnimail/omnimail": "dev-master",
-"phpseclib/phpseclib": "~2.0"
-},
-"require-dev": {
-"guzzlehttp/guzzle": "*"
-},
-"time": "2017-07-09T22:55:21+00:00",
-"type": "library",
-"installation-source": "source",
-"autoload": {
-"psr-4": {
-"Omnimail\\Silverpop\\": "src"
-}
-},
-"autoload-dev": {
-"psr-4": {
-"Omnimail\\Silverpop\\Tests\\": "test/tests"
-}
-},
-"license": [
-"MIT"
-],
-"authors": [
-{
-"name": "Eileen McNaughton",
-"email": "emcnaugh...@wikimedia.org"
-}
-],
-"description": "Silverpop plugin for Omnimail",
-"keywords": [
-"delivery",
-"email",
-"mail",
-"omnimail",
-"silverpop"
-]
-},
-{
 "name": "mrmarkfrench/silverpop-php-connector",
 "version": "dev-master",
 "version_normalized": "999-dev",
@@ -1883,66 +1834,6 @@
 ],
 "description": "Powerful command-line option toolkit",
 "homepage": "http://github.com/c9s/GetOptionKit;
-},
-{
-"name": "symfony/polyfill-php54",
-"version": "v1.3.0",
-"version_normalized": "1.3.0.0",
-"source": {
-"type": "git",
-"url": "https://github.com/symfony/polyfill-php54.git;,
-"reference": "90e085822963fdcc9d1c5b73deb3d2e5783b16a0"
-},
-"dist": {
-"type": "zip",
-"url": 
"https://api.github.com/repos/symfony/polyfill-php54/zipball/90e085822963fdcc9d1c5b73deb3d2e5783b16a0;,
-"reference": "90e085822963fdcc9d1c5b73deb3d2e5783b16a0",
-"shasum": ""
-},
-"require": {
-"php": ">=5.3.3"
-},
-"time": "2016-11-14T01:06:16+00:00",
-"type": "library",
-"extra": {
-"branch-alias": {
-"dev-master": "1.3-dev"
-}
-},
-"installation-source": "dist",
-"autoload": {
-"psr-4": {
-"Symfony\\Polyfill\\Php54\\": ""
-},
-"files": [
-"bootstrap.php"
-],
-"classmap": [
-"Resources/stubs"
-]
-},
-"notification-url": "https://packagist.org/downloads/;,
-"license": [
-"MIT"
-],
-"authors": [
-{
-"name": "Nicolas Grekas",
-"email": "p...@tchwork.com"
-},
-{
-"name": "Symfony Community",
-"homepage": "https://symfony.com/contributors;
-}
-],
-"description": "Symfony polyfill backporting some PHP 5.4+ features to 
lower PHP versions",
-"homepage": "https://symfony.com;,
-"keywords": [
-"compatibility",
-"polyfill",
-"portable",
-"shim"
-]
 },
 {
 "name": "wikimedia/donation-interface",
@@ -2056,5 +1947,114 @@
 "donations",
 "payments"
 ]
+},
+{
+"name": "symfony/polyfill-php54",
+"version": "v1.3.0",
+"version_normalized": "1.3.0.0",
+"source": {
+"type": "git",
+"url": "https://github.com/symfony/polyfill-php54.git;,
+"reference": "90e085822963fdcc9d1c5b73deb3d2e5783b16a0"
+},
+"dist": {

[MediaWiki-commits] [Gerrit] wikimedia...crm[deployment]: Merge branch 'master' into deployment

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

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


Merge branch 'master' into deployment

6cf08f690 Fixes for SmashPig update
d502f4ee3 Make CI scripts more stricts
0c855ebb2 Fix misc bash oddities in the CI scripts

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

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




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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9b6ab8b32d1f4b04cb7634378ddbe0241556d37c
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: deployment
Gerrit-Owner: Ejegg 
Gerrit-Reviewer: Ejegg 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] wikimedia...crm[deployment]: Merge branch 'master' into deployment

2017-07-26 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/368105 )

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

Merge branch 'master' into deployment

6cf08f690 Fixes for SmashPig update
d502f4ee3 Make CI scripts more stricts
0c855ebb2 Fix misc bash oddities in the CI scripts

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


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/05/368105/1


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9b6ab8b32d1f4b04cb7634378ddbe0241556d37c
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: deployment
Gerrit-Owner: Ejegg 

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


[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Fixes for SmashPig update

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

Change subject: Fixes for SmashPig update
..


Fixes for SmashPig update

Missed a couple of obsolete config usages for audit, replaced with
QueueWrapper. Also remove some no-longer-used use statements

Change-Id: I48238b777e78c310b1f1a1959af643a86e7ffb98
TODO: audit tests should look at queue messages
---
M sites/all/modules/globalcollect_audit/globalcollect_audit.drush.inc
M sites/all/modules/globalcollect_audit/globalcollect_audit.module
M sites/all/modules/queue2civicrm/banner_history/banner_history.module
M sites/all/modules/queue2civicrm/fredge/wmf_fredge_qc.module
M sites/all/modules/queue2civicrm/queue2civicrm.module
M sites/all/modules/queue2civicrm/recurring/recurring.module
M sites/all/modules/queue2civicrm/refund/wmf_refund_qc.module
M sites/all/modules/queue2civicrm/unsubscribe/wmf_unsubscribe_qc.module
M sites/all/modules/wmf_audit/ingenico/orphan_rectify.drush.inc
M sites/all/modules/wmf_audit/wmf_audit.module
10 files changed, 9 insertions(+), 41 deletions(-)

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



diff --git 
a/sites/all/modules/globalcollect_audit/globalcollect_audit.drush.inc 
b/sites/all/modules/globalcollect_audit/globalcollect_audit.drush.inc
index 3deb547..6f4a654 100644
--- a/sites/all/modules/globalcollect_audit/globalcollect_audit.drush.inc
+++ b/sites/all/modules/globalcollect_audit/globalcollect_audit.drush.inc
@@ -7,9 +7,6 @@
  * @TODO print some useful info to STDOUT
  */
 
-use SmashPig\Core\Context;
-use SmashPig\Core\Configuration;
-
 /**
  * Implementation of hook_drush_command()
  */
diff --git a/sites/all/modules/globalcollect_audit/globalcollect_audit.module 
b/sites/all/modules/globalcollect_audit/globalcollect_audit.module
index d0bdcde..4563706 100644
--- a/sites/all/modules/globalcollect_audit/globalcollect_audit.module
+++ b/sites/all/modules/globalcollect_audit/globalcollect_audit.module
@@ -1,5 +1,5 @@
 object( $configKey, 
false );
-   $newQueue->push( $body );
+QueueWrapper::push( $queueId, $body );
 }
 
 /**
diff --git 
a/sites/all/modules/queue2civicrm/banner_history/banner_history.module 
b/sites/all/modules/queue2civicrm/banner_history/banner_history.module
index 9f0255c..468ca0b 100644
--- a/sites/all/modules/queue2civicrm/banner_history/banner_history.module
+++ b/sites/all/modules/queue2civicrm/banner_history/banner_history.module
@@ -1,8 +1,6 @@
  'data-store/donations',
-'negative' => 'data-store/refund',
-'recurring' => 'data-store/recurring',
+  $queueNames = array(
+'main' => 'donations',
+'negative' => 'refund',
+'recurring' => 'recurring',
   );
 
-  if (!array_key_exists($type, $configKeys)) {
+  if (!array_key_exists($type, $queueNames)) {
 throw new Exception(__FUNCTION__ . ": Unhandled message type '$type'");
   }
 
   wmf_common_set_message_source($body, 'audit', 
wmf_audit_runtime_options('submod_prefix') . ' Recon Auditor');
-  $newQueue = Configuration::getDefaultConfig()->object(
-$configKeys[$type]
-  );
-  $newQueue->push( $body );
+  QueueWrapper::push( $queueNames[$type], $body );
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I48238b777e78c310b1f1a1959af643a86e7ffb98
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: master
Gerrit-Owner: Ejegg 
Gerrit-Reviewer: Cdentinger 
Gerrit-Reviewer: Eileen 
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...MinervaNeue[master]: chmod a-x resources/*/*.{less, svg}

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

Change subject: chmod a-x resources/*/*.{less,svg}
..


chmod a-x resources/*/*.{less,svg}

Change-Id: Ic4a2c91c8282a30ae069cc33deffada1df66ff22
---
M resources/skins.minerva.userpage.styles/userpage.less
M resources/skins.minerva.userpage.styles/userpage.svg
2 files changed, 0 insertions(+), 0 deletions(-)

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



diff --git a/resources/skins.minerva.userpage.styles/userpage.less 
b/resources/skins.minerva.userpage.styles/userpage.less
old mode 100755
new mode 100644
diff --git a/resources/skins.minerva.userpage.styles/userpage.svg 
b/resources/skins.minerva.userpage.styles/userpage.svg
old mode 100755
new mode 100644

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic4a2c91c8282a30ae069cc33deffada1df66ff22
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/skins/MinervaNeue
Gerrit-Branch: master
Gerrit-Owner: Fomafix 
Gerrit-Reviewer: Niedzielski 
Gerrit-Reviewer: Pmiazga 
Gerrit-Reviewer: Umherirrender 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Updating interwiki cache

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

Change subject: Updating interwiki cache
..


Updating interwiki cache

Change-Id: I7d65cab4b62ccdf9204c0efb2f116a9039e79129
---
M wmf-config/interwiki.php
1 file changed, 4 insertions(+), 14 deletions(-)

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



diff --git a/wmf-config/interwiki.php b/wmf-config/interwiki.php
index 778f945..7a74c9d 100644
--- a/wmf-config/interwiki.php
+++ b/wmf-config/interwiki.php
@@ -1,5 +1,5 @@
  '0 https://www.acronymfinder.com/$1.html',
'__global:advisory' => '1 https://advisory.wikimedia.org/wiki/$1',
@@ -287,6 +287,7 @@
'__global:tmbw' => '0 http://tmbw.net/wiki/$1',
'__global:tmnet' => '0 http://www.technomanifestos.net/?$1',
'__global:tmwiki' => '0 http://www.EasyTopicMaps.com/?page=$1',
+   '__global:toolforge' => '0 https://tools.wmflabs.org/$1',
'__global:toollabs' => '0 https://tools.wmflabs.org/$1',
'__global:tools' => '0 //toolserver.org/$1',
'__global:tswiki' => '1 //www.mediawiki.org/wiki/Toolserver:$1',
@@ -10171,16 +10172,6 @@
'tenwiki:chapter' => '1 https://en.wikimedia.org/wiki/$1',
'tenwiki:v' => '1 https://en.wikiversity.org/wiki/$1',
'tenwiki:voy' => '1 https://en.wikivoyage.org/wiki/$1',
-   '__sites:techconductwiki' => 'wiki',
-   'techconductwiki:w' => '1 https://en.wikipedia.org/wiki/$1',
-   'techconductwiki:wikt' => '1 https://en.wiktionary.org/wiki/$1',
-   'techconductwiki:q' => '1 https://en.wikiquote.org/wiki/$1',
-   'techconductwiki:b' => '1 https://en.wikibooks.org/wiki/$1',
-   'techconductwiki:n' => '1 https://en.wikinews.org/wiki/$1',
-   'techconductwiki:s' => '1 https://en.wikisource.org/wiki/$1',
-   'techconductwiki:chapter' => '1 https://en.wikimedia.org/wiki/$1',
-   'techconductwiki:v' => '1 https://en.wikiversity.org/wiki/$1',
-   'techconductwiki:voy' => '1 https://en.wikivoyage.org/wiki/$1',
'__sites:test2wiki' => 'wiki',
'test2wiki:w' => '1 https://en.wikipedia.org/wiki/$1',
'test2wiki:wikt' => '1 https://en.wiktionary.org/wiki/$1',
@@ -11558,7 +11549,7 @@
'__global:meta' => '1 https://meta.wikimedia.org/wiki/$1',
'__global:sep11' => '1 https://sep11.wikipedia.org/wiki/$1',
'__global:d' => '1 https://www.wikidata.org/wiki/$1',
-   '__list:__global' => 'acronym advisory advogato aew appropedia 
aquariumwiki arborwiki arxiv atmwiki baden battlestarwiki bcnbio beacha 
betawiki bibcode bibliowiki bluwiki blw botwiki boxrec brickwiki bugzilla bulba 
c c2 c2find cache ĉej cellwiki centralwikia chej choralwiki citizendium ckwiss 
comixpedia commons communityscheme communitywiki comune creativecommons 
creativecommonswiki cxej dcc dcdatabase dcma delicious devmo dictionary dict 
disinfopedia distributedproofreaders distributedproofreadersca dmoz dmozs doi 
donate doom_wiki download dbdump dpd drae dreamhost drumcorpswiki dwjwiki eĉei 
ecoreality ecxei elibre emacswiki encyc energiewiki englyphwiki enkol 
eokulturcentro esolang etherpad ethnologue ethnologuefamily evowiki exotica 
fanimutationwiki fedora finalfantasy finnix flickruser flickrphoto floralwiki 
foldoc forthfreak foundation foxwiki freebio freebsdman freeculturewiki 
freedomdefined freefeel freekiwiki freenode freesoft ganfyd gardenology 
gausswiki gentoo genwiki gerrit git globalvoices glossarwiki glossarywiki 
google googledefine googlegroups guildwarswiki guildwiki gutenberg 
gutenbergwiki hackerspaces h2wiki hammondwiki hdl heroeswiki horizonlabs hrwiki 
hrfwiki hupwiki iarchive imdbname imdbtitle imdbcompany imdbcharacter incubator 
infosecpedia infosphere irc ircrc rcirc iso639-3 issn iuridictum jaglyphwiki 
javanet javapedia jefo jerseydatabase jira jspwiki jstor kamelo karlsruhe 
kinowiki kmwiki komicawiki kontuwiki koslarwiki wikitech libreplanet 
linguistlist linuxwiki linuxwikide liswiki literateprograms livepedia localwiki 
lojban lostpedia lqwiki luxo mail mailarchive mariowiki marveldatabase meatball 
mw mediazilla memoryalpha metawiki metawikimedia metawikipedia metawikisearch 
mineralienatlas moinmoin monstropedia mosapedia mozcom mozillawiki 
mozillazinekb musicbrainz mediawikiwiki mwod mwot nkcells nara nosmoke nost 
nostalgia oeis oldwikisource olpc onelook openlibrary openstreetmap openwetware 
openwiki opera7wiki organicdesign orthodoxwiki osmwiki otrs otrswiki ourmedia 
outreach outreachwiki owasp panawiki patwiki personaltelco petscan phab 
phabricator phwiki phpwiki planetmath pmeg pmid pokewiki pokéwiki policy 
proofwiki pyrev pythoninfo pythonwiki pywiki psycle quality quarry rev revo rfc 
rheinneckar robowiki rodovid reuterswiki rowiki rt rtfm s23wiki scholar 
schoolswp scores scoutwiki scramble seapig seattlewiki slwiki semantic-mw 
senseislibrary sharemap silcode slashdot sourceforge 

[MediaWiki-commits] [Gerrit] mediawiki...UniversalLanguageSelector[master]: build: Updating mediawiki/mediawiki-codesniffer to 0.10.1

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

Change subject: build: Updating mediawiki/mediawiki-codesniffer to 0.10.1
..


build: Updating mediawiki/mediawiki-codesniffer to 0.10.1

Change-Id: Ib7a361cf2973bf0bba0fb8944762216f44c226a8
---
M UniversalLanguageSelector.hooks.php
M composer.json
M data/LanguageNameSearch.php
M phpcs.xml
4 files changed, 4 insertions(+), 5 deletions(-)

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



diff --git a/UniversalLanguageSelector.hooks.php 
b/UniversalLanguageSelector.hooks.php
index b2015b6..74fcc09 100644
--- a/UniversalLanguageSelector.hooks.php
+++ b/UniversalLanguageSelector.hooks.php
@@ -479,7 +479,7 @@
 * Conditionally register module ext.uls.eventlogger.
 *
 * @param ResourceLoader $resourceLoader
-* @return boolean true
+* @return bool true
 */
public static function onResourceLoaderRegisterModules( ResourceLoader 
$resourceLoader ) {
global $wgULSEventLogging, $wgVersion;
diff --git a/composer.json b/composer.json
index 167f74b..b27e988 100644
--- a/composer.json
+++ b/composer.json
@@ -26,7 +26,7 @@
},
"require-dev": {
"jakub-onderka/php-parallel-lint": "0.9.2",
-   "mediawiki/mediawiki-codesniffer": "0.10.0",
+   "mediawiki/mediawiki-codesniffer": "0.10.1",
"jakub-onderka/php-console-highlighter": "0.3.2"
},
"scripts": {
diff --git a/data/LanguageNameSearch.php b/data/LanguageNameSearch.php
index 102394b..de62134 100644
--- a/data/LanguageNameSearch.php
+++ b/data/LanguageNameSearch.php
@@ -61,7 +61,7 @@
 * Get the code point of first letter of string
 *
 * @param $str string
-* @return integer Code point of first letter of string
+* @return int Code point of first letter of string
 */
public static function getCodepoint( $str ) {
$values = [];
@@ -106,7 +106,7 @@
 * Calculate the Levenshtein distance between two strings
 * @param $str1
 * @param $str2
-* @return integer
+* @return int
 */
public static function levenshteinDistance( $str1, $str2 ) {
$length1 = mb_strlen( $str1, 'UTF-8' );
diff --git a/phpcs.xml b/phpcs.xml
index 8c9ec83..04c0857 100644
--- a/phpcs.xml
+++ b/phpcs.xml
@@ -12,5 +12,4 @@
.


-   vendor
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib7a361cf2973bf0bba0fb8944762216f44c226a8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...Translate[master]: build: Updating mediawiki/mediawiki-codesniffer to 0.10.1

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

Change subject: build: Updating mediawiki/mediawiki-codesniffer to 0.10.1
..


build: Updating mediawiki/mediawiki-codesniffer to 0.10.1

Change-Id: I53168243c173ee2ed1e05eaf2371eba54d67a1d8
---
M TranslateUtils.php
M composer.json
M ffs/AmdFFS.php
M messagegroups/RecentAdditionsMessageGroup.php
M messagegroups/RecentMessageGroup.php
M phpcs.xml
M tag/TranslatablePage.php
M translationaids/SupportAid.php
M ttmserver/ElasticSearchTTMServer.php
M utils/TranslateSandbox.php
10 files changed, 12 insertions(+), 14 deletions(-)

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



diff --git a/TranslateUtils.php b/TranslateUtils.php
index 6ea3fb8..c6d26ab 100644
--- a/TranslateUtils.php
+++ b/TranslateUtils.php
@@ -148,7 +148,7 @@
 * @return string Best-effort localisation of wanted language name.
 */
public static function getLanguageName( $code, $language = 'en' ) {
-   $languages = TranslateUtils::getLanguageNames( $language );
+   $languages = self::getLanguageNames( $language );
 
if ( isset( $languages[$code] ) ) {
return $languages[$code];
diff --git a/composer.json b/composer.json
index 4791fb9..321c775 100644
--- a/composer.json
+++ b/composer.json
@@ -41,7 +41,7 @@
},
"require-dev": {
"jakub-onderka/php-parallel-lint": "0.9.2",
-   "mediawiki/mediawiki-codesniffer": "0.10.0",
+   "mediawiki/mediawiki-codesniffer": "0.10.1",
"jakub-onderka/php-console-highlighter": "0.3.2"
},
"suggest": {
diff --git a/ffs/AmdFFS.php b/ffs/AmdFFS.php
index 41f739c..c082dac 100644
--- a/ffs/AmdFFS.php
+++ b/ffs/AmdFFS.php
@@ -51,7 +51,7 @@
 * @return bool
 */
public static function isValid( $data ) {
-   $data = AmdFFS::extractMessagePart( $data );
+   $data = self::extractMessagePart( $data );
return is_array( FormatJson::decode( $data, /*as array*/true ) 
);
}
 
@@ -64,8 +64,8 @@
 * @return array Parsed data.
 */
public function readFromVariable( $data ) {
-   $authors = AmdFFS::extractAuthors( $data );
-   $data = AmdFFS::extractMessagePart( $data );
+   $authors = self::extractAuthors( $data );
+   $data = self::extractMessagePart( $data );
$messages = (array)FormatJson::decode( $data, /*as array*/true 
);
$metadata = [];
 
diff --git a/messagegroups/RecentAdditionsMessageGroup.php 
b/messagegroups/RecentAdditionsMessageGroup.php
index 0dbee87..f4bbd3b 100644
--- a/messagegroups/RecentAdditionsMessageGroup.php
+++ b/messagegroups/RecentAdditionsMessageGroup.php
@@ -52,7 +52,7 @@
 * as they are not displayed in other places.
 *
 * @param MessageHandle $handle
-* @return boolean
+* @return bool
 */
protected function matchingMessage( MessageHandle $handle ) {
return MessageGroups::isTranslatableMessage( $handle );
diff --git a/messagegroups/RecentMessageGroup.php 
b/messagegroups/RecentMessageGroup.php
index a87cb87..09c192d 100644
--- a/messagegroups/RecentMessageGroup.php
+++ b/messagegroups/RecentMessageGroup.php
@@ -79,7 +79,7 @@
 * Allows subclasses to filter out more unwanted messages.
 *
 * @param MessageHandle $msg
-* @return boolean
+* @return bool
 */
protected function matchingMessage( MessageHandle $msg ) {
return true;
diff --git a/phpcs.xml b/phpcs.xml
index a308716..673182e 100644
--- a/phpcs.xml
+++ b/phpcs.xml
@@ -15,12 +15,10 @@



-   Translate.alias.php
+   Translate\.alias\.php

.


^extensions
-   ^vendor
-   ^node_modules
 
diff --git a/tag/TranslatablePage.php b/tag/TranslatablePage.php
index 4e2c28a..bfbb914 100644
--- a/tag/TranslatablePage.php
+++ b/tag/TranslatablePage.php
@@ -845,7 +845,7 @@
return false;
}
 
-   $page = TranslatablePage::newFromTitle( $newtitle );
+   $page = self::newFromTitle( $newtitle );
 
if ( $page->getMarkedTag() === false ) {
return false;
diff --git a/translationaids/SupportAid.php b/translationaids/SupportAid.php
index 71f01f9..6d94fea 100644
--- a/translationaids/SupportAid.php
+++ b/translationaids/SupportAid.php
@@ -17,7 +17,7 @@
 class SupportAid extends TranslationAid {
public function getData() {
return [
-   'url' => SupportAid::getSupportUrl( 
$this->handle->getTitle() ),
+   'url' => self::getSupportUrl( 

[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: WIP: Simple wrapper around updating the interwiki cache

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

Change subject: WIP: Simple wrapper around updating the interwiki cache
..


WIP: Simple wrapper around updating the interwiki cache

Change-Id: I4a709e8379f7054b1a21a8aff0487403f661b055
---
A scap/plugins/updateinterwikicache.py
1 file changed, 52 insertions(+), 0 deletions(-)

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



diff --git a/scap/plugins/updateinterwikicache.py 
b/scap/plugins/updateinterwikicache.py
new file mode 100644
index 000..ef428c0
--- /dev/null
+++ b/scap/plugins/updateinterwikicache.py
@@ -0,0 +1,52 @@
+# -*- coding: utf-8 -*-
+"""
+scap.plugins.updateinterwikicache
+~
+For updating + syncing the interwiki cache
+"""
+import os
+import subprocess
+
+import scap.cli as cli
+import scap.main as main
+import scap.tasks as tasks
+import scap.utils as utils
+
+
+@cli.command('update-interwiki-cache')
+class UpdateInterwikiCache(main.SyncFile):
+""" Scap sub-command to update and sync the interwiki cache """
+
+def main(self, *extra_args):
+""" Update the latest interwiki cache! """
+self.arguments.message = 'Updating interwiki cache'
+return super(UpdateInterwikiCache, self).main(*extra_args)
+
+def _before_cluster_sync(self):
+interwikifile = os.path.join(self.config['stage_dir'], 'wmf-config',
+ 'interwiki.php')
+self.include = os.path.relpath(interwikifile, self.config['stage_dir'])
+
+with open(interwikifile, 'w') as outfile:
+subprocess.check_call(
+['/usr/local/bin/mwscript',
+ 'extensions/WikimediaMaintenance/dumpInterwiki.php'],
+stdout=outfile
+)
+
+# This shouldn't happen, but let's be safe
+tasks.check_valid_syntax(interwikifile)
+
+subprocess.check_call(['/usr/bin/git', 'add', interwikifile])
+subprocess.check_call(['/usr/bin/git', 'commit', '-q', '-m',
+   self.arguments.message])
+
+subprocess.check_call(['/usr/bin/git', 'push', '-q', 'origin',
+   'HEAD:refs/for/master%l=Code-Review+2'])
+
+if not utils.confirm('Has Jenkins merged your gerrit change yet?'):
+subprocess.check_call(['/usr/bin/git', 'reset', '--hard',
+   'origin/master'])
+raise RuntimeError('Aborting, you should not sync unmerged code')
+
+subprocess.check_call(['/usr/bin/git', 'pull', '-q'])

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4a709e8379f7054b1a21a8aff0487403f661b055
Gerrit-PatchSet: 6
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Chad 
Gerrit-Reviewer: Chad 
Gerrit-Reviewer: Legoktm 
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...Math[master]: build: Updating mediawiki/mediawiki-codesniffer to 0.10.1

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

Change subject: build: Updating mediawiki/mediawiki-codesniffer to 0.10.1
..


build: Updating mediawiki/mediawiki-codesniffer to 0.10.1

Change-Id: I99cebc85671b3e8670729cb725a6026f233b639b
---
M Math.hooks.php
M MathInputCheck.php
M MathInputCheckRestbase.php
M MathInputCheckTexvc.php
M MathLaTeXML.php
M MathMathML.php
M MathRenderer.php
M MathRestbaseInterface.php
M MathSource.php
M MathTexvc.php
M composer.json
M phpcs.xml
12 files changed, 21 insertions(+), 22 deletions(-)

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



diff --git a/Math.hooks.php b/Math.hooks.php
index 13b8845..ad33220 100644
--- a/Math.hooks.php
+++ b/Math.hooks.php
@@ -267,7 +267,7 @@
];
// If the default option is not in the valid options the
// user interface throws an exception (BUG 64844)
-   $mode = MathHooks::mathModeToString( 
$wgDefaultUserOptions['math'] );
+   $mode = self::mathModeToString( $wgDefaultUserOptions['math'] );
if ( ! in_array( $mode, MathRenderer::getValidModes() ) ) {
LoggerFactory::getInstance( 'Math' )->error( 
'Misconfiguration: '.
"\$wgDefaultUserOptions['math'] is not in " . 
MathRenderer::getValidModes() . ".\n".
@@ -297,7 +297,7 @@
 * MaintenanceRefreshLinksInit handler; optimize settings for 
refreshLinks batch job.
 *
 * @param Maintenance $maint
-* @return boolean hook return code
+* @return bool hook return code
 */
static function onMaintenanceRefreshLinksInit( $maint ) {
global $wgUser;
@@ -422,7 +422,7 @@
 */
static function chemTagHook( $content, $attributes, $parser ) {
$attributes['chem'] = true;
-   return MathHooks::mathTagHook( '\ce{' . $content . '}', 
$attributes, $parser );
+   return self::mathTagHook( '\ce{' . $content . '}', $attributes, 
$parser );
}
 
 }
diff --git a/MathInputCheck.php b/MathInputCheck.php
index fb09836..f766728 100644
--- a/MathInputCheck.php
+++ b/MathInputCheck.php
@@ -27,7 +27,7 @@
 
/**
 * Returns true if the TeX input String is valid
-* @return boolean
+* @return bool
 */
public function isValid() {
return $this->isValid;
diff --git a/MathInputCheckRestbase.php b/MathInputCheckRestbase.php
index b72f88a..ab0dbf2 100644
--- a/MathInputCheckRestbase.php
+++ b/MathInputCheckRestbase.php
@@ -59,7 +59,7 @@
return $errorRenderer->getError( 'math_unknown_error' );
}
/**
-* @return boolean
+* @return bool
 */
public function isValid() {
return $this->restbaseInterface->getSuccess();
diff --git a/MathInputCheckTexvc.php b/MathInputCheckTexvc.php
index 7d22f9d..df7fcd2 100644
--- a/MathInputCheckTexvc.php
+++ b/MathInputCheckTexvc.php
@@ -46,7 +46,7 @@
}
 
/**
-* @return boolean
+* @return bool
 */
public function isValid() {
$us = $this;
@@ -59,7 +59,7 @@
}
 
/**
-* @return boolean
+* @return bool
 */
public function doValidCheck() {
global $wgMathTexvcCheckExecutable;
diff --git a/MathLaTeXML.php b/MathLaTeXML.php
index aa0c055..e0c1323 100644
--- a/MathLaTeXML.php
+++ b/MathLaTeXML.php
@@ -92,7 +92,7 @@
 
/**
 * Does the actual web request to convert TeX to MathML.
-* @return boolean
+* @return bool
 */
protected function doRender() {
if ( trim( $this->getTex() ) === '' ) {
@@ -180,7 +180,7 @@
/**
 * Calculates the SVG image based on the MathML input
 * No cache is used.
-* @return boolean
+* @return bool
 */
public function calculateSvg() {
$renderer = new MathMathML( $this->getTex() );
diff --git a/MathMathML.php b/MathMathML.php
index aa88b47..f5f7956 100644
--- a/MathMathML.php
+++ b/MathMathML.php
@@ -164,7 +164,7 @@
 * @param mixed $res the result
 * @param mixed $error the formatted error message or null
 * @param String $httpRequestClass class name of MWHttpRequest (needed 
for testing only)
-* @return boolean success
+* @return bool success
 */
public function makeRequest(
$host, $post, &$res, &$error = '', $httpRequestClass = 
'MWHttpRequest'
@@ -252,7 +252,7 @@
 
/**
 * Does the actual web request to convert TeX to MathML.
-* @return boolean
+* @return bool
 */
protected function doRender() {
if ( $this->getTex() === '' ) {
@@ -307,7 

[MediaWiki-commits] [Gerrit] mediawiki...OAuth[master]: build: Updating mediawiki/mediawiki-codesniffer to 0.10.1

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

Change subject: build: Updating mediawiki/mediawiki-codesniffer to 0.10.1
..


build: Updating mediawiki/mediawiki-codesniffer to 0.10.1

Change-Id: Ib920133c0b840c7e5729682231e155a3854d3982
---
M api/MWOAuthAPI.setup.php
M api/MWOAuthSessionProvider.php
M backend/MWOAuthConsumer.php
M backend/MWOAuthDataStore.php
M backend/MWOAuthUtils.php
M composer.json
M frontend/MWOAuthUI.hooks.php
M phpcs.xml
8 files changed, 30 insertions(+), 32 deletions(-)

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



diff --git a/api/MWOAuthAPI.setup.php b/api/MWOAuthAPI.setup.php
index d71767c..a0007e4 100755
--- a/api/MWOAuthAPI.setup.php
+++ b/api/MWOAuthAPI.setup.php
@@ -11,7 +11,7 @@
/**
 * Prevent CentralAuth from issuing centralauthtokens if we have
 * OAuth headers in this request.
-* @return boolean
+* @return bool
 */
public static function onCentralAuthAbortCentralAuthToken() {
$request = \RequestContext::getMain()->getRequest();
diff --git a/api/MWOAuthSessionProvider.php b/api/MWOAuthSessionProvider.php
index 8f9ff11..4b16f2d 100644
--- a/api/MWOAuthSessionProvider.php
+++ b/api/MWOAuthSessionProvider.php
@@ -232,7 +232,7 @@
 * @param \ApiBase $module
 * @param \User $user
 * @param string|array &$message
-* @return boolean
+* @return bool
 */
public function onApiCheckCanExecute( \ApiBase $module, \User $user, 
&$message ) {
global $wgMWOauthDisabledApiModules;
@@ -258,7 +258,7 @@
 * Record the fact that OAuth was used for anything added to 
RecentChanges.
 *
 * @param \RecentChange $rc
-* @return boolean true
+* @return bool true
 */
public function onRecentChange_save( $rc ) {
$data = $this->getSessionData( $rc->getPerformer() ?: null );
diff --git a/backend/MWOAuthConsumer.php b/backend/MWOAuthConsumer.php
index 976bdce..afc3e0d 100644
--- a/backend/MWOAuthConsumer.php
+++ b/backend/MWOAuthConsumer.php
@@ -91,11 +91,11 @@
 * @var array
 */
public static $stageNames = [
-   MWOAuthConsumer::STAGE_PROPOSED => 'proposed',
-   MWOAuthConsumer::STAGE_REJECTED => 'rejected',
-   MWOAuthConsumer::STAGE_EXPIRED  => 'expired',
-   MWOAuthConsumer::STAGE_APPROVED => 'approved',
-   MWOAuthConsumer::STAGE_DISABLED => 'disabled',
+   self::STAGE_PROPOSED => 'proposed',
+   self::STAGE_REJECTED => 'rejected',
+   self::STAGE_EXPIRED  => 'expired',
+   self::STAGE_APPROVED => 'approved',
+   self::STAGE_DISABLED => 'disabled',
];
 
/**
@@ -104,11 +104,11 @@
 * @var array
 */
public static $stageActionNames = [
-   MWOAuthConsumer::STAGE_PROPOSED => 'propose',
-   MWOAuthConsumer::STAGE_REJECTED => 'reject',
-   MWOAuthConsumer::STAGE_EXPIRED  => 'propose',
-   MWOAuthConsumer::STAGE_APPROVED => 'approve',
-   MWOAuthConsumer::STAGE_DISABLED => 'disable',
+   self::STAGE_PROPOSED => 'propose',
+   self::STAGE_REJECTED => 'reject',
+   self::STAGE_EXPIRED  => 'propose',
+   self::STAGE_APPROVED => 'approve',
+   self::STAGE_DISABLED => 'disable',
];
 
protected static function getSchema() {
@@ -223,11 +223,11 @@
 */
public static function getAllStages() {
return [
-   MWOAuthConsumer::STAGE_PROPOSED,
-   MWOAuthConsumer::STAGE_REJECTED,
-   MWOAuthConsumer::STAGE_EXPIRED,
-   MWOAuthConsumer::STAGE_APPROVED,
-   MWOAuthConsumer::STAGE_DISABLED,
+   self::STAGE_PROPOSED,
+   self::STAGE_REJECTED,
+   self::STAGE_EXPIRED,
+   self::STAGE_APPROVED,
+   self::STAGE_DISABLED,
];
}
 
@@ -259,7 +259,7 @@
 * - Still pending approval and is owned by $user
 *
 * @param \User $user
-* @return boolean
+* @return bool
 */
public function isUsableBy( \User $user ) {
if ( $this->stage === self::STAGE_APPROVED && !$this->get( 
'ownerOnly' ) ) {
@@ -285,7 +285,7 @@
 
protected function encodeRow( \DBConnRef $db, $row ) {
// For compatibility with other wikis in the farm, un-remap 
some grants
-   foreach ( MWOAuthConsumer::$mapBackCompatGrants as $old => $new 
) {
+   foreach ( self::$mapBackCompatGrants as $old => $new ) {

[MediaWiki-commits] [Gerrit] mediawiki...EducationProgram[master]: build: Updating mediawiki/mediawiki-codesniffer to 0.10.1

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

Change subject: build: Updating mediawiki/mediawiki-codesniffer to 0.10.1
..


build: Updating mediawiki/mediawiki-codesniffer to 0.10.1

Change-Id: Ibc12768d9f9cd173b91089bd3bea850db98ba494
---
M EducationProgram.hooks.php
M composer.json
M includes/ArticleAdder.php
M includes/ArticleStore.php
M includes/CourseUndeletionHelper.php
M includes/Events/Event.php
M includes/Events/EventStore.php
M includes/OrgDeletionHelper.php
M includes/RevisionAction.php
M includes/RevisionDiff.php
M includes/RoleObject.php
M includes/UserRolesMessage.php
M includes/Utils.php
M includes/actions/DeleteAction.php
M includes/actions/DeleteOrgAction.php
M includes/actions/EditAction.php
M includes/actions/RestoreAction.php
M includes/actions/UndeleteAction.php
M includes/actions/UndoAction.php
M includes/actions/ViewAction.php
M includes/api/ApiDeleteEducation.php
M includes/api/ApiEnlist.php
M includes/notifications/CampusAddNotification.php
M includes/notifications/CourseTalkNotification.php
M includes/notifications/InstructorAddNotification.php
M includes/notifications/NotificationsManager.php
M includes/notifications/OnlineAddNotification.php
M includes/notifications/StudentAddNotification.php
M includes/pagers/EPPager.php
M includes/rows/Course.php
M includes/rows/EPArticle.php
M includes/rows/EPRevision.php
M includes/rows/Org.php
M includes/rows/PageObject.php
M includes/rows/RevisionedObject.php
M includes/specials/SpecialAmbassadorProfile.php
M includes/specials/SpecialEducationProgram.php
M includes/specials/SpecialEnroll.php
M includes/specials/VerySpecialPage.php
M includes/tables/Orgs.php
M includes/tables/PageTable.php
M phpcs.xml
42 files changed, 74 insertions(+), 75 deletions(-)

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



diff --git a/EducationProgram.hooks.php b/EducationProgram.hooks.php
index ae98a26..3d2ea69 100755
--- a/EducationProgram.hooks.php
+++ b/EducationProgram.hooks.php
@@ -405,7 +405,7 @@
 * @param string $error
 * @param string $reason
 *
-* @return boolean
+* @return bool
 */
public static function onAbortMove(
Title $oldTitle, Title $newTitle, User $user, &$error, $reason
diff --git a/composer.json b/composer.json
index 579fe1f..91c6304 100644
--- a/composer.json
+++ b/composer.json
@@ -1,7 +1,7 @@
 {
"require-dev": {
"jakub-onderka/php-parallel-lint": "0.9.2",
-   "mediawiki/mediawiki-codesniffer": "0.10.0",
+   "mediawiki/mediawiki-codesniffer": "0.10.1",
"jakub-onderka/php-console-highlighter": "0.3.2"
},
"scripts": {
diff --git a/includes/ArticleAdder.php b/includes/ArticleAdder.php
index 52edb51..8c569a5 100644
--- a/includes/ArticleAdder.php
+++ b/includes/ArticleAdder.php
@@ -59,7 +59,7 @@
 * @param string $pageTitle
 * @param int[] $reviewers Ids of the users that are reviewers for this 
article
 *
-* @return boolean Indicates if the article was actually added. False 
means it already existed.
+* @return bool Indicates if the article was actually added. False 
means it already existed.
 */
public function addArticle(
$actionUser, $courseId, $userId, $pageId, $pageTitle, 
$reviewers = []
diff --git a/includes/ArticleStore.php b/includes/ArticleStore.php
index 4d0c526..3eb1312 100644
--- a/includes/ArticleStore.php
+++ b/includes/ArticleStore.php
@@ -63,7 +63,7 @@
 *
 * @param int|null $articleId
 *
-* @return boolean
+* @return bool
 */
public function hasArticle( $articleId ) {
if ( is_null( $articleId ) ) {
@@ -135,7 +135,7 @@
 *
 * @param EPArticle $article
 *
-* @return boolean
+* @return bool
 * @throws InvalidArgumentException
 */
public function updateArticle( EPArticle $article ) {
@@ -237,7 +237,7 @@
 *
 * @param int $articleId
 *
-* @return boolean Success indicator
+* @return bool Success indicator
 */
public function deleteArticle( $articleId ) {
return $this->getWriteConnection()->delete(
@@ -258,7 +258,7 @@
 * @param int $userId
 * @param int $pageId
 *
-* @return boolean
+* @return bool
 */
public function hasArticleWith( $courseId, $userId, $pageId ) {
return $this->getReadConnection()->selectRow(
@@ -281,7 +281,7 @@
 * @param int[]|int $courseIds
 * @param int[]|int $userIds
 *
-* @return boolean
+* @return bool
 * @throws InvalidArgumentException
 */
public function deleteArticleByCourseAndUsers( $courseIds, 

[MediaWiki-commits] [Gerrit] mediawiki...OpenStackManager[master]: build: Updating mediawiki/mediawiki-codesniffer to 0.10.1

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

Change subject: build: Updating mediawiki/mediawiki-codesniffer to 0.10.1
..


build: Updating mediawiki/mediawiki-codesniffer to 0.10.1

Change-Id: Ib3765db6d1538a7748e9ea81549f2e06ec12ff22
---
M composer.json
M nova/OpenStackNovaArticle.php
M nova/OpenStackNovaController.php
M nova/OpenStackNovaDomain.php
M nova/OpenStackNovaHost.php
M nova/OpenStackNovaProject.php
M nova/OpenStackNovaRole.php
M nova/OpenStackNovaUser.php
M phpcs.xml
9 files changed, 12 insertions(+), 14 deletions(-)

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



diff --git a/composer.json b/composer.json
index 6a20d4f..ea7fb13 100644
--- a/composer.json
+++ b/composer.json
@@ -5,7 +5,7 @@
"require-dev": {
"jakub-onderka/php-parallel-lint": "0.9.2",
"jakub-onderka/php-console-highlighter": "0.3.2",
-   "mediawiki/mediawiki-codesniffer": "0.10.0"
+   "mediawiki/mediawiki-codesniffer": "0.10.1"
},
"scripts": {
"fix": "phpcbf",
diff --git a/nova/OpenStackNovaArticle.php b/nova/OpenStackNovaArticle.php
index 1556302..e779d18 100644
--- a/nova/OpenStackNovaArticle.php
+++ b/nova/OpenStackNovaArticle.php
@@ -29,7 +29,7 @@
}
 
public static function deleteArticle( $titletext, $namespace = 
NS_NOVA_RESOURCE ) {
-   if ( !OpenStackNovaArticle::canCreatePages() ) {
+   if ( !self::canCreatePages() ) {
return;
}
$title = Title::newFromText( $titletext, $namespace );
diff --git a/nova/OpenStackNovaController.php b/nova/OpenStackNovaController.php
index 4dc4f02..f81e007 100644
--- a/nova/OpenStackNovaController.php
+++ b/nova/OpenStackNovaController.php
@@ -709,7 +709,7 @@
$data['server']['name'] = $instanceName;
if ( $wgOpenStackManagerInstanceUserData ) {
$random_hash = md5( date( 'r', time() ) );
-   $endl = OpenStackNovaController::getLineEnding();
+   $endl = self::getLineEnding();
$boundary = '===' . $random_hash .'==';
$userdata = 'Content-Type: multipart/mixed; boundary="' 
. $boundary .'"' . $endl;
$userdata .= 'MIME-Version: 1.0' . $endl;
diff --git a/nova/OpenStackNovaDomain.php b/nova/OpenStackNovaDomain.php
index 2e62bc8..1378ce1 100644
--- a/nova/OpenStackNovaDomain.php
+++ b/nova/OpenStackNovaDomain.php
@@ -97,7 +97,7 @@
function updateSOA() {
$ldap = LdapAuthenticationPlugin::getInstance();
$domain = [];
-   $domain['soarecord'] = OpenStackNovaDomain::generateSOA();
+   $domain['soarecord'] = self::generateSOA();
$success = LdapAuthenticationPlugin::ldap_modify(
$ldap->ldapconn, $this->domainDN, $domain
);
@@ -214,7 +214,7 @@
 * @return null|OpenStackNovaDomain
 */
static function getDomainByRegion( $region ) {
-   $domain = OpenStackNovaDomain::getDomainByName( $region );
+   $domain = self::getDomainByName( $region );
if ( $domain ) {
if ( $domain->getLocation() ) {
return $domain;
@@ -242,7 +242,7 @@
$ldap = LdapAuthenticationPlugin::getInstance();
OpenStackNovaLdapConnection::connect();
 
-   $soa = OpenStackNovaDomain::generateSOA();
+   $soa = self::generateSOA();
$domain = [];
$domain['objectclass'][] = 'dcobject';
$domain['objectclass'][] = 'dnsdomain';
diff --git a/nova/OpenStackNovaHost.php b/nova/OpenStackNovaHost.php
index 2f6faf5..c906b3a 100644
--- a/nova/OpenStackNovaHost.php
+++ b/nova/OpenStackNovaHost.php
@@ -302,7 +302,7 @@
OpenStackNovaLdapConnection::connect();
 
$domainname = $domain->getFullyQualifiedDomainName();
-   $host = OpenStackNovaHost::getHostByPublicIP( $ip );
+   $host = self::getHostByPublicIP( $ip );
if ( $host ) {
$ldap->printDebug(
"Failed to add public host $hostname as the DNS 
entry already exists", NONSENSITIVE
diff --git a/nova/OpenStackNovaProject.php b/nova/OpenStackNovaProject.php
index 228a87b..4d0f7ac 100644
--- a/nova/OpenStackNovaProject.php
+++ b/nova/OpenStackNovaProject.php
@@ -538,7 +538,7 @@
 */
static function getAllProjects() {
$projects = [];
-   foreach ( OpenStackNovaProject::getProjectList() as $id => 
$name ) {
+   foreach ( self::getProjectList() as $id => $name ) {

[MediaWiki-commits] [Gerrit] mediawiki...CirrusSearch[master]: build: Updating mediawiki/mediawiki-codesniffer to 0.10.1

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

Change subject: build: Updating mediawiki/mediawiki-codesniffer to 0.10.1
..


build: Updating mediawiki/mediawiki-codesniffer to 0.10.1

Change-Id: I9b1a15b882925a572d2365d2cd442673d5a58cb5
---
M composer.json
M includes/Maintenance/Maintenance.php
M includes/OtherIndexes.php
M phpcs.xml
4 files changed, 7 insertions(+), 10 deletions(-)

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



diff --git a/composer.json b/composer.json
index c3e7bb5..b6cd741 100644
--- a/composer.json
+++ b/composer.json
@@ -12,7 +12,7 @@
"require-dev": {
"jakub-onderka/php-parallel-lint": "0.9.2",
"jakub-onderka/php-console-highlighter": "0.3.2",
-   "mediawiki/mediawiki-codesniffer": "0.10.0"
+   "mediawiki/mediawiki-codesniffer": "0.10.1"
},
"scripts": {
"fix": "phpcbf",
diff --git a/includes/Maintenance/Maintenance.php 
b/includes/Maintenance/Maintenance.php
index 4ffd692..894049a 100644
--- a/includes/Maintenance/Maintenance.php
+++ b/includes/Maintenance/Maintenance.php
@@ -148,12 +148,12 @@
 */
public function loadSpecialVars() {
parent::loadSpecialVars();
-   if ( Maintenance::$indent === null ) {
+   if ( self::$indent === null ) {
// First script gets no indentation
-   Maintenance::$indent = '';
+   self::$indent = '';
} else {
// Others get one tab beyond the last
-   Maintenance::$indent = Maintenance::$indent . "\t";
+   self::$indent = self::$indent . "\t";
}
}
 
@@ -162,7 +162,7 @@
 * the next one gets the right indentation.
 */
public function done() {
-   Maintenance::$indent = substr( Maintenance::$indent, 1 );
+   self::$indent = substr( self::$indent, 1 );
}
 
/**
@@ -174,7 +174,7 @@
}
 
public function outputIndented( $message ) {
-   $this->output( Maintenance::$indent . $message );
+   $this->output( self::$indent . $message );
}
 
/**
diff --git a/includes/OtherIndexes.php b/includes/OtherIndexes.php
index a0a1617..075af0c 100644
--- a/includes/OtherIndexes.php
+++ b/includes/OtherIndexes.php
@@ -87,7 +87,7 @@
$findIdsMultiSearch = new MultiSearch( 
$this->connection->getClient() );
$findIdsClosures = [];
foreach ( $titles as $title ) {
-   foreach ( OtherIndexes::getExternalIndexes( $title ) as 
$otherIndex ) {
+   foreach ( self::getExternalIndexes( $title ) as 
$otherIndex ) {
if ( $otherIndex === null ) {
continue;
}
diff --git a/phpcs.xml b/phpcs.xml
index 631fadf..29d2435 100644
--- a/phpcs.xml
+++ b/phpcs.xml
@@ -6,7 +6,6 @@



-   



@@ -29,7 +28,5 @@
.


-   vendor
-   node_modules
tests/phan
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9b1a15b882925a572d2365d2cd442673d5a58cb5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CirrusSearch
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 
Gerrit-Reviewer: DCausse 
Gerrit-Reviewer: EBernhardson 
Gerrit-Reviewer: Gehel 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Smalyshev 
Gerrit-Reviewer: Tjones 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: rdbms: Ensure onTransactionPreCommitOrIdle() callbacks don't...

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

Change subject: rdbms: Ensure onTransactionPreCommitOrIdle() callbacks don't 
lead transactions
..


rdbms: Ensure onTransactionPreCommitOrIdle() callbacks don't lead transactions

If no writes started a transaction yet, the callback would run
but not commit (by design, joining the request round). Later
writes will then pile on top of it.

The point of this method is to avoid such cases, so this edge
case has been fixed.

Change-Id: I9b44b19261d679de4aff6e44a9cfeb4f684ce02e
---
M includes/libs/rdbms/database/Database.php
M tests/phpunit/includes/libs/rdbms/database/DatabaseTest.php
2 files changed, 71 insertions(+), 2 deletions(-)

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



diff --git a/includes/libs/rdbms/database/Database.php 
b/includes/libs/rdbms/database/Database.php
index 723a4a6..b8b44e6 100644
--- a/includes/libs/rdbms/database/Database.php
+++ b/includes/libs/rdbms/database/Database.php
@@ -2664,10 +2664,13 @@
}
 
final public function onTransactionPreCommitOrIdle( callable $callback, 
$fname = __METHOD__ ) {
-   if ( $this->mTrxLevel ) {
+   if ( $this->mTrxLevel || $this->getFlag( self::DBO_TRX ) ) {
+   // As long as DBO_TRX is set, writes will accumulate 
until the load balancer issues
+   // an implicit commit of all peer databases. This is 
true even if a transaction has
+   // not yet been triggered by writes; make sure 
$callback runs *after* any such writes.
$this->mTrxPreCommitCallbacks[] = [ $callback, $fname ];
} else {
-   // If no transaction is active, then make one for this 
callback
+   // No transaction is active nor will start implicitly, 
so make one for this callback
$this->startAtomic( __METHOD__ );
try {
call_user_func( $callback );
diff --git a/tests/phpunit/includes/libs/rdbms/database/DatabaseTest.php 
b/tests/phpunit/includes/libs/rdbms/database/DatabaseTest.php
index 9bea7ff..70b6c36 100644
--- a/tests/phpunit/includes/libs/rdbms/database/DatabaseTest.php
+++ b/tests/phpunit/includes/libs/rdbms/database/DatabaseTest.php
@@ -1,6 +1,7 @@
 getMockDB( [ 'isOpen' ] );
+   $db->method( 'isOpen' )->willReturn( true );
+   $db->clearFlag( DBO_TRX );
+
+   $this->assertFalse( $db->getFlag( DBO_TRX ), 'DBO_TRX is not 
set' );
+
+   $called = false;
+   $db->onTransactionPreCommitOrIdle(
+   function () use ( &$called ) {
+   $called = true;
+   },
+   __METHOD__
+   );
+   $this->assertTrue( $called, 'Called when idle' );
+
+   $db->begin( __METHOD__ );
+   $called = false;
+   $db->onTransactionPreCommitOrIdle(
+   function () use ( &$called ) {
+   $called = true;
+   },
+   __METHOD__
+   );
+   $this->assertFalse( $called, 'Not called when transaction is 
active' );
+   $db->commit( __METHOD__ );
+   $this->assertTrue( $called, 'Called when transaction is 
committed' );
+   }
+
+   /**
+* @covers Wikimedia\Rdbms\Database::onTransactionPreCommitOrIdle
+* @covers Wikimedia\Rdbms\Database::runOnTransactionPreCommitCallbacks
+*/
+   public function testTransactionPreCommitOrIdle_TRX() {
+   $db = $this->getMockDB( [ 'isOpen' ] );
+   $db->method( 'isOpen' )->willReturn( true );
+   $db->setFlag( DBO_TRX );
+
+   $lbFactory = LBFactorySingle::newFromConnection( $db );
+   // Ask for the connectin so that LB sets internal state
+   // about this connection being the master connection
+   $lb = $lbFactory->getMainLB();
+   $conn = $lb->openConnection( $lb->getWriterIndex() );
+   $this->assertSame( $db, $conn, 'Same DB instance' );
+   $this->assertTrue( $db->getFlag( DBO_TRX ), 'DBO_TRX is set' );
+
+   $called = false;
+   $db->onTransactionPreCommitOrIdle(
+   function () use ( &$called ) {
+   $called = true;
+   }
+   );
+   $this->assertFalse( $called, 'Not called when idle if DBO_TRX 
is set' );
+
+   $lbFactory->beginMasterChanges( __METHOD__ );
+   $this->assertFalse( $called, 'Not called when lb-transaction is 
active' );
+
+   $lbFactory->commitMasterChanges( __METHOD__ );
+ 

[MediaWiki-commits] [Gerrit] mediawiki...UploadWizard[master]: build: Updating mediawiki/mediawiki-codesniffer to 0.10.1

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

Change subject: build: Updating mediawiki/mediawiki-codesniffer to 0.10.1
..


build: Updating mediawiki/mediawiki-codesniffer to 0.10.1

Change-Id: I835d4d0c8ab7bab02e60072e334c73a865e2d1ef
---
M composer.json
M includes/UploadWizardCampaign.php
M includes/UploadWizardConfig.php
M phpcs.xml
4 files changed, 4 insertions(+), 5 deletions(-)

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



diff --git a/composer.json b/composer.json
index 1366381..55507be 100644
--- a/composer.json
+++ b/composer.json
@@ -1,7 +1,7 @@
 {
"require-dev": {
"jakub-onderka/php-parallel-lint": "0.9.2",
-   "mediawiki/mediawiki-codesniffer": "0.10.0",
+   "mediawiki/mediawiki-codesniffer": "0.10.1",
"jakub-onderka/php-console-highlighter": "0.3.2"
},
"scripts": {
diff --git a/includes/UploadWizardCampaign.php 
b/includes/UploadWizardCampaign.php
index 7b3e0e5..d9e69b3 100644
--- a/includes/UploadWizardCampaign.php
+++ b/includes/UploadWizardCampaign.php
@@ -93,7 +93,7 @@
 *
 * @since 1.4
 *
-* @return boolean
+* @return bool
 */
public function getIsEnabled() {
return $this->config['enabled'];
diff --git a/includes/UploadWizardConfig.php b/includes/UploadWizardConfig.php
index bf58ce9..2278685 100644
--- a/includes/UploadWizardConfig.php
+++ b/includes/UploadWizardConfig.php
@@ -79,7 +79,7 @@
static $mergedConfig = false;
 
if ( !$mergedConfig ) {
-   $wgUploadWizardConfig = 
UploadWizardConfig::array_replace_sanely(
+   $wgUploadWizardConfig = self::array_replace_sanely(
self::getDefaultConfig(),
$wgUploadWizardConfig
);
@@ -87,7 +87,7 @@
}
 
if ( !is_null( $campaignName ) ) {
-   $wgUploadWizardConfig = 
UploadWizardConfig::array_replace_sanely(
+   $wgUploadWizardConfig = self::array_replace_sanely(
$wgUploadWizardConfig,
self::getCampaignConfig( $campaignName )
);
diff --git a/phpcs.xml b/phpcs.xml
index f7eee52..69ff6a9 100644
--- a/phpcs.xml
+++ b/phpcs.xml
@@ -15,5 +15,4 @@
.


-   vendor
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I835d4d0c8ab7bab02e60072e334c73a865e2d1ef
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UploadWizard
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...TimedMediaHandler[master]: build: Updating mediawiki/mediawiki-codesniffer to 0.10.1

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

Change subject: build: Updating mediawiki/mediawiki-codesniffer to 0.10.1
..


build: Updating mediawiki/mediawiki-codesniffer to 0.10.1

Change-Id: I2bf16959dde2b51e8acabe2c9c7b9238c8a4bb4a
---
M TimedMediaHandler.hooks.php
M TimedMediaTransformOutput.php
M WebVideoTranscode/WebVideoTranscode.php
M composer.json
M phpcs.xml
5 files changed, 47 insertions(+), 48 deletions(-)

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



diff --git a/TimedMediaHandler.hooks.php b/TimedMediaHandler.hooks.php
index 3f2029a..eae75c6 100644
--- a/TimedMediaHandler.hooks.php
+++ b/TimedMediaHandler.hooks.php
@@ -398,7 +398,7 @@
 */
public static function onImageOpenShowImageInlineBefore( &$imagePage, 
&$out ) {
$file = $imagePage->getDisplayedFile();
-   return TimedMediaHandlerHooks::onImagePageHooks( $file, $out );
+   return self::onImagePageHooks( $file, $out );
}
 
/**
@@ -410,7 +410,7 @@
 */
public static function onImagePageFileHistoryLine( $imagePage, $file, 
&$line, &$css ) {
$out = $imagePage->getContext()->getOutput();
-   return TimedMediaHandlerHooks::onImagePageHooks( $file, $out );
+   return self::onImagePageHooks( $file, $out );
}
 
/**
diff --git a/TimedMediaTransformOutput.php b/TimedMediaTransformOutput.php
index c45c640..02d296a 100644
--- a/TimedMediaTransformOutput.php
+++ b/TimedMediaTransformOutput.php
@@ -187,8 +187,8 @@
function getImagePopUp() {
// pop up videos set the autoplay attribute to true:
$autoPlay = true;
-   $id = TimedMediaTransformOutput::$serial;
-   TimedMediaTransformOutput::$serial++;
+   $id = self::$serial;
+   self::$serial++;
 
return Xml::tags( 'div', [
'id' => self::PLAYER_ID_PREFIX . $id,
@@ -416,8 +416,8 @@
$height .= 'px';
}
 
-   $id = TimedMediaTransformOutput::$serial;
-   TimedMediaTransformOutput::$serial++;
+   $id = self::$serial;
+   self::$serial++;
$mediaAttr = [
'id' => self::PLAYER_ID_PREFIX . $id,
// Get the correct size:
diff --git a/WebVideoTranscode/WebVideoTranscode.php 
b/WebVideoTranscode/WebVideoTranscode.php
index 0b12403..253fdc2 100644
--- a/WebVideoTranscode/WebVideoTranscode.php
+++ b/WebVideoTranscode/WebVideoTranscode.php
@@ -81,7 +81,7 @@
* http://firefogg.org/dev/index.html
*/
public static $derivativeSettings = [
-   WebVideoTranscode::ENC_OGV_160P =>
+   self::ENC_OGV_160P =>
[
'maxSize'=> '288x160',
'videoBitrate'   => '160',
@@ -96,7 +96,7 @@
'videoCodec' => 'theora',
'type'   => 'video/ogg; 
codecs="theora, vorbis"',
],
-   WebVideoTranscode::ENC_OGV_240P =>
+   self::ENC_OGV_240P =>
[
'maxSize'=> '426x240',
'videoBitrate'   => '512',
@@ -111,7 +111,7 @@
'videoCodec' => 'theora',
'type'   => 'video/ogg; 
codecs="theora, vorbis"',
],
-   WebVideoTranscode::ENC_OGV_360P =>
+   self::ENC_OGV_360P =>
[
'maxSize'=> '640x360',
'videoBitrate'   => '1024',
@@ -126,7 +126,7 @@
'videoCodec' => 'theora',
'type'   => 'video/ogg; 
codecs="theora, vorbis"',
],
-   WebVideoTranscode::ENC_OGV_480P =>
+   self::ENC_OGV_480P =>
[
'maxSize'=> '854x480',
'videoBitrate'   => '2048',
@@ -142,7 +142,7 @@
'type'   => 'video/ogg; 
codecs="theora, vorbis"',
],
 
-   WebVideoTranscode::ENC_OGV_720P =>
+   self::ENC_OGV_720P =>
[
'maxSize'=> '1280x720',
'videoQuality'   => 6,

[MediaWiki-commits] [Gerrit] mediawiki...SpamBlacklist[master]: build: Updating mediawiki/mediawiki-codesniffer to 0.10.1

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

Change subject: build: Updating mediawiki/mediawiki-codesniffer to 0.10.1
..


build: Updating mediawiki/mediawiki-codesniffer to 0.10.1

Change-Id: I70cc261499286e5bc46ee96e9b9ea07f41c836a1
---
M SpamRegexBatch.php
M composer.json
M phpcs.xml
3 files changed, 12 insertions(+), 14 deletions(-)

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



diff --git a/SpamRegexBatch.php b/SpamRegexBatch.php
index 8348da1..3fd6e2e 100644
--- a/SpamRegexBatch.php
+++ b/SpamRegexBatch.php
@@ -93,9 +93,9 @@
 * @return array of regexes
 */
static function buildSafeRegexes( $lines, BaseBlacklist $blacklist, 
$fileName=false ) {
-   $lines = SpamRegexBatch::stripLines( $lines );
-   $regexes = SpamRegexBatch::buildRegexes( $lines, $blacklist );
-   if ( SpamRegexBatch::validateRegexes( $regexes ) ) {
+   $lines = self::stripLines( $lines );
+   $regexes = self::buildRegexes( $lines, $blacklist );
+   if ( self::validateRegexes( $regexes ) ) {
return $regexes;
} else {
// _Something_ broke... rebuild line-by-line; it'll be
@@ -104,7 +104,7 @@
if ( $fileName ) {
wfDebugLog( 'SpamBlacklist', "Spam blacklist 
warning: bogus line in $fileName\n" );
}
-   return SpamRegexBatch::buildRegexes( $lines, 
$blacklist, 0 );
+   return self::buildRegexes( $lines, $blacklist, 0 );
}
}
 
@@ -116,7 +116,7 @@
 * @return array of input lines which produce invalid input, or empty 
array if no problems
 */
static function getBadLines( $lines, BaseBlacklist $blacklist ) {
-   $lines = SpamRegexBatch::stripLines( $lines );
+   $lines = self::stripLines( $lines );
 
$badLines = [];
foreach ( $lines as $line ) {
@@ -126,16 +126,16 @@
}
}
 
-   $regexes = SpamRegexBatch::buildRegexes( $lines, $blacklist );
-   if ( SpamRegexBatch::validateRegexes( $regexes ) ) {
+   $regexes = self::buildRegexes( $lines, $blacklist );
+   if ( self::validateRegexes( $regexes ) ) {
// No other problems!
return $badLines;
}
 
// Something failed in the batch, so check them one by one.
foreach ( $lines as $line ) {
-   $regexes = SpamRegexBatch::buildRegexes( [ $line ], 
$blacklist );
-   if ( !SpamRegexBatch::validateRegexes( $regexes ) ) {
+   $regexes = self::buildRegexes( [ $line ], $blacklist );
+   if ( !self::validateRegexes( $regexes ) ) {
$badLines[] = $line;
}
}
@@ -153,7 +153,7 @@
 */
static function regexesFromText( $source, BaseBlacklist $blacklist, 
$fileName=false ) {
$lines = explode( "\n", $source );
-   return SpamRegexBatch::buildSafeRegexes( $lines, $blacklist, 
$fileName );
+   return self::buildSafeRegexes( $lines, $blacklist, $fileName );
}
 
/**
@@ -167,7 +167,7 @@
static function regexesFromMessage( $message, BaseBlacklist $blacklist 
) {
$source = wfMessage( $message )->inContentLanguage();
if ( !$source->isDisabled() ) {
-   return SpamRegexBatch::regexesFromText( 
$source->plain(), $blacklist );
+   return self::regexesFromText( $source->plain(), 
$blacklist );
} else {
return [];
}
diff --git a/composer.json b/composer.json
index 8599d9b..1c2721a 100644
--- a/composer.json
+++ b/composer.json
@@ -2,7 +2,7 @@
"require-dev": {
"jakub-onderka/php-parallel-lint": "0.9.2",
"jakub-onderka/php-console-highlighter": "0.3.2",
-   "mediawiki/mediawiki-codesniffer": "0.10.0"
+   "mediawiki/mediawiki-codesniffer": "0.10.1"
},
"scripts": {
"fix": "phpcbf",
diff --git a/phpcs.xml b/phpcs.xml
index 19f91c8..8139da0 100644
--- a/phpcs.xml
+++ b/phpcs.xml
@@ -17,6 +17,4 @@
.


-   vendor
-   node_modules
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I70cc261499286e5bc46ee96e9b9ea07f41c836a1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SpamBlacklist
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 

[MediaWiki-commits] [Gerrit] mediawiki...RelatedArticles[master]: build: Updating mediawiki/mediawiki-codesniffer to 0.10.1

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

Change subject: build: Updating mediawiki/mediawiki-codesniffer to 0.10.1
..


build: Updating mediawiki/mediawiki-codesniffer to 0.10.1

Change-Id: Ie05b9ddc3e351abf4b2b199529b714766055d161
---
M composer.json
M includes/FooterHooks.php
M includes/Hooks.php
M includes/SidebarHooks.php
M phpcs.xml
5 files changed, 9 insertions(+), 10 deletions(-)

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



diff --git a/composer.json b/composer.json
index 1366381..55507be 100644
--- a/composer.json
+++ b/composer.json
@@ -1,7 +1,7 @@
 {
"require-dev": {
"jakub-onderka/php-parallel-lint": "0.9.2",
-   "mediawiki/mediawiki-codesniffer": "0.10.0",
+   "mediawiki/mediawiki-codesniffer": "0.10.1",
"jakub-onderka/php-console-highlighter": "0.3.2"
},
"scripts": {
diff --git a/includes/FooterHooks.php b/includes/FooterHooks.php
index 2a76369..f43e8cc 100644
--- a/includes/FooterHooks.php
+++ b/includes/FooterHooks.php
@@ -21,7 +21,7 @@
 *
 * @param array &$vars variables to be added into the output of 
OutputPage::headElement.
 * @param OutputPage $out OutputPage instance calling the hook
-* @return boolean Always true
+* @return bool Always true
 */
public static function onMakeGlobalVariablesScript( &$vars, OutputPage 
$out ) {
$config = MediaWikiServices::getInstance()->getConfigFactory()
@@ -102,7 +102,7 @@
 *
 * @param OutputPage $out The OutputPage object
 * @param Skin $skin Skin object that will be used to generate the page
-* @return boolean Always true
+* @return bool Always true
 */
public static function onBeforePageDisplay( OutputPage $out, Skin $skin 
) {
$config = MediaWikiServices::getInstance()->getConfigFactory()
@@ -153,7 +153,7 @@
 * @see 
https://www.mediawiki.org/wiki/Manual:Hooks/ResourceLoaderGetConfigVars
 *
 * @param array &$vars Array of variables to be added into the output 
of the startup module.
-* @return boolean
+* @return bool
 */
public static function onResourceLoaderGetConfigVars( &$vars ) {
$config = MediaWikiServices::getInstance()->getConfigFactory()
@@ -180,7 +180,7 @@
 * @see 
https://www.mediawiki.org/wiki/Manual:Hooks/ResourceLoaderRegisterModules
 *
 * @param ResourceLoader &$resourceLoader The ResourceLoader object
-* @return boolean
+* @return bool
 */
public static function onResourceLoaderRegisterModules( ResourceLoader 
&$resourceLoader ) {
$dependencies = [];
diff --git a/includes/Hooks.php b/includes/Hooks.php
index e64164d..7027581 100644
--- a/includes/Hooks.php
+++ b/includes/Hooks.php
@@ -15,7 +15,7 @@
 * {@see Hooks::onFuncRelated}).
 *
 * @param Parser &$parser Paser object
-* @return boolean Always true
+* @return bool Always true
 */
public static function onParserFirstCallInit( Parser &$parser ) {
$parser->setFunctionHook( 'related', 
'RelatedArticles\\Hooks::onFuncRelated' );
@@ -64,7 +64,7 @@
 *
 * @param OutputPage &$out the OutputPage object
 * @param ParserOutput $parserOutput ParserOutput object
-* @return boolean Always true
+* @return bool Always true
 */
public static function onOutputPageParserOutput( OutputPage &$out, 
ParserOutput $parserOutput ) {
$related = $parserOutput->getExtensionData( 'RelatedArticles' );
diff --git a/includes/SidebarHooks.php b/includes/SidebarHooks.php
index 7ccaefa..2b73e74 100644
--- a/includes/SidebarHooks.php
+++ b/includes/SidebarHooks.php
@@ -19,7 +19,7 @@
 *
 * @param Skin $skin Skin object
 * @param array &$bar Sidebar contents
-* @return boolean Always true
+* @return bool Always true
 */
public static function onSidebarBeforeOutput( Skin $skin, &$bar ) {
$out = $skin->getOutput();
diff --git a/phpcs.xml b/phpcs.xml
index ea36036..b0464c3 100644
--- a/phpcs.xml
+++ b/phpcs.xml
@@ -4,6 +4,5 @@

.

-   
-   vendor
+   
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie05b9ddc3e351abf4b2b199529b714766055d161
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/RelatedArticles
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Niedzielski 

[MediaWiki-commits] [Gerrit] mediawiki...RSS[master]: build: Updating mediawiki/mediawiki-codesniffer to 0.10.1

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

Change subject: build: Updating mediawiki/mediawiki-codesniffer to 0.10.1
..


build: Updating mediawiki/mediawiki-codesniffer to 0.10.1

Change-Id: Ifafccf48234a036349ac41cc398171081398e1e7
---
M RSSParser.php
M composer.json
M phpcs.xml
3 files changed, 6 insertions(+), 8 deletions(-)

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



diff --git a/RSSParser.php b/RSSParser.php
index 8bdd42a..a1c7159 100644
--- a/RSSParser.php
+++ b/RSSParser.php
@@ -182,7 +182,7 @@
/**
 * Retrieve the URL from the cache
 * @param $key String: lookup key to associate with this item
-* @return boolean
+* @return bool
 */
protected function loadFromCache( $key ) {
global $wgMemc, $wgRSSCacheCompare;
@@ -218,7 +218,7 @@
/**
 * Store these objects (i.e. etag, lastModified, and RSS) in the cache.
 * @param $key String: lookup key to associate with this item
-* @return boolean
+* @return bool
 */
protected function storeInCache( $key ) {
global $wgMemc, $wgRSSCacheAge;
@@ -575,7 +575,7 @@
 * Determine if a given item should or should not be displayed
 *
 * @param $item Array: associative array that RSSData produced for an 

-* @return boolean
+* @return bool
 */
protected function canDisplay( array $item ) {
$check = '';
@@ -602,7 +602,7 @@
 * @param $text String: the text to examine
 * @param $filterType String: "filterOut" to check for matches in the 
filterOut member list.
 *  Otherwise, uses the filter member list.
-* @return Boolean: decision to filter or not.
+* @return bool Decision to filter or not.
 */
protected function filter( $text, $filterType ) {
if ( $filterType === 'filterOut' ) {
diff --git a/composer.json b/composer.json
index 4f55859..bf202bf 100644
--- a/composer.json
+++ b/composer.json
@@ -2,7 +2,7 @@
"require-dev": {
"jakub-onderka/php-parallel-lint": "0.9.2",
"jakub-onderka/php-console-highlighter": "0.3.2",
-   "mediawiki/mediawiki-codesniffer": "0.10.0"
+   "mediawiki/mediawiki-codesniffer": "0.10.1"
},
"scripts": {
"fix": "phpcbf",
diff --git a/phpcs.xml b/phpcs.xml
index 49a1a4f..f91e839 100644
--- a/phpcs.xml
+++ b/phpcs.xml
@@ -11,7 +11,5 @@

.

-   
-   vendor
-   node_modules
+   
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ifafccf48234a036349ac41cc398171081398e1e7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/RSS
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 
Gerrit-Reviewer: Jforrester 
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]: icinga/role:mail::mx: add monitoring of exim queue size

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

Change subject: icinga/role:mail::mx: add monitoring of exim queue size
..


icinga/role:mail::mx: add monitoring of exim queue size

Adds a new Icinga plugin check_exim_queue using bash and
exipick.

Adds NRPE monitoring service in MX role class assuming it
is prefered that i put it there vs the module.

Using 1000 for WARN and 3000 for CRIT. I observed values around
300 on mx1001 the other day when testing it.

Bug: T133110
Change-Id: I70bdef87eed6902ad27c92f2fa0e19b3d2274d7d
---
A modules/icinga/files/check_exim_queue.sh
M modules/role/manifests/mail/mx.pp
2 files changed, 92 insertions(+), 0 deletions(-)

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



diff --git a/modules/icinga/files/check_exim_queue.sh 
b/modules/icinga/files/check_exim_queue.sh
new file mode 100755
index 000..6446fc5
--- /dev/null
+++ b/modules/icinga/files/check_exim_queue.sh
@@ -0,0 +1,70 @@
+#!/bin/bash
+# Nagios/Icinga plugin to check for oversized exim4 queues.
+#
+# Daniel Zahn - Wikimedia Foundation Inc.
+#
+# https://phabricator.wikimedia.org/T133110
+#
+# ./check_exim_queue -w  -c 
+#
+#  = number of mails in queue that trigger a WARN (int)
+#  = number of mails in queue that trigger a CRIT (int)
+#
+# dependencies: exipick, sudo
+
+set -eu
+
+usage() { echo "Usage: $0 -w  -c " 1>&2; exit 1; }
+
+declare -i WARN_LIMIT=0
+declare -i CRIT_LIMIT=0
+
+# count only messages older than MIN_AGE
+MIN_AGE="10m"
+
+while getopts "w:c:" o; do
+case "${o}" in
+w)
+   WARN_LIMIT=${OPTARG}
+   ;;
+c)
+   CRIT_LIMIT=${OPTARG}
+   ;;
+*)
+   usage
+   ;;
+esac
+done
+
+if [ $WARN_LIMIT == 0 ] || [ $CRIT_LIMIT == 0 ]; then
+usage
+fi
+
+declare -i QSIZE=0
+
+SUDO="/usr/bin/sudo"
+EXIPICK="/usr/sbin/exipick"
+
+# number of messages in queue older than $MIN_AGE
+QSIZE="$(${SUDO} ${EXIPICK} -bpc -o ${MIN_AGE})"
+
+# echo "QSIZE: ${QSIZE} WARN: ${WARN_LIMIT} CRIT: ${CRIT_LIMIT}"
+
+if [ "$QSIZE" -ge "$CRIT_LIMIT" ] ; then
+echo "CRITICAL: ${QSIZE} mails in exim queue."
+exit 2
+fi
+
+if [ "$QSIZE" -ge "$WARN_LIMIT" ] ; then
+echo "WARNING: ${QSIZE} mails in exim queue."
+exit 1
+fi
+
+if [ "$QSIZE" -lt "$WARN_LIMIT" ] && [ "$QSIZE" -lt "$CRIT_LIMIT" ] ; then
+echo "OK: Less than ${WARN_LIMIT} mails in exim queue."
+exit 0
+fi
+
+echo "UNKNOWN: something went wrong. check plugin ($0)."
+exit 3
+
diff --git a/modules/role/manifests/mail/mx.pp 
b/modules/role/manifests/mail/mx.pp
index 905b309..d860227 100644
--- a/modules/role/manifests/mail/mx.pp
+++ b/modules/role/manifests/mail/mx.pp
@@ -106,4 +106,26 @@
 ensure => 'present',
 source => 'puppet:///modules/role/exim/logrotate/exim4-base.mx',
 }
+
+# monitor mail queue size (T133110)
+file { '/usr/local/lib/nagios/plugins/check_exim_queue':
+ensure => present,
+owner  => 'root',
+group  => 'root',
+mode   => '0555',
+source => 'puppet:///modules/icinga/check_exim_queue.sh',
+}
+
+::sudo::user { 'nagios_exim_queue':
+user   => 'nagios',
+privileges => ['ALL = NOPASSWD: /usr/sbin/exipick -bpc -o 
[[\:digit\:]][[\:digit\:]][mh]'],
+}
+
+nrpe::monitor_service { 'check_exim_queue':
+description=> 'exim queue',
+nrpe_command   => '/usr/local/lib/nagios/plugins/check_exim_queue -w 
1000 -c 3000',
+check_interval => 30,
+retry_interval => 10,
+timeout=> 20,
+}
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I70bdef87eed6902ad27c92f2fa0e19b3d2274d7d
Gerrit-PatchSet: 12
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn 
Gerrit-Reviewer: Alexandros Kosiaris 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: Filippo Giunchedi 
Gerrit-Reviewer: Herron 
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]: Set full span layout parameter on SearchCardView

2017-07-26 Thread Mholloway (Code Review)
Mholloway has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/368104 )

Change subject: Set full span layout parameter on SearchCardView
..

Set full span layout parameter on SearchCardView

Bug: T171328
Change-Id: I55250b2be2c4d87f0384db44bf95e48e834d75b4
---
M app/src/main/java/org/wikipedia/feed/view/FeedAdapter.java
1 file changed, 6 insertions(+), 0 deletions(-)


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

diff --git a/app/src/main/java/org/wikipedia/feed/view/FeedAdapter.java 
b/app/src/main/java/org/wikipedia/feed/view/FeedAdapter.java
index e27e567..13552bc 100644
--- a/app/src/main/java/org/wikipedia/feed/view/FeedAdapter.java
+++ b/app/src/main/java/org/wikipedia/feed/view/FeedAdapter.java
@@ -3,6 +3,7 @@
 import android.content.Context;
 import android.support.annotation.NonNull;
 import android.support.annotation.Nullable;
+import android.support.v7.widget.StaggeredGridLayoutManager;
 import android.view.View;
 import android.view.ViewGroup;
 
@@ -66,6 +67,11 @@
 
 @Override public void onViewAttachedToWindow(DefaultViewHolder holder) {
 super.onViewAttachedToWindow(holder);
+if (holder.getView() instanceof SearchCardView) {
+StaggeredGridLayoutManager.LayoutParams layoutParams
+= (StaggeredGridLayoutManager.LayoutParams) 
holder.getView().getLayoutParams();
+layoutParams.setFullSpan(true);
+}
 holder.getView().setCallback(callback);
 if (callback != null) {
 callback.onShowCard(holder.getView().getCard());

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

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

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


[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: clean up insert_contribution_tracking signature

2017-07-26 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/368103 )

Change subject: clean up insert_contribution_tracking signature
..

clean up insert_contribution_tracking signature

Change-Id: I9a4e58b72795e26babbb59c42d7bdcaa57b78862
---
M sites/all/modules/queue2civicrm/recurring/recurring.module
M sites/all/modules/recurring_globalcollect/tests/RecurringGlobalCollectTest.php
M sites/all/modules/wmf_civicrm/tracking.inc
M sites/all/modules/wmf_civicrm/wmf_civicrm.module
4 files changed, 30 insertions(+), 20 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/03/368103/1

diff --git a/sites/all/modules/queue2civicrm/recurring/recurring.module 
b/sites/all/modules/queue2civicrm/recurring/recurring.module
index 5a37e07..58f0156 100644
--- a/sites/all/modules/queue2civicrm/recurring/recurring.module
+++ b/sites/all/modules/queue2civicrm/recurring/recurring.module
@@ -171,12 +171,18 @@
   sort( $contrib_ids, SORT_NUMERIC );
   $contrib_id = array_shift( $contrib_ids ); // this should return null if 
$contrib_ids is empty
   $date = wmf_common_date_unix_to_sql( strtotime( $msg[ 'payment_date' ] 
));
-  $contribution_tracking_id = wmf_civicrm_insert_contribution_tracking( 
'..rpp', 'civicrm', null, $date, $contrib_id );
+  $tracking = array(
+'utm_source' => '..rpp',
+'utm_medium' => 'civicrm',
+'ts' => $date,
+'contribution_id' => $contrib_id
+  );
+  $contribution_tracking_id = wmf_civicrm_insert_contribution_tracking( 
$tracking );
   watchdog( 'recurring', 'recurring_get_contribution_tracking_id: Inserted 
contrib tracking id, %cti', array( '%cti' => $contribution_tracking_id ), 
WATCHDOG_DEBUG );
   return $contribution_tracking_id;
 }
   } else {
-   watchdog( 'recurring', 'recurring_get_contribution_tracking_id: No 
contribution_tracking_id returned.', array(), WATCHDOG_DEBUG );
+watchdog( 'recurring', 'recurring_get_contribution_tracking_id: No 
contribution_tracking_id returned.', array(), WATCHDOG_DEBUG );
 return null;
   }
 }
diff --git 
a/sites/all/modules/recurring_globalcollect/tests/RecurringGlobalCollectTest.php
 
b/sites/all/modules/recurring_globalcollect/tests/RecurringGlobalCollectTest.php
index c60ce38..fc2fc0c 100644
--- 
a/sites/all/modules/recurring_globalcollect/tests/RecurringGlobalCollectTest.php
+++ 
b/sites/all/modules/recurring_globalcollect/tests/RecurringGlobalCollectTest.php
@@ -60,7 +60,13 @@
'trxn_id' => 'RECURRING GLOBALCOLLECT 
STUB_ORIG_CONTRIB-' . mt_rand(),
) );
$this->contributions[] = $result['id'];
-   wmf_civicrm_insert_contribution_tracking( '..rcc', 'civicrm', 
null, wmf_common_date_unix_to_sql( strtotime( 'now' ) ), $result['id'] );
+   $tracking = array(
+   'utm_source' => '..rcc',
+   'utm_medium' => 'civicrm',
+   'ts' => wmf_common_date_unix_to_sql( strtotime( 'now' ) 
),
+   'contribution_id' => $result['id'],
+   );
+   wmf_civicrm_insert_contribution_tracking( $tracking );
}
 
function testChargeRecorded() {
diff --git a/sites/all/modules/wmf_civicrm/tracking.inc 
b/sites/all/modules/wmf_civicrm/tracking.inc
index 6d7739c..216b6c8 100644
--- a/sites/all/modules/wmf_civicrm/tracking.inc
+++ b/sites/all/modules/wmf_civicrm/tracking.inc
@@ -2,29 +2,19 @@
 
 /**
  * Insert a record into contribution_tracking table
- * 
+ *
  * Primarily used when a record does not already exist in the table for a
  * particular transaction.  Rare, but inserting some data for a trxn when
  * absent helps facilitate better analytics.
- * 
+ *
+ * @param array $values associative array of columns => values to insert
+ *  into the contribution tracking table
  * @return int the contribution_tracking id
  */
-function wmf_civicrm_insert_contribution_tracking( $utm_source, $utm_medium, 
$utm_campaign, $ts, $contrib_id=null, $optout=null, $anonymous=null ) {
+function wmf_civicrm_insert_contribution_tracking( $values ) {
 // make sure we're using the default (drupal) db
 $dbs = wmf_civicrm_get_dbs();
 $dbs->push( 'donations' );
-
-$values = array(
-'utm_source' => $utm_source,
-'utm_medium' => $utm_medium,
-'utm_campaign' => $utm_campaign,
-'optout' => $optout,
-'anonymous' => $anonymous,
-'ts' => $ts,
-);
-if ($contrib_id !== null){
-$values['contribution_id'] = $contrib_id;
-}
 
 $contribution_tracking_id = db_insert( 'contribution_tracking' )->fields( 
$values )->execute();
 watchdog( 'wmf_civicrm', "Created new contribution_tracking entry %id", 
array( '%id' => $contribution_tracking_id ), WATCHDOG_INFO );
diff --git a/sites/all/modules/wmf_civicrm/wmf_civicrm.module 

[MediaWiki-commits] [Gerrit] mediawiki...QuickSurveys[master]: build: Updating mediawiki/mediawiki-codesniffer to 0.10.1

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

Change subject: build: Updating mediawiki/mediawiki-codesniffer to 0.10.1
..


build: Updating mediawiki/mediawiki-codesniffer to 0.10.1

Change-Id: Ifef6a189984f506bbb43a1556ae2c77f2b64c972
---
M composer.json
M includes/QuickSurveys.hooks.php
M phpcs.xml
3 files changed, 3 insertions(+), 4 deletions(-)

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



diff --git a/composer.json b/composer.json
index 1366381..55507be 100644
--- a/composer.json
+++ b/composer.json
@@ -1,7 +1,7 @@
 {
"require-dev": {
"jakub-onderka/php-parallel-lint": "0.9.2",
-   "mediawiki/mediawiki-codesniffer": "0.10.0",
+   "mediawiki/mediawiki-codesniffer": "0.10.1",
"jakub-onderka/php-console-highlighter": "0.3.2"
},
"scripts": {
diff --git a/includes/QuickSurveys.hooks.php b/includes/QuickSurveys.hooks.php
index 5d9e1fd..64c75c9 100644
--- a/includes/QuickSurveys.hooks.php
+++ b/includes/QuickSurveys.hooks.php
@@ -54,7 +54,7 @@
 * @see 
https://www.mediawiki.org/wiki/Manual:Hooks/ResourceLoaderGetConfigVars
 *
 * @param array $vars
-* @return boolean
+* @return bool
 */
public static function onResourceLoaderGetConfigVars( &$vars ) {
global $wgQuickSurveysRequireHttps;
diff --git a/phpcs.xml b/phpcs.xml
index 65d95e7..d89be41 100644
--- a/phpcs.xml
+++ b/phpcs.xml
@@ -9,6 +9,5 @@

.

-   
-   vendor
+   
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ifef6a189984f506bbb43a1556ae2c77f2b64c972
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/QuickSurveys
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 
Gerrit-Reviewer: Jforrester 
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]: Nodepool: raise rate to 8 seconds

2017-07-26 Thread Andrew Bogott (Code Review)
Andrew Bogott has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/368102 )

Change subject: Nodepool:  raise rate to 8 seconds
..


Nodepool:  raise rate to 8 seconds

This was at 6, which has historically been mostly safe,
but I'm seeing terrible congestion right now so slowing
things down again :(

Bug: T170492
Change-Id: I91d0b3a6b64c3b68a9a8b115f46de1d53708fe03
---
M modules/nodepool/templates/nodepool.yaml.erb
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Andrew Bogott: Verified; Looks good to me, approved



diff --git a/modules/nodepool/templates/nodepool.yaml.erb 
b/modules/nodepool/templates/nodepool.yaml.erb
index 1a6928c..c1fdd50 100644
--- a/modules/nodepool/templates/nodepool.yaml.erb
+++ b/modules/nodepool/templates/nodepool.yaml.erb
@@ -85,7 +85,7 @@
 api-timeout: 60  # seconds
 boot-timeout: 300  # seconds
 max-servers: 25
-rate: 6  # seconds
+rate: 8  # seconds
 # 'eqiad.wmflabs' is magically added by wmflabs
 template-hostname: '{image.name}-{timestamp}'
 images:

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I91d0b3a6b64c3b68a9a8b115f46de1d53708fe03
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Andrew Bogott 
Gerrit-Reviewer: Andrew Bogott 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Nodepool: raise rate to 8 seconds

2017-07-26 Thread Andrew Bogott (Code Review)
Andrew Bogott has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/368102 )

Change subject: Nodepool:  raise rate to 8 seconds
..

Nodepool:  raise rate to 8 seconds

This was at 6, which has historically been mostly safe,
but I'm seeing terrible congestion right now so slowing
things down again :(

Bug: T170492
Change-Id: I91d0b3a6b64c3b68a9a8b115f46de1d53708fe03
---
M modules/nodepool/templates/nodepool.yaml.erb
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/02/368102/1

diff --git a/modules/nodepool/templates/nodepool.yaml.erb 
b/modules/nodepool/templates/nodepool.yaml.erb
index 1a6928c..c1fdd50 100644
--- a/modules/nodepool/templates/nodepool.yaml.erb
+++ b/modules/nodepool/templates/nodepool.yaml.erb
@@ -85,7 +85,7 @@
 api-timeout: 60  # seconds
 boot-timeout: 300  # seconds
 max-servers: 25
-rate: 6  # seconds
+rate: 8  # seconds
 # 'eqiad.wmflabs' is magically added by wmflabs
 template-hostname: '{image.name}-{timestamp}'
 images:

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I91d0b3a6b64c3b68a9a8b115f46de1d53708fe03
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Andrew Bogott 

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


[MediaWiki-commits] [Gerrit] mediawiki...ProofreadPage[master]: build: Updating mediawiki/mediawiki-codesniffer to 0.10.1

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

Change subject: build: Updating mediawiki/mediawiki-codesniffer to 0.10.1
..


build: Updating mediawiki/mediawiki-codesniffer to 0.10.1

Change-Id: Icf865f9b4d44f088bdb39ccd2576d171834eeaf5
---
M ProofreadPage.body.php
M composer.json
M phpcs.xml
M tests/phpunit/index/ProofreadIndexPageTest.php
4 files changed, 6 insertions(+), 8 deletions(-)

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



diff --git a/ProofreadPage.body.php b/ProofreadPage.body.php
index f8c1ede..eda957a 100644
--- a/ProofreadPage.body.php
+++ b/ProofreadPage.body.php
@@ -312,20 +312,20 @@
$title = $article->getTitle();
 
// if it's an index, update pr_index table
-   if ( $title->inNamespace( ProofreadPage::getIndexNamespaceId() 
) ) {
+   if ( $title->inNamespace( self::getIndexNamespaceId() ) ) {
// Move this part to EditProofreadIndexPage
-   ProofreadPage::updatePrIndex( $article );
+   self::updatePrIndex( $article );
return true;
}
 
// return if it is not a page
-   if ( !$title->inNamespace( ProofreadPage::getPageNamespaceId() 
) ) {
+   if ( !$title->inNamespace( self::getPageNamespaceId() ) ) {
return true;
}
 
/* check if there is an index */
if ( !isset( $title->prpIndexPage ) ) {
-   ProofreadPage::loadIndex( $title );
+   self::loadIndex( $title );
}
if ( $title->prpIndexPage === null ) {
return true;
diff --git a/composer.json b/composer.json
index b5e294c..c12a316 100644
--- a/composer.json
+++ b/composer.json
@@ -9,7 +9,7 @@
},
"require-dev": {
"jakub-onderka/php-parallel-lint": "0.9.2",
-   "mediawiki/mediawiki-codesniffer": "0.10.0",
+   "mediawiki/mediawiki-codesniffer": "0.10.1",
"jakub-onderka/php-console-highlighter": "0.3.2"
},
"scripts": {
diff --git a/phpcs.xml b/phpcs.xml
index 0a5187b..868ce12 100644
--- a/phpcs.xml
+++ b/phpcs.xml
@@ -13,6 +13,4 @@
.


-   node_modules/
-   vendor/
 
diff --git a/tests/phpunit/index/ProofreadIndexPageTest.php 
b/tests/phpunit/index/ProofreadIndexPageTest.php
index 3e6c32a..8173f52 100644
--- a/tests/phpunit/index/ProofreadIndexPageTest.php
+++ b/tests/phpunit/index/ProofreadIndexPageTest.php
@@ -200,7 +200,7 @@
}
 
public function testGetLinksToPageNamespace() {
-   $page = ProofreadIndexPageTest::newIndexPage(
+   $page = self::newIndexPage(
'Test',
"{{\n|Pages=[[Page:Test 1.jpg|TOC]] [[Page:Test 
2.tiff|1]] [[Page:Test:3.png|2]]" .
"\n|Author=[[Author:Me]]\n}}"

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Icf865f9b4d44f088bdb39ccd2576d171834eeaf5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ProofreadPage
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...MobileFrontend[master]: build: Updating mediawiki/mediawiki-codesniffer to 0.10.1

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

Change subject: build: Updating mediawiki/mediawiki-codesniffer to 0.10.1
..


build: Updating mediawiki/mediawiki-codesniffer to 0.10.1

Change-Id: If8d9c572ff5811be1149252f5a188bb9913eac4a
---
M composer.json
M includes/MobileFrontend.body.php
M includes/MobileFrontend.skin.hooks.php
M includes/specials/SpecialMobileWatchlist.php
M phpcs.xml
5 files changed, 9 insertions(+), 11 deletions(-)

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



diff --git a/composer.json b/composer.json
index 1366381..55507be 100644
--- a/composer.json
+++ b/composer.json
@@ -1,7 +1,7 @@
 {
"require-dev": {
"jakub-onderka/php-parallel-lint": "0.9.2",
-   "mediawiki/mediawiki-codesniffer": "0.10.0",
+   "mediawiki/mediawiki-codesniffer": "0.10.1",
"jakub-onderka/php-console-highlighter": "0.3.2"
},
"scripts": {
diff --git a/includes/MobileFrontend.body.php b/includes/MobileFrontend.body.php
index 3133d76..8256a36 100644
--- a/includes/MobileFrontend.body.php
+++ b/includes/MobileFrontend.body.php
@@ -83,7 +83,7 @@
$pageUserId = User::idFromName( $title->getText() );
if ( $pageUserId && !$title->exists() ) {
$pageUser = User::newFromId( $pageUserId );
-   $contentHtml = 
ExtMobileFrontend::getUserPageContent(
+   $contentHtml = self::getUserPageContent(
$out, $pageUser );
}
}
diff --git a/includes/MobileFrontend.skin.hooks.php 
b/includes/MobileFrontend.skin.hooks.php
index 0f48b61..e0fe06f 100644
--- a/includes/MobileFrontend.skin.hooks.php
+++ b/includes/MobileFrontend.skin.hooks.php
@@ -186,9 +186,9 @@
// Certain pages might be blacklisted and not have a mobile 
equivalent.
if ( !$ctx->isBlacklistedPage() ) {
if ( $ctx->shouldDisplayMobileView() ) {
-   MobileFrontendSkinHooks::mobileFooter( $skin, 
$tpl, $ctx, $title, $req );
+   self::mobileFooter( $skin, $tpl, $ctx, $title, 
$req );
} else {
-   MobileFrontendSkinHooks::desktopFooter( $skin, 
$tpl, $ctx, $title, $req );
+   self::desktopFooter( $skin, $tpl, $ctx, $title, 
$req );
}
}
}
diff --git a/includes/specials/SpecialMobileWatchlist.php 
b/includes/specials/SpecialMobileWatchlist.php
index 6c31999..19e6a0f 100644
--- a/includes/specials/SpecialMobileWatchlist.php
+++ b/includes/specials/SpecialMobileWatchlist.php
@@ -149,9 +149,9 @@
$attrsList = $attrsFeed = [];
// https://phabricator.wikimedia.org/T150650
if ( $view === null ) {
-   $view = $user->getOption( 
SpecialMobileWatchlist::VIEW_OPTION_NAME, 'a-z' );
+   $view = $user->getOption( self::VIEW_OPTION_NAME, 'a-z' 
);
}
-   $filter = $user->getOption( 
SpecialMobileWatchlist::FILTER_OPTION_NAME, 'all' );
+   $filter = $user->getOption( self::FILTER_OPTION_NAME, 'all' );
 
if ( $view === 'feed' ) {
$attrsList[ 'class' ] = MobileUI::buttonClass();
diff --git a/phpcs.xml b/phpcs.xml
index 08a1d0b..f668c64 100644
--- a/phpcs.xml
+++ b/phpcs.xml
@@ -7,19 +7,17 @@



-   MobileFrontend.alias.php
+   MobileFrontend\.alias\.php

.


-   vendor
-   node_modules
 



-   
-   
+   
+   


 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If8d9c572ff5811be1149252f5a188bb9913eac4a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Niedzielski 
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...PageAssessments[master]: build: Updating mediawiki/mediawiki-codesniffer to 0.10.1

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

Change subject: build: Updating mediawiki/mediawiki-codesniffer to 0.10.1
..


build: Updating mediawiki/mediawiki-codesniffer to 0.10.1

Change-Id: Ib9be7332c7eb584a24af938ea40acf398659b2e8
---
M composer.json
M phpcs.xml
M src/SpecialPage.php
3 files changed, 3 insertions(+), 4 deletions(-)

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



diff --git a/composer.json b/composer.json
index 1c37f3a..834ad8e 100644
--- a/composer.json
+++ b/composer.json
@@ -4,7 +4,7 @@
"description": "This extension adds a parser function which can be used 
for storing article assessments in a database table.",
"require-dev": {
"jakub-onderka/php-parallel-lint": "0.9.*",
-   "mediawiki/mediawiki-codesniffer": "0.10.0",
+   "mediawiki/mediawiki-codesniffer": "0.10.1",
"jakub-onderka/php-console-highlighter": "0.3.2"
},
"scripts": {
diff --git a/phpcs.xml b/phpcs.xml
index b35e5af..c4e2dec 100644
--- a/phpcs.xml
+++ b/phpcs.xml
@@ -12,5 +12,4 @@
.


-   vendor
 
diff --git a/src/SpecialPage.php b/src/SpecialPage.php
index 5a2e393..c925fcc 100644
--- a/src/SpecialPage.php
+++ b/src/SpecialPage.php
@@ -101,7 +101,7 @@
 * @param ResultWrapper $res Result pointer
 * @param int $num Number of available result rows
 * @param int $offset Paging offset
-* @return boolean False if no results are displayed, true otherwise.
+* @return bool False if no results are displayed, true otherwise.
 */
protected function outputResults( $out, $skin, $dbr, $res, $num, 
$offset ) {
// Don't display anything if there are no results.
@@ -251,7 +251,7 @@
/**
 * Whether we're currently sorting descending, or ascending. Based on 
the request 'dir'
 * value; anything starting with 'desc' is considered 'desecending'.
-* @return boolean
+* @return bool
 */
function sortDescending() {
return stripos( $this->getRequest()->getVal( 'dir' ), 'desc' ) 
=== 0;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib9be7332c7eb584a24af938ea40acf398659b2e8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/PageAssessments
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...Flow[master]: build: Updating mediawiki/mediawiki-codesniffer to 0.10.1

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

Change subject: build: Updating mediawiki/mediawiki-codesniffer to 0.10.1
..


build: Updating mediawiki/mediawiki-codesniffer to 0.10.1

Change-Id: I6bbe8421f04e404e26b21db04c54c671ed841a7f
---
M Hooks.php
M composer.json
M includes/Model/AbstractRevision.php
M includes/Model/UUID.php
M phpcs.xml
5 files changed, 10 insertions(+), 12 deletions(-)

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



diff --git a/Hooks.php b/Hooks.php
index 262a676..309e27c 100644
--- a/Hooks.php
+++ b/Hooks.php
@@ -481,7 +481,7 @@
$rc = $block[0];
 
// quit if non-flow
-   if ( !FlowHooks::isFlow( $rc ) ) {
+   if ( !self::isFlow( $rc ) ) {
return true;
}
 
@@ -540,7 +540,7 @@
 
private static function modifyChangesListLine( $changesList, &$data, 
$rc, &$classes ) {
// quit if non-flow
-   if ( !FlowHooks::isFlow( $rc ) ) {
+   if ( !self::isFlow( $rc ) ) {
return true;
}
 
@@ -1546,7 +1546,7 @@
public static function onArticleConfirmDelete( $article, $output, 
&$reason ) {
$title = $article->getTitle();
if ( $title->inNamespace( NS_TOPIC ) ) {
-   $output->addHTML( FlowHooks::getTopicDeletionError( 
$title ) );
+   $output->addHTML( self::getTopicDeletionError( $title ) 
);
return false;
}
 
@@ -1566,7 +1566,7 @@
public static function onArticleDelete( WikiPage &$article, User 
&$user, &$reason, &$error ) {
$title = $article->getTitle();
if ( $title->inNamespace( NS_TOPIC ) ) {
-   $error = FlowHooks::getTopicDeletionError( $title );
+   $error = self::getTopicDeletionError( $title );
return false;
}
 
diff --git a/composer.json b/composer.json
index 216884b..d8f2b6a 100644
--- a/composer.json
+++ b/composer.json
@@ -10,7 +10,7 @@
"symfony/css-selector": "~2.5",
"jakub-onderka/php-parallel-lint": "0.9.2",
"jakub-onderka/php-console-highlighter": "0.3.2",
-   "mediawiki/mediawiki-codesniffer": "0.10.0"
+   "mediawiki/mediawiki-codesniffer": "0.10.1"
},
"scripts": {
"fix": "phpcbf",
diff --git a/includes/Model/AbstractRevision.php 
b/includes/Model/AbstractRevision.php
index 990a226..8a44ad2 100644
--- a/includes/Model/AbstractRevision.php
+++ b/includes/Model/AbstractRevision.php
@@ -186,8 +186,8 @@
 
// BC: 'suppress' used to be called 'censor' & 'lock' was 
'close'
$bc = [
-   'censor' => AbstractRevision::MODERATED_SUPPRESSED,
-   'close' => AbstractRevision::MODERATED_LOCKED,
+   'censor' => self::MODERATED_SUPPRESSED,
+   'close' => self::MODERATED_LOCKED,
];
$obj->moderationState = str_replace( array_keys( $bc ), 
array_values( $bc ), $obj->moderationState );
 
diff --git a/includes/Model/UUID.php b/includes/Model/UUID.php
index 32c2fde..f4bef47 100644
--- a/includes/Model/UUID.php
+++ b/includes/Model/UUID.php
@@ -349,7 +349,7 @@
if ( $value instanceof UUIDBlob ) {
// database encoded binary value
if ( $format === 'alphadecimal' ) {
-   $array[$key] = UUID::create( 
$value->fetch() )->getAlphadecimal();
+   $array[$key] = self::create( 
$value->fetch() )->getAlphadecimal();
}
} elseif ( $value instanceof UUID ) {
if ( $format === 'binary' ) {
@@ -361,13 +361,13 @@
// things that look like uuids
$len = strlen( $value );
if ( $format === 'alphadecimal' && $len === 
self::BIN_LEN ) {
-   $array[$key] = UUID::create( $value 
)->getAlphadecimal();
+   $array[$key] = self::create( $value 
)->getAlphadecimal();
} elseif ( $format === 'binary' && (
( $len >= self::MIN_ALNUM_LEN && $len 
<= self::ALNUM_LEN )
||
$len === self::HEX_LEN
) ) {
-   $array[$key] = UUID::create( $value 
)->getBinary();
+   $array[$key] = 

[MediaWiki-commits] [Gerrit] operations/puppet[production]: WIP: [labs] Puppetize XTools

2017-07-26 Thread MaxSem (Code Review)
MaxSem has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/368101 )

Change subject: WIP: [labs] Puppetize XTools
..

WIP: [labs] Puppetize XTools

Bug: T170514
Change-Id: Ia5320d52dd6934232a51ea5ad1d65288b8666b79
---
A modules/xtools/files/update-xtools
A modules/xtools/manifests/code.pp
A modules/xtools/manifests/init.pp
A modules/xtools/manifests/packages.pp
A modules/xtools/manifests/web.pp
A modules/xtools/templates/xtools.conf.erb
6 files changed, 110 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/01/368101/1

diff --git a/modules/xtools/files/update-xtools 
b/modules/xtools/files/update-xtools
new file mode 100644
index 000..a1d51bf
--- /dev/null
+++ b/modules/xtools/files/update-xtools
@@ -0,0 +1,18 @@
+#!/bin/bash
+
+export SYMFONY_ENV=prod
+cd /var/www
+
+## See if there's any update.
+GITFETCH=$(git fetch 2>&1)
+if [ -z "$GITFETCH" ]; then
+exit 0
+fi
+
+## If there's an update, pull and install it.
+git checkout master
+git pull origin master
+/usr/local/bin/composer install --no-dev --optimize-autoloader
+./bin/console cache:clear --env prod
+./bin/console doctrine:migrations:migrate --env prod --no-interaction
+./bin/console assetic:dump --env prod
diff --git a/modules/xtools/manifests/code.pp b/modules/xtools/manifests/code.pp
new file mode 100644
index 000..9cca0a0
--- /dev/null
+++ b/modules/xtools/manifests/code.pp
@@ -0,0 +1,40 @@
+class xtools::code {
+group { 'xtools':
+ensure => present,
+}
+
+user { 'xtools-update':
+ensure  => present,
+group   => 'xtools',
+system  => true,
+require => Group['xtools'],
+}
+
+file { '/srv/xtools':
+ensure => directory,
+owner  => 'xtools-update',
+mode   => '0775',
+}
+
+::git::clone { 'xtools':
+directory => '/srv/xtools',
+owner => 'xtools-update',
+origin=> 'https://github.com/x-tools/xtools-rebirth.git',
+require   => [ User['xtools-update'], File['/srv/xtools'] ]
+}
+# todo: composer install. Requires user input so far
+
+file { '/usr/local/update-xtools':
+source => 'xtools/update-xtools',
+owner  => 'root',
+mode   => '0555',
+}
+
+cron { 'update-xtools':
+ensure  => present,
+command => '/usr/local/update-xtools',
+user=> 'xtools-update',
+hour=> '*',
+require => [ File['/usr/local/update-xtools'], Git::Clone['xtools'] ],
+}
+}
diff --git a/modules/xtools/manifests/init.pp b/modules/xtools/manifests/init.pp
new file mode 100644
index 000..deb54d8
--- /dev/null
+++ b/modules/xtools/manifests/init.pp
@@ -0,0 +1,11 @@
+class xtools(
+$host = 'xtools.wmflabs.org',
+) {
+requires_realm('labs')
+
+require ::xtools::packages
+require ::xtools::code
+class { 'xtools::web':
+host => $host,
+}
+}
diff --git a/modules/xtools/manifests/packages.pp 
b/modules/xtools/manifests/packages.pp
new file mode 100644
index 000..9def3b9
--- /dev/null
+++ b/modules/xtools/manifests/packages.pp
@@ -0,0 +1,7 @@
+class xtools::packages {
+require_package(
+'percona-toolkit',
+'mysql-client',
+'git'
+)
+}
diff --git a/modules/xtools/manifests/web.pp b/modules/xtools/manifests/web.pp
new file mode 100644
index 000..3f7e9ad
--- /dev/null
+++ b/modules/xtools/manifests/web.pp
@@ -0,0 +1,10 @@
+class xtools::web(
+$host
+) {
+::apache::site { "xtools-$host":
+ensure => present,
+content => template('xtools/xtools.conf.erb'),
+}
+
+require apache::mod::php7
+}
diff --git a/modules/xtools/templates/xtools.conf.erb 
b/modules/xtools/templates/xtools.conf.erb
new file mode 100644
index 000..afce181
--- /dev/null
+++ b/modules/xtools/templates/xtools.conf.erb
@@ -0,0 +1,24 @@
+
+DocumentRoot /srv/xtools/web
+ServerName <%= @host %>
+
+ErrorLog ${APACHE_LOG_DIR}/error.log
+CustomLog ${APACHE_LOG_DIR}/access.log combined
+
+
+ Options Indexes FollowSymLinks
+ AllowOverride All
+ Require all granted
+
+
+Alias /awstatsclasses "/usr/share/awstats/lib/"
+Alias /awstats-icon/ "/usr/share/awstats/icon/"
+Alias /awstatscss "/usr/share/doc/awstats/examples/css"
+ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
+ScriptAlias /awstats/ /usr/lib/cgi-bin/
+
+Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
+Require all granted
+
+
+

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

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

[MediaWiki-commits] [Gerrit] mediawiki...Echo[master]: build: Updating mediawiki/mediawiki-codesniffer to 0.10.1

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

Change subject: build: Updating mediawiki/mediawiki-codesniffer to 0.10.1
..


build: Updating mediawiki/mediawiki-codesniffer to 0.10.1

Change-Id: I2326cf81e907f2a02615f96f922b66fd2806defd
---
M composer.json
M includes/AttributeManager.php
M includes/ContainmentSet.php
M includes/NotifUser.php
M includes/controller/NotificationController.php
M includes/formatters/PresentationModelSectionTrait.php
M includes/gateway/UserNotificationGateway.php
M includes/mapper/NotificationMapper.php
M includes/mapper/TargetPageMapper.php
M includes/model/Event.php
M phpcs.xml
11 files changed, 20 insertions(+), 21 deletions(-)

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



diff --git a/composer.json b/composer.json
index 49c2a1c..55507be 100644
--- a/composer.json
+++ b/composer.json
@@ -1,13 +1,13 @@
 {
"require-dev": {
"jakub-onderka/php-parallel-lint": "0.9.2",
-   "mediawiki/mediawiki-codesniffer": "0.10.0",
+   "mediawiki/mediawiki-codesniffer": "0.10.1",
"jakub-onderka/php-console-highlighter": "0.3.2"
},
"scripts": {
"test": [
"parallel-lint . --exclude vendor",
-   "phpcs -p"
+   "phpcs -p -s"
],
"fix": [
"phpcbf"
diff --git a/includes/AttributeManager.php b/includes/AttributeManager.php
index 8d30bda..7c9fb4c 100644
--- a/includes/AttributeManager.php
+++ b/includes/AttributeManager.php
@@ -227,7 +227,7 @@
 *
 * @param User
 * @param string A notification category defined in 
$wgEchoNotificationCategories
-* @return boolean
+* @return bool
 */
public function getCategoryEligibility( $user, $category ) {
$usersGroups = $user->getGroups();
@@ -245,7 +245,7 @@
 * Get the priority for a specific notification type
 *
 * @param string A notification type defined in $wgEchoNotifications
-* @return integer From 1 to 10 (10 is default)
+* @return int From 1 to 10 (10 is default)
 */
public function getNotificationPriority( $notificationType ) {
$category = $this->getNotificationCategory( $notificationType );
@@ -257,7 +257,7 @@
 * Get the priority for a notification category
 *
 * @param string A notification category defined in 
$wgEchoNotificationCategories
-* @return integer From 1 to 10 (10 is default)
+* @return int From 1 to 10 (10 is default)
 */
public function getCategoryPriority( $category ) {
if ( isset( $this->categories[$category]['priority'] ) ) {
diff --git a/includes/ContainmentSet.php b/includes/ContainmentSet.php
index 6bde088..70f2ef0 100644
--- a/includes/ContainmentSet.php
+++ b/includes/ContainmentSet.php
@@ -107,7 +107,7 @@
 * Test the wrapped lists for existence of $value
 *
 * @param $value mixed The value to look for
-* @return boolean True when the set contains the provided value
+* @return bool True when the set contains the provided value
 */
public function contains( $value ) {
foreach ( $this->lists as $list ) {
diff --git a/includes/NotifUser.php b/includes/NotifUser.php
index 751263f..72a13e5 100644
--- a/includes/NotifUser.php
+++ b/includes/NotifUser.php
@@ -232,7 +232,7 @@
$eventTypesToLoad = 
$attributeManager->getUserEnabledEventsbySections( $this->mUser, 'web', [ 
$section ] );
}
 
-   $count = 
(int)$this->userNotifGateway->getCappedNotificationCount( $dbSource, 
$eventTypesToLoad, MWEchoNotifUser::MAX_BADGE_COUNT + 1 );
+   $count = 
(int)$this->userNotifGateway->getCappedNotificationCount( $dbSource, 
$eventTypesToLoad, self::MAX_BADGE_COUNT + 1 );
 
if ( $global ) {
$count = self::capNotificationCount( $count + 
$this->getForeignCount( $section ) );
@@ -349,7 +349,7 @@
/**
 * Mark one or more notifications read for a user.
 * @param $eventIds Array of event IDs to mark read
-* @return boolean
+* @return bool
 */
public function markRead( $eventIds ) {
$eventIds = array_filter( (array)$eventIds, 'is_numeric' );
@@ -381,7 +381,7 @@
/**
 * Mark one or more notifications unread for a user.
 * @param $eventIds Array of event IDs to mark unread
-* @return boolean
+* @return bool
 */
public function markUnRead( $eventIds ) {
$eventIds = array_filter( (array)$eventIds, 'is_numeric' );
@@ -418,7 +418,7 @@
 * across multiple tables, we would 

[MediaWiki-commits] [Gerrit] mediawiki...GlobalUsage[master]: build: Updating mediawiki/mediawiki-codesniffer to 0.10.1

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

Change subject: build: Updating mediawiki/mediawiki-codesniffer to 0.10.1
..


build: Updating mediawiki/mediawiki-codesniffer to 0.10.1

Change-Id: I672d898640ae69d3a69ced62a2c78e7a1a157ccc
---
M composer.json
M includes/ApiQueryGlobalUsage.php
M includes/GlobalUsage.php
M includes/SpecialGloballyWantedFiles.php
M includes/SpecialMostGloballyLinkedFiles.php
M phpcs.xml
6 files changed, 12 insertions(+), 14 deletions(-)

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



diff --git a/composer.json b/composer.json
index 4f55859..bf202bf 100644
--- a/composer.json
+++ b/composer.json
@@ -2,7 +2,7 @@
"require-dev": {
"jakub-onderka/php-parallel-lint": "0.9.2",
"jakub-onderka/php-console-highlighter": "0.3.2",
-   "mediawiki/mediawiki-codesniffer": "0.10.0"
+   "mediawiki/mediawiki-codesniffer": "0.10.1"
},
"scripts": {
"fix": "phpcbf",
diff --git a/includes/ApiQueryGlobalUsage.php b/includes/ApiQueryGlobalUsage.php
index 0c1ddc8..c3cbcea 100644
--- a/includes/ApiQueryGlobalUsage.php
+++ b/includes/ApiQueryGlobalUsage.php
@@ -24,7 +24,7 @@
 
 class ApiQueryGlobalUsage extends ApiQueryBase {
public function __construct( $query, $moduleName ) {
-   parent :: __construct( $query, $moduleName, 'gu' );
+   parent::__construct( $query, $moduleName, 'gu' );
}
 
public function execute() {
@@ -119,11 +119,11 @@
ApiBase::PARAM_ISMULTI => true,
],
'limit' => [
-   ApiBase :: PARAM_DFLT => 10,
-   ApiBase :: PARAM_TYPE => 'limit',
-   ApiBase :: PARAM_MIN => 1,
-   ApiBase :: PARAM_MAX => ApiBase :: LIMIT_BIG1,
-   ApiBase :: PARAM_MAX2 => ApiBase :: LIMIT_BIG2
+   ApiBase::PARAM_DFLT => 10,
+   ApiBase::PARAM_TYPE => 'limit',
+   ApiBase::PARAM_MIN => 1,
+   ApiBase::PARAM_MAX => ApiBase::LIMIT_BIG1,
+   ApiBase::PARAM_MAX2 => ApiBase::LIMIT_BIG2
],
'continue' => [
ApiBase::PARAM_HELP_MSG => 
'api-help-param-continue',
diff --git a/includes/GlobalUsage.php b/includes/GlobalUsage.php
index 8e5ff6e..51bbd39 100644
--- a/includes/GlobalUsage.php
+++ b/includes/GlobalUsage.php
@@ -218,7 +218,7 @@
 * @note This assumes the user has a single shared repo. If the user has
 *   multiple/nested foreign repos, then its unclear what it means to
 *   be on the "shared repo". See discussion on bug 23136.
-* @return boolean
+* @return bool
 */
public static function onSharedRepo() {
global $wgGlobalUsageSharedRepoWiki, $wgGlobalUsageDatabase;
diff --git a/includes/SpecialGloballyWantedFiles.php 
b/includes/SpecialGloballyWantedFiles.php
index e389c3d..4e5620c 100644
--- a/includes/SpecialGloballyWantedFiles.php
+++ b/includes/SpecialGloballyWantedFiles.php
@@ -46,7 +46,7 @@
 * Also make sure that GlobalUsage db same as shared repo.
 * (To catch the unlikely case where GlobalUsage db is different db 
from the
 * shared repo db).
-* @return boolean
+* @return bool
 */
function isCacheable() {
global $wgGlobalUsageDatabase;
@@ -57,7 +57,7 @@
/**
 * Only list this special page on the wiki that is the shared repo.
 *
-* @return boolean Should this be listed in Special:SpecialPages
+* @return bool Should this be listed in Special:SpecialPages
 */
function isListed() {
return GlobalUsage::onSharedRepo();
diff --git a/includes/SpecialMostGloballyLinkedFiles.php 
b/includes/SpecialMostGloballyLinkedFiles.php
index fea86e9..432c24f 100644
--- a/includes/SpecialMostGloballyLinkedFiles.php
+++ b/includes/SpecialMostGloballyLinkedFiles.php
@@ -27,7 +27,7 @@
 
/**
 * Don't want to do cached handling on non-shared repo, since we only 
redirect.
-* @return boolean
+* @return bool
 */
function isCacheable() {
return GlobalUsage::onSharedRepo();
@@ -70,7 +70,7 @@
/**
 * Only list this special page on the wiki that is the shared repo.
 *
-* @return boolean Should this be listed in Special:SpecialPages
+* @return bool Should this be listed in Special:SpecialPages
 */
function isListed() {
return GlobalUsage::onSharedRepo();
diff --git 

[MediaWiki-commits] [Gerrit] mediawiki...EventBus[master]: build: Updating mediawiki/mediawiki-codesniffer to 0.10.1

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

Change subject: build: Updating mediawiki/mediawiki-codesniffer to 0.10.1
..


build: Updating mediawiki/mediawiki-codesniffer to 0.10.1

Change-Id: I677062bbac26a0dee62c1d115a4f0a3dc20c757a
---
M EventBus.php
M JobQueueEventBus.php
M composer.json
M phpcs.xml
4 files changed, 3 insertions(+), 5 deletions(-)

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



diff --git a/EventBus.php b/EventBus.php
index 49e509e..552e89f 100644
--- a/EventBus.php
+++ b/EventBus.php
@@ -190,7 +190,7 @@
$attrs = [
// Common Mediawiki entity fields
'database'   => $wgDBname,
-   'performer'  => EventBus::createPerformerAttrs( 
$performer ),
+   'performer'  => self::createPerformerAttrs( 
$performer ),
'comment'=> $revision->getComment(),
 
// revision entity fields
diff --git a/JobQueueEventBus.php b/JobQueueEventBus.php
index 3bdba26..c9559ee 100644
--- a/JobQueueEventBus.php
+++ b/JobQueueEventBus.php
@@ -91,7 +91,7 @@
// (job ID => job fields map)
$events = [];
foreach ( $jobs as $job ) {
-   $item = JobQueueEventBus::createJobEvent( $job );
+   $item = self::createJobEvent( $job );
// hash identifier => de-duplicate
if ( strlen( $item['sha1'] ) ) {
$events[$item['sha1']] = $item;
diff --git a/composer.json b/composer.json
index f251a24..8a2ae1a 100644
--- a/composer.json
+++ b/composer.json
@@ -6,7 +6,7 @@
"minimum-stability": "dev",
"require-dev": {
"jakub-onderka/php-parallel-lint": "0.9.2",
-   "mediawiki/mediawiki-codesniffer": "0.10.0",
+   "mediawiki/mediawiki-codesniffer": "0.10.1",
"jakub-onderka/php-console-highlighter": "0.3.2"
},
"scripts": {
diff --git a/phpcs.xml b/phpcs.xml
index 9f9280f..bb74509 100644
--- a/phpcs.xml
+++ b/phpcs.xml
@@ -6,6 +6,4 @@
.


-   node_modules
-   vendor
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I677062bbac26a0dee62c1d115a4f0a3dc20c757a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/EventBus
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...ConfirmEdit[master]: build: Updating mediawiki/mediawiki-codesniffer to 0.10.1

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

Change subject: build: Updating mediawiki/mediawiki-codesniffer to 0.10.1
..


build: Updating mediawiki/mediawiki-codesniffer to 0.10.1

Change-Id: I7c8dd29e9a683d932c93f1345d7e0c31e8695990
---
M composer.json
M phpcs.xml
2 files changed, 2 insertions(+), 3 deletions(-)

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



diff --git a/composer.json b/composer.json
index 1366381..55507be 100644
--- a/composer.json
+++ b/composer.json
@@ -1,7 +1,7 @@
 {
"require-dev": {
"jakub-onderka/php-parallel-lint": "0.9.2",
-   "mediawiki/mediawiki-codesniffer": "0.10.0",
+   "mediawiki/mediawiki-codesniffer": "0.10.1",
"jakub-onderka/php-console-highlighter": "0.3.2"
},
"scripts": {
diff --git a/phpcs.xml b/phpcs.xml
index 4852d8c..4c94302 100644
--- a/phpcs.xml
+++ b/phpcs.xml
@@ -8,6 +8,5 @@
.


-   ReCaptcha/recaptchalib.php
-   vendor
+   ReCaptcha/recaptchalib\.php
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7c8dd29e9a683d932c93f1345d7e0c31e8695990
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ConfirmEdit
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 
Gerrit-Reviewer: Jforrester 
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/mediawiki-config[master]: Updating interwiki cache

2017-07-26 Thread Chad (Code Review)
Chad has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/368100 )

Change subject: Updating interwiki cache
..

Updating interwiki cache

Change-Id: I7d65cab4b62ccdf9204c0efb2f116a9039e79129
---
M wmf-config/interwiki.php
1 file changed, 4 insertions(+), 14 deletions(-)


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

diff --git a/wmf-config/interwiki.php b/wmf-config/interwiki.php
index 778f945..7a74c9d 100644
--- a/wmf-config/interwiki.php
+++ b/wmf-config/interwiki.php
@@ -1,5 +1,5 @@
  '0 https://www.acronymfinder.com/$1.html',
'__global:advisory' => '1 https://advisory.wikimedia.org/wiki/$1',
@@ -287,6 +287,7 @@
'__global:tmbw' => '0 http://tmbw.net/wiki/$1',
'__global:tmnet' => '0 http://www.technomanifestos.net/?$1',
'__global:tmwiki' => '0 http://www.EasyTopicMaps.com/?page=$1',
+   '__global:toolforge' => '0 https://tools.wmflabs.org/$1',
'__global:toollabs' => '0 https://tools.wmflabs.org/$1',
'__global:tools' => '0 //toolserver.org/$1',
'__global:tswiki' => '1 //www.mediawiki.org/wiki/Toolserver:$1',
@@ -10171,16 +10172,6 @@
'tenwiki:chapter' => '1 https://en.wikimedia.org/wiki/$1',
'tenwiki:v' => '1 https://en.wikiversity.org/wiki/$1',
'tenwiki:voy' => '1 https://en.wikivoyage.org/wiki/$1',
-   '__sites:techconductwiki' => 'wiki',
-   'techconductwiki:w' => '1 https://en.wikipedia.org/wiki/$1',
-   'techconductwiki:wikt' => '1 https://en.wiktionary.org/wiki/$1',
-   'techconductwiki:q' => '1 https://en.wikiquote.org/wiki/$1',
-   'techconductwiki:b' => '1 https://en.wikibooks.org/wiki/$1',
-   'techconductwiki:n' => '1 https://en.wikinews.org/wiki/$1',
-   'techconductwiki:s' => '1 https://en.wikisource.org/wiki/$1',
-   'techconductwiki:chapter' => '1 https://en.wikimedia.org/wiki/$1',
-   'techconductwiki:v' => '1 https://en.wikiversity.org/wiki/$1',
-   'techconductwiki:voy' => '1 https://en.wikivoyage.org/wiki/$1',
'__sites:test2wiki' => 'wiki',
'test2wiki:w' => '1 https://en.wikipedia.org/wiki/$1',
'test2wiki:wikt' => '1 https://en.wiktionary.org/wiki/$1',
@@ -11558,7 +11549,7 @@
'__global:meta' => '1 https://meta.wikimedia.org/wiki/$1',
'__global:sep11' => '1 https://sep11.wikipedia.org/wiki/$1',
'__global:d' => '1 https://www.wikidata.org/wiki/$1',
-   '__list:__global' => 'acronym advisory advogato aew appropedia 
aquariumwiki arborwiki arxiv atmwiki baden battlestarwiki bcnbio beacha 
betawiki bibcode bibliowiki bluwiki blw botwiki boxrec brickwiki bugzilla bulba 
c c2 c2find cache ĉej cellwiki centralwikia chej choralwiki citizendium ckwiss 
comixpedia commons communityscheme communitywiki comune creativecommons 
creativecommonswiki cxej dcc dcdatabase dcma delicious devmo dictionary dict 
disinfopedia distributedproofreaders distributedproofreadersca dmoz dmozs doi 
donate doom_wiki download dbdump dpd drae dreamhost drumcorpswiki dwjwiki eĉei 
ecoreality ecxei elibre emacswiki encyc energiewiki englyphwiki enkol 
eokulturcentro esolang etherpad ethnologue ethnologuefamily evowiki exotica 
fanimutationwiki fedora finalfantasy finnix flickruser flickrphoto floralwiki 
foldoc forthfreak foundation foxwiki freebio freebsdman freeculturewiki 
freedomdefined freefeel freekiwiki freenode freesoft ganfyd gardenology 
gausswiki gentoo genwiki gerrit git globalvoices glossarwiki glossarywiki 
google googledefine googlegroups guildwarswiki guildwiki gutenberg 
gutenbergwiki hackerspaces h2wiki hammondwiki hdl heroeswiki horizonlabs hrwiki 
hrfwiki hupwiki iarchive imdbname imdbtitle imdbcompany imdbcharacter incubator 
infosecpedia infosphere irc ircrc rcirc iso639-3 issn iuridictum jaglyphwiki 
javanet javapedia jefo jerseydatabase jira jspwiki jstor kamelo karlsruhe 
kinowiki kmwiki komicawiki kontuwiki koslarwiki wikitech libreplanet 
linguistlist linuxwiki linuxwikide liswiki literateprograms livepedia localwiki 
lojban lostpedia lqwiki luxo mail mailarchive mariowiki marveldatabase meatball 
mw mediazilla memoryalpha metawiki metawikimedia metawikipedia metawikisearch 
mineralienatlas moinmoin monstropedia mosapedia mozcom mozillawiki 
mozillazinekb musicbrainz mediawikiwiki mwod mwot nkcells nara nosmoke nost 
nostalgia oeis oldwikisource olpc onelook openlibrary openstreetmap openwetware 
openwiki opera7wiki organicdesign orthodoxwiki osmwiki otrs otrswiki ourmedia 
outreach outreachwiki owasp panawiki patwiki personaltelco petscan phab 
phabricator phwiki phpwiki planetmath pmeg pmid pokewiki pokéwiki policy 
proofwiki pyrev pythoninfo pythonwiki pywiki psycle quality quarry rev revo rfc 
rheinneckar robowiki rodovid reuterswiki rowiki rt rtfm s23wiki scholar 
schoolswp scores scoutwiki scramble seapig seattlewiki slwiki semantic-mw 
senseislibrary sharemap silcode slashdot 

[MediaWiki-commits] [Gerrit] operations/puppet[production]: labpuppetmaster: more hiera config

2017-07-26 Thread Andrew Bogott (Code Review)
Andrew Bogott has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/368099 )

Change subject: labpuppetmaster:  more hiera config
..

labpuppetmaster:  more hiera config

Change-Id: Ic13b9f41959ce1509c6e60ee0228fbf6c28501fb
---
M hieradata/role/common/labs/puppetmaster/backend.yaml
M hieradata/role/common/labs/puppetmaster/frontend.yaml
2 files changed, 4 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/99/368099/1

diff --git a/hieradata/role/common/labs/puppetmaster/backend.yaml 
b/hieradata/role/common/labs/puppetmaster/backend.yaml
index 22b6980..0a5867d 100644
--- a/hieradata/role/common/labs/puppetmaster/backend.yaml
+++ b/hieradata/role/common/labs/puppetmaster/backend.yaml
@@ -8,6 +8,8 @@
 profile::puppetmaster::backend::secure_private: false
 
 profile::conftool::master::sync_dir: "/etc/conftool/data"
+profile::discovery::path: "/srv/config-master/discovery"
+profile::discovery::watch_interval: 60
 
 profile::puppetmaster::frontend::web_hostname: labs-puppetmaster.wikimedia.org
 profile::puppetmaster::common::storeconfigs: none
diff --git a/hieradata/role/common/labs/puppetmaster/frontend.yaml 
b/hieradata/role/common/labs/puppetmaster/frontend.yaml
index 22b6980..0a5867d 100644
--- a/hieradata/role/common/labs/puppetmaster/frontend.yaml
+++ b/hieradata/role/common/labs/puppetmaster/frontend.yaml
@@ -8,6 +8,8 @@
 profile::puppetmaster::backend::secure_private: false
 
 profile::conftool::master::sync_dir: "/etc/conftool/data"
+profile::discovery::path: "/srv/config-master/discovery"
+profile::discovery::watch_interval: 60
 
 profile::puppetmaster::frontend::web_hostname: labs-puppetmaster.wikimedia.org
 profile::puppetmaster::common::storeconfigs: none

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic13b9f41959ce1509c6e60ee0228fbf6c28501fb
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Andrew Bogott 

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


[MediaWiki-commits] [Gerrit] mediawiki...CentralAuth[master]: build: Updating mediawiki/mediawiki-codesniffer to 0.10.1

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

Change subject: build: Updating mediawiki/mediawiki-codesniffer to 0.10.1
..


build: Updating mediawiki/mediawiki-codesniffer to 0.10.1

Change-Id: I36ab81e99ef5d3e01ffa045d47d95cc9c4ab50f6
---
M composer.json
M includes/CentralAuthUser.php
M includes/CentralAuthUtils.php
M phpcs.xml
4 files changed, 11 insertions(+), 13 deletions(-)

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



diff --git a/composer.json b/composer.json
index 4f55859..bf202bf 100644
--- a/composer.json
+++ b/composer.json
@@ -2,7 +2,7 @@
"require-dev": {
"jakub-onderka/php-parallel-lint": "0.9.2",
"jakub-onderka/php-console-highlighter": "0.3.2",
-   "mediawiki/mediawiki-codesniffer": "0.10.0"
+   "mediawiki/mediawiki-codesniffer": "0.10.1"
},
"scripts": {
"fix": "phpcbf",
diff --git a/includes/CentralAuthUser.php b/includes/CentralAuthUser.php
index a09380b..d752899 100644
--- a/includes/CentralAuthUser.php
+++ b/includes/CentralAuthUser.php
@@ -279,7 +279,7 @@
);
 
if ( $name !== false ) {
-   return CentralAuthUser::getInstanceByName( $name );
+   return self::getInstanceByName( $name );
} else {
return false;
}
@@ -300,7 +300,7 @@
);
 
if ( $name !== false ) {
-   return CentralAuthUser::getMasterInstanceByName( $name 
);
+   return self::getMasterInstanceByName( $name );
} else {
return false;
}
diff --git a/includes/CentralAuthUtils.php b/includes/CentralAuthUtils.php
index 57bc6d1..b4d8100 100644
--- a/includes/CentralAuthUtils.php
+++ b/includes/CentralAuthUtils.php
@@ -178,9 +178,9 @@
 * @return array
 */
public static function getCentralSessionById( $id ) {
-   $key = CentralAuthUtils::memcKey( 'session', $id );
+   $key = self::memcKey( 'session', $id );
$stime = microtime( true );
-   $data = CentralAuthUtils::getSessionCache()->get( $key ) ?: [];
+   $data = self::getSessionCache()->get( $key ) ?: [];
$real = microtime( true ) - $stime;
MediaWikiServices::getInstance()
->getStatsdDataFactory()->timing( 
'centralauth.session.read', $real );
@@ -206,10 +206,10 @@
$id = is_string( $reset ) ? $reset : 
MWCryptRand::generateHex( 32 );
}
$data['sessionId'] = $id;
-   $key = CentralAuthUtils::memcKey( 'session', $id );
+   $key = self::memcKey( 'session', $id );
 
// Copy certain keys from the existing session, if any (T124821)
-   $existing = CentralAuthUtils::getSessionCache()->get( $key );
+   $existing = self::getSessionCache()->get( $key );
if ( is_array( $existing ) ) {
$data += array_intersect_key( $existing, $keepKeys );
}
@@ -217,7 +217,7 @@
if ( $data !== $existing || !isset( $data['expiry'] ) || 
$data['expiry'] < time() + 32100 ) {
$data['expiry'] = time() + 86400;
$stime = microtime( true );
-   CentralAuthUtils::getSessionCache()->set( $key, $data, 
86400 );
+   self::getSessionCache()->set( $key, $data, 86400 );
$real = microtime( true ) - $stime;
MediaWikiServices::getInstance()
->getStatsdDataFactory()->timing( 
'centralauth.session.write', $real );
@@ -241,9 +241,9 @@
$id = $session->get( 'CentralAuth::centralSessionId' );
 
if ( $id !== null ) {
-   $key = CentralAuthUtils::memcKey( 'session', $id );
+   $key = self::memcKey( 'session', $id );
$stime = microtime( true );
-   CentralAuthUtils::getSessionCache()->delete( $key );
+   self::getSessionCache()->delete( $key );
$real = microtime( true ) - $stime;
MediaWikiServices::getInstance()
->getStatsdDataFactory()->timing( 
"centralauth.session.delete", $real );
diff --git a/phpcs.xml b/phpcs.xml
index 25af500..457f48b 100644
--- a/phpcs.xml
+++ b/phpcs.xml
@@ -6,7 +6,7 @@



-   CentralAuth.*alias.php
+   CentralAuth\.*alias\.php



@@ -16,6 +16,4 @@
.


-   vendor
-   node_modules
 

-- 
To 

[MediaWiki-commits] [Gerrit] mediawiki...WikiEditor[master]: build: Updating mediawiki/mediawiki-codesniffer to 0.10.1

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

Change subject: build: Updating mediawiki/mediawiki-codesniffer to 0.10.1
..


build: Updating mediawiki/mediawiki-codesniffer to 0.10.1

Change-Id: I66b497f2afbb966465d084bf6d0a8e5e26917d57
---
M WikiEditor.hooks.php
M composer.json
M phpcs.xml
3 files changed, 5 insertions(+), 6 deletions(-)

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



diff --git a/WikiEditor.hooks.php b/WikiEditor.hooks.php
index 084584d..3feb713 100644
--- a/WikiEditor.hooks.php
+++ b/WikiEditor.hooks.php
@@ -298,7 +298,7 @@
 */
public static function resourceLoaderGetConfigVars( &$vars ) {
// expose magic words for use by the wikieditor toolbar
-   WikiEditorHooks::getMagicWords( $vars );
+   self::getMagicWords( $vars );
 
$vars['mw.msg.wikieditor'] = wfMessage( 'sig-text', '' 
)->inContentLanguage()->text();
 
@@ -382,7 +382,7 @@
 *
 * @param EditPage $editPage
 * @param Status $status
-* @return boolean
+* @return bool
 */
public static function editPageAttemptSave( EditPage $editPage ) {
$article = $editPage->getArticle();
@@ -403,7 +403,7 @@
 *
 * @param EditPage $editPage
 * @param Status $status
-* @return boolean
+* @return bool
 */
public static function editPageAttemptSaveAfter( EditPage $editPage, 
Status $status ) {
$article = $editPage->getArticle();
diff --git a/composer.json b/composer.json
index a8fa313..8e34fa5 100644
--- a/composer.json
+++ b/composer.json
@@ -2,7 +2,7 @@
"license": "GPL-2.0+",
"require-dev": {
"jakub-onderka/php-parallel-lint": "0.9.2",
-   "mediawiki/mediawiki-codesniffer": "0.10.0",
+   "mediawiki/mediawiki-codesniffer": "0.10.1",
"jakub-onderka/php-console-highlighter": "0.3.2"
},
"scripts": {
diff --git a/phpcs.xml b/phpcs.xml
index c59bea4..cb559ef 100644
--- a/phpcs.xml
+++ b/phpcs.xml
@@ -11,6 +11,5 @@

.

-   
-   vendor
+   
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I66b497f2afbb966465d084bf6d0a8e5e26917d57
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikiEditor
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: TheDJ 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...BounceHandler[master]: build: Updating mediawiki/mediawiki-codesniffer to 0.10.1

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

Change subject: build: Updating mediawiki/mediawiki-codesniffer to 0.10.1
..


build: Updating mediawiki/mediawiki-codesniffer to 0.10.1

Change-Id: I6fe747ee1b2b778b7df188f97e226742bb0bcec1
---
M BounceHandlerHooks.php
M composer.json
M phpcs.xml
3 files changed, 2 insertions(+), 4 deletions(-)

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



diff --git a/BounceHandlerHooks.php b/BounceHandlerHooks.php
index 5ccc1f2..1ea01b6 100644
--- a/BounceHandlerHooks.php
+++ b/BounceHandlerHooks.php
@@ -68,7 +68,7 @@
 *
 * @param array &$files
 *
-* @return boolean
+* @return bool
 */
public static function registerUnitTests( array &$files ) {
// @codeCoverageIgnoreStart
diff --git a/composer.json b/composer.json
index 4f55859..bf202bf 100644
--- a/composer.json
+++ b/composer.json
@@ -2,7 +2,7 @@
"require-dev": {
"jakub-onderka/php-parallel-lint": "0.9.2",
"jakub-onderka/php-console-highlighter": "0.3.2",
-   "mediawiki/mediawiki-codesniffer": "0.10.0"
+   "mediawiki/mediawiki-codesniffer": "0.10.1"
},
"scripts": {
"fix": "phpcbf",
diff --git a/phpcs.xml b/phpcs.xml
index 2a192d9..79abcb0 100644
--- a/phpcs.xml
+++ b/phpcs.xml
@@ -13,6 +13,4 @@
.


-   vendor
-   node_modules
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6fe747ee1b2b778b7df188f97e226742bb0bcec1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BounceHandler
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 
Gerrit-Reviewer: Jforrester 
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]: labtestpuppetmaster: add lots of hiera defs

2017-07-26 Thread Andrew Bogott (Code Review)
Andrew Bogott has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/368097 )

Change subject: labtestpuppetmaster:  add lots of hiera defs
..


labtestpuppetmaster:  add lots of hiera defs

Change-Id: I50d583acfc2f5c8b0c36c35d9c31818d89481ff7
---
M hieradata/role/common/labs/puppetmaster/backend.yaml
M hieradata/role/common/labs/puppetmaster/frontend.yaml
2 files changed, 40 insertions(+), 2 deletions(-)

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



diff --git a/hieradata/role/common/labs/puppetmaster/backend.yaml 
b/hieradata/role/common/labs/puppetmaster/backend.yaml
index cbb7833..22b6980 100644
--- a/hieradata/role/common/labs/puppetmaster/backend.yaml
+++ b/hieradata/role/common/labs/puppetmaster/backend.yaml
@@ -6,3 +6,24 @@
   autosign: true
 
 profile::puppetmaster::backend::secure_private: false
+
+profile::conftool::master::sync_dir: "/etc/conftool/data"
+
+profile::puppetmaster::frontend::web_hostname: labs-puppetmaster.wikimedia.org
+profile::puppetmaster::common::storeconfigs: none
+
+profile::puppetmaster::labsencapi::mysql_host: m5-master
+profile::puppetmaster::labsencapi::mysql_db:   labspuppet
+profile::puppetmaster::labsencapi::mysql_username: labspuppet
+profile::puppetmaster::labsencapi::statsd_host: labmon1001.eqiad.wmnet
+profile::puppetmaster::labsencapi::statsd_prefix: labs.puppetbackend
+
+puppetmaster::servers:
+  labpuppetmaster1001.wikimedia.org:
+- { worker: labpuppetmaster1001.wikimedia.org, loadfactor: 10 }
+- { worker: labpuppetmaster1002.wikimedia.org, loadfactor: 20 }
+puppetmaster::ca_server: labs-puppetmaster.wikimedia.org
+
+labs_puppet_master: labs-puppetmaster.wikimedia.org
+
+puppetmaster::hiera_config: labs
diff --git a/hieradata/role/common/labs/puppetmaster/frontend.yaml 
b/hieradata/role/common/labs/puppetmaster/frontend.yaml
index dc9e9fd..22b6980 100644
--- a/hieradata/role/common/labs/puppetmaster/frontend.yaml
+++ b/hieradata/role/common/labs/puppetmaster/frontend.yaml
@@ -8,5 +8,22 @@
 profile::puppetmaster::backend::secure_private: false
 
 profile::conftool::master::sync_dir: "/etc/conftool/data"
-profile::discovery::path: "/srv/config-master/discovery"
-profile::discovery::watch_interval: 60
+
+profile::puppetmaster::frontend::web_hostname: labs-puppetmaster.wikimedia.org
+profile::puppetmaster::common::storeconfigs: none
+
+profile::puppetmaster::labsencapi::mysql_host: m5-master
+profile::puppetmaster::labsencapi::mysql_db:   labspuppet
+profile::puppetmaster::labsencapi::mysql_username: labspuppet
+profile::puppetmaster::labsencapi::statsd_host: labmon1001.eqiad.wmnet
+profile::puppetmaster::labsencapi::statsd_prefix: labs.puppetbackend
+
+puppetmaster::servers:
+  labpuppetmaster1001.wikimedia.org:
+- { worker: labpuppetmaster1001.wikimedia.org, loadfactor: 10 }
+- { worker: labpuppetmaster1002.wikimedia.org, loadfactor: 20 }
+puppetmaster::ca_server: labs-puppetmaster.wikimedia.org
+
+labs_puppet_master: labs-puppetmaster.wikimedia.org
+
+puppetmaster::hiera_config: labs

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...UniversalLanguageSelector[master]: build: Updating mediawiki/mediawiki-codesniffer to 0.10.1

2017-07-26 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/368098 )

Change subject: build: Updating mediawiki/mediawiki-codesniffer to 0.10.1
..

build: Updating mediawiki/mediawiki-codesniffer to 0.10.1

Change-Id: Ib7a361cf2973bf0bba0fb8944762216f44c226a8
---
M UniversalLanguageSelector.hooks.php
M composer.json
M data/LanguageNameSearch.php
M phpcs.xml
4 files changed, 4 insertions(+), 5 deletions(-)


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

diff --git a/UniversalLanguageSelector.hooks.php 
b/UniversalLanguageSelector.hooks.php
index b2015b6..74fcc09 100644
--- a/UniversalLanguageSelector.hooks.php
+++ b/UniversalLanguageSelector.hooks.php
@@ -479,7 +479,7 @@
 * Conditionally register module ext.uls.eventlogger.
 *
 * @param ResourceLoader $resourceLoader
-* @return boolean true
+* @return bool true
 */
public static function onResourceLoaderRegisterModules( ResourceLoader 
$resourceLoader ) {
global $wgULSEventLogging, $wgVersion;
diff --git a/composer.json b/composer.json
index 167f74b..b27e988 100644
--- a/composer.json
+++ b/composer.json
@@ -26,7 +26,7 @@
},
"require-dev": {
"jakub-onderka/php-parallel-lint": "0.9.2",
-   "mediawiki/mediawiki-codesniffer": "0.10.0",
+   "mediawiki/mediawiki-codesniffer": "0.10.1",
"jakub-onderka/php-console-highlighter": "0.3.2"
},
"scripts": {
diff --git a/data/LanguageNameSearch.php b/data/LanguageNameSearch.php
index 102394b..de62134 100644
--- a/data/LanguageNameSearch.php
+++ b/data/LanguageNameSearch.php
@@ -61,7 +61,7 @@
 * Get the code point of first letter of string
 *
 * @param $str string
-* @return integer Code point of first letter of string
+* @return int Code point of first letter of string
 */
public static function getCodepoint( $str ) {
$values = [];
@@ -106,7 +106,7 @@
 * Calculate the Levenshtein distance between two strings
 * @param $str1
 * @param $str2
-* @return integer
+* @return int
 */
public static function levenshteinDistance( $str1, $str2 ) {
$length1 = mb_strlen( $str1, 'UTF-8' );
diff --git a/phpcs.xml b/phpcs.xml
index 8c9ec83..04c0857 100644
--- a/phpcs.xml
+++ b/phpcs.xml
@@ -12,5 +12,4 @@
.


-   vendor
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib7a361cf2973bf0bba0fb8944762216f44c226a8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: labtestpuppetmaster: add lots of hiera defs

2017-07-26 Thread Andrew Bogott (Code Review)
Andrew Bogott has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/368097 )

Change subject: labtestpuppetmaster:  add lots of hiera defs
..

labtestpuppetmaster:  add lots of hiera defs

Change-Id: I50d583acfc2f5c8b0c36c35d9c31818d89481ff7
---
M hieradata/role/common/labs/puppetmaster/backend.yaml
M hieradata/role/common/labs/puppetmaster/frontend.yaml
2 files changed, 40 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/97/368097/1

diff --git a/hieradata/role/common/labs/puppetmaster/backend.yaml 
b/hieradata/role/common/labs/puppetmaster/backend.yaml
index cbb7833..22b6980 100644
--- a/hieradata/role/common/labs/puppetmaster/backend.yaml
+++ b/hieradata/role/common/labs/puppetmaster/backend.yaml
@@ -6,3 +6,24 @@
   autosign: true
 
 profile::puppetmaster::backend::secure_private: false
+
+profile::conftool::master::sync_dir: "/etc/conftool/data"
+
+profile::puppetmaster::frontend::web_hostname: labs-puppetmaster.wikimedia.org
+profile::puppetmaster::common::storeconfigs: none
+
+profile::puppetmaster::labsencapi::mysql_host: m5-master
+profile::puppetmaster::labsencapi::mysql_db:   labspuppet
+profile::puppetmaster::labsencapi::mysql_username: labspuppet
+profile::puppetmaster::labsencapi::statsd_host: labmon1001.eqiad.wmnet
+profile::puppetmaster::labsencapi::statsd_prefix: labs.puppetbackend
+
+puppetmaster::servers:
+  labpuppetmaster1001.wikimedia.org:
+- { worker: labpuppetmaster1001.wikimedia.org, loadfactor: 10 }
+- { worker: labpuppetmaster1002.wikimedia.org, loadfactor: 20 }
+puppetmaster::ca_server: labs-puppetmaster.wikimedia.org
+
+labs_puppet_master: labs-puppetmaster.wikimedia.org
+
+puppetmaster::hiera_config: labs
diff --git a/hieradata/role/common/labs/puppetmaster/frontend.yaml 
b/hieradata/role/common/labs/puppetmaster/frontend.yaml
index dc9e9fd..22b6980 100644
--- a/hieradata/role/common/labs/puppetmaster/frontend.yaml
+++ b/hieradata/role/common/labs/puppetmaster/frontend.yaml
@@ -8,5 +8,22 @@
 profile::puppetmaster::backend::secure_private: false
 
 profile::conftool::master::sync_dir: "/etc/conftool/data"
-profile::discovery::path: "/srv/config-master/discovery"
-profile::discovery::watch_interval: 60
+
+profile::puppetmaster::frontend::web_hostname: labs-puppetmaster.wikimedia.org
+profile::puppetmaster::common::storeconfigs: none
+
+profile::puppetmaster::labsencapi::mysql_host: m5-master
+profile::puppetmaster::labsencapi::mysql_db:   labspuppet
+profile::puppetmaster::labsencapi::mysql_username: labspuppet
+profile::puppetmaster::labsencapi::statsd_host: labmon1001.eqiad.wmnet
+profile::puppetmaster::labsencapi::statsd_prefix: labs.puppetbackend
+
+puppetmaster::servers:
+  labpuppetmaster1001.wikimedia.org:
+- { worker: labpuppetmaster1001.wikimedia.org, loadfactor: 10 }
+- { worker: labpuppetmaster1002.wikimedia.org, loadfactor: 20 }
+puppetmaster::ca_server: labs-puppetmaster.wikimedia.org
+
+labs_puppet_master: labs-puppetmaster.wikimedia.org
+
+puppetmaster::hiera_config: labs

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I50d583acfc2f5c8b0c36c35d9c31818d89481ff7
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Andrew Bogott 

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


[MediaWiki-commits] [Gerrit] mediawiki...UploadWizard[master]: build: Updating mediawiki/mediawiki-codesniffer to 0.10.1

2017-07-26 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/368096 )

Change subject: build: Updating mediawiki/mediawiki-codesniffer to 0.10.1
..

build: Updating mediawiki/mediawiki-codesniffer to 0.10.1

Change-Id: I835d4d0c8ab7bab02e60072e334c73a865e2d1ef
---
M composer.json
M includes/UploadWizardCampaign.php
M includes/UploadWizardConfig.php
M phpcs.xml
4 files changed, 4 insertions(+), 5 deletions(-)


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

diff --git a/composer.json b/composer.json
index 1366381..55507be 100644
--- a/composer.json
+++ b/composer.json
@@ -1,7 +1,7 @@
 {
"require-dev": {
"jakub-onderka/php-parallel-lint": "0.9.2",
-   "mediawiki/mediawiki-codesniffer": "0.10.0",
+   "mediawiki/mediawiki-codesniffer": "0.10.1",
"jakub-onderka/php-console-highlighter": "0.3.2"
},
"scripts": {
diff --git a/includes/UploadWizardCampaign.php 
b/includes/UploadWizardCampaign.php
index 7b3e0e5..d9e69b3 100644
--- a/includes/UploadWizardCampaign.php
+++ b/includes/UploadWizardCampaign.php
@@ -93,7 +93,7 @@
 *
 * @since 1.4
 *
-* @return boolean
+* @return bool
 */
public function getIsEnabled() {
return $this->config['enabled'];
diff --git a/includes/UploadWizardConfig.php b/includes/UploadWizardConfig.php
index bf58ce9..2278685 100644
--- a/includes/UploadWizardConfig.php
+++ b/includes/UploadWizardConfig.php
@@ -79,7 +79,7 @@
static $mergedConfig = false;
 
if ( !$mergedConfig ) {
-   $wgUploadWizardConfig = 
UploadWizardConfig::array_replace_sanely(
+   $wgUploadWizardConfig = self::array_replace_sanely(
self::getDefaultConfig(),
$wgUploadWizardConfig
);
@@ -87,7 +87,7 @@
}
 
if ( !is_null( $campaignName ) ) {
-   $wgUploadWizardConfig = 
UploadWizardConfig::array_replace_sanely(
+   $wgUploadWizardConfig = self::array_replace_sanely(
$wgUploadWizardConfig,
self::getCampaignConfig( $campaignName )
);
diff --git a/phpcs.xml b/phpcs.xml
index f7eee52..69ff6a9 100644
--- a/phpcs.xml
+++ b/phpcs.xml
@@ -15,5 +15,4 @@
.


-   vendor
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I835d4d0c8ab7bab02e60072e334c73a865e2d1ef
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UploadWizard
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 

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


[MediaWiki-commits] [Gerrit] mediawiki...WikiEditor[master]: build: Updating mediawiki/mediawiki-codesniffer to 0.10.1

2017-07-26 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/368095 )

Change subject: build: Updating mediawiki/mediawiki-codesniffer to 0.10.1
..

build: Updating mediawiki/mediawiki-codesniffer to 0.10.1

Change-Id: I66b497f2afbb966465d084bf6d0a8e5e26917d57
---
M WikiEditor.hooks.php
M composer.json
M phpcs.xml
3 files changed, 5 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikiEditor 
refs/changes/95/368095/1

diff --git a/WikiEditor.hooks.php b/WikiEditor.hooks.php
index 084584d..3feb713 100644
--- a/WikiEditor.hooks.php
+++ b/WikiEditor.hooks.php
@@ -298,7 +298,7 @@
 */
public static function resourceLoaderGetConfigVars( &$vars ) {
// expose magic words for use by the wikieditor toolbar
-   WikiEditorHooks::getMagicWords( $vars );
+   self::getMagicWords( $vars );
 
$vars['mw.msg.wikieditor'] = wfMessage( 'sig-text', '' 
)->inContentLanguage()->text();
 
@@ -382,7 +382,7 @@
 *
 * @param EditPage $editPage
 * @param Status $status
-* @return boolean
+* @return bool
 */
public static function editPageAttemptSave( EditPage $editPage ) {
$article = $editPage->getArticle();
@@ -403,7 +403,7 @@
 *
 * @param EditPage $editPage
 * @param Status $status
-* @return boolean
+* @return bool
 */
public static function editPageAttemptSaveAfter( EditPage $editPage, 
Status $status ) {
$article = $editPage->getArticle();
diff --git a/composer.json b/composer.json
index a8fa313..8e34fa5 100644
--- a/composer.json
+++ b/composer.json
@@ -2,7 +2,7 @@
"license": "GPL-2.0+",
"require-dev": {
"jakub-onderka/php-parallel-lint": "0.9.2",
-   "mediawiki/mediawiki-codesniffer": "0.10.0",
+   "mediawiki/mediawiki-codesniffer": "0.10.1",
"jakub-onderka/php-console-highlighter": "0.3.2"
},
"scripts": {
diff --git a/phpcs.xml b/phpcs.xml
index c59bea4..cb559ef 100644
--- a/phpcs.xml
+++ b/phpcs.xml
@@ -11,6 +11,5 @@

.

-   
-   vendor
+   
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I66b497f2afbb966465d084bf6d0a8e5e26917d57
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikiEditor
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 

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


[MediaWiki-commits] [Gerrit] mediawiki...Translate[master]: build: Updating mediawiki/mediawiki-codesniffer to 0.10.1

2017-07-26 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/368094 )

Change subject: build: Updating mediawiki/mediawiki-codesniffer to 0.10.1
..

build: Updating mediawiki/mediawiki-codesniffer to 0.10.1

Change-Id: I53168243c173ee2ed1e05eaf2371eba54d67a1d8
---
M TranslateUtils.php
M composer.json
M ffs/AmdFFS.php
M messagegroups/RecentAdditionsMessageGroup.php
M messagegroups/RecentMessageGroup.php
M phpcs.xml
M tag/TranslatablePage.php
M translationaids/SupportAid.php
M ttmserver/ElasticSearchTTMServer.php
M utils/TranslateSandbox.php
10 files changed, 12 insertions(+), 14 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Translate 
refs/changes/94/368094/1

diff --git a/TranslateUtils.php b/TranslateUtils.php
index 6ea3fb8..c6d26ab 100644
--- a/TranslateUtils.php
+++ b/TranslateUtils.php
@@ -148,7 +148,7 @@
 * @return string Best-effort localisation of wanted language name.
 */
public static function getLanguageName( $code, $language = 'en' ) {
-   $languages = TranslateUtils::getLanguageNames( $language );
+   $languages = self::getLanguageNames( $language );
 
if ( isset( $languages[$code] ) ) {
return $languages[$code];
diff --git a/composer.json b/composer.json
index 4791fb9..321c775 100644
--- a/composer.json
+++ b/composer.json
@@ -41,7 +41,7 @@
},
"require-dev": {
"jakub-onderka/php-parallel-lint": "0.9.2",
-   "mediawiki/mediawiki-codesniffer": "0.10.0",
+   "mediawiki/mediawiki-codesniffer": "0.10.1",
"jakub-onderka/php-console-highlighter": "0.3.2"
},
"suggest": {
diff --git a/ffs/AmdFFS.php b/ffs/AmdFFS.php
index 41f739c..c082dac 100644
--- a/ffs/AmdFFS.php
+++ b/ffs/AmdFFS.php
@@ -51,7 +51,7 @@
 * @return bool
 */
public static function isValid( $data ) {
-   $data = AmdFFS::extractMessagePart( $data );
+   $data = self::extractMessagePart( $data );
return is_array( FormatJson::decode( $data, /*as array*/true ) 
);
}
 
@@ -64,8 +64,8 @@
 * @return array Parsed data.
 */
public function readFromVariable( $data ) {
-   $authors = AmdFFS::extractAuthors( $data );
-   $data = AmdFFS::extractMessagePart( $data );
+   $authors = self::extractAuthors( $data );
+   $data = self::extractMessagePart( $data );
$messages = (array)FormatJson::decode( $data, /*as array*/true 
);
$metadata = [];
 
diff --git a/messagegroups/RecentAdditionsMessageGroup.php 
b/messagegroups/RecentAdditionsMessageGroup.php
index 0dbee87..f4bbd3b 100644
--- a/messagegroups/RecentAdditionsMessageGroup.php
+++ b/messagegroups/RecentAdditionsMessageGroup.php
@@ -52,7 +52,7 @@
 * as they are not displayed in other places.
 *
 * @param MessageHandle $handle
-* @return boolean
+* @return bool
 */
protected function matchingMessage( MessageHandle $handle ) {
return MessageGroups::isTranslatableMessage( $handle );
diff --git a/messagegroups/RecentMessageGroup.php 
b/messagegroups/RecentMessageGroup.php
index a87cb87..09c192d 100644
--- a/messagegroups/RecentMessageGroup.php
+++ b/messagegroups/RecentMessageGroup.php
@@ -79,7 +79,7 @@
 * Allows subclasses to filter out more unwanted messages.
 *
 * @param MessageHandle $msg
-* @return boolean
+* @return bool
 */
protected function matchingMessage( MessageHandle $msg ) {
return true;
diff --git a/phpcs.xml b/phpcs.xml
index a308716..673182e 100644
--- a/phpcs.xml
+++ b/phpcs.xml
@@ -15,12 +15,10 @@



-   Translate.alias.php
+   Translate\.alias\.php

.


^extensions
-   ^vendor
-   ^node_modules
 
diff --git a/tag/TranslatablePage.php b/tag/TranslatablePage.php
index 4e2c28a..bfbb914 100644
--- a/tag/TranslatablePage.php
+++ b/tag/TranslatablePage.php
@@ -845,7 +845,7 @@
return false;
}
 
-   $page = TranslatablePage::newFromTitle( $newtitle );
+   $page = self::newFromTitle( $newtitle );
 
if ( $page->getMarkedTag() === false ) {
return false;
diff --git a/translationaids/SupportAid.php b/translationaids/SupportAid.php
index 71f01f9..6d94fea 100644
--- a/translationaids/SupportAid.php
+++ b/translationaids/SupportAid.php
@@ -17,7 +17,7 @@
 class SupportAid extends TranslationAid {
public function getData() {
return [
-   'url' => SupportAid::getSupportUrl( 
$this->handle->getTitle() ),
+   'url' => 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: [WIP] Failing DatabaseTest::testTransactionPreCommitOrIdle_TRX

2017-07-26 Thread Krinkle (Code Review)
Krinkle has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/368093 )

Change subject: [WIP] Failing DatabaseTest::testTransactionPreCommitOrIdle_TRX
..

[WIP] Failing DatabaseTest::testTransactionPreCommitOrIdle_TRX

Change-Id: Icb9dfe8a7384150ddb5a92f7c0637170138ef039
---
M tests/phpunit/includes/libs/rdbms/database/DatabaseTest.php
1 file changed, 62 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/93/368093/1

diff --git a/tests/phpunit/includes/libs/rdbms/database/DatabaseTest.php 
b/tests/phpunit/includes/libs/rdbms/database/DatabaseTest.php
index 9bea7ff..94983c0 100644
--- a/tests/phpunit/includes/libs/rdbms/database/DatabaseTest.php
+++ b/tests/phpunit/includes/libs/rdbms/database/DatabaseTest.php
@@ -1,6 +1,7 @@
 getMockDB( [ 'isOpen' ] );
+   $db->method( 'isOpen' )->willReturn( true );
+   $db->clearFlag( DBO_TRX );
+
+   $this->assertFalse( $db->getFlag( DBO_TRX ), 'DBO_TRX is not 
set' );
+
+   $called = false;
+   $db->onTransactionPreCommitOrIdle(
+   function () use ( &$called ) {
+   $called = true;
+   },
+   __METHOD__
+   );
+   $this->assertTrue( $called, 'Called when idle' );
+
+   $db->begin( __METHOD__ );
+   $called = false;
+   $db->onTransactionPreCommitOrIdle(
+   function () use ( &$called ) {
+   $called = true;
+   },
+   __METHOD__
+   );
+   $this->assertFalse( $called, 'Not called when transaction is 
active' );
+   $db->commit( __METHOD__ );
+   $this->assertTrue( $called, 'Called when transaction is 
committed' );
+   }
+
+   /**
+* @covers Wikimedia\Rdbms\Database::onTransactionPreCommitOrIdle
+* @covers Wikimedia\Rdbms\Database::runOnTransactionPreCommitCallbacks
+*/
+   public function testTransactionPreCommitOrIdle_TRX() {
+   $db = $this->getMockDB( [ 'isOpen' ] );
+   $db->method( 'isOpen' )->willReturn( true );
+   $db->setFlag( DBO_TRX );
+
+   $lbFactory = LBFactorySingle::newFromConnection( $db );
+
+   $this->assertTrue( $db->getFlag( DBO_TRX ), 'DBO_TRX was set' );
+
+   $called = false;
+   $db->onTransactionPreCommitOrIdle(
+   function () use ( &$called ) {
+   $called = true;
+   }
+   );
+   $this->assertFalse( $called, 'Not called when idle if DBO_TRX 
is set' );
+
+   $lbFactory->beginMasterChanges( __METHOD__ );
+   $this->assertFalse( $called, 'Not called when lb-transaction is 
active' );
+
+   $lbFactory->commitMasterChanges( __METHOD__ );
+   $this->assertTrue( $called, 'Called when lb-transaction is 
committed' );
+   }
+
+   /**
 * @covers Wikimedia\Rdbms\Database::onTransactionResolution
 * @covers Wikimedia\Rdbms\Database::runOnTransactionIdleCallbacks
 */

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Icb9dfe8a7384150ddb5a92f7c0637170138ef039
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] operations/puppet[production]: add puppetmaster roles to labpuppetmaster1001 and 2

2017-07-26 Thread Andrew Bogott (Code Review)
Andrew Bogott has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/368090 )

Change subject: add puppetmaster roles to labpuppetmaster1001 and 2
..


add puppetmaster roles to labpuppetmaster1001 and 2

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

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



diff --git a/manifests/site.pp b/manifests/site.pp
index a6bb769..799ca82 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -966,9 +966,16 @@
 }
 
 
-node /labpuppetmaster100[12]\.wikimedia\.org/ {
+node 'labpuppetmaster1001.wikimedia.org' {
+role(labs::puppetmaster::frontend)
 include ::standard
-include ::base::firewall
+interface::add_ip6_mapped { 'main': }
+}
+
+node 'labpuppetmaster1002.wikimedia.org' {
+role(labs::puppetmaster::backend)
+include ::standard
+interface::add_ip6_mapped { 'main': }
 }
 
 # labservices1001 hosts openstack-designate, the labs DNS service.

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4f500b6499bb2a913f65f016a5d8ed7f44eec392
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Andrew Bogott 
Gerrit-Reviewer: Andrew Bogott 
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...TimedMediaHandler[master]: build: Updating mediawiki/mediawiki-codesniffer to 0.10.1

2017-07-26 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/368092 )

Change subject: build: Updating mediawiki/mediawiki-codesniffer to 0.10.1
..

build: Updating mediawiki/mediawiki-codesniffer to 0.10.1

Change-Id: I2bf16959dde2b51e8acabe2c9c7b9238c8a4bb4a
---
M TimedMediaHandler.hooks.php
M TimedMediaTransformOutput.php
M WebVideoTranscode/WebVideoTranscode.php
M composer.json
M phpcs.xml
5 files changed, 47 insertions(+), 48 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TimedMediaHandler 
refs/changes/92/368092/1

diff --git a/TimedMediaHandler.hooks.php b/TimedMediaHandler.hooks.php
index 3f2029a..eae75c6 100644
--- a/TimedMediaHandler.hooks.php
+++ b/TimedMediaHandler.hooks.php
@@ -398,7 +398,7 @@
 */
public static function onImageOpenShowImageInlineBefore( &$imagePage, 
&$out ) {
$file = $imagePage->getDisplayedFile();
-   return TimedMediaHandlerHooks::onImagePageHooks( $file, $out );
+   return self::onImagePageHooks( $file, $out );
}
 
/**
@@ -410,7 +410,7 @@
 */
public static function onImagePageFileHistoryLine( $imagePage, $file, 
&$line, &$css ) {
$out = $imagePage->getContext()->getOutput();
-   return TimedMediaHandlerHooks::onImagePageHooks( $file, $out );
+   return self::onImagePageHooks( $file, $out );
}
 
/**
diff --git a/TimedMediaTransformOutput.php b/TimedMediaTransformOutput.php
index c45c640..02d296a 100644
--- a/TimedMediaTransformOutput.php
+++ b/TimedMediaTransformOutput.php
@@ -187,8 +187,8 @@
function getImagePopUp() {
// pop up videos set the autoplay attribute to true:
$autoPlay = true;
-   $id = TimedMediaTransformOutput::$serial;
-   TimedMediaTransformOutput::$serial++;
+   $id = self::$serial;
+   self::$serial++;
 
return Xml::tags( 'div', [
'id' => self::PLAYER_ID_PREFIX . $id,
@@ -416,8 +416,8 @@
$height .= 'px';
}
 
-   $id = TimedMediaTransformOutput::$serial;
-   TimedMediaTransformOutput::$serial++;
+   $id = self::$serial;
+   self::$serial++;
$mediaAttr = [
'id' => self::PLAYER_ID_PREFIX . $id,
// Get the correct size:
diff --git a/WebVideoTranscode/WebVideoTranscode.php 
b/WebVideoTranscode/WebVideoTranscode.php
index 0b12403..253fdc2 100644
--- a/WebVideoTranscode/WebVideoTranscode.php
+++ b/WebVideoTranscode/WebVideoTranscode.php
@@ -81,7 +81,7 @@
* http://firefogg.org/dev/index.html
*/
public static $derivativeSettings = [
-   WebVideoTranscode::ENC_OGV_160P =>
+   self::ENC_OGV_160P =>
[
'maxSize'=> '288x160',
'videoBitrate'   => '160',
@@ -96,7 +96,7 @@
'videoCodec' => 'theora',
'type'   => 'video/ogg; 
codecs="theora, vorbis"',
],
-   WebVideoTranscode::ENC_OGV_240P =>
+   self::ENC_OGV_240P =>
[
'maxSize'=> '426x240',
'videoBitrate'   => '512',
@@ -111,7 +111,7 @@
'videoCodec' => 'theora',
'type'   => 'video/ogg; 
codecs="theora, vorbis"',
],
-   WebVideoTranscode::ENC_OGV_360P =>
+   self::ENC_OGV_360P =>
[
'maxSize'=> '640x360',
'videoBitrate'   => '1024',
@@ -126,7 +126,7 @@
'videoCodec' => 'theora',
'type'   => 'video/ogg; 
codecs="theora, vorbis"',
],
-   WebVideoTranscode::ENC_OGV_480P =>
+   self::ENC_OGV_480P =>
[
'maxSize'=> '854x480',
'videoBitrate'   => '2048',
@@ -142,7 +142,7 @@
'type'   => 'video/ogg; 
codecs="theora, vorbis"',
],
 
-   WebVideoTranscode::ENC_OGV_720P =>
+   self::ENC_OGV_720P =>
[
'maxSize'=> '1280x720',

[MediaWiki-commits] [Gerrit] mediawiki...RSS[master]: build: Updating mediawiki/mediawiki-codesniffer to 0.10.1

2017-07-26 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/368091 )

Change subject: build: Updating mediawiki/mediawiki-codesniffer to 0.10.1
..

build: Updating mediawiki/mediawiki-codesniffer to 0.10.1

Change-Id: Ifafccf48234a036349ac41cc398171081398e1e7
---
M RSSParser.php
M composer.json
M phpcs.xml
3 files changed, 6 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/RSS 
refs/changes/91/368091/1

diff --git a/RSSParser.php b/RSSParser.php
index 8bdd42a..a1c7159 100644
--- a/RSSParser.php
+++ b/RSSParser.php
@@ -182,7 +182,7 @@
/**
 * Retrieve the URL from the cache
 * @param $key String: lookup key to associate with this item
-* @return boolean
+* @return bool
 */
protected function loadFromCache( $key ) {
global $wgMemc, $wgRSSCacheCompare;
@@ -218,7 +218,7 @@
/**
 * Store these objects (i.e. etag, lastModified, and RSS) in the cache.
 * @param $key String: lookup key to associate with this item
-* @return boolean
+* @return bool
 */
protected function storeInCache( $key ) {
global $wgMemc, $wgRSSCacheAge;
@@ -575,7 +575,7 @@
 * Determine if a given item should or should not be displayed
 *
 * @param $item Array: associative array that RSSData produced for an 

-* @return boolean
+* @return bool
 */
protected function canDisplay( array $item ) {
$check = '';
@@ -602,7 +602,7 @@
 * @param $text String: the text to examine
 * @param $filterType String: "filterOut" to check for matches in the 
filterOut member list.
 *  Otherwise, uses the filter member list.
-* @return Boolean: decision to filter or not.
+* @return bool Decision to filter or not.
 */
protected function filter( $text, $filterType ) {
if ( $filterType === 'filterOut' ) {
diff --git a/composer.json b/composer.json
index 4f55859..bf202bf 100644
--- a/composer.json
+++ b/composer.json
@@ -2,7 +2,7 @@
"require-dev": {
"jakub-onderka/php-parallel-lint": "0.9.2",
"jakub-onderka/php-console-highlighter": "0.3.2",
-   "mediawiki/mediawiki-codesniffer": "0.10.0"
+   "mediawiki/mediawiki-codesniffer": "0.10.1"
},
"scripts": {
"fix": "phpcbf",
diff --git a/phpcs.xml b/phpcs.xml
index 49a1a4f..f91e839 100644
--- a/phpcs.xml
+++ b/phpcs.xml
@@ -11,7 +11,5 @@

.

-   
-   vendor
-   node_modules
+   
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifafccf48234a036349ac41cc398171081398e1e7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/RSS
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: add puppetmaster roles to labpuppetmaster1001 and 2

2017-07-26 Thread Andrew Bogott (Code Review)
Andrew Bogott has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/368090 )

Change subject: add puppetmaster roles to labpuppetmaster1001 and 2
..

add puppetmaster roles to labpuppetmaster1001 and 2

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


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/90/368090/1

diff --git a/manifests/site.pp b/manifests/site.pp
index a6bb769..799ca82 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -966,9 +966,16 @@
 }
 
 
-node /labpuppetmaster100[12]\.wikimedia\.org/ {
+node 'labpuppetmaster1001.wikimedia.org' {
+role(labs::puppetmaster::frontend)
 include ::standard
-include ::base::firewall
+interface::add_ip6_mapped { 'main': }
+}
+
+node 'labpuppetmaster1002.wikimedia.org' {
+role(labs::puppetmaster::backend)
+include ::standard
+interface::add_ip6_mapped { 'main': }
 }
 
 # labservices1001 hosts openstack-designate, the labs DNS service.

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4f500b6499bb2a913f65f016a5d8ed7f44eec392
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Andrew Bogott 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: puppet-merge: fix a syntax error when there's only one worker

2017-07-26 Thread Andrew Bogott (Code Review)
Andrew Bogott has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/368088 )

Change subject: puppet-merge: fix a syntax error when there's only one worker
..

puppet-merge: fix a syntax error when there's only one worker

This adds a dumb no-op call to 'true' because the alternative
is adding a lengthy erb clause which I definitely won't
get right the first time.

Change-Id: If0611bc5a9bef3cd3af4d2ace01e3171de7998ee
---
M modules/puppetmaster/templates/puppet-merge.erb
1 file changed, 2 insertions(+), 0 deletions(-)


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

diff --git a/modules/puppetmaster/templates/puppet-merge.erb 
b/modules/puppetmaster/templates/puppet-merge.erb
index 92e3ea4..3233147 100755
--- a/modules/puppetmaster/templates/puppet-merge.erb
+++ b/modules/puppetmaster/templates/puppet-merge.erb
@@ -207,6 +207,8 @@
 fi
 <%- end -%>
   <%- end -%>
+  # avoid a syntax error if this list is empty
+  true
 fi
 # conftool-merge does need to run from >1 frontend, avoid running a second time
 if [ $running_user != $git_user ]; then

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If0611bc5a9bef3cd3af4d2ace01e3171de7998ee
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Andrew Bogott 

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


[MediaWiki-commits] [Gerrit] mediawiki...RelatedArticles[master]: build: Updating mediawiki/mediawiki-codesniffer to 0.10.1

2017-07-26 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/368082 )

Change subject: build: Updating mediawiki/mediawiki-codesniffer to 0.10.1
..

build: Updating mediawiki/mediawiki-codesniffer to 0.10.1

Change-Id: Ie05b9ddc3e351abf4b2b199529b714766055d161
---
M composer.json
M includes/FooterHooks.php
M includes/Hooks.php
M includes/SidebarHooks.php
M phpcs.xml
5 files changed, 9 insertions(+), 10 deletions(-)


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

diff --git a/composer.json b/composer.json
index 1366381..55507be 100644
--- a/composer.json
+++ b/composer.json
@@ -1,7 +1,7 @@
 {
"require-dev": {
"jakub-onderka/php-parallel-lint": "0.9.2",
-   "mediawiki/mediawiki-codesniffer": "0.10.0",
+   "mediawiki/mediawiki-codesniffer": "0.10.1",
"jakub-onderka/php-console-highlighter": "0.3.2"
},
"scripts": {
diff --git a/includes/FooterHooks.php b/includes/FooterHooks.php
index 2a76369..f43e8cc 100644
--- a/includes/FooterHooks.php
+++ b/includes/FooterHooks.php
@@ -21,7 +21,7 @@
 *
 * @param array &$vars variables to be added into the output of 
OutputPage::headElement.
 * @param OutputPage $out OutputPage instance calling the hook
-* @return boolean Always true
+* @return bool Always true
 */
public static function onMakeGlobalVariablesScript( &$vars, OutputPage 
$out ) {
$config = MediaWikiServices::getInstance()->getConfigFactory()
@@ -102,7 +102,7 @@
 *
 * @param OutputPage $out The OutputPage object
 * @param Skin $skin Skin object that will be used to generate the page
-* @return boolean Always true
+* @return bool Always true
 */
public static function onBeforePageDisplay( OutputPage $out, Skin $skin 
) {
$config = MediaWikiServices::getInstance()->getConfigFactory()
@@ -153,7 +153,7 @@
 * @see 
https://www.mediawiki.org/wiki/Manual:Hooks/ResourceLoaderGetConfigVars
 *
 * @param array &$vars Array of variables to be added into the output 
of the startup module.
-* @return boolean
+* @return bool
 */
public static function onResourceLoaderGetConfigVars( &$vars ) {
$config = MediaWikiServices::getInstance()->getConfigFactory()
@@ -180,7 +180,7 @@
 * @see 
https://www.mediawiki.org/wiki/Manual:Hooks/ResourceLoaderRegisterModules
 *
 * @param ResourceLoader &$resourceLoader The ResourceLoader object
-* @return boolean
+* @return bool
 */
public static function onResourceLoaderRegisterModules( ResourceLoader 
&$resourceLoader ) {
$dependencies = [];
diff --git a/includes/Hooks.php b/includes/Hooks.php
index e64164d..7027581 100644
--- a/includes/Hooks.php
+++ b/includes/Hooks.php
@@ -15,7 +15,7 @@
 * {@see Hooks::onFuncRelated}).
 *
 * @param Parser &$parser Paser object
-* @return boolean Always true
+* @return bool Always true
 */
public static function onParserFirstCallInit( Parser &$parser ) {
$parser->setFunctionHook( 'related', 
'RelatedArticles\\Hooks::onFuncRelated' );
@@ -64,7 +64,7 @@
 *
 * @param OutputPage &$out the OutputPage object
 * @param ParserOutput $parserOutput ParserOutput object
-* @return boolean Always true
+* @return bool Always true
 */
public static function onOutputPageParserOutput( OutputPage &$out, 
ParserOutput $parserOutput ) {
$related = $parserOutput->getExtensionData( 'RelatedArticles' );
diff --git a/includes/SidebarHooks.php b/includes/SidebarHooks.php
index 7ccaefa..2b73e74 100644
--- a/includes/SidebarHooks.php
+++ b/includes/SidebarHooks.php
@@ -19,7 +19,7 @@
 *
 * @param Skin $skin Skin object
 * @param array &$bar Sidebar contents
-* @return boolean Always true
+* @return bool Always true
 */
public static function onSidebarBeforeOutput( Skin $skin, &$bar ) {
$out = $skin->getOutput();
diff --git a/phpcs.xml b/phpcs.xml
index ea36036..b0464c3 100644
--- a/phpcs.xml
+++ b/phpcs.xml
@@ -4,6 +4,5 @@

.

-   
-   vendor
+   
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie05b9ddc3e351abf4b2b199529b714766055d161
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/RelatedArticles
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 

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

[MediaWiki-commits] [Gerrit] mediawiki...SpamBlacklist[master]: build: Updating mediawiki/mediawiki-codesniffer to 0.10.1

2017-07-26 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/368081 )

Change subject: build: Updating mediawiki/mediawiki-codesniffer to 0.10.1
..

build: Updating mediawiki/mediawiki-codesniffer to 0.10.1

Change-Id: I70cc261499286e5bc46ee96e9b9ea07f41c836a1
---
M SpamRegexBatch.php
M composer.json
M phpcs.xml
3 files changed, 12 insertions(+), 14 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SpamBlacklist 
refs/changes/81/368081/1

diff --git a/SpamRegexBatch.php b/SpamRegexBatch.php
index 8348da1..3fd6e2e 100644
--- a/SpamRegexBatch.php
+++ b/SpamRegexBatch.php
@@ -93,9 +93,9 @@
 * @return array of regexes
 */
static function buildSafeRegexes( $lines, BaseBlacklist $blacklist, 
$fileName=false ) {
-   $lines = SpamRegexBatch::stripLines( $lines );
-   $regexes = SpamRegexBatch::buildRegexes( $lines, $blacklist );
-   if ( SpamRegexBatch::validateRegexes( $regexes ) ) {
+   $lines = self::stripLines( $lines );
+   $regexes = self::buildRegexes( $lines, $blacklist );
+   if ( self::validateRegexes( $regexes ) ) {
return $regexes;
} else {
// _Something_ broke... rebuild line-by-line; it'll be
@@ -104,7 +104,7 @@
if ( $fileName ) {
wfDebugLog( 'SpamBlacklist', "Spam blacklist 
warning: bogus line in $fileName\n" );
}
-   return SpamRegexBatch::buildRegexes( $lines, 
$blacklist, 0 );
+   return self::buildRegexes( $lines, $blacklist, 0 );
}
}
 
@@ -116,7 +116,7 @@
 * @return array of input lines which produce invalid input, or empty 
array if no problems
 */
static function getBadLines( $lines, BaseBlacklist $blacklist ) {
-   $lines = SpamRegexBatch::stripLines( $lines );
+   $lines = self::stripLines( $lines );
 
$badLines = [];
foreach ( $lines as $line ) {
@@ -126,16 +126,16 @@
}
}
 
-   $regexes = SpamRegexBatch::buildRegexes( $lines, $blacklist );
-   if ( SpamRegexBatch::validateRegexes( $regexes ) ) {
+   $regexes = self::buildRegexes( $lines, $blacklist );
+   if ( self::validateRegexes( $regexes ) ) {
// No other problems!
return $badLines;
}
 
// Something failed in the batch, so check them one by one.
foreach ( $lines as $line ) {
-   $regexes = SpamRegexBatch::buildRegexes( [ $line ], 
$blacklist );
-   if ( !SpamRegexBatch::validateRegexes( $regexes ) ) {
+   $regexes = self::buildRegexes( [ $line ], $blacklist );
+   if ( !self::validateRegexes( $regexes ) ) {
$badLines[] = $line;
}
}
@@ -153,7 +153,7 @@
 */
static function regexesFromText( $source, BaseBlacklist $blacklist, 
$fileName=false ) {
$lines = explode( "\n", $source );
-   return SpamRegexBatch::buildSafeRegexes( $lines, $blacklist, 
$fileName );
+   return self::buildSafeRegexes( $lines, $blacklist, $fileName );
}
 
/**
@@ -167,7 +167,7 @@
static function regexesFromMessage( $message, BaseBlacklist $blacklist 
) {
$source = wfMessage( $message )->inContentLanguage();
if ( !$source->isDisabled() ) {
-   return SpamRegexBatch::regexesFromText( 
$source->plain(), $blacklist );
+   return self::regexesFromText( $source->plain(), 
$blacklist );
} else {
return [];
}
diff --git a/composer.json b/composer.json
index 8599d9b..1c2721a 100644
--- a/composer.json
+++ b/composer.json
@@ -2,7 +2,7 @@
"require-dev": {
"jakub-onderka/php-parallel-lint": "0.9.2",
"jakub-onderka/php-console-highlighter": "0.3.2",
-   "mediawiki/mediawiki-codesniffer": "0.10.0"
+   "mediawiki/mediawiki-codesniffer": "0.10.1"
},
"scripts": {
"fix": "phpcbf",
diff --git a/phpcs.xml b/phpcs.xml
index 19f91c8..8139da0 100644
--- a/phpcs.xml
+++ b/phpcs.xml
@@ -17,6 +17,4 @@
.


-   vendor
-   node_modules
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I70cc261499286e5bc46ee96e9b9ea07f41c836a1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SpamBlacklist
Gerrit-Branch: master

[MediaWiki-commits] [Gerrit] mediawiki...QuickSurveys[master]: build: Updating mediawiki/mediawiki-codesniffer to 0.10.1

2017-07-26 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/368074 )

Change subject: build: Updating mediawiki/mediawiki-codesniffer to 0.10.1
..

build: Updating mediawiki/mediawiki-codesniffer to 0.10.1

Change-Id: Ifef6a189984f506bbb43a1556ae2c77f2b64c972
---
M composer.json
M includes/QuickSurveys.hooks.php
M phpcs.xml
3 files changed, 3 insertions(+), 4 deletions(-)


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

diff --git a/composer.json b/composer.json
index 1366381..55507be 100644
--- a/composer.json
+++ b/composer.json
@@ -1,7 +1,7 @@
 {
"require-dev": {
"jakub-onderka/php-parallel-lint": "0.9.2",
-   "mediawiki/mediawiki-codesniffer": "0.10.0",
+   "mediawiki/mediawiki-codesniffer": "0.10.1",
"jakub-onderka/php-console-highlighter": "0.3.2"
},
"scripts": {
diff --git a/includes/QuickSurveys.hooks.php b/includes/QuickSurveys.hooks.php
index 5d9e1fd..64c75c9 100644
--- a/includes/QuickSurveys.hooks.php
+++ b/includes/QuickSurveys.hooks.php
@@ -54,7 +54,7 @@
 * @see 
https://www.mediawiki.org/wiki/Manual:Hooks/ResourceLoaderGetConfigVars
 *
 * @param array $vars
-* @return boolean
+* @return bool
 */
public static function onResourceLoaderGetConfigVars( &$vars ) {
global $wgQuickSurveysRequireHttps;
diff --git a/phpcs.xml b/phpcs.xml
index 65d95e7..d89be41 100644
--- a/phpcs.xml
+++ b/phpcs.xml
@@ -9,6 +9,5 @@

.

-   
-   vendor
+   
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifef6a189984f506bbb43a1556ae2c77f2b64c972
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/QuickSurveys
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 

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


[MediaWiki-commits] [Gerrit] mediawiki...ProofreadPage[master]: build: Updating mediawiki/mediawiki-codesniffer to 0.10.1

2017-07-26 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/368055 )

Change subject: build: Updating mediawiki/mediawiki-codesniffer to 0.10.1
..

build: Updating mediawiki/mediawiki-codesniffer to 0.10.1

Change-Id: Icf865f9b4d44f088bdb39ccd2576d171834eeaf5
---
M ProofreadPage.body.php
M composer.json
M phpcs.xml
M tests/phpunit/index/ProofreadIndexPageTest.php
4 files changed, 6 insertions(+), 8 deletions(-)


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

diff --git a/ProofreadPage.body.php b/ProofreadPage.body.php
index f8c1ede..eda957a 100644
--- a/ProofreadPage.body.php
+++ b/ProofreadPage.body.php
@@ -312,20 +312,20 @@
$title = $article->getTitle();
 
// if it's an index, update pr_index table
-   if ( $title->inNamespace( ProofreadPage::getIndexNamespaceId() 
) ) {
+   if ( $title->inNamespace( self::getIndexNamespaceId() ) ) {
// Move this part to EditProofreadIndexPage
-   ProofreadPage::updatePrIndex( $article );
+   self::updatePrIndex( $article );
return true;
}
 
// return if it is not a page
-   if ( !$title->inNamespace( ProofreadPage::getPageNamespaceId() 
) ) {
+   if ( !$title->inNamespace( self::getPageNamespaceId() ) ) {
return true;
}
 
/* check if there is an index */
if ( !isset( $title->prpIndexPage ) ) {
-   ProofreadPage::loadIndex( $title );
+   self::loadIndex( $title );
}
if ( $title->prpIndexPage === null ) {
return true;
diff --git a/composer.json b/composer.json
index b5e294c..c12a316 100644
--- a/composer.json
+++ b/composer.json
@@ -9,7 +9,7 @@
},
"require-dev": {
"jakub-onderka/php-parallel-lint": "0.9.2",
-   "mediawiki/mediawiki-codesniffer": "0.10.0",
+   "mediawiki/mediawiki-codesniffer": "0.10.1",
"jakub-onderka/php-console-highlighter": "0.3.2"
},
"scripts": {
diff --git a/phpcs.xml b/phpcs.xml
index 0a5187b..868ce12 100644
--- a/phpcs.xml
+++ b/phpcs.xml
@@ -13,6 +13,4 @@
.


-   node_modules/
-   vendor/
 
diff --git a/tests/phpunit/index/ProofreadIndexPageTest.php 
b/tests/phpunit/index/ProofreadIndexPageTest.php
index 3e6c32a..8173f52 100644
--- a/tests/phpunit/index/ProofreadIndexPageTest.php
+++ b/tests/phpunit/index/ProofreadIndexPageTest.php
@@ -200,7 +200,7 @@
}
 
public function testGetLinksToPageNamespace() {
-   $page = ProofreadIndexPageTest::newIndexPage(
+   $page = self::newIndexPage(
'Test',
"{{\n|Pages=[[Page:Test 1.jpg|TOC]] [[Page:Test 
2.tiff|1]] [[Page:Test:3.png|2]]" .
"\n|Author=[[Author:Me]]\n}}"

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Icf865f9b4d44f088bdb39ccd2576d171834eeaf5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ProofreadPage
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 

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


[MediaWiki-commits] [Gerrit] mediawiki...PageAssessments[master]: build: Updating mediawiki/mediawiki-codesniffer to 0.10.1

2017-07-26 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/368054 )

Change subject: build: Updating mediawiki/mediawiki-codesniffer to 0.10.1
..

build: Updating mediawiki/mediawiki-codesniffer to 0.10.1

Change-Id: Ib9be7332c7eb584a24af938ea40acf398659b2e8
---
M composer.json
M phpcs.xml
M src/SpecialPage.php
3 files changed, 3 insertions(+), 4 deletions(-)


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

diff --git a/composer.json b/composer.json
index 1c37f3a..834ad8e 100644
--- a/composer.json
+++ b/composer.json
@@ -4,7 +4,7 @@
"description": "This extension adds a parser function which can be used 
for storing article assessments in a database table.",
"require-dev": {
"jakub-onderka/php-parallel-lint": "0.9.*",
-   "mediawiki/mediawiki-codesniffer": "0.10.0",
+   "mediawiki/mediawiki-codesniffer": "0.10.1",
"jakub-onderka/php-console-highlighter": "0.3.2"
},
"scripts": {
diff --git a/phpcs.xml b/phpcs.xml
index b35e5af..c4e2dec 100644
--- a/phpcs.xml
+++ b/phpcs.xml
@@ -12,5 +12,4 @@
.


-   vendor
 
diff --git a/src/SpecialPage.php b/src/SpecialPage.php
index 5a2e393..c925fcc 100644
--- a/src/SpecialPage.php
+++ b/src/SpecialPage.php
@@ -101,7 +101,7 @@
 * @param ResultWrapper $res Result pointer
 * @param int $num Number of available result rows
 * @param int $offset Paging offset
-* @return boolean False if no results are displayed, true otherwise.
+* @return bool False if no results are displayed, true otherwise.
 */
protected function outputResults( $out, $skin, $dbr, $res, $num, 
$offset ) {
// Don't display anything if there are no results.
@@ -251,7 +251,7 @@
/**
 * Whether we're currently sorting descending, or ascending. Based on 
the request 'dir'
 * value; anything starting with 'desc' is considered 'desecending'.
-* @return boolean
+* @return bool
 */
function sortDescending() {
return stripos( $this->getRequest()->getVal( 'dir' ), 'desc' ) 
=== 0;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib9be7332c7eb584a24af938ea40acf398659b2e8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/PageAssessments
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 

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


[MediaWiki-commits] [Gerrit] mediawiki...OpenStackManager[master]: build: Updating mediawiki/mediawiki-codesniffer to 0.10.1

2017-07-26 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/368043 )

Change subject: build: Updating mediawiki/mediawiki-codesniffer to 0.10.1
..

build: Updating mediawiki/mediawiki-codesniffer to 0.10.1

Change-Id: Ib3765db6d1538a7748e9ea81549f2e06ec12ff22
---
M composer.json
M nova/OpenStackNovaArticle.php
M nova/OpenStackNovaController.php
M nova/OpenStackNovaDomain.php
M nova/OpenStackNovaHost.php
M nova/OpenStackNovaProject.php
M nova/OpenStackNovaRole.php
M nova/OpenStackNovaUser.php
M phpcs.xml
9 files changed, 12 insertions(+), 14 deletions(-)


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

diff --git a/composer.json b/composer.json
index 6a20d4f..ea7fb13 100644
--- a/composer.json
+++ b/composer.json
@@ -5,7 +5,7 @@
"require-dev": {
"jakub-onderka/php-parallel-lint": "0.9.2",
"jakub-onderka/php-console-highlighter": "0.3.2",
-   "mediawiki/mediawiki-codesniffer": "0.10.0"
+   "mediawiki/mediawiki-codesniffer": "0.10.1"
},
"scripts": {
"fix": "phpcbf",
diff --git a/nova/OpenStackNovaArticle.php b/nova/OpenStackNovaArticle.php
index 1556302..e779d18 100644
--- a/nova/OpenStackNovaArticle.php
+++ b/nova/OpenStackNovaArticle.php
@@ -29,7 +29,7 @@
}
 
public static function deleteArticle( $titletext, $namespace = 
NS_NOVA_RESOURCE ) {
-   if ( !OpenStackNovaArticle::canCreatePages() ) {
+   if ( !self::canCreatePages() ) {
return;
}
$title = Title::newFromText( $titletext, $namespace );
diff --git a/nova/OpenStackNovaController.php b/nova/OpenStackNovaController.php
index 4dc4f02..f81e007 100644
--- a/nova/OpenStackNovaController.php
+++ b/nova/OpenStackNovaController.php
@@ -709,7 +709,7 @@
$data['server']['name'] = $instanceName;
if ( $wgOpenStackManagerInstanceUserData ) {
$random_hash = md5( date( 'r', time() ) );
-   $endl = OpenStackNovaController::getLineEnding();
+   $endl = self::getLineEnding();
$boundary = '===' . $random_hash .'==';
$userdata = 'Content-Type: multipart/mixed; boundary="' 
. $boundary .'"' . $endl;
$userdata .= 'MIME-Version: 1.0' . $endl;
diff --git a/nova/OpenStackNovaDomain.php b/nova/OpenStackNovaDomain.php
index 2e62bc8..1378ce1 100644
--- a/nova/OpenStackNovaDomain.php
+++ b/nova/OpenStackNovaDomain.php
@@ -97,7 +97,7 @@
function updateSOA() {
$ldap = LdapAuthenticationPlugin::getInstance();
$domain = [];
-   $domain['soarecord'] = OpenStackNovaDomain::generateSOA();
+   $domain['soarecord'] = self::generateSOA();
$success = LdapAuthenticationPlugin::ldap_modify(
$ldap->ldapconn, $this->domainDN, $domain
);
@@ -214,7 +214,7 @@
 * @return null|OpenStackNovaDomain
 */
static function getDomainByRegion( $region ) {
-   $domain = OpenStackNovaDomain::getDomainByName( $region );
+   $domain = self::getDomainByName( $region );
if ( $domain ) {
if ( $domain->getLocation() ) {
return $domain;
@@ -242,7 +242,7 @@
$ldap = LdapAuthenticationPlugin::getInstance();
OpenStackNovaLdapConnection::connect();
 
-   $soa = OpenStackNovaDomain::generateSOA();
+   $soa = self::generateSOA();
$domain = [];
$domain['objectclass'][] = 'dcobject';
$domain['objectclass'][] = 'dnsdomain';
diff --git a/nova/OpenStackNovaHost.php b/nova/OpenStackNovaHost.php
index 2f6faf5..c906b3a 100644
--- a/nova/OpenStackNovaHost.php
+++ b/nova/OpenStackNovaHost.php
@@ -302,7 +302,7 @@
OpenStackNovaLdapConnection::connect();
 
$domainname = $domain->getFullyQualifiedDomainName();
-   $host = OpenStackNovaHost::getHostByPublicIP( $ip );
+   $host = self::getHostByPublicIP( $ip );
if ( $host ) {
$ldap->printDebug(
"Failed to add public host $hostname as the DNS 
entry already exists", NONSENSITIVE
diff --git a/nova/OpenStackNovaProject.php b/nova/OpenStackNovaProject.php
index 228a87b..4d0f7ac 100644
--- a/nova/OpenStackNovaProject.php
+++ b/nova/OpenStackNovaProject.php
@@ -538,7 +538,7 @@
 */
static function getAllProjects() {
$projects = [];
-   foreach ( OpenStackNovaProject::getProjectList() as $id => 
$name ) {
+   foreach ( self::getProjectList() as $id => $name ) {

[MediaWiki-commits] [Gerrit] mediawiki...OAuth[master]: build: Updating mediawiki/mediawiki-codesniffer to 0.10.1

2017-07-26 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/368041 )

Change subject: build: Updating mediawiki/mediawiki-codesniffer to 0.10.1
..

build: Updating mediawiki/mediawiki-codesniffer to 0.10.1

Change-Id: Ib920133c0b840c7e5729682231e155a3854d3982
---
M api/MWOAuthAPI.setup.php
M api/MWOAuthSessionProvider.php
M backend/MWOAuthConsumer.php
M backend/MWOAuthDataStore.php
M backend/MWOAuthUtils.php
M composer.json
M frontend/MWOAuthUI.hooks.php
M phpcs.xml
8 files changed, 30 insertions(+), 32 deletions(-)


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

diff --git a/api/MWOAuthAPI.setup.php b/api/MWOAuthAPI.setup.php
index d71767c..a0007e4 100755
--- a/api/MWOAuthAPI.setup.php
+++ b/api/MWOAuthAPI.setup.php
@@ -11,7 +11,7 @@
/**
 * Prevent CentralAuth from issuing centralauthtokens if we have
 * OAuth headers in this request.
-* @return boolean
+* @return bool
 */
public static function onCentralAuthAbortCentralAuthToken() {
$request = \RequestContext::getMain()->getRequest();
diff --git a/api/MWOAuthSessionProvider.php b/api/MWOAuthSessionProvider.php
index 8f9ff11..4b16f2d 100644
--- a/api/MWOAuthSessionProvider.php
+++ b/api/MWOAuthSessionProvider.php
@@ -232,7 +232,7 @@
 * @param \ApiBase $module
 * @param \User $user
 * @param string|array &$message
-* @return boolean
+* @return bool
 */
public function onApiCheckCanExecute( \ApiBase $module, \User $user, 
&$message ) {
global $wgMWOauthDisabledApiModules;
@@ -258,7 +258,7 @@
 * Record the fact that OAuth was used for anything added to 
RecentChanges.
 *
 * @param \RecentChange $rc
-* @return boolean true
+* @return bool true
 */
public function onRecentChange_save( $rc ) {
$data = $this->getSessionData( $rc->getPerformer() ?: null );
diff --git a/backend/MWOAuthConsumer.php b/backend/MWOAuthConsumer.php
index 976bdce..afc3e0d 100644
--- a/backend/MWOAuthConsumer.php
+++ b/backend/MWOAuthConsumer.php
@@ -91,11 +91,11 @@
 * @var array
 */
public static $stageNames = [
-   MWOAuthConsumer::STAGE_PROPOSED => 'proposed',
-   MWOAuthConsumer::STAGE_REJECTED => 'rejected',
-   MWOAuthConsumer::STAGE_EXPIRED  => 'expired',
-   MWOAuthConsumer::STAGE_APPROVED => 'approved',
-   MWOAuthConsumer::STAGE_DISABLED => 'disabled',
+   self::STAGE_PROPOSED => 'proposed',
+   self::STAGE_REJECTED => 'rejected',
+   self::STAGE_EXPIRED  => 'expired',
+   self::STAGE_APPROVED => 'approved',
+   self::STAGE_DISABLED => 'disabled',
];
 
/**
@@ -104,11 +104,11 @@
 * @var array
 */
public static $stageActionNames = [
-   MWOAuthConsumer::STAGE_PROPOSED => 'propose',
-   MWOAuthConsumer::STAGE_REJECTED => 'reject',
-   MWOAuthConsumer::STAGE_EXPIRED  => 'propose',
-   MWOAuthConsumer::STAGE_APPROVED => 'approve',
-   MWOAuthConsumer::STAGE_DISABLED => 'disable',
+   self::STAGE_PROPOSED => 'propose',
+   self::STAGE_REJECTED => 'reject',
+   self::STAGE_EXPIRED  => 'propose',
+   self::STAGE_APPROVED => 'approve',
+   self::STAGE_DISABLED => 'disable',
];
 
protected static function getSchema() {
@@ -223,11 +223,11 @@
 */
public static function getAllStages() {
return [
-   MWOAuthConsumer::STAGE_PROPOSED,
-   MWOAuthConsumer::STAGE_REJECTED,
-   MWOAuthConsumer::STAGE_EXPIRED,
-   MWOAuthConsumer::STAGE_APPROVED,
-   MWOAuthConsumer::STAGE_DISABLED,
+   self::STAGE_PROPOSED,
+   self::STAGE_REJECTED,
+   self::STAGE_EXPIRED,
+   self::STAGE_APPROVED,
+   self::STAGE_DISABLED,
];
}
 
@@ -259,7 +259,7 @@
 * - Still pending approval and is owned by $user
 *
 * @param \User $user
-* @return boolean
+* @return bool
 */
public function isUsableBy( \User $user ) {
if ( $this->stage === self::STAGE_APPROVED && !$this->get( 
'ownerOnly' ) ) {
@@ -285,7 +285,7 @@
 
protected function encodeRow( \DBConnRef $db, $row ) {
// For compatibility with other wikis in the farm, un-remap 
some grants
-   foreach ( MWOAuthConsumer::$mapBackCompatGrants as $old => $new 
) {
+   foreach ( self::$mapBackCompatGrants as $old => $new ) {
  

[MediaWiki-commits] [Gerrit] mediawiki...MobileFrontend[master]: build: Updating mediawiki/mediawiki-codesniffer to 0.10.1

2017-07-26 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/368029 )

Change subject: build: Updating mediawiki/mediawiki-codesniffer to 0.10.1
..

build: Updating mediawiki/mediawiki-codesniffer to 0.10.1

Change-Id: If8d9c572ff5811be1149252f5a188bb9913eac4a
---
M composer.json
M includes/MobileFrontend.body.php
M includes/MobileFrontend.skin.hooks.php
M includes/specials/SpecialMobileWatchlist.php
M phpcs.xml
5 files changed, 9 insertions(+), 11 deletions(-)


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

diff --git a/composer.json b/composer.json
index 1366381..55507be 100644
--- a/composer.json
+++ b/composer.json
@@ -1,7 +1,7 @@
 {
"require-dev": {
"jakub-onderka/php-parallel-lint": "0.9.2",
-   "mediawiki/mediawiki-codesniffer": "0.10.0",
+   "mediawiki/mediawiki-codesniffer": "0.10.1",
"jakub-onderka/php-console-highlighter": "0.3.2"
},
"scripts": {
diff --git a/includes/MobileFrontend.body.php b/includes/MobileFrontend.body.php
index 3133d76..8256a36 100644
--- a/includes/MobileFrontend.body.php
+++ b/includes/MobileFrontend.body.php
@@ -83,7 +83,7 @@
$pageUserId = User::idFromName( $title->getText() );
if ( $pageUserId && !$title->exists() ) {
$pageUser = User::newFromId( $pageUserId );
-   $contentHtml = 
ExtMobileFrontend::getUserPageContent(
+   $contentHtml = self::getUserPageContent(
$out, $pageUser );
}
}
diff --git a/includes/MobileFrontend.skin.hooks.php 
b/includes/MobileFrontend.skin.hooks.php
index 0f48b61..e0fe06f 100644
--- a/includes/MobileFrontend.skin.hooks.php
+++ b/includes/MobileFrontend.skin.hooks.php
@@ -186,9 +186,9 @@
// Certain pages might be blacklisted and not have a mobile 
equivalent.
if ( !$ctx->isBlacklistedPage() ) {
if ( $ctx->shouldDisplayMobileView() ) {
-   MobileFrontendSkinHooks::mobileFooter( $skin, 
$tpl, $ctx, $title, $req );
+   self::mobileFooter( $skin, $tpl, $ctx, $title, 
$req );
} else {
-   MobileFrontendSkinHooks::desktopFooter( $skin, 
$tpl, $ctx, $title, $req );
+   self::desktopFooter( $skin, $tpl, $ctx, $title, 
$req );
}
}
}
diff --git a/includes/specials/SpecialMobileWatchlist.php 
b/includes/specials/SpecialMobileWatchlist.php
index 6c31999..19e6a0f 100644
--- a/includes/specials/SpecialMobileWatchlist.php
+++ b/includes/specials/SpecialMobileWatchlist.php
@@ -149,9 +149,9 @@
$attrsList = $attrsFeed = [];
// https://phabricator.wikimedia.org/T150650
if ( $view === null ) {
-   $view = $user->getOption( 
SpecialMobileWatchlist::VIEW_OPTION_NAME, 'a-z' );
+   $view = $user->getOption( self::VIEW_OPTION_NAME, 'a-z' 
);
}
-   $filter = $user->getOption( 
SpecialMobileWatchlist::FILTER_OPTION_NAME, 'all' );
+   $filter = $user->getOption( self::FILTER_OPTION_NAME, 'all' );
 
if ( $view === 'feed' ) {
$attrsList[ 'class' ] = MobileUI::buttonClass();
diff --git a/phpcs.xml b/phpcs.xml
index 08a1d0b..f668c64 100644
--- a/phpcs.xml
+++ b/phpcs.xml
@@ -7,19 +7,17 @@



-   MobileFrontend.alias.php
+   MobileFrontend\.alias\.php

.


-   vendor
-   node_modules
 



-   
-   
+   
+   


 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If8d9c572ff5811be1149252f5a188bb9913eac4a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 

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


[MediaWiki-commits] [Gerrit] mediawiki...Math[master]: build: Updating mediawiki/mediawiki-codesniffer to 0.10.1

2017-07-26 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/368024 )

Change subject: build: Updating mediawiki/mediawiki-codesniffer to 0.10.1
..

build: Updating mediawiki/mediawiki-codesniffer to 0.10.1

Change-Id: I99cebc85671b3e8670729cb725a6026f233b639b
---
M Math.hooks.php
M MathInputCheck.php
M MathInputCheckRestbase.php
M MathInputCheckTexvc.php
M MathLaTeXML.php
M MathMathML.php
M MathRenderer.php
M MathRestbaseInterface.php
M MathSource.php
M MathTexvc.php
M composer.json
M phpcs.xml
12 files changed, 21 insertions(+), 22 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Math 
refs/changes/24/368024/1

diff --git a/Math.hooks.php b/Math.hooks.php
index 13b8845..ad33220 100644
--- a/Math.hooks.php
+++ b/Math.hooks.php
@@ -267,7 +267,7 @@
];
// If the default option is not in the valid options the
// user interface throws an exception (BUG 64844)
-   $mode = MathHooks::mathModeToString( 
$wgDefaultUserOptions['math'] );
+   $mode = self::mathModeToString( $wgDefaultUserOptions['math'] );
if ( ! in_array( $mode, MathRenderer::getValidModes() ) ) {
LoggerFactory::getInstance( 'Math' )->error( 
'Misconfiguration: '.
"\$wgDefaultUserOptions['math'] is not in " . 
MathRenderer::getValidModes() . ".\n".
@@ -297,7 +297,7 @@
 * MaintenanceRefreshLinksInit handler; optimize settings for 
refreshLinks batch job.
 *
 * @param Maintenance $maint
-* @return boolean hook return code
+* @return bool hook return code
 */
static function onMaintenanceRefreshLinksInit( $maint ) {
global $wgUser;
@@ -422,7 +422,7 @@
 */
static function chemTagHook( $content, $attributes, $parser ) {
$attributes['chem'] = true;
-   return MathHooks::mathTagHook( '\ce{' . $content . '}', 
$attributes, $parser );
+   return self::mathTagHook( '\ce{' . $content . '}', $attributes, 
$parser );
}
 
 }
diff --git a/MathInputCheck.php b/MathInputCheck.php
index fb09836..f766728 100644
--- a/MathInputCheck.php
+++ b/MathInputCheck.php
@@ -27,7 +27,7 @@
 
/**
 * Returns true if the TeX input String is valid
-* @return boolean
+* @return bool
 */
public function isValid() {
return $this->isValid;
diff --git a/MathInputCheckRestbase.php b/MathInputCheckRestbase.php
index b72f88a..ab0dbf2 100644
--- a/MathInputCheckRestbase.php
+++ b/MathInputCheckRestbase.php
@@ -59,7 +59,7 @@
return $errorRenderer->getError( 'math_unknown_error' );
}
/**
-* @return boolean
+* @return bool
 */
public function isValid() {
return $this->restbaseInterface->getSuccess();
diff --git a/MathInputCheckTexvc.php b/MathInputCheckTexvc.php
index 7d22f9d..df7fcd2 100644
--- a/MathInputCheckTexvc.php
+++ b/MathInputCheckTexvc.php
@@ -46,7 +46,7 @@
}
 
/**
-* @return boolean
+* @return bool
 */
public function isValid() {
$us = $this;
@@ -59,7 +59,7 @@
}
 
/**
-* @return boolean
+* @return bool
 */
public function doValidCheck() {
global $wgMathTexvcCheckExecutable;
diff --git a/MathLaTeXML.php b/MathLaTeXML.php
index aa0c055..e0c1323 100644
--- a/MathLaTeXML.php
+++ b/MathLaTeXML.php
@@ -92,7 +92,7 @@
 
/**
 * Does the actual web request to convert TeX to MathML.
-* @return boolean
+* @return bool
 */
protected function doRender() {
if ( trim( $this->getTex() ) === '' ) {
@@ -180,7 +180,7 @@
/**
 * Calculates the SVG image based on the MathML input
 * No cache is used.
-* @return boolean
+* @return bool
 */
public function calculateSvg() {
$renderer = new MathMathML( $this->getTex() );
diff --git a/MathMathML.php b/MathMathML.php
index aa88b47..f5f7956 100644
--- a/MathMathML.php
+++ b/MathMathML.php
@@ -164,7 +164,7 @@
 * @param mixed $res the result
 * @param mixed $error the formatted error message or null
 * @param String $httpRequestClass class name of MWHttpRequest (needed 
for testing only)
-* @return boolean success
+* @return bool success
 */
public function makeRequest(
$host, $post, &$res, &$error = '', $httpRequestClass = 
'MWHttpRequest'
@@ -252,7 +252,7 @@
 
/**
 * Does the actual web request to convert TeX to MathML.
-* @return boolean
+* @return bool
 */
protected function doRender() {
if ( $this->getTex() === '' ) {
@@ 

[MediaWiki-commits] [Gerrit] mediawiki...GlobalUsage[master]: build: Updating mediawiki/mediawiki-codesniffer to 0.10.1

2017-07-26 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/368015 )

Change subject: build: Updating mediawiki/mediawiki-codesniffer to 0.10.1
..

build: Updating mediawiki/mediawiki-codesniffer to 0.10.1

Change-Id: I672d898640ae69d3a69ced62a2c78e7a1a157ccc
---
M composer.json
M includes/ApiQueryGlobalUsage.php
M includes/GlobalUsage.php
M includes/SpecialGloballyWantedFiles.php
M includes/SpecialMostGloballyLinkedFiles.php
M phpcs.xml
6 files changed, 12 insertions(+), 14 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/GlobalUsage 
refs/changes/15/368015/1

diff --git a/composer.json b/composer.json
index 4f55859..bf202bf 100644
--- a/composer.json
+++ b/composer.json
@@ -2,7 +2,7 @@
"require-dev": {
"jakub-onderka/php-parallel-lint": "0.9.2",
"jakub-onderka/php-console-highlighter": "0.3.2",
-   "mediawiki/mediawiki-codesniffer": "0.10.0"
+   "mediawiki/mediawiki-codesniffer": "0.10.1"
},
"scripts": {
"fix": "phpcbf",
diff --git a/includes/ApiQueryGlobalUsage.php b/includes/ApiQueryGlobalUsage.php
index 0c1ddc8..c3cbcea 100644
--- a/includes/ApiQueryGlobalUsage.php
+++ b/includes/ApiQueryGlobalUsage.php
@@ -24,7 +24,7 @@
 
 class ApiQueryGlobalUsage extends ApiQueryBase {
public function __construct( $query, $moduleName ) {
-   parent :: __construct( $query, $moduleName, 'gu' );
+   parent::__construct( $query, $moduleName, 'gu' );
}
 
public function execute() {
@@ -119,11 +119,11 @@
ApiBase::PARAM_ISMULTI => true,
],
'limit' => [
-   ApiBase :: PARAM_DFLT => 10,
-   ApiBase :: PARAM_TYPE => 'limit',
-   ApiBase :: PARAM_MIN => 1,
-   ApiBase :: PARAM_MAX => ApiBase :: LIMIT_BIG1,
-   ApiBase :: PARAM_MAX2 => ApiBase :: LIMIT_BIG2
+   ApiBase::PARAM_DFLT => 10,
+   ApiBase::PARAM_TYPE => 'limit',
+   ApiBase::PARAM_MIN => 1,
+   ApiBase::PARAM_MAX => ApiBase::LIMIT_BIG1,
+   ApiBase::PARAM_MAX2 => ApiBase::LIMIT_BIG2
],
'continue' => [
ApiBase::PARAM_HELP_MSG => 
'api-help-param-continue',
diff --git a/includes/GlobalUsage.php b/includes/GlobalUsage.php
index 8e5ff6e..51bbd39 100644
--- a/includes/GlobalUsage.php
+++ b/includes/GlobalUsage.php
@@ -218,7 +218,7 @@
 * @note This assumes the user has a single shared repo. If the user has
 *   multiple/nested foreign repos, then its unclear what it means to
 *   be on the "shared repo". See discussion on bug 23136.
-* @return boolean
+* @return bool
 */
public static function onSharedRepo() {
global $wgGlobalUsageSharedRepoWiki, $wgGlobalUsageDatabase;
diff --git a/includes/SpecialGloballyWantedFiles.php 
b/includes/SpecialGloballyWantedFiles.php
index e389c3d..4e5620c 100644
--- a/includes/SpecialGloballyWantedFiles.php
+++ b/includes/SpecialGloballyWantedFiles.php
@@ -46,7 +46,7 @@
 * Also make sure that GlobalUsage db same as shared repo.
 * (To catch the unlikely case where GlobalUsage db is different db 
from the
 * shared repo db).
-* @return boolean
+* @return bool
 */
function isCacheable() {
global $wgGlobalUsageDatabase;
@@ -57,7 +57,7 @@
/**
 * Only list this special page on the wiki that is the shared repo.
 *
-* @return boolean Should this be listed in Special:SpecialPages
+* @return bool Should this be listed in Special:SpecialPages
 */
function isListed() {
return GlobalUsage::onSharedRepo();
diff --git a/includes/SpecialMostGloballyLinkedFiles.php 
b/includes/SpecialMostGloballyLinkedFiles.php
index fea86e9..432c24f 100644
--- a/includes/SpecialMostGloballyLinkedFiles.php
+++ b/includes/SpecialMostGloballyLinkedFiles.php
@@ -27,7 +27,7 @@
 
/**
 * Don't want to do cached handling on non-shared repo, since we only 
redirect.
-* @return boolean
+* @return bool
 */
function isCacheable() {
return GlobalUsage::onSharedRepo();
@@ -70,7 +70,7 @@
/**
 * Only list this special page on the wiki that is the shared repo.
 *
-* @return boolean Should this be listed in Special:SpecialPages
+* @return bool Should this be listed in Special:SpecialPages
 */
function isListed() {
return 

[MediaWiki-commits] [Gerrit] mediawiki...EventBus[master]: build: Updating mediawiki/mediawiki-codesniffer to 0.10.1

2017-07-26 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/368011 )

Change subject: build: Updating mediawiki/mediawiki-codesniffer to 0.10.1
..

build: Updating mediawiki/mediawiki-codesniffer to 0.10.1

Change-Id: I677062bbac26a0dee62c1d115a4f0a3dc20c757a
---
M EventBus.php
M JobQueueEventBus.php
M composer.json
M phpcs.xml
4 files changed, 3 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/EventBus 
refs/changes/11/368011/1

diff --git a/EventBus.php b/EventBus.php
index 49e509e..552e89f 100644
--- a/EventBus.php
+++ b/EventBus.php
@@ -190,7 +190,7 @@
$attrs = [
// Common Mediawiki entity fields
'database'   => $wgDBname,
-   'performer'  => EventBus::createPerformerAttrs( 
$performer ),
+   'performer'  => self::createPerformerAttrs( 
$performer ),
'comment'=> $revision->getComment(),
 
// revision entity fields
diff --git a/JobQueueEventBus.php b/JobQueueEventBus.php
index 3bdba26..c9559ee 100644
--- a/JobQueueEventBus.php
+++ b/JobQueueEventBus.php
@@ -91,7 +91,7 @@
// (job ID => job fields map)
$events = [];
foreach ( $jobs as $job ) {
-   $item = JobQueueEventBus::createJobEvent( $job );
+   $item = self::createJobEvent( $job );
// hash identifier => de-duplicate
if ( strlen( $item['sha1'] ) ) {
$events[$item['sha1']] = $item;
diff --git a/composer.json b/composer.json
index f251a24..8a2ae1a 100644
--- a/composer.json
+++ b/composer.json
@@ -6,7 +6,7 @@
"minimum-stability": "dev",
"require-dev": {
"jakub-onderka/php-parallel-lint": "0.9.2",
-   "mediawiki/mediawiki-codesniffer": "0.10.0",
+   "mediawiki/mediawiki-codesniffer": "0.10.1",
"jakub-onderka/php-console-highlighter": "0.3.2"
},
"scripts": {
diff --git a/phpcs.xml b/phpcs.xml
index 9f9280f..bb74509 100644
--- a/phpcs.xml
+++ b/phpcs.xml
@@ -6,6 +6,4 @@
.


-   node_modules
-   vendor
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I677062bbac26a0dee62c1d115a4f0a3dc20c757a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/EventBus
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 

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


  1   2   3   4   >