[MediaWiki-commits] [Gerrit] mediawiki...Flow[master]: Switch TestingAccessWrapper to librarized version

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

Change subject: Switch TestingAccessWrapper to librarized version
..

Switch TestingAccessWrapper to librarized version

Change-Id: I28a7200f44bfce8f0993f1adfc764a82ddda5115
---
M composer.json
M tests/phpunit/Notifications/NotificationControllerTest.php
2 files changed, 3 insertions(+), 2 deletions(-)


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

diff --git a/composer.json b/composer.json
index f917e63..5263250 100644
--- a/composer.json
+++ b/composer.json
@@ -8,7 +8,8 @@
"require-dev": {
"symfony/dom-crawler": "~2.5",
"symfony/css-selector": "~2.5",
-   "jakub-onderka/php-parallel-lint": "0.9.2"
+   "jakub-onderka/php-parallel-lint": "0.9.2",
+   "wikimedia/testing-access-wrapper": "~1.0"
},
"scripts": {
"test": [
diff --git a/tests/phpunit/Notifications/NotificationControllerTest.php 
b/tests/phpunit/Notifications/NotificationControllerTest.php
index 0189aac..dad904b 100644
--- a/tests/phpunit/Notifications/NotificationControllerTest.php
+++ b/tests/phpunit/Notifications/NotificationControllerTest.php
@@ -4,7 +4,7 @@
 
 use Flow\Container;
 use Flow\Model\UUID;
-use TestingAccessWrapper;
+use Wikimedia\TestingAccessWrapper;
 
 // See also NotitifiedUsersTest
 /**

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

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

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


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

2017-04-19 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349087 )

Change subject: Update libs
..

Update libs

PHP-Queue to upstream, add psr\cache

Change-Id: I8f491feeae755a6bb14543a75cda452762c39611
---
D coderkungfu/php-queue/.gitreview
M coderkungfu/php-queue/README.md
M coderkungfu/php-queue/composer.json
M coderkungfu/php-queue/demo/queues/BeanstalkSampleQueue.php
M coderkungfu/php-queue/demo/runners/README.md
M coderkungfu/php-queue/src/PHPQueue/Backend/Beanstalkd.php
M coderkungfu/php-queue/src/PHPQueue/Backend/IronMQ.php
M coderkungfu/php-queue/src/PHPQueue/Backend/Memcache.php
M coderkungfu/php-queue/src/PHPQueue/Backend/MongoDB.php
M coderkungfu/php-queue/src/PHPQueue/Backend/PDO.php
M coderkungfu/php-queue/src/PHPQueue/Backend/Predis.php
M coderkungfu/php-queue/src/PHPQueue/Backend/Stomp.php
D coderkungfu/php-queue/src/PHPQueue/Interfaces/IndexedFifoQueueStore.php
D coderkungfu/php-queue/src/PHPQueue/Interfaces/KeyValueStore.php
M coderkungfu/php-queue/test/PHPQueue/Backend/PredisTest.php
D coderkungfu/php-queue/test/PHPQueue/Backend/PredisZsetTest.php
M composer/autoload_psr4.php
M composer/autoload_static.php
M composer/installed.json
A psr/cache/CHANGELOG.md
A psr/cache/LICENSE.txt
A psr/cache/README.md
A psr/cache/composer.json
A psr/cache/src/CacheException.php
A psr/cache/src/CacheItemInterface.php
A psr/cache/src/CacheItemPoolInterface.php
A psr/cache/src/InvalidArgumentException.php
27 files changed, 450 insertions(+), 432 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/SmashPig/vendor 
refs/changes/87/349087/1

diff --git a/coderkungfu/php-queue/.gitreview b/coderkungfu/php-queue/.gitreview
deleted file mode 100644
index ffb389a..000
--- a/coderkungfu/php-queue/.gitreview
+++ /dev/null
@@ -1,6 +0,0 @@
-[gerrit]
-host=gerrit.wikimedia.org
-port=29418
-project=wikimedia/fundraising/php-queue.git
-defaultbranch=master
-defaultrebase=0
diff --git a/coderkungfu/php-queue/README.md b/coderkungfu/php-queue/README.md
index c69cef1..74ff0e7 100644
--- a/coderkungfu/php-queue/README.md
+++ b/coderkungfu/php-queue/README.md
@@ -1,4 +1,4 @@
-#PHP-Queue#
+# PHP-Queue #
 [![Gitter](https://badges.gitter.im/Join 
Chat.svg)](https://gitter.im/CoderKungfu/php-queue?utm_source=badge_medium=badge_campaign=pr-badge_content=badge)
 
 A unified front-end for different queuing backends. Includes a REST server, 
CLI interface and daemon runners.
@@ -190,16 +190,6 @@
 * FifoQueueStore
 
 A first in first out queue accessed by push and pop.
-
-* IndexedFifoQueueStore
-
-Messages are indexed along one column as they are pushed into a FIFO queue,
-otherwise these behave like FifoQueueStore. clear() deletes records by index.
-There is no get() operation, you'll need a KeyValueStore for that.
-
-* KeyValueStore
-
-Jobs can be retrieved and deleted by their index.
 
 ---
 ## License ##
diff --git a/coderkungfu/php-queue/composer.json 
b/coderkungfu/php-queue/composer.json
index f75d7ef..085c069 100644
--- a/coderkungfu/php-queue/composer.json
+++ b/coderkungfu/php-queue/composer.json
@@ -23,21 +23,19 @@
 "clio/clio": "0.1.*"
 },
 "require-dev": {
-"jakub-onderka/php-parallel-lint": "0.9",
-"phpunit/phpunit": "4.4.*"
-},
-"scripts": {
-"test": [
-"parallel-lint . --exclude vendor",
-"phpunit"
-]
+"mrpoundsign/pheanstalk-5.3": "dev-master",
+"aws/aws-sdk-php": "dev-master",
+"amazonwebservices/aws-sdk-for-php": "dev-master",
+"predis/predis": "1.*",
+"iron-io/iron_mq": "dev-master",
+"ext-memcache": "*",
+"microsoft/windowsazure": "dev-master"
 },
 "suggest": {
 "predis/predis": "For Redis backend support",
 "mrpoundsign/pheanstalk-5.3": "For Beanstalkd backend support",
 "aws/aws-sdk-php": "For AWS SQS backend support",
 "amazonwebservices/aws-sdk-for-php": "For AWS SQS backend support 
(legacy version)",
-"ext-memcache": "*",
 "pecl-mongodb": "For MongoDB backend support",
 "clio/clio": "Support for daemonizing PHP CLI runner",
 "iron-io/iron_mq": "For IronMQ backend support",
diff --git a/coderkungfu/php-queue/demo/queues/BeanstalkSampleQueue.php 
b/coderkungfu/php-queue/demo/queues/BeanstalkSampleQueue.php
index 158f339..9335e4f 100644
--- a/coderkungfu/php-queue/demo/queues/BeanstalkSampleQueue.php
+++ b/coderkungfu/php-queue/demo/queues/BeanstalkSampleQueue.php
@@ -19,10 +19,10 @@
 );
 }
 
-public function addJob($newJob = null)
+public function addJob($newJob = null, $DEFAULT_PRIORITY=1024, 
$DEFAULT_DELAY=0, $DEFAULT_TTR=60)
 {
 $formatted_data = array('worker'=>$this->queueWorker, 'data'=>$newJob);
-$this->dataSource->add($formatted_data);
+$this->dataSource->add($formatted_data, $DEFAULT_PRIORITY, 
$DEFAULT_DELAY, 

[MediaWiki-commits] [Gerrit] wikimedia...SmashPig[master]: WIP Get rid of MultiQueueWriter, 'verified' alias

2017-04-19 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349086 )

Change subject: WIP Get rid of MultiQueueWriter, 'verified' alias
..

WIP Get rid of MultiQueueWriter, 'verified' alias

Change-Id: I2b6b220e1381687f9a117f1e0f2ab34cf2475738
---
M PaymentProviders/Adyen/Jobs/ProcessCaptureRequestJob.php
M PaymentProviders/Adyen/Jobs/RecordCaptureJob.php
M PaymentProviders/Amazon/ExpatriatedMessages/CaptureCompleted.php
M PaymentProviders/AstroPay/ExpatriatedMessages/PaymentMessage.php
M PaymentProviders/GlobalCollect/ExpatriatedMessages/PaymentMessage.php
M SmashPig.yaml
6 files changed, 8 insertions(+), 14 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/SmashPig 
refs/changes/86/349086/1

diff --git a/PaymentProviders/Adyen/Jobs/ProcessCaptureRequestJob.php 
b/PaymentProviders/Adyen/Jobs/ProcessCaptureRequestJob.php
index 50a0bc8..ffb4bb3 100644
--- a/PaymentProviders/Adyen/Jobs/ProcessCaptureRequestJob.php
+++ b/PaymentProviders/Adyen/Jobs/ProcessCaptureRequestJob.php
@@ -62,7 +62,7 @@
);
 
// Determine if a message exists in the pending database; if it 
does not then
-   // this payment has already been sent to the verified queue, or 
there is a
+   // this payment has already been sent to the donations queue, 
or there is a
// problem with the database. If it does exist, we need to check
// $capture_requested in case we have requested a capture but 
have not yet
// received notification of capture success. Either case can 
occur when a
diff --git a/PaymentProviders/Adyen/Jobs/RecordCaptureJob.php 
b/PaymentProviders/Adyen/Jobs/RecordCaptureJob.php
index bdcb117..3162cae 100644
--- a/PaymentProviders/Adyen/Jobs/RecordCaptureJob.php
+++ b/PaymentProviders/Adyen/Jobs/RecordCaptureJob.php
@@ -10,7 +10,7 @@
 
 /**
  * Job that merges a capture IPN message from Adyen with donor info from the
- * pending database, then places that into the verified queue.
+ * pending database, then places that into the donations queue.
  *
  * Class RecordCaptureJob
  *
@@ -56,9 +56,9 @@
 
// Add the gateway transaction ID and send it to the 
completed queue
$dbMessage['gateway_txn_id'] = $this->originalReference;
-   $queueMessage = DonationInterfaceMessage::fromValues( 
$dbMessage );
-   SourceFields::addToMessage( $queueMessage );
-   $config->object( 'data-store/verified' )->push( 
$queueMessage );
+
+   SourceFields::addToMessage( $dbMessage );
+   $config->object( 'data-store/donations' )->push( 
$dbMessage );
 
// Remove it from the pending database
$logger->debug( 'Removing donor details message from 
pending database' );
diff --git a/PaymentProviders/Amazon/ExpatriatedMessages/CaptureCompleted.php 
b/PaymentProviders/Amazon/ExpatriatedMessages/CaptureCompleted.php
index 83d75de..61aa236 100644
--- a/PaymentProviders/Amazon/ExpatriatedMessages/CaptureCompleted.php
+++ b/PaymentProviders/Amazon/ExpatriatedMessages/CaptureCompleted.php
@@ -2,6 +2,6 @@
 
 class CaptureCompleted extends PaymentCapture {
public function getDestinationQueue() {
-   return 'verified';
+   return 'donations';
}
 }
diff --git a/PaymentProviders/AstroPay/ExpatriatedMessages/PaymentMessage.php 
b/PaymentProviders/AstroPay/ExpatriatedMessages/PaymentMessage.php
index efe2fc6..9272ffc 100644
--- a/PaymentProviders/AstroPay/ExpatriatedMessages/PaymentMessage.php
+++ b/PaymentProviders/AstroPay/ExpatriatedMessages/PaymentMessage.php
@@ -5,6 +5,6 @@
  */
 class PaymentMessage extends AstroPayMessage {
public function getDestinationQueue() {
-   return 'verified';
+   return 'donations';
}
 }
diff --git 
a/PaymentProviders/GlobalCollect/ExpatriatedMessages/PaymentMessage.php 
b/PaymentProviders/GlobalCollect/ExpatriatedMessages/PaymentMessage.php
index d0cba42..303d8af 100644
--- a/PaymentProviders/GlobalCollect/ExpatriatedMessages/PaymentMessage.php
+++ b/PaymentProviders/GlobalCollect/ExpatriatedMessages/PaymentMessage.php
@@ -33,6 +33,6 @@
 
public function getDestinationQueue() {
// XXX
-   return 'verified';
+   return 'donations';
}
 }
diff --git a/SmashPig.yaml b/SmashPig.yaml
index 019294a..dc0a2f7 100644
--- a/SmashPig.yaml
+++ b/SmashPig.yaml
@@ -72,12 +72,6 @@
 <<: *REDIS
 queue: jobs-adyen
 
-verified:
-class: SmashPig\Core\DataStores\MultiQueueWriter
-constructor-parameters:
--
-- donations
-
 donations:
 class: PHPQueue\Backend\Predis
 

[MediaWiki-commits] [Gerrit] mediawiki/core[wmf/1.29.0-wmf.20]: resourceloader: Move mwNow() to after isCompatible()

2017-04-19 Thread Krinkle (Code Review)
Krinkle has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349085 )

Change subject: resourceloader: Move mwNow() to after isCompatible()
..

resourceloader: Move mwNow() to after isCompatible()

Follows-up f2fb4a21af. This is logically still the same point in time.
Only 1 function before it now, isCompatible(), which is fine since it
is small and the variable is not used anyway if it returns false.

Change-Id: I34bbe8edf6e9625f8d80f829707adafcb1b91980
(cherry picked from commit 7b2da95a9814beb05112ea2860433499967ab1b9)
---
M resources/src/startup.js
1 file changed, 7 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/85/349085/1

diff --git a/resources/src/startup.js b/resources/src/startup.js
index ad06b34..e0df772 100644
--- a/resources/src/startup.js
+++ b/resources/src/startup.js
@@ -1,7 +1,8 @@
 /**
- * Code in this file MUST work on even the most ancient of browsers!
+ * This file is where we decide whether to initialise the Grade A run-time.
  *
- * This file is where we decide whether to initialise the modern run-time.
+ * - Beware: This file MUST parse without errors on even the most ancient of 
browsers!
+ * - Beware: Do not call mwNow before the isCompatible() check.
  */
 
 /* global mw, $VARS, $CODE */
@@ -18,9 +19,7 @@
function () { return Date.now(); };
}() ),
// eslint-disable-next-line no-unused-vars
-   mediaWikiLoadStart = mwNow();
-
-mwPerformance.mark( 'mwLoadStart' );
+   mediaWikiLoadStart;
 
 /**
  * See 
@@ -153,6 +152,9 @@
};
}
 
+   mediaWikiLoadStart = mwNow();
+   mwPerformance.mark( 'mwLoadStart' );
+
script = document.createElement( 'script' );
script.src = $VARS.baseModulesUri;
script.onload = script.onreadystatechange = function () {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I34bbe8edf6e9625f8d80f829707adafcb1b91980
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.29.0-wmf.20
Gerrit-Owner: Krinkle 

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


[MediaWiki-commits] [Gerrit] wikimedia...SmashPig[master]: Use upstream php-queue

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

Change subject: Use upstream php-queue
..


Use upstream php-queue

All our changes are included!
TODO: get it versioned and get off dev-master.

Bug: T133754
Change-Id: I5cada07936e0dcfb1c1b64f198419d9d67135acc
---
M composer.json
M composer.lock
2 files changed, 19 insertions(+), 18 deletions(-)

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



diff --git a/composer.json b/composer.json
index 85b7ee2..8b47d11 100644
--- a/composer.json
+++ b/composer.json
@@ -50,10 +50,6 @@
 },
 "repositories": [
 {
-"type": "vcs",
-"url": 
"https://gerrit.wikimedia.org/r/p/wikimedia/fundraising/php-queue.git;
-},
-{
 "type": "git",
 "url": "https://github.com/ejegg/login-and-pay-with-amazon-sdk-php;
 }
diff --git a/composer.lock b/composer.lock
index fb523f3..9555a05 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,8 +4,8 @@
 "Read more about it at 
https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file;,
 "This file is @generated automatically"
 ],
-"hash": "ec39d762470b5844acb8b7cc5e9fa91e",
-"content-hash": "f603529753b80b4b5ed3b7ff87d6d176",
+"hash": "6c8507e66b7c74d4ba3a5d17be72b11a",
+"content-hash": "c773f5366be4497f7a4678ac23b526d1",
 "packages": [
 {
 "name": "amzn/login-and-pay-with-amazon-sdk-php",
@@ -92,8 +92,14 @@
 "version": "dev-master",
 "source": {
 "type": "git",
-"url": 
"https://gerrit.wikimedia.org/r/p/wikimedia/fundraising/php-queue.git;,
-"reference": "d56c5bd69dad595f2e00a3e10c851736b1feb57b"
+"url": "https://github.com/CoderKungfu/php-queue.git;,
+"reference": "dd8412f105632d31cdd77933ec40a08640752c99"
+},
+"dist": {
+"type": "zip",
+"url": 
"https://api.github.com/repos/CoderKungfu/php-queue/zipball/dd8412f105632d31cdd77933ec40a08640752c99;,
+"reference": "dd8412f105632d31cdd77933ec40a08640752c99",
+"shasum": ""
 },
 "require": {
 "clio/clio": "0.1.*",
@@ -101,15 +107,19 @@
 "php": ">=5.3.0"
 },
 "require-dev": {
-"jakub-onderka/php-parallel-lint": "0.9",
-"phpunit/phpunit": "4.4.*"
+"amazonwebservices/aws-sdk-for-php": "dev-master",
+"aws/aws-sdk-php": "dev-master",
+"ext-memcache": "*",
+"iron-io/iron_mq": "dev-master",
+"microsoft/windowsazure": "dev-master",
+"mrpoundsign/pheanstalk-5.3": "dev-master",
+"predis/predis": "1.*"
 },
 "suggest": {
 "Respect/Rest": "For a REST server to post job data",
 "amazonwebservices/aws-sdk-for-php": "For AWS SQS backend 
support (legacy version)",
 "aws/aws-sdk-php": "For AWS SQS backend support",
 "clio/clio": "Support for daemonizing PHP CLI runner",
-"ext-memcache": "*",
 "fusesource/stomp-php": "For the STOMP backend",
 "iron-io/iron_mq": "For IronMQ backend support",
 "microsoft/windowsazure": "For Windows Azure Service Bus 
backend support",
@@ -128,12 +138,7 @@
 "PHPQueue": "src/"
 }
 },
-"scripts": {
-"test": [
-"parallel-lint . --exclude vendor",
-"phpunit"
-]
-},
+"notification-url": "https://packagist.org/downloads/;,
 "license": [
 "MIT"
 ],
@@ -149,7 +154,7 @@
 "queue",
 "transaction"
 ],
-"time": "2017-01-04 21:01:15"
+"time": "2017-04-17 14:11:55"
 },
 {
 "name": "ircmaxell/password-compat",

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5cada07936e0dcfb1c1b64f198419d9d67135acc
Gerrit-PatchSet: 2
Gerrit-Project: wikimedia/fundraising/SmashPig
Gerrit-Branch: master
Gerrit-Owner: Ejegg 
Gerrit-Reviewer: Awight 
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] mediawiki...CollaborationKit[master]: Switching hub feature edit order and adding purge button

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

Change subject: Switching hub feature edit order and adding purge button
..


Switching hub feature edit order and adding purge button

Bug: T160879
Change-Id: I6edf80fca99d8004c168ee4ccb7e7db0ae4013ff
---
M i18n/en.json
M i18n/qqq.json
M includes/SpecialCreateHubFeature.php
M includes/content/CollaborationHubContent.php
M tests/phpunit/CollaborationHubContentTest.php
5 files changed, 70 insertions(+), 62 deletions(-)

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



diff --git a/i18n/en.json b/i18n/en.json
index e98ab28..74caeb9 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -76,8 +76,9 @@
"collaborationkit-hub-members-header": "Meet our members!",
"collaborationkit-hub-members-signup": "Join",
"collaborationkit-hub-members-view": "View full list",
-   "collaborationkit-hub-missingpage-note": "This feature does not exist. 
You can create a new feature using the button below.",
+   "collaborationkit-hub-missingpage-note": "This feature does not exist. 
You can create a new feature using the button below. If you just created the 
feature and you're still seeing this message, try purging the cache.",
"collaborationkit-hub-missingpage-create": "Create feature",
+   "collaborationkit-hub-missingpage-purgecache": "Purge cache",
"collaborationkit-hub-pagetitle-members": "Members",
"collaborationkit-hub-pagetitle-announcements": "Announcements",
"collaborationkit-hub-subpage-view": "View page",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index a877f3d..8e171bc 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -81,6 +81,7 @@
"collaborationkit-hub-members-view": "Label for the 'view all' button 
in the members block",
"collaborationkit-hub-missingpage-note": "Note and helpt text for 
missing feature sections (subpages) on a collaboration hub mainpage",
"collaborationkit-hub-missingpage-create": "Button label for creating a 
new feature (subpage)",
+   "collaborationkit-hub-missingpage-purgecache": "Button for purging page 
cache",
"collaborationkit-hub-pagetitle-members": "The title of the /Members 
subpage for a Collaboration Hub (without the leading 
slash)\n{{Identical|Member}}",
"collaborationkit-hub-pagetitle-announcements": "The title of the 
/Announcements subpage for a Collaboration Hub (without the leading 
slash)\n{{Identical|Announcement}}",
"collaborationkit-hub-subpage-view": "View link label for subpages on 
Collaboration Hub mainpages\n{{Identical|View page}}",
diff --git a/includes/SpecialCreateHubFeature.php 
b/includes/SpecialCreateHubFeature.php
index 3214cd2..53a1516 100644
--- a/includes/SpecialCreateHubFeature.php
+++ b/includes/SpecialCreateHubFeature.php
@@ -133,6 +133,63 @@
return Status::newFatal( 
'collaborationkit-createhubfeature-nopermission' );
}
 
+   // Create feature
+   $contentModel = $data[ 'contenttype' ];
+   if ( $contentModel != 'wikitext'
+   && $contentModel != 'CollaborationListContent' )
+   {
+   return Status::newFatal( 
'collaborationkit-createhubfeature-invalidcontenttype' );
+   }
+
+   if ( $contentModel == 'wikitext' ) {
+   $contentFormat = 'text/x-wiki';
+   } elseif ( $contentModel == 'CollaborationListContent' ) {
+   $contentFormat = 'application/json';
+   } else {
+   return Status::newFatal( 
'collaborationkit-createhubfeature-invalidcontenttype' );
+   }
+
+   // Create empty page by default; exception is if there needs to 
be
+   // something such as JSON.
+   $initialContent = '';
+   if ( $contentModel == 'CollaborationListContent' ) {
+   $initialContent = 
CollaborationListContentHandler::serializeContent(
+   
CollaborationListContentHandler::makeEmptyContent()
+   );
+   }
+
+   $summary = $this
+   ->msg( 'collaborationkit-createhubfeature-editsummary' )
+   ->plain();
+
+   $context = $this->getContext();
+   $der = new DerivativeContext( $context );
+   $request = new DerivativeRequest(
+   $context->getRequest(),
+   [
+   'action' => 'edit',
+   'title' => $title->getFullText(),
+   'contentmodel' => $contentModel,
+   'contentformat' => $contentFormat,
+   'text' => $initialContent,
+   

[MediaWiki-commits] [Gerrit] mediawiki...CollaborationKit[master]: Avoid logs about unexpected writes from special page.

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

Change subject: Avoid logs about unexpected writes from special page.
..


Avoid logs about unexpected writes from special page.

Change-Id: I2dc2868e3f884b7799216573d83a62d5304e933b
---
M includes/SpecialCreateCollaborationHub.php
M includes/SpecialCreateHubFeature.php
2 files changed, 8 insertions(+), 0 deletions(-)

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



diff --git a/includes/SpecialCreateCollaborationHub.php 
b/includes/SpecialCreateCollaborationHub.php
index 7528058..321fab6 100644
--- a/includes/SpecialCreateCollaborationHub.php
+++ b/includes/SpecialCreateCollaborationHub.php
@@ -17,6 +17,10 @@
parent::__construct( $name, $right );
}
 
+   public function doesWrites() {
+   return true;
+   }
+
/**
 * @param $par string
 */
diff --git a/includes/SpecialCreateHubFeature.php 
b/includes/SpecialCreateHubFeature.php
index e18fe11..3214cd2 100644
--- a/includes/SpecialCreateHubFeature.php
+++ b/includes/SpecialCreateHubFeature.php
@@ -13,6 +13,10 @@
parent::__construct( 'CreateHubFeature' );
}
 
+   public function doesWrites() {
+   return true;
+   }
+
/**
 * @param string $par
 */

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2dc2868e3f884b7799216573d83a62d5304e933b
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/CollaborationKit
Gerrit-Branch: master
Gerrit-Owner: Brian Wolff 
Gerrit-Reviewer: Harej 
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...CollaborationKit[master]: Be more defensive about checking revision is present

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

Change subject: Be more defensive about checking revision is present
..


Be more defensive about checking revision is present

This will make race conditions be handled gracefully at
least.

Bug: T160937
Change-Id: Ibc2ed46691781ccdba68545ce838ef6a6bb48aaf
---
M includes/content/CollaborationHubContent.php
1 file changed, 27 insertions(+), 16 deletions(-)

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

Objections:
  Reedy: There's a problem with this change, please improve



diff --git a/includes/content/CollaborationHubContent.php 
b/includes/content/CollaborationHubContent.php
index c17b0f2..d28dcf2 100644
--- a/includes/content/CollaborationHubContent.php
+++ b/includes/content/CollaborationHubContent.php
@@ -431,26 +431,37 @@
);
 
if ( $membersContent === null ) {
-   $membersContent = Revision::newFromTitle(
+   $membersRevision = Revision::newFromTitle(
$membersTitle,
0,
Revision::READ_LATEST
-   )->getContent();
+   );
+   if ( $membersRevision ) {
+   $membersContent = 
$membersRevision->getContent();
+   }
}
-   $activeCol = wfMessage( 
'collaborationkit-column-active' )
-   ->inContentLanguage()
-   ->plain();
-   $wikitext = $membersContent->convertToWikitext(
-   $lang,
-   [
-   'includeDesc' => false,
-   'maxItems' => 3,
-   'defaultSort' => 'random',
-   'columns' => [ $activeCol ],
-   'showColumnHeaders' => false,
-   'iconWidth' => 32
-   ]
-   );
+   if ( $membersContent && $membersContent instanceof 
CollaborationListContent ) {
+   $activeCol = wfMessage( 
'collaborationkit-column-active' )
+   ->inContentLanguage()
+   ->plain();
+   $wikitext = $membersContent->convertToWikitext(
+   $lang,
+   [
+   'includeDesc' => false,
+   'maxItems' => 3,
+   'defaultSort' => 'random',
+   'columns' => [ $activeCol ],
+   'showColumnHeaders' => false,
+   'iconWidth' => 32
+   ]
+   );
+   } else {
+   // Some sort of error occured. Probably
+   // a race condition.
+   // No i18n for this error message, since
+   // it should never happen.
+   $wikitext = 'Cannot include 
member list';
+   }
 
$html .= $wgParser
->parse( $wikitext, $membersTitle, $options )

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibc2ed46691781ccdba68545ce838ef6a6bb48aaf
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/CollaborationKit
Gerrit-Branch: master
Gerrit-Owner: Brian Wolff 
Gerrit-Reviewer: Harej 
Gerrit-Reviewer: Reedy 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] oojs/ui[master]: MediaWiki theme: Increase contrast slightly on non-primary, ...

2017-04-19 Thread VolkerE (Code Review)
VolkerE has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349027 )

Change subject: MediaWiki theme: Increase contrast slightly on non-primary, 
destructive buttons
..

MediaWiki theme: Increase contrast slightly on non-primary, destructive buttons

Make them conform to WCAG 2.0 level AA by using adapted shade of Red50 `#d33`.

Change-Id: Ibcffd71fd1200b1987931135d3441db689d0dcd4
---
M src/themes/mediawiki/common.less
M src/themes/mediawiki/elements.less
2 files changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/27/349027/1

diff --git a/src/themes/mediawiki/common.less b/src/themes/mediawiki/common.less
index 49cf417..0907636 100644
--- a/src/themes/mediawiki/common.less
+++ b/src/themes/mediawiki/common.less
@@ -27,6 +27,7 @@
 
 @background-color-destructive: #fbe8e7; // equals `fade( @color-destructive, 
10% )`
 @color-destructive: #d33; // equals HSB 360°/77%/87%
+@color-destructive-non-primary: #d7; // Exemption for non-primary buttons, 
foremost used in VE, lightened up R50 to align to AA contrast ratio
 @color-destructive-hover: #ff4242; // equals HSB 360°/74%/100%
 @color-destructive-active: #b32424; // equals HSB 360°/80%/70%
 @color-destructive-focus: @color-destructive;
diff --git a/src/themes/mediawiki/elements.less 
b/src/themes/mediawiki/elements.less
index ff51236..24c79cb 100644
--- a/src/themes/mediawiki/elements.less
+++ b/src/themes/mediawiki/elements.less
@@ -326,7 +326,7 @@
}
 
&-destructive {
-   .mw-framed-button-colored( 
~'.oo-ui-buttonElement-button', @color-destructive, 
@background-color-framed-hover, @border-color-framed-destructive-hover, 
@color-destructive-active, @color-destructive-focus );
+   .mw-framed-button-colored( 
~'.oo-ui-buttonElement-button', @color-destructive-non-primary, 
@background-color-framed-hover, @border-color-framed-destructive-hover, 
@color-destructive-active, @color-destructive-focus );
}
}
 

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

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

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


[MediaWiki-commits] [Gerrit] wikimedia...relevanceForge[master]: Update relevance.ini sample to current working config

2017-04-19 Thread Tjones (Code Review)
Tjones has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349026 )

Change subject: Update relevance.ini sample to current working config
..

Update relevance.ini sample to current working config

Change-Id: I82c0c0fddf8a775fcef96f7b5f12a6acbd72c30d
---
M relevance.ini
1 file changed, 3 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/discovery/relevanceForge 
refs/changes/26/349026/1

diff --git a/relevance.ini b/relevance.ini
index 3a4a368..aba26b7 100644
--- a/relevance.ini
+++ b/relevance.ini
@@ -1,11 +1,12 @@
 ; Example config file
 [settings]
 ; Host to run queries on
-labHost = suggesty.eqiad.wmflabs
+labHost = relforge-search.search.eqiad.wmflabs
 ; Command to run a query
 ;   --explain to include scoring information
 ;   --limit 100 to increase the number of results (defaults to 10)
-searchCommand = sudo -u vagrant mwscript 
extensions/CirrusSearch/maintenance/runSearch.php --baseName=enwiki
+;   --fork 16 to run 16 queries in parallel
+searchCommand = cd /srv/mediawiki-vagrant && mwvagrant ssh -- mwscript 
extensions/CirrusSearch/maintenance/runSearch.php --wiki wiki --server 
zh-wp-spaceless-relforge.wmflabs.org --fork 16 --limit 20
 ; Working directory
 workDir = ./relevance
 ; JSON Diff tool

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I82c0c0fddf8a775fcef96f7b5f12a6acbd72c30d
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/discovery/relevanceForge
Gerrit-Branch: master
Gerrit-Owner: Tjones 

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


[MediaWiki-commits] [Gerrit] integration/config[master]: Add dependency for SimpleSAMLphp on PluggableAuth.

2017-04-19 Thread Cicalese (Code Review)
Cicalese has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349017 )

Change subject: Add dependency for SimpleSAMLphp on PluggableAuth.
..

Add dependency for SimpleSAMLphp on PluggableAuth.

Change-Id: I995597ec9e1b0b8d24299e4254a7b4d71b3841fe
---
M zuul/parameter_functions.py
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/17/349017/2

diff --git a/zuul/parameter_functions.py b/zuul/parameter_functions.py
index f3e17bb..4312a57 100644
--- a/zuul/parameter_functions.py
+++ b/zuul/parameter_functions.py
@@ -204,6 +204,7 @@
 'Score': ['VisualEditor'],
 'SemanticImageInput': ['SemanticMediaWiki'],
 'SemanticSifter': ['SemanticMediaWiki'],
+'SimpleSAMLphp': ['PluggableAuth'],
 'SimpleSurvey': ['PrefSwitch'],
 'SolrStore': ['SemanticMediaWiki'],
 'SpellingDictionary': ['UniversalLanguageSelector'],

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I995597ec9e1b0b8d24299e4254a7b4d71b3841fe
Gerrit-PatchSet: 2
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Cicalese 
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...VisualEditor[master]: ve.ui.MWCategoryPopupWidget: Fix popup positioning

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

Change subject: ve.ui.MWCategoryPopupWidget: Fix popup positioning
..

ve.ui.MWCategoryPopupWidget: Fix popup positioning

Figuring out why it broke doesn't seem like a very interesting task,
so let's just throw the whole logic out and use OOjs UI PopupWidget's
new built-in ability to position itself relative to anything.

Bug: T163269
Change-Id: Ie464e4668001f4bc6151b40cef469937aa8c6e48
---
M modules/ve-mw/ui/widgets/ve.ui.MWCategoryPopupWidget.js
1 file changed, 1 insertion(+), 8 deletions(-)


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

diff --git a/modules/ve-mw/ui/widgets/ve.ui.MWCategoryPopupWidget.js 
b/modules/ve-mw/ui/widgets/ve.ui.MWCategoryPopupWidget.js
index d5fa7f7..4ad25a7 100644
--- a/modules/ve-mw/ui/widgets/ve.ui.MWCategoryPopupWidget.js
+++ b/modules/ve-mw/ui/widgets/ve.ui.MWCategoryPopupWidget.js
@@ -184,13 +184,6 @@
  * @param {ve.ui.MWCategoryItemWidget} item Category item
  */
 ve.ui.MWCategoryPopupWidget.prototype.setPopup = function ( item ) {
-   var pos = OO.ui.Element.static.getRelativePosition( item.$indicator, 
this.$element.offsetParent() );
-
-   // Align to the middle of the indicator
-   pos.left += item.$indicator.width() / 2;
-   // Position below the indicator
-   pos.top += item.$indicator.height();
-
-   this.$element.css( pos );
+   this.setFloatableContainer( item.$element );
this.updateDimensions();
 };

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...Linter[master]: Change severity levels for stripped-tag & misnested-tag

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

Change subject: Change severity levels for stripped-tag & misnested-tag
..


Change severity levels for stripped-tag & misnested-tag

* stripped-tag is harmless and should be a warning.
* misnested-tag could be changing intent of markup and should
  be an error.

Change-Id: I42fdab1c0e2f0793ca3845d28880388244b65527
---
M extension.json
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/extension.json b/extension.json
index 0ce21f0..8931304 100644
--- a/extension.json
+++ b/extension.json
@@ -74,7 +74,7 @@
"enabled": true
},
"stripped-tag": {
-   "severity": "error",
+   "severity": "warning",
"enabled": true
},
"self-closed-tag": {
@@ -86,7 +86,7 @@
"enabled": true
},
"misnested-tag": {
-   "severity": "warning",
+   "severity": "error",
"enabled": true
},
"pwrap-bug-workaround": {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I42fdab1c0e2f0793ca3845d28880388244b65527
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Linter
Gerrit-Branch: master
Gerrit-Owner: Subramanya Sastry 
Gerrit-Reviewer: Arlolra 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Subramanya Sastry 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...CollaborationKit[master]: Removed "successfully" from messages

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

Change subject: Removed "successfully" from messages
..


Removed "successfully" from messages

According to
https://www.mediawiki.org/wiki/Localisation#Avoid_jargon_and_slang

Change-Id: I75a38698c2720ecfeb7c1c3962a47bf49f8b98b1
---
M i18n/en.json
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/i18n/en.json b/i18n/en.json
index 8d37960..e98ab28 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -40,7 +40,7 @@
"collaborationkit-list-toomanytags": "You are not allowed to specify 
more than {{PLURAL:$1|one tag|$1 tags}}.",
"collaborationkit-list-delete": "Remove item",
"collaborationkit-list-delete-summary": "/* $1 */ Deleting from list.",
-   "collaborationkit-list-delete-popup": "Successfully saved: $1 was 
deleted from the list.",
+   "collaborationkit-list-delete-popup": "Saved: $1 was deleted from the 
list.",
"collaborationkit-list-delete-popup-title": "Item Deleted",
"collaborationkit-list-add": "Add new item to list",
"collaborationkit-list-add-user": "Add user to list",
@@ -54,7 +54,7 @@
"collaborationkit-list-error-saving": "Your edits to the list were not 
saved. Please refresh the page and try again.",
"collaborationkit-list-move": "Re-order this item",
"collaborationkit-list-move-summary": "/* $1 */ Reordering item [[$1]]",
-   "collaborationkit-list-move-popup": "Successfully saved: $1 was 
re-ordered.",
+   "collaborationkit-list-move-popup": "Saved: $1 was re-ordered.",
"collaborationkit-list-move-popup-title": "Page Saved",
"collaborationkit-list-newitem-title": "Add item to list",
"collaborationkit-list-newitem-label": "Add to list",

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I75a38698c2720ecfeb7c1c3962a47bf49f8b98b1
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/CollaborationKit
Gerrit-Branch: master
Gerrit-Owner: Amire80 
Gerrit-Reviewer: Harej 
Gerrit-Reviewer: Siebrand 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Add support for nested tags in extensions

2017-04-19 Thread Sophivorus (Code Review)
Sophivorus has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349016 )

Change subject: Add support for nested tags in extensions
..

Add support for nested tags in extensions

Bug: T3310
Change-Id: I262f9813c58c43c93655f2fb03c1d8155e3ba19f
---
A includes/parser/NestingTest.php
M includes/parser/Preprocessor_DOM.php
2 files changed, 98 insertions(+), 14 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/16/349016/1

diff --git a/includes/parser/NestingTest.php b/includes/parser/NestingTest.php
new file mode 100644
index 000..c063ce3
--- /dev/null
+++ b/includes/parser/NestingTest.php
@@ -0,0 +1,58 @@
+123", "foo", "123", [] ],
+   [ "foo", "foo", "foo", [] ],
+   [ "AfooB", "foo", "foo", [] ],
+   [ "A123456789B", "foo", 
"123456789", [ "a" => "1", "b" => "foo" ] ],
+   [ " "citation:1" ]
+   ],
+   [ "", "ref", "", [ "name" => 
"x", "foo" => "foo" ] ]
+   ];
+   }
+
+   function provideNotWorkingCases() {
+   return [
+   [ "123", "foo", null, null ],
+   [ "123456", "foo", "123456", [ 
"foo" => "123" ] ],
+   );
+   }
+
+   var $mInnerText;
+   var $mParams;
+
+   /**
+* @dataProvider provideCases
+*/
+   function testCases( $wikiText, $tag, $expectedInnerText, $expectedParams ) {
+   global $wgParserConf;
+   $parser = new Parser( $wgParserConf );
+
+   $parser->setHook( $tag, [ $this, 'tagCallback' ] );
+   $parserOutput = $parser->parse( $wikiText, Title::newFromText( 'Test' 
), new ParserOptions );
+
+   $this->assertEquals( $expectedInnerText, $this->mInnerText );
+   $this->assertEquals( $expectedParams, $this->mParams );
+
+   $parser->mPreprocessor = null; # Break the Parser <-> Preprocessor cycle
+   }
+
+   function tagCallback( $innerText, $params, $parser ) {
+   $this->mInnerText = $innerText;
+   $this->mParams = $params;
+
+   return "dummy";
+   }
+}
\ No newline at end of file
diff --git a/includes/parser/Preprocessor_DOM.php 
b/includes/parser/Preprocessor_DOM.php
index b93c617..1aba80d 100644
--- a/includes/parser/Preprocessor_DOM.php
+++ b/includes/parser/Preprocessor_DOM.php
@@ -478,30 +478,56 @@
$close = '';
} else {
$attrEnd = $tagEndPos;
-   // Find closing tag
-   if (
-   !isset( 
$noMoreClosingTag[$name] ) &&
-   preg_match( "/<\/" . 
preg_quote( $name, '/' ) . "\s*>/i",
-   $text, $matches, 
PREG_OFFSET_CAPTURE, $tagEndPos + 1 )
-   ) {
-   $inner = substr( $text, 
$tagEndPos + 1, $matches[0][1] - $tagEndPos - 1 );
-   $i = $matches[0][1] + strlen( 
$matches[0][0] );
-   $close = '' . 
htmlspecialchars( $matches[0][0] ) . '';
-   } else {
-   // No end tag
+
+   // We know that one start tag was 
already found
+   $numOfStartTags = 1;
+   $numOfEndTags = 0; 
+   $offset = $tagEndPos;
+   $pattern = "/<" . preg_quote( $name, 
'/' ) . "[^>]*>" . "|" . "<\/" . preg_quote( $name, '/' ) . "\s*>/i";
+
+   while ( $numOfStartTags != 
$numOfEndTags ) {
+   // match start tag or end tag 
+   if ( preg_match( $pattern, 
$text, $matches, PREG_OFFSET_CAPTURE, $offset + 1 ) === 0 ) {
+   break; // Nothing found
+   }
+   
+   // what is it, start or end tag?
+   if ( substr( $matches[ 0 ][ 0 
], 0, 2 ) === "...
-   
$noMoreClosingTag[$name] = true;
+   $noMoreClosingTag[ 
$name ] = true;
continue;
}
+   } else {
+   if ( 

[MediaWiki-commits] [Gerrit] mediawiki...EventBus[master]: WIP: Create the JobQueue backend that pushes to EventBus

2017-04-19 Thread Ppchelko (Code Review)
Ppchelko has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349015 )

Change subject: WIP: Create the JobQueue backend that pushes to EventBus
..

WIP: Create the JobQueue backend that pushes to EventBus

Bug: T163379
Change-Id: If8cfe83906ebdbc896d98546ac5d5c9a67459dd0
---
A JobQueueEventBus.php
M extension.json
2 files changed, 134 insertions(+), 1 deletion(-)


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

diff --git a/JobQueueEventBus.php b/JobQueueEventBus.php
new file mode 100644
index 000..401d2e5
--- /dev/null
+++ b/JobQueueEventBus.php
@@ -0,0 +1,132 @@
+ $job->getType(),
+   'page_namespace' => $job->getTitle()->getNamespace(),
+   'page_title' => $job->getTitle()->getPrefixedDBkey(),
+   'delay_until' => $job->getReleaseTimestamp()
+   ];
+
+   if ( $job->ignoreDuplicates() ) {
+   $attrs['sha1'] = sha1( serialize( 
$job->getDeduplicationInfo() ) );
+   }
+
+   $params = $job->getParams();
+
+   $attrs['rootJobTimestamp'] = $params['rootJobTimestamp'];
+   unset( $params['rootJobTimestamp'] );
+
+   $attrs['rootJobSignature'] = $params['rootJobSignature'];
+   unset( $params['rootJobSignature'] );
+
+   $attrs['params'] = $params;
+
+   return EventBus::createEvent(
+   EventBus::getArticleURL( $job->getTitle() ),
+   'mediawiki.job.' . $job->getType(),
+   $attrs
+   );
+   }
+
+   /**
+* Get the allowed queue orders for configuration validation
+*
+* @return array Subset of (random, timestamp, fifo, undefined)
+*/
+   protected function supportedOrders() {
+   return [ 'fifo' ];
+   }
+
+   /**
+* Get the default queue order to use if configuration does not specify 
one
+*
+* @return string One of (random, timestamp, fifo, undefined)
+*/
+   protected function optimalOrder() {
+   return 'fifo';
+   }
+
+   /**
+* @see JobQueue::isEmpty()
+* @return bool
+*/
+   protected function doIsEmpty() {
+   return false; // not implemented
+   }
+
+   /**
+* @see JobQueue::getSize()
+* @return int
+*/
+   protected function doGetSize() {
+   return 0; // not implemented
+   }
+
+   /**
+* @see JobQueue::getAcquiredCount()
+* @return int
+*/
+   protected function doGetAcquiredCount() {
+   return 0; // not implemented
+   }
+
+   /**
+* @see JobQueue::batchPush()
+* @param IJobSpecification[] $jobs
+* @param int $flags
+*/
+   protected function doBatchPush( array $jobs, $flags ) {
+   // Convert the jobs into field maps (de-duplicated against each 
other)
+   $events = []; // (job ID => job fields map)
+   foreach ( $jobs as $job ) {
+   $item = JobQueueEventBus::createJobEvent( $job );
+   if ( strlen( $item['sha1'] ) ) { // hash identifier => 
de-duplicate
+   $events[$item['sha1']] = $item;
+   } else {
+   $events[$item['meta']['uuid']] = $item;
+   }
+   }
+
+   if ( !count( $events ) ) {
+   return; // nothing to do
+   }
+
+   DeferredUpdates::addCallableUpdate(
+   function() use ( $events ) {
+   EventBus::getInstance()->send( array_values( 
$events ) );
+   }
+   );
+   }
+
+   /**
+* @see JobQueue::pop()
+* @return Job|bool
+*/
+   protected function doPop() {
+   return false; // not implemented
+   }
+
+   /**
+* @see JobQueue::ack()
+* @param Job $job
+*/
+   protected function doAck( Job $job ) {
+   // not implemented
+   }
+
+   /**
+* Get an iterator to traverse over all available jobs in this queue.
+* This does not include jobs that are currently acquired or delayed.
+* Note: results may be stale if the queue is concurrently modified.
+*
+* @return Iterator
+* @throws JobQueueError
+*/
+   public function getAllQueuedJobs() {
+   return new ArrayIterator( [] ); // not implemented
+   }
+}
\ No newline at end of file
diff --git a/extension.json b/extension.json
index b865a38..38cab2b 100644
--- a/extension.json
+++ b/extension.json
@@ -20,7 +20,8 @@
"EventRelayerBus": 

[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Set ORES thresholds for enwiki ahead of RCFilters release

2017-04-19 Thread Catrope (Code Review)
Catrope has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349014 )

Change subject: Set ORES thresholds for enwiki ahead of RCFilters release
..

Set ORES thresholds for enwiki ahead of RCFilters release

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


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 66781e5..c8467b2 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -18051,6 +18051,19 @@
 ],
 'wgOresFiltersThresholds' => [
'default' => [],
+   'enwiki' => [
+   'damaging' => [
+   'likelygood' => [ 'min' => 0, 'max' => 0.398 ], // ~99% 
precision
+   'maybebad' => [ 'min' => 0.280, 'max' => 1 ], // ~15% 
precision
+   'likelybad' => [ 'min' => 0.879, 'max' => 1 ], // ~60% 
precision
+   'verylikelybad' => [ 'min' => 0.938, 'max' => 1 ], // 
~90% precision
+   ],
+   'goodfaith' => [
+   'good' => [ 'min' => 0.86, 'max' => 1 ], // ~99.5% 
precision
+   'maybebad' => [ 'min' => 0, 'max' => 0.663 ], // ~15% 
precision
+   'bad' => [ 'min' => 0, 'max' => 0.115 ], // ~60% 
precision
+   ],
+   ],
'plwiki' => [
'damaging' => [
'likelygood' => [ 'min' => 0, 'max' => 0.472 ], // 
~99.5% precision

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8100945de18606c0e8559c36b5fae8bad1da4653
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
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] wikidata...rdf[master]: Add more properties to Blazegraph launching script.

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

Change subject: Add more properties to Blazegraph launching script.
..


Add more properties to Blazegraph launching script.

Since it was created, more properties has been added, so it's time
to update it.

Ideally, we'd have a list of these properties somewhere in the docs.

Change-Id: Ia868c58528b03f5b6f4b8a58c33f72c54bf557fb
---
M tools/pom.xml
A tools/src/test/resources/blazegraph/whitelist.txt
2 files changed, 21 insertions(+), 0 deletions(-)

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



diff --git a/tools/pom.xml b/tools/pom.xml
index a861f4f..a55ea6d 100644
--- a/tools/pom.xml
+++ b/tools/pom.xml
@@ -262,6 +262,26 @@
   ASTOptimizerClass
   
org.wikidata.query.rdf.blazegraph.WikibaseOptimizers
 
+
+   
org.wikidata.query.rdf.blazegraph.inline.literal.WKTSerializer.noGlobe
+   2
+
+
+   
com.bigdata.rdf.sail.sparql.PrefixDeclProcessor.additionalDeclsFile
+   
${project.parent.basedir}/dist/src/script/prefixes.conf
+
+
+   
com.bigdata.rdf.sail.webapp.client.HttpClientConfigurator
+   
org.wikidata.query.rdf.blazegraph.ProxiedHttpConnectionFactory
+
+
+   http.userAgent
+   Wikidata Query Service (testing); 
https://query.wikidata.org/
+
+
+   wikibaseServiceWhitelist
+   
${project.basedir}/src/test/resources/blazegraph/whitelist.txt
+
   
 
   
diff --git a/tools/src/test/resources/blazegraph/whitelist.txt 
b/tools/src/test/resources/blazegraph/whitelist.txt
new file mode 100644
index 000..3dc09ff
--- /dev/null
+++ b/tools/src/test/resources/blazegraph/whitelist.txt
@@ -0,0 +1 @@
+https://query.wikidata.org/

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia868c58528b03f5b6f4b8a58c33f72c54bf557fb
Gerrit-PatchSet: 1
Gerrit-Project: wikidata/query/rdf
Gerrit-Branch: master
Gerrit-Owner: Smalyshev 
Gerrit-Reviewer: Gehel 
Gerrit-Reviewer: Smalyshev 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...CollaborationKit[master]: Rephrase collaborationkit-hubedit-content-help for clarity

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

Change subject: Rephrase collaborationkit-hubedit-content-help for clarity
..


Rephrase collaborationkit-hubedit-content-help for clarity

* Consistent capitalization.
* Remove "(sub)" to make translation easier.
* Replace "delineated" with "One page per line". With commas and pipes
  the commonly used word is "separated", but with line breaks it's
  simpler to just say "one per line".
* Pages in plural.

Change-Id: Ia02575119729fb0a7319c69a02bfc7af3dad2be3
---
M i18n/en.json
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/i18n/en.json b/i18n/en.json
index bce9652..8d37960 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -131,7 +131,7 @@
"collaborationkit-hubedit-image-help": "An image or icon to represent 
the project",
"collaborationkit-hubedit-introduction-placeholder": "Introduce your 
project here! Tell us what you want to do.",
"collaborationkit-hubedit-footer-help": "Appears beneath the included 
features. Recommended location for categories, navigation templates, etc.",
-   "collaborationkit-hubedit-content-help": "list of (sub)pages to include 
in the project, delineated by linebreaks. Use the full page name.",
+   "collaborationkit-hubedit-content-help": "A list of pages or subpages 
to include in the project. One page name per line. Use the full page titles.",
"collaborationkit-listedit-description-placeholder": "Describe what the 
list is about or for.",
"collaborationkit-listedit-list-help": "Custom syntax is used for bulk 
editing. Essentially, one item for line, with different columns marked by 
several hyphens. See [[Help:Extension:CollaborationKit]] for more information.",
"collaborationkit-createhubfeature-icon-help": "Please choose from the 
included icons."

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia02575119729fb0a7319c69a02bfc7af3dad2be3
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/CollaborationKit
Gerrit-Branch: master
Gerrit-Owner: Amire80 
Gerrit-Reviewer: Harej 
Gerrit-Reviewer: Siebrand 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] oojs/ui[master]: Do not use role=menu/menuitem for MenuSelectWidget/MenuOptio...

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

Change subject: Do not use role=menu/menuitem for 
MenuSelectWidget/MenuOptionWidget
..


Do not use role=menu/menuitem for MenuSelectWidget/MenuOptionWidget

They will now use role=listbox/option from SelectWidget/OptionWidget.

The difference is a bit unclear, but I think listbox is more
appropriate. Per https://www.w3.org/TR/wai-aria/roles:
"A menu is often a list of common actions or functions that the user
can invoke. The menu role is appropriate when a list of menu items is
presented in a manner similar to a menu on a desktop application."
Usually, MenuSelectWidget items do not correspond to user actions
(they are just values), and it's not really a desktop-like menu
(that sounds more like our ListToolGroup and other toolbar stuff).

And for a more practical consideration: a role=combobox widget (like
our ComboBoxInputWidget) can only be paired with a role=listbox list,
not with a role=menu one.

Bug: T149654
Change-Id: Ib9894ef9c70132e1d820bfa3815e47e5160d7ecd
---
M src/widgets/MenuOptionWidget.js
M src/widgets/MenuSelectWidget.js
2 files changed, 2 insertions(+), 6 deletions(-)

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



diff --git a/src/widgets/MenuOptionWidget.js b/src/widgets/MenuOptionWidget.js
index 427d1f3..a9d5009 100644
--- a/src/widgets/MenuOptionWidget.js
+++ b/src/widgets/MenuOptionWidget.js
@@ -16,9 +16,7 @@
OO.ui.MenuOptionWidget.parent.call( this, config );
 
// Initialization
-   this.$element
-   .attr( 'role', 'menuitem' )
-   .addClass( 'oo-ui-menuOptionWidget' );
+   this.$element.addClass( 'oo-ui-menuOptionWidget' );
 };
 
 /* Setup */
diff --git a/src/widgets/MenuSelectWidget.js b/src/widgets/MenuSelectWidget.js
index 637271b..de8d457 100644
--- a/src/widgets/MenuSelectWidget.js
+++ b/src/widgets/MenuSelectWidget.js
@@ -64,9 +64,7 @@
this.highlightOnFilter = !!config.highlightOnFilter;
 
// Initialization
-   this.$element
-   .addClass( 'oo-ui-menuSelectWidget' )
-   .attr( 'role', 'menu' );
+   this.$element.addClass( 'oo-ui-menuSelectWidget' );
 
// Initially hidden - using #toggle may cause errors if subclasses 
override toggle with methods
// that reference properties not initialized at that time of parent 
class construction

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib9894ef9c70132e1d820bfa3815e47e5160d7ecd
Gerrit-PatchSet: 1
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński 
Gerrit-Reviewer: VolkerE 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] search/MjoLniR[master]: Setup tox for running flake8 and pytest

2017-04-19 Thread Tjones (Code Review)
Tjones has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/347058 )

Change subject: Setup tox for running flake8 and pytest
..


Setup tox for running flake8 and pytest

More plumbing for general python project setup. This allows the tox
command to be used to run all the tests, syntax checking, etc that we
want to run on every commit. Work to get this running as part of jenkins
CI pipeline will be further along. One of the constraints there will be
getting the cdh5.10.0 spark packages installed, but shouldn't be too
difficult.

* Moves the virtualenv for running tox in the vm to /vagrant/venv to keep
the mess in one place. Tried to avoid needing an extra virtualenv, as
tox builds venvs anyways, but tox+pip weren't playing nice and errored
out with the .[test] dep otherwise.
* Switched to debian jessie. Prod is moving that direction, and it's no
harm to switch now before anything complex is setup.
* replace requirements.txt with setup.py
* Add a LICENSE file, it's MIT.
* Adjust the Vagrantfile to use NFS share. With the default share
tox/virtualenv were unable to create hardlinks.

Change-Id: Id57bd5fd0476fc061d4b0a1cd93a1b2f639b7ed4
---
M .gitignore
A LICENSE
A MANIFEST.in
D README
A README.rst
M Vagrantfile
M bootstrap-vm.sh
M mjolnir/test/conftest.py
D requirements.txt
A setup.py
A tox.ini
11 files changed, 159 insertions(+), 54 deletions(-)

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



diff --git a/.gitignore b/.gitignore
index c476043..4b7c536 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,23 +4,8 @@
 *~
 
 # Distribution / packaging
-.Python
-env/
-bin/
-build/
-develop-eggs/
-dist/
-eggs/
-lib/
-lib64/
-parts/
-sdist/
-var/
-local/
-include/
-share/
+venv/
 *.egg-info/
-.installed.cfg
 *.egg
 *.log
 
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 000..d13cc4b
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,19 @@
+The MIT License (MIT)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/MANIFEST.in b/MANIFEST.in
new file mode 100644
index 000..7623449
--- /dev/null
+++ b/MANIFEST.in
@@ -0,0 +1 @@
+include LICENESE README.rst
diff --git a/README b/README
deleted file mode 100644
index e0b5a60..000
--- a/README
+++ /dev/null
@@ -1,15 +0,0 @@
-== MjoLniR - Machine Learned Ranking for Wikimedia
-
-MjoLniR is a library for handling the backend data processing
-for s Machine Learned Ranking at Wikimedia. It is specialized
-to how click logs are stored at wikimedia and provides functionality
-to transform the source click logs into machine ML models for ranking.
-
-== Requirements
-
-Targets pyspark 1.6.0 running on python 2.7
-
-== Other
-
-Documentation follows the numpy documentation guidelines:
-https://github.com/numpy/numpy/blob/master/doc/HOWTO_DOCUMENT.rst.txt
diff --git a/README.rst b/README.rst
new file mode 100644
index 000..e399627
--- /dev/null
+++ b/README.rst
@@ -0,0 +1,41 @@
+MjoLniR - Machine Learned Ranking for Wikimedia
+===
+
+MjoLniR is a library for handling the backend data processing for Machine
+Learned Ranking at Wikimedia. It is specialized to how click logs are stored at
+Wikimedia and provides functionality to transform the source click logs into ML
+models for ranking in elasticsearch.
+
+Requirements
+
+
+Targets pyspark from cdh5.10.0. This is mostly pyspark 1.6.0, but has various
+backports integrated. Requires python 2.7, as some dependencies (clickmodels)
+do not support python 3 yet.
+
+Running tests
+=
+
+Tests can be run from within the provided Vagrant configuration. Use the
+following from the root of this repository to build a vagrant box, ssh into it,
+and run the tests::
+
+vagrant up
+vagrant ssh
+cd /vagrant
+venv/bin/tox
+
+The test suite includes both flake8 (linter) and pytest (unit) tests. These
+can be run independently with the -e option for tox::
+
+

[MediaWiki-commits] [Gerrit] mediawiki...Linter[master]: Add pwrap-bug-workaround linter category

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

Change subject: Add pwrap-bug-workaround linter category
..


Add pwrap-bug-workaround linter category

Change-Id: If1ec022e5bb741f4dc825428b5a689c2f0b0c445
---
M extension.json
M i18n/en.json
M i18n/qqq.json
M includes/CategoryManager.php
M includes/LintErrorsPager.php
5 files changed, 16 insertions(+), 0 deletions(-)

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



diff --git a/extension.json b/extension.json
index 16e2ad1..0ce21f0 100644
--- a/extension.json
+++ b/extension.json
@@ -88,6 +88,10 @@
"misnested-tag": {
"severity": "warning",
"enabled": true
+   },
+   "pwrap-bug-workaround": {
+   "severity": "warning",
+   "enabled": true
}
},
"LinterSubmitterWhitelist": {
diff --git a/i18n/en.json b/i18n/en.json
index bed97b6..d00799e 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -17,6 +17,7 @@
"linter-pager-self-closed-tag-details": "Self-closed tag",
"linter-pager-deletable-table-tag-details": "Table tag that should be 
deleted",
"linter-pager-misnested-tag-details": "Misnested tag which should be 
properly nested",
+   "linter-pager-pwrap-bug-workaround-details": "Paragraph wrapping bug 
workaround",
"linter-category-fostered": "Fostered content",
"linter-category-fostered-desc": "These pages have fostered content.",
"linter-category-obsolete-tag": "Obsolete HTML tags",
@@ -33,6 +34,8 @@
"linter-category-deletable-table-tag-desc": "These pages have table 
tags that should be deleted.",
"linter-category-misnested-tag": "Misnested tags",
"linter-category-misnested-tag-desc": "These pages have misnested tags 
that could be fixed.",
+   "linter-category-pwrap-bug-workaround": "Paragraph wrapping bug 
workaround",
+   "linter-category-pwrap-bug-workaround-desc": "These pages have a 
paragraph wrapping bug that could be worked around.",
"linter-numerrors": "($1 {{PLURAL:$1|error|errors}})",
"linker-page-title-edit": "$1 ($2)",
"linker-page-edit": "edit",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index b61d5de..daea3b2 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -19,6 +19,7 @@
"linter-pager-self-closed-tag-details": "Table column heading",
"linter-pager-deletable-table-tag-details": "Table column heading",
"linter-pager-misnested-tag-details": "Table column heading",
+   "linter-pager-pwrap-bug-workaround-details": "Table column heading",
"linter-category-fostered": "Name of lint error category. See 
[[:mw:Help:Extension:Linter/fostered]]",
"linter-category-fostered-desc": "Description of category.",
"linter-category-obsolete-tag": "Name of lint error category. See 
[[:mw:Help:Extension:Linter/obsolete-tag]]",
@@ -35,6 +36,8 @@
"linter-category-deletable-table-tag-desc": "Description of category.",
"linter-category-misnested-tag": "Name of lint error category. See 
[[:mw:Help:Extension:Linter/misnested-tag]]",
"linter-category-misnested-tag-desc": "Description of category.",
+   "linter-category-pwrap-bug-workaround": "Name of lint error category. 
See [[:mw:Help:Extension:Linter/pwrap-bug-workaround]]",
+   "linter-category-pwrap-bug-workaround-desc": "Description of category.",
"linter-numerrors": "Shown after a category link to indicate how many 
errors are in that category. $1 is the number of errors, and can be used for 
PLURAL.\n{{Identical|Error}}",
"linker-page-title-edit": "Used in a table cell. $1 is a link to the 
page, $2 is pipe separated links to the edit and history pages, the link text 
is {{msg-mw|linker-page-edit}} and {{msg-mw|linker-page-history}}",
"linker-page-edit": "Link text for edit link in 
{{msg-mw|linker-page-title-edit}}\n{{Identical|Edit}}",
diff --git a/includes/CategoryManager.php b/includes/CategoryManager.php
index 2d529dd..b7a7b78 100644
--- a/includes/CategoryManager.php
+++ b/includes/CategoryManager.php
@@ -43,6 +43,7 @@
'self-closed-tag' => 6,
'deletable-table-tag' => 7,
'misnested-tag' => 8,
+   'pwrap-bug-workaround' => 9,
];
 
/**
diff --git a/includes/LintErrorsPager.php b/includes/LintErrorsPager.php
index db762a6..6766799 100644
--- a/includes/LintErrorsPager.php
+++ b/includes/LintErrorsPager.php
@@ -134,6 +134,11 @@
return Html::element( 'code', 
[], $in );
}, $lintError->params['items'] );
return 

[MediaWiki-commits] [Gerrit] mediawiki...Linter[master]: Change severity levels for stripped-tag & misnested-tag

2017-04-19 Thread Subramanya Sastry (Code Review)
Subramanya Sastry has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349001 )

Change subject: Change severity levels for stripped-tag & misnested-tag
..

Change severity levels for stripped-tag & misnested-tag

* stripped-tag is harmless and should be a warning.
* misnested-tag could be changing intent of markup and should
  be an error.

Change-Id: I42fdab1c0e2f0793ca3845d28880388244b65527
---
M extension.json
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Linter 
refs/changes/01/349001/1

diff --git a/extension.json b/extension.json
index 0ce21f0..8931304 100644
--- a/extension.json
+++ b/extension.json
@@ -74,7 +74,7 @@
"enabled": true
},
"stripped-tag": {
-   "severity": "error",
+   "severity": "warning",
"enabled": true
},
"self-closed-tag": {
@@ -86,7 +86,7 @@
"enabled": true
},
"misnested-tag": {
-   "severity": "warning",
+   "severity": "error",
"enabled": true
},
"pwrap-bug-workaround": {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I42fdab1c0e2f0793ca3845d28880388244b65527
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Linter
Gerrit-Branch: master
Gerrit-Owner: Subramanya Sastry 

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


[MediaWiki-commits] [Gerrit] mediawiki...OpenIDConnect[master]: Added optional error message to authenticate().

2017-04-19 Thread Cicalese (Code Review)
Cicalese has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/348987 )

Change subject: Added optional error message to authenticate().
..


Added optional error message to authenticate().

Change-Id: I546849e9098c514ad0a3bc44221f6c24ac280fcf
---
M OpenIDConnect.class.php
M extension.json
2 files changed, 5 insertions(+), 3 deletions(-)

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



diff --git a/OpenIDConnect.class.php b/OpenIDConnect.class.php
index b874f41..da7e8a8 100644
--- a/OpenIDConnect.class.php
+++ b/OpenIDConnect.class.php
@@ -40,8 +40,10 @@
 * @param &$username
 * @param &$realname
 * @param &$email
+* @param &$errorMessage
 */
-   public function authenticate( &$id, &$username, &$realname, &$email ) {
+   public function authenticate( &$id, &$username, &$realname, &$email,
+   &$errorMessage ) {
 
if ( !array_key_exists( 'SERVER_PORT', $_SERVER ) ) {
wfDebug( "in authenticate, server port not set" . 
PHP_EOL );
diff --git a/extension.json b/extension.json
index 7b50289..88c4ce7 100644
--- a/extension.json
+++ b/extension.json
@@ -1,6 +1,6 @@
 {
"name": "OpenID Connect",
-   "version": "3.1",
+   "version": "4.0",
"author": [
"[https://www.mediawiki.org/wiki/User:Cindy.cicalese Cindy 
Cicalese]"
],
@@ -9,7 +9,7 @@
"type": "other",
"requires": {
"extensions": {
-   "PluggableAuth": ">= 2.0"
+   "PluggableAuth": ">= 4.0"
}
},
"SpecialPages": {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I546849e9098c514ad0a3bc44221f6c24ac280fcf
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/OpenIDConnect
Gerrit-Branch: master
Gerrit-Owner: Cicalese 
Gerrit-Reviewer: Cicalese 
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...CollaborationKit[master]: Write "gray" and "color" consistently in en-us

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

Change subject: Write "gray" and "color" consistently in en-us
..


Write "gray" and "color" consistently in en-us

Change-Id: If9c776f42f11527daa9bc2d3331a14ba42247033
---
M i18n/en.json
1 file changed, 4 insertions(+), 4 deletions(-)

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



diff --git a/i18n/en.json b/i18n/en.json
index 4c474ea..bce9652 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -98,11 +98,11 @@
"collaborationkit-subpage-toc-label": "Part of a project:",
"collaborationkit-darkred": "Dark red",
"collaborationkit-red": "Red",
-   "collaborationkit-darkgrey": "Dark grey",
-   "collaborationkit-lightgrey": "Light grey",
+   "collaborationkit-darkgrey": "Dark gray",
+   "collaborationkit-lightgrey": "Light gray",
"collaborationkit-skyblue": "Sky blue",
"collaborationkit-blue": "Blue",
-   "collaborationkit-bluegrey": "Blue grey",
+   "collaborationkit-bluegrey": "Blue gray",
"collaborationkit-navyblue": "Navy blue",
"collaborationkit-darkblue": "Dark blue",
"collaborationkit-aquamarine": "Aquamarine",
@@ -127,7 +127,7 @@
"collaborationkit-createhub-title-placeholder": "New Project",
"collaborationkit-hubedit-displayname-help": "Used to refer to the 
project on other pages. Only needed if different from the page title.",
"collaborationkit-hubedit-hubtheme": "Hub theme",
-   "collaborationkit-hubedit-hubtheme-help": "The hub's visual identity, 
including an identifying picture and a main colour.",
+   "collaborationkit-hubedit-hubtheme-help": "The hub's visual identity, 
including an identifying picture and a main color.",
"collaborationkit-hubedit-image-help": "An image or icon to represent 
the project",
"collaborationkit-hubedit-introduction-placeholder": "Introduce your 
project here! Tell us what you want to do.",
"collaborationkit-hubedit-footer-help": "Appears beneath the included 
features. Recommended location for categories, navigation templates, etc.",

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If9c776f42f11527daa9bc2d3331a14ba42247033
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/CollaborationKit
Gerrit-Branch: master
Gerrit-Owner: Amire80 
Gerrit-Reviewer: Harej 
Gerrit-Reviewer: Siebrand 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] wikidata...rdf[master]: Add more properties to Blazegraph launching script.

2017-04-19 Thread Smalyshev (Code Review)
Smalyshev has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/348999 )

Change subject: Add more properties to Blazegraph launching script.
..

Add more properties to Blazegraph launching script.

Since it was created, more properties has been added, so it's time
to update it.

Ideally, we'd have a list of these properties somewhere in the docs.

Change-Id: Ia868c58528b03f5b6f4b8a58c33f72c54bf557fb
---
M tools/pom.xml
A tools/src/test/resources/blazegraph/whitelist.txt
2 files changed, 21 insertions(+), 0 deletions(-)


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

diff --git a/tools/pom.xml b/tools/pom.xml
index a861f4f..a55ea6d 100644
--- a/tools/pom.xml
+++ b/tools/pom.xml
@@ -262,6 +262,26 @@
   ASTOptimizerClass
   
org.wikidata.query.rdf.blazegraph.WikibaseOptimizers
 
+
+   
org.wikidata.query.rdf.blazegraph.inline.literal.WKTSerializer.noGlobe
+   2
+
+
+   
com.bigdata.rdf.sail.sparql.PrefixDeclProcessor.additionalDeclsFile
+   
${project.parent.basedir}/dist/src/script/prefixes.conf
+
+
+   
com.bigdata.rdf.sail.webapp.client.HttpClientConfigurator
+   
org.wikidata.query.rdf.blazegraph.ProxiedHttpConnectionFactory
+
+
+   http.userAgent
+   Wikidata Query Service (testing); 
https://query.wikidata.org/
+
+
+   wikibaseServiceWhitelist
+   
${project.basedir}/src/test/resources/blazegraph/whitelist.txt
+
   
 
   
diff --git a/tools/src/test/resources/blazegraph/whitelist.txt 
b/tools/src/test/resources/blazegraph/whitelist.txt
new file mode 100644
index 000..3dc09ff
--- /dev/null
+++ b/tools/src/test/resources/blazegraph/whitelist.txt
@@ -0,0 +1 @@
+https://query.wikidata.org/

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: Fetch LanguageConverter status as part of wiki configuration.

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

Change subject: Fetch LanguageConverter status as part of wiki configuration.
..

Fetch LanguageConverter status as part of wiki configuration.

Bug: T153341
Change-Id: I7440a51727d24260689e0dc1c4972decea3a7a67
---
M lib/config/MWParserEnvironment.js
M lib/config/WikiConfig.js
A lib/config/variants.json
M lib/mw/ApiRequest.js
4 files changed, 42 insertions(+), 0 deletions(-)


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

diff --git a/lib/config/MWParserEnvironment.js 
b/lib/config/MWParserEnvironment.js
index a8d15af..9b6286e 100644
--- a/lib/config/MWParserEnvironment.js
+++ b/lib/config/MWParserEnvironment.js
@@ -796,6 +796,18 @@
return this.conf.wiki.extContentModel.get(contentmodel);
 };
 
+/**
+ * @method
+ *
+ * Determine if LanguageConverter markup should be parsed on this page,
+ * based on the wiki configuration and the current page language.
+ *
+ * @return {Boolean}
+ */
+MWParserEnvironment.prototype.langConverterEnabled = function() {
+   var lang = this.page.pagelanguage || this.conf.wiki.lang || 'en';
+   return this.conf.wiki.langConverterEnabled.has(lang);
+};
 
 if (typeof module === "object") {
module.exports.MWParserEnvironment = MWParserEnvironment;
diff --git a/lib/config/WikiConfig.js b/lib/config/WikiConfig.js
index 9fe20ea..f216798 100644
--- a/lib/config/WikiConfig.js
+++ b/lib/config/WikiConfig.js
@@ -557,6 +557,34 @@
// Function hooks on this wiki, indexed by their normalized form
this.functionHooks = new Set(resultConf.functionhooks || []);
 
+   // Somewhat annoyingly, although LanguageConversion is turned on by
+   // default for all WMF wikis (ie, $wgDisableLangConversion = false, as
+   // reported by `general.langconversion` in siteinfo), but the
+   // -{ }- syntax is only parsed when the current *page language*
+   // has variants.  We can't use the "UI language" (in siteinfo
+   // `general.lang`) and "UI variants" (in `general.fallback` and
+   // `general.variants`), because the *page language* could be quite
+   // different.  Use the mechanism introduced in T153341 instead.
+   var languagevariants = resultConf.languagevariants;
+   if (languagevariants === undefined) {
+   // Hard-coded list of variants and fallbacks, for mediawiki
+   // releases before 1.29 without T153341
+   languagevariants = require('./variants.json');
+   }
+   this.variants = new Map();
+   this.langConverterEnabled = new Set();
+   Object.keys(languagevariants).forEach(function(code) {
+   if (general.langconversion !== undefined) {
+   this.langConverterEnabled.add(code);
+   }
+   Object.keys(languagevariants[code]).forEach(function(v) {
+   this.variants.set(v, {
+   base: code,
+   fallbacks: languagevariants[code][v].fallbacks,
+   });
+   }.bind(this));
+   }.bind(this));
+
// Match a wikitext line containing just whitespace, comments, and
// sol transparent links and behavior switches.
// Redirects should not contain any preceding non-whitespace chars.
diff --git a/lib/config/variants.json b/lib/config/variants.json
new file mode 100644
index 000..7ef417a
--- /dev/null
+++ b/lib/config/variants.json
@@ -0,0 +1 @@

[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: Fixes for preprocessor precedence.

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

Change subject: Fixes for preprocessor precedence.
..

Fixes for preprocessor precedence.

The rightmost opening set of braces/brackets take precedence: see
[[:mw:Preprocessor_ABNF]] for details.  So:
  [[Foo|bar}}]]
and
  [[Foo}}|bar]]
are both valid, even if there's an template opening somewhere to the left.
Note however that the latter example will not become a link in the output
because }} is not a valid title character -- it is unlinked at a later stage.

Change-Id: I4d7b1ff638aa6bec8becbb8ecfd649d7a59b1eb2
---
M lib/wt2html/pegTokenizer.pegjs
M tests/parserTests-blacklist.js
M tests/parserTests.txt
3 files changed, 11 insertions(+), 23 deletions(-)


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

diff --git a/lib/wt2html/pegTokenizer.pegjs b/lib/wt2html/pegTokenizer.pegjs
index 4abf3ac..61689ec 100644
--- a/lib/wt2html/pegTokenizer.pegjs
+++ b/lib/wt2html/pegTokenizer.pegjs
@@ -1002,6 +1002,7 @@
/ (!inline_breaks
   r:( inline_element / '[' text_char+ ']' / . ) { return r; }
  )
+   / '}' // "rightmost opening" rule
 )+ {
   return tu.flattenStringlist(c);
   }
@@ -1902,6 +1903,7 @@
 // XXX gwicke: any more chars we need to allow here?
 / !inline_breaks wr:( directive / $( !"]]" ( text_char / [!<\-] ) ) )
 { return wr; }
+/ $"}" // if [[ was rightmost it takes precedence over {{
 )+ {
   return tu.flattenStringlist(r);
   }
diff --git a/tests/parserTests-blacklist.js b/tests/parserTests-blacklist.js
index f895151..5441057 100644
--- a/tests/parserTests-blacklist.js
+++ b/tests/parserTests-blacklist.js
@@ -107,7 +107,6 @@
 add("wt2html", "Template with invalid target containing wikilink", "{{Main Page}}");
 add("wt2html", "Template with complex arguments", "link This is a test template with parameter (test)");
 add("wt2html", "Template infinite loop", "");
-add("wt2html", "Template with targets containing wikilinks", "{{foo}}\n\n{{foo}}\n\n{{[[foo]]}}");
 add("wt2html", "int keyword", "Parser function 
implementation for pf_int missing in Parsoid.");
 add("wt2html", "int keyword - non-existing message", "Parser
 function implementation for pf_int missing in Parsoid.");
 add("wt2html", "Self-closed noinclude, includeonly, onlyinclude tags", "\n\n");
@@ -297,7 +296,6 @@
 add("wt2wt", "Template with argument in separate line", "{{templateasargtest  
|\n templ = simple }}");
 add("wt2wt", "T2553: link with two variables in a piped link", 
"{|\n|[[{{{1}}}|{{{2}}}]]\n|}");
 add("wt2wt", "Abort table cell attribute parsing on wikilink", "{|\n| testing 
[[one|two]] | three || four\n| testing one two | three || 
four\n| testing=\"[[one|two]]\" | three || four\n|}");
-add("wt2wt", "Template with targets containing wikilinks", 
"{{[[foo]]}}\n\n{{[[{{echo|foo}}]]}}\n\n{{[[foo]]}}\n");
 add("wt2wt", "2. includeonly in html attr value", "v1v2\">bar\nv1v2\">bar\n");
 add("wt2wt", "1. Table tag in SOL posn. should get reparsed correctly with 
valid TSR", "{{echo|}}\n{| width=\"100%\"\n|foo\n|}");
 add("wt2wt", "Templates: HTML Tag: 2. Generation of HTML attr. value", "foo");
@@ -425,7 +423,6 @@
 add("html2html", "Template parameter as link source", "link\n");
 add("html2html", "Template as link source", "Main Page\n\nMain Page\n\nMain PagePage\n");
 add("html2html", "Template infinite loop", "Template loop detected: 
Template:Loop1\n");
-add("html2html", "Template with targets containing wikilinks", "{{foo}}\n\n{{foo}}\n\n{{[[foo}}]]\n");
 add("html2html", "Self-closed noinclude, includeonly, onlyinclude tags", "\n");
 add("html2html", "T8563: Section extraction for section shown by 
", "==Section 
T-2==");
 add("html2html", "T8563: Section extraction for section suppressed by 
", "==Section 
1==");
@@ -824,7 +821,6 @@
 add("html2wt", "T2529: Template with table, not included at beginning of 
line", "foo \n\n{|\n| 1 \n| 2\n|-\n| 3 \n| 4\n|}\n");
 add("html2wt", "T2523: Template shouldn't eat newline (or add an extra one 
before table)", "foo\n\n{|\n| 1 \n| 2\n|-\n| 3 \n| 4\n|}\n");
 add("html2wt", "T2041: Template parameters shown as broken links", 
"{{{parameter}}}\n");
-add("html2wt", "Template with targets containing wikilinks", 
"{{[[wiki/Foo|foo]]}}\n\n{{[[wiki/Foo|foo]]}}\n\n{{[[foo}}]]\n");
 add("html2wt", "int keyword", "You have lots of money (not!).\n");
 add("html2wt", "int keyword - non-existing message", "⧼var⧽\n");
 add("html2wt", " and  being included", "Foobar\n");
@@ -1573,22 +1569,6 @@
 add("selser", "Abort table cell attribute parsing on wikilink [[3,1]]", "{|\n| 
testing [[one|two]] | three || four\n| testing one two | three || four\n| 
testing=\"[[one|two]]\" | three || four\n|}");
 add("selser", "Abort table cell attribute parsing on wikilink [[0,2]]", 
"{|\n| testing [[one|two]] | three || four\n| testing 

[MediaWiki-commits] [Gerrit] mediawiki...PluggableAuth[master]: Added optional error message to authenticate().

2017-04-19 Thread Cicalese (Code Review)
Cicalese has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/348985 )

Change subject: Added optional error message to authenticate().
..


Added optional error message to authenticate().

Bumped version number to synchronize with SimpleSAMLphp and OpenIDConnect
extensions.

Change-Id: I2ff91c1a5d62fd391f16c4b2756724fafcdde877
---
M PluggableAuth.class.php
M PluggableAuthLogin.php
M extension.json
3 files changed, 13 insertions(+), 4 deletions(-)

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



diff --git a/PluggableAuth.class.php b/PluggableAuth.class.php
index 23ef34a..0584d6c 100644
--- a/PluggableAuth.class.php
+++ b/PluggableAuth.class.php
@@ -31,9 +31,10 @@
 * @param &$username
 * @param &$realname
 * @param &$email
+* @param &$errorMessage
 */
abstract public function authenticate( &$id, &$username, &$realname,
-   &$email );
+   &$email, &$errorMessage );
 
/**
 * @since 1.0
diff --git a/PluggableAuthLogin.php b/PluggableAuthLogin.php
index b94e372..a338275 100644
--- a/PluggableAuthLogin.php
+++ b/PluggableAuthLogin.php
@@ -42,7 +42,8 @@
$pluggableauth = PluggableAuth::singleton();
$error = null;
if ( $pluggableauth ) {
-   if ( $pluggableauth->authenticate( $id, $username, 
$realname, $email ) ) {
+   if ( $pluggableauth->authenticate( $id, $username, 
$realname, $email,
+   $error ) ) {
if ( is_null( $id ) ) {
$user->loadDefaults( $username );
$user->mName = $username;
@@ -72,7 +73,14 @@
}
} else {
wfDebug( 'Authentication failure.' );
-   $error = wfMessage( 
'pluggableauth-authentication-failure')->text();
+   if ( is_null( $error ) ) {
+   $error = wfMessage( 
'pluggableauth-authentication-failure')->text();
+   } else {
+   if ( !is_string( $error ) ) {
+   $error = strval( $error );
+   }
+   wfDebug( 'ERROR: ' . $error );
+   }
}
}
if ( !is_null( $error ) ) {
diff --git a/extension.json b/extension.json
index 3f3f05e..851262d 100644
--- a/extension.json
+++ b/extension.json
@@ -1,6 +1,6 @@
 {
"name": "PluggableAuth",
-   "version": "2.2",
+   "version": "4.0",
"author": [
"[https://www.mediawiki.org/wiki/User:Cindy.cicalese Cindy 
Cicalese]"
],

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2ff91c1a5d62fd391f16c4b2756724fafcdde877
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/PluggableAuth
Gerrit-Branch: master
Gerrit-Owner: Cicalese 
Gerrit-Reviewer: Cicalese 
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...CollaborationKit[master]: Correct "did not save" to "were not saved"

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

Change subject: Correct "did not save" to "were not saved"
..


Correct "did not save" to "were not saved"

Change-Id: Idea576fa1dbf63982cb6409e8c4b78764bfad487
---
M i18n/en.json
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/i18n/en.json b/i18n/en.json
index 76cae3f..4c474ea 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -51,7 +51,7 @@
"collaborationkit-list-error-editconflict": "There was an edit 
conflict, and your change was not saved. Please refresh the page and try 
again.",
"collaborationkit-list-error-couldnotgetpage": "The page failed to 
load. Please refresh the page and try again.",
"collaborationkit-list-error-generic": "There was an error. Please 
refresh the page and try again.",
-   "collaborationkit-list-error-saving": "Your edits to the list did not 
save. Please refresh the page and try again.",
+   "collaborationkit-list-error-saving": "Your edits to the list were not 
saved. Please refresh the page and try again.",
"collaborationkit-list-move": "Re-order this item",
"collaborationkit-list-move-summary": "/* $1 */ Reordering item [[$1]]",
"collaborationkit-list-move-popup": "Successfully saved: $1 was 
re-ordered.",

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Idea576fa1dbf63982cb6409e8c4b78764bfad487
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/CollaborationKit
Gerrit-Branch: master
Gerrit-Owner: Amire80 
Gerrit-Reviewer: Brian Wolff 
Gerrit-Reviewer: Harej 
Gerrit-Reviewer: Siebrand 
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...CollaborationKit[master]: Set path globals in phpunit tests. Use span for new oojs

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

Change subject: Set path globals in phpunit tests. Use span for new oojs
..


Set path globals in phpunit tests. Use span for new oojs

Avoid differences in output due to different script paths
on different mediawiki installs.

Use  in the places that new OOJS uses span
(Presumably this is a follow-up to cb0e87750 of OOJS-ui)

Change-Id: I645cf123bdc608cfc0c819321cd1a28e00c0dfd0
---
M tests/phpunit/CollaborationHubContentTest.php
1 file changed, 12 insertions(+), 5 deletions(-)

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



diff --git a/tests/phpunit/CollaborationHubContentTest.php 
b/tests/phpunit/CollaborationHubContentTest.php
index 0c8d2ba..6511bdf 100644
--- a/tests/phpunit/CollaborationHubContentTest.php
+++ b/tests/phpunit/CollaborationHubContentTest.php
@@ -5,7 +5,13 @@
private $content;
 
public function setUp() {
-   parent::setUp();
+   $this->setMwGlobals( [
+   'wgServer' => 'http://localhost',
+   'wgScriptPath' => '/wiki',
+   'wgScript' => '/wiki/index.php',
+   'wgArticlePath' => '/wiki/index.php/$1',
+   'wgActionPaths' => [],
+   ] );
$content = new CollaborationHubContent(
'{ "introduction": "Test content", "display_name": 
"foo",'
. '"footer": "More test content", "colour": "khaki", 
"content": ['
@@ -13,6 +19,7 @@
. '] }'
);
$this->content = TestingAccessWrapper::newFromObject( $content 
);
+   parent::setUp();
}
 
/**
@@ -138,7 +145,7 @@
public function testGetParsedContent( CollaborationHubContent $content, 
$id ) {
global $wgServer;
$expected = [
-   "Wow!" . wfMessage( 
"collaborationkit-hub-missingpage-note" ) . "Create feature",
+   "Wow!" . wfMessage( 
"collaborationkit-hub-missingpage-note" ) . "Create feature",
'',
''
];
@@ -167,7 +174,7 @@
public function testGetMembersBlock( CollaborationHubContent $content, 
$id ) {
$testMemberList = new CollaborationListContent( 
'{"columns":[{"items":[{"title":"User:X"}]}]}' );
 
-   $block = "Meet our members!\n" . wfMessage( 
'collaborationkit-list-isempty' ) . "\n". 
wfMessage( 'collaborationkit-hub-members-view' ) . "" . 
wfMessage( 'collaborationkit-hub-members-signup' ) . "";
+   $block = "Meet our members!\n" . wfMessage( 
'collaborationkit-list-isempty' ) . "\n". 
wfMessage( 'collaborationkit-hub-members-view' ) . "" . 
wfMessage( 'collaborationkit-hub-members-signup' ) . "";
$expected = [ $block, $block, $block ];
$wc = TestingAccessWrapper::newFromObject( $content );
$actual = $wc->getMembersBlock( Title::newMainPage(), new 
ParserOptions, new ParserOutput, $testMemberList );
@@ -181,7 +188,7 @@
public function testGetParsedAnnouncements( CollaborationHubContent 
$content, $id ) {
$testAnnouncement = "* The cafeteria is out of empanadas. We 
apologize for the inconvenience.";
 
-   $block = "" . wfMessage( 
'collaborationkit-hub-pagetitle-announcements' ) . "" . wfMessage( 'Edit' ) . "* The cafeteria is 
out of empanadas. We apologize for the inconvenience.";
+   $block = "" . wfMessage( 
'collaborationkit-hub-pagetitle-announcements' ) . "" . wfMessage( 'Edit' ) . "* The cafeteria is 
out of empanadas. We apologize for the inconvenience.";
$expected = [ $block, $block, $block ];
$wc = TestingAccessWrapper::newFromObject( $content );
$actual = $wc->getParsedAnnouncements( Title::newMainPage(), 
new ParserOptions, $testAnnouncement );
@@ -194,7 +201,7 @@
 */
public function testGetSecondFooter( CollaborationHubContent $content, 
$id ) {
global $wgServer;
-   $block = "" . wfMessage( 'collaborationkit-hub-manage' ) 
. "" . 
wfMessage( 'collaborationkit-hub-addpage' ) . "";
+   $block = "" . wfMessage( 'collaborationkit-hub-manage' ) 
. "" . 
wfMessage( 'collaborationkit-hub-addpage' ) . "";
$expected = [ $block, $block, $block ];
$wc = TestingAccessWrapper::newFromObject( $content );
$actual = $wc->getSecondFooter( Title::newMainPage() );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I645cf123bdc608cfc0c819321cd1a28e00c0dfd0
Gerrit-PatchSet: 2
Gerrit-Project: 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: media: Remove unused private function in SVGMetadataExtractor

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

Change subject: media: Remove unused private function in SVGMetadataExtractor
..


media: Remove unused private function in SVGMetadataExtractor

Change-Id: I3cd00bb4f460a141966ad01e155a97b8a087a8e8
---
M includes/media/SVGMetadataExtractor.php
1 file changed, 0 insertions(+), 6 deletions(-)

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



diff --git a/includes/media/SVGMetadataExtractor.php 
b/includes/media/SVGMetadataExtractor.php
index 4087fb3..2cf4d23 100644
--- a/includes/media/SVGMetadataExtractor.php
+++ b/includes/media/SVGMetadataExtractor.php
@@ -307,12 +307,6 @@
}
}
 
-   // @todo FIXME: Unused, remove?
-   private function throwXmlError( $err ) {
-   $this->debug( "FAILURE: $err" );
-   wfDebug( "SVGReader XML error: $err\n" );
-   }
-
private function debug( $data ) {
if ( $this->mDebug ) {
wfDebug( "SVGReader: $data\n" );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3cd00bb4f460a141966ad01e155a97b8a087a8e8
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Gvozdet 
Gerrit-Reviewer: Aaron Schulz 
Gerrit-Reviewer: Bartosz Dziewoński 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: MZMcBride 
Gerrit-Reviewer: Nikerabbit 
Gerrit-Reviewer: Smalyshev 
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/core[fundraising/REL1_27]: Update DonationInterface submodule

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

Change subject: Update DonationInterface submodule
..


Update DonationInterface submodule

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

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



diff --git a/extensions/DonationInterface b/extensions/DonationInterface
index 8d43938..9b82ca0 16
--- a/extensions/DonationInterface
+++ b/extensions/DonationInterface
@@ -1 +1 @@
-Subproject commit 8d43938c712adf3295ead78cf8b5d385aa779454
+Subproject commit 9b82ca0d262df08f1a7f6df3bdfbc3386ba9404b

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

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

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


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

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

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


Merge branch 'master' into deployment

3435ebb Debug failed mustache rendering

Change-Id: I791da98e52b0d25901d0b05c45f79925f9652c59
---
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/348995
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[fundraising/REL1_27]: Update DonationInterface submodule

2017-04-19 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/348996 )

Change subject: Update DonationInterface submodule
..

Update DonationInterface submodule

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


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/96/348996/1

diff --git a/extensions/DonationInterface b/extensions/DonationInterface
index 8d43938..9b82ca0 16
--- a/extensions/DonationInterface
+++ b/extensions/DonationInterface
@@ -1 +1 @@
-Subproject commit 8d43938c712adf3295ead78cf8b5d385aa779454
+Subproject commit 9b82ca0d262df08f1a7f6df3bdfbc3386ba9404b

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

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

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


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

2017-04-19 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/348995 )

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

Merge branch 'master' into deployment

3435ebb Debug failed mustache rendering

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


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


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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: T163330: Fix regression from 906375ba

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

Change subject: T163330: Fix regression from 906375ba
..


T163330: Fix regression from 906375ba

 * Only record the original dsr if it's valid.  Stripped tags from
   templates won't have dsr.

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

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



diff --git a/lib/wt2html/pp/processors/computeDSR.js 
b/lib/wt2html/pp/processors/computeDSR.js
index 3b0abb8..82c68a7 100644
--- a/lib/wt2html/pp/processors/computeDSR.js
+++ b/lib/wt2html/pp/processors/computeDSR.js
@@ -2,6 +2,7 @@
 
 var Consts = require('../../../config/WikitextConstants.js').WikitextConstants;
 var DU = require('../../../utils/DOMUtils.js').DOMUtils;
+var Util = require('../../../utils/Util.js').Util;
 
 
 function acceptableInconsistency(opts, node, cs, s) {
@@ -241,14 +242,15 @@
correction = ndp.src.length;
ce += correction;
dsrCorrection = correction;
-
-   // Record original DSR for the 
meta tag
-   // since it will now get 
corrected to zero width
-   // since child acquires its 
width.
-   if (!ndp.tmp) {
-   ndp.tmp = {};
+   if (Util.isValidDSR(ndp.dsr)) {
+   // Record original DSR 
for the meta tag
+   // since it will now 
get corrected to zero width
+   // since child acquires 
its width.
+   if (!ndp.tmp) {
+   ndp.tmp = {};
+   }
+   ndp.tmp.origDSR = 
[ndp.dsr[0], ndp.dsr[1], null, null];
}
-   ndp.tmp.origDSR = [ndp.dsr[0], 
ndp.dsr[1], null, null];
}
}
}
diff --git a/tests/mocha/linter.js b/tests/mocha/linter.js
index b6e78ae..fcb9bbb 100644
--- a/tests/mocha/linter.js
+++ b/tests/mocha/linter.js
@@ -74,6 +74,15 @@
result[0].params.should.have.a.property("name", 
"i");
});
});
+   it('should lint stripped tags correctly in misnested tag 
situations from template ( is stripped)', function() {
+   return 
parseWT('{{1x|X}}').then(function(result) {
+   result.should.have.length(1);
+   result[0].should.have.a.property("type", 
"misnested-tag");
+   result[0].dsr.should.deep.equal([ 0, 22, null, 
null ]);
+   result[0].should.have.a.property("params");
+   result[0].params.should.have.a.property("name", 
"i");
+   });
+   });
it('should lint stripped tags correctly in misnested tag 
situations ( is auto-inserted)', function() {
return 
parseWT('XY').then(function(result) {
result.should.have.length(1);

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I98b9545d0e93f77c5a9fff9c16d3bca707e79de6
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Arlolra 
Gerrit-Reviewer: Subramanya Sastry 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] wikimedia...process-control[master]: "make clean" target

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

Change subject: "make clean" target
..


"make clean" target

Change-Id: I9f164531afdd765321dd466372ba7c4be9cd1173
---
M Makefile
1 file changed, 6 insertions(+), 0 deletions(-)

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



diff --git a/Makefile b/Makefile
index 8757871..8b833ea 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,5 @@
 .PHONY: \
+   clean \
coverage \
deb
 
@@ -8,6 +9,11 @@
 noop:
@echo Nothing to do!
 
+clean:
+   rm -rf debian/process-control*
+   rm -f debian/files
+   rm -f debian/debhelper-build-stamp
+
 coverage:
nosetests --with-coverage --cover-package=processcontrol --cover-html
@echo Results are in cover/index.html

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9f164531afdd765321dd466372ba7c4be9cd1173
Gerrit-PatchSet: 3
Gerrit-Project: wikimedia/fundraising/process-control
Gerrit-Branch: master
Gerrit-Owner: Awight 
Gerrit-Reviewer: Ejegg 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...DonationInterface[master]: Debug failed mustache rendering

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

Change subject: Debug failed mustache rendering
..


Debug failed mustache rendering

Change-Id: I437da5ad39f94687e497a8fdbc9702f71fa6b380
---
M gateway_forms/Mustache.php
1 file changed, 3 insertions(+), 1 deletion(-)

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



diff --git a/gateway_forms/Mustache.php b/gateway_forms/Mustache.php
index e2a5e14..7d25297 100644
--- a/gateway_forms/Mustache.php
+++ b/gateway_forms/Mustache.php
@@ -88,7 +88,9 @@
}
$renderer = eval( $code );
if ( !is_callable( $renderer ) ) {
-   throw new RuntimeException( 'Can\'t run compiled 
template!' );
+   throw new RuntimeException(
+   "Can't run compiled template! Template: '$code'"
+   );
}
 
$html = call_user_func( $renderer, $data, array() );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I437da5ad39f94687e497a8fdbc9702f71fa6b380
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DonationInterface
Gerrit-Branch: master
Gerrit-Owner: Ejegg 
Gerrit-Reviewer: AndyRussG 
Gerrit-Reviewer: Awight 
Gerrit-Reviewer: Cdentinger 
Gerrit-Reviewer: XenoRyet 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...CollaborationKit[master]: Set path globals in phpunit tests

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

Change subject: Set path globals in phpunit tests
..

Set path globals in phpunit tests

Avoid differences in output due to different script paths
on different mediawiki installs.

Change-Id: I645cf123bdc608cfc0c819321cd1a28e00c0dfd0
---
M tests/phpunit/CollaborationHubContentTest.php
1 file changed, 8 insertions(+), 1 deletion(-)


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

diff --git a/tests/phpunit/CollaborationHubContentTest.php 
b/tests/phpunit/CollaborationHubContentTest.php
index 0c8d2ba..c8843ca 100644
--- a/tests/phpunit/CollaborationHubContentTest.php
+++ b/tests/phpunit/CollaborationHubContentTest.php
@@ -5,7 +5,13 @@
private $content;
 
public function setUp() {
-   parent::setUp();
+   $this->setMwGlobals( [
+   'wgServer' => 'http://localhost',
+   'wgScriptPath' => '/wiki',
+   'wgScript' => '/wiki/index.php',
+   'wgArticlePath' => '/wiki/index.php/$1',
+   'wgActionPaths' => [],
+   ] );
$content = new CollaborationHubContent(
'{ "introduction": "Test content", "display_name": 
"foo",'
. '"footer": "More test content", "colour": "khaki", 
"content": ['
@@ -13,6 +19,7 @@
. '] }'
);
$this->content = TestingAccessWrapper::newFromObject( $content 
);
+   parent::setUp();
}
 
/**

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

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

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


[MediaWiki-commits] [Gerrit] wikimedia...process-control[master]: Add text to assertions

2017-04-19 Thread Ejegg (Code Review)
Ejegg has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/346922 )

Change subject: Add text to assertions
..


Add text to assertions

Change-Id: I0352db2bcfab288e394954a823456c04e1b3c42a
---
M processcontrol/config.py
M processcontrol/job_spec.py
M processcontrol/output_streamer.py
M processcontrol/runner.py
4 files changed, 23 insertions(+), 17 deletions(-)

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



diff --git a/processcontrol/config.py b/processcontrol/config.py
index 806bf3d..0b6d17d 100644
--- a/processcontrol/config.py
+++ b/processcontrol/config.py
@@ -83,7 +83,7 @@
 class MissingKeyException(Exception):
 
 def __init__(self, path):
-message = "Missing configuration key '" + path + "'"
+message = "Missing configuration key '{path}'".format(path=path)
 super(MissingKeyException, self).__init__(message)
 
 
@@ -107,12 +107,16 @@
 self.validate_global_config()
 
 def validate_global_config(self):
-assert "cron_template" in self.values
-assert "job_directory" in self.values
-assert "output_crontab" in self.values
-assert "output_directory" in self.values
-assert "runner_path" in self.values
-assert "user" in self.values
+required_settings = (
+"cron_template",
+"job_directory",
+"output_crontab",
+"output_directory",
+"runner_path",
+"user",
+)
+for setting in required_settings:
+assert setting in self.values, "Global config invalid: missing 
required '{setting}'".format(setting=setting)
 
 
 class JobConfiguration(Configuration):
@@ -131,19 +135,19 @@
 self.validate_job_config()
 
 def validate_job_config(self):
-assert "name" in self.values
+assert "name" in self.values, "Job config invalid: missing required 
'name'"
 
-assert "command" in self.values
-assert "\n" not in self.values["command"]
+assert "command" in self.values, "Job config invalid: missing required 
'command'"
+assert "\n" not in self.values["command"], "Job config invalid: 
'command' may not contain newlines"
 
 if "schedule" in self.values:
 # No tricky assignments.
-assert "=" not in self.values["schedule"]
+assert "=" not in self.values["schedule"], "Job config invalid: 
'schedule' may not contain the '=' character"
 # Legal cron, but I don't want to deal with it.
-assert "@" not in self.values["schedule"]
+assert "@" not in self.values["schedule"], "Job config invalid: 
'schedule' may not contain the '@' character"
 # No line breaks
-assert "\n" not in self.values["schedule"]
+assert "\n" not in self.values["schedule"], "Job config invalid: 
'schedule' may not contain newlines"
 
 # Be sure the schedule is valid.
 terms = self.values["schedule"].split()
-assert len(terms) == 5
+assert len(terms) == 5, "Job config invalid: 'schedule' must 
contain 5 values separated by whitespace"
diff --git a/processcontrol/job_spec.py b/processcontrol/job_spec.py
index 797a00e..93f095c 100644
--- a/processcontrol/job_spec.py
+++ b/processcontrol/job_spec.py
@@ -31,7 +31,9 @@
 self.config_path = job_path_for_slug(slug)
 
 # Validate that we're not allowing directory traversal.
-assert os.path.dirname(os.path.realpath(self.config_path)) == 
os.path.abspath(self.global_config.get("job_directory"))
+job_directory = 
os.path.abspath(self.global_config.get("job_directory"))
+assert os.path.dirname(os.path.realpath(self.config_path)) == 
job_directory, \
+"You may only run jobs with configuration files in 
'{path}'".format(path=job_directory)
 
 self.config = config.JobConfiguration(self.global_config, 
self.config_path)
 
diff --git a/processcontrol/output_streamer.py 
b/processcontrol/output_streamer.py
index 39e767b..8e6a5ac 100644
--- a/processcontrol/output_streamer.py
+++ b/processcontrol/output_streamer.py
@@ -12,7 +12,7 @@
 Makes the output file path and creates parent directory if needed
 """
 output_directory = config.GlobalConfiguration().get("output_directory")
-assert os.access(output_directory, os.W_OK)
+assert os.access(output_directory, os.W_OK), "Make sure directory '{path}' 
exists and is writable".format(path=output_directory)
 
 # per-job directory
 job_log_directory = output_directory + "/" + slug
diff --git a/processcontrol/runner.py b/processcontrol/runner.py
index 42ed3b5..12f4030 100644
--- a/processcontrol/runner.py
+++ b/processcontrol/runner.py
@@ -29,7 +29,7 @@
 passwd_entry = pwd.getpwuid(int(service_user))
 else:
 passwd_entry = pwd.getpwnam(service_user)
-

[MediaWiki-commits] [Gerrit] oojs/ui[master]: Do not use role=menu/menuitem for MenuSelectWidget/MenuOptio...

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

Change subject: Do not use role=menu/menuitem for 
MenuSelectWidget/MenuOptionWidget
..

Do not use role=menu/menuitem for MenuSelectWidget/MenuOptionWidget

They will now use role=listbox/option from SelectWidget/OptionWidget.

The difference is a bit unclear, but I think listbox is more
appropriate. Per https://www.w3.org/TR/wai-aria/roles:
"A menu is often a list of common actions or functions that the user
can invoke. The menu role is appropriate when a list of menu items is
presented in a manner similar to a menu on a desktop application."
Usually, MenuSelectWidget items do not correspond to user actions
(they are just values), and it's not really a desktop-like menu
(that sounds more like our ListToolGroup and other toolbar stuff).

And for a more practical consideration: a role=combobox widget (like
our ComboBoxInputWidget) can only be paired with a role=listbox list,
not with a role=menu one.

Bug: T149654
Change-Id: Ib9894ef9c70132e1d820bfa3815e47e5160d7ecd
---
M src/widgets/MenuOptionWidget.js
M src/widgets/MenuSelectWidget.js
2 files changed, 2 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/93/348993/1

diff --git a/src/widgets/MenuOptionWidget.js b/src/widgets/MenuOptionWidget.js
index 427d1f3..a9d5009 100644
--- a/src/widgets/MenuOptionWidget.js
+++ b/src/widgets/MenuOptionWidget.js
@@ -16,9 +16,7 @@
OO.ui.MenuOptionWidget.parent.call( this, config );
 
// Initialization
-   this.$element
-   .attr( 'role', 'menuitem' )
-   .addClass( 'oo-ui-menuOptionWidget' );
+   this.$element.addClass( 'oo-ui-menuOptionWidget' );
 };
 
 /* Setup */
diff --git a/src/widgets/MenuSelectWidget.js b/src/widgets/MenuSelectWidget.js
index 637271b..de8d457 100644
--- a/src/widgets/MenuSelectWidget.js
+++ b/src/widgets/MenuSelectWidget.js
@@ -64,9 +64,7 @@
this.highlightOnFilter = !!config.highlightOnFilter;
 
// Initialization
-   this.$element
-   .addClass( 'oo-ui-menuSelectWidget' )
-   .attr( 'role', 'menu' );
+   this.$element.addClass( 'oo-ui-menuSelectWidget' );
 
// Initially hidden - using #toggle may cause errors if subclasses 
override toggle with methods
// that reference properties not initialized at that time of parent 
class construction

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...DonationInterface[master]: Debug failed mustache rendering

2017-04-19 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/348991 )

Change subject: Debug failed mustache rendering
..

Debug failed mustache rendering

Change-Id: I437da5ad39f94687e497a8fdbc9702f71fa6b380
---
M gateway_forms/Mustache.php
1 file changed, 3 insertions(+), 1 deletion(-)


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

diff --git a/gateway_forms/Mustache.php b/gateway_forms/Mustache.php
index e2a5e14..7d25297 100644
--- a/gateway_forms/Mustache.php
+++ b/gateway_forms/Mustache.php
@@ -88,7 +88,9 @@
}
$renderer = eval( $code );
if ( !is_callable( $renderer ) ) {
-   throw new RuntimeException( 'Can\'t run compiled 
template!' );
+   throw new RuntimeException(
+   "Can't run compiled template! Template: '$code'"
+   );
}
 
$html = call_user_func( $renderer, $data, array() );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I437da5ad39f94687e497a8fdbc9702f71fa6b380
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...parsoid[master]: Match [[:mw:Preprocessor_ABNF]] behavior for "broken link".

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

Change subject: Match [[:mw:Preprocessor_ABNF]] behavior for "broken link".
..

Match [[:mw:Preprocessor_ABNF]] behavior for "broken link".

Match the behavior of the PHP preprocessor for links missing their
close brackets.

Change-Id: Ied94e2224d5d72d6b36906f4bb5fd8b55e645210
---
M lib/wt2html/pegTokenizer.pegjs
1 file changed, 20 insertions(+), 4 deletions(-)


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

diff --git a/lib/wt2html/pegTokenizer.pegjs b/lib/wt2html/pegTokenizer.pegjs
index cd25d08..4abf3ac 100644
--- a/lib/wt2html/pegTokenizer.pegjs
+++ b/lib/wt2html/pegTokenizer.pegjs
@@ -954,18 +954,34 @@
 target:wikilink_preprocessor_text?
 tpos:("" { return endOffset(); })
 lcontent:wikilink_content?
-"]]"
+closed:"]]"?
   {
   if (lcontent === null) {
   lcontent = { content: [] };
   }
 
-  if (target === null || lcontent.pipetrick) {
-return [text()];
+  var textTokens = [];
+  if (target === null || lcontent.pipetrick || !closed) {
+// !closed => "broken-link" rule; see [[:mw:Preprocessor_ABNF]]
+textTokens.push("[[");
+if (target) {
+  textTokens.push(target);
+}
+if (lcontent.pipetrick) {
+  textTokens.push("|");
+}
+lcontent.content.forEach(function(a) {
+  // a is a mw:maybeContent attribute
+  textTokens.push("|");
+  textTokens.push(a.v);
+});
+if (closed) {
+  textTokens.push("]]");
+}
+return textTokens;
   }
 
   var obj = new SelfclosingTagTk('wikilink');
-  var textTokens = [];
   var hrefKV = new KV('href', target);
   hrefKV.vsrc = input.substring(startOffset() + 2, tpos);
   // XXX: Point to object with path, revision and input information

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

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

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


[MediaWiki-commits] [Gerrit] analytics/dashiki[master]: Add support for monthly pageviews in metrics-by-project

2017-04-19 Thread Mforns (Code Review)
Mforns has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/348990 )

Change subject: Add support for monthly pageviews in metrics-by-project
..

Add support for monthly pageviews in metrics-by-project

Bug: T75331
Change-Id: If5e42bd29f0b25b531c5de1e37f39c65ae4ba182
---
M src/app/config.js
1 file changed, 22 insertions(+), 19 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/analytics/dashiki 
refs/changes/90/348990/1

diff --git a/src/app/config.js b/src/app/config.js
index 1b4cfb1..3c07f9e 100644
--- a/src/app/config.js
+++ b/src/app/config.js
@@ -26,6 +26,26 @@
 dataStart: '20160101'
 };
 
+var pageviewsConfig = {
+endpoint: 'getAggregatedPageviews',
+valueField: 'views',
+dateFormat: {
+'hourly': 'MMDDHH',
+'daily': 'MMDD00',
+'monthly': 'MM0100'
+},
+// Api knows how to translate from general breakdown
+// labels to api semantics to retrieve data.
+breakdownOptions: {
+'All': 'all-access',
+'Desktop site': 'desktop',
+'Mobile site': 'mobile-web',
+'Mobile App': 'mobile-app'
+},
+breakdownParameter: 'access',
+dataStart: '2015010100'
+};
+
 return {
 
 // indicates which mediawiki host and pages contain the configuration
@@ -51,25 +71,8 @@
 },
 
 aqsApi: {
-'Pageviews': {
-endpoint: 'getAggregatedPageviews',
-valueField: 'views',
-dateFormat: {
-'hourly': 'MMDDHH',
-'daily': 'MMDD00',
-'monthly': 'MM0100'
-},
-// Api knows how to translate from general breakdown
-// labels to api semantics to retrieve data.
-breakdownOptions: {
-'All': 'all-access',
-'Desktop site': 'desktop',
-'Mobile site': 'mobile-web',
-'Mobile App': 'mobile-app'
-},
-breakdownParameter: 'access',
-dataStart: '2015010100'
-},
+'Pageviews': pageviewsConfig,
+'MonthlyPageviews': pageviewsConfig,
 'LegacyPagecounts': {
 endpoint: 'getAggregatedLegacyPagecounts',
 valueField: 'count',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If5e42bd29f0b25b531c5de1e37f39c65ae4ba182
Gerrit-PatchSet: 1
Gerrit-Project: analytics/dashiki
Gerrit-Branch: master
Gerrit-Owner: Mforns 

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


[MediaWiki-commits] [Gerrit] mediawiki...Echo[master]: Special:Notifications show unread by default if there's unre...

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

Change subject: Special:Notifications show unread by default if there's unread 
notifications
..


Special:Notifications show unread by default if there's unread notifications

Bug: T162927
Change-Id: Ibdfaca90803eb8b12b12eb1781b0692e7336b7d9
---
M includes/special/SpecialNotifications.php
M modules/model/mw.echo.dm.ModelManager.js
M modules/special/ext.echo.special.js
3 files changed, 7 insertions(+), 1 deletion(-)

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



diff --git a/includes/special/SpecialNotifications.php 
b/includes/special/SpecialNotifications.php
index 8da8386..a03a83d 100644
--- a/includes/special/SpecialNotifications.php
+++ b/includes/special/SpecialNotifications.php
@@ -132,6 +132,9 @@
 
// Mark all read button
if ( count( $data[ 'unread' ] ) > 0 ) {
+   // tell the UI to show 'unread' notifications 
only (instead of 'all')
+   $out->addJsConfigVars( 'wgEchoReadState', 
'unread' );
+
$markReadSectionText = $this->msg( 
'echo-specialpage-section-markread' )->text();
$markAsReadLabelIcon = new 
EchoOOUI\LabelIconWidget( [
'label' => $markReadSectionText,
diff --git a/modules/model/mw.echo.dm.ModelManager.js 
b/modules/model/mw.echo.dm.ModelManager.js
index 81c448e..213d4b5 100644
--- a/modules/model/mw.echo.dm.ModelManager.js
+++ b/modules/model/mw.echo.dm.ModelManager.js
@@ -25,6 +25,7 @@
 * @cfg {string|string[]} [type="message"] The type of the 
notifications in
 *  the models that this manager handles.
 * @cfg {number} [itemsPerPage=25] Number of items per page
+* @cfg {string} [readState] Notifications read state. Pass through to 
mw.echo.dm.FiltersModel
 */
mw.echo.dm.ModelManager = function MwEchoDmModelManager( counter, 
config ) {
config = config || {};
@@ -45,7 +46,8 @@
itemsPerPage: config.itemsPerPage || 25
} );
this.filtersModel = new mw.echo.dm.FiltersModel( {
-   selectedSource: 'local'
+   selectedSource: 'local',
+   readState: config.readState
} );
 
// Events
diff --git a/modules/special/ext.echo.special.js 
b/modules/special/ext.echo.special.js
index edae0d1..a0c9ba2 100644
--- a/modules/special/ext.echo.special.js
+++ b/modules/special/ext.echo.special.js
@@ -14,6 +14,7 @@
modelManager = new mw.echo.dm.ModelManager( 
unreadCounter, {
type: [ 'message', 'alert' ],
itemsPerPage: limitNotifications,
+   readState: mw.config.get( 'wgEchoReadState' ),
localCounter: new 
mw.echo.dm.UnreadNotificationCounter(
echoApi,
[ 'message', 'alert' ],

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibdfaca90803eb8b12b12eb1781b0692e7336b7d9
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: Sbisson 
Gerrit-Reviewer: Catrope 
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...parsoid[master]: Linter: Remove redundant comments

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

Change subject: Linter: Remove redundant comments
..


Linter: Remove redundant comments

Change-Id: Ice431a56b416eaa9b8ef9f74594c1f126e279e5f
---
M lib/wt2html/pp/handlers/linter.js
1 file changed, 1 insertion(+), 10 deletions(-)

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



diff --git a/lib/wt2html/pp/handlers/linter.js 
b/lib/wt2html/pp/handlers/linter.js
index 8ca1f3c..f932a1a 100644
--- a/lib/wt2html/pp/handlers/linter.js
+++ b/lib/wt2html/pp/handlers/linter.js
@@ -383,19 +383,10 @@
logTransclusions(env, node, dp, tplInfo);
}
 
-   // Log Tree Builder fixups
logTreeBuilderFixup(env, node, dp, tplInfo);
-
-   // Log Ignored Table Attributes
logIgnoredTableAttr(env, node, dp, tplInfo);
-
-   // Log deletable tables (T161341)
-   logDeletableTables(env, node, dp, tplInfo);
-
-   // Log obsolete HTML tags
+   logDeletableTables(env, node, dp, tplInfo); // For T161341
logObsoleteHTMLTags(env, node, dp, tplInfo);
-
-   // Log bogus image options
logBogusImageOptions(env, node, dp, tplInfo);
 
// Log fostered content, but skip rendering-transparent nodes

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

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

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


[MediaWiki-commits] [Gerrit] search/MjoLniR[master]: Documentation for running tests

2017-04-19 Thread EBernhardson (Code Review)
EBernhardson has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/348989 )

Change subject: Documentation for running tests
..

Documentation for running tests

Add a bit to README.rst about how to run the test suite.

Change-Id: Ic1d13d7d47d5bb8c3c2d91bb9d8a2365338c0dc5
---
M README.rst
1 file changed, 21 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/search/MjoLniR 
refs/changes/89/348989/1

diff --git a/README.rst b/README.rst
index 7098af3..d64c2f2 100644
--- a/README.rst
+++ b/README.rst
@@ -11,6 +11,27 @@
 
 Targets pyspark from cdh5.10.0
 
+Running tests
+=
+
+Tests can be run from within the provided Vagrant configuration. Use the
+following from the root of this repository to build a vagrant box, ssh into it,
+and run the tests::
+
+vagrant up
+vagrant ssh
+cd /vagrant
+venv/bin/tox
+
+The test suite includes both flake8 (linter) and pytest (unit) tests. These
+can be run independantly with the -e option for tox::
+
+venv/bin/tox -e flake8
+
+Individual pytest tests can be run by specifying the path on the command line::
+
+venv/bin/tox -e pytest mjolnir/test/test_sampling.py
+
 Other
 =
 Documentation follows the numpy documentation guidelines:

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic1d13d7d47d5bb8c3c2d91bb9d8a2365338c0dc5
Gerrit-PatchSet: 1
Gerrit-Project: search/MjoLniR
Gerrit-Branch: master
Gerrit-Owner: EBernhardson 

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


[MediaWiki-commits] [Gerrit] testing-access-wrapper[master]: readme: Fix for compat with Doxygen Markdown

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

Change subject: readme: Fix  for compat with Doxygen Markdown
..


readme: Fix  for compat with Doxygen Markdown

The tripple-backtick syntax works for GitHub only. Using PRE with
lang="" attribute work in both GitHub, GitBlit and Doxygen.

Change-Id: Id605edb197471811013c34de3ca49e13ea7e1ee7
---
M README.md
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Gergő Tisza: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/README.md b/README.md
index fb9b0a3..885516d 100644
--- a/README.md
+++ b/README.md
@@ -11,7 +11,7 @@
 Usage
 -
 
-```php
+
 use Wikimedia\TestingAccessWrapper;
 
 class NonPublic {
@@ -27,7 +27,7 @@
 $wrapper->prop = 'foo';
 $wrapper->func();
 $classWrapper->staticFunc();
-```
+
 
 Running tests
 -

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id605edb197471811013c34de3ca49e13ea7e1ee7
Gerrit-PatchSet: 1
Gerrit-Project: testing-access-wrapper
Gerrit-Branch: master
Gerrit-Owner: Krinkle 
Gerrit-Reviewer: BryanDavis 
Gerrit-Reviewer: Gergő Tisza 
Gerrit-Reviewer: Gilles 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Reedy 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/core[wmf/1.29.0-wmf.20]: mw.loader: Don't assume var 'loading' assigns before Promise...

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

Change subject: mw.loader: Don't assume var 'loading' assigns before Promise 
resolves
..


mw.loader: Don't assume var 'loading' assigns before Promise resolves

In rare situations the variable loading already assigned with a promise and
the call to loading.map fails with

  TypeError: loading.map is not a function

Change-Id: Ie50bdda229e48b159702fc2a83e641a35d7c850c
(cherry picked from commit dd140224c850e011f9c5ea4a8763c5918d4ab566)
---
M resources/src/mediawiki/mediawiki.js
1 file changed, 5 insertions(+), 3 deletions(-)

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



diff --git a/resources/src/mediawiki/mediawiki.js 
b/resources/src/mediawiki/mediawiki.js
index 86a9a0a..08807fb 100644
--- a/resources/src/mediawiki/mediawiki.js
+++ b/resources/src/mediawiki/mediawiki.js
@@ -2754,14 +2754,16 @@
 * @member mw.hook
 */
$( function () {
-   var loading = $.grep( mw.loader.getModuleNames(), function ( 
module ) {
+   var loading, modules;
+
+   modules = $.grep( mw.loader.getModuleNames(), function ( module 
) {
return mw.loader.getState( module ) === 'loading';
} );
// We only need a callback, not any actual module. First try a 
single using()
// for all loading modules. If one fails, fall back to tracking 
each module
// separately via $.when(), this is expensive.
-   loading = mw.loader.using( loading ).then( null, function () {
-   var all = loading.map( function ( module ) {
+   loading = mw.loader.using( modules ).then( null, function () {
+   var all = modules.map( function ( module ) {
return mw.loader.using( module ).then( null, 
function () {
return $.Deferred().resolve();
} );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie50bdda229e48b159702fc2a83e641a35d7c850c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.29.0-wmf.20
Gerrit-Owner: Jforrester 
Gerrit-Reviewer: Fomafix 
Gerrit-Reviewer: Jack Phoenix 
Gerrit-Reviewer: Jforrester 
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...WikimediaEvents[wmf/1.29.0-wmf.20]: Add missing dependency on mediawiki.Uri

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

Change subject: Add missing dependency on mediawiki.Uri
..


Add missing dependency on mediawiki.Uri

Bug: T162604
Change-Id: Ifaf2b6076297de94145fd78f37ad0433618ba0fc
(cherry picked from commit fe2aca46f4e206bfec2b903aa896e7876e079258)
---
M extension.json
1 file changed, 2 insertions(+), 1 deletion(-)

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



diff --git a/extension.json b/extension.json
index 996e5c4..015b995 100644
--- a/extension.json
+++ b/extension.json
@@ -183,7 +183,8 @@
"mobile"
],
"dependencies": [
-   "mediawiki.user"
+   "mediawiki.user",
+   "mediawiki.Uri"
]
}
},

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ifaf2b6076297de94145fd78f37ad0433618ba0fc
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/WikimediaEvents
Gerrit-Branch: wmf/1.29.0-wmf.20
Gerrit-Owner: Krinkle 
Gerrit-Reviewer: Catrope 
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...parsoid[master]: T163330: Fix regression from 906375ba

2017-04-19 Thread Arlolra (Code Review)
Arlolra has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/348988 )

Change subject: T163330: Fix regression from 906375ba
..

T163330: Fix regression from 906375ba

 * Only record the original dsr if it's valid.  Stripped tags from
   templates won't have dsr.

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


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

diff --git a/lib/wt2html/pp/processors/computeDSR.js 
b/lib/wt2html/pp/processors/computeDSR.js
index 3b0abb8..82c68a7 100644
--- a/lib/wt2html/pp/processors/computeDSR.js
+++ b/lib/wt2html/pp/processors/computeDSR.js
@@ -2,6 +2,7 @@
 
 var Consts = require('../../../config/WikitextConstants.js').WikitextConstants;
 var DU = require('../../../utils/DOMUtils.js').DOMUtils;
+var Util = require('../../../utils/Util.js').Util;
 
 
 function acceptableInconsistency(opts, node, cs, s) {
@@ -241,14 +242,15 @@
correction = ndp.src.length;
ce += correction;
dsrCorrection = correction;
-
-   // Record original DSR for the 
meta tag
-   // since it will now get 
corrected to zero width
-   // since child acquires its 
width.
-   if (!ndp.tmp) {
-   ndp.tmp = {};
+   if (Util.isValidDSR(ndp.dsr)) {
+   // Record original DSR 
for the meta tag
+   // since it will now 
get corrected to zero width
+   // since child acquires 
its width.
+   if (!ndp.tmp) {
+   ndp.tmp = {};
+   }
+   ndp.tmp.origDSR = 
[ndp.dsr[0], ndp.dsr[1], null, null];
}
-   ndp.tmp.origDSR = [ndp.dsr[0], 
ndp.dsr[1], null, null];
}
}
}
diff --git a/tests/mocha/linter.js b/tests/mocha/linter.js
index b6e78ae..fcb9bbb 100644
--- a/tests/mocha/linter.js
+++ b/tests/mocha/linter.js
@@ -74,6 +74,15 @@
result[0].params.should.have.a.property("name", 
"i");
});
});
+   it('should lint stripped tags correctly in misnested tag 
situations from template ( is stripped)', function() {
+   return 
parseWT('{{1x|X}}').then(function(result) {
+   result.should.have.length(1);
+   result[0].should.have.a.property("type", 
"misnested-tag");
+   result[0].dsr.should.deep.equal([ 0, 22, null, 
null ]);
+   result[0].should.have.a.property("params");
+   result[0].params.should.have.a.property("name", 
"i");
+   });
+   });
it('should lint stripped tags correctly in misnested tag 
situations ( is auto-inserted)', function() {
return 
parseWT('XY').then(function(result) {
result.should.have.length(1);

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...OpenIDConnect[master]: Added optional error message to authenticate().

2017-04-19 Thread Cicalese (Code Review)
Cicalese has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/348987 )

Change subject: Added optional error message to authenticate().
..

Added optional error message to authenticate().

Change-Id: I546849e9098c514ad0a3bc44221f6c24ac280fcf
---
M OpenIDConnect.class.php
M extension.json
2 files changed, 5 insertions(+), 3 deletions(-)


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

diff --git a/OpenIDConnect.class.php b/OpenIDConnect.class.php
index b874f41..da7e8a8 100644
--- a/OpenIDConnect.class.php
+++ b/OpenIDConnect.class.php
@@ -40,8 +40,10 @@
 * @param &$username
 * @param &$realname
 * @param &$email
+* @param &$errorMessage
 */
-   public function authenticate( &$id, &$username, &$realname, &$email ) {
+   public function authenticate( &$id, &$username, &$realname, &$email,
+   &$errorMessage ) {
 
if ( !array_key_exists( 'SERVER_PORT', $_SERVER ) ) {
wfDebug( "in authenticate, server port not set" . 
PHP_EOL );
diff --git a/extension.json b/extension.json
index 7b50289..88c4ce7 100644
--- a/extension.json
+++ b/extension.json
@@ -1,6 +1,6 @@
 {
"name": "OpenID Connect",
-   "version": "3.1",
+   "version": "4.0",
"author": [
"[https://www.mediawiki.org/wiki/User:Cindy.cicalese Cindy 
Cicalese]"
],
@@ -9,7 +9,7 @@
"type": "other",
"requires": {
"extensions": {
-   "PluggableAuth": ">= 2.0"
+   "PluggableAuth": ">= 4.0"
}
},
"SpecialPages": {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I546849e9098c514ad0a3bc44221f6c24ac280fcf
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/OpenIDConnect
Gerrit-Branch: master
Gerrit-Owner: Cicalese 

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


[MediaWiki-commits] [Gerrit] mediawiki...SimpleSAMLphp[master]: Added optional error message to authenticate().

2017-04-19 Thread Cicalese (Code Review)
Cicalese has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/348986 )

Change subject: Added optional error message to authenticate().
..

Added optional error message to authenticate().

Bumped version number to synchronize with PluggaleAuth and OpenIDConnect
extensions.

Change-Id: Ib9539d177147b9cfbc7ee533dc3939d1f2e41298
---
M SimpleSAMLphp.class.php
M extension.json
2 files changed, 54 insertions(+), 24 deletions(-)


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

diff --git a/SimpleSAMLphp.class.php b/SimpleSAMLphp.class.php
index 05664fd..2b87420 100644
--- a/SimpleSAMLphp.class.php
+++ b/SimpleSAMLphp.class.php
@@ -32,11 +32,18 @@
 * @param &$username
 * @param &$realname
 * @param &$email
+* @param &$errorMessage
 */
-   public function authenticate( &$id, &$username, &$realname, &$email ) {
+   public function authenticate( &$id, &$username, &$realname, &$email,
+   &$errorMessage ) {
 
$saml = $this->getSAMLClient();
-   $saml->requireAuth();
+   try {
+   $saml->requireAuth();
+   } catch ( Exception $e ) {
+   $errorMessage = $e->getMessage();
+   return false;
+   }
$attributes = $saml->getAttributes();
 
if ( isset( $GLOBALS['wgSimpleSAMLphp_RealNameAttribute'] ) ) {
@@ -50,6 +57,8 @@
}
$realname .= 
$attributes[$attribute][0];
} else {
+   wfDebug( 'SimpleSAMLphp: Could 
not find real name attribute ' .
+   $attribute );
return false;
}
}
@@ -57,36 +66,52 @@
if ( array_key_exists( $realNameAttribute, 
$attributes ) ) {
$realname = 
$attributes[$realNameAttribute][0];
} else {
+   wfDebug( 'SimpleSAMLphp: Could not find 
real name attribute ' .
+   $attributes );
return false;
}
}
} else {
+   wfDebug( 'SimpleSAMLphp: 
$wgSimpleSAMLphp_RealNameAttribute is not set' );
return false;
}
 
-   if ( isset( $GLOBALS['wgSimpleSAMLphp_EmailAttribute'] ) &&
-   array_key_exists( 
$GLOBALS['wgSimpleSAMLphp_EmailAttribute'],
+   if ( isset( $GLOBALS['wgSimpleSAMLphp_EmailAttribute'] ) ) {
+   if ( array_key_exists( 
$GLOBALS['wgSimpleSAMLphp_EmailAttribute'],
$attributes ) ) {
-   $email = 
$attributes[$GLOBALS['wgSimpleSAMLphp_EmailAttribute']][0];
-   } else {
-   return false;
-   }
-
-   if ( isset( $GLOBALS['wgSimpleSAMLphp_UsernameAttribute'] ) &&
-   array_key_exists( 
$GLOBALS['wgSimpleSAMLphp_UsernameAttribute'],
-   $attributes ) ) {
-   $username = strtolower(
-   
$attributes[$GLOBALS['wgSimpleSAMLphp_UsernameAttribute']][0] );
-   $nt = Title::makeTitleSafe( NS_USER, $username );
-   if ( is_null( $nt ) ) {
+   $email = 
$attributes[$GLOBALS['wgSimpleSAMLphp_EmailAttribute']][0];
+   } else {
+   wfDebug( 'SimpleSAMLphp: Could not find email 
attribute ' .
+   $attributes );
return false;
}
-   $username = $nt->getText();
-   $id = User::idFromName( $username );
-   return true;
+   } else {
+   wfDebug( 'SimpleSAMLphp: 
$wgSimpleSAMLphp_EmailAttribute is not set' );
+   return false;
}
 
-   return false;
+   if ( isset( $GLOBALS['wgSimpleSAMLphp_UsernameAttribute'] ) ) {
+   if ( array_key_exists( 
$GLOBALS['wgSimpleSAMLphp_UsernameAttribute'],
+   $attributes ) ) {
+   $username = strtolower(
+   
$attributes[$GLOBALS['wgSimpleSAMLphp_UsernameAttribute']][0] );
+   $nt = 

[MediaWiki-commits] [Gerrit] wikimedia...SmashPig[deployment]: Merge branch 'master' into HEAD 8c1ab63 Fix EC recurring pro...

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

Change subject: Merge branch 'master' into HEAD 8c1ab63 Fix EC recurring 
profile creation
..


Merge branch 'master' into HEAD
8c1ab63 Fix EC recurring profile creation

Change-Id: I2fb8cd48d745f7930bfb88359dc156304958696f
---
D PaymentProviders/PayPal/Tests/Data/recurring_payment_profile_created.json
D 
PaymentProviders/PayPal/Tests/Data/recurring_payment_profile_created_transformed.json
D PaymentProviders/PayPal/Tests/phpunit/CaptureIncomingMessageTest.php
3 files changed, 0 insertions(+), 227 deletions(-)

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



diff --git 
a/PaymentProviders/PayPal/Tests/Data/recurring_payment_profile_created.json 
b/PaymentProviders/PayPal/Tests/Data/recurring_payment_profile_created.json
deleted file mode 100644
index 1cd1c71..000
--- a/PaymentProviders/PayPal/Tests/Data/recurring_payment_profile_created.json
+++ /dev/null
@@ -1,30 +0,0 @@
-{
-  "payment_cycle": "Monthly",
-  "txn_type": "recurring_payment_profile_created",
-  "last_name": "Fowl",
-  "next_payment_date": "03:00:00 May 18, 2017 PDT",
-  "residence_country": "US",
-  "initial_payment_amount": "0",
-  "rp_invoice_id": "47017286",
-  "currency_code": "JPY",
-  "time_created": "09:45:28 Apr 18, 2017 PDT",
-  "verify_sign": "ATZo1sTL1YpCR8SD-CzFolXviWIiAYV78oZbytx6QLNuI3z-KS8wKLqC",
-  "period_type": " Regular",
-  "payer_status": "unverified",
-  "tax": "0",
-  "payer_email": "do...@generous.net",
-  "first_name": "Fezziwig",
-  "receiver_email": "recei...@organization.org",
-  "payer_id": "8R297FE87CD8S",
-  "product_type": "1",
-  "shipping": "0",
-  "amount_per_cycle": "140",
-  "profile_status": "Active",
-  "charset": "UTF-8",
-  "notify_version": "3.8",
-  "amount": "140",
-  "outstanding_balance": "0",
-  "recurring_payment_id": "I-88J1M3DLSF0",
-  "product_name": "Monthly donation to the Wikimedia Foundation",
-  "ipn_track_id": "8999c084zz0f2"
-}
diff --git 
a/PaymentProviders/PayPal/Tests/Data/recurring_payment_profile_created_transformed.json
 
b/PaymentProviders/PayPal/Tests/Data/recurring_payment_profile_created_transformed.json
deleted file mode 100644
index 890f7dd..000
--- 
a/PaymentProviders/PayPal/Tests/Data/recurring_payment_profile_created_transformed.json
+++ /dev/null
@@ -1,21 +0,0 @@
-{
-  "subscr_id": "I-88J1M3DLSF0",
-  "txn_type": "subscr_signup",
-  "contribution_tracking_id": "47017286",
-  "order_id": "47017286",
-  "email": "do...@generous.net",
-  "first_name": "Fezziwig",
-  "middle_name": "",
-  "last_name": "Fowl",
-  "frequency_interval": "1",
-  "frequency_unit": "month",
-  "installments": 0,
-  "create_date": 1492533928,
-  "start_date": 1492533928,
-  "date": 1492533928,
-  "gateway": "paypal_ec",
-  "recurring": "1",
-  "source_name": "SmashPig",
-  "source_type": "listener",
-  "source_version": "unknown"
-}
diff --git 
a/PaymentProviders/PayPal/Tests/phpunit/CaptureIncomingMessageTest.php 
b/PaymentProviders/PayPal/Tests/phpunit/CaptureIncomingMessageTest.php
deleted file mode 100644
index 64b7e2c..000
--- a/PaymentProviders/PayPal/Tests/phpunit/CaptureIncomingMessageTest.php
+++ /dev/null
@@ -1,176 +0,0 @@
-<<< HEAD   (3db064 Merge branch 'master' into deployment)
-===
- 'donations',
-   'express_checkout.json' => 'donations',
-   'recurring_payment_profile_created.json' => 'recurring',
-   'subscr_signup.json' => 'recurring',
-   'subscr_payment.json' => 'recurring',
-   'recurring_payment.json' => 'recurring',
-   'refund.json' => 'refund',
-   'refund_ec.json' => 'refund',
-   'refund_recurring_ec.json' => 'refund',
-   'chargeback_settlement.json' => 'refund',
-   // this should not actually get written to
-   // TODO 'new_case.json' => 'no-op',
-   );
-
-   public function setUp() {
-   parent::setUp();
-   $this->config = PayPalTestConfiguration::get();
-
-   // php-queue\PDO complains about pop() from non-existent table
-   $this->config->object( 'data-store/jobs-paypal' )
-   ->createTable( 'jobs-paypal' );
-
-   Context::initWithLogger( $this->config );
-   }
-
-   public function tearDown() {
-   self::$fail_verification = false;
-   self::$paypal_is_broken = false;
-   parent::tearDown();
-   }
-
-   public function messageProvider() {
-   $messages = array();
-   foreach ( self::$message_data as $file => $type ) {
-   $payloadFile = __DIR__ . '/../Data/' . $file;
-   $messageData = array(
-   'type' => $type,
-   'payload' => json_decode(
- 

[MediaWiki-commits] [Gerrit] mediawiki...PluggableAuth[master]: Added optional error message to authenticate().

2017-04-19 Thread Cicalese (Code Review)
Cicalese has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/348985 )

Change subject: Added optional error message to authenticate().
..

Added optional error message to authenticate().

Bumped version number to synchronize with SimpleSAMLphp and OpenIDConnect
extensions.

Change-Id: I2ff91c1a5d62fd391f16c4b2756724fafcdde877
---
M PluggableAuth.class.php
M PluggableAuthLogin.php
M extension.json
3 files changed, 13 insertions(+), 4 deletions(-)


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

diff --git a/PluggableAuth.class.php b/PluggableAuth.class.php
index 23ef34a..0584d6c 100644
--- a/PluggableAuth.class.php
+++ b/PluggableAuth.class.php
@@ -31,9 +31,10 @@
 * @param &$username
 * @param &$realname
 * @param &$email
+* @param &$errorMessage
 */
abstract public function authenticate( &$id, &$username, &$realname,
-   &$email );
+   &$email, &$errorMessage );
 
/**
 * @since 1.0
diff --git a/PluggableAuthLogin.php b/PluggableAuthLogin.php
index b94e372..a338275 100644
--- a/PluggableAuthLogin.php
+++ b/PluggableAuthLogin.php
@@ -42,7 +42,8 @@
$pluggableauth = PluggableAuth::singleton();
$error = null;
if ( $pluggableauth ) {
-   if ( $pluggableauth->authenticate( $id, $username, 
$realname, $email ) ) {
+   if ( $pluggableauth->authenticate( $id, $username, 
$realname, $email,
+   $error ) ) {
if ( is_null( $id ) ) {
$user->loadDefaults( $username );
$user->mName = $username;
@@ -72,7 +73,14 @@
}
} else {
wfDebug( 'Authentication failure.' );
-   $error = wfMessage( 
'pluggableauth-authentication-failure')->text();
+   if ( is_null( $error ) ) {
+   $error = wfMessage( 
'pluggableauth-authentication-failure')->text();
+   } else {
+   if ( !is_string( $error ) ) {
+   $error = strval( $error );
+   }
+   wfDebug( 'ERROR: ' . $error );
+   }
}
}
if ( !is_null( $error ) ) {
diff --git a/extension.json b/extension.json
index 3f3f05e..851262d 100644
--- a/extension.json
+++ b/extension.json
@@ -1,6 +1,6 @@
 {
"name": "PluggableAuth",
-   "version": "2.2",
+   "version": "4.0",
"author": [
"[https://www.mediawiki.org/wiki/User:Cindy.cicalese Cindy 
Cicalese]"
],

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2ff91c1a5d62fd391f16c4b2756724fafcdde877
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/PluggableAuth
Gerrit-Branch: master
Gerrit-Owner: Cicalese 

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


[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: Show a different label for the current mode in the editor mo...

2017-04-19 Thread Jforrester (Code Review)
Jforrester has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/348984 )

Change subject: Show a different label for the current mode in the editor mode 
selector
..

Show a different label for the current mode in the editor mode selector

Bug: T162864
Change-Id: I2242f85f8c4607411e65b64c8e43181bb139945f
---
M extension.json
M modules/ve-mw/i18n/en.json
M modules/ve-mw/i18n/qqq.json
M modules/ve-mw/init/ve.init.MWEditModeTool.js
4 files changed, 25 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor 
refs/changes/84/348984/1

diff --git a/extension.json b/extension.json
index 90f9d1f..505c60d 100644
--- a/extension.json
+++ b/extension.json
@@ -1146,6 +1146,7 @@
"visualeditor-editingtabdialog-title",
"visualeditor-mweditmode-tooltip",
"visualeditor-mweditmodesource-tool",
+   "visualeditor-mweditmodesource-tool-current",

"visualeditor-mweditmodesource-tool-unavailable",
"visualeditor-mweditmodesource-warning-cancel",
"visualeditor-mweditmodesource-warning-switch",
@@ -1155,6 +1156,7 @@
"visualeditor-mweditmodeve-showagain",
"visualeditor-mweditmodeve-title",
"visualeditor-mweditmodeve-tool",
+   "visualeditor-mweditmodeve-tool-current",
"visualeditor-mweditmodeve-tool-unavailable",
"visualeditor-mweditmodeve-warning",
"visualeditor-mweditmodewt-popup-body",
diff --git a/modules/ve-mw/i18n/en.json b/modules/ve-mw/i18n/en.json
index 6904ab8..2273dae 100644
--- a/modules/ve-mw/i18n/en.json
+++ b/modules/ve-mw/i18n/en.json
@@ -276,6 +276,7 @@
"visualeditor-mweditmodesource-progress": "Switching to source 
editing…",
"visualeditor-mweditmodesource-title": "Switch to source editing?",
"visualeditor-mweditmodesource-tool": "Switch to source editing",
+   "visualeditor-mweditmodesource-tool-current": "Source editing",
"visualeditor-mweditmodesource-tool-unavailable": "Source editing is 
not available here",
"visualeditor-mweditmodesource-warning": "You are switching to source 
editing.\nDo you want to continue?",
"visualeditor-mweditmodesource-warning-cancel": "Cancel",
@@ -287,6 +288,7 @@
"visualeditor-mweditmodeve-showagain": "Don't show this message again",
"visualeditor-mweditmodeve-title": "Switch to visual editing?",
"visualeditor-mweditmodeve-tool": "Switch to visual editing",
+   "visualeditor-mweditmodeve-tool-current": "Visual editing",
"visualeditor-mweditmodeve-tool-unavailable": "Visual editing is not 
available here",
"visualeditor-mweditmodeve-warning": "You are switching to visual 
editing.\nDo you want to continue?",
"visualeditor-mweditmodewt-popup-body": "You can switch back to source 
editing at any time by clicking on this icon.",
diff --git a/modules/ve-mw/i18n/qqq.json b/modules/ve-mw/i18n/qqq.json
index 9a76fc9..df32791 100644
--- a/modules/ve-mw/i18n/qqq.json
+++ b/modules/ve-mw/i18n/qqq.json
@@ -289,6 +289,7 @@
"visualeditor-mweditmodesource-progress": "Title of progress bar shown 
while switching to source mode.",
"visualeditor-mweditmodesource-title": "Title of dialog to confirm 
switching to source mode.",
"visualeditor-mweditmodesource-tool": "Label for tool that changes edit 
mode to source editing.",
+   "visualeditor-mweditmodesource-tool-current": "Label for tool that 
changes edit mode to source editing if the user is already in that mode.",
"visualeditor-mweditmodesource-tool-unavailable": "'''Please translate 
\"Source\" as meaning \"Source codes\", not source of references.''' Label for 
tool that changes edit mode to source editing when it is not available.",
"visualeditor-mweditmodesource-warning": "Warning message show before 
changing edit mode to source editing. It may allow the user to keep the changes 
using the message {{msg-mw|Visualeditor-mweditmodesource-warning-switch}} or 
cancel.",
"visualeditor-mweditmodesource-warning-cancel": "Label for the button 
on the confirmation dialog for switching to source editing to cancel and return 
to editing.\n{{Identical|Cancel}}",
@@ -300,6 +301,7 @@
"visualeditor-mweditmodeve-showagain": "Label for the checkboxes to not 
show one of the 'switched to visual mode' or 'switched to source mode' popups 
again",
"visualeditor-mweditmodeve-title": "Title of dialog to confirm 
switching to visual mode.",
"visualeditor-mweditmodeve-tool": "Label for tool that changes edit 
mode to 

[MediaWiki-commits] [Gerrit] mediawiki...MobileFrontend[master]: Clean up setMobileMode preference update

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

Change subject: Clean up setMobileMode preference update
..


Clean up setMobileMode preference update

Use a deferred update, checking read-only mode, and only try save
user instances that actually exist in the DB.

Change-Id: I6b109a1b09d9c7177d7aa7eb7bf0afcff1571fca
---
M includes/MobileContext.php
1 file changed, 13 insertions(+), 2 deletions(-)

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



diff --git a/includes/MobileContext.php b/includes/MobileContext.php
index 38b1f02..ba465c6 100644
--- a/includes/MobileContext.php
+++ b/includes/MobileContext.php
@@ -400,9 +400,20 @@
wfIncrStats( 'mobile.opt_in_cookie_unset' );
}
$this->mobileMode = $mode;
+
$user = $this->getUser();
-   $user->setOption( self::USER_MODE_PREFERENCE_NAME, $mode );
-   $user->saveSettings();
+   if ( $user->getId() ) {
+   $user->setOption( self::USER_MODE_PREFERENCE_NAME, 
$mode );
+   DeferredUpdates::addCallableUpdate( function () use ( 
$user, $mode ) {
+   if ( wfReadOnly() ) {
+   return;
+   }
+
+   $latestUser = $user->getInstanceForUpdate();
+   $latestUser->setOption( 
self::USER_MODE_PREFERENCE_NAME, $mode );
+   $latestUser->saveSettings();
+   } );
+   }
 
$this->getRequest()->response()->setCookie( 
self::OPTIN_COOKIE_NAME, $mode, 0, [
'prefix' => '',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6b109a1b09d9c7177d7aa7eb7bf0afcff1571fca
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz 
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/core[fundraising/REL1_27]: Update DonationInterface submodule

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

Change subject: Update DonationInterface submodule
..


Update DonationInterface submodule

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

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



diff --git a/extensions/DonationInterface b/extensions/DonationInterface
index 7ed7cc1..8d43938 16
--- a/extensions/DonationInterface
+++ b/extensions/DonationInterface
@@ -1 +1 @@
-Subproject commit 7ed7cc1bce76a55f2b6318031c88b047219aea25
+Subproject commit 8d43938c712adf3295ead78cf8b5d385aa779454

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If96a3f357c2156d3cd091d548b9fbcf74691a807
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: fundraising/REL1_27
Gerrit-Owner: Ejegg 
Gerrit-Reviewer: Awight 
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/dumps[ariel]: remove old dead dumps code from ariel branch

2017-04-19 Thread ArielGlenn (Code Review)
ArielGlenn has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/348981 )

Change subject: remove old dead dumps code from ariel branch
..


remove old dead dumps code from ariel branch

Using this for old libraries, quickie tools and such only.

also fix a few new pep8 whines for blank lines so
jenkins will accept this changeset (grrr)

Change-Id: I8b0ccf0aedf887fef93e0773d00a68350f4b7e99
---
D xmldumps-backup/see_master_branch/IncrDumpLib.py
D xmldumps-backup/see_master_branch/README
A xmldumps-backup/see_master_branch/README.NOW
D xmldumps-backup/see_master_branch/README.incr.txt
D xmldumps-backup/see_master_branch/doc/README
D xmldumps-backup/see_master_branch/doc/README.config
D xmldumps-backup/see_master_branch/doc/README.incr.config
D xmldumps-backup/see_master_branch/doc/README.installation
D xmldumps-backup/see_master_branch/doc/class-diagram-dumps-2012-03-23.pdf
D xmldumps-backup/see_master_branch/doc/class-diagram-dumps.zargo
D xmldumps-backup/see_master_branch/dumpadmin.py
D xmldumps-backup/see_master_branch/dumps/CommandManagement.py
D xmldumps-backup/see_master_branch/dumps/WikiDump.py
D xmldumps-backup/see_master_branch/dumps/__init__.py
D xmldumps-backup/see_master_branch/dumps/exceptions.py
D xmldumps-backup/see_master_branch/dumps/fileutils.py
D xmldumps-backup/see_master_branch/dumps/jobs.py
D xmldumps-backup/see_master_branch/dumps/recombinejobs.py
D xmldumps-backup/see_master_branch/dumps/recompressjobs.py
D xmldumps-backup/see_master_branch/dumps/runner.py
D xmldumps-backup/see_master_branch/dumps/runnerutils.py
D xmldumps-backup/see_master_branch/dumps/tablesjobs.py
D xmldumps-backup/see_master_branch/dumps/utils.py
D xmldumps-backup/see_master_branch/dumps/xmljobs.py
D xmldumps-backup/see_master_branch/dumpscheduler.py
D xmldumps-backup/see_master_branch/generateincrementals.py
D xmldumps-backup/see_master_branch/monitor
D xmldumps-backup/see_master_branch/monitor.py
M xmldumps-backup/see_master_branch/onallwikis.py
D xmldumps-backup/see_master_branch/samples/all.dblist
D xmldumps-backup/see_master_branch/samples/closed.dblist
D xmldumps-backup/see_master_branch/samples/download-index.html
D xmldumps-backup/see_master_branch/samples/dumpincr.conf.sample
D xmldumps-backup/see_master_branch/samples/dvd.html
D xmldumps-backup/see_master_branch/samples/errormail.txt
D xmldumps-backup/see_master_branch/samples/feed.xml
D xmldumps-backup/see_master_branch/samples/incrs-index.html
D xmldumps-backup/see_master_branch/samples/legal.html
D xmldumps-backup/see_master_branch/samples/private.dblist
D xmldumps-backup/see_master_branch/samples/progress.html
D xmldumps-backup/see_master_branch/samples/report.html
D xmldumps-backup/see_master_branch/samples/skip.dblist
D xmldumps-backup/see_master_branch/samples/wikidump.conf.sample
D xmldumps-backup/see_master_branch/worker
D xmldumps-backup/see_master_branch/worker.py
D xmldumps-backup/see_master_branch/xmlabstracts.py
D xmldumps-backup/see_master_branch/xmllogs.py
D xmldumps-backup/see_master_branch/xmlstreams.py
D xmldumps-backup/see_master_branch/xmlstubs.py
M xmldumps-backup/tools/mysql2txt.py
M xmldumps-backup/tools/pagerange.py
51 files changed, 6 insertions(+), 11,511 deletions(-)

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




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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8b0ccf0aedf887fef93e0773d00a68350f4b7e99
Gerrit-PatchSet: 2
Gerrit-Project: operations/dumps
Gerrit-Branch: ariel
Gerrit-Owner: ArielGlenn 
Gerrit-Reviewer: ArielGlenn 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] oojs/ui[master]: Follow-up d22d23311: Don't reference OO.ui.ToolGroup blindly

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

Change subject: Follow-up d22d23311: Don't reference OO.ui.ToolGroup blindly
..


Follow-up d22d23311: Don't reference OO.ui.ToolGroup blindly

In slimmed-down OOUI environments it's not necessarily loaded.

Bug: T163358
Change-Id: Ic11b981e70e3d10d1d57082cf6116bde02e6d44a
---
M src/themes/mediawiki/MediaWikiTheme.js
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/src/themes/mediawiki/MediaWikiTheme.js 
b/src/themes/mediawiki/MediaWikiTheme.js
index c141e01..716bb71 100644
--- a/src/themes/mediawiki/MediaWikiTheme.js
+++ b/src/themes/mediawiki/MediaWikiTheme.js
@@ -38,7 +38,7 @@
// Button with a dark background
isFramed && ( isActive || element.isDisabled() || 
element.hasFlag( 'primary' ) ) ||
// Toolbar with a dark background
-   element instanceof OO.ui.ToolGroup && ( isActive || 
element.hasFlag( 'primary' ) )
+   OO.ui.ToolGroup && element instanceof OO.ui.ToolGroup 
&& ( isActive || element.hasFlag( 'primary' ) )
) {
// … use white icon / indicator, regardless of other 
flags
variants.invert = true;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic11b981e70e3d10d1d57082cf6116bde02e6d44a
Gerrit-PatchSet: 1
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: Jforrester 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] wikimedia...SmashPig[deployment]: Merge branch 'master' into HEAD 8c1ab63 Fix EC recurring pro...

2017-04-19 Thread XenoRyet (Code Review)
XenoRyet has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/348983 )

Change subject: Merge branch 'master' into HEAD 8c1ab63 Fix EC recurring 
profile creation
..

Merge branch 'master' into HEAD
8c1ab63 Fix EC recurring profile creation

Change-Id: I2fb8cd48d745f7930bfb88359dc156304958696f
---
D PaymentProviders/PayPal/Tests/Data/recurring_payment_profile_created.json
D 
PaymentProviders/PayPal/Tests/Data/recurring_payment_profile_created_transformed.json
D PaymentProviders/PayPal/Tests/phpunit/CaptureIncomingMessageTest.php
3 files changed, 0 insertions(+), 227 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/SmashPig 
refs/changes/83/348983/1

diff --git 
a/PaymentProviders/PayPal/Tests/Data/recurring_payment_profile_created.json 
b/PaymentProviders/PayPal/Tests/Data/recurring_payment_profile_created.json
deleted file mode 100644
index 1cd1c71..000
--- a/PaymentProviders/PayPal/Tests/Data/recurring_payment_profile_created.json
+++ /dev/null
@@ -1,30 +0,0 @@
-{
-  "payment_cycle": "Monthly",
-  "txn_type": "recurring_payment_profile_created",
-  "last_name": "Fowl",
-  "next_payment_date": "03:00:00 May 18, 2017 PDT",
-  "residence_country": "US",
-  "initial_payment_amount": "0",
-  "rp_invoice_id": "47017286",
-  "currency_code": "JPY",
-  "time_created": "09:45:28 Apr 18, 2017 PDT",
-  "verify_sign": "ATZo1sTL1YpCR8SD-CzFolXviWIiAYV78oZbytx6QLNuI3z-KS8wKLqC",
-  "period_type": " Regular",
-  "payer_status": "unverified",
-  "tax": "0",
-  "payer_email": "do...@generous.net",
-  "first_name": "Fezziwig",
-  "receiver_email": "recei...@organization.org",
-  "payer_id": "8R297FE87CD8S",
-  "product_type": "1",
-  "shipping": "0",
-  "amount_per_cycle": "140",
-  "profile_status": "Active",
-  "charset": "UTF-8",
-  "notify_version": "3.8",
-  "amount": "140",
-  "outstanding_balance": "0",
-  "recurring_payment_id": "I-88J1M3DLSF0",
-  "product_name": "Monthly donation to the Wikimedia Foundation",
-  "ipn_track_id": "8999c084zz0f2"
-}
diff --git 
a/PaymentProviders/PayPal/Tests/Data/recurring_payment_profile_created_transformed.json
 
b/PaymentProviders/PayPal/Tests/Data/recurring_payment_profile_created_transformed.json
deleted file mode 100644
index 890f7dd..000
--- 
a/PaymentProviders/PayPal/Tests/Data/recurring_payment_profile_created_transformed.json
+++ /dev/null
@@ -1,21 +0,0 @@
-{
-  "subscr_id": "I-88J1M3DLSF0",
-  "txn_type": "subscr_signup",
-  "contribution_tracking_id": "47017286",
-  "order_id": "47017286",
-  "email": "do...@generous.net",
-  "first_name": "Fezziwig",
-  "middle_name": "",
-  "last_name": "Fowl",
-  "frequency_interval": "1",
-  "frequency_unit": "month",
-  "installments": 0,
-  "create_date": 1492533928,
-  "start_date": 1492533928,
-  "date": 1492533928,
-  "gateway": "paypal_ec",
-  "recurring": "1",
-  "source_name": "SmashPig",
-  "source_type": "listener",
-  "source_version": "unknown"
-}
diff --git 
a/PaymentProviders/PayPal/Tests/phpunit/CaptureIncomingMessageTest.php 
b/PaymentProviders/PayPal/Tests/phpunit/CaptureIncomingMessageTest.php
deleted file mode 100644
index 64b7e2c..000
--- a/PaymentProviders/PayPal/Tests/phpunit/CaptureIncomingMessageTest.php
+++ /dev/null
@@ -1,176 +0,0 @@
-<<< HEAD   (3db064 Merge branch 'master' into deployment)
-===
- 'donations',
-   'express_checkout.json' => 'donations',
-   'recurring_payment_profile_created.json' => 'recurring',
-   'subscr_signup.json' => 'recurring',
-   'subscr_payment.json' => 'recurring',
-   'recurring_payment.json' => 'recurring',
-   'refund.json' => 'refund',
-   'refund_ec.json' => 'refund',
-   'refund_recurring_ec.json' => 'refund',
-   'chargeback_settlement.json' => 'refund',
-   // this should not actually get written to
-   // TODO 'new_case.json' => 'no-op',
-   );
-
-   public function setUp() {
-   parent::setUp();
-   $this->config = PayPalTestConfiguration::get();
-
-   // php-queue\PDO complains about pop() from non-existent table
-   $this->config->object( 'data-store/jobs-paypal' )
-   ->createTable( 'jobs-paypal' );
-
-   Context::initWithLogger( $this->config );
-   }
-
-   public function tearDown() {
-   self::$fail_verification = false;
-   self::$paypal_is_broken = false;
-   parent::tearDown();
-   }
-
-   public function messageProvider() {
-   $messages = array();
-   foreach ( self::$message_data as $file => $type ) {
-   $payloadFile = __DIR__ . '/../Data/' . $file;
-   $messageData = array(
-   'type' => $type,
-   'payload' => json_decode(
-  

[MediaWiki-commits] [Gerrit] mediawiki/core[fundraising/REL1_27]: Update DonationInterface submodule

2017-04-19 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/348982 )

Change subject: Update DonationInterface submodule
..

Update DonationInterface submodule

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


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/82/348982/1

diff --git a/extensions/DonationInterface b/extensions/DonationInterface
index 7ed7cc1..8d43938 16
--- a/extensions/DonationInterface
+++ b/extensions/DonationInterface
@@ -1 +1 @@
-Subproject commit 7ed7cc1bce76a55f2b6318031c88b047219aea25
+Subproject commit 8d43938c712adf3295ead78cf8b5d385aa779454

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

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

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


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

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

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


Merge branch 'master' into deployment

f0490a7 Clean up Mustache form test
424d9bc Test a bit of Amazon queue stuff
93bf909 Paypal EC recurring: queue one correctly formed message

Change-Id: I8c5c2bf1809a3ff417a2bfc48323e4ef3ff1ea65
---
D tests/phpunit/Adapter/Amazon/AmazonTest.php
D tests/phpunit/Adapter/PayPal/PayPalExpressTest.php
D tests/phpunit/DonationInterfaceTestCase.php
D tests/phpunit/DonationQueueTest.php
D tests/phpunit/MustacheFormTest.php
D tests/phpunit/TestConfiguration.php
D 
tests/phpunit/includes/Responses/paypal_ec/CreateRecurringPaymentsProfile_Recurring-OK.testresponse
D 
tests/phpunit/includes/Responses/paypal_ec/DoExpressCheckoutPayment_OK.testresponse
D 
tests/phpunit/includes/Responses/paypal_ec/DoExpressCheckoutPayment_Recurring-OK.testresponse
D 
tests/phpunit/includes/Responses/paypal_ec/GetExpressCheckoutDetails_OK.testresponse
D 
tests/phpunit/includes/Responses/paypal_ec/GetExpressCheckoutDetails_Recurring-OK.testresponse
D tests/phpunit/includes/test_gateway/TestingAmazonAdapter.php
D tests/phpunit/includes/test_gateway/TestingPaypalExpressAdapter.php
13 files changed, 0 insertions(+), 1,727 deletions(-)

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



diff --git a/tests/phpunit/Adapter/Amazon/AmazonTest.php 
b/tests/phpunit/Adapter/Amazon/AmazonTest.php
deleted file mode 100644
index cfb3d2e..000
--- a/tests/phpunit/Adapter/Amazon/AmazonTest.php
+++ /dev/null
@@ -1,283 +0,0 @@
-<<< HEAD   (7ed7cc Merge branch 'master' into deployment)
-===
-testAdapterClass = 'TestingAmazonAdapter';
-   }
-
-   public function setUp() {
-   parent::setUp();
-
-   TestingAmazonAdapter::$mockClient = new MockAmazonClient();
-
-   $this->setMwGlobals( array(
-   'wgAmazonGatewayEnabled' => true,
-   'wgDonationInterfaceAllowedHtmlForms' => array(
-   'amazon' => array(
-   'gateway' => 'amazon',
-   'payment_methods' => array('amazon' => 
'ALL'),
-   'redirect',
-   ),
-   'amazon-recurring' => array(
-   'gateway' => 'amazon',
-   'payment_methods' => array('amazon' => 
'ALL'),
-   'redirect',
-   'recurring',
-   ),
-   ),
-   ) );
-   }
-
-   public function tearDown() {
-   TestingAmazonAdapter::$fakeGlobals = array();
-   parent::tearDown();
-   }
-
-   /**
-* Integration test to verify that the Amazon gateway converts Canadian
-* dollars before redirecting
-*
-* @dataProvider canadaLanguageProvider
-*/
-   function testCanadianDollarConversion( $language ) {
-   $init = $this->getDonorTestData( 'CA' );
-   unset( $init['order_id'] );
-   $init['payment_method'] = 'amazon';
-   $init['ffname'] = 'amazon';
-   $init['language'] = $language;
-   $rates = CurrencyRates::getCurrencyRates();
-   $cadRate = $rates['CAD'];
-
-   $expectedAmount = floor( $init['amount'] / $cadRate );
-
-   TestingAmazonAdapter::$fakeGlobals = array(
-   'FallbackCurrency' => 'USD',
-   'NotifyOnConvert' => true,
-   );
-
-   $expectedNotification = wfMessage(
-   'donate_interface-fallback-currency-notice',
-   'USD'
-   )->inLanguage( $language )->text();
-
-   $locale = $init['language'] . '_' . $init['country'];
-   $expectedDisplayAmount = Amount::format( $expectedAmount, 
'USD', $locale );
-
-   $that = $this; //needed for PHP pre-5.4
-   $convertTest = function( $amountString ) use ( 
$expectedDisplayAmount, $that ) {
-   $that->assertEquals( $expectedDisplayAmount, trim( 
$amountString ), 'Displaying wrong amount' );
-   };
-
-   $assertNodes = array(
-   'selected-amount' => array( 'innerhtml' => $convertTest 
),
-   'mw-content-text' => array(
-   'innerhtmlmatches' => 
"/.*$expectedNotification.*/"
-   )
-   );
-   $this->verifyFormOutput( 'AmazonGateway', $init, $assertNodes, 
false );
-   }
-
-   /**
-* Integration test to verify that the Amazon 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: HACK: Temporarily patch OOjs UI locally to work around upstr...

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

Change subject: HACK: Temporarily patch OOjs UI locally to work around upstream 
problem
..


HACK: Temporarily patch OOjs UI locally to work around upstream problem

Applied upstream in Ic11b981e70e3.

Bug: T163358
Change-Id: If8c26ffe5095e4e8c2f206c9dda1981bccba2b62
---
M resources/lib/oojs-ui/oojs-ui-mediawiki.js
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/resources/lib/oojs-ui/oojs-ui-mediawiki.js 
b/resources/lib/oojs-ui/oojs-ui-mediawiki.js
index b8dbf7b..60c67b6 100644
--- a/resources/lib/oojs-ui/oojs-ui-mediawiki.js
+++ b/resources/lib/oojs-ui/oojs-ui-mediawiki.js
@@ -52,7 +52,7 @@
// Button with a dark background
isFramed && ( isActive || element.isDisabled() || 
element.hasFlag( 'primary' ) ) ||
// Toolbar with a dark background
-   element instanceof OO.ui.ToolGroup && ( isActive || 
element.hasFlag( 'primary' ) )
+   OO.ui.ToolGroup && element instanceof OO.ui.ToolGroup 
&& ( isActive || element.hasFlag( 'primary' ) )
) {
// … use white icon / indicator, regardless of other 
flags
variants.invert = true;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If8c26ffe5095e4e8c2f206c9dda1981bccba2b62
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Jforrester 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: Jack Phoenix 
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/dumps[ariel]: remove old dead dumps code from ariel branch

2017-04-19 Thread ArielGlenn (Code Review)
ArielGlenn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/348981 )

Change subject: remove old dead dumps code from ariel branch
..

remove old dead dumps code from ariel branch

Using this for old libraries, quickie tools and such only.

Change-Id: I8b0ccf0aedf887fef93e0773d00a68350f4b7e99
---
D xmldumps-backup/see_master_branch/IncrDumpLib.py
D xmldumps-backup/see_master_branch/README
A xmldumps-backup/see_master_branch/README.NOW
D xmldumps-backup/see_master_branch/README.incr.txt
D xmldumps-backup/see_master_branch/doc/README
D xmldumps-backup/see_master_branch/doc/README.config
D xmldumps-backup/see_master_branch/doc/README.incr.config
D xmldumps-backup/see_master_branch/doc/README.installation
D xmldumps-backup/see_master_branch/doc/class-diagram-dumps-2012-03-23.pdf
D xmldumps-backup/see_master_branch/doc/class-diagram-dumps.zargo
D xmldumps-backup/see_master_branch/dumpadmin.py
D xmldumps-backup/see_master_branch/dumps/CommandManagement.py
D xmldumps-backup/see_master_branch/dumps/WikiDump.py
D xmldumps-backup/see_master_branch/dumps/__init__.py
D xmldumps-backup/see_master_branch/dumps/exceptions.py
D xmldumps-backup/see_master_branch/dumps/fileutils.py
D xmldumps-backup/see_master_branch/dumps/jobs.py
D xmldumps-backup/see_master_branch/dumps/recombinejobs.py
D xmldumps-backup/see_master_branch/dumps/recompressjobs.py
D xmldumps-backup/see_master_branch/dumps/runner.py
D xmldumps-backup/see_master_branch/dumps/runnerutils.py
D xmldumps-backup/see_master_branch/dumps/tablesjobs.py
D xmldumps-backup/see_master_branch/dumps/utils.py
D xmldumps-backup/see_master_branch/dumps/xmljobs.py
D xmldumps-backup/see_master_branch/dumpscheduler.py
D xmldumps-backup/see_master_branch/generateincrementals.py
D xmldumps-backup/see_master_branch/monitor
D xmldumps-backup/see_master_branch/monitor.py
D xmldumps-backup/see_master_branch/samples/all.dblist
D xmldumps-backup/see_master_branch/samples/closed.dblist
D xmldumps-backup/see_master_branch/samples/download-index.html
D xmldumps-backup/see_master_branch/samples/dumpincr.conf.sample
D xmldumps-backup/see_master_branch/samples/dvd.html
D xmldumps-backup/see_master_branch/samples/errormail.txt
D xmldumps-backup/see_master_branch/samples/feed.xml
D xmldumps-backup/see_master_branch/samples/incrs-index.html
D xmldumps-backup/see_master_branch/samples/legal.html
D xmldumps-backup/see_master_branch/samples/private.dblist
D xmldumps-backup/see_master_branch/samples/progress.html
D xmldumps-backup/see_master_branch/samples/report.html
D xmldumps-backup/see_master_branch/samples/skip.dblist
D xmldumps-backup/see_master_branch/samples/wikidump.conf.sample
D xmldumps-backup/see_master_branch/worker
D xmldumps-backup/see_master_branch/worker.py
D xmldumps-backup/see_master_branch/xmlabstracts.py
D xmldumps-backup/see_master_branch/xmllogs.py
D xmldumps-backup/see_master_branch/xmlstreams.py
D xmldumps-backup/see_master_branch/xmlstubs.py
48 files changed, 3 insertions(+), 11,511 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/dumps 
refs/changes/81/348981/1


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8b0ccf0aedf887fef93e0773d00a68350f4b7e99
Gerrit-PatchSet: 1
Gerrit-Project: operations/dumps
Gerrit-Branch: ariel
Gerrit-Owner: ArielGlenn 

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


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

2017-04-19 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/348980 )

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

Merge branch 'master' into deployment

f0490a7 Clean up Mustache form test
424d9bc Test a bit of Amazon queue stuff
93bf909 Paypal EC recurring: queue one correctly formed message

Change-Id: I8c5c2bf1809a3ff417a2bfc48323e4ef3ff1ea65
---
D tests/phpunit/Adapter/Amazon/AmazonTest.php
D tests/phpunit/Adapter/PayPal/PayPalExpressTest.php
D tests/phpunit/DonationInterfaceTestCase.php
D tests/phpunit/DonationQueueTest.php
D tests/phpunit/MustacheFormTest.php
D tests/phpunit/TestConfiguration.php
D 
tests/phpunit/includes/Responses/paypal_ec/CreateRecurringPaymentsProfile_Recurring-OK.testresponse
D 
tests/phpunit/includes/Responses/paypal_ec/DoExpressCheckoutPayment_OK.testresponse
D 
tests/phpunit/includes/Responses/paypal_ec/DoExpressCheckoutPayment_Recurring-OK.testresponse
D 
tests/phpunit/includes/Responses/paypal_ec/GetExpressCheckoutDetails_OK.testresponse
D 
tests/phpunit/includes/Responses/paypal_ec/GetExpressCheckoutDetails_Recurring-OK.testresponse
D tests/phpunit/includes/test_gateway/TestingAmazonAdapter.php
D tests/phpunit/includes/test_gateway/TestingPaypalExpressAdapter.php
13 files changed, 0 insertions(+), 1,727 deletions(-)


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

diff --git a/tests/phpunit/Adapter/Amazon/AmazonTest.php 
b/tests/phpunit/Adapter/Amazon/AmazonTest.php
deleted file mode 100644
index cfb3d2e..000
--- a/tests/phpunit/Adapter/Amazon/AmazonTest.php
+++ /dev/null
@@ -1,283 +0,0 @@
-<<< HEAD   (7ed7cc Merge branch 'master' into deployment)
-===
-testAdapterClass = 'TestingAmazonAdapter';
-   }
-
-   public function setUp() {
-   parent::setUp();
-
-   TestingAmazonAdapter::$mockClient = new MockAmazonClient();
-
-   $this->setMwGlobals( array(
-   'wgAmazonGatewayEnabled' => true,
-   'wgDonationInterfaceAllowedHtmlForms' => array(
-   'amazon' => array(
-   'gateway' => 'amazon',
-   'payment_methods' => array('amazon' => 
'ALL'),
-   'redirect',
-   ),
-   'amazon-recurring' => array(
-   'gateway' => 'amazon',
-   'payment_methods' => array('amazon' => 
'ALL'),
-   'redirect',
-   'recurring',
-   ),
-   ),
-   ) );
-   }
-
-   public function tearDown() {
-   TestingAmazonAdapter::$fakeGlobals = array();
-   parent::tearDown();
-   }
-
-   /**
-* Integration test to verify that the Amazon gateway converts Canadian
-* dollars before redirecting
-*
-* @dataProvider canadaLanguageProvider
-*/
-   function testCanadianDollarConversion( $language ) {
-   $init = $this->getDonorTestData( 'CA' );
-   unset( $init['order_id'] );
-   $init['payment_method'] = 'amazon';
-   $init['ffname'] = 'amazon';
-   $init['language'] = $language;
-   $rates = CurrencyRates::getCurrencyRates();
-   $cadRate = $rates['CAD'];
-
-   $expectedAmount = floor( $init['amount'] / $cadRate );
-
-   TestingAmazonAdapter::$fakeGlobals = array(
-   'FallbackCurrency' => 'USD',
-   'NotifyOnConvert' => true,
-   );
-
-   $expectedNotification = wfMessage(
-   'donate_interface-fallback-currency-notice',
-   'USD'
-   )->inLanguage( $language )->text();
-
-   $locale = $init['language'] . '_' . $init['country'];
-   $expectedDisplayAmount = Amount::format( $expectedAmount, 
'USD', $locale );
-
-   $that = $this; //needed for PHP pre-5.4
-   $convertTest = function( $amountString ) use ( 
$expectedDisplayAmount, $that ) {
-   $that->assertEquals( $expectedDisplayAmount, trim( 
$amountString ), 'Displaying wrong amount' );
-   };
-
-   $assertNodes = array(
-   'selected-amount' => array( 'innerhtml' => $convertTest 
),
-   'mw-content-text' => array(
-   'innerhtmlmatches' => 
"/.*$expectedNotification.*/"
-   )
-   );
-   $this->verifyFormOutput( 'AmazonGateway', $init, $assertNodes, 
false );
-   }
-
-   /**
-* Integration test to 

[MediaWiki-commits] [Gerrit] testing-access-wrapper[master]: readme: Fix for compat with Doxygen Markdown

2017-04-19 Thread Krinkle (Code Review)
Krinkle has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/348979 )

Change subject: readme: Fix  for compat with Doxygen Markdown
..

readme: Fix  for compat with Doxygen Markdown

The tripple-backtick syntax works for GitHub only. Using PRE with
lang="" attribute work in both GitHub, GitBlit and Doxygen.

Change-Id: Id605edb197471811013c34de3ca49e13ea7e1ee7
---
M README.md
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/testing-access-wrapper 
refs/changes/79/348979/1

diff --git a/README.md b/README.md
index fb9b0a3..885516d 100644
--- a/README.md
+++ b/README.md
@@ -11,7 +11,7 @@
 Usage
 -
 
-```php
+
 use Wikimedia\TestingAccessWrapper;
 
 class NonPublic {
@@ -27,7 +27,7 @@
 $wrapper->prop = 'foo';
 $wrapper->func();
 $classWrapper->staticFunc();
-```
+
 
 Running tests
 -

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id605edb197471811013c34de3ca49e13ea7e1ee7
Gerrit-PatchSet: 1
Gerrit-Project: testing-access-wrapper
Gerrit-Branch: master
Gerrit-Owner: Krinkle 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: HACK: Temporarily patch OOjs UI locally to work around upstr...

2017-04-19 Thread Jforrester (Code Review)
Jforrester has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/348978 )

Change subject: HACK: Temporarily patch OOjs UI locally to work around upstream 
problem
..

HACK: Temporarily patch OOjs UI locally to work around upstream problem

Applied upstream in Ic11b981e70e3.

Bug: T163358
Change-Id: If8c26ffe5095e4e8c2f206c9dda1981bccba2b62
---
M resources/lib/oojs-ui/oojs-ui-mediawiki.js
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/78/348978/1

diff --git a/resources/lib/oojs-ui/oojs-ui-mediawiki.js 
b/resources/lib/oojs-ui/oojs-ui-mediawiki.js
index b8dbf7b..60c67b6 100644
--- a/resources/lib/oojs-ui/oojs-ui-mediawiki.js
+++ b/resources/lib/oojs-ui/oojs-ui-mediawiki.js
@@ -52,7 +52,7 @@
// Button with a dark background
isFramed && ( isActive || element.isDisabled() || 
element.hasFlag( 'primary' ) ) ||
// Toolbar with a dark background
-   element instanceof OO.ui.ToolGroup && ( isActive || 
element.hasFlag( 'primary' ) )
+   OO.ui.ToolGroup && element instanceof OO.ui.ToolGroup 
&& ( isActive || element.hasFlag( 'primary' ) )
) {
// … use white icon / indicator, regardless of other 
flags
variants.invert = true;

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...ORES[master]: Make filters thresholds more configurable

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

Change subject: Make filters thresholds more configurable
..


Make filters thresholds more configurable

* Supports numerical values, test_stats entries,
  or 'false' to disable a level

* Introduced very likely badfaith

* Reword messages to omit specific numerical targets

* Set better default values

Bug: T162760
Change-Id: I6b839a6a8644637cfff6fbc83bb18952d97ad9f2
---
M extension.json
M i18n/en.json
M i18n/qqq.json
M includes/Hooks.php
M includes/Stats.php
M tests/phpunit/includes/StatsTest.php
6 files changed, 283 insertions(+), 408 deletions(-)

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



diff --git a/extension.json b/extension.json
index 325ab6c..fd688c3 100644
--- a/extension.json
+++ b/extension.json
@@ -138,16 +138,18 @@
},
"OresFiltersThresholds": {
"damaging": {
-   "likelygood": { "min": 0, "max": 0.55 },
-   "maybebad": { "min": 0.16, "max": 1 },
-   "likelybad": { "min": 0.75, "max": 1 },
-   "verylikelybad": { "min": 0.92, "max": 1 }
+   "likelygood": { "min": 0, "max": 
"recall_at_precision(min_precision=0.995)" },
+   "maybebad": { "min": 
"filter_rate_at_recall(min_recall=0.9)", "max": 1 },
+   "likelybad": { "min": 
"recall_at_precision(min_precision=0.6)", "max": 1 },
+   "verylikelybad": { "min": 
"recall_at_precision(min_precision=0.9)", "max": 1 }
},
"goodfaith": {
-   "good": { "min": 0.35, "max": 1 },
-   "maybebad": { "min": 0, "max": 0.65 },
-   "bad": { "min": 0, "max": 0.15 }
-   }
+   "likelygood": { "min": 
"recall_at_precision(min_precision=0.995)", "max": 1 },
+   "maybebad": { "min": 0, "max": 
"filter_rate_at_recall(min_recall=0.9)" },
+   "likelybad": { "min": 0, "max": 
"recall_at_precision(min_precision=0.6)" },
+   "verylikelybad": false
+   },
+   "_merge_strategy": "array_plus_2d"
},
"OresEnabledNamespaces": {},
"OresWikiId": null,
diff --git a/i18n/en.json b/i18n/en.json
index f8904b3..e5012ec 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -28,9 +28,9 @@
"ores-rcfilters-damaging-maybebad-label": "May have problems",
"ores-rcfilters-damaging-maybebad-desc": "Finds most flawed or damaging 
edits but with lower accuracy.",
"ores-rcfilters-damaging-likelybad-label": "Likely have problems",
-   "ores-rcfilters-damaging-likelybad-desc": "Finds half of flawed or 
damaging edits with medium accuracy.",
+   "ores-rcfilters-damaging-likelybad-desc": "With medium accuracy, finds 
more problem edits than the \"Very Likely\" filter but fewer than \"May.\"",
"ores-rcfilters-damaging-verylikelybad-label": "Very likely have 
problems",
-   "ores-rcfilters-damaging-verylikelybad-desc": "Highly accurate at 
finding the most obvious 10% of flawed or damaging edits.",
+   "ores-rcfilters-damaging-verylikelybad-desc": "Highly accurate at 
finding the most obvious flawed or damaging edits.",
"ores-rcfilters-goodfaith-title": "User intent predictions",
"ores-rcfilters-goodfaith-whats-this-header": "About user intent 
predictions",
"ores-rcfilters-goodfaith-whats-this-body": "These predictions about 
users' good faith are made by a machine-learning service trained on a large set 
of edits scored by human editors. Stricter, more accurate filters find fewer 
false positives but miss more of their target. Less accurate filters find more 
of their target, but they also find more false positives.",
@@ -40,7 +40,9 @@
"ores-rcfilters-goodfaith-maybebad-label": "May be bad faith",
"ores-rcfilters-goodfaith-maybebad-desc": "Finds most bad-faith edits 
but with a lower accuracy.",
"ores-rcfilters-goodfaith-bad-label": "Likely bad faith",
-   "ores-rcfilters-goodfaith-bad-desc": "With medium accuracy, finds the 
most obvious 25% of bad-faith edits.",
+   "ores-rcfilters-goodfaith-bad-desc": "With medium accuracy, finds more 
bad-faith edits than the \"Very likely\" filter but fewer than \"May.\"",
+   "ores-rcfilters-goodfaith-verylikelybad-label": "Very likely bad faith",
+   "ores-rcfilters-goodfaith-verylikelybad-desc": "Highly accurate at 
finding the most obvious bad faith edits.",
"ores-pref-highlight": "Highlight likely problem edits with colors and 
an 

[MediaWiki-commits] [Gerrit] oojs/ui[master]: Follow-up d22d23311: Don't reference OO.ui.ToolGroup blindly

2017-04-19 Thread Jforrester (Code Review)
Jforrester has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/348977 )

Change subject: Follow-up d22d23311: Don't reference OO.ui.ToolGroup blindly
..

Follow-up d22d23311: Don't reference OO.ui.ToolGroup blindly

In slimmed-down OOUI environments it's not necessarily loaded.

Bug: T163358
Change-Id: Ic11b981e70e3d10d1d57082cf6116bde02e6d44a
---
M src/themes/mediawiki/MediaWikiTheme.js
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/77/348977/1

diff --git a/src/themes/mediawiki/MediaWikiTheme.js 
b/src/themes/mediawiki/MediaWikiTheme.js
index c141e01..716bb71 100644
--- a/src/themes/mediawiki/MediaWikiTheme.js
+++ b/src/themes/mediawiki/MediaWikiTheme.js
@@ -38,7 +38,7 @@
// Button with a dark background
isFramed && ( isActive || element.isDisabled() || 
element.hasFlag( 'primary' ) ) ||
// Toolbar with a dark background
-   element instanceof OO.ui.ToolGroup && ( isActive || 
element.hasFlag( 'primary' ) )
+   OO.ui.ToolGroup && element instanceof OO.ui.ToolGroup 
&& ( isActive || element.hasFlag( 'primary' ) )
) {
// … use white icon / indicator, regardless of other 
flags
variants.invert = true;

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

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

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


[MediaWiki-commits] [Gerrit] operations/dumps[master]: Document quote gotcha; include new binary path

2017-04-19 Thread ArielGlenn (Code Review)
ArielGlenn has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/347908 )

Change subject: Document quote gotcha; include new binary path
..


Document quote gotcha; include new binary path

Change-Id: Ie095e9db3355f984c892ec0c17256dd628dd1f7b
---
M xmldumps-backup/samples/wikidump.conf.sample
1 file changed, 9 insertions(+), 0 deletions(-)

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



diff --git a/xmldumps-backup/samples/wikidump.conf.sample 
b/xmldumps-backup/samples/wikidump.conf.sample
index 6394952..ca96455 100644
--- a/xmldumps-backup/samples/wikidump.conf.sample
+++ b/xmldumps-backup/samples/wikidump.conf.sample
@@ -24,8 +24,16 @@
 smtpserver=smtp.myisp.com
 
 [database]
+# Database user to run queries as
 user=root
+
+# Careful to *not* include quotes when giving the password here, for example
+#password=a2rat8r
+#
 password=""
+
+# Arbitrary configuration parameters:
+#
 max_allowed_packet=32M
 
 [tools]
@@ -37,6 +45,7 @@
 sevenzip=/usr/bin/7za
 checkforbz2footer=/usr/local/bin/checkforbz2footer   
 recompressxml=/usr/local/bin/recompressxml
+writeuptopageid=/usr/local/bin/writeuptopageid
 
 [cleanup]
 keep=10

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie095e9db3355f984c892ec0c17256dd628dd1f7b
Gerrit-PatchSet: 2
Gerrit-Project: operations/dumps
Gerrit-Branch: master
Gerrit-Owner: Awight 
Gerrit-Reviewer: ArielGlenn 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: base: add icinga check for CPU frequency on Dell R320

2017-04-19 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/348976 )

Change subject: base: add icinga check for CPU frequency on Dell R320
..

base: add icinga check for CPU frequency on Dell R320

Bug: T163220
Change-Id: Ia0ffce19b110439efad5b269fde0b946c8218e0e
---
R modules/base/files/monitoring/check_cpufreq
M modules/base/manifests/monitoring/host.pp
2 files changed, 16 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/76/348976/1

diff --git a/modules/icinga/files/check_cpufreq 
b/modules/base/files/monitoring/check_cpufreq
similarity index 100%
rename from modules/icinga/files/check_cpufreq
rename to modules/base/files/monitoring/check_cpufreq
diff --git a/modules/base/manifests/monitoring/host.pp 
b/modules/base/manifests/monitoring/host.pp
index c30050c..206c8c9 100644
--- a/modules/base/manifests/monitoring/host.pp
+++ b/modules/base/manifests/monitoring/host.pp
@@ -136,4 +136,20 @@
 nrpe_command => 
'/usr/local/lib/nagios/plugins/check_systemd_state',
 }
 }
+
+if $::productname == 'PowerEdge R320' {
+
+file { '/usr/local/lib/nagios/plugins/check_cpufreq':
+ensure => present,
+source => 'puppet:///modules/base/check_cpufreq',
+owner  => 'root',
+group  => 'root',
+mode   => '0555',
+}
+
+::nrpe::monitor_service { 'check_cpufreq':
+description  => 'CPU frequency',
+nrpe_command => '/usr/local/lib/nagios/plugins/check_cpufreq',
+}
+}
 }

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...mobileapps[master]: announcements: Remove recruitment surveys

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

Change subject: announcements: Remove recruitment surveys
..


announcements: Remove recruitment surveys

Bug: T163256
Change-Id: Ibdf904cea4454f4347b7bf962e826ce34f00d52a
---
M routes/announcements.js
M spec.yaml
M test/features/announcements/announcements.js
3 files changed, 4 insertions(+), 64 deletions(-)

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



diff --git a/routes/announcements.js b/routes/announcements.js
index b91e449..87c72a2 100644
--- a/routes/announcements.js
+++ b/routes/announcements.js
@@ -9,54 +9,7 @@
 const router = sUtil.router();
 
 function getEnwikiAnnouncements() {
-return [
-{
-id: "EN0217SURVEYIOS",
-type: "survey",
-start_time: "2017-02-09T00:00:00Z",
-end_time: "2017-02-14T00:00:00Z",
-platforms: [
-"iOSApp",
-],
-text: "Help to improve the Wikipedia mobile apps by signing up to 
be a user tester. Take a quick survey to participate in an upcoming study or 
research interview.", // eslint-disable-line max-len
-action: {
-title: "Sign up",
-url: "https://goo.gl/forms/AjwqEK42MaHMUsoN2;
-},
-caption_HTML: "Hosted by a third-party service. See the https://m.wikimediafoundation.org/wiki/Mobile_User_Testing_Recruitment_Survey_Privacy_Statement\;>privacy
 statement for information on data handling.",
-countries: [
-"US",
-"CA",
-"GB",
-"IE",
-"AU",
-"NZ"
-]
-},
-{
-id: "EN0217SURVEYANDROID",
-type: "survey",
-start_time: "2017-02-11T00:00:00Z",
-end_time: "2017-02-13T00:00:00Z",
-platforms: [
-"AndroidApp"
-],
-text: "Help to improve the Wikipedia mobile apps by signing up to 
be a user tester. Take a quick survey to participate in an upcoming study or 
research interview.", // eslint-disable-line max-len
-action: {
-title: "Sign up",
-url: "https://goo.gl/forms/AjwqEK42MaHMUsoN2;
-},
-caption_HTML: "Hosted by a third-party service. See the https://m.wikimediafoundation.org/wiki/Mobile_User_Testing_Recruitment_Survey_Privacy_Statement\;>privacy
 statement for information on data handling.",
-countries: [
-"US",
-"CA",
-"GB",
-"IE",
-"AU",
-"NZ"
-]
-}
-];
+return [];
 }
 
 /**
diff --git a/spec.yaml b/spec.yaml
index a3d5f15..f27040d 100644
--- a/spec.yaml
+++ b/spec.yaml
@@ -85,18 +85,7 @@
 headers:
   content-type: application/json
 body:
-  announce:
-- id: /.+/
-  type: /.+/
-  start_time: /.+/
-  end_time: /.+/
-  platforms: [ /.+/ ]
-  text: /.+/
-  action:
-title: /.+/
-url: /.+/
-  caption_HTML: /.+/
-  countries: [ /.+/ ]
+  announce: []
 
   # from routes/on-this-day.js
   /{domain}/v1/feed/onthisday/{type}/{mm}/{dd}:
diff --git a/test/features/announcements/announcements.js 
b/test/features/announcements/announcements.js
index 1737c01..b0063bf 100644
--- a/test/features/announcements/announcements.js
+++ b/test/features/announcements/announcements.js
@@ -34,12 +34,10 @@
 });
 });
 
-it('should return two surveys', () => {
+it('should return 0 surveys', () => {
 return preq.get({ uri: 
`${server.config.uri}en.wikipedia.org/v1/feed/announcements` })
 .then((res) => {
-assert.ok(res.body.announce.length === 2);
-assert.equal(res.body.announce[0].id, 'EN0217SURVEYIOS');
-assert.equal(res.body.announce[1].id, 'EN0217SURVEYANDROID');
+assert.ok(res.body.announce.length === 0);
 });
 });
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibdf904cea4454f4347b7bf962e826ce34f00d52a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/mobileapps
Gerrit-Branch: master
Gerrit-Owner: BearND 
Gerrit-Reviewer: Dbrant 
Gerrit-Reviewer: Fjalapeno 
Gerrit-Reviewer: GWicke 
Gerrit-Reviewer: Jdlrobson 
Gerrit-Reviewer: Jhernandez 
Gerrit-Reviewer: Mholloway 

[MediaWiki-commits] [Gerrit] operations/dumps[master]: Update instructions for fetching mwbzutils source

2017-04-19 Thread ArielGlenn (Code Review)
ArielGlenn has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/347907 )

Change subject: Update instructions for fetching mwbzutils source
..


Update instructions for fetching mwbzutils source

Change-Id: Ic46c08863104e38bc0fad82ba0dc21ce0e0e6572
---
M xmldumps-backup/doc/README.installation
1 file changed, 5 insertions(+), 4 deletions(-)

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



diff --git a/xmldumps-backup/doc/README.installation 
b/xmldumps-backup/doc/README.installation
index 397d91d..5796456 100644
--- a/xmldumps-backup/doc/README.installation
+++ b/xmldumps-backup/doc/README.installation
@@ -43,12 +43,13 @@
 development headers and library (for a typical linux distro something like 
bzip2-devel).
 Then,
 
-cd xmldumps-backup/mwbzutils
-make
-make install
+   git clone 
https://gerrit.wikimedia.org/r/p/operations/dumps/mwbzutils.git
+   cd mwbzutils/xmldumps-backup/mwbzutils
+   make
+   make install
 
 This will install them to /usr/local/bin.  If you want to install them 
somewhere
-else you'll need to copy them by hand.
+else you'll need to copy them by hand, or they can be run out of the source 
directory.
 
 Copy the dumps scripts, templates and the sample configuration to the location 
from 
 where you'll be running them. 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic46c08863104e38bc0fad82ba0dc21ce0e0e6572
Gerrit-PatchSet: 2
Gerrit-Project: operations/dumps
Gerrit-Branch: master
Gerrit-Owner: Awight 
Gerrit-Reviewer: ArielGlenn 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...DonationInterface[master]: Paypal EC recurring: queue one correctly formed message

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

Change subject: Paypal EC recurring: queue one correctly formed message
..


Paypal EC recurring: queue one correctly formed message

Instead of two malformed ones.
Previously, we were sending a message with recurring=1 and no subscr_id
after finishing the initial payment, then clobbering gateway_txn_id and
sending another message without it after setting up the recurring profile.

Bug: T163281
Change-Id: Iae0625873266cf2f23c13091e5036d6307bac0fa
---
M DonationInterface.class.php
M paypal_gateway/express_checkout/paypal_express.adapter.php
M tests/phpunit/Adapter/PayPal/PayPalExpressTest.php
M tests/phpunit/DonationInterfaceTestCase.php
M tests/phpunit/TestConfiguration.php
A 
tests/phpunit/includes/Responses/paypal_ec/CreateRecurringPaymentsProfile_Recurring-OK.testresponse
A 
tests/phpunit/includes/Responses/paypal_ec/DoExpressCheckoutPayment_OK.testresponse
A 
tests/phpunit/includes/Responses/paypal_ec/DoExpressCheckoutPayment_Recurring-OK.testresponse
A 
tests/phpunit/includes/Responses/paypal_ec/GetExpressCheckoutDetails_OK.testresponse
A 
tests/phpunit/includes/Responses/paypal_ec/GetExpressCheckoutDetails_Recurring-OK.testresponse
A tests/phpunit/includes/test_gateway/TestingPaypalExpressAdapter.php
11 files changed, 215 insertions(+), 4 deletions(-)

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



diff --git a/DonationInterface.class.php b/DonationInterface.class.php
index 5fcc120..f3f3988 100644
--- a/DonationInterface.class.php
+++ b/DonationInterface.class.php
@@ -66,6 +66,7 @@
$wgAutoloadClasses['TestingGenericAdapter'] = $testDir . 
'includes/test_gateway/TestingGenericAdapter.php';
$wgAutoloadClasses['TestingGlobalCollectAdapter'] = $testDir . 
'includes/test_gateway/TestingGlobalCollectAdapter.php';
$wgAutoloadClasses['TestingGlobalCollectOrphanAdapter'] = 
$testDir . 'includes/test_gateway/TestingGlobalCollectOrphanAdapter.php';
+   $wgAutoloadClasses['TestingPaypalExpressAdapter'] = $testDir . 
'includes/test_gateway/TestingPaypalExpressAdapter.php';
$wgAutoloadClasses['TestingPaypalLegacyAdapter'] = $testDir . 
'includes/test_gateway/TestingPaypalLegacyAdapter.php';
 
$wgAutoloadClasses['TestingRequest'] = $testDir . 
'includes/test_request/test.request.php';
diff --git a/paypal_gateway/express_checkout/paypal_express.adapter.php 
b/paypal_gateway/express_checkout/paypal_express.adapter.php
index b12472c..90a1671 100644
--- a/paypal_gateway/express_checkout/paypal_express.adapter.php
+++ b/paypal_gateway/express_checkout/paypal_express.adapter.php
@@ -441,9 +441,15 @@
$this->getData_Unstaged_Escaped( 
'gateway_txn_id' ) );
$status = $this->findCodeAction( 
'DoExpressCheckoutPayment',
'PAYMENTINFO_0_ERRORCODE', 
$response['PAYMENTINFO_0_ERRORCODE'] );
-   // TODO: Can we do this from do_transaction 
instead, or at least protect with !recurring...
-   $this->finalizeInternalStatus( $status );
-   $this->postProcessDonation();
+   // For recurring payments, we don't want to 
finalize or send the queue
+   // message just yet
+   if (
+   $status === FinalStatus::FAILED ||
+   !$this->getData_Unstaged_Escaped( 
'recurring' )
+   ) {
+   $this->finalizeInternalStatus( $status 
);
+   $this->postProcessDonation();
+   }
break;
}
 
@@ -513,4 +519,12 @@
throw new ResponseProcessingException( "Failure 
response", $response['ACK'] );
}
}
+
+   /**
+* FIXME: this is coming out of the ambient transaction response
+* in the parent adapters. Probably a bad idea everywhere.
+*/
+   public function getTransactionGatewayTxnID() {
+   return $this->getData_Unstaged_Escaped( 'gateway_txn_id' );
+   }
 }
diff --git a/tests/phpunit/Adapter/PayPal/PayPalExpressTest.php 
b/tests/phpunit/Adapter/PayPal/PayPalExpressTest.php
index 161fb39..4c655c9 100644
--- a/tests/phpunit/Adapter/PayPal/PayPalExpressTest.php
+++ b/tests/phpunit/Adapter/PayPal/PayPalExpressTest.php
@@ -6,3 +6,135 @@
  *
  * 

[MediaWiki-commits] [Gerrit] operations/dumps[master]: permit the page range job shell script to run without locks ...

2017-04-19 Thread ArielGlenn (Code Review)
ArielGlenn has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/348302 )

Change subject: permit the page range job shell script to run without locks if 
desired
..


permit the page range job shell script to run without locks if desired

One might want to run ths script to generate some page content
files while the regular dumps for the given wiki and date are
already running, in particular when playing catchup from a broken
run

Change-Id: I1f73cd574e1c013ca9079adc76bf90851dec68af
---
M xmldumps-backup/do_pagerange_content_jobs.sh
1 file changed, 18 insertions(+), 9 deletions(-)

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



diff --git a/xmldumps-backup/do_pagerange_content_jobs.sh 
b/xmldumps-backup/do_pagerange_content_jobs.sh
index ad6352e..6335dbc 100644
--- a/xmldumps-backup/do_pagerange_content_jobs.sh
+++ b/xmldumps-backup/do_pagerange_content_jobs.sh
@@ -11,14 +11,15 @@
 usage() {
echo "Usage: $0 --config  --wiki "
echo "  --date  --jobinfo num:num:num,..."
-   echo "[--dryrun] [--verbose]"
+   echo "[--skiplock] [--dryrun] [--verbose]"
echo
-   echo "  --config  path to configuration file for dump generation"
-   echo "  --wikidbname of wiki"
-   echo "  --jobinfo partnum:start:end,partnum2:start:end,..."
-   echo "  --datedate of run"
-echo "  --numjobs number of jobs to run simultaneously"
-   echo "  --dryrun  don't run commands, show what would have been done"
+   echo "  --config   path to configuration file for dump generation"
+   echo "  --wiki dbname of wiki"
+   echo "  --jobinfo  partnum:start:end,partnum2:start:end,..."
+   echo "  --date date of run"
+echo "  --numjobs  number of jobs to run simultaneously"
+echo "  --skiplock don't lock the wiki (use with care!)"
+   echo "  --dryrun   don't run commands, show what would have been done"
echo "  --verbose print commands as they are run, etc"
exit 1
 }
@@ -29,6 +30,7 @@
 JOBINFO=""
 DATE=""
 NUMJOBS=""
+SKIPLOCK=""
 DRYRUN=""
 VERBOSE=""
 }
@@ -50,6 +52,9 @@
elif [ $1 == "--numjobs" ]; then
NUMJOBS="$2"
shift; shift
+   elif [ $1 == "--skiplock" ]; then
+   SKIPLOCK="true"
+   shift
elif [ $1 == "--dryrun" ]; then
DRYRUN="true"
shift
@@ -198,11 +203,15 @@
 process_opts "$@"
 check_opts
 IFS=',' read -a JOBARRAY <<< "$JOBINFO"
-lockerup
+if [ -z "$SKIPLOCK" ]; then
+lockerup
+fi
 for JOB in ${JOBARRAY[*]}; do
 IFS=: read PARTNUM START END <<< "$JOB"
 setup_pagerange_args
 get_ranges
 run_workers $NUMJOBS
 done
-cleanup_lock
+if [ -z "$SKIPLOCK" ]; then
+cleanup_lock
+fi

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1f73cd574e1c013ca9079adc76bf90851dec68af
Gerrit-PatchSet: 1
Gerrit-Project: operations/dumps
Gerrit-Branch: master
Gerrit-Owner: ArielGlenn 
Gerrit-Reviewer: ArielGlenn 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/dumps[master]: scripts to generate a series of checkpoint files for a dump ...

2017-04-19 Thread ArielGlenn (Code Review)
ArielGlenn has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/342846 )

Change subject: scripts to generate a series of checkpoint files for a dump run 
manually
..


scripts to generate a series of checkpoint files for a dump run manually

* script for locking the a wiki dump run and continuously updating lock;
  this is a standalone script that can be used from e.g. bash wrappers
* script for generating list of pageranges that can be used to break
  up a long page content dump into a bunch of shorter ones
* script for generating page meta history content for missing page
  ranges for a set of subjobs

These are meant to be used when recovering from a broken run manually
(when you're in a hurry for the run to complete).

Bug: T160507
Change-Id: I10796ae540f04a8b16c604ffc0d7ff681de9d06e
---
A xmldumps-backup/do_pagerange_content_jobs.sh
A xmldumps-backup/dump_lock.py
A xmldumps-backup/get_pagerange.py
3 files changed, 442 insertions(+), 0 deletions(-)

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



diff --git a/xmldumps-backup/do_pagerange_content_jobs.sh 
b/xmldumps-backup/do_pagerange_content_jobs.sh
new file mode 100644
index 000..ad6352e
--- /dev/null
+++ b/xmldumps-backup/do_pagerange_content_jobs.sh
@@ -0,0 +1,208 @@
+#!/bin/bash
+# no error checking, we don't care. if file fails we'll
+# rerun it by hand later
+
+# locks wiki for date, generates a bunch of page ranges based on
+# user input, runs a bunch of jobs in batches to create the
+# specified page-meta-history bz2 output files, unlocks wiki.
+# does NOT: update md5s, status, dumprininfo, symlinks, etc.
+# does NOT: clean up old dumps, remove old files from run
+
+usage() {
+   echo "Usage: $0 --config  --wiki "
+   echo "  --date  --jobinfo num:num:num,..."
+   echo "[--dryrun] [--verbose]"
+   echo
+   echo "  --config  path to configuration file for dump generation"
+   echo "  --wikidbname of wiki"
+   echo "  --jobinfo partnum:start:end,partnum2:start:end,..."
+   echo "  --datedate of run"
+echo "  --numjobs number of jobs to run simultaneously"
+   echo "  --dryrun  don't run commands, show what would have been done"
+   echo "  --verbose print commands as they are run, etc"
+   exit 1
+}
+
+set_defaults() {
+CONFIGFILE=""
+WIKI=""
+JOBINFO=""
+DATE=""
+NUMJOBS=""
+DRYRUN=""
+VERBOSE=""
+}
+
+process_opts () {
+while [ $# -gt 0 ]; do
+   if [ $1 == "--config" ]; then
+   CONFIGFILE="$2"
+   shift; shift;
+   elif [ $1 == "--wiki" ]; then
+   WIKI="$2"
+   shift; shift
+   elif [ $1 == "--jobinfo" ]; then
+   JOBINFO="$2"
+   shift; shift
+   elif [ $1 == "--date" ]; then
+   DATE="$2"
+   shift; shift
+   elif [ $1 == "--numjobs" ]; then
+   NUMJOBS="$2"
+   shift; shift
+   elif [ $1 == "--dryrun" ]; then
+   DRYRUN="true"
+   shift
+   elif [ $1 == "--verbose" ]; then
+   VERBOSE="true"
+   shift
+   else
+   echo "$0: Unknown option $1"
+   usage
+   fi
+done
+}
+
+check_opts() {
+if [ -z "$WIKI" -o -z "$JOBINFO" -o -z "$DATE" -o -z "$CONFIGFILE" -o -z 
"$NUMJOBS" ]; then
+echo "$0: Mandatory options 'wiki', 'jobinfo', 'date', 'numjobs' and 
'config' must be specified"
+usage
+elif [ ! -f "$CONFIGFILE" ]; then
+echo "Could not find config file: $CONFIGFILE"
+echo "Exiting..."
+exit 1
+fi
+}
+
+setup_pagerange_args() {
+# set up the command
+pagerangeargs=( "$WIKIDUMP_BASE/get_pagerange.py" )
+pagerangeargs=( "${pagerangeargs[@]}" "--configfile" "$CONFIGFILE" )
+if [ -n "$START" ]; then
+   pagerangeargs=( "${pagerangeargs[@]}" "--start" "$START" )
+fi
+if [ -n "$END" ]; then
+   pagerangeargs=( "${pagerangeargs[@]}" "--end" "$END" )
+fi
+pagerangeargs=( "${pagerangeargs[@]}" "--wiki" "$WIKI" )
+
+# pipeline args go here
+grepargs=( "grep" "-v" "DEBUG" )
+jqargs=( "/usr/bin/jq" "-r"  '.[]|.pstart+":"+.pend' )
+}
+
+get_ranges() {
+if [ -n "$VERBOSE" ]; then
+   echo "/usr/bin/python ${pagerangeargs[@]} | ${grepargs[@]} | 
${jqargs[@]}"
+fi
+ranges=( $(/usr/bin/python ${pagerangeargs[@]} | ${grepargs[@]} | 
${jqargs[@]}) )
+result=$?
+if [ $result -ne 0 ]; then
+   echo "Failed to get page ranges, dumping them here"
+   echo "${ranges[@]}"
+   exit 1
+fi
+}
+
+setup_worker_args() {
+FILE="$1"
+# set up the command
+workerargs=( "$WIKIDUMP_BASE/worker.py" )
+workerargs=( "${workerargs[@]}" "--configfile" "$CONFIGFILE" )
+# workerargs=( "${workerargs[@]}" "--log" )
+workerargs=( "${workerargs[@]}" "--job" 

[MediaWiki-commits] [Gerrit] search/MjoLniR[master]: Add DBN training

2017-04-19 Thread Tjones (Code Review)
Tjones has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/347038 )

Change subject: Add DBN training
..


Add DBN training

Adds mjolnir.dbn for training a DBN. Takes a DataFrame containing user
search sessions, trains the dbn, and outputs a DataFrame containing
(wikiid, norm_query, hit_page_id, relevance) rows. This seemed like a
nice and small place to start to figure out how to add unit test
pyspark.

The tests are pretty minor, and probably don't begin to test all the
edge cases, but we can work those out later. To run the tests bring up
the vagrant machine, cd into /vagrant, and run:

  bin/pytest --pyargs mjolnir

Bug: T162075
Change-Id: Id0dd1cb267b90b0aaca096f471e5b35ebd88f156
---
M README
A mjolnir/dbn.py
A mjolnir/spark.py
A mjolnir/test/__init__.py
A mjolnir/test/conftest.py
A mjolnir/test/fixtures/dbn_input.json
A mjolnir/test/test_dbn.py
D poc/data_process_dbn.py
8 files changed, 344 insertions(+), 130 deletions(-)

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



diff --git a/README b/README
index ae2700e..e0b5a60 100644
--- a/README
+++ b/README
@@ -9,3 +9,7 @@
 
 Targets pyspark 1.6.0 running on python 2.7
 
+== Other
+
+Documentation follows the numpy documentation guidelines:
+https://github.com/numpy/numpy/blob/master/doc/HOWTO_DOCUMENT.rst.txt
diff --git a/mjolnir/dbn.py b/mjolnir/dbn.py
new file mode 100644
index 000..958f302
--- /dev/null
+++ b/mjolnir/dbn.py
@@ -0,0 +1,194 @@
+"""
+Implements training a Dynamic Bayesian Network, using the clickmodels library,
+within spark
+"""
+
+from clickmodels.inference import DbnModel
+from clickmodels.input_reader import InputReader
+import json
+import pyspark.sql
+from pyspark.sql import functions as F
+import mjolnir.spark
+
+
+def _deduplicate_hits(session_hits):
+"""Deduplicate multiple views of a hit by a single session.
+
+A single session may have seen the same result list multiple times, for
+example by clicking a link, then clicking back and clicking a second link.
+Normalize that data together into a single record per hit_page_id even if
+it was displayed to a session multiple times.
+
+Parameters
+--
+session_hits : list
+A list of hits seen by a single session.
+
+Returns
+---
+list
+List of hits shown to a session de-duplicated to contain only one entry
+per hit_page_id.
+"""
+by_hit_page_id = {}
+for hit in session_hits:
+if hit.hit_page_id in by_hit_page_id:
+by_hit_page_id[hit.hit_page_id].append(hit)
+else:
+by_hit_page_id[hit.hit_page_id] = [hit]
+
+deduped = []
+for hit_page_id, hits in by_hit_page_id.iteritems():
+hit_positions = []
+clicked = False
+for hit in hits:
+hit_positions.append(hit.hit_position)
+clicked |= bool(hit.clicked)
+deduped.append(pyspark.sql.Row(
+hit_page_id=hit_page_id,
+hit_position=sum(hit_positions) / float(len(hit_positions)),
+clicked=clicked))
+return deduped
+
+
+def _gen_dbn_input(iterator):
+"""Converts an iterator over spark rows into the DBN input format.
+
+It is perhaps undesirable that we serialize into a string with json so
+InputReader can deserialize, but it is not generic enough to avoid this
+step.
+
+Parameters
+--
+iterator : ???
+iterator over pyspark.sql.Row. Each row must have a wikiid,
+norm_query, and list of hits each containing hit_position,
+hit_page_id and clicked.
+
+Yields
+---
+string
+Line for a single item of the input iterator formatted for use
+by clickmodels InputReader.
+"""
+for row in iterator:
+results = []
+clicks = []
+deduplicated = _deduplicate_hits(row.hits)
+deduplicated.sort(key=lambda hit: hit.hit_position)
+for hit in deduplicated:
+results.append(str(hit.hit_page_id))
+clicks.append(hit.clicked)
+yield '\t'.join([
+'0',  # unused identifier
+row.norm_query,  # group the session belongs to
+row.wikiid,  # region
+'0',  # intent weight
+json.dumps(results),  # hits displayed in session
+json.dumps([False] * len(results)),  # layout (unused)
+json.dumps(clicks)  # Was result clicked
+])
+
+
+def _extract_labels_from_dbn(model, reader):
+"""Extracts all learned labels from the model.
+
+Paramseters
+---
+model : clickmodels.inference.DbnModel
+A trained DBN model
+reader : clickmodels.input_reader.InputReader
+Reader that was used to build the list of SessionItem's model was
+trained with.
+
+Returns
+---
+list of tuples
+List of four value tuples each containing wikiid, 

[MediaWiki-commits] [Gerrit] operations/dumps[master]: extra verbosity for page ranges we will probably toss later

2017-04-19 Thread ArielGlenn (Code Review)
ArielGlenn has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/348268 )

Change subject: extra verbosity for page ranges we will probably toss later
..


extra verbosity for page ranges we will probably toss later

Change-Id: I3f9e9186fae20c64d87f27bc1608fa156fb9c341
---
M xmldumps-backup/dumps/pagerange.py
1 file changed, 3 insertions(+), 0 deletions(-)

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



diff --git a/xmldumps-backup/dumps/pagerange.py 
b/xmldumps-backup/dumps/pagerange.py
index b21b999..a9c95ac 100644
--- a/xmldumps-backup/dumps/pagerange.py
+++ b/xmldumps-backup/dumps/pagerange.py
@@ -203,6 +203,9 @@
 estimate = self.qrunner.get_estimate(page_start, page_end)
 revs_for_range = self.get_revcount(int(page_start), int(page_end), 
estimate)
 numjobs = revs_for_range / numrevs + 1
+if self.verbose:
+print ("DEBUG***: page_start, page_end, estimate, 
revs_for_range, numjobs:",
+   page_start, page_end, estimate, revs_for_range, numjobs)
 jobnum = 1
 while True:
 jobnum += 1

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3f9e9186fae20c64d87f27bc1608fa156fb9c341
Gerrit-PatchSet: 2
Gerrit-Project: operations/dumps
Gerrit-Branch: master
Gerrit-Owner: ArielGlenn 
Gerrit-Reviewer: ArielGlenn 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/dumps[master]: last page range for page content job would sometimes have to...

2017-04-19 Thread ArielGlenn (Code Review)
ArielGlenn has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/347627 )

Change subject: last page range for page content job would sometimes have too 
many revs
..


last page range for page content job would sometimes have too many revs

Now we continue iterating by revcount amounts until we reach the last page
to be dumped.

Also reduce minimum rev/page counts for queries, no harm in that

Change-Id: Id8832d628a49026da9e7f4ea17548ed340e191cd
---
M xmldumps-backup/dumps/pagerange.py
1 file changed, 13 insertions(+), 9 deletions(-)

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



diff --git a/xmldumps-backup/dumps/pagerange.py 
b/xmldumps-backup/dumps/pagerange.py
index 56e6da6..b21b999 100644
--- a/xmldumps-backup/dumps/pagerange.py
+++ b/xmldumps-backup/dumps/pagerange.py
@@ -203,12 +203,16 @@
 estimate = self.qrunner.get_estimate(page_start, page_end)
 revs_for_range = self.get_revcount(int(page_start), int(page_end), 
estimate)
 numjobs = revs_for_range / numrevs + 1
-for jobnum in range(1, numjobs + 1):
-if jobnum == numjobs:
-# last job, don't bother searching. just append up to max page 
id
-ranges.append((str(page_start), str(page_end)))
-break
+jobnum = 1
+while True:
+jobnum += 1
 numjobs_left = numjobs - jobnum + 1
+if numjobs_left <= 0:
+# our initial count was a bit off, and we'll have more jobs
+# than we thought. just keep passing the same endpoint
+# and getting ranges until we've gotten up through
+# the endpoint returned
+numjobs_left = 1
 interval = (page_end - page_start) / numjobs_left + 1
 (start, end) = self.get_pagerange(page_start, numrevs,
   page_start + interval, prevguess)
@@ -240,10 +244,10 @@
 maxtodo = 5
 
 runstodo = estimate / maxtodo + 1
-# let's say minimum pages per job is 10, that's
+# let's say minimum pages per job is 1, that's
 # quite reasonable (in the case where some pages
 # have many many revisions
-step = ((page_end - page_start) / runstodo) + 10
+step = ((page_end - page_start) / runstodo) + 1
 ends = range(page_start, page_end, step)
 
 if ends[-1] != page_end:
@@ -287,8 +291,8 @@
 if not interval:
 return (page_start, badguess)
 
-# set 10 pages as an absolute minimum in a query
-if badguess - page_start <= 10:
+# set 1 page as an absolute minimum in a query
+if badguess - page_start <= 1:
 return (page_start, badguess)
 
 prevguess = badguess

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id8832d628a49026da9e7f4ea17548ed340e191cd
Gerrit-PatchSet: 2
Gerrit-Project: operations/dumps
Gerrit-Branch: master
Gerrit-Owner: ArielGlenn 
Gerrit-Reviewer: ArielGlenn 
Gerrit-Reviewer: Awight 
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...WikimediaEvents[master]: Minor adjustment of adjusted sampling rates

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

Change subject: Minor adjustment of adjusted sampling rates
..


Minor adjustment of adjusted sampling rates

In I9bb1dd6804ee5c5b87e1191702d77eff043d0865, two
wikis were missing that should have been included
based on the analysis in T163273. Furthermore,
plwiki should have 1 in 60 sampling, not 1 in 50.

Bug: T163273
Change-Id: If6729cb50296342847d4c8c8c261a2fb17d2fc85
---
M modules/ext.wikimediaEvents.searchSatisfaction.js
1 file changed, 9 insertions(+), 1 deletion(-)

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



diff --git a/modules/ext.wikimediaEvents.searchSatisfaction.js 
b/modules/ext.wikimediaEvents.searchSatisfaction.js
index 972eca4..4628343 100644
--- a/modules/ext.wikimediaEvents.searchSatisfaction.js
+++ b/modules/ext.wikimediaEvents.searchSatisfaction.js
@@ -127,12 +127,20 @@
test: 30,
subTest: null
},
+   cswiki: {
+   test: 40,
+   subTest: null
+   },
dewiki: {
test: 350,
subTest: null
},
enwiki: {
test: 2000,
+   subTest: null
+   },
+   enwiktionary: {
+   test: 40,
subTest: null
},
eswiki: {
@@ -160,7 +168,7 @@
subTest: null
},
plwiki: {
-   test: 50,
+   test: 60,
subTest: null
},
ptwiki: {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If6729cb50296342847d4c8c8c261a2fb17d2fc85
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikimediaEvents
Gerrit-Branch: master
Gerrit-Owner: Bearloga 
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] operations/dumps[master]: fix bug that produced badly named page range files

2017-04-19 Thread ArielGlenn (Code Review)
ArielGlenn has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/347182 )

Change subject: fix bug that produced badly named page range files
..


fix bug that produced badly named page range files

contents of these files were fine, but the first one in a series
for a given subjob might have the wrong start page id in the filename,
although the actual contents correspond to the correctly generated
stub file

Change-Id: I76a5556f414de3860314c9b79cadc795bb4a
---
M xmldumps-backup/dumps/pagerange.py
1 file changed, 1 insertion(+), 13 deletions(-)

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



diff --git a/xmldumps-backup/dumps/pagerange.py 
b/xmldumps-backup/dumps/pagerange.py
index 6e20b89..56e6da6 100644
--- a/xmldumps-backup/dumps/pagerange.py
+++ b/xmldumps-backup/dumps/pagerange.py
@@ -164,11 +164,6 @@
 # last job, don't bother searching. just append up to max page 
id
 ranges.append((page_start, self.total_pages))
 break
-# this is wrong too, we need to get it passed or something
-#prevguess = min(interval*(jobnum+1), self.total_pages)
-# fixme here the interval*jobnum can't be right
-#(start, end) = self.get_pagerange(page_start, numrevs,
-#   interval*jobnum, prevguess)
 numjobs_left = numjobs - jobnum + 1
 interval = ((self.total_pages - page_start) / numjobs_left) + 1
 (start, end) = self.get_pagerange(page_start, numrevs,
@@ -201,9 +196,7 @@
 page_start = 1
 if not page_end:
 page_end = self.total_pages
-# actually this is ok for the start but it varies right afterwards
-# interval = ((self.total_pages - page_start)/numjobs_left) + 1
-prevguess = 0
+prevguess = page_start
 if page_start == 1 and page_end == self.total_pages:
 numjobs = self.total_revs / numrevs + 1
 else:
@@ -215,11 +208,6 @@
 # last job, don't bother searching. just append up to max page 
id
 ranges.append((str(page_start), str(page_end)))
 break
-# this is wrong too, we need to get it passed or something
-#prevguess = min(interval*(jobnum+1), self.total_pages)
-# fixme here the interval*jobnum can't be right
-#(start, end) = self.get_pagerange(page_start, numrevs,
-#   interval*jobnum, prevguess)
 numjobs_left = numjobs - jobnum + 1
 interval = (page_end - page_start) / numjobs_left + 1
 (start, end) = self.get_pagerange(page_start, numrevs,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I76a5556f414de3860314c9b79cadc795bb4a
Gerrit-PatchSet: 1
Gerrit-Project: operations/dumps
Gerrit-Branch: master
Gerrit-Owner: ArielGlenn 
Gerrit-Reviewer: ArielGlenn 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...WikimediaEvents[master]: Minor adjustment of adjusted sampling rates

2017-04-19 Thread Bearloga (Code Review)
Bearloga has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/348974 )

Change subject: Minor adjustment of adjusted sampling rates
..

Minor adjustment of adjusted sampling rates

In I9bb1dd6804ee5c5b87e1191702d77eff043d0865, two
wikis were missing that should have been included
based on the analysis in T163273. Furthermore,
plwiki should have 1 in 60 sampling, not 1 in 50.

Bug: T163273
Change-Id: If6729cb50296342847d4c8c8c261a2fb17d2fc85
---
M modules/ext.wikimediaEvents.searchSatisfaction.js
1 file changed, 9 insertions(+), 1 deletion(-)


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

diff --git a/modules/ext.wikimediaEvents.searchSatisfaction.js 
b/modules/ext.wikimediaEvents.searchSatisfaction.js
index 972eca4..4628343 100644
--- a/modules/ext.wikimediaEvents.searchSatisfaction.js
+++ b/modules/ext.wikimediaEvents.searchSatisfaction.js
@@ -127,12 +127,20 @@
test: 30,
subTest: null
},
+   cswiki: {
+   test: 40,
+   subTest: null
+   },
dewiki: {
test: 350,
subTest: null
},
enwiki: {
test: 2000,
+   subTest: null
+   },
+   enwiktionary: {
+   test: 40,
subTest: null
},
eswiki: {
@@ -160,7 +168,7 @@
subTest: null
},
plwiki: {
-   test: 50,
+   test: 60,
subTest: null
},
ptwiki: {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If6729cb50296342847d4c8c8c261a2fb17d2fc85
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikimediaEvents
Gerrit-Branch: master
Gerrit-Owner: Bearloga 

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


[MediaWiki-commits] [Gerrit] wikimedia...SmashPig[master]: Fix EC recurring profile creation

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

Change subject: Fix EC recurring profile creation
..


Fix EC recurring profile creation

Also tests

Change-Id: Ia4d4bac44c11f8ff74b837ded8d94f8eeb6d5f55
---
M PaymentProviders/PayPal/Job.php
A PaymentProviders/PayPal/Tests/Data/recurring_payment_profile_created.json
A 
PaymentProviders/PayPal/Tests/Data/recurring_payment_profile_created_transformed.json
M PaymentProviders/PayPal/Tests/phpunit/CaptureIncomingMessageTest.php
4 files changed, 54 insertions(+), 0 deletions(-)

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



diff --git a/PaymentProviders/PayPal/Job.php b/PaymentProviders/PayPal/Job.php
index 6e8816f..ab64a33 100644
--- a/PaymentProviders/PayPal/Job.php
+++ b/PaymentProviders/PayPal/Job.php
@@ -78,6 +78,8 @@
// FIXME random document formats
if ( substr( $txn_type, 0, 7 ) === 'subscr_' ) {
$log_id = "subscr_id:{$request['subscr_id']}";
+   } elseif ( substr( $txn_type, 0, 10 ) === 'recurring_'  ) {
+   $log_id = 
"recurring_payment_id:{$request['recurring_payment_id']}";
} else {
$log_id = "txn_id:{$request['txn_id']}";
}
diff --git 
a/PaymentProviders/PayPal/Tests/Data/recurring_payment_profile_created.json 
b/PaymentProviders/PayPal/Tests/Data/recurring_payment_profile_created.json
new file mode 100644
index 000..1cd1c71
--- /dev/null
+++ b/PaymentProviders/PayPal/Tests/Data/recurring_payment_profile_created.json
@@ -0,0 +1,30 @@
+{
+  "payment_cycle": "Monthly",
+  "txn_type": "recurring_payment_profile_created",
+  "last_name": "Fowl",
+  "next_payment_date": "03:00:00 May 18, 2017 PDT",
+  "residence_country": "US",
+  "initial_payment_amount": "0",
+  "rp_invoice_id": "47017286",
+  "currency_code": "JPY",
+  "time_created": "09:45:28 Apr 18, 2017 PDT",
+  "verify_sign": "ATZo1sTL1YpCR8SD-CzFolXviWIiAYV78oZbytx6QLNuI3z-KS8wKLqC",
+  "period_type": " Regular",
+  "payer_status": "unverified",
+  "tax": "0",
+  "payer_email": "do...@generous.net",
+  "first_name": "Fezziwig",
+  "receiver_email": "recei...@organization.org",
+  "payer_id": "8R297FE87CD8S",
+  "product_type": "1",
+  "shipping": "0",
+  "amount_per_cycle": "140",
+  "profile_status": "Active",
+  "charset": "UTF-8",
+  "notify_version": "3.8",
+  "amount": "140",
+  "outstanding_balance": "0",
+  "recurring_payment_id": "I-88J1M3DLSF0",
+  "product_name": "Monthly donation to the Wikimedia Foundation",
+  "ipn_track_id": "8999c084zz0f2"
+}
diff --git 
a/PaymentProviders/PayPal/Tests/Data/recurring_payment_profile_created_transformed.json
 
b/PaymentProviders/PayPal/Tests/Data/recurring_payment_profile_created_transformed.json
new file mode 100644
index 000..890f7dd
--- /dev/null
+++ 
b/PaymentProviders/PayPal/Tests/Data/recurring_payment_profile_created_transformed.json
@@ -0,0 +1,21 @@
+{
+  "subscr_id": "I-88J1M3DLSF0",
+  "txn_type": "subscr_signup",
+  "contribution_tracking_id": "47017286",
+  "order_id": "47017286",
+  "email": "do...@generous.net",
+  "first_name": "Fezziwig",
+  "middle_name": "",
+  "last_name": "Fowl",
+  "frequency_interval": "1",
+  "frequency_unit": "month",
+  "installments": 0,
+  "create_date": 1492533928,
+  "start_date": 1492533928,
+  "date": 1492533928,
+  "gateway": "paypal_ec",
+  "recurring": "1",
+  "source_name": "SmashPig",
+  "source_type": "listener",
+  "source_version": "unknown"
+}
diff --git 
a/PaymentProviders/PayPal/Tests/phpunit/CaptureIncomingMessageTest.php 
b/PaymentProviders/PayPal/Tests/phpunit/CaptureIncomingMessageTest.php
index 7af7c01..f57aa9e 100644
--- a/PaymentProviders/PayPal/Tests/phpunit/CaptureIncomingMessageTest.php
+++ b/PaymentProviders/PayPal/Tests/phpunit/CaptureIncomingMessageTest.php
@@ -27,6 +27,7 @@
static $message_data = array(
'web_accept.json' => 'donations',
'express_checkout.json' => 'donations',
+   'recurring_payment_profile_created.json' => 'recurring',
'subscr_signup.json' => 'recurring',
'subscr_payment.json' => 'recurring',
'recurring_payment.json' => 'recurring',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia4d4bac44c11f8ff74b837ded8d94f8eeb6d5f55
Gerrit-PatchSet: 2
Gerrit-Project: wikimedia/fundraising/SmashPig
Gerrit-Branch: master
Gerrit-Owner: Ejegg 
Gerrit-Reviewer: Awight 
Gerrit-Reviewer: Cdentinger 
Gerrit-Reviewer: Ejegg 
Gerrit-Reviewer: XenoRyet 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits 

[MediaWiki-commits] [Gerrit] unicodejs[master]: git.wikimedia.org -> phab

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

Change subject: git.wikimedia.org -> phab
..


git.wikimedia.org -> phab

Bug: T139089
Change-Id: Iee207d4f163331e4ce8f1ee870e0313bfaba5932
---
M tools/strongDir.js.html
M tools/strongDir.php.html
2 files changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/tools/strongDir.js.html b/tools/strongDir.js.html
index d44cc4b..b2c0d2f 100644
--- a/tools/strongDir.js.html
+++ b/tools/strongDir.js.html
@@ -9,7 +9,7 @@
  * Does not match if there is no strong directionality codepoint.
  *
  * Generated by UnicodeJS (see tools/strongDir) from the UCD; see
- * https://git.wikimedia.org/summary/unicodejs.git .
+ * https://phabricator.wikimedia.org/diffusion/GUJS .
  */
 strongDirRegExp = new RegExp(
'(?:' +
diff --git a/tools/strongDir.php.html b/tools/strongDir.php.html
index 4ca160c..d64defa 100644
--- a/tools/strongDir.php.html
+++ b/tools/strongDir.php.html
@@ -11,7 +11,7 @@
  * The form is (?:([strong LTR codepoint])|([strong rtl codepoint])) .
  *
  * Generated by UnicodeJS (see tools/strongDir) from the UCD; see
- * https://git.wikimedia.org/summary/unicodejs.git .
+ * https://phabricator.wikimedia.org/diffusion/GUJS .
  */
 static private $strongDirRegex = '/(?:()|())/u';
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iee207d4f163331e4ce8f1ee870e0313bfaba5932
Gerrit-PatchSet: 1
Gerrit-Project: unicodejs
Gerrit-Branch: master
Gerrit-Owner: TerraCodes 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: TerraCodes 
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[fundraising/REL1_27]: Update DonationInterface submodule

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

Change subject: Update DonationInterface submodule
..


Update DonationInterface submodule

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

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



diff --git a/extensions/DonationInterface b/extensions/DonationInterface
index 1ec4e2a..7ed7cc1 16
--- a/extensions/DonationInterface
+++ b/extensions/DonationInterface
@@ -1 +1 @@
-Subproject commit 1ec4e2abc6f99ead88e38ea47aa4ef6aaa0c0d39
+Subproject commit 7ed7cc1bce76a55f2b6318031c88b047219aea25

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: Make onUserLoggedIn() check read-only mode

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

Change subject: Make onUserLoggedIn() check read-only mode
..


Make onUserLoggedIn() check read-only mode

Also try to defer the master connection to post-send.

Change-Id: I6c8f5b2e48493cd09de3c93604b3a546d7fa1454
---
M VisualEditor.hooks.php
1 file changed, 8 insertions(+), 1 deletion(-)

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



diff --git a/VisualEditor.hooks.php b/VisualEditor.hooks.php
index 332bcc2..7835e28 100644
--- a/VisualEditor.hooks.php
+++ b/VisualEditor.hooks.php
@@ -8,6 +8,8 @@
  * @license The MIT License (MIT); see LICENSE.txt
  */
 
+use MediaWiki\MediaWikiServices;
+
 class VisualEditorHooks {
/**
 * Initialise the 'VisualEditorAvailableNamespaces' setting, and add 
content
@@ -1024,10 +1026,15 @@
public static function onUserLoggedIn( $user ) {
$cookie = RequestContext::getMain()->getRequest()->getCookie( 
'VEE', '' );
if ( $cookie === 'visualeditor' || $cookie === 'wikitext' ) {
+   $lb = 
MediaWikiServices::getInstance()->getDBLoadBalancer();
DeferredUpdates::addUpdate( new AtomicSectionUpdate(
-   wfGetDB( DB_MASTER ),
+   $lb->getLazyConnectionRef( DB_MASTER ),
__METHOD__,
function () use ( $user, $cookie ) {
+   if ( wfReadOnly() ) {
+   return;
+   }
+
$uLatest = 
$user->getInstanceForUpdate();
$uLatest->setOption( 
'visualeditor-editor', $cookie );
$uLatest->saveSettings();

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6c8f5b2e48493cd09de3c93604b3a546d7fa1454
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Remove bd808 from logstash-roots

2017-04-19 Thread Muehlenhoff (Code Review)
Muehlenhoff has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/348971 )

Change subject: Remove bd808 from logstash-roots
..


Remove bd808 from logstash-roots

I don't feel that I have the time to volunteer for logstash production
maintenance anymore and my day job has moved far away from this being
a focus.

Change-Id: I7b484f9d308e78d6a99ee182fdcf81687dae83ec
---
M modules/admin/data/data.yaml
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/modules/admin/data/data.yaml b/modules/admin/data/data.yaml
index f0f34f0..b9c0a41 100644
--- a/modules/admin/data/data.yaml
+++ b/modules/admin/data/data.yaml
@@ -170,7 +170,7 @@
   logstash-roots:
 gid: 722
 description: users with root access on logstash nodes (rt 6366, 6896)
-members: [bd808, demon, reedy]
+members: [demon, reedy]
 privileges: ['ALL = (ALL) NOPASSWD: ALL']
   statistics-web-users:
 gid: 724

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7b484f9d308e78d6a99ee182fdcf81687dae83ec
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: BryanDavis 
Gerrit-Reviewer: EBernhardson 
Gerrit-Reviewer: Faidon Liambotis 
Gerrit-Reviewer: Muehlenhoff 
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[fundraising/REL1_27]: Update DonationInterface submodule

2017-04-19 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/348973 )

Change subject: Update DonationInterface submodule
..

Update DonationInterface submodule

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


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

diff --git a/extensions/DonationInterface b/extensions/DonationInterface
index 1ec4e2a..7ed7cc1 16
--- a/extensions/DonationInterface
+++ b/extensions/DonationInterface
@@ -1 +1 @@
-Subproject commit 1ec4e2abc6f99ead88e38ea47aa4ef6aaa0c0d39
+Subproject commit 7ed7cc1bce76a55f2b6318031c88b047219aea25

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: Linter: Remove redundant comments

2017-04-19 Thread Subramanya Sastry (Code Review)
Subramanya Sastry has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/348972 )

Change subject: Linter: Remove redundant comments
..

Linter: Remove redundant comments

Change-Id: Ice431a56b416eaa9b8ef9f74594c1f126e279e5f
---
M lib/wt2html/pp/handlers/linter.js
1 file changed, 1 insertion(+), 10 deletions(-)


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

diff --git a/lib/wt2html/pp/handlers/linter.js 
b/lib/wt2html/pp/handlers/linter.js
index 8ca1f3c..f932a1a 100644
--- a/lib/wt2html/pp/handlers/linter.js
+++ b/lib/wt2html/pp/handlers/linter.js
@@ -383,19 +383,10 @@
logTransclusions(env, node, dp, tplInfo);
}
 
-   // Log Tree Builder fixups
logTreeBuilderFixup(env, node, dp, tplInfo);
-
-   // Log Ignored Table Attributes
logIgnoredTableAttr(env, node, dp, tplInfo);
-
-   // Log deletable tables (T161341)
-   logDeletableTables(env, node, dp, tplInfo);
-
-   // Log obsolete HTML tags
+   logDeletableTables(env, node, dp, tplInfo); // For T161341
logObsoleteHTMLTags(env, node, dp, tplInfo);
-
-   // Log bogus image options
logBogusImageOptions(env, node, dp, tplInfo);
 
// Log fostered content, but skip rendering-transparent nodes

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ice431a56b416eaa9b8ef9f74594c1f126e279e5f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Subramanya Sastry 

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


[MediaWiki-commits] [Gerrit] mediawiki...DonationInterface[master]: Test a bit of Amazon queue stuff

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

Change subject: Test a bit of Amazon queue stuff
..


Test a bit of Amazon queue stuff

Less fakery in the test adapters, more accurately testing what
actually will go out over the wire.

SHOULD be able to use the php-queue PDO backend with in-memory
sqlite db, but that's sometimes a pain to reset.

Change-Id: I948ef7e3c02f35563bf1868a003fe3c838de4f29
---
M DonationInterface.class.php
M tests/phpunit/Adapter/Amazon/AmazonTest.php
M tests/phpunit/DonationInterfaceTestCase.php
M tests/phpunit/DonationQueueTest.php
M tests/phpunit/TestConfiguration.php
M tests/phpunit/includes/test_gateway/TestingAmazonAdapter.php
6 files changed, 13 insertions(+), 28 deletions(-)

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



diff --git a/DonationInterface.class.php b/DonationInterface.class.php
index 9132a26..5fcc120 100644
--- a/DonationInterface.class.php
+++ b/DonationInterface.class.php
@@ -50,7 +50,7 @@
$testDir = __DIR__ . '/tests/phpunit/';
 
// Set up globaltown
-   require_once $testDir . '/TestConfiguration.php';
+   require_once $testDir . 'TestConfiguration.php';
 
$files[] = $testDir . 'AllTests.php';
 
diff --git a/tests/phpunit/Adapter/Amazon/AmazonTest.php 
b/tests/phpunit/Adapter/Amazon/AmazonTest.php
index 8284d51..7ecc246 100644
--- a/tests/phpunit/Adapter/Amazon/AmazonTest.php
+++ b/tests/phpunit/Adapter/Amazon/AmazonTest.php
@@ -149,9 +149,8 @@
$this->assertEquals( $oid, 
$setOrderReferenceDetailsArgs['seller_order_id'], 'Did not set order id on 
order reference' );
$this->assertEquals( $init['amount'], 
$setOrderReferenceDetailsArgs['amount'], 'Did not set amount on order 
reference' );
$this->assertEquals( $init['currency_code'], 
$setOrderReferenceDetailsArgs['currency_code'], 'Did not set currency code on 
order reference' );
-   $queued = $gateway->queue_messages;
-   $this->assertNotEmpty( $queued['complete'], 'Not sending a 
message to the complete queue' );
-   $message = $queued['complete'][0];
+   $message = DonationQueue::instance()->pop( 'complete' );
+   $this->assertNotNull( $message, 'Not sending a message to the 
complete queue' );
$this->assertEquals( 'S01-0391295-0674065-C095112', 
$message['gateway_txn_id'], 'Queue message has wrong txn ID' );
}
 
@@ -273,9 +272,8 @@
$authorizeOnBillingAgreementDetailsArgs = 
$mockClient->calls['authorizeOnBillingAgreement'][0];
$this->assertEquals( $init['amount'], 
$authorizeOnBillingAgreementDetailsArgs['authorization_amount'], 'Did not 
authorize correct amount' );
$this->assertEquals( $init['currency_code'], 
$authorizeOnBillingAgreementDetailsArgs['currency_code'], 'Did not authorize 
correct currency code' );
-   $queued = $gateway->queue_messages;
-   $this->assertNotEmpty( $queued['complete'], 'Not sending a 
message to the complete queue' );
-   $message = $queued['complete'][0];
+   $message = DonationQueue::instance()->pop( 'complete' );
+   $this->assertNotNull( $message, 'Not sending a message to the 
complete queue' );
$this->assertEquals( 'S01-5318994-6362993-C004044', 
$message['gateway_txn_id'], 'Queue message has wrong txn ID' );
$this->assertEquals( $init['subscr_id'], $message['subscr_id'], 
'Queue message has wrong subscription ID' );
}
diff --git a/tests/phpunit/DonationInterfaceTestCase.php 
b/tests/phpunit/DonationInterfaceTestCase.php
index 9a33ce1..481d4c4 100644
--- a/tests/phpunit/DonationInterfaceTestCase.php
+++ b/tests/phpunit/DonationInterfaceTestCase.php
@@ -71,11 +71,18 @@
// SmashPig core logger.
$this->testLogger = new TestingDonationLogger();
DonationLoggerFactory::$overrideLogger = $this->testLogger;
+   $this->setMwGlobals( array(
+   'wgDonationInterfaceEnableQueue' => true,
+   'wgDonationInterfaceDefaultQueueServer' => array(
+   'type' => 'TestingQueue',
+   ),
+   ) );
parent::setUp();
}
 
protected function tearDown() {
$this->resetAllEnv();
+   TestingQueue::clearAll();
DonationLoggerFactory::$overrideLogger = null;
parent::tearDown();
}
diff --git a/tests/phpunit/DonationQueueTest.php 
b/tests/phpunit/DonationQueueTest.php
index e934139..0699544 100644
--- a/tests/phpunit/DonationQueueTest.php
+++ b/tests/phpunit/DonationQueueTest.php
@@ -34,10 +34,6 @@
$this->queue_name = 'test-' . 

[MediaWiki-commits] [Gerrit] operations/puppet[production]: Icinga: add simple plugin to check CPU frequency

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

Change subject: Icinga: add simple plugin to check CPU frequency
..


Icinga: add simple plugin to check CPU frequency

A simple Icinga plugin to check for a minimum CPU
frequency in MHz.

Bug: T163220
Change-Id: Id8ec1f6036ebd4abc1c6db12a20fb1a63b1875fb
---
A modules/icinga/files/check_cpufreq
1 file changed, 23 insertions(+), 0 deletions(-)

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



diff --git a/modules/icinga/files/check_cpufreq 
b/modules/icinga/files/check_cpufreq
new file mode 100755
index 000..5207d48
--- /dev/null
+++ b/modules/icinga/files/check_cpufreq
@@ -0,0 +1,23 @@
+#!/bin/bash
+# Icinga plugin to check CPU frequency (T163220)
+# usage: check_cpufreq 
+
+min_mhz=$1
+
+if [ -z "$1" ] ; then echo "usage: $0 "; exit 3; fi
+
+cpu_freq=$(grep MHz /proc/cpuinfo |head -1|cut -d: -f2|cut -d\. -f1|xargs)
+
+if [ $cpu_freq -ge $min_mhz ] ; then
+echo "OK. CPU frequency is >= ${min_mhz} MHz ($cpu_freq)"
+exit 0
+fi
+
+if [ $cpu_freq -lt $min_mhz ] ; then
+echo "CRIT, CPU frequency is < ${min_mhz} MHz ($cpu_freq)"
+exit 1
+fi
+
+
+echo "UNKNOWN - please check plugin ($0)"
+exit 3

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

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

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


[MediaWiki-commits] [Gerrit] testing-access-wrapper[master]: Initial commit

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

Change subject: Initial commit
..


Initial commit

Move TestingAccessWrapper from MediaWiki into a separate library.

Code was taken from the following files in
MediaWiki commit 82d3ab93ad15a34089ab81a9a9d62ecd3d2e48ec:
- tests/phpunit/includes/TestingAccessWrapper.php
- tests/phpunit/includes/TestingAccessWrapperTest.php
- tests/phpunit/data/helpers/WellProtectedClass.php

Contributors to those files, per git shortlog:
 2  Adam Roses Wight 
 1  Brad Jorsch 
 1  Gergő Tisza 

Change-Id: I387dd09b9a1c995f2e535c0b112997f3a72d2126
Depends-On: I877ec9b988019d99c8a1734c3ec1b7e3f8684a47
---
A .editorconfig
A .gitattributes
A .gitignore
A .travis.yml
A Doxyfile
A LICENSE
A README.md
A composer.json
A phpcs.xml
A phpunit.xml.dist
A src/TestingAccessWrapper.php
A tests/TestingAccessWrapperTest.php
A tests/WellProtectedClass.php
A tests/WellProtectedParentClass.php
14 files changed, 872 insertions(+), 0 deletions(-)

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



diff --git a/.editorconfig b/.editorconfig
new file mode 100644
index 000..c2dfc46
--- /dev/null
+++ b/.editorconfig
@@ -0,0 +1,6 @@
+# http://editorconfig.org
+root = true
+
+[*]
+indent_style = tab
+indent_size = tab
diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 000..b6fe658
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1,10 @@
+.editorconfig export-ignore
+.gitattributes export-ignore
+.gitignore export-ignore
+.gitreview export-ignore
+.travis.yml export-ignore
+Doxyfile export-ignore
+composer.json export-ignore
+phpcs.xml export-ignore
+phpunit.xml.dist export-ignore
+tests/ export-ignore
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000..10534bf
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,11 @@
+# Editors
+*~
+.*.swp
+
+# Composer
+/vendor
+/composer.lock
+
+# Building and testing
+/doc
+/coverage
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 000..e52d774
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,13 @@
+sudo: false
+language: php
+php:
+  - "5.3"
+  - "5.4"
+  - "5.5"
+  - "5.6"
+  - "7.0"
+  - "hhvm"
+install:
+  - composer install
+script:
+  - composer test
diff --git a/Doxyfile b/Doxyfile
new file mode 100644
index 000..45ca02a
--- /dev/null
+++ b/Doxyfile
@@ -0,0 +1,27 @@
+# Doxyfile for testing-access-wrapper
+#
+# See 
+# for help on how to use this file to configure Doxygen.
+
+PROJECT_NAME   = "testing-access-wrapper"
+PROJECT_BRIEF  = "Simple unit test helper for accessing non-public 
properties/methods."
+OUTPUT_DIRECTORY   = doc
+JAVADOC_AUTOBRIEF  = YES
+QT_AUTOBRIEF   = YES
+WARN_NO_PARAMDOC   = YES
+INPUT  = README.md src/
+FILE_PATTERNS  = *.php
+RECURSIVE  = YES
+USE_MDFILE_AS_MAINPAGE = README.md
+HTML_DYNAMIC_SECTIONS  = YES
+GENERATE_TREEVIEW  = YES
+TREEVIEW_WIDTH = 250
+GENERATE_LATEX = NO
+HAVE_DOT   = YES
+DOT_FONTNAME   = Helvetica
+DOT_FONTSIZE   = 10
+TEMPLATE_RELATIONS = YES
+CALL_GRAPH = NO
+CALLER_GRAPH   = NO
+DOT_MULTI_TARGETS  = YES
+ALIASES += license="\par License:\n"
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 000..019694a
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,342 @@
+== GNU GENERAL PUBLIC LICENSE ==
+
+Version 2, June 1991
+
+Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
+Everyone is permitted to copy and distribute verbatim copies
+of this license document, but changing it is not allowed.
+
+=== Preamble ===
+
+The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users.  This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it.  (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.)  You can apply it to
+your programs, too.
+
+When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+To protect your rights, we need to make restrictions that forbid
+anyone to deny you 

[MediaWiki-commits] [Gerrit] operations/puppet[production]: Remove bd808 from logstash-roots

2017-04-19 Thread BryanDavis (Code Review)
BryanDavis has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/348971 )

Change subject: Remove bd808 from logstash-roots
..

Remove bd808 from logstash-roots

I don't feel that I have the time to volunteer for logstash production
maintenance anymore and my day job has moved far away from this being
a focus.

Change-Id: I7b484f9d308e78d6a99ee182fdcf81687dae83ec
---
M modules/admin/data/data.yaml
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/modules/admin/data/data.yaml b/modules/admin/data/data.yaml
index f0f34f0..b9c0a41 100644
--- a/modules/admin/data/data.yaml
+++ b/modules/admin/data/data.yaml
@@ -170,7 +170,7 @@
   logstash-roots:
 gid: 722
 description: users with root access on logstash nodes (rt 6366, 6896)
-members: [bd808, demon, reedy]
+members: [demon, reedy]
 privileges: ['ALL = (ALL) NOPASSWD: ALL']
   statistics-web-users:
 gid: 724

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...WikimediaEvents[master]: Adjust search satisfaction sampling rates

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

Change subject: Adjust search satisfaction sampling rates
..


Adjust search satisfaction sampling rates

After noticing that certain search metrics have a lot of
day-to-day variability when broken down by wiki because
low-traffic wikis (basically anything other than English
Wikipedia) don't have a lot of search sessions recorded
under the current 1 in 200 default sampling rate. By
changing the default to 1 in 10 and specifying a lower
rate for specific higher-traffic wikis (e.g. dewiki),
we will achieve lower variability and be able to make
better decisions informed by stable/consistent metrics.

Bug: T163273
Change-Id: I9bb1dd6804ee5c5b87e1191702d77eff043d0865
---
M modules/ext.wikimediaEvents.searchSatisfaction.js
1 file changed, 67 insertions(+), 4 deletions(-)

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



diff --git a/modules/ext.wikimediaEvents.searchSatisfaction.js 
b/modules/ext.wikimediaEvents.searchSatisfaction.js
index 8e2a099..972eca4 100644
--- a/modules/ext.wikimediaEvents.searchSatisfaction.js
+++ b/modules/ext.wikimediaEvents.searchSatisfaction.js
@@ -117,16 +117,79 @@
validBuckets = [],
sampleSize = ( function () {
var dbName = mw.config.get( 'wgDBname' 
),
-   // Currently unused, but 
provides a place
-   // to handle wiki-specific 
sampling
+   // Provides a place to handle 
wiki-specific sampling,
+   // overriding the default (1 in 
10, see below) rate.
+   // For example: enwiki uses 1 
in 2000 sampling rate,
+   // but wikidata uses 1 in 5 
sampling rate because of
+   // drastic differences in 
traffic and search usage.
subTests = {
+   commonswiki: {
+   test: 30,
+   subTest: null
+   },
+   dewiki: {
+   test: 350,
+   subTest: null
+   },
+   enwiki: {
+   test: 2000,
+   subTest: null
+   },
+   eswiki: {
+   test: 200,
+   subTest: null
+   },
+   frwiki: {
+   test: 150,
+   subTest: null
+   },
+   itwiki: {
+   test: 100,
+   subTest: null
+   },
+   jawiki: {
+   test: 100,
+   subTest: null
+   },
+   kowiki: {
+   test: 30,
+   subTest: null
+   },
+   nlwiki: {
+   test: 30,
+   subTest: null
+   },
+   plwiki: {
+   test: 50,
+   subTest: null
+   

[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: db-codfw.php: Depool db2069

2017-04-19 Thread Marostegui (Code Review)
Marostegui has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/348970 )

Change subject: db-codfw.php: Depool db2069
..

db-codfw.php: Depool db2069

We need to run analyze table on the revision table so it starts using
the correct plan.
Right now it seems it is filesorting and not using the correct indexes,
which is something we have seen on eqiad too

Bug: T163351
Change-Id: I0c2d8b3292139ea28f9592d6167024ca54099ae7
---
M wmf-config/db-codfw.php
1 file changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/wmf-config/db-codfw.php b/wmf-config/db-codfw.php
index 7e91f19..7a967b6 100644
--- a/wmf-config/db-codfw.php
+++ b/wmf-config/db-codfw.php
@@ -99,7 +99,7 @@
'db2048' => 400, # C6 2.9TB 160GB,
'db2055' => 50,  # D6 3.3TB 160GB, dump (inactive), vslow, api
'db2062' => 50,  # B5 3.3TB 160GB, api
-   'db2069' => 50,  # D6 3.3TB 160GB, api
+#  'db2069' => 50,  # D6 3.3TB 160GB, api #running analyze
'db2070' => 400, # C5 3.3TB 160GB
],
's2' => [
@@ -246,7 +246,7 @@
'api' => [
'db2055' => 1,
'db2062' => 1,
-   'db2069' => 1,
+#  'db2069' => 1,
],
],
's2' => [

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...WikimediaEvents[master]: Adjust search satisfaction sampling rates

2017-04-19 Thread Bearloga (Code Review)
Bearloga has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/348969 )

Change subject: Adjust search satisfaction sampling rates
..

Adjust search satisfaction sampling rates

After noticing that certain search metrics have a lot of
day-to-day variability when broken down by wiki because
low-traffic wikis (basically anything other than English
Wikipedia) don't have a lot of search sessions recorded
under the current 1 in 200 default sampling rate. By
changing the default to 1 in 10 and specifying a lower
rate for specific higher-traffic wikis (e.g. dewiki),
we will achieve lower variability and be able to make
better decisions informed by stable/consistent metrics.

Bug: T163273
Change-Id: I9bb1dd6804ee5c5b87e1191702d77eff043d0865
---
M modules/ext.wikimediaEvents.searchSatisfaction.js
1 file changed, 67 insertions(+), 4 deletions(-)


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

diff --git a/modules/ext.wikimediaEvents.searchSatisfaction.js 
b/modules/ext.wikimediaEvents.searchSatisfaction.js
index 8e2a099..972eca4 100644
--- a/modules/ext.wikimediaEvents.searchSatisfaction.js
+++ b/modules/ext.wikimediaEvents.searchSatisfaction.js
@@ -117,16 +117,79 @@
validBuckets = [],
sampleSize = ( function () {
var dbName = mw.config.get( 'wgDBname' 
),
-   // Currently unused, but 
provides a place
-   // to handle wiki-specific 
sampling
+   // Provides a place to handle 
wiki-specific sampling,
+   // overriding the default (1 in 
10, see below) rate.
+   // For example: enwiki uses 1 
in 2000 sampling rate,
+   // but wikidata uses 1 in 5 
sampling rate because of
+   // drastic differences in 
traffic and search usage.
subTests = {
+   commonswiki: {
+   test: 30,
+   subTest: null
+   },
+   dewiki: {
+   test: 350,
+   subTest: null
+   },
+   enwiki: {
+   test: 2000,
+   subTest: null
+   },
+   eswiki: {
+   test: 200,
+   subTest: null
+   },
+   frwiki: {
+   test: 150,
+   subTest: null
+   },
+   itwiki: {
+   test: 100,
+   subTest: null
+   },
+   jawiki: {
+   test: 100,
+   subTest: null
+   },
+   kowiki: {
+   test: 30,
+   subTest: null
+   },
+   nlwiki: {
+   test: 30,
+   subTest: null
+   },
+   plwiki: {
+   test: 50,
+   subTest: null
+

[MediaWiki-commits] [Gerrit] pywikibot/core[master]: pagegenerators_tests.py: Remove invalid escape sequence

2017-04-19 Thread Dalba (Code Review)
Dalba has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/348968 )

Change subject: pagegenerators_tests.py: Remove invalid escape sequence
..

pagegenerators_tests.py: Remove invalid escape sequence

Raises DeprecationWarning under Python 3.6.

Change-Id: I07bc60af045deafd1371cec9e98656810846c555
---
M tests/pagegenerators_tests.py
1 file changed, 4 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/68/348968/1

diff --git a/tests/pagegenerators_tests.py b/tests/pagegenerators_tests.py
index 50628bd..655180c 100755
--- a/tests/pagegenerators_tests.py
+++ b/tests/pagegenerators_tests.py
@@ -1085,8 +1085,8 @@
 """Test -onlyif without qualifiers."""
 gf = pagegenerators.GeneratorFactory(site=self.site)
 gf.handleArg('-page:Q15745378')
-gf.handleArg('-onlyif:P1476=International Journal of Minerals\, '
- 'Metallurgy\, and Materials')
+gf.handleArg('-onlyif:P1476=International Journal of Minerals, '
+ 'Metallurgy, and Materials')
 gen = gf.getCombinedGenerator()
 self.assertIsNotNone(gen)
 self.assertEqual(len(set(gen)), 1)
@@ -1095,8 +1095,8 @@
 """Test -onlyifnot without qualifiers."""
 gf = pagegenerators.GeneratorFactory(site=self.site)
 gf.handleArg('-page:Q15745378')
-gf.handleArg('-onlyifnot:P1476=International Journal of Minerals\, '
- 'Metallurgy\, and Materials')
+gf.handleArg('-onlyifnot:P1476=International Journal of Minerals, '
+ 'Metallurgy, and Materials')
 gen = gf.getCombinedGenerator()
 self.assertIsNotNone(gen)
 self.assertEqual(len(set(gen)), 0)

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I07bc60af045deafd1371cec9e98656810846c555
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Dalba 

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


[MediaWiki-commits] [Gerrit] mediawiki...DonationInterface[master]: Clean up Mustache form test

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

Change subject: Clean up Mustache form test
..


Clean up Mustache form test

No need for error suppression, should check for file existence.

Change-Id: Ic2172eb0220a4b5cc0a5e5511318a35d755da1e9
---
M gateway_forms/Mustache.php
M tests/phpunit/MustacheFormTest.php
2 files changed, 5 insertions(+), 4 deletions(-)

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



diff --git a/gateway_forms/Mustache.php b/gateway_forms/Mustache.php
index 7101c55..e2a5e14 100644
--- a/gateway_forms/Mustache.php
+++ b/gateway_forms/Mustache.php
@@ -70,6 +70,9 @@
 
$options = $options + $defaultOptions;
 
+   if ( !file_exists( $fileName ) ) {
+   throw new RuntimeException( "Template file unavailable: 
[$fileName]" );
+   }
$template = file_get_contents( $fileName );
if ( $template === false ) {
throw new RuntimeException( "Template file unavailable: 
[$fileName]" );
diff --git a/tests/phpunit/MustacheFormTest.php 
b/tests/phpunit/MustacheFormTest.php
index ff1614d..6739ac8 100644
--- a/tests/phpunit/MustacheFormTest.php
+++ b/tests/phpunit/MustacheFormTest.php
@@ -25,6 +25,7 @@
protected $form;
protected $adapter;
protected $outputPage;
+   protected $gatewayPage;
 
public function setUp() {
$this->resetAllEnv();
@@ -90,10 +91,7 @@
$this->form = new Gateway_Form_Mustache();
$this->form->setGateway( $this->adapter );
$this->form->setGatewayPage( $this->gatewayPage );
-   // Suppress the error cos: we know.
-   $html = @$this->form->getForm();
-
-   $this->fail( 'I\'m not dead yet!' );
+   $this->form->getForm();
}
 
/**

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic2172eb0220a4b5cc0a5e5511318a35d755da1e9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DonationInterface
Gerrit-Branch: master
Gerrit-Owner: Ejegg 
Gerrit-Reviewer: AndyRussG 
Gerrit-Reviewer: Awight 
Gerrit-Reviewer: Cdentinger 
Gerrit-Reviewer: XenoRyet 
Gerrit-Reviewer: jenkins-bot <>

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


<    1   2   3   4   >