[MediaWiki-commits] [Gerrit] mediawiki...PageForms[master]: Adds ignorewarnings to SimpleUpload

2017-07-28 Thread Nischayn22 (Code Review)
Nischayn22 has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/368539 )

Change subject: Adds ignorewarnings to SimpleUpload
..

Adds ignorewarnings to SimpleUpload

Change-Id: Iad8967ef5f97aaae35f28152a9e342d87b79d22d
---
M libs/PF_simpleupload.js
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/PageForms 
refs/changes/39/368539/1

diff --git a/libs/PF_simpleupload.js b/libs/PF_simpleupload.js
index 1da6ee2..e22c922 100644
--- a/libs/PF_simpleupload.js
+++ b/libs/PF_simpleupload.js
@@ -38,6 +38,7 @@
var formdata = new FormData(); //see 
https://developer.mozilla.org/en-US/docs/Web/API/FormData/Using_FormData_Objects
formdata.append("action", "upload");
formdata.append("format", "json");
+   formdata.append("ignorewarnings", "true");
formdata.append("filename", fileName);
formdata.append("token", mw.user.tokens.get( 'editToken' ) );
formdata.append("file", fileToUpload);

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iad8967ef5f97aaae35f28152a9e342d87b79d22d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/PageForms
Gerrit-Branch: master
Gerrit-Owner: Nischayn22 

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


[MediaWiki-commits] [Gerrit] mediawiki...CentralAuth[master]: I'm not sure if the translations were left like that on purp...

2017-07-28 Thread Reception123 (Code Review)
Reception123 has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/368538 )

Change subject: I'm not sure if the translations were left like that on purpose 
but I think that it makes more sense to include "a" in front of a few words.
..

I'm not sure if the translations were left like that on purpose but I
think that it makes more sense to include "a" in front of a few words.

"Merge their account" - This one I think is especially confusing since
the command is not limited for someone to merge "their own" account, it
can be used for merging other accounts to, so I think that "an" account
works better.

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


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CentralAuth 
refs/changes/38/368538/1

diff --git a/i18n/en.json b/i18n/en.json
index a4717e6..eddf5c4 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -339,11 +339,11 @@
"centralauth-block-already-locked": "The account 
[[Special:CentralAuth/$1|$1]] is already locked globally.",
"centralauth-readonly": "CentralAuth database locked",
"centralauth-readonlytext": "The CentralAuth database is currently 
locked to new entries and other modifications, probably for routine database 
maintenance, after which it will be back to normal.",
-   "right-globalgroupmembership": "Edit membership to global groups",
-   "right-centralauth-unmerge": "Unmerge global account",
-   "right-centralauth-lock": "Lock or unlock global account",
-   "right-centralauth-oversight": "Suppress or hide global account",
-   "right-centralauth-merge": "Merge their account",
+   "right-globalgroupmembership": "Edit membership to a global groups",
+   "right-centralauth-unmerge": "Unmerge a global account",
+   "right-centralauth-lock": "Lock or unlock a global account",
+   "right-centralauth-oversight": "Suppress or hide a global account",
+   "right-centralauth-merge": "Merge an account",
"right-globalgrouppermissions": "Manage global groups",
"abusefilter-edit-builder-vars-global-user-groups": "Global groups that 
the user is in",
"action-centralauth-unmerge": "unmerge global accounts",

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9278fb7113400e19fbab7c378eced81ed9e299aa
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CentralAuth
Gerrit-Branch: master
Gerrit-Owner: Reception123 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Hide "hideuser" on Special:Block for non-infinite blocks

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

Change subject: Hide "hideuser" on Special:Block for non-infinite blocks
..


Hide "hideuser" on Special:Block for non-infinite blocks

Users with the hideuser right have an extra checkmark on Special:Block
to hide user, however this functionality can only be used on registered
users (not IPs) and only if a block is set to never expire. With this js
enhancement, hide the "hideuser" checkbox and label if the block time is
not set to infinite (either as selected from the dropdown or written
into the "other" input box).

Attribution to meta.wikimedia.org/wiki/User:Margott who uploaded a
draft for this patch on the task a while ago.

Bug: T133036
Change-Id: Ia8c3e25d923e1df57d5afd69e9de3d6f2543f628
---
M includes/GlobalFunctions.php
M resources/src/mediawiki.special/mediawiki.special.block.js
2 files changed, 18 insertions(+), 4 deletions(-)

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



diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php
index 92cb8d8..70784ba 100644
--- a/includes/GlobalFunctions.php
+++ b/includes/GlobalFunctions.php
@@ -3617,6 +3617,7 @@
  * @since 1.25
  */
 function wfIsInfinity( $str ) {
+   // These are hardcoded elsewhere in MediaWiki (e.g. 
mediawiki.special.block.js).
$infinityValues = [ 'infinite', 'indefinite', 'infinity', 'never' ];
return in_array( $str, $infinityValues );
 }
diff --git a/resources/src/mediawiki.special/mediawiki.special.block.js 
b/resources/src/mediawiki.special/mediawiki.special.block.js
index aca335e..8d88410 100644
--- a/resources/src/mediawiki.special/mediawiki.special.block.js
+++ b/resources/src/mediawiki.special/mediawiki.special.block.js
@@ -7,19 +7,30 @@
$anonOnlyRow = $( '#mw-input-wpHardBlock' ).closest( 
'tr' ),
$enableAutoblockRow = $( '#mw-input-wpAutoBlock' 
).closest( 'tr' ),
$hideUser = $( '#mw-input-wpHideUser' ).closest( 'tr' ),
-   $watchUser = $( '#mw-input-wpWatch' ).closest( 'tr' );
+   $watchUser = $( '#mw-input-wpWatch' ).closest( 'tr' ),
+   $expiry = $( '#mw-input-wpExpiry' ),
+   $otherExpiry = $( '#mw-input-wpExpiry-other' );
 
function updateBlockOptions( instant ) {
var blocktarget = $.trim( $blockTarget.val() ),
isEmpty = blocktarget === '',
isIp = mw.util.isIPAddress( blocktarget, true ),
-   isIpRange = isIp && blocktarget.match( /\/\d+$/ 
);
+   isIpRange = isIp && blocktarget.match( /\/\d+$/ 
),
+   isNonEmptyIp = isIp && !isEmpty,
+   expiryValue = $expiry.val(),
+   // infinityValues  are the values the 
SpecialBlock class accepts as infinity (sf. wfIsInfinity)
+   infinityValues = [ 'infinite', 'indefinite', 
'infinity', 'never' ],
+   isIndefinite = $.inArray( expiryValue, 
infinityValues ) !== -1 ||
+   ( expiryValue === 'other' && $.inArray( 
$otherExpiry.val(), infinityValues ) !== -1 );
 
-   if ( isIp && !isEmpty ) {
+   if ( isNonEmptyIp ) {
$enableAutoblockRow.goOut( instant );
-   $hideUser.goOut( instant );
} else {
$enableAutoblockRow.goIn( instant );
+   }
+   if ( isNonEmptyIp || !isIndefinite ) {
+   $hideUser.goOut( instant );
+   } else {
$hideUser.goIn( instant );
}
if ( !isIp && !isEmpty ) {
@@ -37,6 +48,8 @@
if ( $blockTarget.length ) {
// Bind functions so they're checked whenever stuff 
changes
$blockTarget.keyup( updateBlockOptions );
+   $expiry.change( updateBlockOptions );
+   $otherExpiry.keyup( updateBlockOptions );
 
// Call them now to set initial state (ie. 
Special:Block/Foobar?wpBlockExpiry=2+hours)
updateBlockOptions( /* instant= */ true );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia8c3e25d923e1df57d5afd69e9de3d6f2543f628
Gerrit-PatchSet: 8
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: EddieGP 
Gerrit-Reviewer: EddieGP 

[MediaWiki-commits] [Gerrit] labs...wikibugs2[master]: Add IRC channel feed for Anti-Harassment board

2017-07-28 Thread Kaldari (Code Review)
Kaldari has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/368537 )

Change subject: Add IRC channel feed for Anti-Harassment board
..

Add IRC channel feed for Anti-Harassment board

Change-Id: Ib46631c92dd5a8866d52caa12b752a4a0764d21b
---
M channels.yaml
1 file changed, 3 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/tools/wikibugs2 
refs/changes/37/368537/1

diff --git a/channels.yaml b/channels.yaml
index c2456df..e58a9b6 100644
--- a/channels.yaml
+++ b/channels.yaml
@@ -69,6 +69,9 @@
 - Community-Tech(-.*)?
 - Community-Wishlist-Survey
 
+"#wikimedia-anti-harassment-tools":
+- Anti-Harassment
+
 "#wikimedia-ed":
 - Education-.*
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib46631c92dd5a8866d52caa12b752a4a0764d21b
Gerrit-PatchSet: 1
Gerrit-Project: labs/tools/wikibugs2
Gerrit-Branch: master
Gerrit-Owner: Kaldari 

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


[MediaWiki-commits] [Gerrit] mediawiki...Vector[master]: Use makeListItem() for menu items rather than building HTML ...

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

Change subject: Use makeListItem() for menu items rather than building HTML by 
hand
..


Use makeListItem() for menu items rather than building HTML by hand

This affects the four tabs menus (namespaces, variants, views, actions).
Other menus (personal menu and sidebar) have already been using it.

We need some minor overrides to get the same results as the hand-built
HTML, but I think this still makes the code a lot nicer.

The output is the same as before, except for unimportant whitespace
differences and the order of some tag attributes.

I tested this with several extensions and configuration options that
mess with the tabs:
* $wgUsePigLatinVariant = true
* VisualEditor extension
* FileAnnotations extension
* FileExporter extension
* Viewing the page as administrator

Change-Id: I2d1255442abf5fa4bac2de1b084d0bcacbba7d0f
---
M VectorTemplate.php
1 file changed, 63 insertions(+), 97 deletions(-)

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



diff --git a/VectorTemplate.php b/VectorTemplate.php
index 6ae80e5..50c4439 100644
--- a/VectorTemplate.php
+++ b/VectorTemplate.php
@@ -33,50 +33,22 @@
 * Outputs the entire contents of the (X)HTML page
 */
public function execute() {
-   // Build additional attributes for navigation urls
-   $nav = $this->data['content_navigation'];
+   $this->data['namespace_urls'] = 
$this->data['content_navigation']['namespaces'];
+   $this->data['view_urls'] = 
$this->data['content_navigation']['views'];
+   $this->data['action_urls'] = 
$this->data['content_navigation']['actions'];
+   $this->data['variant_urls'] = 
$this->data['content_navigation']['variants'];
 
+   // Move the watch/unwatch star outside of the collapsed 
"actions" menu to the main "views" menu
if ( $this->config->get( 'VectorUseIconWatch' ) ) {
$mode = $this->getSkin()->getUser()->isWatched( 
$this->getSkin()->getRelevantTitle() )
? 'unwatch'
: 'watch';
 
-   if ( isset( $nav['actions'][$mode] ) ) {
-   $nav['views'][$mode] = $nav['actions'][$mode];
-   $nav['views'][$mode]['class'] = rtrim( 'icon ' 
. $nav['views'][$mode]['class'], ' ' );
-   $nav['views'][$mode]['primary'] = true;
-   unset( $nav['actions'][$mode] );
+   if ( isset( $this->data['action_urls'][$mode] ) ) {
+   $this->data['view_urls'][$mode] = 
$this->data['action_urls'][$mode];
+   unset( $this->data['action_urls'][$mode] );
}
}
-
-   $xmlID = '';
-   foreach ( $nav as $section => $links ) {
-   foreach ( $links as $key => $link ) {
-   if ( $section == 'views' && !( isset( 
$link['primary'] ) && $link['primary'] ) ) {
-   $link['class'] = rtrim( 'collapsible ' 
. $link['class'], ' ' );
-   }
-
-   $xmlID = isset( $link['id'] ) ? $link['id'] : 
'ca-' . $xmlID;
-   $nav[$section][$key]['attributes'] =
-   ' id="' . Sanitizer::escapeId( $xmlID ) 
. '"';
-   if ( $link['class'] ) {
-   $nav[$section][$key]['attributes'] .=
-   ' class="' . htmlspecialchars( 
$link['class'] ) . '"';
-   unset( $nav[$section][$key]['class'] );
-   }
-   if ( isset( $link['tooltiponly'] ) && 
$link['tooltiponly'] ) {
-   $nav[$section][$key]['key'] =
-   Linker::tooltip( $xmlID );
-   } else {
-   $nav[$section][$key]['key'] =
-   Xml::expandAttributes( 
Linker::tooltipAndAccesskeyAttribs( $xmlID ) );
-   }
-   }
-   }
-   $this->data['namespace_urls'] = $nav['namespaces'];
-   $this->data['view_urls'] = $nav['views'];
-   $this->data['action_urls'] = $nav['actions'];
-   $this->data['variant_urls'] = $nav['variants'];
 
// Reverse horizontally rendered navigation elements
if ( $this->data['rtl'] ) {
@@ -361,19 +333,10 @@

[MediaWiki-commits] [Gerrit] mediawiki...Quiz[master]: Add feedbackDisplay class to questions that have not been at...

2017-07-28 Thread Harjotsingh (Code Review)
Harjotsingh has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/368536 )

Change subject: Add feedbackDisplay class to questions that have not been 
attempted
..

Add feedbackDisplay class to questions that have not been attempted

Currently feedback is shown for all questions in a quiz even if
a question is answered or not.This change changes the way feedback
is handled by checking if a question has been attempted.It adds
feedbackDisplay class to not attempted question and uses CSS to hide/show
these questions.

Change-Id: Ibbff5e5c16ed4b3c94479cd1f2b545b918358b0b
---
M Question.php
M modules/ext.quiz.css
2 files changed, 39 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Quiz 
refs/changes/36/368536/1

diff --git a/Question.php b/Question.php
index 4868061..9080fbb 100644
--- a/Question.php
+++ b/Question.php
@@ -161,6 +161,9 @@
// Parameters used in some special cases.
$expectOn = 0;
$checkedCount = 0;
+   $signes = [];
+   $proposalCount = 0;
+   $attemptChecker = 0;
foreach ( $raws as $proposalId => $raw ) {
$text = null;
$colSpan = '';
@@ -198,6 +201,10 @@
$checked = $this->mBeingCorrected && 
$this->mRequest->getVal( $name ) == $value
? 'checked="checked"'
: null;
+   // Determine if the question has been 
attempted
+   $attemptChecker = ( 
$this->mBeingCorrected && !empty( $this->mRequest->getVal( $name ) ) )
+   ? 1
+   : 0;
// Determine the color of the cell and 
modify the state of the question.
switch ( $sign ) {
case '+':
@@ -260,7 +267,9 @@
$inputType . '" ' . $title . ' 
name="' . $name . '" value="' . $value .
'" ' . $checked . ' ' . 
$disabled . ' />';
$signesOutput .= '';
+   $signes[ $proposalCount ] = 
$signesOutput;
}
+   $proposalCount++;
if ( $typeId == 'sc' ) {
// A single choice object with no 
correct proposal is a syntax error.
if ( $expectOn == 0 ) {
@@ -268,6 +277,18 @@
}
$expectOn = 0;
}
+   }
+   }
+   $counter = 0;
+   foreach( $raws as $proposalId => $raw ) {
+   $text = null;
+   $colSpan = '';
+   $signesOutput = '';
+   $isProposal = 0;
+   if ( preg_match( $this->mProposalPattern, $raw, 
$matches ) ) {
+   $isProposal = 1;
+   $rawClass = 'proposal';
+   $text = array_pop( $matches );
// If the proposal text is empty, the question 
has a syntax error.
if ( trim( $text ) == '' ) {
$text = '???';
@@ -276,7 +297,8 @@
} elseif ( preg_match( $this->mCorrectionPattern, $raw, 
$matches ) &&
$this->mBeingCorrected
) {
-   $rawClass = 'correction';
+   $isProposal = 0;
+   $rawClass = $attemptChecker ? 'correction' : 
'correction feedbackDisplay';
$text = array_pop( $matches );
$signesOutput = '';
// Hacks to avoid counting the number of signes.
@@ -284,7 +306,12 @@
}
if ( $text ) {
$output .= '' . 
"\n";
-   $output .= $signesOutput;
+   if( $isProposal ) {
+   $output .= $signes[ $counter ];
+   $counter++;
+   } else {
+   $output .= $signesOutput;
+   }
$output .= '';
   

[MediaWiki-commits] [Gerrit] wikimedia...tools[master]: Fix exported values for contacts with no donations

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

Change subject: Fix exported values for contacts with no donations
..


Fix exported values for contacts with no donations

We were 'normalizing' to some very misleading data.

Bug: T171920
Change-Id: I03f362549707b21b1258af8733d6a84c4e343c44
---
M silverpop_export/tests/test_update.py
M silverpop_export/update_table.sql
2 files changed, 30 insertions(+), 4 deletions(-)

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



diff --git a/silverpop_export/tests/test_update.py 
b/silverpop_export/tests/test_update.py
index ef17da0..a15841c 100644
--- a/silverpop_export/tests/test_update.py
+++ b/silverpop_export/tests/test_update.py
@@ -64,6 +64,36 @@
 assert cursor.fetchone() == (1,)
 
 
+def test_no_donations():
+'''
+Test that we set the donation-related fields correctly when a contact has
+no donations.
+'''
+
+run_update_with_fixtures(fixture_queries=["""
+insert into civicrm_email (contact_id, email, is_primary, on_hold) values
+(1, 'person1@localhost', 1, 0);
+""", """
+insert into civicrm_contact (id) values
+(1);
+"""])
+
+cursor = conn.db_conn.cursor()
+cursor.execute("select has_recurred_donation, highest_usd_amount, " +
+   "highest_native_amount, highest_native_currency, " +
+   "highest_donation_date, lifetime_usd_total, " +
+   "donation_count, latest_currency, latest_native_amount, " +
+   "latest_usd_amount, latest_donation from silverpop_export")
+actual = cursor.fetchone()
+print(actual)
+expected = (0, Decimal('0.00'),
+Decimal('0.00'), None,
+None, Decimal('0.00'),
+0, None, Decimal('0.00'),
+Decimal('0.00'), None)
+assert actual == expected
+
+
 def test_refund_history():
 '''
 Test that we don't include refunded donations in a donor's history
diff --git a/silverpop_export/update_table.sql 
b/silverpop_export/update_table.sql
index fc0f563..7fb768a 100755
--- a/silverpop_export/update_table.sql
+++ b/silverpop_export/update_table.sql
@@ -294,13 +294,9 @@
 highest_usd_amount = 0,
 lifetime_usd_total = 0,
 donation_count = 0,
-latest_currency = 'USD',
 latest_native_amount = 0,
 latest_usd_amount = 0,
-latest_donation = NOW(),
-highest_native_currency = 'USD',
 highest_native_amount = 0,
-highest_donation_date = NOW(),
 has_recurred_donation = 0
   WHERE donation_count IS NULL AND opted_out = 0;
 UPDATE silverpop_export_staging SET country='US' where country IS NULL AND 
opted_out = 0;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I03f362549707b21b1258af8733d6a84c4e343c44
Gerrit-PatchSet: 2
Gerrit-Project: wikimedia/fundraising/tools
Gerrit-Branch: master
Gerrit-Owner: Ejegg 
Gerrit-Reviewer: Eileen 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: phpunit: Fix failing DeprecatedGlobalTest on HHVM at Travis CI

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

Change subject: phpunit: Fix failing DeprecatedGlobalTest on HHVM at Travis CI
..

phpunit: Fix failing DeprecatedGlobalTest on HHVM at Travis CI

Follows-up 1d77070f19e3. On Travis CI, this test fails on HHVM:

> There was 1 failure:
> 1) DeprecatedGlobalTest::testWarning
> Failed asserting that exception of type "PHPUnit_Framework_Error" is thrown.

I've been unable to reproduce this locally, but within Travis CI
it happens on both Trusty containers and Trusty VMs, no matter the
version of HHVM. After some trial and error, I narrowed it down
to the error_reporting setting, which presumably has a different default
in the HHVM package Travis CI uses.

Change-Id: I588218103d6c72df5ad4fb6289df688b3740233e
---
M tests/phpunit/includes/DeprecatedGlobalTest.php
1 file changed, 11 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/34/368534/1

diff --git a/tests/phpunit/includes/DeprecatedGlobalTest.php 
b/tests/phpunit/includes/DeprecatedGlobalTest.php
index 802f9b1..237e3fb 100644
--- a/tests/phpunit/includes/DeprecatedGlobalTest.php
+++ b/tests/phpunit/includes/DeprecatedGlobalTest.php
@@ -22,6 +22,17 @@
  * @covers DeprecatedGlobal
  */
 class DeprecatedGlobalTest extends MediaWikiTestCase {
+
+   public function setUp() {
+   parent::setUp();
+   $this->oldErrorLevel = error_reporting( -1 );
+   }
+
+   public function tearDown() {
+   error_reporting( $this->oldErrorLevel );
+   parent::tearDown();
+   }
+
public function testObjectDeStub() {
global $wgDummy;
 

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: build: Update Travis CI config to use fast Trusty containers

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

Change subject: build: Update Travis CI config to use fast Trusty containers
..

build: Update Travis CI config to use fast Trusty containers

We tried this before when Trusty containers were still in Beta,
but the issues we ran into at the time have since been fixed.

1. Missing package djvulibre-bin: Fixed.
   https://github.com/travis-ci/apt-package-whitelist/issues/4036

2. MySQL launch problems: Fixed
   https://github.com/travis-ci/travis-ci/issues/5837
   https://github.com/travis-ci/travis-ci/issues/6842

Also add HHVM 3.18 to the test matrix (latest currently preinstalled
version of HHVM).

Change-Id: I2f56e303c01f069207fb086e784e49292ea4eb58
---
M .travis.yml
1 file changed, 9 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/35/368535/1

diff --git a/.travis.yml b/.travis.yml
index 5e2c7a0..cde7193 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -7,11 +7,12 @@
 # complement that setup by testing MediaWiki on travis
 #
 language: php
-# Use the slower sudo-enabled VMs instead of fast containers:
-# - Package 'djvulibre-bin' is not yet whitelisted for trusty containers.
-#   https://github.com/travis-ci/apt-package-whitelist/issues/4036
-sudo: required
-# Use Trusty instead of Travis default (precise)
+
+
+# Use fast containers instead of the slower sudo-enabled VMs:
+sudo: false
+# Use Ubuntu 14 Trusty (not Ubuntu 12 Precise)
+# 
 # - Required in order to use HHVM 3.6 or higher.
 # - Required for non-buggy xml library for XmlTypeCheck/UploadBaseTest 
(T75176).
 dist: trusty
@@ -25,11 +26,12 @@
   php: 5.5
 - env: dbtype=postgres dbuser=travis
   php: 5.5
+# https://docs.travis-ci.com/user/languages/php#HHVM-versions
 - env: dbtype=mysql dbuser=root
-  # https://docs.travis-ci.com/user/languages/php#HHVM-versions
-  # https://github.com/travis-ci/travis-ci/issues/7368
   php: hhvm-3.12
 - env: dbtype=mysql dbuser=root
+  php: hhvm-3.18
+- env: dbtype=mysql dbuser=root
   php: 7
 
 services:

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...cxserver[master]: Adaptation code in cxserver and provide adaptation API - fra...

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

Change subject: Adaptation code in cxserver and provide adaptation API - 
framework
..


Adaptation code in cxserver and provide adaptation API - framework

This provides basic framwork for the adaptation of content including
machine translation. Real adaptation is to be done in follow up
commits.

A new api /translate/from/to is defined. That will provide machine
translation, adaptation of translation units. This output will be
readily usable in a target wiki domain. Previously with cxserver,
client side processing, adaptation was required to make the content
usable in target language wiki.

Bug: T170674
Change-Id: I92dba54620ba1be15c3fa3c89f7cf0888c9287ba
---
M .eslintrc.json
A lib/Adapter.js
M lib/lineardoc/Doc.js
M lib/lineardoc/TextBlock.js
M lib/routes/v1.js
A lib/translationunits/MWLink.js
A lib/translationunits/TranslationUnit.js
A lib/translationunits/index.js
M lib/util.js
M spec.yaml
A test/adaptation/AdaptationTest.js
A test/adaptation/AdaptationTests.json
12 files changed, 361 insertions(+), 6 deletions(-)

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



diff --git a/.eslintrc.json b/.eslintrc.json
index 1cc15b0..dbb2dc5 100644
--- a/.eslintrc.json
+++ b/.eslintrc.json
@@ -1,6 +1,7 @@
 {
"extends": "wikimedia",
"env": {
+   "es6": true,
"browser": true,
"jquery": true,
"qunit": true,
diff --git a/lib/Adapter.js b/lib/Adapter.js
new file mode 100644
index 000..315e12b
--- /dev/null
+++ b/lib/Adapter.js
@@ -0,0 +1,52 @@
+'use strict';
+
+var LinearDoc = require( './lineardoc' );
+
+function Adapter( sourceLanguage, targetLanguage, context ) {
+   this.parser = new LinearDoc.Parser();
+   this.parser.init();
+   this.sourceLanguage = sourceLanguage;
+   this.targetLanguage = targetLanguage;
+   this.originalDoc = null;
+   this.adaptedDoc = null;
+   this.context = context;
+   this.logger = context.logger;
+}
+
+Adapter.prototype.adapt = function ( content ) {
+   this.parser.write( content );
+   this.originalDoc = this.parser.builder.doc;
+   return this.originalDoc.adapt( this.getAdapter.bind( this ) );
+};
+
+/**
+ * Get the adapter for the given tag(translation unit).
+ * @param {Object} element
+ * @return {TranslationUnit}
+ */
+Adapter.prototype.getAdapter = function ( element ) {
+   var name, match = false, translationUnit, translationUnits;
+
+   translationUnits = require( __dirname + '/translationunits/' );
+   for ( name in translationUnits ) {
+   translationUnit = translationUnits[ name ];
+   if ( translationUnit.matchTagNames ) {
+   match = translationUnit.matchTagNames.includes( 
element.name );
+   }
+   if ( translationUnit.matchRdfaTypes ) {
+   match = translationUnit.matchRdfaTypes.includes( 
element.attributes.rel ) || translationUnit.matchRdfaTypes.includes( 
element.attributes.typeof );
+   }
+   if ( match ) {
+   break;
+   }
+   }
+
+   if ( !match ) {
+   // this.logger.log( 'debug', 'No adapter for ' + element.name );
+   return null;
+   }
+
+   return new translationUnits[ name ]( element, this.sourceLanguage, 
this.targetLanguage, this.context );
+};
+
+module.exports = Adapter;
diff --git a/lib/lineardoc/Doc.js b/lib/lineardoc/Doc.js
index a5d1661..e9f4157 100644
--- a/lib/lineardoc/Doc.js
+++ b/lib/lineardoc/Doc.js
@@ -1,6 +1,5 @@
-'use strict';
-
 var Utils = require( './Utils.js' ),
+   cxutil = require( './../util.js' ),
crypto = require( 'crypto' );
 
 /**
@@ -251,4 +250,47 @@
return segments;
 };
 
+/**
+ * Segment the document into sentences
+ *
+ * @method
+ * @param {Function} getAdapter Function taking a tag, returning adapted output
+ * @return {Doc} Segmented version of document TODO: warning: *shallow copied*.
+ */
+Doc.prototype.adapt = cxutil.async( function* ( getAdapter ) {
+   var i, len, item, tag, textBlock, adapter,
+   newDoc = new Doc();
+
+   if ( this.wrapperTag ) {
+   adapter = getAdapter( this.wrapperTag );
+   if ( adapter ) {
+   newDoc = new Doc( yield adapter.adapt() );
+   }
+   }
+   for ( i = 0, len = this.items.length; i < len; i++ ) {
+   item = this.items[ i ];
+   if ( this.items[ i ].type === 'open' ) {
+   tag = Utils.cloneOpenTag( item.item );
+   if ( i + 1 < len && this.items[ i + 1 ].type === 
'textblock' ) {
+   tag.children = this.items[ i + 1 ].item;
+   }
+   adapter = 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: RCFilters: Make 'related links' collapsible

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

Change subject: RCFilters: Make 'related links' collapsible
..


RCFilters: Make 'related links' collapsible

Bug: T166919
Change-Id: I89d69c6614f641ac92143f0b1a718145e9cd61bd
---
M includes/specials/SpecialRecentchanges.php
M languages/i18n/en.json
M languages/i18n/qqq.json
M resources/Resources.php
M resources/src/mediawiki.rcfilters/mw.rcfilters.init.js
M resources/src/mediawiki.rcfilters/styles/mw.rcfilters.less
M 
resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.FilterWrapperWidget.less
M resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterWrapperWidget.js
8 files changed, 125 insertions(+), 28 deletions(-)

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



diff --git a/includes/specials/SpecialRecentchanges.php 
b/includes/specials/SpecialRecentchanges.php
index f0c2bc4..f9052ad 100644
--- a/includes/specials/SpecialRecentchanges.php
+++ b/includes/specials/SpecialRecentchanges.php
@@ -718,17 +718,35 @@
 
$message = $this->msg( 'recentchangestext' 
)->inContentLanguage();
if ( !$message->isDisabled() ) {
-   $this->getOutput()->addWikiText(
-   Html::rawElement( 'div',
-   [
-   'class' => 
'mw-recentchanges-toplinks',
-   'lang' => 
$wgContLang->getHtmlCode(),
-   'dir' => $wgContLang->getDir()
-   ],
-   "\n" . $message->plain() . "\n"
-   ),
-   /* $lineStart */ true,
-   /* $interface */ false
+   $content = $message->parse();
+
+   $langAttributes = [
+   'lang' => $wgContLang->getHtmlCode(),
+   'dir' => $wgContLang->getDir(),
+   ];
+
+   $topLinksAttributes = [ 'class' => 
'mw-recentchanges-toplinks' ];
+
+   if ( $this->getUser()->getOption( 'rcenhancedfilters' ) 
) {
+   $contentTitle = Html::rawElement( 'div',
+   [ 'class' => 
'mw-recentchanges-toplinks-title' ],
+   $this->msg( 
'rcfilters-other-review-tools' )->parse()
+   );
+   $contentWrapper = Html::rawElement( 'div',
+   array_merge( [ 'class' => 
'mw-collapsible-content' ], $langAttributes ),
+   $content
+   );
+   $content = $contentTitle . $contentWrapper;
+   } else {
+   // Language direction should be on the top div 
only
+   // if the title is not there. If it is there, 
it's
+   // interface direction, and the language/dir 
attributes
+   // should be on the content itself
+   $topLinksAttributes = array_merge( 
$topLinksAttributes, $langAttributes );
+   }
+
+   $this->getOutput()->addHTML(
+   Html::rawElement( 'div', $topLinksAttributes, 
$content )
);
}
}
diff --git a/languages/i18n/en.json b/languages/i18n/en.json
index 2f09573..b51738e 100644
--- a/languages/i18n/en.json
+++ b/languages/i18n/en.json
@@ -1350,6 +1350,7 @@
"recentchanges-legend-plusminus": "(±123)",
"recentchanges-submit": "Show",
"rcfilters-legend-heading": "List of abbreviations:",
+   "rcfilters-other-review-tools": "Other review tools:",
"rcfilters-activefilters": "Active filters",
"rcfilters-advancedfilters": "Advanced filters",
"rcfilters-limit-title": "Changes to show",
diff --git a/languages/i18n/qqq.json b/languages/i18n/qqq.json
index c0d6ad5..66c3c4d 100644
--- a/languages/i18n/qqq.json
+++ b/languages/i18n/qqq.json
@@ -1540,6 +1540,7 @@
"recentchanges-legend-plusminus": "{{optional}}\nA plus/minus sign with 
a number for the legend.",
"recentchanges-submit": "Label for submit button in 
[[Special:RecentChanges]]\n{{Identical|Show}}",
"rcfilters-legend-heading": "Used as a heading for legend box on 
[[Special:RecentChanges]] and [[Special:Watchlist]] when RCFilters are 
enabled.",
+   "rcfilters-other-review-tools": "Used as a heading for the community 
collection of other links on [[Special:RecentChanges]] when RCFilters are 
enabled.",

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Follow-up 0b3ea6e1ab: use more flexible regex for timestamp ...

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

Change subject: Follow-up 0b3ea6e1ab: use more flexible regex for timestamp in 
ChangesListSpecialPageTest
..


Follow-up 0b3ea6e1ab: use more flexible regex for timestamp in 
ChangesListSpecialPageTest

Postgres uses timestamps like "2017-07-28 17:37:03" that aren't all numbers.

Bug: T75174
Change-Id: I1b65578c955ccdce1060783b06c2ca577796e68f
---
M tests/phpunit/includes/specialpage/ChangesListSpecialPageTest.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/tests/phpunit/includes/specialpage/ChangesListSpecialPageTest.php 
b/tests/phpunit/includes/specialpage/ChangesListSpecialPageTest.php
index 4070bc0..f494785 100644
--- a/tests/phpunit/includes/specialpage/ChangesListSpecialPageTest.php
+++ b/tests/phpunit/includes/specialpage/ChangesListSpecialPageTest.php
@@ -474,7 +474,7 @@
$conds = $this->buildQuery( [ 'userExpLevel' => 
'unregistered;experienced' ] );
 
$this->assertRegExp(
-   '/\(rc_user = 0\) OR \(\(user_editcount >= 500\) AND 
\(user_registration <= \'\d+\'\)\)/',
+   '/\(rc_user = 0\) OR \(\(user_editcount >= 500\) AND 
\(user_registration <= \'[^\']+\'\)\)/',
reset( $conds ),
"rc conditions: userExpLevel=unregistered;experienced"
);

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1b65578c955ccdce1060783b06c2ca577796e68f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: 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...GlobalPreferences[master]: WIP: polishing

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

Change subject: WIP: polishing
..

WIP: polishing

Change-Id: Ic480709d79befb78f1b122fa71c7698129da2b16
---
D GlobalPreferences.php
M extension.json
R includes/GlobalPreferences.php
R includes/Hooks.php
R includes/SpecialGlobalPreferences.php
A tests/phan/config.php
A tests/phan/issues/.gitkeep
A tests/phan/stubs/.gitkeep
8 files changed, 188 insertions(+), 65 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/GlobalPreferences 
refs/changes/33/368533/1

diff --git a/GlobalPreferences.php b/GlobalPreferences.php
deleted file mode 100644
index f8a5505..000
--- a/GlobalPreferences.php
+++ /dev/null
@@ -1,27 +0,0 @@
-
- * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 
2.0 or later
- * @file
- * @ingroup Extensions
- *
- * Partially based off of work by Werdna
- * https://www.mediawiki.org/wiki/Special:Code/MediaWiki/49790
- */
-
-if ( function_exists( 'wfLoadExtension' ) ) {
-   wfLoadExtension( 'GlobalPreferences' );
-   // Keep i18n globals so mergeMessageFileList.php doesn't break
-   $wgMessagesDirs['GlobalPreferences'] = __DIR__ . '/i18n';
-   $wgExtensionMessagesFiles['GlobalPreferencesAlias'] = __DIR__ . 
'/GlobalPreferences.alias.php';
-   wfWarn(
-   'Deprecated PHP entry point used for GlobalPreferences 
extension. Please use wfLoadExtension instead, ' .
-   'see https://www.mediawiki.org/wiki/Extension_registration for 
more details.'
-   );
-   return true;
-} else {
-   die( 'This version of the GlobalPreferences extension requires 
MediaWiki 1.25+' );
-}
\ No newline at end of file
diff --git a/extension.json b/extension.json
index 58a4dd7..e5c6ac8 100644
--- a/extension.json
+++ b/extension.json
@@ -12,7 +12,7 @@
"GlobalPreferencesDB": null
},
"SpecialPages": {
-   "GlobalPreferences": "SpecialGlobalPreferences"
+   "GlobalPreferences": 
"GlobalPreferences\\SpecialGlobalPreferences"
},
"MessagesDirs": {
"GlobalPreferences": [
@@ -23,26 +23,26 @@
"GlobalPreferencesAlias": "GlobalPreferences.alias.php"
},
"AutoloadClasses": {
-   "GlobalPreferences": "GlobalPreferences.body.php",
-   "GlobalPreferencesHooks": "GlobalPreferences.hooks.php",
-   "SpecialGlobalPreferences": "SpecialGlobalPreferences.php"
+   "GlobalPreferences\\GlobalPreferences": 
"includes/GlobalPreferences.php",
+   "GlobalPreferences\\Hooks": "includes/Hooks.php",
+   "GlobalPreferences\\SpecialGlobalPreferences": 
"includes/SpecialGlobalPreferences.php"
},
"Hooks": {
"UserLoadOptions": [
-   "GlobalPreferencesHooks::onUserLoadOptions"
+   "GlobalPreferences\\Hooks::onUserLoadOptions"
],
"UserSaveOptions": [
-   "GlobalPreferencesHooks::onUserSaveOptions"
+   "GlobalPreferences\\Hooks::onUserSaveOptions"
],
"PreferencesFormPreSave": [
-   "GlobalPreferencesHooks::onPreferencesFormPreSave"
+   "GlobalPreferences\\Hooks::onPreferencesFormPreSave"
],
"LoadExtensionSchemaUpdates": [
-   "GlobalPreferencesHooks::onLoadExtensionSchemaUpdates"
+   "GlobalPreferences\\Hooks::onLoadExtensionSchemaUpdates"
]
},
"ExtensionFunctions": [
-   "GlobalPreferencesHooks::onExtensionFunctions"
+   "GlobalPreferences\\Hooks::onExtensionFunctions"
],
"ResourceFileModulePaths": {
"localBasePath": "resources",
diff --git a/GlobalPreferences.body.php b/includes/GlobalPreferences.php
similarity index 82%
rename from GlobalPreferences.body.php
rename to includes/GlobalPreferences.php
index aa7fc53..630fcdd 100644
--- a/GlobalPreferences.body.php
+++ b/includes/GlobalPreferences.php
@@ -10,16 +10,25 @@
  * Partially based off of work by Werdna
  * https://www.mediawiki.org/wiki/Special:Code/MediaWiki/49790
  */
+
+namespace GlobalPreferences;
+
+use CentralIdLookup;
+use IContextSource;
+use RequestContext;
+use Wikimedia\Rdbms\Database;
+use User;
+
 class GlobalPreferences {
 
/**
 * @param int $type one of the DB_* constants
 * @return Database
 */
-   public static function getPrefsDB( $type = DB_SLAVE ) {
+   public static function getPrefsDB( $type = DB_REPLICA ) {
global $wgGlobalPreferencesDB;
if ( $wgGlobalPreferencesDB ) {
-   return wfGetDB( $type, array(), $wgGlobalPreferencesDB 
);
+   return wfGetDB( 

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

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

Change subject: Update GUI
..


Update GUI

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

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



diff --git a/gui b/gui
index 3dbd85e..9e444d5 16
--- a/gui
+++ b/gui
@@ -1 +1 @@
-Subproject commit 3dbd85e51f9e8bc4fdc232fe1e6d92f7d137e3d0
+Subproject commit 9e444d5d4a84aeae56547b6ecf96899fac788813

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

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

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


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

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

Change subject: Merging from 9e444d5d4a84aeae56547b6ecf96899fac788813:
..


Merging from 9e444d5d4a84aeae56547b6ecf96899fac788813:

Merge "Allow line breaking at underscores in variables"

Change-Id: I62dcb5400ffb2c011b0a30de3aa5f5dbf51d2cd3
---
R css/embed.style.min.8f09c8a5c990652e49cd.css
R css/style.min.53c419f2797b475464da.css
M embed.html
M i18n/bn.json
M i18n/br.json
M i18n/csb.json
M i18n/de.json
M i18n/eu.json
M i18n/fr.json
M i18n/gl.json
M i18n/hans.json
M i18n/hant.json
M i18n/he.json
M i18n/ko.json
M i18n/mk.json
M i18n/nl.json
M i18n/pl.json
M i18n/ru.json
M i18n/sv.json
M i18n/tara.json
M i18n/tarask.json
M index.html
R js/embed.wdqs.min.0e621e4cecc2014874a5.js
A js/wdqs.min.8a4ad15fdf185c210fb2.js
D js/wdqs.min.f8a09d2d39063d3c8e20.js
25 files changed, 25 insertions(+), 25 deletions(-)

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




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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Follow-up 0b3ea6e1ab: use more flexible regex for timestamp ...

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

Change subject: Follow-up 0b3ea6e1ab: use more flexible regex for timestamp in 
ChangesListSpecialPageTest
..

Follow-up 0b3ea6e1ab: use more flexible regex for timestamp in 
ChangesListSpecialPageTest

Postgres uses timestamps like "2017-07-28 17:37:03" that aren't all numbers.

Bug: T75174
Change-Id: I1b65578c955ccdce1060783b06c2ca577796e68f
---
M tests/phpunit/includes/specialpage/ChangesListSpecialPageTest.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/32/368532/1

diff --git a/tests/phpunit/includes/specialpage/ChangesListSpecialPageTest.php 
b/tests/phpunit/includes/specialpage/ChangesListSpecialPageTest.php
index 4070bc0..f494785 100644
--- a/tests/phpunit/includes/specialpage/ChangesListSpecialPageTest.php
+++ b/tests/phpunit/includes/specialpage/ChangesListSpecialPageTest.php
@@ -474,7 +474,7 @@
$conds = $this->buildQuery( [ 'userExpLevel' => 
'unregistered;experienced' ] );
 
$this->assertRegExp(
-   '/\(rc_user = 0\) OR \(\(user_editcount >= 500\) AND 
\(user_registration <= \'\d+\'\)\)/',
+   '/\(rc_user = 0\) OR \(\(user_editcount >= 500\) AND 
\(user_registration <= \'[^\']+\'\)\)/',
reset( $conds ),
"rc conditions: userExpLevel=unregistered;experienced"
);

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...CentralNotice[master]: Add ext.centralNotice.adminUi module back to campaign list view

2017-07-28 Thread AndyRussG (Code Review)
AndyRussG has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/368531 )

Change subject: Add ext.centralNotice.adminUi module back to campaign list view
..

Add ext.centralNotice.adminUi module back to campaign list view

Module handles controls to add a campaign, which appear at the bottom of the 
list. This
code was removed from this view by mistake in Id03d141775c.

Bug: T172023
Change-Id: Ic6e768024337eebfb4fbacd0dad495d698e38e8b
---
M special/SpecialCentralNotice.php
1 file changed, 1 insertion(+), 0 deletions(-)


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

diff --git a/special/SpecialCentralNotice.php b/special/SpecialCentralNotice.php
index 88f56de..79b9039 100644
--- a/special/SpecialCentralNotice.php
+++ b/special/SpecialCentralNotice.php
@@ -110,6 +110,7 @@
$this->outputEnclosingDivStartTag();
 
$out = $this->getOutput();
+   $out->addModules( 'ext.centralNotice.adminUi' );
 
$out->addHTML( Xml::element( 'h2',
[ 'class' => 'cn-special-section' ],

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: releases: add a MOTD warning based on active/passive server

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

Change subject: releases: add a MOTD warning based on active/passive server
..


releases: add a MOTD warning based on active/passive server

Warn users which server is currently the "active" one (the service
is active-active from http/cache::misc point of view but this is
about rsyncing data between them).

One server has to be the place to upload to and sync to the other one.

Change-Id: I5121ac968d002d959ec4c8c59a5847415f09f0de
---
M modules/profile/manifests/releases/reprepro.pp
1 file changed, 13 insertions(+), 0 deletions(-)

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



diff --git a/modules/profile/manifests/releases/reprepro.pp 
b/modules/profile/manifests/releases/reprepro.pp
index 2a9f805..62758d7 100644
--- a/modules/profile/manifests/releases/reprepro.pp
+++ b/modules/profile/manifests/releases/reprepro.pp
@@ -19,4 +19,17 @@
   dest_host   => $passive_server,
   module_path => '/srv/org/wikimedia/reprepro',
 }
+
+if $::fqdn == $active_server {
+$motd_content = "#!/bin/sh\necho \"This is the active releases server 
and the rsync source for other servers.\nThis is the right place to upload.\""
+} else {
+$motd_content = "#!/bin/sh\necho \"This is the NOT the active releases 
server and an rsync destination.\nDO NOT UPLOAD HERE. Go to ${active_server} 
instead.\""
+}
+
+@motd::script { 'releases':
+ensure   => present,
+priority => 06,
+content  => $motd_content,
+tag  => 'releases-motd',
+}
 }

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

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

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


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

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

Change subject: Update GUI
..

Update GUI

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


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

diff --git a/gui b/gui
index 3dbd85e..9e444d5 16
--- a/gui
+++ b/gui
@@ -1 +1 @@
-Subproject commit 3dbd85e51f9e8bc4fdc232fe1e6d92f7d137e3d0
+Subproject commit 9e444d5d4a84aeae56547b6ecf96899fac788813

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I62f03a4253115f6e1a244423bcd9ceea5eede594
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] operations/puppet[production]: releases: add a MOTD warning based on active/passive server

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

Change subject: releases: add a MOTD warning based on active/passive server
..

releases: add a MOTD warning based on active/passive server

Warn users which server is currently the "active" one (the service
is active-active from http/cache::misc point of view but this is
about rsyncing data between them).  One has to be the place to upload
to and sync to the other one.

Change-Id: I5121ac968d002d959ec4c8c59a5847415f09f0de
---
M modules/profile/manifests/releases/reprepro.pp
1 file changed, 13 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/29/368529/1

diff --git a/modules/profile/manifests/releases/reprepro.pp 
b/modules/profile/manifests/releases/reprepro.pp
index 2a9f805..004da38 100644
--- a/modules/profile/manifests/releases/reprepro.pp
+++ b/modules/profile/manifests/releases/reprepro.pp
@@ -19,4 +19,17 @@
   dest_host   => $passive_server,
   module_path => '/srv/org/wikimedia/reprepro',
 }
+
+if $::fqdn != $active_server {
+$motd_content = "#!/bin/sh\necho \"This is the active releases server 
and the rsync source for other servers.\nThis is the right place to upload.\""
+} else {
+$motd_content = "#!/bin/sh\necho \"This is the NOT the active releases 
server and an rsync destination.\nDO NOT UPLOAD HERE. Go to $active_server 
instead.\""
+}
+
+@motd::script { 'releases':
+ensure   => present,
+priority => 06,
+content  => $motd_content,
+tag  => 'releases-motd',
+}
 }

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: RCFilters: Create a sticky preference for days/limit groups

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

Change subject: RCFilters: Create a sticky preference for days/limit groups
..


RCFilters: Create a sticky preference for days/limit groups

- Add sticky preference for groups and the operation behind
  it.
- Allow normalization from the UriProcessor
- Backwards-compatibility for saved queries
- Allow saved queries to load regardless of sticky params
  and to be compared correctly without the sticky params.
- Add days/limit preferences and update those on change
- Update the preference even if we received a new value
  from the URL.

Bug: T171514
Bug: T171368
Change-Id: I5232f3372f0e5c981332d152faf0ab47cc470b56
---
M includes/Preferences.php
M resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.FilterGroup.js
M resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.FiltersViewModel.js
M resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.ItemModel.js
M resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.SavedQueriesModel.js
M resources/src/mediawiki.rcfilters/mw.rcfilters.Controller.js
M resources/src/mediawiki.rcfilters/mw.rcfilters.UriProcessor.js
M 
resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.ChangesLimitButtonWidget.js
M resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.DateButtonWidget.js
M tests/qunit/suites/resources/mediawiki.rcfilters/dm.FiltersViewModel.test.js
10 files changed, 277 insertions(+), 96 deletions(-)

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



diff --git a/includes/Preferences.php b/includes/Preferences.php
index 7efbef1..de6d681 100644
--- a/includes/Preferences.php
+++ b/includes/Preferences.php
@@ -918,6 +918,9 @@
$defaultPreferences['rcfilters-saved-queries'] = [
'type' => 'api',
];
+   $defaultPreferences['rcfilters-rclimit'] = [
+   'type' => 'api',
+   ];
 
if ( $config->get( 'RCWatchCategoryMembership' ) ) {
$defaultPreferences['hidecategorization'] = [
diff --git 
a/resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.FilterGroup.js 
b/resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.FilterGroup.js
index 7849cc2..5cca5d8 100644
--- a/resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.FilterGroup.js
+++ b/resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.FilterGroup.js
@@ -11,6 +11,8 @@
 * @cfg {string} [type='send_unselected_if_any'] Group type
 * @cfg {string} [view='default'] Name of the display group this group
 *  is a part of.
+* @cfg {boolean} [isSticky] This group is using a 'sticky' default; 
meaning
+*  that every time a value is changed, it becomes the new default
 * @cfg {string} [title] Group title
 * @cfg {boolean} [hidden] This group is hidden from the regular menu 
views
 * @cfg {boolean} [allowArbitrary] Allows for an arbitrary value to be 
added to the
@@ -38,6 +40,7 @@
this.name = name;
this.type = config.type || 'send_unselected_if_any';
this.view = config.view || 'default';
+   this.sticky = !!config.isSticky;
this.title = config.title || name;
this.hidden = !!config.hidden;
this.allowArbitrary = !!config.allowArbitrary;
@@ -90,7 +93,6 @@
var subsetNames = [],
filterItem = new mw.rcfilters.dm.FilterItem( 
filter.name, model, {
group: model.getName(),
-   useDefaultAsBaseValue: 
!!filter.useDefaultAsBaseValue,
label: filter.label || filter.name,
description: filter.description || '',
labelPrefixKey: model.labelPrefixKey,
@@ -175,31 +177,31 @@
// For this group, the parameter is the group name,
// and a single item can be selected: default or first 
item
this.defaultParams[ this.getName() ] = defaultParam;
-
-   // Single option means there must be a single option
-   // selected, so we have to either select the default
-   // or select the first option
-   this.selectItemByParamName( defaultParam );
}
 
// Store default filter state based on default params
this.defaultFilters = this.getFilterRepresentation( 
this.getDefaultParams() );
 
// Check for filters that should be initially selected by their 
default value
-   this.getItems().forEach( function ( item ) {
-   if (
-   item.isUsingDefaultAsBaseValue() &&

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Follow-up to '3D' file type addition

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

Change subject: Follow-up to '3D' file type addition
..


Follow-up to '3D' file type addition

Based on feedback on Id78a504302fa664b353a4c45bdc5d99f95a0180a

Bug: T157348
Change-Id: Id6bfe8d20307f62e4673a5ef30e79f164b1ea034
---
M includes/installer/MssqlUpdater.php
M includes/installer/MysqlUpdater.php
M includes/installer/PostgresUpdater.php
M includes/installer/SqliteUpdater.php
A maintenance/mssql/archives/patch-add-3d.sql
M maintenance/mssql/tables.sql
A maintenance/postgres/archives/patch-add-3d.sql
M maintenance/postgres/tables.sql
A maintenance/sqlite/archives/patch-add-3d.sql
9 files changed, 293 insertions(+), 5 deletions(-)

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



diff --git a/includes/installer/MssqlUpdater.php 
b/includes/installer/MssqlUpdater.php
index 1a9915d..b4de44d 100644
--- a/includes/installer/MssqlUpdater.php
+++ b/includes/installer/MssqlUpdater.php
@@ -101,6 +101,9 @@
[ 'addField', 'externallinks', 'el_index_60', 
'patch-externallinks-el_index_60.sql' ],
[ 'dropIndex', 'oldimage', 'oi_name_archive_name',
'patch-alter-table-oldimage.sql' ],
+
+   // 1.30
+   [ 'modifyField', 'image', 'img_media_type', 
'patch-add-3d.sql' ],
];
}
 
diff --git a/includes/installer/MysqlUpdater.php 
b/includes/installer/MysqlUpdater.php
index adfe2f6..b4ae1dd 100644
--- a/includes/installer/MysqlUpdater.php
+++ b/includes/installer/MysqlUpdater.php
@@ -301,6 +301,8 @@
[ 'dropIndex', 'user_groups', 'ug_user_group', 
'patch-user_groups-primary-key.sql' ],
[ 'addField', 'user_groups', 'ug_expiry', 
'patch-user_groups-ug_expiry.sql' ],
[ 'addIndex', 'image', 'img_user_timestamp', 
'patch-image-user-index-2.sql' ],
+
+   // 1.30
[ 'modifyField', 'image', 'img_media_type', 
'patch-add-3d.sql' ],
];
}
diff --git a/includes/installer/PostgresUpdater.php 
b/includes/installer/PostgresUpdater.php
index 0172f1a..d8db6a2 100644
--- a/includes/installer/PostgresUpdater.php
+++ b/includes/installer/PostgresUpdater.php
@@ -452,6 +452,9 @@
[ 'addPgIndex', 'externallinks', 'el_from_index_60', '( 
el_from, el_index_60, el_id )' ],
[ 'addPgField', 'user_groups', 'ug_expiry', 
"TIMESTAMPTZ NULL" ],
[ 'addPgIndex', 'user_groups', 'user_groups_expiry', '( 
ug_expiry )' ],
+
+   // 1.30
+   [ 'modifyField', 'image', 'img_media_type', 
'patch-add-3d.sql' ],
];
}
 
diff --git a/includes/installer/SqliteUpdater.php 
b/includes/installer/SqliteUpdater.php
index 9c90283..46e3e7e 100644
--- a/includes/installer/SqliteUpdater.php
+++ b/includes/installer/SqliteUpdater.php
@@ -165,6 +165,9 @@
[ 'addField', 'externallinks', 'el_index_60', 
'patch-externallinks-el_index_60.sql' ],
[ 'addField', 'user_groups', 'ug_expiry', 
'patch-user_groups-ug_expiry.sql' ],
[ 'addIndex', 'image', 'img_user_timestamp', 
'patch-image-user-index-2.sql' ],
+
+   // 1.30
+   [ 'modifyField', 'image', 'img_media_type', 
'patch-add-3d.sql' ],
];
}
 
diff --git a/maintenance/mssql/archives/patch-add-3d.sql 
b/maintenance/mssql/archives/patch-add-3d.sql
new file mode 100644
index 000..51d2775
--- /dev/null
+++ b/maintenance/mssql/archives/patch-add-3d.sql
@@ -0,0 +1,27 @@
+ALTER TABLE /*$wgDBprefix*/image
+   DROP CONSTRAINT img_media_type_ckc;
+
+ALTER TABLE /*$wgDBprefix*/image
+   ADD CONSTRAINT img_media_type_ckc
+   CHECK (img_media_type IN("UNKNOWN", "BITMAP", "DRAWING", "AUDIO", 
"VIDEO", "MULTIMEDIA", "OFFICE", "TEXT", "EXECUTABLE", "ARCHIVE", "3D"));
+
+ALTER TABLE /*$wgDBprefix*/oldimage
+   DROP CONSTRAINT oi_media_type_ckc;
+
+ALTER TABLE /*$wgDBprefix*/oldimage
+   ADD CONSTRAINT oi_media_type_ckc
+   CHECK (oi_media_type IN("UNKNOWN", "BITMAP", "DRAWING", "AUDIO", 
"VIDEO", "MULTIMEDIA", "OFFICE", "TEXT", "EXECUTABLE", "ARCHIVE", "3D"));
+
+ALTER TABLE /*$wgDBprefix*/filearchive
+   DROP CONSTRAINT fa_media_type_ckc;
+
+ALTER TABLE /*$wgDBprefix*/filearchive
+   ADD CONSTRAINT fa_media_type_ckc
+   CHECK (fa_media_type IN("UNKNOWN", "BITMAP", "DRAWING", "AUDIO", 
"VIDEO", "MULTIMEDIA", "OFFICE", "TEXT", "EXECUTABLE", "ARCHIVE", "3D"));
+
+ALTER TABLE /*$wgDBprefix*/uploadstash
+   DROP CONSTRAINT us_media_type_ckc;
+
+ALTER TABLE /*$wgDBprefix*/uploadstash
+   ADD CONSTRAINT us_media_type_ckc
+   CHECK (us_media_type IN("UNKNOWN", "BITMAP", 

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

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

Change subject: Merging from 9e444d5d4a84aeae56547b6ecf96899fac788813:
..

Merging from 9e444d5d4a84aeae56547b6ecf96899fac788813:

Merge "Allow line breaking at underscores in variables"

Change-Id: I62dcb5400ffb2c011b0a30de3aa5f5dbf51d2cd3
---
R css/embed.style.min.8f09c8a5c990652e49cd.css
R css/style.min.53c419f2797b475464da.css
M embed.html
M i18n/bn.json
M i18n/br.json
M i18n/csb.json
M i18n/de.json
M i18n/eu.json
M i18n/fr.json
M i18n/gl.json
M i18n/hans.json
M i18n/hant.json
M i18n/he.json
M i18n/ko.json
M i18n/mk.json
M i18n/nl.json
M i18n/pl.json
M i18n/ru.json
M i18n/sv.json
M i18n/tara.json
M i18n/tarask.json
M index.html
R js/embed.wdqs.min.0e621e4cecc2014874a5.js
A js/wdqs.min.8a4ad15fdf185c210fb2.js
D js/wdqs.min.f8a09d2d39063d3c8e20.js
25 files changed, 25 insertions(+), 25 deletions(-)


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


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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Update wikimedia/relpath from 1.0.3 -> 2.0.0

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

Change subject: Update wikimedia/relpath from 1.0.3 -> 2.0.0
..


Update wikimedia/relpath from 1.0.3 -> 2.0.0

* (4f670afd92) Normalize leading path separator to forward slash
   Fixes Windows compatibility.
* (b0eeb17d31) Drop support for PHP 5.3 and PHP 5.4.

Depends-On: I98eb809ff72c4d09bfbb89a9dad9bc7094868240
Change-Id: I4111af30dfbfe2c72d52325bbd1923773e3b4202
---
M composer.json
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/composer.json b/composer.json
index d04e9f5..aefc158 100644
--- a/composer.json
+++ b/composer.json
@@ -37,7 +37,7 @@
"wikimedia/html-formatter": "1.0.1",
"wikimedia/ip-set": "1.1.0",
"wikimedia/php-session-serializer": "1.0.4",
-   "wikimedia/relpath": "1.0.3",
+   "wikimedia/relpath": "2.0.0",
"wikimedia/remex-html": "1.0.1",
"wikimedia/running-stat": "1.1.0",
"wikimedia/scoped-callback": "1.0.0",

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4111af30dfbfe2c72d52325bbd1923773e3b4202
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Krinkle 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: MaxSem 
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/vendor[master]: Update wikimedia/relpath from 1.0.3 -> 2.0.0

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

Change subject: Update wikimedia/relpath from 1.0.3 -> 2.0.0
..


Update wikimedia/relpath from 1.0.3 -> 2.0.0

Change-Id: I98eb809ff72c4d09bfbb89a9dad9bc7094868240
---
M composer.json
M composer.lock
M composer/autoload_files.php
M composer/autoload_static.php
M composer/installed.json
M wikimedia/relpath/src/RelPath.php
6 files changed, 65 insertions(+), 55 deletions(-)

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



diff --git a/composer.json b/composer.json
index 767763d..8410b2d 100644
--- a/composer.json
+++ b/composer.json
@@ -72,7 +72,7 @@
"wikimedia/ip-set": "1.1.0",
"wikimedia/php-session-serializer": "1.0.4",
"wikimedia/purtle": "1.0.6",
-   "wikimedia/relpath": "1.0.3",
+   "wikimedia/relpath": "2.0.0",
"wikimedia/remex-html": "1.0.1",
"wikimedia/running-stat": "1.1.0",
"wikimedia/scoped-callback": "1.0.0",
diff --git a/composer.lock b/composer.lock
index 1ee12bd..f2711f6 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
 "Read more about it at 
https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file;,
 "This file is @generated automatically"
 ],
-"content-hash": "8157e60908252c7c0a6af8e5eb5f7ff4",
+"content-hash": "d3e0811f4f6f8eb8bd96e36bd53702ea",
 "packages": [
 {
 "name": "composer/semver",
@@ -1839,20 +1839,20 @@
 },
 {
 "name": "wikimedia/relpath",
-"version": "1.0.3",
+"version": "2.0.0",
 "source": {
 "type": "git",
 "url": "https://github.com/wikimedia/RelPath.git;,
-"reference": "ee38e19f3b059e5cec8863b03e35a451b8f35106"
+"reference": "b0eeb17d31e4cde22dea0932dfb920a71a167c33"
 },
 "dist": {
 "type": "zip",
-"url": 
"https://api.github.com/repos/wikimedia/RelPath/zipball/ee38e19f3b059e5cec8863b03e35a451b8f35106;,
-"reference": "ee38e19f3b059e5cec8863b03e35a451b8f35106",
+"url": 
"https://api.github.com/repos/wikimedia/RelPath/zipball/b0eeb17d31e4cde22dea0932dfb920a71a167c33;,
+"reference": "b0eeb17d31e4cde22dea0932dfb920a71a167c33",
 "shasum": ""
 },
 "require": {
-"php": ">=5.3.3"
+"php": ">=5.5.9"
 },
 "require-dev": {
 "jakub-onderka/php-parallel-lint": "^0.9.0.0",
@@ -1877,7 +1877,7 @@
 ],
 "description": "Compute a relative filepath between two paths.",
 "homepage": "https://www.mediawiki.org/wiki/RelPath;,
-"time": "2015-09-29T21:17:03+00:00"
+"time": "2017-07-28T21:20:05+00:00"
 },
 {
 "name": "wikimedia/remex-html",
diff --git a/composer/autoload_files.php b/composer/autoload_files.php
index f874be0..92f8179 100644
--- a/composer/autoload_files.php
+++ b/composer/autoload_files.php
@@ -8,7 +8,7 @@
 return array(
 'a24b5daa493ecb5e767c7d1592a8da36' => $vendorDir . 
'/mediawiki/at-ease/src/Functions.php',
 'c3f7f0e81464740a933532e81fa26cc7' => $vendorDir . 
'/wikimedia/base-convert/src/Functions.php',
-'d55c27a601de788b19a09b7d057d07ae' => $vendorDir . 
'/wikimedia/relpath/src/RelPath.php',
 'c50606d667a3fde2b80a955639479d3d' => $vendorDir . 
'/wikimedia/timestamp/src/defines.php',
 '04c6c5c2f7095ccf6c481d3e53e1776f' => $vendorDir . 
'/mustangostang/spyc/Spyc.php',
+'d55c27a601de788b19a09b7d057d07ae' => $vendorDir . 
'/wikimedia/relpath/src/RelPath.php',
 );
diff --git a/composer/autoload_static.php b/composer/autoload_static.php
index 7c805d9..52d715c 100644
--- a/composer/autoload_static.php
+++ b/composer/autoload_static.php
@@ -9,9 +9,9 @@
 public static $files = array (
 'a24b5daa493ecb5e767c7d1592a8da36' => __DIR__ . '/..' . 
'/mediawiki/at-ease/src/Functions.php',
 'c3f7f0e81464740a933532e81fa26cc7' => __DIR__ . '/..' . 
'/wikimedia/base-convert/src/Functions.php',
-'d55c27a601de788b19a09b7d057d07ae' => __DIR__ . '/..' . 
'/wikimedia/relpath/src/RelPath.php',
 'c50606d667a3fde2b80a955639479d3d' => __DIR__ . '/..' . 
'/wikimedia/timestamp/src/defines.php',
 '04c6c5c2f7095ccf6c481d3e53e1776f' => __DIR__ . '/..' . 
'/mustangostang/spyc/Spyc.php',
+'d55c27a601de788b19a09b7d057d07ae' => __DIR__ . '/..' . 
'/wikimedia/relpath/src/RelPath.php',
 );
 
 public static $prefixLengthsPsr4 = array (
diff --git a/composer/installed.json b/composer/installed.json
index 7279b8c..36c3a06 100644
--- a/composer/installed.json
+++ b/composer/installed.json
@@ -511,50 +511,6 @@
 

[MediaWiki-commits] [Gerrit] operations/puppet[production]: cache::misc: releases: add codfw backend, make active-active

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

Change subject: cache::misc: releases: add codfw backend, make active-active
..


cache::misc: releases: add codfw backend, make active-active

Now that we have install1001 and install2001 using identical roles
and rsyncing from 1001->2001, we can add a backend for codfw
and make https://releases.wikimedia.org an active-active service.

Bug: T171917
Bug: T156937
Change-Id: Ib30f6237a5b954e6c66326ec88c7c78171a4a11f
---
M hieradata/role/common/cache/misc.yaml
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/hieradata/role/common/cache/misc.yaml 
b/hieradata/role/common/cache/misc.yaml
index c8c4c48..f89330f 100644
--- a/hieradata/role/common/cache/misc.yaml
+++ b/hieradata/role/common/cache/misc.yaml
@@ -107,6 +107,7 @@
   releases:
 backends:
   eqiad: 'releases1001.eqiad.wmnet'
+  codfw: 'releases2001.codfw.wmnet'
   ruthenium:
 be_opts:
   port: 8001

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib30f6237a5b954e6c66326ec88c7c78171a4a11f
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn 
Gerrit-Reviewer: Chad 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: Greg Grossmeier 
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]: RCFilters: Remember legend expand/collapse state

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

Change subject: RCFilters: Remember legend expand/collapse state
..


RCFilters: Remember legend expand/collapse state

Bug: T168043
Change-Id: I2f22f4211cfcbd9e81ee20f013fde921635e5ebc
---
M resources/src/mediawiki.special/mediawiki.special.changeslist.legend.js
1 file changed, 1 insertion(+), 2 deletions(-)

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



diff --git 
a/resources/src/mediawiki.special/mediawiki.special.changeslist.legend.js 
b/resources/src/mediawiki.special/mediawiki.special.changeslist.legend.js
index ea63e39..a991d36 100644
--- a/resources/src/mediawiki.special/mediawiki.special.changeslist.legend.js
+++ b/resources/src/mediawiki.special/mediawiki.special.changeslist.legend.js
@@ -7,11 +7,10 @@
var
cookieName = 'changeslist-state',
// Expanded by default
-   isCollapsed = mw.cookie.get( cookieName ) === 'collapsed',
doCollapsibleLegend = function ( $container ) {
$container.find( '.mw-changeslist-legend' )
.makeCollapsible( {
-   collapsed: isCollapsed
+   collapsed: mw.cookie.get( cookieName ) 
=== 'collapsed'
} )
.on( 'beforeExpand.mw-collapsible', function () 
{
mw.cookie.set( cookieName, 'expanded' );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2f22f4211cfcbd9e81ee20f013fde921635e5ebc
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Mooeypoo 
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] mediawiki/core[master]: RCFilters: Open limit/days popups the other way

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

Change subject: RCFilters: Open limit/days popups the other way
..


RCFilters: Open limit/days popups the other way

Bug: T171968
Change-Id: I83127f43cef02194c839cd0ac531ae43fa386e9a
---
M 
resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.ChangesLimitButtonWidget.js
M resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.DateButtonWidget.js
2 files changed, 2 insertions(+), 2 deletions(-)

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



diff --git 
a/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.ChangesLimitButtonWidget.js
 
b/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.ChangesLimitButtonWidget.js
index b85a89f..32d2097 100644
--- 
a/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.ChangesLimitButtonWidget.js
+++ 
b/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.ChangesLimitButtonWidget.js
@@ -67,7 +67,7 @@
width: 300,
padded: true,
anchor: false,
-   align: 'backwards',
+   align: 'forwards',
$autoCloseIgnore: this.$overlay,
$content: 
changesLimitPopupWidget.$element
}
diff --git 
a/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.DateButtonWidget.js 
b/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.DateButtonWidget.js
index 647e42d..af81883 100644
--- a/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.DateButtonWidget.js
+++ b/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.DateButtonWidget.js
@@ -63,7 +63,7 @@
width: 300,
padded: true,
anchor: false,
-   align: 'backwards',
+   align: 'forwards',
$autoCloseIgnore: this.$overlay,
$content: datePopupWidget.$element
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I83127f43cef02194c839cd0ac531ae43fa386e9a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Mooeypoo 
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/puppet[production]: cache::misc: release: add codfw backend, make active-active

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

Change subject: cache::misc: release: add codfw backend, make active-active
..

cache::misc: release: add codfw backend, make active-active

Now that we have install1001 and install2001 using identical roles
and rsyncing from 1001->2001, we can add a backend for codfw
and make https://releases.wikimedia.org an active-active service.

Bug: T171917
Change-Id: Ib30f6237a5b954e6c66326ec88c7c78171a4a11f
---
M hieradata/role/common/cache/misc.yaml
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/27/368527/1

diff --git a/hieradata/role/common/cache/misc.yaml 
b/hieradata/role/common/cache/misc.yaml
index c8c4c48..f89330f 100644
--- a/hieradata/role/common/cache/misc.yaml
+++ b/hieradata/role/common/cache/misc.yaml
@@ -107,6 +107,7 @@
   releases:
 backends:
   eqiad: 'releases1001.eqiad.wmnet'
+  codfw: 'releases2001.codfw.wmnet'
   ruthenium:
 be_opts:
   port: 8001

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: RCFilters: Allow setting a new query as default

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

Change subject: RCFilters: Allow setting a new query as default
..


RCFilters: Allow setting a new query as default

When creating a new saved query, there's a checkbox
to set it as default as the same time.

Bug: T171922
Change-Id: Id6da0e79c54bc65d76636bbff64b2ece568c0cd4
---
M languages/i18n/en.json
M languages/i18n/qqq.json
M resources/Resources.php
M resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.SavedQueriesModel.js
M resources/src/mediawiki.rcfilters/mw.rcfilters.Controller.js
M 
resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.SaveFiltersPopupButtonWidget.less
M resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.less
M 
resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.SaveFiltersPopupButtonWidget.js
8 files changed, 44 insertions(+), 22 deletions(-)

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



diff --git a/languages/i18n/en.json b/languages/i18n/en.json
index 2f09573..b18fa0b 100644
--- a/languages/i18n/en.json
+++ b/languages/i18n/en.json
@@ -1369,6 +1369,7 @@
"rcfilters-savedqueries-new-name-label": "Name",
"rcfilters-savedqueries-new-name-placeholder": "Describe the purpose of 
the filter",
"rcfilters-savedqueries-apply-label": "Create filter",
+   "rcfilters-savedqueries-apply-and-setdefault-label": "Create default 
filter",
"rcfilters-savedqueries-cancel-label": "Cancel",
"rcfilters-savedqueries-add-new-title": "Save current filter settings",
"rcfilters-restore-default-filters": "Restore default filters",
diff --git a/languages/i18n/qqq.json b/languages/i18n/qqq.json
index c0d6ad5..5609f75 100644
--- a/languages/i18n/qqq.json
+++ b/languages/i18n/qqq.json
@@ -1559,6 +1559,7 @@
"rcfilters-savedqueries-new-name-label": "Label for the input that 
holds the name of the new saved filters in 
[[Special:RecentChanges]]\n{{Identical|Name}}",
"rcfilters-savedqueries-new-name-placeholder": "Placeholder for the 
input that holds the name of the new saved filters in 
[[Special:RecentChanges]]",
"rcfilters-savedqueries-apply-label": "Label for the button to apply 
saving a new filter setting in [[Special:RecentChanges]]. This is for a small 
popup, please try to use a short string.",
+   "rcfilters-savedqueries-apply-and-setdefault-label": "Label for the 
button to apply saving a new filter setting and set it as default in 
[[Special:RecentChanges]]. This is for a small popup, please try to use a short 
string.",
"rcfilters-savedqueries-cancel-label": "Label for the button to cancel 
the saving of a new quick link in 
[[Special:RecentChanges]]\n{{Identical|Cancel}}",
"rcfilters-savedqueries-add-new-title": "Title for the popup to add new 
quick link in [[Special:RecentChanges]]. This is for a small popup, please try 
to use a short string.",
"rcfilters-restore-default-filters": "Label for the button that resets 
filters to defaults",
diff --git a/resources/Resources.php b/resources/Resources.php
index 64ecc96..cc282e3 100644
--- a/resources/Resources.php
+++ b/resources/Resources.php
@@ -1853,6 +1853,7 @@
'rcfilters-savedqueries-new-name-placeholder',
'rcfilters-savedqueries-add-new-title',
'rcfilters-savedqueries-apply-label',
+   'rcfilters-savedqueries-apply-and-setdefault-label',
'rcfilters-savedqueries-cancel-label',
'rcfilters-restore-default-filters',
'rcfilters-clear-all-filters',
diff --git 
a/resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.SavedQueriesModel.js 
b/resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.SavedQueriesModel.js
index 29134a5..d6dda1e 100644
--- a/resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.SavedQueriesModel.js
+++ b/resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.SavedQueriesModel.js
@@ -119,6 +119,7 @@
 *
 * @param {string} label Label for the new query
 * @param {Object} data Data for the new query
+* @return {string} ID of the newly added query
 */
mw.rcfilters.dm.SavedQueriesModel.prototype.addNewQuery = function ( 
label, data ) {
var randomID = ( new Date() ).getTime(),
@@ -132,6 +133,8 @@
normalizedData
)
] );
+
+   return randomID;
};
 
/**
diff --git a/resources/src/mediawiki.rcfilters/mw.rcfilters.Controller.js 
b/resources/src/mediawiki.rcfilters/mw.rcfilters.Controller.js
index 2563479..8cee0a8 100644
--- a/resources/src/mediawiki.rcfilters/mw.rcfilters.Controller.js
+++ b/resources/src/mediawiki.rcfilters/mw.rcfilters.Controller.js
@@ -448,9 +448,11 @@
 * Save the current model state 

[MediaWiki-commits] [Gerrit] mediawiki...mobileapps[master]: Fix pronounication portion of API

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

Change subject: Fix pronounication portion of API
..

Fix pronounication portion of API

Bug:  T170325
Change-Id: I01d173f1ff54fd0719097772c8eb12072e9001c7
---
M lib/parseProperty.js
M test/features/mobile-sections-lead/pagecontent.js
2 files changed, 14 insertions(+), 14 deletions(-)


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

diff --git a/lib/parseProperty.js b/lib/parseProperty.js
index 9bb5461..8625a02 100644
--- a/lib/parseProperty.js
+++ b/lib/parseProperty.js
@@ -22,7 +22,7 @@
 }
 
 function parsePronunciationFilePageUrls(doc) {
-const ipaFileWithExtensionPageUrlSelector = 'span.IPA a[href*=.]';
+const ipaFileWithExtensionPageUrlSelector = 'span.IPA a[href*=.], 
.metadata .haudio a[href]';
 return doc.querySelectorAll(ipaFileWithExtensionPageUrlSelector)
 .map((anchor) => {
 return anchor.getAttribute('href');
@@ -69,11 +69,15 @@
 
 function parsePronunciation(doc, title) {
 const pageUrls = parsePronunciationFilePageUrls(doc);
-const pageUrl = pageUrls && pickPronunciationFilePageUrl(pageUrls, title);
-const selector = pageUrl && filePageUrlToFileUrlSelector(pageUrl);
-const fileAnchor = selector && doc.querySelector(selector);
-const url = fileAnchor && fileAnchor.getAttribute('href');
-return url && { url };
+let url = pageUrls.filter((url) => url.match( /\/\// ));
+if(!url.length) {
+const pageUrl = pageUrls && pickPronunciationFilePageUrl(pageUrls, 
title);
+const selector = pageUrl && filePageUrlToFileUrlSelector(pageUrl);
+const fileAnchor = selector && doc.querySelector(selector);
+url = fileAnchor && fileAnchor.getAttribute('href');
+return url && { url };
+}
+return url;
 }
 
 /**
diff --git a/test/features/mobile-sections-lead/pagecontent.js 
b/test/features/mobile-sections-lead/pagecontent.js
index 020e4ba..f409371 100644
--- a/test/features/mobile-sections-lead/pagecontent.js
+++ b/test/features/mobile-sections-lead/pagecontent.js
@@ -138,8 +138,7 @@
 assert.ok(!{}.hasOwnProperty.call(lead, 'geo'));
 });
 });
-// T170325
-it.skip('Barack Obama should have a pronunciation', () => {
+it('Barack Obama should have a pronunciation', () => {
 const title = 'Barack_Obama';
 const uri = 
`${server.config.uri}en.wikipedia.org/v1/page/mobile-sections-lead/${title}`;
 const exp = 
'//upload.wikimedia.org/wikipedia/commons/8/82/En-us-Barack-Hussein-Obama.ogg';
@@ -159,8 +158,7 @@
   'The infobox has not been removed for backwards 
compatibility.');
 });
 });
-// T170325
-it.skip('Enwiki Uranus loads successfully (no pronunciation parsing 
TypeErrors)', () => {
+it('Enwiki Uranus loads successfully (no pronunciation parsing 
TypeErrors)', () => {
 const uri = 
`${server.config.uri}en.wikipedia.org/v1/page/mobile-sections-lead/Uranus`;
 const exp = 
'//upload.wikimedia.org/wikipedia/commons/1/1c/En-us-Uranus.ogg';
 return preq.get({ uri })
@@ -170,8 +168,7 @@
 assert.deepEqual(lead.pronunciation.url, exp);
 });
 });
-// T170325
-it.skip('Enwiki Odisha loads successfully (no pronunciation parsing 
TypeErrors)', () => {
+it('Enwiki Odisha loads successfully (no pronunciation parsing 
TypeErrors)', () => {
 const uri = 
`${server.config.uri}en.wikipedia.org/v1/page/mobile-sections-lead/Odisha`;
 const path = `//upload.wikimedia.org/wikipedia/commons/c/c2`;
 const exp = 
`${path}/Pronunciation_of_the_Odia_language_word_%22Odisha%22.ogg`;
@@ -182,8 +179,7 @@
 assert.deepEqual(lead.pronunciation.url, exp);
 });
 });
-// T170325
-it.skip('Enwiki Yazidis loads successfully (no pronunciation parsing 
TypeErrors)', () => {
+it('Enwiki Yazidis loads successfully (no pronunciation parsing 
TypeErrors)', () => {
 const uri = 
`${server.config.uri}en.wikipedia.org/v1/page/mobile-sections-lead/Yazidis`;
 const path = `//upload.wikimedia.org/wikipedia/commons/8/8d`;
 const exp = 
`${path}/En-us-Yazidis_from_Iraq_pronunciation_%28Voice_of_America%29.ogg`;

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: admins::dzahn: export reprepro base dir based on hostname

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

Change subject: admins::dzahn: export reprepro base dir based on hostname
..


admins::dzahn: export reprepro base dir based on hostname

Change-Id: Idbe6b1a37d688655cc19338993f0d2b4a857327d
---
M modules/admin/files/home/dzahn/.bash_profile
1 file changed, 8 insertions(+), 0 deletions(-)

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



diff --git a/modules/admin/files/home/dzahn/.bash_profile 
b/modules/admin/files/home/dzahn/.bash_profile
index 963faae..8c5336f 100644
--- a/modules/admin/files/home/dzahn/.bash_profile
+++ b/modules/admin/files/home/dzahn/.bash_profile
@@ -14,3 +14,11 @@
 
 alias cachemiscpuppet="sudo cumin -b 3 -s 10 'R:class = role::cache::misc' 
'run-puppet-agent -q'"
 
+# set the right base dir for reprepro, depending whether it's apt.wm.org or 
releases.wm.org
+if [ "$(hostname -s | cut -c 1-8)" == "releases" ]; then
+export REPREPRO_BASE_DIR=/srv/org/wikimedia/reprepro
+fi
+if [ "$(hostname -s | cut -c 1-7)" == "install" ]; then
+export REPREPRO_BASE_DIR=/srv/wikimedia
+fi
+

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: RCFilters: Open limit/days popups the other way

2017-07-28 Thread Mooeypoo (Code Review)
Mooeypoo has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/368525 )

Change subject: RCFilters: Open limit/days popups the other way
..

RCFilters: Open limit/days popups the other way

Bug: T171968
Change-Id: I83127f43cef02194c839cd0ac531ae43fa386e9a
---
M 
resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.ChangesLimitButtonWidget.js
M resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.DateButtonWidget.js
2 files changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/25/368525/1

diff --git 
a/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.ChangesLimitButtonWidget.js
 
b/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.ChangesLimitButtonWidget.js
index b85a89f..32d2097 100644
--- 
a/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.ChangesLimitButtonWidget.js
+++ 
b/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.ChangesLimitButtonWidget.js
@@ -67,7 +67,7 @@
width: 300,
padded: true,
anchor: false,
-   align: 'backwards',
+   align: 'forwards',
$autoCloseIgnore: this.$overlay,
$content: 
changesLimitPopupWidget.$element
}
diff --git 
a/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.DateButtonWidget.js 
b/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.DateButtonWidget.js
index 647e42d..af81883 100644
--- a/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.DateButtonWidget.js
+++ b/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.DateButtonWidget.js
@@ -63,7 +63,7 @@
width: 300,
padded: true,
anchor: false,
-   align: 'backwards',
+   align: 'forwards',
$autoCloseIgnore: this.$overlay,
$content: datePopupWidget.$element
}

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: admins::dzahn: export reprepro base dir based on hostname

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

Change subject: admins::dzahn: export reprepro base dir based on hostname
..

admins::dzahn: export reprepro base dir based on hostname

Change-Id: Idbe6b1a37d688655cc19338993f0d2b4a857327d
---
M modules/admin/files/home/dzahn/.bash_profile
1 file changed, 8 insertions(+), 0 deletions(-)


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

diff --git a/modules/admin/files/home/dzahn/.bash_profile 
b/modules/admin/files/home/dzahn/.bash_profile
index 963faae..0ee0460 100644
--- a/modules/admin/files/home/dzahn/.bash_profile
+++ b/modules/admin/files/home/dzahn/.bash_profile
@@ -14,3 +14,11 @@
 
 alias cachemiscpuppet="sudo cumin -b 3 -s 10 'R:class = role::cache::misc' 
'run-puppet-agent -q'"
 
+# set the right base dir for reprepro, depending whether it's apt.wm.org or 
releases.wm.org
+if [ "$(hostname -s | cut -c 1-8)" == "releases" ]; then
+export REPREPRO_BASE_DIR=/srv/org/wikimedia/reprepro
+fi
+if [ "$(hostname -s)" | cut -c 1-7 == "install" ]; then
+export REPREPRO_BASE_DIR=/srv/wikimedia
+fi
+

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idbe6b1a37d688655cc19338993f0d2b4a857327d
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...ORES[master]: Messages for low and high accuracy likelybad filters

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

Change subject: Messages for low and high accuracy likelybad filters
..


Messages for low and high accuracy likelybad filters

Applies to both 'damaging' and 'goodfaith' filters.
When 'maybebad' is defined, we use the low-accuracy
msg, otherwise we use the high-accuracy msg.

Bug: T164997
Change-Id: I56959df8eaba854338a0cd3c93f84a6265523069
---
M i18n/en.json
M i18n/qqq.json
M includes/Hooks.php
3 files changed, 18 insertions(+), 8 deletions(-)

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



diff --git a/i18n/en.json b/i18n/en.json
index 671a90c..5cd0889 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -28,9 +28,10 @@
"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": "With medium accuracy, finds 
more problem edits than the \"Very Likely\" filter but fewer than \"May.\"",
+   "ores-rcfilters-damaging-likelybad-desc-low": "With medium accuracy, 
finds an intermediate fraction of problem edits.",
+   "ores-rcfilters-damaging-likelybad-desc-high": "With high accuracy, 
finds most problem edits.",
"ores-rcfilters-damaging-verylikelybad-label": "Very likely have 
problems",
-   "ores-rcfilters-damaging-verylikelybad-desc": "Highly accurate at 
finding the most obvious flawed or damaging edits.",
+   "ores-rcfilters-damaging-verylikelybad-desc": "Very highly accurate at 
finding the most obviously 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,9 +41,10 @@
"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 more 
bad-faith edits than the \"Very likely\" filter but fewer than \"May.\"",
+   "ores-rcfilters-goodfaith-bad-desc-low": "With medium accuracy, finds 
an intermediate fraction of bad-faith edits.",
+   "ores-rcfilters-goodfaith-bad-desc-high": "With medium accuracy, finds 
most bad-faith edits.",
"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-rcfilters-goodfaith-verylikelybad-desc": "Very highly accurate at 
finding the most obvious bad-faith edits.",
"ores-pref-highlight": "Highlight likely problem edits with colors and 
an \"{{int:ores-damaging-letter}}\" for \"needs review\"",
"ores-pref-rc-hidenondamaging": "Show only likely problem edits (and 
hide probably good edits)",
"ores-pref-watchlist-hidenondamaging": "Show only likely problem edits 
(and hide probably good edits)",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 041c9e0..5b6286f 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -34,7 +34,8 @@
"ores-rcfilters-damaging-maybebad-label": "Label for the filter for 
showing edits that are somewhat likely to be damaging.",
"ores-rcfilters-damaging-maybebad-desc": "Description for the filter 
for showing edits that are somewhat likely to be damaging.",
"ores-rcfilters-damaging-likelybad-label": "Label for the filter for 
showing edits that are somewhat likely to be damaging.",
-   "ores-rcfilters-damaging-likelybad-desc": "Description for the filter 
for showing edits that are somewhat likely to be damaging.",
+   "ores-rcfilters-damaging-likelybad-desc-low": "Description for the 
LOW-accuracy filter for showing edits that are somewhat likely to be damaging. 
This message is only used if the \"maybebad\" damaging level is available on 
the current wiki. Otherwise, 
{{msg-mw|ores-rcfilters-damaging-likelybad-desc-high}} is used.",
+   "ores-rcfilters-damaging-likelybad-desc-high": "Description for the 
HIGH-accuracy filter for showing edits that are somewhat likely to be damaging. 
This message is only used if the \"maybebad\" damaging level is NOT available 
on the current wiki. Otherwise, 

[MediaWiki-commits] [Gerrit] mediawiki...RSS[master]: Set license-name in extension.json

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

Change subject: Set license-name in extension.json
..


Set license-name in extension.json

Bug: T123943
Change-Id: I25aeeb6ff847fdd718fbb90344c8bd1a30290aaf
---
M extension.json
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/extension.json b/extension.json
index f13bd2f..47dd0e4 100644
--- a/extension.json
+++ b/extension.json
@@ -15,6 +15,7 @@
"Mark A. Hershberger"
],
"version": "2.25.1",
+   "license-name": "GPL-2.0+",
"url": "https://www.mediawiki.org/wiki/Extension:RSS;,
"descriptionmsg": "rss-desc",
"type": "parserhook",

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...CreditsSource[master]: Set license-name in extension.json

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

Change subject: Set license-name in extension.json
..


Set license-name in extension.json

Information from
https://www.mediawiki.org/w/index.php?title=Extension:CreditsSource=2380596

Bug: T123943
Change-Id: Ifc7038c4e2edddce30b0d7a5f432b4e0e4d1d4d5
---
M extension.json
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/extension.json b/extension.json
index ba56fc4..2165cb4 100644
--- a/extension.json
+++ b/extension.json
@@ -5,6 +5,7 @@
"Hans Musil",
"Matthias Mullie"
],
+   "license-name": "GPL-2.0",
"url": "https://www.mediawiki.org/wiki/Extension:CreditsSource;,
"descriptionmsg": "creditssource-desc",
"type": "other",

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ifc7038c4e2edddce30b0d7a5f432b4e0e4d1d4d5
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/CreditsSource
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...GeoCrumbs[master]: Set license-name in extension.json

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

Change subject: Set license-name in extension.json
..


Set license-name in extension.json

Bug: T123943
Change-Id: I34891d37ea108e58a133c42864e2104725a3a802
---
M extension.json
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/extension.json b/extension.json
index 77ea8b9..5951aa5 100644
--- a/extension.json
+++ b/extension.json
@@ -7,6 +7,7 @@
"Matthias Mullie"
],
"url": "https://www.mediawiki.org/wiki/Extension:GeoCrumbs;,
+   "license-name": "GPL-2.0+",
"descriptionmsg": "geocrumbs-desc",
"type": "parserhook",
"MessagesDirs": {

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...DisableAccount[master]: Set license-name in extension.json

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

Change subject: Set license-name in extension.json
..


Set license-name in extension.json

Information from
https://www.mediawiki.org/w/index.php?title=Extension:DisableAccount=2490594

Bug: T123943
Change-Id: I26dcf8156b74684f0e762fc3591a4c5673824e52
---
M extension.json
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/extension.json b/extension.json
index 5c5c6c0..fa24b65 100644
--- a/extension.json
+++ b/extension.json
@@ -4,6 +4,7 @@
"author": [
"Andrew Garrett"
],
+   "license-name": "GPL-2.0+",
"url": "https://www.mediawiki.org/wiki/Extension:DisableAccount;,
"descriptionmsg": "disableaccount-desc",
"type": "other",

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I26dcf8156b74684f0e762fc3591a4c5673824e52
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DisableAccount
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 
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]: openstack: move rabbitmq to module/profile/role

2017-07-28 Thread Rush (Code Review)
Rush has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/368523 )

Change subject: openstack: move rabbitmq to module/profile/role
..

openstack: move rabbitmq to module/profile/role

Requires the private 'rabbit_monitor_pass' value
to be set for each deployment.

Bug: T171494
Change-Id: I2e58497fbaf0a0866942d2e9caed5eae9a92c5b4
---
M hieradata/codfw/profile/openstack/labtest.yaml
M hieradata/codfw/profile/openstack/labtestn.yaml
M hieradata/eqiad/profile/openstack/main.yaml
D modules/openstack/manifests/queue_server.pp
A modules/profile/manifests/openstack/base/rabbitmq.pp
A modules/profile/manifests/openstack/labtest/rabbitmq.pp
A modules/profile/manifests/openstack/labtestn/rabbitmq.pp
A modules/profile/manifests/openstack/main/rabbitmq.pp
D modules/profile/manifests/rabbitmq/server.pp
M modules/role/manifests/labs/openstack/nova/controller.pp
M modules/role/manifests/wmcs/openstack/labtest/control.pp
M modules/role/manifests/wmcs/openstack/labtestn/control.pp
M modules/role/manifests/wmcs/openstack/main/control.pp
13 files changed, 63 insertions(+), 69 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/23/368523/1

diff --git a/hieradata/codfw/profile/openstack/labtest.yaml 
b/hieradata/codfw/profile/openstack/labtest.yaml
index 1c4b737..0701926 100644
--- a/hieradata/codfw/profile/openstack/labtest.yaml
+++ b/hieradata/codfw/profile/openstack/labtest.yaml
@@ -1 +1,3 @@
 profile::openstack::labtest::version: 'liberty'
+profile::openstack::labtest::rabbit_monitor_user: 'monitoring'
+profile::openstack::labtest::rabbit_file_handles: 1024
diff --git a/hieradata/codfw/profile/openstack/labtestn.yaml 
b/hieradata/codfw/profile/openstack/labtestn.yaml
index 3320729..d28b3f8 100644
--- a/hieradata/codfw/profile/openstack/labtestn.yaml
+++ b/hieradata/codfw/profile/openstack/labtestn.yaml
@@ -1 +1,3 @@
 profile::openstack::labtestn::version: 'liberty'
+profile::openstack::labtestn::rabbit_monitor_user: 'monitoring'
+profile::openstack::labtestn::rabbit_file_handles: 8192
diff --git a/hieradata/eqiad/profile/openstack/main.yaml 
b/hieradata/eqiad/profile/openstack/main.yaml
index bbf29f2..274080d 100644
--- a/hieradata/eqiad/profile/openstack/main.yaml
+++ b/hieradata/eqiad/profile/openstack/main.yaml
@@ -1 +1,3 @@
 profile::openstack::main::version: 'liberty'
+profile::openstack::main::rabbit_monitor_user: 'monitor'
+profile::openstack::main::rabbit_file_handles: 8192
diff --git a/modules/openstack/manifests/queue_server.pp 
b/modules/openstack/manifests/queue_server.pp
deleted file mode 100644
index 8ca370d..000
--- a/modules/openstack/manifests/queue_server.pp
+++ /dev/null
@@ -1,49 +0,0 @@
-# sets up rabbitmq on the nova controller
-class openstack::queue_server(
-$rabbit_monitor_username,
-$rabbit_monitor_password
-) {
-
-package { [ 'rabbitmq-server' ]:
-ensure  => present,
-}
-
-# Turn up the number of allowed file handles for rabbitmq
-file { '/etc/default/rabbitmq-server':
-ensure => present,
-owner  => 'root',
-group  => 'root',
-mode   => '0444',
-source => 'puppet:///modules/openstack/rabbitmq/labs-rabbitmq.default',
-}
-
-# Turn up the number of allowed file handles for rabbitmq
-file { '/usr/local/sbin/rabbitmqadmin':
-ensure => present,
-owner  => 'root',
-group  => 'root',
-mode   => '0644',
-source => 'puppet:///modules/openstack/rabbitmq/rabbitmqadmin',
-}
-
-if $::fqdn == hiera('labs_nova_controller') {
-service { 'rabbitmq-server':
-ensure  => running,
-require => Package['rabbitmq-server'];
-}
-} else {
-service { 'rabbitmq-server':
-ensure  => stopped,
-require => Package['rabbitmq-server'];
-}
-}
-
-diamond::collector { 'RabbitMQ':
-settings => {
-'host' => 'localhost:15672',
-'user' => $rabbit_monitor_username,
-'password' => $rabbit_monitor_password,
-},
-source   => 'puppet:///modules/openstack/rabbitmq/rabbitmq.py',
-}
-}
diff --git a/modules/profile/manifests/openstack/base/rabbitmq.pp 
b/modules/profile/manifests/openstack/base/rabbitmq.pp
new file mode 100644
index 000..54192e3
--- /dev/null
+++ b/modules/profile/manifests/openstack/base/rabbitmq.pp
@@ -0,0 +1,15 @@
+class profile::openstack::base::rabbitmq(
+$monitor_user = hiera('profile::openstack::base::rabbit_monitor_user'),
+$monitor_password = hiera('profile::openstack::base::rabbit_monitor_pass'),
+$file_handles = hiera('profile::openstack::base::rabbit_file_handles'),
+){
+
+class { '::rabbitmq':
+file_handles => $file_handles,
+}
+
+class { '::rabbitmq::monitor':
+rabbit_monitor_username => $monitor_user,
+rabbit_monitor_password => 

[MediaWiki-commits] [Gerrit] mediawiki...DoubleWiki[master]: Set license-name in extension.json

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

Change subject: Set license-name in extension.json
..


Set license-name in extension.json

Information from
https://www.mediawiki.org/w/index.php?title=Extension:DoubleWiki=1656590

Bug: T123943
Change-Id: I2eadc2d6c90a12cb63278507703bf8e516ea4bf3
---
M extension.json
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/extension.json b/extension.json
index b2aa6bf..01e45c6 100644
--- a/extension.json
+++ b/extension.json
@@ -1,6 +1,7 @@
 {
"name": "DoubleWiki",
"author": "ThomasV",
+   "license-name": "GPL-2.0+",
"url": "https://www.mediawiki.org/wiki/Extension:DoubleWiki;,
"descriptionmsg": "doublewiki-desc",
"type": "other",

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...DynamicSidebar[master]: Set license-name in extension.json

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

Change subject: Set license-name in extension.json
..


Set license-name in extension.json

Information from
https://www.mediawiki.org/w/index.php?title=Extension:DynamicSidebar=2524297

Bug: T123943
Change-Id: I6c292f7f0546de08f697b5f42bdee80b21943a70
---
M extension.json
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/extension.json b/extension.json
index 49f3b3d..3ebaf78 100644
--- a/extension.json
+++ b/extension.json
@@ -4,6 +4,7 @@
"author": "Ryan Lane",
"url": "https://www.mediawiki.org/wiki/Extension:DynamicSidebar;,
"descriptionmsg": "dynamicsidebar-desc",
+   "license-name": "GPL-2.0+",
"type": "other",
"config": {
"DynamicSidebarUseCategories": true,

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...ShortUrl[master]: Set license-name in extension.json

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

Change subject: Set license-name in extension.json
..


Set license-name in extension.json

Information from
https://www.mediawiki.org/w/index.php?title=Extension:ShortUrl=2515975

Bug: T123943
Change-Id: Iedf518f75ecc25126d613608f87487ad3f80b993
---
M extension.json
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/extension.json b/extension.json
index 4c6fe12..801b433 100644
--- a/extension.json
+++ b/extension.json
@@ -2,6 +2,7 @@
"name": "ShortUrl",
"version": "1.2.0",
"author": "Yuvi Panda",
+   "license-name": "BSD-3-Clause",
"url": "https://www.mediawiki.org/wiki/Extension:ShortUrl;,
"descriptionmsg": "shorturl-desc",
"type": "specialpage",

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...Listings[master]: Set license-name in extension.json

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

Change subject: Set license-name in extension.json
..


Set license-name in extension.json

Information from
https://www.mediawiki.org/w/index.php?title=Extension:Listings=2268142

Bug: T123943
Change-Id: I883cf1a11da310d7cd99a8a524e627eb332f0bb3
---
M extension.json
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/extension.json b/extension.json
index 4f0b2f7..0a88eef 100644
--- a/extension.json
+++ b/extension.json
@@ -3,6 +3,7 @@
"version": "1.2.0",
"author": "Roland Unger",
"url": "https://www.mediawiki.org/wiki/Extension:Listings;,
+   "license-name": "GPL-2.0+",
"descriptionmsg": "listings-desc",
"type": "parserhook",
"Hooks": {

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...UnicodeConverter[master]: Set license-name in extension.json

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

Change subject: Set license-name in extension.json
..


Set license-name in extension.json

Information from
https://www.mediawiki.org/w/index.php?title=Extension:UnicodeConverter=1516509

Bug: T123943
Change-Id: I20011571fb10dba19bab335b27ccad9deace9024
---
M extension.json
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/extension.json b/extension.json
index bedc806..c651b07 100644
--- a/extension.json
+++ b/extension.json
@@ -1,6 +1,7 @@
 {
"name": "UnicodeConverter",
"author": "Tim Starling",
+   "license-name": "GPL-2.0",
"url": "https://www.mediawiki.org/wiki/Extension:UnicodeConverter;,
"descriptionmsg": "unicodeconverter-desc",
"type": "specialpage",

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...SubPageList3[master]: Set license-name in extension.json

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

Change subject: Set license-name in extension.json
..


Set license-name in extension.json

Information from
https://www.mediawiki.org/w/index.php?title=Extension:SubPageList3=2497311

Bug: T123943
Change-Id: Ib30acc4b5a6febfe1da8696702fe2aadab7f27d9
---
M extension.json
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/extension.json b/extension.json
index d736bd2..9131df7 100644
--- a/extension.json
+++ b/extension.json
@@ -8,6 +8,7 @@
"Martin Schallnahs",
"Rob Church"
],
+   "license-name": "GPL-2.0+",
"MessagesDirs": {
"SubPageList3": [
"i18n"

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...WikimediaIncubator[master]: Set license-name in extension.json

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

Change subject: Set license-name in extension.json
..


Set license-name in extension.json

Information from
https://www.mediawiki.org/w/index.php?title=Extension:WikimediaIncubator=2479504

Bug: T123943
Change-Id: I537d9f7743c53f6b217dd9b283c66317d6f96546
---
M extension.json
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/extension.json b/extension.json
index 2c90f2f..edc9eb0 100644
--- a/extension.json
+++ b/extension.json
@@ -5,6 +5,7 @@
"SPQRobin",
"Hydriz"
],
+   "license-name": "GPL-2.0+",
"url": "https://www.mediawiki.org/wiki/Extension:WikimediaIncubator;,
"descriptionmsg": "wminc-desc",
"requires": {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I537d9f7743c53f6b217dd9b283c66317d6f96546
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikimediaIncubator
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 
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]: logging: Remove exceptionmonitor

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

Change subject: logging: Remove exceptionmonitor
..

logging: Remove exceptionmonitor

It's been broken for a log time, and fixing it does not make sense
considering that we have Logstash that does the same but has access
to structured error data.

Change-Id: I1a742e465fcd69fe6486c86b00b7870855eb4a5f
---
M modules/role/manifests/logging/mediawiki/udp2log.pp
D modules/role/templates/logging/exceptionmonitor.erb
2 files changed, 0 insertions(+), 9 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/22/368522/1

diff --git a/modules/role/manifests/logging/mediawiki/udp2log.pp 
b/modules/role/manifests/logging/mediawiki/udp2log.pp
index 7bd12fa..e0346e3 100644
--- a/modules/role/manifests/logging/mediawiki/udp2log.pp
+++ b/modules/role/manifests/logging/mediawiki/udp2log.pp
@@ -104,13 +104,6 @@
 source => 'puppet:///modules/role/logging/mw-log-cleanup',
 }
 
-file { '/usr/local/bin/exceptionmonitor':
-owner   => 'root',
-group   => 'root',
-mode=> '0555',
-content => template('role/logging/exceptionmonitor.erb'),
-}
-
 file { '/etc/profile.d/mw-log.sh':
 owner   => 'root',
 group   => 'root',
diff --git a/modules/role/templates/logging/exceptionmonitor.erb 
b/modules/role/templates/logging/exceptionmonitor.erb
deleted file mode 100755
index 01acad2..000
--- a/modules/role/templates/logging/exceptionmonitor.erb
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/bash
-watch "tail -n 1000 <%= @log_directory %>/exception.log | grep -P 
'^\d{4}-\d{2}-\d{2}' | grep -v '\bUsageException\b' | sed -r 
's/^.*?\[\w+\]\s+\S+\s+//g' | cut -d ' ' -f 7- | sort | uniq -c | sort -rn"

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: RCFilters: Remember legend expand/collapse state

2017-07-28 Thread Mooeypoo (Code Review)
Mooeypoo has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/368521 )

Change subject: RCFilters: Remember legend expand/collapse state
..

RCFilters: Remember legend expand/collapse state

Bug: T168043
Change-Id: I2f22f4211cfcbd9e81ee20f013fde921635e5ebc
---
M resources/src/mediawiki.special/mediawiki.special.changeslist.legend.js
1 file changed, 1 insertion(+), 2 deletions(-)


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

diff --git 
a/resources/src/mediawiki.special/mediawiki.special.changeslist.legend.js 
b/resources/src/mediawiki.special/mediawiki.special.changeslist.legend.js
index ea63e39..a991d36 100644
--- a/resources/src/mediawiki.special/mediawiki.special.changeslist.legend.js
+++ b/resources/src/mediawiki.special/mediawiki.special.changeslist.legend.js
@@ -7,11 +7,10 @@
var
cookieName = 'changeslist-state',
// Expanded by default
-   isCollapsed = mw.cookie.get( cookieName ) === 'collapsed',
doCollapsibleLegend = function ( $container ) {
$container.find( '.mw-changeslist-legend' )
.makeCollapsible( {
-   collapsed: isCollapsed
+   collapsed: mw.cookie.get( cookieName ) 
=== 'collapsed'
} )
.on( 'beforeExpand.mw-collapsible', function () 
{
mw.cookie.set( cookieName, 'expanded' );

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Adjustments to print table styles

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

Change subject: Adjustments to print table styles
..


Adjustments to print table styles

* Remove bolding
* Reset backgrounds
* Explicitly choose font sizes
* Adjust paddings

Bug: T169823
Change-Id: I9c82f10fa92a24c7bcfff4458c6e5b8d2ddaffbf
---
M resources/src/mediawiki.legacy/commonPrint.css
1 file changed, 10 insertions(+), 6 deletions(-)

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



diff --git a/resources/src/mediawiki.legacy/commonPrint.css 
b/resources/src/mediawiki.legacy/commonPrint.css
index dec0fe8..67fc77d 100644
--- a/resources/src/mediawiki.legacy/commonPrint.css
+++ b/resources/src/mediawiki.legacy/commonPrint.css
@@ -266,19 +266,21 @@
 
 /**
  * Table rendering
- * As on shared.css but with white background.
  */
+/* Compare `table.wikitable` in shared.css */
 table.wikitable,
-table.mw_metadata {
+.mw_metadata {
background: #fff;
margin: 1em 0;
border: 1pt solid #aaa;
border-collapse: collapse;
+   font-size: 10pt;
 }
 
 table.wikitable > caption,
 .mw_metadata caption {
-   font-weight: bold;
+   padding: 5px;
+   font-size: 10pt;
 }
 
 table.wikitable > tr > th,
@@ -287,15 +289,17 @@
 table.wikitable > * > tr > td,
 .mw_metadata th,
 .mw_metadata td {
+   /* Important is required to override any inline styles provided by 
editors */
+   background: #fff !important; /* stylelint-disable-line 
declaration-no-important */
+   /* We need to also set color in case editors applied a light text color 
*/
+   color: #000 !important; /* stylelint-disable-line 
declaration-no-important */
border: 1pt solid #aaa;
-   padding: 0.2em;
+   padding: 0.4em 0.6em;
 }
 
 table.wikitable > tr > th,
 table.wikitable > * > tr > th,
 .mw_metadata th {
-   background: #fff;
-   font-weight: bold;
text-align: center;
 }
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9c82f10fa92a24c7bcfff4458c6e5b8d2ddaffbf
Gerrit-PatchSet: 9
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson 
Gerrit-Reviewer: Bmansurov 
Gerrit-Reviewer: Fomafix 
Gerrit-Reviewer: Jack Phoenix 
Gerrit-Reviewer: Jdlrobson 
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] mediawiki...mobileapps[master]: Fix broken tests (do not skip)

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

Change subject: Fix broken tests (do not skip)
..

Fix broken tests (do not skip)

Skipping should only be used as a short term measure.
It's an anti-pattern - if tests are broken they should be either
fixed promptly or removed. They may be masking real bugs that
deserve debugging attention.

Since articles are living breathing documents these integration
tests should be run against the revisions they were written
against where possible.
This updates all queries to pass a known safe revision
to test against where this fixes the problem

"Page with IPA content" test is broken due to a change in
the underlying content. Let's fix that.

Where a test is being skipped because of an upstream problem
mark it with the bug number.

Change-Id: I6afd85f0f82df7d40ea7f84d0fa49a4fb6f3f94e
---
M test/features/mobile-sections-lead/pagecontent.js
M test/features/mobile-sections/pagecontent-v2.js
M test/features/mobile-sections/pagecontent.js
3 files changed, 21 insertions(+), 12 deletions(-)


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

diff --git a/test/features/mobile-sections-lead/pagecontent.js 
b/test/features/mobile-sections-lead/pagecontent.js
index 95a612f..f0a1f9d 100644
--- a/test/features/mobile-sections-lead/pagecontent.js
+++ b/test/features/mobile-sections-lead/pagecontent.js
@@ -5,6 +5,9 @@
 const server = require('../../utils/server.js');
 const headers = require('../../utils/headers.js');
 
+const wikivoyageSectionsLead = 
'en.wikivoyage.org/v1/page/mobile-sections-lead/';
+const wikiSectionsLead = 'en.wikipedia.org/v1/page/mobile-sections-lead/';
+
 describe('mobile-sections-lead', function() {
 
 this.timeout(2); // eslint-disable-line no-invalid-this
@@ -118,9 +121,9 @@
 assert.deepEqual(lead.geo.longitude, 28.88305556);
 });
 });
-// TODO: FIX OR REMOVE
-it.skip('Wikivoyage en Paris should have a lead object with a geo 
property', () => {
-const uri = 
`${server.config.uri}en.wikivoyage.org/v1/page/mobile-sections-lead/Paris`;
+it('Wikivoyage en Paris should have a lead object with a geo property', () 
=> {
+const rev = 3092864;
+const uri = 
`${server.config.uri}${wikivoyageSectionsLead}Paris/${rev}`;
 return preq.get({ uri })
 .then((res) => {
 const lead = res.body;
@@ -136,6 +139,7 @@
 assert.ok(!{}.hasOwnProperty.call(lead, 'geo'));
 });
 });
+// T170325
 it.skip('Barack Obama should have a pronunciation', () => {
 const title = 'Barack_Obama';
 const uri = 
`${server.config.uri}en.wikipedia.org/v1/page/mobile-sections-lead/${title}`;
@@ -156,6 +160,7 @@
   'The infobox has not been removed for backwards 
compatibility.');
 });
 });
+// T170325
 it.skip('Enwiki Uranus loads successfully (no pronunciation parsing 
TypeErrors)', () => {
 const uri = 
`${server.config.uri}en.wikipedia.org/v1/page/mobile-sections-lead/Uranus`;
 const exp = 
'//upload.wikimedia.org/wikipedia/commons/1/1c/En-us-Uranus.ogg';
@@ -166,6 +171,7 @@
 assert.deepEqual(lead.pronunciation.url, exp);
 });
 });
+// T170325
 it.skip('Enwiki Odisha loads successfully (no pronunciation parsing 
TypeErrors)', () => {
 const uri = 
`${server.config.uri}en.wikipedia.org/v1/page/mobile-sections-lead/Odisha`;
 const path = `//upload.wikimedia.org/wikipedia/commons/c/c2`;
@@ -177,6 +183,7 @@
 assert.deepEqual(lead.pronunciation.url, exp);
 });
 });
+// T170325
 it.skip('Enwiki Yazidis loads successfully (no pronunciation parsing 
TypeErrors)', () => {
 const uri = 
`${server.config.uri}en.wikipedia.org/v1/page/mobile-sections-lead/Yazidis`;
 const path = `//upload.wikimedia.org/wikipedia/commons/8/8d`;
@@ -208,9 +215,9 @@
 Actual text ${res.body.sections[0].text}`);
 });
 });
-it.skip('Enwiki hatnotes are promoted to the lead object', () => {
+it('Enwiki hatnotes are promoted to the lead object', () => {
 const title = `Chivalric%20order`;
-const uri = 
`${server.config.uri}en.wikipedia.org/v1/page/mobile-sections-lead/${title}`;
+const uri = 
`${server.config.uri}${wikiSectionsLead}${title}/699553745`;
 const anchor = ``;
 return preq.get({ uri })
 .then((res) => {
diff --git a/test/features/mobile-sections/pagecontent-v2.js 
b/test/features/mobile-sections/pagecontent-v2.js
index 5194690..0fbcb63 100644
--- a/test/features/mobile-sections/pagecontent-v2.js
+++ b/test/features/mobile-sections/pagecontent-v2.js
@@ -41,8 +41,9 @@
});
 });
 
-it.skip('Hatnotes do not 

[MediaWiki-commits] [Gerrit] mediawiki/vendor[master]: Update wikimedia/relpath from 1.0.3 -> 2.0.0

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

Change subject: Update wikimedia/relpath from 1.0.3 -> 2.0.0
..

Update wikimedia/relpath from 1.0.3 -> 2.0.0

Change-Id: I98eb809ff72c4d09bfbb89a9dad9bc7094868240
Depends-On: I4111af30dfbfe2c72d52325bbd1923773e3b4202
---
M composer.json
M composer.lock
M composer/autoload_files.php
M composer/autoload_static.php
M composer/installed.json
M wikimedia/relpath/src/RelPath.php
6 files changed, 65 insertions(+), 55 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vendor 
refs/changes/19/368519/1

diff --git a/composer.json b/composer.json
index 767763d..8410b2d 100644
--- a/composer.json
+++ b/composer.json
@@ -72,7 +72,7 @@
"wikimedia/ip-set": "1.1.0",
"wikimedia/php-session-serializer": "1.0.4",
"wikimedia/purtle": "1.0.6",
-   "wikimedia/relpath": "1.0.3",
+   "wikimedia/relpath": "2.0.0",
"wikimedia/remex-html": "1.0.1",
"wikimedia/running-stat": "1.1.0",
"wikimedia/scoped-callback": "1.0.0",
diff --git a/composer.lock b/composer.lock
index 1ee12bd..f2711f6 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
 "Read more about it at 
https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file;,
 "This file is @generated automatically"
 ],
-"content-hash": "8157e60908252c7c0a6af8e5eb5f7ff4",
+"content-hash": "d3e0811f4f6f8eb8bd96e36bd53702ea",
 "packages": [
 {
 "name": "composer/semver",
@@ -1839,20 +1839,20 @@
 },
 {
 "name": "wikimedia/relpath",
-"version": "1.0.3",
+"version": "2.0.0",
 "source": {
 "type": "git",
 "url": "https://github.com/wikimedia/RelPath.git;,
-"reference": "ee38e19f3b059e5cec8863b03e35a451b8f35106"
+"reference": "b0eeb17d31e4cde22dea0932dfb920a71a167c33"
 },
 "dist": {
 "type": "zip",
-"url": 
"https://api.github.com/repos/wikimedia/RelPath/zipball/ee38e19f3b059e5cec8863b03e35a451b8f35106;,
-"reference": "ee38e19f3b059e5cec8863b03e35a451b8f35106",
+"url": 
"https://api.github.com/repos/wikimedia/RelPath/zipball/b0eeb17d31e4cde22dea0932dfb920a71a167c33;,
+"reference": "b0eeb17d31e4cde22dea0932dfb920a71a167c33",
 "shasum": ""
 },
 "require": {
-"php": ">=5.3.3"
+"php": ">=5.5.9"
 },
 "require-dev": {
 "jakub-onderka/php-parallel-lint": "^0.9.0.0",
@@ -1877,7 +1877,7 @@
 ],
 "description": "Compute a relative filepath between two paths.",
 "homepage": "https://www.mediawiki.org/wiki/RelPath;,
-"time": "2015-09-29T21:17:03+00:00"
+"time": "2017-07-28T21:20:05+00:00"
 },
 {
 "name": "wikimedia/remex-html",
diff --git a/composer/autoload_files.php b/composer/autoload_files.php
index f874be0..92f8179 100644
--- a/composer/autoload_files.php
+++ b/composer/autoload_files.php
@@ -8,7 +8,7 @@
 return array(
 'a24b5daa493ecb5e767c7d1592a8da36' => $vendorDir . 
'/mediawiki/at-ease/src/Functions.php',
 'c3f7f0e81464740a933532e81fa26cc7' => $vendorDir . 
'/wikimedia/base-convert/src/Functions.php',
-'d55c27a601de788b19a09b7d057d07ae' => $vendorDir . 
'/wikimedia/relpath/src/RelPath.php',
 'c50606d667a3fde2b80a955639479d3d' => $vendorDir . 
'/wikimedia/timestamp/src/defines.php',
 '04c6c5c2f7095ccf6c481d3e53e1776f' => $vendorDir . 
'/mustangostang/spyc/Spyc.php',
+'d55c27a601de788b19a09b7d057d07ae' => $vendorDir . 
'/wikimedia/relpath/src/RelPath.php',
 );
diff --git a/composer/autoload_static.php b/composer/autoload_static.php
index 7c805d9..52d715c 100644
--- a/composer/autoload_static.php
+++ b/composer/autoload_static.php
@@ -9,9 +9,9 @@
 public static $files = array (
 'a24b5daa493ecb5e767c7d1592a8da36' => __DIR__ . '/..' . 
'/mediawiki/at-ease/src/Functions.php',
 'c3f7f0e81464740a933532e81fa26cc7' => __DIR__ . '/..' . 
'/wikimedia/base-convert/src/Functions.php',
-'d55c27a601de788b19a09b7d057d07ae' => __DIR__ . '/..' . 
'/wikimedia/relpath/src/RelPath.php',
 'c50606d667a3fde2b80a955639479d3d' => __DIR__ . '/..' . 
'/wikimedia/timestamp/src/defines.php',
 '04c6c5c2f7095ccf6c481d3e53e1776f' => __DIR__ . '/..' . 
'/mustangostang/spyc/Spyc.php',
+'d55c27a601de788b19a09b7d057d07ae' => __DIR__ . '/..' . 
'/wikimedia/relpath/src/RelPath.php',
 );
 
 public static $prefixLengthsPsr4 = array (
diff --git a/composer/installed.json b/composer/installed.json
index 7279b8c..36c3a06 100644
--- a/composer/installed.json
+++ 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Update wikimedia/relpath from 1.0.3 -> 2.0.0

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

Change subject: Update wikimedia/relpath from 1.0.3 -> 2.0.0
..

Update wikimedia/relpath from 1.0.3 -> 2.0.0

* (4f670afd92) Normalize leading path separator to forward slash
   Fixes Windows compatibility.
* (b0eeb17d31) Drop support for PHP 5.3 and PHP 5.4.

Change-Id: I4111af30dfbfe2c72d52325bbd1923773e3b4202
---
M composer.json
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/18/368518/1

diff --git a/composer.json b/composer.json
index d04e9f5..aefc158 100644
--- a/composer.json
+++ b/composer.json
@@ -37,7 +37,7 @@
"wikimedia/html-formatter": "1.0.1",
"wikimedia/ip-set": "1.1.0",
"wikimedia/php-session-serializer": "1.0.4",
-   "wikimedia/relpath": "1.0.3",
+   "wikimedia/relpath": "2.0.0",
"wikimedia/remex-html": "1.0.1",
"wikimedia/running-stat": "1.1.0",
"wikimedia/scoped-callback": "1.0.0",

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

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

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


[MediaWiki-commits] [Gerrit] RelPath[master]: Drop support for PHP 5.3 and PHP 5.4

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

Change subject: Drop support for PHP 5.3 and PHP 5.4
..


Drop support for PHP 5.3 and PHP 5.4

Per T75901, MediaWiki no longer supports this. Our CI environment
also hasn't been verifying this library on PHP 5.3 or PHP 5.4 for
a while.

Travis CI also hasn't supported PHP 5.3 for a while. PHP 5.4 still
works, but if we're bumping it now, we might as well go straight
to the current minimum requirement so that we can sustain this
level for a bit longer without requiring another major version
bump.

Change-Id: Iffb7b707e2ef04895db3d18ed2db8494a99883cf
---
M .travis.yml
M composer.json
2 files changed, 1 insertion(+), 3 deletions(-)

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



diff --git a/.travis.yml b/.travis.yml
index bd9062f..5692e72 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -2,8 +2,6 @@
 dist: trusty
 language: php
 php:
-  - "5.3"
-  - "5.4"
   - "5.5"
   - "5.6"
   - "7.0"
diff --git a/composer.json b/composer.json
index b6043e2..5f1af2c 100644
--- a/composer.json
+++ b/composer.json
@@ -15,7 +15,7 @@
]
},
"require": {
-   "php": ">=5.3.3"
+   "php": ">=5.5.9"
},
"require-dev": {
"jakub-onderka/php-parallel-lint": "^0.9.0.0",

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iffb7b707e2ef04895db3d18ed2db8494a99883cf
Gerrit-PatchSet: 1
Gerrit-Project: RelPath
Gerrit-Branch: master
Gerrit-Owner: Krinkle 
Gerrit-Reviewer: BryanDavis 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: MaxSem 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] wikimedia...civicrm[master]: WIP teach PEAR about deadlock errors

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

Change subject: WIP teach PEAR about deadlock errors
..

WIP teach PEAR about deadlock errors

Sorta-hopeless effort to pass more db error info up the chain

Bug: T118487
Change-Id: Iddf380d6db9e9e42e6d5703e26da71f7fe3e498a
---
M packages/DB.php
M packages/DB/mysqli.php
2 files changed, 5 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm/civicrm 
refs/changes/17/368517/1

diff --git a/packages/DB.php b/packages/DB.php
index 2a06764..a49c868 100644
--- a/packages/DB.php
+++ b/packages/DB.php
@@ -183,6 +183,9 @@
  */
 define('DB_ERROR_CONSTRAINT_NOT_NULL',-29);
 
+define('DB_ERROR_LOCK_TIMEOUT', -30);
+
+define('DB_ERROR_DEADLOCK', -31);
 /**
  * Invalid view or no permissions
  */
diff --git a/packages/DB/mysqli.php b/packages/DB/mysqli.php
index 371cfb0..a12ee17 100644
--- a/packages/DB/mysqli.php
+++ b/packages/DB/mysqli.php
@@ -112,6 +112,8 @@
 1136 => DB_ERROR_VALUE_COUNT_ON_ROW,
 1142 => DB_ERROR_ACCESS_VIOLATION,
 1146 => DB_ERROR_NOSUCHTABLE,
+1205 => DB_ERROR_LOCK_TIMEOUT,
+1213 => DB_ERROR_DEADLOCK,
 1216 => DB_ERROR_CONSTRAINT,
 1217 => DB_ERROR_CONSTRAINT,
 1356 => DB_ERROR_INVALID_VIEW,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iddf380d6db9e9e42e6d5703e26da71f7fe3e498a
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm/civicrm
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] RelPath[master]: Drop support for PHP 5.3 and PHP 5.4

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

Change subject: Drop support for PHP 5.3 and PHP 5.4
..

Drop support for PHP 5.3 and PHP 5.4

Per T75901, MediaWiki no longer supports this. Our CI environment
also hasn't been verifying this library on PHP 5.3 or PHP 5.4 for
a while.

Travis CI also hasn't supported PHP 5.3 for a while. PHP 5.4 still
works, but if we're bumping it now, we might as well go straight
to the current minimum requirement so that we can sustain this
level for a bit longer without requiring another major version
bump.

Change-Id: Iffb7b707e2ef04895db3d18ed2db8494a99883cf
---
M .travis.yml
M composer.json
2 files changed, 1 insertion(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/RelPath refs/changes/16/368516/1

diff --git a/.travis.yml b/.travis.yml
index bd9062f..5692e72 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -2,8 +2,6 @@
 dist: trusty
 language: php
 php:
-  - "5.3"
-  - "5.4"
   - "5.5"
   - "5.6"
   - "7.0"
diff --git a/composer.json b/composer.json
index b6043e2..5f1af2c 100644
--- a/composer.json
+++ b/composer.json
@@ -15,7 +15,7 @@
]
},
"require": {
-   "php": ">=5.3.3"
+   "php": ">=5.5.9"
},
"require-dev": {
"jakub-onderka/php-parallel-lint": "^0.9.0.0",

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iffb7b707e2ef04895db3d18ed2db8494a99883cf
Gerrit-PatchSet: 1
Gerrit-Project: RelPath
Gerrit-Branch: master
Gerrit-Owner: Krinkle 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: releases: rsync reprepro data, set active server in Hiera

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

Change subject: releases: rsync reprepro data, set active server in Hiera
..


releases: rsync reprepro data, set active server in Hiera

Bug: T164030
Change-Id: Ibbe147a5993e3421e7993d64cbd1887e176c6c47
---
M hieradata/common.yaml
M modules/profile/manifests/releases/mediawiki.pp
M modules/profile/manifests/releases/reprepro.pp
M modules/role/manifests/releases.pp
4 files changed, 25 insertions(+), 9 deletions(-)

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



diff --git a/hieradata/common.yaml b/hieradata/common.yaml
index e45ce54..1139192 100644
--- a/hieradata/common.yaml
+++ b/hieradata/common.yaml
@@ -466,6 +466,9 @@
 
 netmon_server: netmon1002.wikimedia.org
 
+releases_server: releases1001.eqiad.wmnet
+releases_server_failover: releases2001.codfw.wmnet
+
 # Etcd client global configuration
 etcd_client_srv_domain: "conftool.%{::site}.wmnet"
 etcd_host: ''
diff --git a/modules/profile/manifests/releases/mediawiki.pp 
b/modules/profile/manifests/releases/mediawiki.pp
index 1056941..3a11e24 100644
--- a/modules/profile/manifests/releases/mediawiki.pp
+++ b/modules/profile/manifests/releases/mediawiki.pp
@@ -1,7 +1,9 @@
 # server hosting Mediawiki releases
 # https://releases.wikimedia.org/mediawiki/
-class profile::releases::mediawiki {
-
+class profile::releases::mediawiki (
+$active_server = hiera('releases_server'),
+$passive_server = hiera('releases_server_failover'),
+){
 class { '::jenkins':
 access_log => true,
 http_port  => '8080',
@@ -25,4 +27,11 @@
 }
 
 backup::set { 'srv-org-wikimedia': }
+
+rsync::quickdatacopy { 'srv-org-wikimedia-releases':
+  ensure  => present,
+  source_host => $active_server,
+  dest_host   => $passive_server,
+  module_path => '/srv/org/wikimedia/releases',
+}
 }
diff --git a/modules/profile/manifests/releases/reprepro.pp 
b/modules/profile/manifests/releases/reprepro.pp
index bbb0336..2a9f805 100644
--- a/modules/profile/manifests/releases/reprepro.pp
+++ b/modules/profile/manifests/releases/reprepro.pp
@@ -1,6 +1,9 @@
 # server hosting Mediawiki releases
 # https://releases.wikimedia.org/mediawiki/
-class profile::releases::reprepro {
+class profile::releases::reprepro(
+$active_server = hiera('releases_server'),
+$passive_server = hiera('releases_server_failover'),
+){
 
   class { '::releases::reprepro': }
 
@@ -9,4 +12,11 @@
   ensure => present,
   rule   => 'proto tcp dport ssh saddr $DEPLOYMENT_HOSTS ACCEPT;',
   }
+
+rsync::quickdatacopy { 'srv-org-wikimedia-reprepro':
+  ensure  => present,
+  source_host => $active_server,
+  dest_host   => $passive_server,
+  module_path => '/srv/org/wikimedia/reprepro',
+}
 }
diff --git a/modules/role/manifests/releases.pp 
b/modules/role/manifests/releases.pp
index 9f6ee57..426ddec 100644
--- a/modules/role/manifests/releases.pp
+++ b/modules/role/manifests/releases.pp
@@ -14,10 +14,4 @@
 include ::profile::releases::mediawiki
 include ::profile::releases::reprepro
 
-rsync::quickdatacopy { 'srv-org-wikimedia-releases':
-  ensure  => present,
-  source_host => 'releases1001.eqiad.wmnet',
-  dest_host   => 'releases2001.codfw.wmnet',
-  module_path => '/srv/org/wikimedia/releases',
-}
 }

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: rdbms: Complete coverage for Database::selectSQLText()

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

Change subject: rdbms: Complete coverage for Database::selectSQLText()
..


rdbms: Complete coverage for Database::selectSQLText()

Only missing cases where 'USE INDEX' and 'IGNORE INDEX'.
The test doesn't do much since the underlying methods are no-ops
by default, but at least it ensures there are no PHP errors from
these branches.

We can later re-use some of these test cases in tests specific
to one backend.

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

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



diff --git a/tests/phpunit/includes/libs/rdbms/database/DatabaseSQLTest.php 
b/tests/phpunit/includes/libs/rdbms/database/DatabaseSQLTest.php
index f519772..7b84117 100644
--- a/tests/phpunit/includes/libs/rdbms/database/DatabaseSQLTest.php
+++ b/tests/phpunit/includes/libs/rdbms/database/DatabaseSQLTest.php
@@ -31,6 +31,8 @@
 * @covers Wikimedia\Rdbms\Database::select
 * @covers Wikimedia\Rdbms\Database::selectSQLText
 * @covers Wikimedia\Rdbms\Database::tableNamesWithIndexClauseOrJOIN
+* @covers Wikimedia\Rdbms\Database::useIndexClause
+* @covers Wikimedia\Rdbms\Database::ignoreIndexClause
 * @covers Wikimedia\Rdbms\Database::makeSelectOptions
 * @covers Wikimedia\Rdbms\Database::makeOrderBy
 * @covers Wikimedia\Rdbms\Database::makeGroupByWithHaving
@@ -155,6 +157,24 @@
[
'tables' => 'table',
'fields' => [ 'field' ],
+   'options' => [ 'USE INDEX' => [ 'table' 
=> 'X' ] ],
+   ],
+   // No-op by default
+   "SELECT field FROM table"
+   ],
+   [
+   [
+   'tables' => 'table',
+   'fields' => [ 'field' ],
+   'options' => [ 'IGNORE INDEX' => [ 
'table' => 'X' ] ],
+   ],
+   // No-op by default
+   "SELECT field FROM table"
+   ],
+   [
+   [
+   'tables' => 'table',
+   'fields' => [ 'field' ],
'options' => [ 'DISTINCT', 'LOCK IN 
SHARE MODE' ],
],
"SELECT DISTINCT field FROM table  LOCK IN 
SHARE MODE"

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

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

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


[MediaWiki-commits] [Gerrit] integration/commit-message-validator[master]: [IMPROV] Don't include BAD_FOOTERS in FOOTERS

2017-07-28 Thread XZise (Code Review)
XZise has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/368515 )

Change subject: [IMPROV] Don't include BAD_FOOTERS in FOOTERS
..

[IMPROV] Don't include BAD_FOOTERS in FOOTERS

If a key in BAD_FOOTERS is not included in FOOTERS it won't be tested, so it's
better to first normalize the footer further by using BAD_FOOTERS and after
that use FOOTERS.

Change-Id: I9353d07d41a2d4428189e0cc6b0b06a324c817ce
---
M commit_message_validator/__init__.py
1 file changed, 4 insertions(+), 7 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/integration/commit-message-validator 
refs/changes/15/368515/1

diff --git a/commit_message_validator/__init__.py 
b/commit_message_validator/__init__.py
index 4aaf665..48c9f5e 100644
--- a/commit_message_validator/__init__.py
+++ b/commit_message_validator/__init__.py
@@ -43,15 +43,12 @@
 'bug',
 'cc',
 'change-id',
-'closes',
 'co-authored-by',
 'depends-on',
-'fixes',
 'reported-by',
 'reviewed-by',
 'signed-off-by',
 'suggested-by',
-'task',
 'tested-by',
 'thanks',
 ]
@@ -135,6 +132,10 @@
 ws = m.group('ws')
 value = m.group('value')
 
+if normalized_name in BAD_FOOTERS:
+# Treat as the correct name for the rest of the rules
+normalized_name = BAD_FOOTERS[normalized_name]
+
 if normalized_name not in FOOTERS:
 if self._in_footers:
 yield "Unexpected line in footers"
@@ -146,10 +147,6 @@
 self._in_footers = True
 elif not self._in_footers:
 yield "Expected '{0}:' to be in footer".format(name)
-
-if normalized_name in BAD_FOOTERS:
-# Treat as the correct name for the rest of the rules
-normalized_name = BAD_FOOTERS[normalized_name]
 
 if normalized_name == 'bug':
 if name != 'Bug':

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9353d07d41a2d4428189e0cc6b0b06a324c817ce
Gerrit-PatchSet: 1
Gerrit-Project: integration/commit-message-validator
Gerrit-Branch: master
Gerrit-Owner: XZise 

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


[MediaWiki-commits] [Gerrit] RelPath[master]: build: Migrate to Trusty image to fix HHVM

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

Change subject: build: Migrate to Trusty image to fix HHVM
..


build: Migrate to Trusty image to fix HHVM

Since the last build (4 months ago) HHVM dropped support for Precise,
at which point Travis also removed support for php:hhvm on Precise.

Use the "new" Trusty images instead.

Change-Id: I5d76a229a57a35a1d9bd69b309d51041e054d327
---
M .travis.yml
1 file changed, 1 insertion(+), 3 deletions(-)

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



diff --git a/.travis.yml b/.travis.yml
index ae8113f..bd9062f 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,7 +1,7 @@
 sudo: false
+dist: trusty
 language: php
 php:
-  - "5.3.3"
   - "5.3"
   - "5.4"
   - "5.5"
@@ -9,8 +9,6 @@
   - "7.0"
   - "7.1"
   - "hhvm"
-before_install:
-  - if [ "$TRAVIS_PHP_VERSION" = "5.3.3" ]; then composer config disable-tls 
true; composer config secure-http false; fi
 install:
   - composer install
 script:

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5d76a229a57a35a1d9bd69b309d51041e054d327
Gerrit-PatchSet: 1
Gerrit-Project: RelPath
Gerrit-Branch: master
Gerrit-Owner: Krinkle 
Gerrit-Reviewer: Bartosz Dziewoński 
Gerrit-Reviewer: BryanDavis 
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] wikimedia...crm[master]: Add country to c_t rows created during imports

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

Change subject: Add country to c_t rows created during imports
..


Add country to c_t rows created during imports

...but only when it's valid.

Bug: T171658
Change-Id: If685b1e82a5f5a3f01367e908bb2834a73f27133
---
M sites/all/modules/wmf_civicrm/wmf_civicrm.module
1 file changed, 6 insertions(+), 0 deletions(-)

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



diff --git a/sites/all/modules/wmf_civicrm/wmf_civicrm.module 
b/sites/all/modules/wmf_civicrm/wmf_civicrm.module
index e817af0..81f2be6 100644
--- a/sites/all/modules/wmf_civicrm/wmf_civicrm.module
+++ b/sites/all/modules/wmf_civicrm/wmf_civicrm.module
@@ -1810,6 +1810,12 @@
 'anonymous' => $anonymous,
 'ts' => wmf_common_date_unix_to_sql( $msg['date'] )
 );
+if (
+!empty( $msg['country'] ) &&
+CRM_Core_PseudoConstant::countryIsoCode( $msg['country'] ) !== 
null
+) {
+$tracking['country'] = $msg['country'];
+}
 $contribution_tracking_id = 
wmf_civicrm_insert_contribution_tracking( $tracking );
 watchdog( 'wmf_civicrm', 'Newly inserted contribution tracking id: 
@id', array( '@id' => $contribution_tracking_id ), WATCHDOG_DEBUG );
 $msg['contribution_tracking_id'] = $contribution_tracking_id;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If685b1e82a5f5a3f01367e908bb2834a73f27133
Gerrit-PatchSet: 7
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: master
Gerrit-Owner: Ejegg 
Gerrit-Reviewer: Cdentinger 
Gerrit-Reviewer: Eileen 
Gerrit-Reviewer: Ejegg 
Gerrit-Reviewer: Mepps 
Gerrit-Reviewer: XenoRyet 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Improve (fix?) loading updating of pages for offline use.

2017-07-28 Thread Dbrant (Code Review)
Dbrant has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/368488 )

Change subject: Improve (fix?) loading updating of pages for offline use.
..

Improve (fix?) loading updating of pages for offline use.

This takes care of a few weak spots in our logic for saving and updating
articles in reading lists.
Here's an overview of our *current* behavior:

- Navigate to a page (load the page content from the network)
- Save it to a reading list (put the page in the sync queue, which will
  download it to the SAVE cache).
- Do other stuff.
- Go offline.
- Navigate to the original page.
- The page is loaded from the offline cache, BUT!! We're forgetting
  something else:
- Whenever we load a page, we fire off a task that checks whether this
  page belongs to a reading list (to fill in the bookmark icon). When this
  task returns, and the page is part of a reading list, we *invalidate* the
  page, putting it back in the queue of pages to be downloaded by the sync
  service. This invalidation happens regardless of whether we're currently
  online or offline. Something doesn't sound right about this.

Here's the updated logic in this patch:

- Checking whether the page belongs to a reading list is now a first-class
  prerequisite to loading the page contents.
- Once we know whether the page is part of a reading list, we can fill in
  the bookmark icon without querying the db again.
- But most crucially, this knowledge allows us to specify which cache the
  Lead and Remaining sections will be written to!  This completely
  eliminates the need to invalidate the page, because any updated content
  from the network will be automatically written to the correct cache.

I've renamed some of the page loading methods in PageFragmentLoadState to
start with the words "pageLoad", to give a slightly better sense that
these methods are related and/or chained together. Ideally, they should be
refactored into a promise-style chain of calls, e.g.:

loadLeadSection().then( ... ).then( ... )...

One other thing: Since BaseActivity now knows when the user goes online, I
added a call to sync the SavedPageService, for good measure.

Bug: T169819
Bug: T171939
Change-Id: I1c96a1ce28c4d2cd2c47a3b13f2fd8a9ea8d446b
---
M app/src/main/java/org/wikipedia/activity/BaseActivity.java
M app/src/main/java/org/wikipedia/page/PageActivity.java
M app/src/main/java/org/wikipedia/page/PageFragment.java
M app/src/main/java/org/wikipedia/page/PageFragmentLoadState.java
M app/src/main/java/org/wikipedia/page/PageViewModel.java
5 files changed, 132 insertions(+), 80 deletions(-)


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

diff --git a/app/src/main/java/org/wikipedia/activity/BaseActivity.java 
b/app/src/main/java/org/wikipedia/activity/BaseActivity.java
index 5f9cce6..a208649 100644
--- a/app/src/main/java/org/wikipedia/activity/BaseActivity.java
+++ b/app/src/main/java/org/wikipedia/activity/BaseActivity.java
@@ -192,6 +192,7 @@
 public void onReceive(Context context, Intent intent) {
 if (DeviceUtil.isOnline()) {
 onGoOnline();
+ReadingListSynchronizer.instance().syncSavedPages();
 } else {
 onGoOffline();
 }
diff --git a/app/src/main/java/org/wikipedia/page/PageActivity.java 
b/app/src/main/java/org/wikipedia/page/PageActivity.java
index 8898b84..4f37a45 100644
--- a/app/src/main/java/org/wikipedia/page/PageActivity.java
+++ b/app/src/main/java/org/wikipedia/page/PageActivity.java
@@ -110,7 +110,7 @@
 private DialogInterface.OnDismissListener listDialogDismissListener = new 
DialogInterface.OnDismissListener() {
 @Override
 public void onDismiss(DialogInterface dialogInterface) {
-pageFragment.updateBookmark();
+pageFragment.updateBookmarkFromDao();
 }
 };
 
@@ -543,7 +543,7 @@
 }
 FeedbackUtil.showMessage(getActivity(),
 getString(R.string.reading_list_item_deleted, 
title.getDisplayText()));
-pageFragment.updateBookmark();
+pageFragment.updateBookmarkFromDao();
 }
 
 @Nullable
diff --git a/app/src/main/java/org/wikipedia/page/PageFragment.java 
b/app/src/main/java/org/wikipedia/page/PageFragment.java
index 50a54dc..d6f3d0c 100755
--- a/app/src/main/java/org/wikipedia/page/PageFragment.java
+++ b/app/src/main/java/org/wikipedia/page/PageFragment.java
@@ -71,7 +71,6 @@
 import org.wikipedia.readinglist.ReadingListBookmarkMenu;
 import org.wikipedia.readinglist.page.ReadingListPage;
 import org.wikipedia.readinglist.page.database.ReadingListDaoProxy;
-import org.wikipedia.readinglist.page.database.ReadingListPageDao;
 import org.wikipedia.settings.Prefs;
 import org.wikipedia.tooltip.ToolTipUtil;
 import org.wikipedia.util.ActiveTimer;
@@ -153,7 +152,6 @@
 private PageFragmentLoadState pageFragmentLoadState;
 

[MediaWiki-commits] [Gerrit] RelPath[master]: build: Migrate to Trusty image to fix HHVM

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

Change subject: build: Migrate to Trusty image to fix HHVM
..

build: Migrate to Trusty image to fix HHVM

Since the last build (4 months ago) HHVM dropped support for Precise,
at which point Travis also removed support for php:hhvm on Precise.

Use the "new" Trusty images instead.

Change-Id: I5d76a229a57a35a1d9bd69b309d51041e054d327
---
M .travis.yml
1 file changed, 1 insertion(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/RelPath refs/changes/87/368487/1

diff --git a/.travis.yml b/.travis.yml
index ae8113f..bd9062f 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,7 +1,7 @@
 sudo: false
+dist: trusty
 language: php
 php:
-  - "5.3.3"
   - "5.3"
   - "5.4"
   - "5.5"
@@ -9,8 +9,6 @@
   - "7.0"
   - "7.1"
   - "hhvm"
-before_install:
-  - if [ "$TRAVIS_PHP_VERSION" = "5.3.3" ]; then composer config disable-tls 
true; composer config secure-http false; fi
 install:
   - composer install
 script:

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5d76a229a57a35a1d9bd69b309d51041e054d327
Gerrit-PatchSet: 1
Gerrit-Project: RelPath
Gerrit-Branch: master
Gerrit-Owner: Krinkle 

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


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

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

Change subject: clean up insert_contribution_tracking signature
..


clean up insert_contribution_tracking signature

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

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



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

[MediaWiki-commits] [Gerrit] operations/puppet[production]: releases: add releases2001 to site, change rsync direction

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

Change subject: releases: add releases2001 to site, change rsync direction
..


releases: add releases2001 to site, change rsync direction

- add releases2001 to site.pp, equivalent to releases1001
- change rsync direction from former releases-server bromine,
  now rsync from 1001->2001

Bug: T171917
Change-Id: I5f707a4c4ddd02f3021cb5b8b05968910dac5d43
---
M manifests/site.pp
M modules/role/manifests/releases.pp
2 files changed, 4 insertions(+), 4 deletions(-)

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



diff --git a/manifests/site.pp b/manifests/site.pp
index eb9e54e..b2b5d5a 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -2017,8 +2017,8 @@
 role(jobqueue_redis::slave)
 }
 
-# https://releases.wikimedia.org - VM for releases (mediawiki and other)
-node 'releases1001.eqiad.wmnet' {
+# https://releases.wikimedia.org - VMs for releases (mediawiki and other)
+node /^releases[12]001\.(codfw|eqiad)\.wmnet$/ {
 role(releases)
 interface::add_ip6_mapped { 'main': }
 }
diff --git a/modules/role/manifests/releases.pp 
b/modules/role/manifests/releases.pp
index 28e91ec..9f6ee57 100644
--- a/modules/role/manifests/releases.pp
+++ b/modules/role/manifests/releases.pp
@@ -16,8 +16,8 @@
 
 rsync::quickdatacopy { 'srv-org-wikimedia-releases':
   ensure  => present,
-  source_host => 'bromine.eqiad.wmnet',
-  dest_host   => 'releases1001.eqiad.wmnet',
+  source_host => 'releases1001.eqiad.wmnet',
+  dest_host   => 'releases2001.codfw.wmnet',
   module_path => '/srv/org/wikimedia/releases',
 }
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5f707a4c4ddd02f3021cb5b8b05968910dac5d43
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn 
Gerrit-Reviewer: Chad 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: Giuseppe Lavagetto 
Gerrit-Reviewer: Greg Grossmeier 
Gerrit-Reviewer: Paladox 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: RCFilters: Allow setting a new query as default

2017-07-28 Thread Sbisson (Code Review)
Sbisson has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/368478 )

Change subject: RCFilters: Allow setting a new query as default
..

RCFilters: Allow setting a new query as default

When creating a new saved query, there's a checkbox
to set it as default as the same time.

Bug: T171922
Change-Id: Id6da0e79c54bc65d76636bbff64b2ece568c0cd4
---
M languages/i18n/en.json
M languages/i18n/qqq.json
M resources/Resources.php
M resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.SavedQueriesModel.js
M resources/src/mediawiki.rcfilters/mw.rcfilters.Controller.js
M 
resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.SaveFiltersPopupButtonWidget.less
M resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.less
M 
resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.SaveFiltersPopupButtonWidget.js
8 files changed, 44 insertions(+), 22 deletions(-)


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

diff --git a/languages/i18n/en.json b/languages/i18n/en.json
index 2f09573..b18fa0b 100644
--- a/languages/i18n/en.json
+++ b/languages/i18n/en.json
@@ -1369,6 +1369,7 @@
"rcfilters-savedqueries-new-name-label": "Name",
"rcfilters-savedqueries-new-name-placeholder": "Describe the purpose of 
the filter",
"rcfilters-savedqueries-apply-label": "Create filter",
+   "rcfilters-savedqueries-apply-and-setdefault-label": "Create default 
filter",
"rcfilters-savedqueries-cancel-label": "Cancel",
"rcfilters-savedqueries-add-new-title": "Save current filter settings",
"rcfilters-restore-default-filters": "Restore default filters",
diff --git a/languages/i18n/qqq.json b/languages/i18n/qqq.json
index c0d6ad5..5609f75 100644
--- a/languages/i18n/qqq.json
+++ b/languages/i18n/qqq.json
@@ -1559,6 +1559,7 @@
"rcfilters-savedqueries-new-name-label": "Label for the input that 
holds the name of the new saved filters in 
[[Special:RecentChanges]]\n{{Identical|Name}}",
"rcfilters-savedqueries-new-name-placeholder": "Placeholder for the 
input that holds the name of the new saved filters in 
[[Special:RecentChanges]]",
"rcfilters-savedqueries-apply-label": "Label for the button to apply 
saving a new filter setting in [[Special:RecentChanges]]. This is for a small 
popup, please try to use a short string.",
+   "rcfilters-savedqueries-apply-and-setdefault-label": "Label for the 
button to apply saving a new filter setting and set it as default in 
[[Special:RecentChanges]]. This is for a small popup, please try to use a short 
string.",
"rcfilters-savedqueries-cancel-label": "Label for the button to cancel 
the saving of a new quick link in 
[[Special:RecentChanges]]\n{{Identical|Cancel}}",
"rcfilters-savedqueries-add-new-title": "Title for the popup to add new 
quick link in [[Special:RecentChanges]]. This is for a small popup, please try 
to use a short string.",
"rcfilters-restore-default-filters": "Label for the button that resets 
filters to defaults",
diff --git a/resources/Resources.php b/resources/Resources.php
index 64ecc96..cc282e3 100644
--- a/resources/Resources.php
+++ b/resources/Resources.php
@@ -1853,6 +1853,7 @@
'rcfilters-savedqueries-new-name-placeholder',
'rcfilters-savedqueries-add-new-title',
'rcfilters-savedqueries-apply-label',
+   'rcfilters-savedqueries-apply-and-setdefault-label',
'rcfilters-savedqueries-cancel-label',
'rcfilters-restore-default-filters',
'rcfilters-clear-all-filters',
diff --git 
a/resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.SavedQueriesModel.js 
b/resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.SavedQueriesModel.js
index 29134a5..d6dda1e 100644
--- a/resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.SavedQueriesModel.js
+++ b/resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.SavedQueriesModel.js
@@ -119,6 +119,7 @@
 *
 * @param {string} label Label for the new query
 * @param {Object} data Data for the new query
+* @return {string} ID of the newly added query
 */
mw.rcfilters.dm.SavedQueriesModel.prototype.addNewQuery = function ( 
label, data ) {
var randomID = ( new Date() ).getTime(),
@@ -132,6 +133,8 @@
normalizedData
)
] );
+
+   return randomID;
};
 
/**
diff --git a/resources/src/mediawiki.rcfilters/mw.rcfilters.Controller.js 
b/resources/src/mediawiki.rcfilters/mw.rcfilters.Controller.js
index 2563479..027c2f5 100644
--- a/resources/src/mediawiki.rcfilters/mw.rcfilters.Controller.js
+++ b/resources/src/mediawiki.rcfilters/mw.rcfilters.Controller.js
@@ -448,9 +448,11 @@
 * Save the current model state as 

[MediaWiki-commits] [Gerrit] operations/puppet[production]: releases: add releases2001 to site, change rsync direction

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

Change subject: releases: add releases2001 to site, change rsync direction
..

releases: add releases2001 to site, change rsync direction

- add releases2001 to site.pp, equivalent to releases1001
- change rsync direction from former releases-server bromine,
  now rsync from 1001->2001

Bug: T171917
Change-Id: I5f707a4c4ddd02f3021cb5b8b05968910dac5d43
---
M manifests/site.pp
M modules/role/manifests/releases.pp
2 files changed, 4 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/77/368477/1

diff --git a/manifests/site.pp b/manifests/site.pp
index eb9e54e..b2b5d5a 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -2017,8 +2017,8 @@
 role(jobqueue_redis::slave)
 }
 
-# https://releases.wikimedia.org - VM for releases (mediawiki and other)
-node 'releases1001.eqiad.wmnet' {
+# https://releases.wikimedia.org - VMs for releases (mediawiki and other)
+node /^releases[12]001\.(codfw|eqiad)\.wmnet$/ {
 role(releases)
 interface::add_ip6_mapped { 'main': }
 }
diff --git a/modules/role/manifests/releases.pp 
b/modules/role/manifests/releases.pp
index 28e91ec..9f6ee57 100644
--- a/modules/role/manifests/releases.pp
+++ b/modules/role/manifests/releases.pp
@@ -16,8 +16,8 @@
 
 rsync::quickdatacopy { 'srv-org-wikimedia-releases':
   ensure  => present,
-  source_host => 'bromine.eqiad.wmnet',
-  dest_host   => 'releases1001.eqiad.wmnet',
+  source_host => 'releases1001.eqiad.wmnet',
+  dest_host   => 'releases2001.codfw.wmnet',
   module_path => '/srv/org/wikimedia/releases',
 }
 }

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Jobrunner: create dsh groups per datacenter

2017-07-28 Thread Thcipriani (Code Review)
Thcipriani has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/368476 )

Change subject: Jobrunner: create dsh groups per datacenter
..

Jobrunner: create dsh groups per datacenter

Create dsh groups that contain only the per-datacenter boxen for
jobrunner targets. The idea will be to use these targets to restart only
the jobrunners in a particular (the active) datacenter.

Bug: T129148
Change-Id: Ib693cee472b01cd920ca34dfb0af636aef405791
---
M hieradata/common/scap/dsh.yaml
1 file changed, 8 insertions(+), 4 deletions(-)


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

diff --git a/hieradata/common/scap/dsh.yaml b/hieradata/common/scap/dsh.yaml
index e220bec..1d4b955 100644
--- a/hieradata/common/scap/dsh.yaml
+++ b/hieradata/common/scap/dsh.yaml
@@ -16,14 +16,18 @@
 
 
 scap::dsh::groups:
-  jobrunner-canaries:
-hosts:
-  - mw1299.eqiad.wmnet
-  - mw2247.codfw.wmnet
   jobrunner:
 conftool:
   - {'cluster': 'videoscaler', 'service': 'apache2'}
   - {'cluster': 'jobrunner', 'service': 'apache2'}
+  jobrunner-eqiad:
+conftool:
+  - {'cluster': 'videoscaler', 'service': 'apache2', 'datacenters': 
['eqiad']}
+  - {'cluster': 'jobrunner', 'service': 'apache2', 'datacenters': 
['eqiad']}
+  jobrunner-codfw:
+conftool:
+  - {'cluster': 'videoscaler', 'service': 'apache2', 'datacenters': 
['codfw']}
+  - {'cluster': 'jobrunner', 'service': 'apache2', 'datacenters': 
['codfw']}
   mediawiki-installation:
 conftool:
   - {'cluster': 'appserver', 'service': 'apache2'}

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...DonationInterface[master]: It's just 'Test', not 'TestMode'

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

Change subject: It's just 'Test', not 'TestMode'
..


It's just 'Test', not 'TestMode'

Change-Id: I44e8867a5adf916d1bdb89337e72ed6022ab59a5
---
M DonationInterface.class.php
M tests/phpunit/DonationInterfaceTestCase.php
M tests/phpunit/TestConfiguration.php
3 files changed, 7 insertions(+), 7 deletions(-)

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



diff --git a/DonationInterface.class.php b/DonationInterface.class.php
index e02dc69..8f014e6 100644
--- a/DonationInterface.class.php
+++ b/DonationInterface.class.php
@@ -9,15 +9,15 @@
 * Executed after processing extension.json
 */
public static function registerExtension() {
-   global $wgDonationInterfaceTestMode,
+   global $wgDonationInterfaceTest,
$wgDonationInterfaceTemplate,
$wgDonationInterfaceErrorTemplate,
$IP;
 
// Test mode (not for production!)
// Set it if not defined
-   if ( !isset( $wgDonationInterfaceTestMode) || 
$wgDonationInterfaceTestMode !== true ) {
-   $wgDonationInterfaceTestMode = false;
+   if ( !isset( $wgDonationInterfaceTest ) || 
$wgDonationInterfaceTest !== true ) {
+   $wgDonationInterfaceTest = false;
}
 
/**
diff --git a/tests/phpunit/DonationInterfaceTestCase.php 
b/tests/phpunit/DonationInterfaceTestCase.php
index 2d321b1..12ea84b 100644
--- a/tests/phpunit/DonationInterfaceTestCase.php
+++ b/tests/phpunit/DonationInterfaceTestCase.php
@@ -60,8 +60,8 @@
public function __construct( $name = null, array $data = array(), 
$dataName = '' ) {
 
//Just in case you got here without running the configuration...
-   global $wgDonationInterfaceTestMode;
-   $wgDonationInterfaceTestMode = true;
+   global $wgDonationInterfaceTest;
+   $wgDonationInterfaceTest = true;
 
parent::__construct( $name, $data, $dataName );
}
diff --git a/tests/phpunit/TestConfiguration.php 
b/tests/phpunit/TestConfiguration.php
index 6d9418e..8763cbf 100644
--- a/tests/phpunit/TestConfiguration.php
+++ b/tests/phpunit/TestConfiguration.php
@@ -52,7 +52,7 @@
  */
 define( 'TESTS_ADAPTER_DEFAULT', 'TestingGlobalCollectAdapter' );
 
-global $wgDonationInterfaceTestMode,
+global $wgDonationInterfaceTest,
$wgDonationInterfaceMerchantID,
$wgDonationInterfaceGatewayAdapters,
$wgDonationInterfaceAllowedHtmlForms,
@@ -105,7 +105,7 @@
  * Make sure the test setup is used, else we'll have the wrong classes.
  */
 /** DonationInterface General Settings **/
-$wgDonationInterfaceTestMode = true;
+$wgDonationInterfaceTest = true;
 $wgDonationInterfaceMerchantID = 'test';
 
 $wgDonationInterfaceThankYouPage = 
'https://wikimediafoundation.org/wiki/Thank_You';

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I44e8867a5adf916d1bdb89337e72ed6022ab59a5
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/DonationInterface
Gerrit-Branch: master
Gerrit-Owner: Ejegg 
Gerrit-Reviewer: AndyRussG 
Gerrit-Reviewer: Cdentinger 
Gerrit-Reviewer: Eileen 
Gerrit-Reviewer: Katie Horn 
Gerrit-Reviewer: Mepps 
Gerrit-Reviewer: XenoRyet 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] wikimedia...relevanceForge[master]: Add Analysis Analysis Tools to RelForge and Re-org Directory...

2017-07-28 Thread Tjones (Code Review)
Tjones has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/368475 )

Change subject: Add Analysis Analysis Tools to RelForge and Re-org Directory 
Structure
..

Add Analysis Analysis Tools to RelForge and Re-org Directory Structure

Rename misc/ directory to other_tools/

Move scripts not related to the Relevancy Runner into other_tools

Add analysis analysis tools, examples, and docs to other_tools

Update RelForge README file to reflect changes, alphabetize Other
Tools section, fix typos

Add/change a few default configs in relcomp.py

Bug: T171516
Change-Id: I3a71a7af35488cb87706fdd17db4d7b43a1ac39b
---
M README.md
A other_tools/analysis_analysis/README.md
A other_tools/analysis_analysis/analyze_counts.pl
A other_tools/analysis_analysis/compare_counts.pl
A other_tools/analysis_analysis/compare_counts/langdata/chinese.txt
A other_tools/analysis_analysis/compare_counts/langdata/default.txt
A other_tools/analysis_analysis/compare_counts/langdata/english.txt
A other_tools/analysis_analysis/compare_counts/langdata/example.txt
A other_tools/analysis_analysis/compare_counts/langdata/french.txt
A other_tools/analysis_analysis/compare_counts/langdata/hebrew.txt
A other_tools/analysis_analysis/compare_counts/langdata/polish.txt
A other_tools/analysis_analysis/compare_counts/langdata/russian.txt
A other_tools/analysis_analysis/compare_counts/langdata/ukrainian.txt
A other_tools/analysis_analysis/samples/data/en.txt
A other_tools/analysis_analysis/samples/data/fr.txt
A other_tools/analysis_analysis/samples/data/he.txt
A other_tools/analysis_analysis/samples/data/ja.txt
A other_tools/analysis_analysis/samples/data/pl.txt
A other_tools/analysis_analysis/samples/data/ru.txt
A other_tools/analysis_analysis/samples/data/sv.txt
A other_tools/analysis_analysis/samples/data/uk.txt
A other_tools/analysis_analysis/samples/data/vi.txt
A other_tools/analysis_analysis/samples/data/zh.txt
A other_tools/analysis_analysis/samples/output/en.comp.folded_self.html
A other_tools/analysis_analysis/samples/output/en.comp.unfolded_vs_folded._f.txt
A other_tools/analysis_analysis/samples/output/en.comp.unfolded_vs_folded.txt
A other_tools/analysis_analysis/samples/output/en.counts.folded.txt
A other_tools/analysis_analysis/samples/output/en.counts.unfolded.txt
A other_tools/analysis_analysis/samples/output/pl.counts.default.txt
A other_tools/analysis_analysis/samples/output/pl.counts.stempel.txt
R other_tools/augmentdump.py
R other_tools/comp_suggest_score.R
R other_tools/count_keyword_usage.hql
R other_tools/cqd.py
R other_tools/fulltextQueriesSample.hql
R other_tools/importindices.py
R other_tools/metastats.py
R other_tools/pwl_edf.py
M relcomp.py
39 files changed, 542,780 insertions(+), 21 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/discovery/relevanceForge 
refs/changes/75/368475/1


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3a71a7af35488cb87706fdd17db4d7b43a1ac39b
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] mediawiki...DonationInterface[master]: Remove obsolete selenium tests and WP responses.

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

Change subject: Remove obsolete selenium tests and WP responses.
..

Remove obsolete selenium tests and WP responses.

These are for the old RapidHTML forms, and are not being run in CI
WorldPay is no longer an option

Change-Id: I27fdebf894411a2c8c5bd83f0f9fcb29838e5144
---
D 
tests/macros/form.twostepamount.banktransfer.netherlands.fail.not.a.valid.combination.htm
D tests/macros/form.twostepamount.banktransfer.netherlands.htm
D tests/macros/form.twostepamount.banktransfer.spain.htm
D tests/macros/form.twostepamount.creditcard.visa.us.htm
D tests/macros/form.twostepamount.directdebit.austria.htm
D tests/macros/form.twostepamount.directdebit.belgium.htm
D tests/macros/form.twostepamount.directdebit.belgium.invalid.length.htm
D tests/macros/form.twostepamount.directdebit.italy.htm
D 
tests/macros/form.twostepamount.directdebit.netherlands.fail.invalid.accountnumber.length.htm
D tests/macros/form.twostepamount.directdebit.netherlands.htm
D tests/macros/form.twostepamount.directdebit.spain.htm
D tests/macros/form.twostepamount.ewallets.webmoney.htm
D tests/macros/form.twostepamount.onlinebanktransfer.australia.htm
D tests/macros/form.twostepamount.realtimebanktransfer.enets.htm
D tests/macros/form.twostepamount.realtimebanktransfer.eps.824.htm
D tests/macros/form.twostepamount.realtimebanktransfer.ideal.771.htm
D tests/macros/form.twostepamount.realtimebanktransfer.nordea_sweden.htm
D tests/macros/suite-all-payment-gateways.htm
D 
tests/phpunit/includes/Responses/worldpay/AuthorizeAndDepositPayment.testresponse
D 
tests/phpunit/includes/Responses/worldpay/AuthorizePaymentForFraud.testresponse
D 
tests/phpunit/includes/Responses/worldpay/AuthorizePaymentForFraud_2208.testresponse
D 
tests/phpunit/includes/Responses/worldpay/AuthorizePaymentForFraud_9000.testresponse
D 
tests/phpunit/includes/Responses/worldpay/AuthorizePaymentForFraud_snowflake.testresponse
D tests/phpunit/includes/Responses/worldpay/GenerateToken.testresponse
D tests/phpunit/includes/Responses/worldpay/QueryTokenData.testresponse
25 files changed, 0 insertions(+), 1,960 deletions(-)


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

diff --git 
a/tests/macros/form.twostepamount.banktransfer.netherlands.fail.not.a.valid.combination.htm
 
b/tests/macros/form.twostepamount.banktransfer.netherlands.fail.not.a.valid.combination.htm
deleted file mode 100644
index 795c26a..000
--- 
a/tests/macros/form.twostepamount.banktransfer.netherlands.fail.not.a.valid.combination.htm
+++ /dev/null
@@ -1,91 +0,0 @@
-
-http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd;>
-http://www.w3.org/1999/xhtml; xml:lang="en" lang="en">
-http://selenium-ide.openqa.org/profiles/test-case;>
-
-http://wikimedia-fundraising-1.17.localhost.wikimedia.org/; />
-form.twostepamount.banktransfer
-
-
-
-
-form.twostepamount.banktransfer
-
-
-   open
-   
/index.php/Special:GlobalCollectGateway?form_name=TwoStepAmountpayment_method=btpayment_submethod=bt
-   
-
-
-   type
-   id=fname
-   Testy
-
-
-   type
-   id=lname
-   Testerton
-
-
-   select
-   id=country
-   label=Netherlands
-
-
-   type
-   id=street
-   123 Happy Street
-
-
-   type
-   id=city
-   Madrid
-
-
-   type
-   id=emailAdd
-   nob...@wikimedia.org
-
-
-   click
-   id=input_amount_other
-   
-
-
-   type
-   id=other-amount
-   1
-
-
-   selectWindow
-   null
-   
-
-
-   select
-   id=state
-   label=Outside the U.S.
-
-
-   type
-   id=zip
-   123
-
-
-   select
-   id=input_currency_code
-   label=U.S. dollar
-
-
-   clickAndWait
-   css=input.button-plain
-   
-
-
-   verifyText
-   css=p.payment_error_message.payment_error_message_general
-   There was an error processing your transaction. Please try again 
later.
-
-
-
-
diff --git a/tests/macros/form.twostepamount.banktransfer.netherlands.htm 
b/tests/macros/form.twostepamount.banktransfer.netherlands.htm
deleted file mode 100644
index 19199c4..000
--- a/tests/macros/form.twostepamount.banktransfer.netherlands.htm
+++ /dev/null
@@ -1,111 +0,0 @@
-
-http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd;>
-http://www.w3.org/1999/xhtml; xml:lang="en" lang="en">
-http://selenium-ide.openqa.org/profiles/test-case;>
-
-http://wikimedia-fundraising-1.17.localhost.wikimedia.org/; />
-form.twostepamount.banktransfer
-
-
-
-
-form.twostepamount.banktransfer
-
-
-   open
-   
/index.php/Special:GlobalCollectGateway?form_name=TwoStepAmountpayment_method=btpayment_submethod=bt
-   
-
-
-   type
-   id=fname
-   Testy
-
-
-   type
-   id=lname
-   Testerton
-
-
-   select
-   id=country
-   label=Netherlands
-
-
-   type
-   

[MediaWiki-commits] [Gerrit] integration/visualdiff[master]: Add new config + new postprocessing files for comparing Tidy...

2017-07-28 Thread Subramanya Sastry (Code Review)
Subramanya Sastry has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/368468 )

Change subject: Add new config + new postprocessing files for comparing Tidy vs 
Remex
..


Add new config + new postprocessing files for comparing Tidy vs Remex

Change-Id: I5f7fb371445f89c45ff70a80f50fe5d689e2012a
---
A bin/examples/tidy.remex.diffsettings.js
A lib/pm.new.postprocess.js
A lib/pm.old.postprocess.js
3 files changed, 153 insertions(+), 0 deletions(-)

Approvals:
  Subramanya Sastry: Verified; Looks good to me, approved



diff --git a/bin/examples/tidy.remex.diffsettings.js 
b/bin/examples/tidy.remex.diffsettings.js
new file mode 100644
index 000..430658e
--- /dev/null
+++ b/bin/examples/tidy.remex.diffsettings.js
@@ -0,0 +1,39 @@
+module.exports = {
+  // Production wikipedia PHP parser output
+  html1: {
+name: 'tidy',
+postprocessorScript: '../lib/pm.old.postprocess.js',
+injectJQuery: false,
+// suppress default base url computation code
+// since we are providing the full wiki domain
+// on the commandline
+server: 'https://',
+computeURL: function(server, domain, title) {
+  return server + domain + '/wiki/' + encodeURIComponent(title) + 
'?action=parsermigration-edit';
+},
+   // dumpHTML: true,
+  },
+
+  html2: {
+name: 'remex',
+postprocessorScript: '../lib/pm.new.postprocess.js',
+injectJQuery: false,
+// suppress default base url computation code
+// since we are providing the full wiki domain
+// on the commandline
+server: 'https://',
+computeURL: function(server, domain, title) {
+  return server + domain + '/wiki/' + encodeURIComponent(title) + 
'?action=parsermigration-edit';
+},
+   // dumpHTML: true,
+  },
+
+  // Engine for image diffs, may be resemble or uprightdiff
+  diffEngine: 'uprightdiff',
+
+  // UprightDiff options
+  uprightDiffSettings: {
+// Path to your local uprightdiff install
+binary: '/usr/local/bin/uprightdiff',
+  },
+};
diff --git a/lib/pm.new.postprocess.js b/lib/pm.new.postprocess.js
new file mode 100644
index 000..e8288ab
--- /dev/null
+++ b/lib/pm.new.postprocess.js
@@ -0,0 +1,57 @@
+// Post processing of a parsermigration-edit display to strip
+// edit form, chrome, and extract the new (right) view out
+// of a side-by-side display in a table.
+window.postprocessDOM = function() {
+   try {
+   // Freeze animated gifs
+   $('img').each(function(i) {
+   if (/^(?!data:).*\.gif/i.test(this.src)) {
+   var c = document.createElement('canvas');
+   var w = c.width = this.width;
+   var h = c.height = this.height;
+   c.getContext('2d').drawImage(this, 0, 0, w, h);
+   try { this.src = c.toDataURL(); } catch(e) { }
+   }
+   });
+
+   // Hide toc -- since we have some minor pixel shifts in header 
display
+   $('div.toc').hide();
+
+   // Hide catlinks + footer
+   $('div.printFooter').hide();
+   $('div#catlinks').hide();
+   $('div#catlinks+div.visualClear').hide();
+
+   // FIXME: Yuck! This is not a scalable solution
+   $('span.NavToggle a').each(function() { this.click(); }); // 
enwiktionary, ...
+   $('a.collapsible-toggle').each(function() { this.click(); }); 
// eswiktionary
+   $('a.NavToggle').each(function() { this.click(); });
+   $('.collapseButton a').each(function() { this.click(); }); // 
enwiki
+   $('a.UitklapToggle').each(function() { this.click(); }); // 
nlwiki
+   // $('.mw-collapsible-toggle a').each(function() { 
this.click(); }); // itwiki, svwiki, ...
+
+   // Open navboxes and other collapsed content
+   // IMPORTANT: This should be after the clicks above
+   $('table.collapsible tr').show();
+   $('table.mw-collapsible tr').show();
+   $('.NavContent').show();
+
+   // Remove parsermigration edit form, preview notice
+   $('div.previewnote').hide();
+   $('form#editform').hide();
+
+   // Extract the new (right) display out of the table and delete 
the table
+   $('td.mw-parsermigration-right').children().each(function() {
+   $('div.mw-content-ltr').append(this);
+   });
+   $('table.mw-parsermigration-sxs').remove();
+
+   // Finally remove all chrome, only keep the actual content.
+   document.body.innerHTML = $('div#mw-content-text').html();
+   document.body.classList.add('mw-body-content');
+   } catch (e) {
+   return 'PP_FAILED';
+   }
+
+   return 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: RCFilters: Remove $wgStructuredChangeFiltersEnableSaving fea...

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

Change subject: RCFilters: Remove $wgStructuredChangeFiltersEnableSaving 
feature flag
..

RCFilters: Remove $wgStructuredChangeFiltersEnableSaving feature flag

It's set to true now, and the feature is mature enough that we
don't need it to be feature-flagged anymore.

Change-Id: I9202b7ee2f9ff80106d1fb4d3e6cddec04c8b4ac
---
M includes/DefaultSettings.php
M resources/src/mediawiki.rcfilters/mw.rcfilters.Controller.js
M 
resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterTagMultiselectWidget.js
M resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterWrapperWidget.js
4 files changed, 35 insertions(+), 52 deletions(-)


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

diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php
index 77d7b0e..aa4320d 100644
--- a/includes/DefaultSettings.php
+++ b/includes/DefaultSettings.php
@@ -6770,11 +6770,6 @@
 $wgUseRCPatrol = true;
 
 /**
- * Whether to allow users to save their RecentChanges filters
- */
-$wgStructuredChangeFiltersEnableSaving = true;
-
-/**
  * Whether to show the new experimental views (like namespaces, tags, and 
users) in
  * RecentChanges filters
  */
diff --git a/resources/src/mediawiki.rcfilters/mw.rcfilters.Controller.js 
b/resources/src/mediawiki.rcfilters/mw.rcfilters.Controller.js
index 2563479..401d34c 100644
--- a/resources/src/mediawiki.rcfilters/mw.rcfilters.Controller.js
+++ b/resources/src/mediawiki.rcfilters/mw.rcfilters.Controller.js
@@ -763,9 +763,7 @@
savedHighlights = {},
defaultSavedQueryItem = 
this.savedQueriesModel.getItemByID( this.savedQueriesModel.getDefault() );
 
-   if ( mw.config.get( 'wgStructuredChangeFiltersEnableSaving' ) &&
-   defaultSavedQueryItem ) {
-
+   if ( defaultSavedQueryItem ) {
data = defaultSavedQueryItem.getData();
 
queryHighlights = data.highlights || {};
diff --git 
a/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterTagMultiselectWidget.js
 
b/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterTagMultiselectWidget.js
index 89c6f27..934c7c4 100644
--- 
a/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterTagMultiselectWidget.js
+++ 
b/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterTagMultiselectWidget.js
@@ -15,7 +15,6 @@
 */
mw.rcfilters.ui.FilterTagMultiselectWidget = function 
MwRcfiltersUiFilterTagMultiselectWidget( controller, model, savedQueriesModel, 
config ) {
var rcFiltersRow,
-   areSavedQueriesEnabled = mw.config.get( 
'wgStructuredChangeFiltersEnableSaving' ),
title = new OO.ui.LabelWidget( {
label: mw.msg( 'rcfilters-activefilters' ),
classes: [ 
'mw-rcfilters-ui-filterTagMultiselectWidget-wrapper-content-title' ]
@@ -30,7 +29,6 @@
this.queriesModel = savedQueriesModel;
this.$overlay = config.$overlay || this.$element;
this.matchingQuery = null;
-   this.areSavedQueriesEnabled = areSavedQueriesEnabled;
 
// Parent
mw.rcfilters.ui.FilterTagMultiselectWidget.parent.call( this, 
$.extend( true, {
@@ -86,19 +84,17 @@
classes: [ 
'mw-rcfilters-ui-filterTagMultiselectWidget-resetButton' ]
} );
 
-   if ( areSavedQueriesEnabled ) {
-   this.saveQueryButton = new 
mw.rcfilters.ui.SaveFiltersPopupButtonWidget(
-   this.controller,
-   this.queriesModel
-   );
+   this.saveQueryButton = new 
mw.rcfilters.ui.SaveFiltersPopupButtonWidget(
+   this.controller,
+   this.queriesModel
+   );
 
-   this.saveQueryButton.$element.on( 'mousedown', function 
( e ) { e.stopPropagation(); } );
+   this.saveQueryButton.$element.on( 'mousedown', function ( e ) { 
e.stopPropagation(); } );
 
-   this.saveQueryButton.connect( this, {
-   click: 'onSaveQueryButtonClick',
-   saveCurrent: 'setSavedQueryVisibility'
-   } );
-   }
+   this.saveQueryButton.connect( this, {
+   click: 'onSaveQueryButtonClick',
+   saveCurrent: 'setSavedQueryVisibility'
+   } );
 
this.emptyFilterMessage = new OO.ui.LabelWidget( {
label: mw.msg( 'rcfilters-empty-filter' ),
@@ -132,14 +128,12 @@
.addClass( 

[MediaWiki-commits] [Gerrit] mediawiki...Popups[master]: Disable Previews on blacklisted pages

2017-07-28 Thread Bmansurov (Code Review)
Bmansurov has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/368472 )

Change subject: Disable Previews on blacklisted pages
..

Disable Previews on blacklisted pages

Introduce a config variable `PopupsPageBlacklist`. Previews code won't
be shipped to pages listed in the config variable.

Bug: T170169
Change-Id: Ia8342b55c682f444ba79e959dcc1180527a31374
---
M extension.json
M includes/PopupsContext.php
M includes/PopupsHooks.php
M tests/phpunit/PopupsContextTest.php
M tests/phpunit/PopupsHooksTest.php
5 files changed, 83 insertions(+), 12 deletions(-)


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

diff --git a/extension.json b/extension.json
index 33a60ce..9a04b33 100644
--- a/extension.json
+++ b/extension.json
@@ -71,7 +71,8 @@
"@PopupsAnonsEnabledSamplingRate": "Sampling rate for showing 
popups to anonymous users.",
"PopupsAnonsEnabledSamplingRate": 0.9,
"@PopupsStatsvSamplingRate": "Sampling rate for logging 
performance data to statsv.",
-   "PopupsStatsvSamplingRate": 0
+   "PopupsStatsvSamplingRate": 0,
+   "PopupsPageBlacklist": [ "Special:UserLogin", 
"Special:CreateAccount" ]
},
"ResourceModules": {
"ext.popups.images": {
diff --git a/includes/PopupsContext.php b/includes/PopupsContext.php
index 7d86120..476d971 100644
--- a/includes/PopupsContext.php
+++ b/includes/PopupsContext.php
@@ -24,6 +24,7 @@
 use ExtensionRegistry;
 use Config;
 use Popups\EventLogging\EventLogger;
+use Title;
 
 /**
  * Popups Module
@@ -156,6 +157,33 @@
 
return $areMet;
}
+
+   /**
+* Whether popups code should be shipped to $title
+*
+* For example, if 'Special:UserLogin' is blacklisted, and the user is 
on 'Special:UserLogin',
+* then the title is considered blacklisted.
+*
+* A title is also considered blacklisted if its root matches one of 
the page names
+* from the config variable. For example, if 'User:A' is blacklisted, 
and the
+* title is 'User:A/b', then this title is considered blacklisted.
+*
+* Language specific blacklisted titles affect all languages. For 
example, if "Main_Page" is
+* blacklisted, "Bosh_Sahifa" (which is "Main_Page" in Uzbek) is 
considered blacklisted
+* too.
+*
+* @return bool
+*/
+   public function isTitleBlacklisted( $title ) {
+   $blacklistedPages = $this->config->get( 'PopupsPageBlacklist' );
+   foreach( $blacklistedPages as $page ) {
+   $blacklistedTitle = Title::newFromText( $page );
+   if ( $title->getRootTitle() == 
$blacklistedTitle->getRootTitle() ) {
+   return true;
+   }
+   }
+   return false;
+   }
/**
 * Get module logger
 *
diff --git a/includes/PopupsHooks.php b/includes/PopupsHooks.php
index 2f0cb65..d56bec5 100644
--- a/includes/PopupsHooks.php
+++ b/includes/PopupsHooks.php
@@ -112,7 +112,9 @@
 */
public static function onBeforePageDisplay( OutputPage &$out, Skin 
&$skin ) {
$context = MediaWikiServices::getInstance()->getService( 
'Popups.Context' );
-   $user = $out->getUser();
+   if ( $context->isTitleBlacklisted( $out->getTitle() ) ) {
+   return false;
+   }
 
if ( !$context->areDependenciesMet() ) {
$logger = $context->getLogger();
@@ -121,6 +123,7 @@
return true;
}
 
+   $user = $out->getUser();
if ( !$context->isBetaFeatureEnabled() || 
$context->shouldSendModuleToUser( $user ) ) {
$out->addModules( [ 'ext.popups' ] );
}
diff --git a/tests/phpunit/PopupsContextTest.php 
b/tests/phpunit/PopupsContextTest.php
index 79a90f9..2976b7c 100644
--- a/tests/phpunit/PopupsContextTest.php
+++ b/tests/phpunit/PopupsContextTest.php
@@ -266,6 +266,35 @@
}
 
/**
+* @covers ::isTitleBlacklisted
+* @dataProvider provideTestIsTitleBLacklisted
+* @param array $blacklist
+* @param Title $title
+$ @param bool $expected
+*/
+   public function testIsTitleBlacklisted( $blacklist, Title $title, 
$expected ) {
+   $this->setMwGlobals( [ "wgPopupsPageBlacklist" => $blacklist ] 
);
+   $context = $this->getContext();
+   $this->assertEquals( $expected, $context->isTitleBlacklisted( 
$title ) );
+   }
+
+   /**
+* @return array/
+*/
+   public function provideTestIsTitleBlacklisted() {
+   $blacklist = [ 'Special:UserLogin', 

[MediaWiki-commits] [Gerrit] mediawiki...WikimediaEvents[master]: Record interleaved search teams if available

2017-07-28 Thread EBernhardson (Code Review)
EBernhardson has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/368470 )

Change subject: Record interleaved search teams if available
..

Record interleaved search teams if available

If an interleaved search was performed record the page id's associated
with each team in the searchResultPage event. This allows analysis to
match up click/visit events with the teams they belong to and tally up
which team 'won'.

Bug: T150032
Change-Id: Iddbc21d23ac9f85fbedcf73a9c484310eaf4f21a
---
M modules/ext.wikimediaEvents.searchSatisfaction.js
1 file changed, 7 insertions(+), 0 deletions(-)


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

diff --git a/modules/ext.wikimediaEvents.searchSatisfaction.js 
b/modules/ext.wikimediaEvents.searchSatisfaction.js
index 07f7849..d88358a 100644
--- a/modules/ext.wikimediaEvents.searchSatisfaction.js
+++ b/modules/ext.wikimediaEvents.searchSatisfaction.js
@@ -755,6 +755,13 @@
serpExtras.iw = iwResultSet;
}
 
+   // Interleaved AB testing. This records the page id's 
that belong
+   // to each team, which can be matched up to the 
articleId property
+   // of click/visitPage events.
+   if ( mw.config.exists( 'wgCirrusSearchTeamDraft' ) ) {
+   serpExtras.teamDraft = mw.config.get( 
'wgCirrusSearchTeamDraft' );
+   }
+
params = {
query: mw.config.get( 'searchTerm' ),
hitsReturned: $( '.results-info' ).data( 
'mw-num-results-total' ),

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iddbc21d23ac9f85fbedcf73a9c484310eaf4f21a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikimediaEvents
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] mediawiki...WikimediaEvents[master]: Turn on search LTR test

2017-07-28 Thread EBernhardson (Code Review)
EBernhardson has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/368471 )

Change subject: Turn on search LTR test
..

Turn on search LTR test

Before this can be deployed appropriate cirrus configuration for the
three defined buckets needs to be deployed.

Bug: T171212
Change-Id: I05ebce48fc2176716ef92189cd1b59368a707443
---
M modules/ext.wikimediaEvents.searchSatisfaction.js
1 file changed, 3 insertions(+), 3 deletions(-)


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

diff --git a/modules/ext.wikimediaEvents.searchSatisfaction.js 
b/modules/ext.wikimediaEvents.searchSatisfaction.js
index d88358a..dca3938 100644
--- a/modules/ext.wikimediaEvents.searchSatisfaction.js
+++ b/modules/ext.wikimediaEvents.searchSatisfaction.js
@@ -114,7 +114,7 @@
 
var sessionId = session.get( 'sessionId' ),
// No sub-tests currently running
-   validBuckets = [],
+   validBuckets = [ 'ltr-a', 'ltr-b', 'ltr-i' ],
sampleSize = ( function () {
var dbName = mw.config.get( 'wgDBname' 
),
// Provides a place to handle 
wiki-specific sampling,
@@ -136,8 +136,8 @@
subTest: null
},
enwiki: {
-   test: 2000,
-   subTest: null
+   test: 1000,
+   subTest: 2
},
enwiktionary: {
test: 40,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I05ebce48fc2176716ef92189cd1b59368a707443
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikimediaEvents
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] mediawiki...CirrusSearch[master]: Give individual users consistent interleaving

2017-07-28 Thread EBernhardson (Code Review)
EBernhardson has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/368469 )

Change subject: Give individual users consistent interleaving
..

Give individual users consistent interleaving

Users generally expect that when they search for something, click
through, and then return to the search page, that results are generally
the same and in the same order. Interleaving breaks that expectation,
as the way the two buckets are interleaved changes on each load.

Fix by seeding the randomness with a token based on the users ip and
user agent. This will give individual users a consistent interleave
while still varying between multiple users.

Change-Id: Ifa51b74481baa169fe7e3d72826a21d399a9c637
---
M includes/Search/TeamDraftInterleaver.php
1 file changed, 7 insertions(+), 0 deletions(-)


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

diff --git a/includes/Search/TeamDraftInterleaver.php 
b/includes/Search/TeamDraftInterleaver.php
index d8c815c..25b92f6 100644
--- a/includes/Search/TeamDraftInterleaver.php
+++ b/includes/Search/TeamDraftInterleaver.php
@@ -2,6 +2,8 @@
 
 namespace CirrusSearch\Search;
 
+use CirrusSearch\UserTesting;
+
 /**
  * Implementation of algorithm 2, Team-Draft Interleaving, from F. Radlinski, 
M.
  * Kurup, and T. Joachims. How does clickthrough data reflect retrieval
@@ -16,6 +18,11 @@
 * @return ResultSet
 */
public function interleave( ResultSet $a, ResultSet $b, $limit ) {
+   // Providing a sampleRate of 1 ensures we always get a value 
back.
+   // This seed is consistent for a single user, but varies 
between users.
+   $seed = UserTesting::oneIn( __METHOD__, 1 );
+   mt_srand( $seed );
+
$aResults = $this->extractResults( $a );
$bResults = $this->extractResults( $b );
list( $interleaved, $teamA, $teamB, $aOffset ) = 
$this->interleaveResults(

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifa51b74481baa169fe7e3d72826a21d399a9c637
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CirrusSearch
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] mediawiki...DonationInterface[master]: Unify queue message handling with SmashPig

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

Change subject: Unify queue message handling with SmashPig
..


Unify queue message handling with SmashPig

De-duplicated code!

Back from the detour through SmashPig configuration splitsville

Bug: T95647
Change-Id: Ic0bb6df56dca281236ba23c834948cc71510feee
---
M DonationInterface.class.php
M README.txt
M extension.json
M extras/FraudFilter.php
M extras/banner_history/BannerHistoryLogIdProcessor.php
M gateway_common/DonationData.php
D gateway_common/DonationQueue.php
M gateway_common/gateway.adapter.php
M globalcollect_gateway/GlobalCollectOrphanRectifier.php
M tests/phpunit/Adapter/Adyen/AdyenApiTest.php
M tests/phpunit/Adapter/Amazon/AmazonApiTest.php
M tests/phpunit/Adapter/Amazon/AmazonTest.php
M tests/phpunit/Adapter/AstroPay/AstroPayTest.php
M tests/phpunit/Adapter/GlobalCollect/GlobalCollectApiTest.php
M tests/phpunit/Adapter/GlobalCollect/GlobalCollectOrphanAdapterTest.php
M tests/phpunit/Adapter/GlobalCollect/GlobalCollectOrphanRectifierTest.php
M tests/phpunit/Adapter/PayPal/PayPalApiTest.php
M tests/phpunit/Adapter/PayPal/PayPalExpressTest.php
M tests/phpunit/DonationInterfaceApiTestCase.php
M tests/phpunit/DonationInterfaceTestCase.php
M tests/phpunit/DonationQueueTest.php
M tests/phpunit/FraudFiltersTest.php
D tests/phpunit/includes/TestingQueue.php
23 files changed, 76 insertions(+), 359 deletions(-)

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



diff --git a/DonationInterface.class.php b/DonationInterface.class.php
index 2a0f3e4..e02dc69 100644
--- a/DonationInterface.class.php
+++ b/DonationInterface.class.php
@@ -71,7 +71,6 @@
$wgAutoloadClasses['DonationInterfaceApiTestCase'] = $testDir . 
'DonationInterfaceApiTestCase.php';
$wgAutoloadClasses['MockAmazonClient'] = $testDir . 
'includes/MockAmazonClient.php';
$wgAutoloadClasses['MockAmazonResponse'] = $testDir . 
'includes/MockAmazonResponse.php';
-   $wgAutoloadClasses['TestingQueue'] = $testDir . 
'includes/TestingQueue.php';
$wgAutoloadClasses['TestingAdyenAdapter'] = $testDir . 
'includes/test_gateway/TestingAdyenAdapter.php';
$wgAutoloadClasses['TestingAmazonAdapter'] = $testDir . 
'includes/test_gateway/TestingAmazonAdapter.php';
$wgAutoloadClasses['TestingAstroPayAdapter'] = $testDir . 
'includes/test_gateway/TestingAstroPayAdapter.php';
diff --git a/README.txt b/README.txt
index 929e389..2b311f0 100644
--- a/README.txt
+++ b/README.txt
@@ -297,83 +297,19 @@
 
  Queues 
 
-Set this to enable sending donation-related information to a message queue.
-Note that if you do not enable the queue, donor information will not be saved
-except in log files.
+DonationInterface uses the SmashPig library for queue handling.
 
-$wgDonationInterfaceEnableQueue = false
+Essential queues:
+* 'donations': Incoming donations that we think have been paid for.
+* 'pending': Transactions still needing action before they are settled.
 
-/**
- * Common development defaults for the queue server.
- * TODO: Default to a builtin backend such as PDO?
- * FIXME: Note that this must be an instance of FifoQueueStore.
- */
-$wgDonationInterfaceDefaultQueueServer = array(
-   'type' => 'PHPQueue\Backend\Stomp',
-   'uri' => 'tcp://localhost:61613',
-   'read_timeout' => '1',
-   'expiry' => '30 days',
-)
-
-/**
- * @global array $wgDonationInterfaceQueues
- *
- * This is a mapping from queue name to attributes.  It's not necessary to
- * list queues here, but the built-in queues are listed for convenience.
- *
- * Default values are taken from $wgDonationInterfaceDefaultQueueServer, and
- * values given here will override the defaults.
- *
- * The array key is the queue name as it is referred to from code, although the
- * actual queue name used in the backend may be overridden, see below.
- *
- * Unrecognized options will be passed along to the queue backend constructor,
- * but the following have special meaning to DonationQueue:
- * type - Class name of the queue backend.
- * expiry - The default lifespan of messages in this queue (days).
- * name - Backend can map to a named queue, rather than default to the
- * queue key as it appears in the $wgDonationInterfaceQueues array.
- */
-$wgDonationInterfaceQueues = array(
-   // Incoming donations that we think have been paid for.
-   'donations' => array(),
-
-   // Transactions still needing action before they are settled.
-   'pending' => array(),
-
-   // Example of a PCI-compliant queue configuration:
-   //
-   // 'pending' => array(
-   //  'type' => 'PHPQueue\Backend\Predis',
-   //  # Note that servers cannot be an array, due to some incompatibility
-   //  # with aggregate connections.
-   //  'servers' => 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: updateCredits: Fix collation name

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

Change subject: updateCredits: Fix collation name
..


updateCredits: Fix collation name

'uca-default-u-kn' is a valid name for MediaWiki's category collation
functionality ($wgCategoryCollation / Collation class), not for PHP's
collation functionality (Collator class).

'uca-default-u-kn' for Collation maps to 'root-u-kn' for Collator
(see Collation::factory()), and the '-u-kn' suffix is later stripped
to enable numeric collation (see IcuCollation::_construct()).

This doesn't seem to result in any changes in the output.

Change-Id: I8cc7d283aee5408f8b7bed365661ff286236a694
---
M maintenance/updateCredits.php
1 file changed, 2 insertions(+), 1 deletion(-)

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



diff --git a/maintenance/updateCredits.php b/maintenance/updateCredits.php
index 287a40c..b7e8c1c 100644
--- a/maintenance/updateCredits.php
+++ b/maintenance/updateCredits.php
@@ -69,7 +69,8 @@
 }
 
 $contributors = array_keys( $contributors );
-$collator = Collator::create( 'uca-default-u-kn' );
+$collator = Collator::create( 'root' );
+$collator->setAttribute( Collator::NUMERIC_COLLATION, Collator::ON );
 $collator->sort( $contributors );
 array_walk( $contributors, function ( &$v, $k ) {
$v = "* {$v}";

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8cc7d283aee5408f8b7bed365661ff286236a694
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński 
Gerrit-Reviewer: BryanDavis 
Gerrit-Reviewer: Parent5446 
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]: openstack: move openstack::repo to new model

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

Change subject: openstack: move openstack::repo to new model
..


openstack: move openstack::repo to new model

The openstack module and roles are very tangled
and it is going to be an iterative process to move
them to the a new layout.

This sets the groundwork for the single role application
with profiles to come and associated configuration
using the initial cloud repo setup as the initial transfer.

* openstack2 is only for transition
* openstack::repo to openstack2::cloudrepo
* create basic roles that will become the single
   role for hosts as refactor happens
* apply roles in site.pp
 (note this creates a bad state for order of
  operations but that is known amongst the wmcs team)
* remove explicit scattered includes for openstack::repo
* note keeping module level version setting in
   openstack2::cloudrepo temporarily before the
   next bit of refactor for clientlib

Bug: T171494
Change-Id: Idc7c30fec294649f0f002df12512e618fee4f35f
---
A hieradata/codfw/profile/openstack/labtest.yaml
A hieradata/codfw/profile/openstack/labtestn.yaml
A hieradata/eqiad/profile/openstack/main.yaml
M hieradata/hosts/californium.yaml
M hieradata/hosts/labstore1004.yaml
M hieradata/hosts/labstore1005.yaml
M hieradata/hosts/labtestweb2001.yaml
M hieradata/role/common/labs/nfs/primary.yaml
M hieradata/role/common/labs/nfs/secondary.yaml
M manifests/site.pp
M modules/openstack/manifests/ceilometer/compute.pp
M modules/openstack/manifests/ceilometer/controller.pp
M modules/openstack/manifests/clientlib.pp
M modules/openstack/manifests/common.pp
M modules/openstack/manifests/designate/service.pp
M modules/openstack/manifests/glance/service.pp
M modules/openstack/manifests/horizon/service.pp
M modules/openstack/manifests/keystone/service.pp
M modules/openstack/manifests/nova/api.pp
M modules/openstack/manifests/nova/compute.pp
M modules/openstack/manifests/nova/conductor.pp
M modules/openstack/manifests/nova/network.pp
M modules/openstack/manifests/nova/scheduler.pp
M modules/openstack/manifests/nova/spiceproxy.pp
M modules/openstack/manifests/queue_server.pp
A modules/openstack2/manifests/cloudrepo.pp
A modules/profile/manifests/openstack/base/cloudrepo.pp
A modules/profile/manifests/openstack/labtest/cloudrepo.pp
A modules/profile/manifests/openstack/labtestn/cloudrepo.pp
A modules/profile/manifests/openstack/main/cloudrepo.pp
D modules/role/manifests/wmcloud/openstack/control.pp
A modules/role/manifests/wmcs/openstack/labtest/control.pp
A modules/role/manifests/wmcs/openstack/labtest/net.pp
A modules/role/manifests/wmcs/openstack/labtest/services.pp
A modules/role/manifests/wmcs/openstack/labtest/virt.pp
A modules/role/manifests/wmcs/openstack/labtest/web.pp
A modules/role/manifests/wmcs/openstack/labtestn/control.pp
A modules/role/manifests/wmcs/openstack/labtestn/net.pp
A modules/role/manifests/wmcs/openstack/labtestn/services.pp
A modules/role/manifests/wmcs/openstack/labtestn/virt.pp
A modules/role/manifests/wmcs/openstack/labtestn/web.pp
A modules/role/manifests/wmcs/openstack/main/control.pp
A modules/role/manifests/wmcs/openstack/main/horizon.pp
A modules/role/manifests/wmcs/openstack/main/net.pp
A modules/role/manifests/wmcs/openstack/main/net_secondary.pp
A modules/role/manifests/wmcs/openstack/main/services.pp
A modules/role/manifests/wmcs/openstack/main/virt.pp
A modules/role/manifests/wmcs/openstack/main/web.pp
A modules/role/manifests/wmcs/openstack/main/wikitech.pp
49 files changed, 190 insertions(+), 57 deletions(-)

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



diff --git a/hieradata/codfw/profile/openstack/labtest.yaml 
b/hieradata/codfw/profile/openstack/labtest.yaml
new file mode 100644
index 000..1c4b737
--- /dev/null
+++ b/hieradata/codfw/profile/openstack/labtest.yaml
@@ -0,0 +1 @@
+profile::openstack::labtest::version: 'liberty'
diff --git a/hieradata/codfw/profile/openstack/labtestn.yaml 
b/hieradata/codfw/profile/openstack/labtestn.yaml
new file mode 100644
index 000..3320729
--- /dev/null
+++ b/hieradata/codfw/profile/openstack/labtestn.yaml
@@ -0,0 +1 @@
+profile::openstack::labtestn::version: 'liberty'
diff --git a/hieradata/eqiad/profile/openstack/main.yaml 
b/hieradata/eqiad/profile/openstack/main.yaml
new file mode 100644
index 000..bbf29f2
--- /dev/null
+++ b/hieradata/eqiad/profile/openstack/main.yaml
@@ -0,0 +1 @@
+profile::openstack::main::version: 'liberty'
diff --git a/hieradata/hosts/californium.yaml b/hieradata/hosts/californium.yaml
index 2c0c74d..467d0ed 100644
--- a/hieradata/hosts/californium.yaml
+++ b/hieradata/hosts/californium.yaml
@@ -1 +1,2 @@
+profile::openstack::main::version: 'mitaka'
 openstack::version: 'mitaka'
diff --git a/hieradata/hosts/labstore1004.yaml 
b/hieradata/hosts/labstore1004.yaml
index 6bcecbc..e81a0b5 100644
--- a/hieradata/hosts/labstore1004.yaml
+++ 

[MediaWiki-commits] [Gerrit] mediawiki...DonationInterface[master]: Order sequence numbers start at 1, not 0

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

Change subject: Order sequence numbers start at 1, not 0
..


Order sequence numbers start at 1, not 0

It's way too easy for order 1234.0 to get rounded off to 1234 in
transit.

TODO: simplify the sequenceNumber stuff. We initially added that
for WorldPay, which required a unique ID for each API call, not
just each merchant. For everyone else, we can maybe just use the
attempt number (numAttempt). This patch attempts to preserve the
existing behavior re: sequence number.

Bug: T171891
Change-Id: I2ae477f3d1e4bb9d155333534b9fcb5c6a14074d
---
M adyen_gateway/adyen.adapter.php
M amazon_gateway/amazon.adapter.php
M astropay_gateway/astropay.adapter.php
M gateway_common/gateway.adapter.php
M tests/phpunit/Adapter/Adyen/AdyenApiTest.php
M tests/phpunit/Adapter/Adyen/AdyenTest.php
M tests/phpunit/Adapter/Amazon/AmazonApiTest.php
M tests/phpunit/Adapter/GlobalCollect/GlobalCollectTest.php
M tests/phpunit/Adapter/PayPal/PayPalExpressTest.php
M tests/phpunit/includes/Responses/amazon/authorize.json
M tests/phpunit/includes/Responses/amazon/authorizeOnBillingAgreement.json
M tests/phpunit/includes/Responses/amazon/authorize_AmazonRejected.json
M tests/phpunit/includes/Responses/amazon/authorize_InvalidPaymentMethod.json
M tests/phpunit/includes/Responses/amazon/authorize_TransactionTimedOut.json
M tests/phpunit/includes/Responses/amazon/getBillingAgreementDetails.json
M tests/phpunit/includes/Responses/amazon/getCaptureDetails.json
M tests/phpunit/includes/Responses/amazon/setBillingAgreementDetails.json
M 
tests/phpunit/includes/Responses/paypal_ec/GetExpressCheckoutDetails_10486.testresponse
M 
tests/phpunit/includes/Responses/paypal_ec/GetExpressCheckoutDetails_OK.testresponse
19 files changed, 53 insertions(+), 44 deletions(-)

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



diff --git a/adyen_gateway/adyen.adapter.php b/adyen_gateway/adyen.adapter.php
index 3851a20..62f9e53 100644
--- a/adyen_gateway/adyen.adapter.php
+++ b/adyen_gateway/adyen.adapter.php
@@ -153,11 +153,7 @@
 * is never used at all.
 */
function do_transaction( $transaction ) {
-   // If this is not our first call, get a fresh order ID
-   // FIXME: This is repeated in three places. Maybe always 
regenerate in incrementSequenceNumber?
-   if ( $this->session_getData( 'sequence' ) ) {
-   $this->regenerateOrderID();
-   }
+   $this->ensureUniqueOrderID();
$this->session_addDonorData();
$this->setCurrentTransaction( $transaction );
 
diff --git a/amazon_gateway/amazon.adapter.php 
b/amazon_gateway/amazon.adapter.php
index c150ae2..0b19d39 100644
--- a/amazon_gateway/amazon.adapter.php
+++ b/amazon_gateway/amazon.adapter.php
@@ -118,9 +118,7 @@
$this->client = $this->getPwaClient();
 
$this->transaction_response = new PaymentTransactionResponse();
-   if ( $this->session_getData( 'sequence' ) ) {
-   $this->regenerateOrderID();
-   }
+   $this->ensureUniqueOrderID();
 
try {
if ( $this->getData_Unstaged_Escaped( 'recurring' ) === 
'1' ) {
diff --git a/astropay_gateway/astropay.adapter.php 
b/astropay_gateway/astropay.adapter.php
index 228c904..8985c43 100644
--- a/astropay_gateway/astropay.adapter.php
+++ b/astropay_gateway/astropay.adapter.php
@@ -199,10 +199,7 @@
}
 
function doPayment() {
-   // If this is not our first NewInvoice call, get a fresh order 
ID
-   if ( $this->session_getData( 'sequence' ) ) {
-   $this->regenerateOrderID();
-   }
+   $this->ensureUniqueOrderID();
 
$transaction_result = $this->do_transaction( 'NewInvoice' );
$this->runAntifraudFilters();
diff --git a/gateway_common/gateway.adapter.php 
b/gateway_common/gateway.adapter.php
index 541cadf..d8515f6 100644
--- a/gateway_common/gateway.adapter.php
+++ b/gateway_common/gateway.adapter.php
@@ -3489,7 +3489,11 @@
}
 
$this->session_ensure();
-   $sequence = $this->session_getData( 'sequence' ) ?: 0;
+   $sequence = $this->session_getData( 'sequence' );
+   if ( !$sequence ) {
+   $sequence = 1;
+   WmfFramework::setSessionValue( 'sequence', 
$sequence );
+   }
 
return "{$ctid}.{$sequence}";
}
@@ -3521,6 +3525,20 @@
return $id;
}
 
+   protected function ensureUniqueOrderID() {
+   // If this is not our first call, get a fresh order ID
+   

[MediaWiki-commits] [Gerrit] integration/visualdiff[master]: Add new config + new postprocessing files for comparing Tidy...

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

Change subject: Add new config + new postprocessing files for comparing Tidy vs 
Remex
..

Add new config + new postprocessing files for comparing Tidy vs Remex

Change-Id: I5f7fb371445f89c45ff70a80f50fe5d689e2012a
---
A bin/examples/tidy.remex.diffsettings.js
A lib/pm.new.postprocess.js
A lib/pm.old.postprocess.js
3 files changed, 153 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/visualdiff 
refs/changes/68/368468/1

diff --git a/bin/examples/tidy.remex.diffsettings.js 
b/bin/examples/tidy.remex.diffsettings.js
new file mode 100644
index 000..430658e
--- /dev/null
+++ b/bin/examples/tidy.remex.diffsettings.js
@@ -0,0 +1,39 @@
+module.exports = {
+  // Production wikipedia PHP parser output
+  html1: {
+name: 'tidy',
+postprocessorScript: '../lib/pm.old.postprocess.js',
+injectJQuery: false,
+// suppress default base url computation code
+// since we are providing the full wiki domain
+// on the commandline
+server: 'https://',
+computeURL: function(server, domain, title) {
+  return server + domain + '/wiki/' + encodeURIComponent(title) + 
'?action=parsermigration-edit';
+},
+   // dumpHTML: true,
+  },
+
+  html2: {
+name: 'remex',
+postprocessorScript: '../lib/pm.new.postprocess.js',
+injectJQuery: false,
+// suppress default base url computation code
+// since we are providing the full wiki domain
+// on the commandline
+server: 'https://',
+computeURL: function(server, domain, title) {
+  return server + domain + '/wiki/' + encodeURIComponent(title) + 
'?action=parsermigration-edit';
+},
+   // dumpHTML: true,
+  },
+
+  // Engine for image diffs, may be resemble or uprightdiff
+  diffEngine: 'uprightdiff',
+
+  // UprightDiff options
+  uprightDiffSettings: {
+// Path to your local uprightdiff install
+binary: '/usr/local/bin/uprightdiff',
+  },
+};
diff --git a/lib/pm.new.postprocess.js b/lib/pm.new.postprocess.js
new file mode 100644
index 000..e8288ab
--- /dev/null
+++ b/lib/pm.new.postprocess.js
@@ -0,0 +1,57 @@
+// Post processing of a parsermigration-edit display to strip
+// edit form, chrome, and extract the new (right) view out
+// of a side-by-side display in a table.
+window.postprocessDOM = function() {
+   try {
+   // Freeze animated gifs
+   $('img').each(function(i) {
+   if (/^(?!data:).*\.gif/i.test(this.src)) {
+   var c = document.createElement('canvas');
+   var w = c.width = this.width;
+   var h = c.height = this.height;
+   c.getContext('2d').drawImage(this, 0, 0, w, h);
+   try { this.src = c.toDataURL(); } catch(e) { }
+   }
+   });
+
+   // Hide toc -- since we have some minor pixel shifts in header 
display
+   $('div.toc').hide();
+
+   // Hide catlinks + footer
+   $('div.printFooter').hide();
+   $('div#catlinks').hide();
+   $('div#catlinks+div.visualClear').hide();
+
+   // FIXME: Yuck! This is not a scalable solution
+   $('span.NavToggle a').each(function() { this.click(); }); // 
enwiktionary, ...
+   $('a.collapsible-toggle').each(function() { this.click(); }); 
// eswiktionary
+   $('a.NavToggle').each(function() { this.click(); });
+   $('.collapseButton a').each(function() { this.click(); }); // 
enwiki
+   $('a.UitklapToggle').each(function() { this.click(); }); // 
nlwiki
+   // $('.mw-collapsible-toggle a').each(function() { 
this.click(); }); // itwiki, svwiki, ...
+
+   // Open navboxes and other collapsed content
+   // IMPORTANT: This should be after the clicks above
+   $('table.collapsible tr').show();
+   $('table.mw-collapsible tr').show();
+   $('.NavContent').show();
+
+   // Remove parsermigration edit form, preview notice
+   $('div.previewnote').hide();
+   $('form#editform').hide();
+
+   // Extract the new (right) display out of the table and delete 
the table
+   $('td.mw-parsermigration-right').children().each(function() {
+   $('div.mw-content-ltr').append(this);
+   });
+   $('table.mw-parsermigration-sxs').remove();
+
+   // Finally remove all chrome, only keep the actual content.
+   document.body.innerHTML = $('div#mw-content-text').html();
+   document.body.classList.add('mw-body-content');
+   } catch (e) {
+   return 'PP_FAILED';
+   }
+
+  

[MediaWiki-commits] [Gerrit] wikimedia...tools[master]: WIP fix export for contacts with no donations

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

Change subject: WIP fix export for contacts with no donations
..

WIP fix export for contacts with no donations

Test only so far, with debugging code to print actual row

Bug: T171920
Change-Id: I03f362549707b21b1258af8733d6a84c4e343c44
---
M silverpop_export/tests/test_update.py
1 file changed, 22 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/tools 
refs/changes/67/368467/1

diff --git a/silverpop_export/tests/test_update.py 
b/silverpop_export/tests/test_update.py
index ef17da0..0c404b8 100644
--- a/silverpop_export/tests/test_update.py
+++ b/silverpop_export/tests/test_update.py
@@ -64,6 +64,28 @@
 assert cursor.fetchone() == (1,)
 
 
+def test_no_donations():
+'''
+Test that we set the donation-related fields correctly when a contact has
+no donations.
+'''
+
+run_update_with_fixtures(fixture_queries=["""
+insert into civicrm_email (contact_id, email, is_primary, on_hold) values
+(1, 'person1@localhost', 1, 0);
+""", """
+insert into civicrm_contact (id) values
+(1);
+"""])
+
+cursor = conn.db_conn.cursor()
+cursor.execute("select highest_usd_amount, lifetime_usd_total, 
donation_count, latest_currency, latest_native_amount, latest_usd_amount, 
latest_donation from silverpop_export")
+actual = cursor.fetchone()
+print(actual)
+expected = (None, None, None, None, None, None, None)
+assert actual == expected
+
+
 def test_refund_history():
 '''
 Test that we don't include refunded donations in a donor's history

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I03f362549707b21b1258af8733d6a84c4e343c44
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/tools
Gerrit-Branch: master
Gerrit-Owner: Ejegg 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: RCFilters: Reduce space between filters and saved queries bu...

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

Change subject: RCFilters: Reduce space between filters and saved queries button
..


RCFilters: Reduce space between filters and saved queries button

Bug: T171822
Change-Id: I521a8e00ad8ea585b30d4d7e0ca36b1e5da031c2
---
M 
resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.FilterTagMultiselectWidget.less
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git 
a/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.FilterTagMultiselectWidget.less
 
b/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.FilterTagMultiselectWidget.less
index 7ee601f..a5cf744 100644
--- 
a/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.FilterTagMultiselectWidget.less
+++ 
b/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.FilterTagMultiselectWidget.less
@@ -16,7 +16,7 @@
background-color: #f8f9fa;
border-radius: 2px 2px 0 0;
padding: 0.6em;
-   margin-top: 1.6em;
+   margin-top: 1em;
}
 
.oo-ui-tagMultiselectWidget.oo-ui-widget-enabled 
&-animate.oo-ui-tagMultiselectWidget-handle {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I521a8e00ad8ea585b30d4d7e0ca36b1e5da031c2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Mooeypoo 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: Jack Phoenix 
Gerrit-Reviewer: TTO 
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]: openstack: move openstack::repo to new model

2017-07-28 Thread Rush (Code Review)
Rush has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/368466 )

Change subject: openstack: move openstack::repo to new model
..

openstack: move openstack::repo to new model

Change-Id: Idc7c30fec294649f0f002df12512e618fee4f35f
---
A hieradata/codfw/profile/openstack/labtest.yaml
A hieradata/codfw/profile/openstack/labtestn.yaml
A hieradata/eqiad/profile/openstack/main.yaml
M hieradata/hosts/californium.yaml
M hieradata/hosts/labstore1004.yaml
M hieradata/hosts/labstore1005.yaml
M hieradata/hosts/labtestweb2001.yaml
M hieradata/role/common/labs/nfs/primary.yaml
M hieradata/role/common/labs/nfs/secondary.yaml
M manifests/site.pp
M modules/openstack/manifests/ceilometer/compute.pp
M modules/openstack/manifests/ceilometer/controller.pp
M modules/openstack/manifests/clientlib.pp
M modules/openstack/manifests/common.pp
M modules/openstack/manifests/designate/service.pp
M modules/openstack/manifests/glance/service.pp
M modules/openstack/manifests/horizon/service.pp
M modules/openstack/manifests/keystone/service.pp
M modules/openstack/manifests/nova/api.pp
M modules/openstack/manifests/nova/compute.pp
M modules/openstack/manifests/nova/conductor.pp
M modules/openstack/manifests/nova/network.pp
M modules/openstack/manifests/nova/scheduler.pp
M modules/openstack/manifests/nova/spiceproxy.pp
M modules/openstack/manifests/queue_server.pp
A modules/openstack2/manifests/cloudrepo.pp
A modules/profile/manifests/openstack/base/cloudrepo.pp
A modules/profile/manifests/openstack/labtest/cloudrepo.pp
A modules/profile/manifests/openstack/labtestn/cloudrepo.pp
A modules/profile/manifests/openstack/main/cloudrepo.pp
D modules/role/manifests/wmcloud/openstack/control.pp
A modules/role/manifests/wmcs/openstack/labtest/control.pp
A modules/role/manifests/wmcs/openstack/labtest/net.pp
A modules/role/manifests/wmcs/openstack/labtest/services.pp
A modules/role/manifests/wmcs/openstack/labtest/virt.pp
A modules/role/manifests/wmcs/openstack/labtest/web.pp
A modules/role/manifests/wmcs/openstack/labtestn/control.pp
A modules/role/manifests/wmcs/openstack/labtestn/net.pp
A modules/role/manifests/wmcs/openstack/labtestn/services.pp
A modules/role/manifests/wmcs/openstack/labtestn/virt.pp
A modules/role/manifests/wmcs/openstack/labtestn/web.pp
A modules/role/manifests/wmcs/openstack/main/control.pp
A modules/role/manifests/wmcs/openstack/main/horizon.pp
A modules/role/manifests/wmcs/openstack/main/net.pp
A modules/role/manifests/wmcs/openstack/main/net_secondary.pp
A modules/role/manifests/wmcs/openstack/main/services.pp
A modules/role/manifests/wmcs/openstack/main/virt.pp
A modules/role/manifests/wmcs/openstack/main/web.pp
A modules/role/manifests/wmcs/openstack/main/wikitech.pp
49 files changed, 190 insertions(+), 57 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/66/368466/1

diff --git a/hieradata/codfw/profile/openstack/labtest.yaml 
b/hieradata/codfw/profile/openstack/labtest.yaml
new file mode 100644
index 000..1c4b737
--- /dev/null
+++ b/hieradata/codfw/profile/openstack/labtest.yaml
@@ -0,0 +1 @@
+profile::openstack::labtest::version: 'liberty'
diff --git a/hieradata/codfw/profile/openstack/labtestn.yaml 
b/hieradata/codfw/profile/openstack/labtestn.yaml
new file mode 100644
index 000..3320729
--- /dev/null
+++ b/hieradata/codfw/profile/openstack/labtestn.yaml
@@ -0,0 +1 @@
+profile::openstack::labtestn::version: 'liberty'
diff --git a/hieradata/eqiad/profile/openstack/main.yaml 
b/hieradata/eqiad/profile/openstack/main.yaml
new file mode 100644
index 000..bbf29f2
--- /dev/null
+++ b/hieradata/eqiad/profile/openstack/main.yaml
@@ -0,0 +1 @@
+profile::openstack::main::version: 'liberty'
diff --git a/hieradata/hosts/californium.yaml b/hieradata/hosts/californium.yaml
index 2c0c74d..467d0ed 100644
--- a/hieradata/hosts/californium.yaml
+++ b/hieradata/hosts/californium.yaml
@@ -1 +1,2 @@
+profile::openstack::main::version: 'mitaka'
 openstack::version: 'mitaka'
diff --git a/hieradata/hosts/labstore1004.yaml 
b/hieradata/hosts/labstore1004.yaml
index 6bcecbc..e81a0b5 100644
--- a/hieradata/hosts/labstore1004.yaml
+++ b/hieradata/hosts/labstore1004.yaml
@@ -1 +1,2 @@
+profile::openstack::main::version: 'mitaka'
 openstack::version: mitaka
diff --git a/hieradata/hosts/labstore1005.yaml 
b/hieradata/hosts/labstore1005.yaml
index 6bcecbc..e81a0b5 100644
--- a/hieradata/hosts/labstore1005.yaml
+++ b/hieradata/hosts/labstore1005.yaml
@@ -1 +1,2 @@
+profile::openstack::main::version: 'mitaka'
 openstack::version: mitaka
diff --git a/hieradata/hosts/labtestweb2001.yaml 
b/hieradata/hosts/labtestweb2001.yaml
index 0f588af..467bd3c 100644
--- a/hieradata/hosts/labtestweb2001.yaml
+++ b/hieradata/hosts/labtestweb2001.yaml
@@ -3,5 +3,6 @@
 
 apache::logrotate::rotate: 12
 
+profile::openstack::labtest::version: 'mitaka'
 openstack::version: mitaka
 profile::backup::host::enable: false
diff --git 

[MediaWiki-commits] [Gerrit] mediawiki...LoginNotify[master]: Log usage statistics

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

Change subject: Log usage statistics
..

Log usage statistics

Bug: T170345
Change-Id: I7ec1214800062d9a22cd3fe0ce2ee9031fc9e21e
---
M includes/Hooks.php
M includes/LoginNotify.php
2 files changed, 21 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/LoginNotify 
refs/changes/65/368465/1

diff --git a/includes/Hooks.php b/includes/Hooks.php
index 9685022..fd3a78d 100644
--- a/includes/Hooks.php
+++ b/includes/Hooks.php
@@ -151,7 +151,7 @@
 *
 * @param User $user The user who logged in.
 */
-   public static function doSuccessfulLogin( User $user ) {
+   private static function doSuccessfulLogin( User $user ) {
$loginNotify = new LoginNotify();
$loginNotify->clearCounters( $user );
$loginNotify->sendSuccessNotice( $user );
@@ -163,7 +163,7 @@
 *
 * @param User $user The user that failed to log in.
 */
-   public static function doFailedLogin( User $user ) {
+   private static function doFailedLogin( User $user ) {
$loginNotify = new LoginNotify();
$loginNotify->recordFailure( $user );
}
diff --git a/includes/LoginNotify.php b/includes/LoginNotify.php
index 4060072..91a1938 100644
--- a/includes/LoginNotify.php
+++ b/includes/LoginNotify.php
@@ -12,6 +12,7 @@
 use CentralAuthUser;
 use Config;
 use EchoEvent;
+use IBufferingStatsdDataFactory;
 use JobQueueGroup;
 use JobSpecification;
 use MediaWiki\MediaWikiServices;
@@ -55,6 +56,8 @@
private $gSalt;
/** @var string */
private $secret;
+   /** @var IBufferingStatsdDataFactory */
+   private $stats;
 
/**
 * Constructor
@@ -83,6 +86,8 @@
 
$log = LoggerFactory::getInstance( 'LoginNotify' );
$this->log = $log;
+
+   $this->stats = 
MediaWikiServices::getInstance()->getStatsdDataFactory();
}
 
/**
@@ -618,6 +623,7 @@
$this->config->get( 'LoginNotifyExpiryNewIP' )
);
if ( $count ) {
+   $this->incrStats( 'fail.unknown.notifications' );
$this->sendNotice( $user, 'login-fail-new', $count );
}
}
@@ -637,6 +643,7 @@
$this->config->get( 'LoginNotifyExpiryKnownIP' )
);
if ( $count ) {
+   $this->incrStats( 'fail.known.notifications' );
$this->sendNotice( $user, 'login-fail-known', $count );
}
}
@@ -704,6 +711,7 @@
 * @param User $user User in question
 */
public function recordFailure( User $user ) {
+   $this->incrStats( 'fail.total' );
$known = $this->isKnownSystemFast( $user, $user->getRequest() );
if ( $known === self::USER_KNOWN ) {
$this->recordLoginFailureFromKnownSystem( $user );
@@ -737,6 +745,7 @@
if ( !$this->config->get( 'LoginNotifyEnableOnSuccess' ) ) {
return;
}
+   $this->incrStats( 'success.total' );
$result = $this->isKnownSystemFast( $user, $user->getRequest() 
);
if ( $result !== self::USER_KNOWN ) {
$this->createJob( DeferredChecksJob::TYPE_LOGIN_SUCCESS,
@@ -755,6 +764,7 @@
public function sendSuccessNoticeDeferred( User $user, $subnet, 
$resultSoFar ) {
$isKnown = $this->isKnownSystemSlow( $user, $subnet, 
$resultSoFar );
if ( !$isKnown ) {
+   $this->incrStats( 'success.notifications' );
$this->sendNotice( $user, 'login-success' );
}
}
@@ -779,4 +789,13 @@
);
JobQueueGroup::singleton()->lazyPush( $job );
}
+
+   /**
+* Increments the given statistic
+*
+* @param string $metric
+*/
+   private function incrStats( $metric ) {
+   $this->stats->increment( "loginnotify.$metric" );
+   }
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7ec1214800062d9a22cd3fe0ce2ee9031fc9e21e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/LoginNotify
Gerrit-Branch: master
Gerrit-Owner: MaxSem 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: RCFilters: Trim input text before evaluation

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

Change subject: RCFilters: Trim input text before evaluation
..


RCFilters: Trim input text before evaluation

Make sure that trailing and leading spaces don't affect searching
and view switches.

Bug: T168225
Change-Id: I2379c7848887ef2cb2cafa9c3cfef8cbe5ed6a62
---
M resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.FiltersViewModel.js
M 
resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterTagMultiselectWidget.js
2 files changed, 9 insertions(+), 5 deletions(-)

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



diff --git 
a/resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.FiltersViewModel.js 
b/resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.FiltersViewModel.js
index 4ea1e03..57e618c 100644
--- a/resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.FiltersViewModel.js
+++ b/resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.FiltersViewModel.js
@@ -810,7 +810,7 @@
items = this.getFiltersByView( view );
 
// Normalize so we can search strings regardless of case and 
view
-   query = query.toLowerCase();
+   query = query.trim().toLowerCase();
if ( view !== 'default' ) {
query = query.substr( 1 );
}
diff --git 
a/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterTagMultiselectWidget.js
 
b/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterTagMultiselectWidget.js
index ac22258..c4d5877 100644
--- 
a/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterTagMultiselectWidget.js
+++ 
b/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterTagMultiselectWidget.js
@@ -238,7 +238,11 @@
 * @param {string} value Value of the input
 */
mw.rcfilters.ui.FilterTagMultiselectWidget.prototype.onInputChange = 
function ( value ) {
-   var view = this.model.getViewByTrigger( value.substr( 0, 1 ) );
+   var view;
+
+   value = value.trim();
+
+   view = this.model.getViewByTrigger( value.substr( 0, 1 ) );
 
this.controller.switchView( view );
};
@@ -286,7 +290,7 @@
 
// Clear input if the only thing in the input is the 
prefix
if (
-   this.input.getValue() === 
this.model.getViewTrigger( this.model.getCurrentView() )
+   this.input.getValue().trim() === 
this.model.getViewTrigger( this.model.getCurrentView() )
) {
// Clear the input
this.input.setValue( '' );
@@ -350,7 +354,7 @@
 */

mw.rcfilters.ui.FilterTagMultiselectWidget.prototype.updateElementsForView = 
function () {
var view = this.model.getCurrentView(),
-   inputValue = this.input.getValue(),
+   inputValue = this.input.getValue().trim(),
inputView = this.model.getViewByTrigger( 
inputValue.substr( 0, 1 ) );
 
if ( inputView !== 'default' ) {
@@ -469,7 +473,7 @@
mw.rcfilters.ui.FilterTagMultiselectWidget.prototype.onTagSelect = 
function ( tagItem ) {
var widget = this,
menuOption = this.menu.getItemFromModel( 
tagItem.getModel() ),
-   oldInputValue = this.input.getValue();
+   oldInputValue = this.input.getValue().trim();
 
this.menu.setUserSelecting( true );
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2379c7848887ef2cb2cafa9c3cfef8cbe5ed6a62
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Mooeypoo 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: Jack Phoenix 
Gerrit-Reviewer: TTO 
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]: RCFilters: Close limit/days popups after choosing value

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

Change subject: RCFilters: Close limit/days popups after choosing value
..


RCFilters: Close limit/days popups after choosing value

Change-Id: Icd47d243ee64fdc9ab5c0790735a48ba9585e808
---
M 
resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.ChangesLimitButtonWidget.js
M resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.DateButtonWidget.js
2 files changed, 2 insertions(+), 0 deletions(-)

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



diff --git 
a/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.ChangesLimitButtonWidget.js
 
b/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.ChangesLimitButtonWidget.js
index 86d74bf..b85a89f 100644
--- 
a/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.ChangesLimitButtonWidget.js
+++ 
b/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.ChangesLimitButtonWidget.js
@@ -88,6 +88,7 @@
 */
mw.rcfilters.ui.ChangesLimitButtonWidget.prototype.onPopupLimit = 
function ( filterName ) {
this.controller.toggleFilterSelect( filterName, true );
+   this.button.popup.toggle( false );
};
 
/**
diff --git 
a/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.DateButtonWidget.js 
b/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.DateButtonWidget.js
index 870aef7..647e42d 100644
--- a/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.DateButtonWidget.js
+++ b/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.DateButtonWidget.js
@@ -85,6 +85,7 @@
 */
mw.rcfilters.ui.DateButtonWidget.prototype.onPopupDays = function ( 
filterName ) {
this.controller.toggleFilterSelect( filterName, true );
+   this.button.popup.toggle( false );
};
 
/**

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Icd47d243ee64fdc9ab5c0790735a48ba9585e808
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Mooeypoo 
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/puppet[production]: openstack: move openstack::repo to new model

2017-07-28 Thread Rush (Code Review)
Rush has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/368464 )

Change subject: openstack: move openstack::repo to new model
..

openstack: move openstack::repo to new model

This reverts commit a5e13425b4ee36083ca198c92eb10e3aff723cc1.

Change-Id: Ia8be0726e4ebe6f4774905435dba14f5586bb3e2
---
A hieradata/codfw/profile/openstack/labtest.yaml
A hieradata/codfw/profile/openstack/labtestn.yaml
A hieradata/eqiad/profile/openstack/main.yaml
M hieradata/hosts/californium.yaml
M hieradata/hosts/labstore1004.yaml
M hieradata/hosts/labstore1005.yaml
M hieradata/hosts/labtestweb2001.yaml
M hieradata/role/common/labs/nfs/primary.yaml
M hieradata/role/common/labs/nfs/secondary.yaml
M manifests/site.pp
M modules/openstack/manifests/ceilometer/compute.pp
M modules/openstack/manifests/ceilometer/controller.pp
M modules/openstack/manifests/clientlib.pp
M modules/openstack/manifests/common.pp
M modules/openstack/manifests/designate/service.pp
M modules/openstack/manifests/glance/service.pp
M modules/openstack/manifests/horizon/service.pp
M modules/openstack/manifests/keystone/service.pp
M modules/openstack/manifests/nova/api.pp
M modules/openstack/manifests/nova/compute.pp
M modules/openstack/manifests/nova/conductor.pp
M modules/openstack/manifests/nova/network.pp
M modules/openstack/manifests/nova/scheduler.pp
M modules/openstack/manifests/nova/spiceproxy.pp
M modules/openstack/manifests/queue_server.pp
A modules/openstack2/manifests/cloudrepo.pp
A modules/profile/manifests/openstack/base/cloudrepo.pp
A modules/profile/manifests/openstack/labtest/cloudrepo.pp
A modules/profile/manifests/openstack/labtestn/cloudrepo.pp
A modules/profile/manifests/openstack/main/cloudrepo.pp
D modules/role/manifests/wmcloud/openstack/control.pp
A modules/role/manifests/wmcs/openstack/labtest/control.pp
A modules/role/manifests/wmcs/openstack/labtest/net.pp
A modules/role/manifests/wmcs/openstack/labtest/services.pp
A modules/role/manifests/wmcs/openstack/labtest/virt.pp
A modules/role/manifests/wmcs/openstack/labtest/web.pp
A modules/role/manifests/wmcs/openstack/labtestn/control.pp
A modules/role/manifests/wmcs/openstack/labtestn/net.pp
A modules/role/manifests/wmcs/openstack/labtestn/services.pp
A modules/role/manifests/wmcs/openstack/labtestn/virt.pp
A modules/role/manifests/wmcs/openstack/labtestn/web.pp
A modules/role/manifests/wmcs/openstack/main/control.pp
A modules/role/manifests/wmcs/openstack/main/horizon.pp
A modules/role/manifests/wmcs/openstack/main/net.pp
A modules/role/manifests/wmcs/openstack/main/net_secondary.pp
A modules/role/manifests/wmcs/openstack/main/services.pp
A modules/role/manifests/wmcs/openstack/main/virt.pp
A modules/role/manifests/wmcs/openstack/main/web.pp
A modules/role/manifests/wmcs/openstack/main/wikitech.pp
49 files changed, 190 insertions(+), 57 deletions(-)


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

diff --git a/hieradata/codfw/profile/openstack/labtest.yaml 
b/hieradata/codfw/profile/openstack/labtest.yaml
new file mode 100644
index 000..1c4b737
--- /dev/null
+++ b/hieradata/codfw/profile/openstack/labtest.yaml
@@ -0,0 +1 @@
+profile::openstack::labtest::version: 'liberty'
diff --git a/hieradata/codfw/profile/openstack/labtestn.yaml 
b/hieradata/codfw/profile/openstack/labtestn.yaml
new file mode 100644
index 000..3320729
--- /dev/null
+++ b/hieradata/codfw/profile/openstack/labtestn.yaml
@@ -0,0 +1 @@
+profile::openstack::labtestn::version: 'liberty'
diff --git a/hieradata/eqiad/profile/openstack/main.yaml 
b/hieradata/eqiad/profile/openstack/main.yaml
new file mode 100644
index 000..bbf29f2
--- /dev/null
+++ b/hieradata/eqiad/profile/openstack/main.yaml
@@ -0,0 +1 @@
+profile::openstack::main::version: 'liberty'
diff --git a/hieradata/hosts/californium.yaml b/hieradata/hosts/californium.yaml
index 2c0c74d..467d0ed 100644
--- a/hieradata/hosts/californium.yaml
+++ b/hieradata/hosts/californium.yaml
@@ -1 +1,2 @@
+profile::openstack::main::version: 'mitaka'
 openstack::version: 'mitaka'
diff --git a/hieradata/hosts/labstore1004.yaml 
b/hieradata/hosts/labstore1004.yaml
index 6bcecbc..e81a0b5 100644
--- a/hieradata/hosts/labstore1004.yaml
+++ b/hieradata/hosts/labstore1004.yaml
@@ -1 +1,2 @@
+profile::openstack::main::version: 'mitaka'
 openstack::version: mitaka
diff --git a/hieradata/hosts/labstore1005.yaml 
b/hieradata/hosts/labstore1005.yaml
index 6bcecbc..e81a0b5 100644
--- a/hieradata/hosts/labstore1005.yaml
+++ b/hieradata/hosts/labstore1005.yaml
@@ -1 +1,2 @@
+profile::openstack::main::version: 'mitaka'
 openstack::version: mitaka
diff --git a/hieradata/hosts/labtestweb2001.yaml 
b/hieradata/hosts/labtestweb2001.yaml
index 0f588af..467bd3c 100644
--- a/hieradata/hosts/labtestweb2001.yaml
+++ b/hieradata/hosts/labtestweb2001.yaml
@@ -3,5 +3,6 @@
 
 apache::logrotate::rotate: 12
 
+profile::openstack::labtest::version: 'mitaka'
 

[MediaWiki-commits] [Gerrit] wikimedia...golden[master]: metrics::maps: Add maplink+mapframe prevalence metrics

2017-07-28 Thread Bearloga (Code Review)
Bearloga has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/368462 )

Change subject: metrics::maps: Add maplink+mapframe prevalence metrics
..

metrics::maps: Add maplink+mapframe prevalence metrics

Bug: T170022
Depends-On: I25573e2d552ef7388c83fbbefca6ceab94adacc8
Change-Id: I9a4fc59793d1a1f606781edc17dde04d435e8c8d
---
M CHANGELOG.md
M README.md
M docs/README.md
M modules/metrics/maps/config.yaml
A modules/metrics/maps/mapframe_prevalence
A modules/metrics/maps/maplink_prevalence
A modules/metrics/maps/prevalence.R
A modules/metrics/maps/prevalence.yaml
M test.R
9 files changed, 458 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/discovery/golden 
refs/changes/62/368462/1

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 555e9b3..6a3cece 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,6 +1,9 @@
 # Change Log (Patch Notes)
 All notable changes to this project will be documented in this file.
 
+## 2017/08/01
+- Added maplink and mapframe prevalence tracking across wikis 
([T170022](https://phabricator.wikimedia.org/T170022))
+
 ## 2017/07/27
 - Prepared for Puppetized runs 
([T170494](https://phabricator.wikimedia.org/T170494))
 
diff --git a/README.md b/README.md
index a2584ad..47b646f 100644
--- a/README.md
+++ b/README.md
@@ -49,7 +49,7 @@
   c("devtools", "testthat", "Rcpp",
 "tidyverse", "data.table", "plyr",
 "optparse", "yaml", "data.tree",
-"ISOcodes", "knitr",
+"ISOcodes", "knitr", "glue",
 # For wmf:
 "urltools", "ggthemes", "pwr",
 # For polloi's datavis functions:
@@ -171,11 +171,15 @@
 - [x] GeoFeatures ([T112311](https://phabricator.wikimedia.org/T112311))
   - [x] [Actions per tool](modules/metrics/maps/actions_per_tool.sql)
   - [x] [Users per feature](modules/metrics/maps/users_per_feature.sql)
-- [x] Kartographer usage
+- [x] Kartotherian usage
   - [x] [Users by country](modules/metrics/maps/users_by_country) 
([T119448](https://phabricator.wikimedia.org/T119448))
   - [x] Tile requests 
([T113832](https://phabricator.wikimedia.org/T113832))
 - [x] [No automata](modules/metrics/maps/tile_aggregates_no_automata)
 - [x] [With 
automata](modules/metrics/maps/tile_aggregates_with_automata)
+- [ ] Maps prevalence on wikis 
([T170022](https://phabricator.wikimedia.org/T170022))
+  - [ ] [Maplinks](modules/metrics/maps/maplink_prevalence)
+  - [ ] [Mapframes](modules/metrics/maps/mapframe_prevalence)
+- Kartographer usage (planned)
 - KPIs (planned)
   - [x] External Traffic 
([configuration](modules/metrics/external_traffic/config.yaml))
 - [x] [Referer data](modules/metrics/external_traffic/referer_data) 
([T116295](https://phabricator.wikimedia.org/T116295), [Change 
247601](https://gerrit.wikimedia.org/r/#/c/247601/))
diff --git a/docs/README.md b/docs/README.md
index 4f595f0..35fe97a 100644
--- a/docs/README.md
+++ b/docs/README.md
@@ -8,7 +8,7 @@
 infrastructure. These datasets provide the metrics that are used by
 [Discovery's Dashboards](https://discovery.wmflabs.org/)
 
-Last updated on 26 June 2017
+Last updated on 28 July 2017
 
 Daily Metrics
 -
@@ -34,6 +34,10 @@
 level, etc.
 -   **tile\_aggregates\_no\_automata.tsv**: Tile counts by style, zoom
 level, etc., excluding those made by bots/tools
+-   **mapframe\_prevalence.tsv**: Proportion of articles on a wiki that
+have a mapframe
+-   **maplink\_prevalence.tsv**: Proportion of articles on a wiki that
+have a maplink
 
 portal/
 ---
diff --git a/modules/metrics/maps/config.yaml b/modules/metrics/maps/config.yaml
index d0dae6e..b237120 100644
--- a/modules/metrics/maps/config.yaml
+++ b/modules/metrics/maps/config.yaml
@@ -37,3 +37,15 @@
 starts: 2015-12-10
 funnel: true
 type: script
+mapframe_prevalence:
+description: Proportion of articles on a wiki that have a mapframe
+granularity: days
+starts: 2017-07-28 # this will need to be set to when patch goes live, 
we can't backfill this data
+funnel: true
+type: script
+maplink_prevalence:
+description: Proportion of articles on a wiki that have a maplink
+granularity: days
+starts: 2017-07-28 # this will need to be set to when patch goes live, 
we can't backfill this data
+funnel: true
+type: script
diff --git a/modules/metrics/maps/mapframe_prevalence 
b/modules/metrics/maps/mapframe_prevalence
new file mode 100755
index 000..a5fcc75
--- /dev/null
+++ b/modules/metrics/maps/mapframe_prevalence
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+Rscript modules/metrics/maps/prevalence.R -d $1 -o mapframe
diff --git a/modules/metrics/maps/maplink_prevalence 
b/modules/metrics/maps/maplink_prevalence
new file mode 100755
index 000..1853a30
--- /dev/null
+++ b/modules/metrics/maps/maplink_prevalence
@@ -0,0 +1,3 @@
+#!/bin/bash
+

[MediaWiki-commits] [Gerrit] mediawiki...ORES[master]: Messages for low and high accuracy likelybad filters

2017-07-28 Thread Sbisson (Code Review)
Sbisson has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/368463 )

Change subject: Messages for low and high accuracy likelybad filters
..

Messages for low and high accuracy likelybad filters

Applies to both 'damaging' and 'goodfaith' filters.
When 'maybebad' is defined, we use the low-accuracy
msg, otherwise we use the high-accuracy msg.

Bug: T164997
Change-Id: I56959df8eaba854338a0cd3c93f84a6265523069
---
M i18n/en.json
M i18n/qqq.json
M includes/Hooks.php
3 files changed, 18 insertions(+), 8 deletions(-)


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

diff --git a/i18n/en.json b/i18n/en.json
index 671a90c..5cd0889 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -28,9 +28,10 @@
"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": "With medium accuracy, finds 
more problem edits than the \"Very Likely\" filter but fewer than \"May.\"",
+   "ores-rcfilters-damaging-likelybad-desc-low": "With medium accuracy, 
finds an intermediate fraction of problem edits.",
+   "ores-rcfilters-damaging-likelybad-desc-high": "With high accuracy, 
finds most problem edits.",
"ores-rcfilters-damaging-verylikelybad-label": "Very likely have 
problems",
-   "ores-rcfilters-damaging-verylikelybad-desc": "Highly accurate at 
finding the most obvious flawed or damaging edits.",
+   "ores-rcfilters-damaging-verylikelybad-desc": "Very highly accurate at 
finding the most obviously 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,9 +41,10 @@
"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 more 
bad-faith edits than the \"Very likely\" filter but fewer than \"May.\"",
+   "ores-rcfilters-goodfaith-bad-desc-low": "With medium accuracy, finds 
an intermediate fraction of bad-faith edits.",
+   "ores-rcfilters-goodfaith-bad-desc-high": "With medium accuracy, finds 
most bad-faith edits.",
"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-rcfilters-goodfaith-verylikelybad-desc": "Very highly accurate at 
finding the most obvious bad-faith edits.",
"ores-pref-highlight": "Highlight likely problem edits with colors and 
an \"{{int:ores-damaging-letter}}\" for \"needs review\"",
"ores-pref-rc-hidenondamaging": "Show only likely problem edits (and 
hide probably good edits)",
"ores-pref-watchlist-hidenondamaging": "Show only likely problem edits 
(and hide probably good edits)",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 041c9e0..06a77d0 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -34,7 +34,8 @@
"ores-rcfilters-damaging-maybebad-label": "Label for the filter for 
showing edits that are somewhat likely to be damaging.",
"ores-rcfilters-damaging-maybebad-desc": "Description for the filter 
for showing edits that are somewhat likely to be damaging.",
"ores-rcfilters-damaging-likelybad-label": "Label for the filter for 
showing edits that are somewhat likely to be damaging.",
-   "ores-rcfilters-damaging-likelybad-desc": "Description for the filter 
for showing edits that are somewhat likely to be damaging.",
+   "ores-rcfilters-damaging-likelybad-desc-low": "Description for the 
LOW-accuracy filter for showing edits that are somewhat likely to be damaging.",
+   "ores-rcfilters-damaging-likelybad-desc-high": "Description for the 
HIGH-accuracy filter for showing edits that are somewhat likely to be 
damaging.",
"ores-rcfilters-damaging-verylikelybad-label": "Label for the filter 
for showing edits that are somewhat likely to be damaging.",
"ores-rcfilters-damaging-verylikelybad-desc": "Description for the 
filter for showing edits that are somewhat likely to be damaging.",

[MediaWiki-commits] [Gerrit] operations/puppet[production]: Install virtualenv bin on stat boxes

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

Change subject: Install virtualenv bin on stat boxes
..


Install virtualenv bin on stat boxes

Bug: T152712
Change-Id: Ia0e7472dc5068795960ebde71d29605dcb87f0e7
---
M modules/statistics/manifests/packages.pp
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/modules/statistics/manifests/packages.pp 
b/modules/statistics/manifests/packages.pp
index 1d0bc0b..e4f6911 100644
--- a/modules/statistics/manifests/packages.pp
+++ b/modules/statistics/manifests/packages.pp
@@ -93,6 +93,7 @@
 'python-matplotlib', # For generating plots of data
 'python-netaddr',
 'python-virtualenv', # T84378
+'virtualenv',
 # Aaron Halfaker (halfak) wants python{,3}-dev environments for module 
oursql
 'python-dev',# T83316
 'python3-dev',   # T83316

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia0e7472dc5068795960ebde71d29605dcb87f0e7
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ottomata 
Gerrit-Reviewer: Ottomata 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Install virtualenv bin on stat boxes

2017-07-28 Thread Ottomata (Code Review)
Ottomata has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/368461 )

Change subject: Install virtualenv bin on stat boxes
..

Install virtualenv bin on stat boxes

Bug: T152712
Change-Id: Ia0e7472dc5068795960ebde71d29605dcb87f0e7
---
M modules/statistics/manifests/packages.pp
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/61/368461/1

diff --git a/modules/statistics/manifests/packages.pp 
b/modules/statistics/manifests/packages.pp
index 1d0bc0b..e4f6911 100644
--- a/modules/statistics/manifests/packages.pp
+++ b/modules/statistics/manifests/packages.pp
@@ -93,6 +93,7 @@
 'python-matplotlib', # For generating plots of data
 'python-netaddr',
 'python-virtualenv', # T84378
+'virtualenv',
 # Aaron Halfaker (halfak) wants python{,3}-dev environments for module 
oursql
 'python-dev',# T83316
 'python3-dev',   # T83316

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...MobileFrontend[master]: MwContentProvider should honour the skin name

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

Change subject: MwContentProvider should honour the skin name
..


MwContentProvider should honour the skin name

As we've discovered the skin being used can impact the parse.
This removes the annoying edit link that has been showing up while
we test the Vector skin.

Change-Id: I4a7801092d0f626d115043d062e8337689f7f8ee
---
M includes/content-providers/ContentProviderFactory.php
M includes/content-providers/MwApiContentProvider.php
2 files changed, 6 insertions(+), 2 deletions(-)

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



diff --git a/includes/content-providers/ContentProviderFactory.php 
b/includes/content-providers/ContentProviderFactory.php
index 43f36f0..7da09d2 100644
--- a/includes/content-providers/ContentProviderFactory.php
+++ b/includes/content-providers/ContentProviderFactory.php
@@ -29,8 +29,9 @@
 
switch ( $contentProviderClass ) {
case self::MW_API:
+   $skinName = $out->getSkin()->getSkinName();
$baseUrl = $config->get( 
'MFMwApiContentProviderBaseUri' );
-   return new $contentProviderClass( $baseUrl, 
$out );
+   return new $contentProviderClass( $baseUrl, 
$out, $skinName );
case self::PHP_PARSER:
return new $contentProviderClass( $html ? $html 
: $out->getHTML() );
default:
diff --git a/includes/content-providers/MwApiContentProvider.php 
b/includes/content-providers/MwApiContentProvider.php
index 0335948..8e9e399 100644
--- a/includes/content-providers/MwApiContentProvider.php
+++ b/includes/content-providers/MwApiContentProvider.php
@@ -13,10 +13,12 @@
 *
 * @param string $baseUrl for the MediaWiki API to be used minus query 
string e.g. /w/api.php
 * @param OutputPage $out so that the ResourceLoader modules specific 
to the page can be added
+* @param string $skinName the skin name the content is being provided 
for
 */
-   public function __construct( $baseUrl, OutputPage $out ) {
+   public function __construct( $baseUrl, OutputPage $out, $skinName ) {
$this->baseUrl = $baseUrl;
$this->out = $out;
+   $this->skinName = $skinName;
}
 
/**
@@ -27,6 +29,7 @@
$title = $out->getTitle();
$url = $this->baseUrl . 
'?formatversion=2=json=parse=text|modules=';
$url .= $title->getPrefixedDBKey();
+   $url .= '=' . $this->skinName;
 
$resp = file_get_contents( $url, false );
$json = json_decode( $resp, true );

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...Popups[master]: WIP: Use EcmaScript modules instead of common.js modules

2017-07-28 Thread Jhernandez (Code Review)
Jhernandez has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/368460 )

Change subject: WIP: Use EcmaScript modules instead of common.js modules
..

WIP: Use EcmaScript modules instead of common.js modules

Why: Because they are the approved standard by TC39 and Ecma.

Changes:
  * Wrap mw-node-qunit in run.js to register babel to transpile modules
for node v6
  * Change all sources in src/ to use ES modules
* Change constants.js to be able to run without
  jQuery.bracketedDevicePixelRatio given ES modules are hoisted to
  the top by spec so we can't patch globals before importing it
  * Change all tests in tests/node-qunit/ to use ES modules
  * Drop usage of mock-require given ES modules are easy to stub with
sinon

Additional changes:
  * Rename tests/node-qunit/renderer.js to renderer.test.js to follow
the convention of all the other files
  * Make npm run test:node run only .test.js test files so that it
doesn't run the stubs.js or run.js file.

Change-Id: I17a0b76041d5e2fd18e2d54950d9d7c0db99a941
---
M .eslintrc.json
M package.json
M resources/dist/index.js
M resources/dist/index.js.map
M src/actionTypes.js
M src/actions.js
M src/changeListener.js
M src/changeListeners/eventLogging.js
M src/changeListeners/footerLink.js
M src/changeListeners/index.js
M src/changeListeners/linkTitle.js
M src/changeListeners/render.js
M src/changeListeners/settings.js
M src/changeListeners/statsv.js
M src/changeListeners/syncUserSettings.js
M src/constants.js
M src/container.js
M src/experiments.js
M src/formatter.js
M src/gateway/index.js
M src/gateway/mediawiki.js
M src/gateway/rest.js
M src/gateway/restFormatters.js
M src/index.js
M src/instrumentation/eventLogging.js
M src/instrumentation/statsv.js
M src/isEnabled.js
M src/preview/model.js
M src/previewBehavior.js
M src/reducers/eventLogging.js
M src/reducers/index.js
M src/reducers/nextState.js
M src/reducers/preview.js
M src/reducers/settings.js
M src/reducers/statsv.js
M src/title.js
M src/ui/renderer.js
M src/ui/settingsDialog.js
M src/userSettings.js
M src/wait.js
M tests/node-qunit/actions.test.js
M tests/node-qunit/changeListener.test.js
M tests/node-qunit/changeListeners/eventLogging.test.js
M tests/node-qunit/changeListeners/footerLink.test.js
M tests/node-qunit/changeListeners/linkTitle.test.js
M tests/node-qunit/changeListeners/render.test.js
M tests/node-qunit/changeListeners/settings.test.js
M tests/node-qunit/changeListeners/statsv.test.js
M tests/node-qunit/changeListeners/syncUserSettings.test.js
M tests/node-qunit/container.test.js
M tests/node-qunit/counts.test.js
M tests/node-qunit/experiments.test.js
M tests/node-qunit/formatter.test.js
M tests/node-qunit/gateway/index.test.js
M tests/node-qunit/gateway/mediawiki.test.js
M tests/node-qunit/gateway/rest.test.js
M tests/node-qunit/instrumentation/eventLogging.test.js
M tests/node-qunit/instrumentation/statsv.test.js
M tests/node-qunit/integration.test.js
M tests/node-qunit/isEnabled.test.js
M tests/node-qunit/preview/model.test.js
M tests/node-qunit/previewBehavior.test.js
M tests/node-qunit/reducers/eventLogging.test.js
M tests/node-qunit/reducers/preview.test.js
M tests/node-qunit/reducers/settings.test.js
M tests/node-qunit/reducers/statsv.test.js
A tests/node-qunit/run.js
M tests/node-qunit/stubs.js
M tests/node-qunit/title.test.js
R tests/node-qunit/ui/renderer.test.js
M tests/node-qunit/ui/settingsDialog.test.js
M tests/node-qunit/userSettings.test.js
M tests/node-qunit/wait.test.js
73 files changed, 298 insertions(+), 341 deletions(-)


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


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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: [DNM] ContInt: Upgrade npm from 2.15.2 to 3.8.3 in CI

2017-07-28 Thread Jforrester (Code Review)
Jforrester has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/368459 )

Change subject: [DNM] ContInt: Upgrade npm from 2.15.2 to 3.8.3 in CI
..

[DNM] ContInt: Upgrade npm from 2.15.2 to 3.8.3 in CI

Bug: T161861
Change-Id: Ia4a7431523efc616dcab8eb96c32fe4c2eef8a90
---
M modules/contint/manifests/packages/javascript.pp
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/59/368459/1

diff --git a/modules/contint/manifests/packages/javascript.pp 
b/modules/contint/manifests/packages/javascript.pp
index eb59054..9b2078e 100644
--- a/modules/contint/manifests/packages/javascript.pp
+++ b/modules/contint/manifests/packages/javascript.pp
@@ -15,7 +15,7 @@
 #
 # https://wikitech.wikimedia.org/wiki/Nova_Resource:Integration/Setup
 $versions = {
-'npm'   => '2.15.2',
+'npm'   => '3.8.3',
 }
 
 # Provide 'node' alias for 'nodejs' because Debian/Ubuntu

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

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

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


[MediaWiki-commits] [Gerrit] RelPath[master]: Normalize leading path separator to forward slash

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

Change subject: Normalize leading path separator to forward slash
..


Normalize leading path separator to forward slash

On Windows, dirname() is screwy and sometimes returns a leading
backslash and sometimes keeps a leading forward slash. For example,

dirname('/') === '\\';
dirname('/foo/') === '\\';
dirname('/foo/bar/') === '/foo';

All of the logic in the library is only equipped to handle forward
slashes. Furthermore, backslash and forward slash are both completely
disallowed in Windows filenames (Windows does not have any "escaping"
mechanism to inject invalid characters into filenames), whereas all of
these characters are allowed in *nix via escaping them. As such, a
wholesale replacement would be buggy on *nix in the event a directory
name has an embedded backslash.

Since the behavior of dirname() on Windows seems to only affect the
leading character, we step around this issue by only inspecting the
first character of the string and checking its equivalence to
DIRECTORY_SEPARATOR. On *nix, this will add a little bit of overhead as
the character is replaced with itself. I have not run any performance
benchmarks but I believe it to be minimal. On Windows, this will replace
backslashes with a forward slash. Checking DIRECTORY_SEPARATOR instead
of PHP_OS makes sense since we're dealing with the filesystem, and has
less overhead than what wfIsWindows would do (substring PHP_OS to check
for WIN).

I have added a basic test case to show that an embedded backslash works.
I can provide additional test cases if needed, however anything more
complicated would require a minor refactor of the test class as the
expected value will vary by OS (also meaning jenkins running them
automatically will not be able to cover every test).

Change-Id: Idc01c3980b1cecb05cf78369a80477c90d17d108
---
M src/RelPath.php
M tests/RelPathTest.php
2 files changed, 9 insertions(+), 0 deletions(-)

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



diff --git a/src/RelPath.php b/src/RelPath.php
index a150ddf..62b5bbe 100644
--- a/src/RelPath.php
+++ b/src/RelPath.php
@@ -38,6 +38,14 @@
 
while ( true ) {
$cur = dirname( $path );
+   if ( $cur[0] === DIRECTORY_SEPARATOR ) {
+   // dirname() on Windows sometimes returns a leading 
backslash, but other
+   // times retains the leading forward slash. Slashes 
other than the leading one
+   // are returned as-is, and therefore do not need to be 
touched.
+   // Furthermore, don't break on *nix where \ is allowed 
in file/directory names.
+   $cur[0] = '/';
+   }
+
if ( $cur === $path || ( $cur === '.' && basename( $path ) === 
$path ) ) {
break;
}
diff --git a/tests/RelPathTest.php b/tests/RelPathTest.php
index 3ac15c6..46c1602 100644
--- a/tests/RelPathTest.php
+++ b/tests/RelPathTest.php
@@ -56,6 +56,7 @@
array( '/a', '/a', '.' ),
array( '/a/b', '/a/b', '.' ),
array( 'foo/bar', 'quux', false ),
+   array( '/foo\\bar/', '/foo\\bar/baz/', '..' ),
);
}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Idc01c3980b1cecb05cf78369a80477c90d17d108
Gerrit-PatchSet: 3
Gerrit-Project: RelPath
Gerrit-Branch: master
Gerrit-Owner: Skizzerz 
Gerrit-Reviewer: Bartosz Dziewoński 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: MaxSem 
Gerrit-Reviewer: Reedy 
Gerrit-Reviewer: Skizzerz 
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]: sanitarium_multiinstance: Enable binlog

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

Change subject: sanitarium_multiinstance: Enable binlog
..


sanitarium_multiinstance: Enable binlog

Binlog options were missing after conversion.

Bug: T169514
Change-Id: I90c32af26085ee0b9de87fab0d837e2915a4331a
---
M 
modules/role/templates/mariadb/mysqld_config/sanitarium_multiinstance.my.cnf.erb
1 file changed, 16 insertions(+), 1 deletion(-)

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



diff --git 
a/modules/role/templates/mariadb/mysqld_config/sanitarium_multiinstance.my.cnf.erb
 
b/modules/role/templates/mariadb/mysqld_config/sanitarium_multiinstance.my.cnf.erb
index 41f2d4e..3964154 100644
--- 
a/modules/role/templates/mariadb/mysqld_config/sanitarium_multiinstance.my.cnf.erb
+++ 
b/modules/role/templates/mariadb/mysqld_config/sanitarium_multiinstance.my.cnf.erb
@@ -16,6 +16,14 @@
 user  = mysql
 read_only = 1
 basedir   = <%= @basedir %>
+server_id = <%= @server_id %>
+
+# gtid_domain_id flag is needed for multisource replication and GTID.
+# # Strictly it is only needed on masters or servers that can potentially be
+# # masters but for consistency it should be set in all of them.
+# # https://mariadb.com/kb/en/mariadb/gtid/
+#
+gtid_domain_id  = <%= @gtid_domain_id %>
 
 # enable socket authentication
 plugin-load = unix_socket=auth_socket.so
@@ -41,8 +49,15 @@
 interactive_timeout= 28800
 wait_timeout   = 3600
 transaction-isolation  = REPEATABLE-READ
-slave_transaction_retries  = 4294967295
+
+# binary log an replication options
+log-bin
+log-slave-updates
+sync-binlog= 1
+binlog_cache_size  = 10M
+max-binlog_size= 1000M
 binlog-format  = ROW
+slave_transaction_retries  = 4294967295
 expire_logs_days   = 30
 sql-mode   = IGNORE_BAD_TABLE_OPTIONS
 

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...RelatedArticles[master]: WIP: Having 2 folders for browser tests is confusing.

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

Change subject: WIP: Having 2 folders for browser tests is confusing.
..

WIP: Having 2 folders for browser tests is confusing.

Should we move LocalSettings to tests/selenium ?
Is ci.yml and environments.yml still needed? IF so can they
also live in tests/selenium

Bug: T164024
Change-Id: Ifec8bf2b3cd7d4db105c254248cdfcdf773472ef
---
D tests/browser/LocalSettings.php
D tests/browser/README.mediawiki
D tests/browser/ci.yml
D tests/browser/environments.yml
4 files changed, 0 insertions(+), 127 deletions(-)


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

diff --git a/tests/browser/LocalSettings.php b/tests/browser/LocalSettings.php
deleted file mode 100644
index 968379d..000
--- a/tests/browser/LocalSettings.php
+++ /dev/null
@@ -1,7 +0,0 @@
-https://rvm.io/) and on
-Windows RubyInstaller (http://rubyinstaller.org/).
-
-Open terminal in tests/browser. Update RubyGems and install required
-gems with:
-
-  gem update --system
-  gem install bundler
-  bundle install
-
-Environment variables MEDIAWIKI_USER and MEDIAWIKI_PASSWORD are required for
-tests tagged `@login`. For local testing, create a test user on your local wiki
-and export the user and password as the values for those variables.
-For example:
-
-  export MEDIAWIKI_USER= # Linux/Unix/Mac
-  set MEDIAWIKI_USER= # Windows
-
-  export MEDIAWIKI_PASSWORD= # Linux/Unix/Mac
-  set MEDIAWIKI_PASSWORD= # Windows
-
-In addition to this create another user which will be reserved for new uploads
-"Selenium_newuser". The password for this user should be the same as
-MEDIAWIKI_PASSWORD
-
-Tests that use the "Given I create a random page using the API" step need to 
set
-the MEDIAWIKI_API_URL environment variable, e.g.
-export MEDIAWIKI_API_URL=http://en.wikipedia.beta.wmflabs.org/w/api.php
-
-Run the tests from the RelatedArticles directory with:
-
-  make cucumber
-
-If you want to run a single set of tests, go to the tests/browser directory and
-call 'bundle exec cucumber' with the path to the test file. For example, to run
-only the watchlist tests:
-
-  bundle exec cucumber features/read_more_desktop.feature
-
-XML report (for Jenkins) is created at tests/browser/reports/junit.
-
-Jenkins is hosted at https://wmf.ci.cloudbees.com/ and it drives
-browsers at http://saucelabs.com/
-
-For more information about running Selenium tests please see
-https://github.com/wikimedia/mediawiki-selenium
diff --git a/tests/browser/ci.yml b/tests/browser/ci.yml
deleted file mode 100644
index 59db8be..000
--- a/tests/browser/ci.yml
+++ /dev/null
@@ -1,9 +0,0 @@
-BROWSER:
-  - chrome
-
-MEDIAWIKI_ENVIRONMENT:
-  - beta-desktop
-  - beta-mobile
-
-PLATFORM:
-  - Linux
diff --git a/tests/browser/environments.yml b/tests/browser/environments.yml
deleted file mode 100644
index dc42d7f..000
--- a/tests/browser/environments.yml
+++ /dev/null
@@ -1,55 +0,0 @@
-# Customize this configuration as necessary to provide defaults for various
-# test environments.
-#
-# The set of defaults to use is determined by the MEDIAWIKI_ENVIRONMENT
-# environment variable.
-#
-#   export MEDIAWIKI_ENVIRONMENT=mw-vagrant-host
-#   bundle exec cucumber
-#
-# Additional variables set by the environment will override the corresponding
-# defaults defined here.
-#
-#   export MEDIAWIKI_ENVIRONMENT=mw-vagrant-host
-#   export MEDIAWIKI_USER=Selenium_user2
-#   bundle exec cucumber
-#
-mw-vagrant-host: 
-  mediawiki_url: http://127.0.0.1:8080/wiki/
-  user_factory: true
-
-barry:
-  browser: phantomjs
-  user_factory: false
-  # mediawiki_url: Will be set manually
-
-mw-vagrant-guest:
-  mediawiki_url: http://127.0.0.1/wiki/
-  user_factory: true
-
-beta-desktop:
-  mediawiki_url: https://en.wikipedia.beta.wmflabs.org/wiki/
-  mediawiki_user: Selenium_user
-  # mediawiki_password: SET THIS IN THE ENVIRONMENT!
-
-beta-mobile:
-  mediawiki_url: https://en.m.wikipedia.beta.wmflabs.org/wiki/
-  mediawiki_user: Selenium_user
-  # mediawiki_password: SET THIS IN THE ENVIRONMENT!
-
-staging:
-  mediawiki_url: http://reading-web-staging.wmflabs.org/wiki/
-  mediawiki_user: Selenium_user
-  # mediawiki_password: SET THIS IN THE ENVIRONMENT!
-
-test2:
-  mediawiki_url: https://test2.wikipedia.org/wiki/
-  mediawiki_user: Selenium_user
-  # mediawiki_password: SET THIS IN THE ENVIRONMENT!
-
-integration:
-  browser: chrome
-  user_factory: true
-  # mediawiki_url: JENKINS WILL SET THIS
-
-default: *default

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: sanitarium_multiinstance: Enable binlog

2017-07-28 Thread Jcrespo (Code Review)
Jcrespo has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/368458 )

Change subject: sanitarium_multiinstance: Enable binlog
..

sanitarium_multiinstance: Enable binlog

Binlog options were missing after conversion.

Bug: T169514
Change-Id: I90c32af26085ee0b9de87fab0d837e2915a4331a
---
M 
modules/role/templates/mariadb/mysqld_config/sanitarium_multiinstance.my.cnf.erb
1 file changed, 16 insertions(+), 1 deletion(-)


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

diff --git 
a/modules/role/templates/mariadb/mysqld_config/sanitarium_multiinstance.my.cnf.erb
 
b/modules/role/templates/mariadb/mysqld_config/sanitarium_multiinstance.my.cnf.erb
index 41f2d4e..3964154 100644
--- 
a/modules/role/templates/mariadb/mysqld_config/sanitarium_multiinstance.my.cnf.erb
+++ 
b/modules/role/templates/mariadb/mysqld_config/sanitarium_multiinstance.my.cnf.erb
@@ -16,6 +16,14 @@
 user  = mysql
 read_only = 1
 basedir   = <%= @basedir %>
+server_id = <%= @server_id %>
+
+# gtid_domain_id flag is needed for multisource replication and GTID.
+# # Strictly it is only needed on masters or servers that can potentially be
+# # masters but for consistency it should be set in all of them.
+# # https://mariadb.com/kb/en/mariadb/gtid/
+#
+gtid_domain_id  = <%= @gtid_domain_id %>
 
 # enable socket authentication
 plugin-load = unix_socket=auth_socket.so
@@ -41,8 +49,15 @@
 interactive_timeout= 28800
 wait_timeout   = 3600
 transaction-isolation  = REPEATABLE-READ
-slave_transaction_retries  = 4294967295
+
+# binary log an replication options
+log-bin
+log-slave-updates
+sync-binlog= 1
+binlog_cache_size  = 10M
+max-binlog_size= 1000M
 binlog-format  = ROW
+slave_transaction_retries  = 4294967295
 expire_logs_days   = 30
 sql-mode   = IGNORE_BAD_TABLE_OPTIONS
 

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

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

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


  1   2   3   >