[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Add TransactionProcessor tests for wrapping, unwrapping and ...

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

Change subject: Add TransactionProcessor tests for wrapping, unwrapping and 
rewrapping
..


Add TransactionProcessor tests for wrapping, unwrapping and rewrapping

We had transaction builder tests for these, but there were no tests asserting
that wrapping transactions (which are perhaps the weirdest case when it comes
to tree synchronization) actually process correctly.

Change-Id: Ib621308294ad3ae632f0af87ec129dee7d7aba27
---
M tests/dm/ve.dm.TransactionProcessor.test.js
1 file changed, 45 insertions(+), 0 deletions(-)

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



diff --git a/tests/dm/ve.dm.TransactionProcessor.test.js 
b/tests/dm/ve.dm.TransactionProcessor.test.js
index a79ab81..01bf70e 100644
--- a/tests/dm/ve.dm.TransactionProcessor.test.js
+++ b/tests/dm/ve.dm.TransactionProcessor.test.js
@@ -331,6 +331,51 @@
data.splice( 3, 1 );
}
},
+   'wrapping elements': {
+   calls: [
+   [ 'pushRetain', 55 ],
+   [ 'pushReplace', 55, 0, [ { type: 
'list', attributes: { style: 'number' } }, { type: 'listItem' } ] ],
+   [ 'pushRetain', 3 ],
+   [ 'pushReplace', 58, 0, [ { type: 
'/listItem' }, { type: 'listItem' } ] ],
+   [ 'pushRetain', 3 ],
+   [ 'pushReplace', 61, 0, [ { type: 
'/listItem' }, { type: '/list' } ] ]
+   ],
+   expected: function ( data ) {
+   data.splice( 61, 0, { type: '/listItem' 
}, { type: '/list' } );
+   data.splice( 58, 0, { type: '/listItem' 
}, { type: 'listItem' } );
+   data.splice( 55, 0, { type: 'list', 
attributes: { style: 'number' } }, { type: 'listItem' } );
+   }
+   },
+   'unwrapping elements': {
+   calls: [
+   [ 'pushRetain', 43 ],
+   [ 'pushReplace', 43, 2, [] ],
+   [ 'pushRetain', 3 ],
+   [ 'pushReplace', 48, 2, [] ],
+   [ 'pushRetain', 3 ],
+   [ 'pushReplace', 53, 2, [] ]
+   ],
+   expected: function ( data ) {
+   data.splice( 53, 2 );
+   data.splice( 48, 2 );
+   data.splice( 43, 2 );
+   }
+   },
+   'rewrapping elements': {
+   calls: [
+   [ 'pushRetain', 43 ],
+   [ 'pushReplace', 43, 2, [ { type: 
'list', attributes: { style: 'number' } }, { type: 'listItem' } ] ],
+   [ 'pushRetain', 3 ],
+   [ 'pushReplace', 48, 2, [ { type: 
'/listItem' }, { type: 'listItem' } ] ],
+   [ 'pushRetain', 3 ],
+   [ 'pushReplace', 53, 2, [ { type: 
'/listItem' }, { type: '/list' } ] ]
+   ],
+   expected: function ( data ) {
+   data.splice( 53, 2, { type: '/listItem' 
}, { type: '/list' } );
+   data.splice( 48, 2, { type: '/listItem' 
}, { type: 'listItem' } );
+   data.splice( 43, 2, { type: 'list', 
attributes: { style: 'number' } }, { type: 'listItem' } );
+   }
+   },
'applying a link across an existing annotation 
boundary': {
data: [
{ type: 'paragraph' },

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib621308294ad3ae632f0af87ec129dee7d7aba27
Gerrit-PatchSet: 2
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Catrope 
Gerrit-Reviewer: Divec 
Gerrit-Reviewer: jenkins-bot <>

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

[MediaWiki-commits] [Gerrit] operations/puppet[production]: Enable aqs1008-b (AQS cassandra cluster)

2017-02-02 Thread Elukey (Code Review)
Elukey has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/335756 )

Change subject: Enable aqs1008-b (AQS cassandra cluster)
..


Enable aqs1008-b (AQS cassandra cluster)

Bug: T155654
Change-Id: Ib2a2e3b4d4c9e823761230f32c44a28a83e2e3ea
---
M hieradata/hosts/aqs1008.yaml
M hieradata/role/common/aqs.yaml
2 files changed, 7 insertions(+), 5 deletions(-)

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



diff --git a/hieradata/hosts/aqs1008.yaml b/hieradata/hosts/aqs1008.yaml
index cce8bbf..eb5e3b9 100644
--- a/hieradata/hosts/aqs1008.yaml
+++ b/hieradata/hosts/aqs1008.yaml
@@ -8,8 +8,8 @@
 listen_address: 10.64.16.74 #aqs1008-a.eqiad.wmnet
 rpc_address: 10.64.16.74
 rpc_interface: eth0
-#  b:
-#jmx_port: 7190
-#listen_address: 10.64.16.78 #aqs1008-b.eqiad.wmnet
-#rpc_address: 10.64.16.78
-#rpc_interface: eth0
+  b:
+jmx_port: 7190
+listen_address: 10.64.16.78 #aqs1008-b.eqiad.wmnet
+rpc_address: 10.64.16.78
+rpc_interface: eth0
diff --git a/hieradata/role/common/aqs.yaml b/hieradata/role/common/aqs.yaml
index 02af7b3..d6bc771 100644
--- a/hieradata/role/common/aqs.yaml
+++ b/hieradata/role/common/aqs.yaml
@@ -30,6 +30,7 @@
 - aqs1007-a.eqiad.wmnet
 - aqs1007-b.eqiad.wmnet
 - aqs1008-a.eqiad.wmnet
+- aqs1008-b.eqiad.wmnet
 cassandra::max_heap_size: 16g
 # 1/4 heap size, no more than 100m/thread
 cassandra::heap_newsize: 2048m
@@ -80,6 +81,7 @@
 - aqs1007-a.eqiad.wmnet
 - aqs1007-b.eqiad.wmnet
 - aqs1008-a.eqiad.wmnet
+- aqs1008-b.eqiad.wmnet
 aqs::logstash_host: logstash1001.eqiad.wmnet
 aqs::cassandra_default_consistency: localOne
 aqs::cassandra_local_dc: "%{::site}"

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Add another entry to Content-security-policy logging blacklist

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

Change subject: Add another entry to Content-security-policy logging blacklist
..

Add another entry to Content-security-policy logging blacklist

Add https://ad.lkqd.net/vpaid/vpaid.js which spams the log quite
a bit. The CSP blacklist includes urls which we know are caused
by adware, and thus aren't interesting (to us).

Change-Id: I11e5a3bbd9090b7d3053ca4c855b220b14511bb5
---
M includes/DefaultSettings.php
1 file changed, 1 insertion(+), 0 deletions(-)


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

diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php
index c7c7fb7..831843f 100644
--- a/includes/DefaultSettings.php
+++ b/includes/DefaultSettings.php
@@ -8556,6 +8556,7 @@
'https://atpixel.alephd.com' => true,
'https://rtb.metrigo.com' => true,
'https://d5p.de17a.com' => true,
+   'https://ad.lkqd.net/vpaid/vpaid.js' => true,
 ];
 
 /**

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I11e5a3bbd9090b7d3053ca4c855b220b14511bb5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Brian Wolff 

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


[MediaWiki-commits] [Gerrit] mediawiki...Popups[mpga]: Remove unused code in repo

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

Change subject: Remove unused code in repo
..


Remove unused code in repo

The existence of these files was causing me much confusion as I thought
they were still being used in the mpga branch.

If this is note the case they should be removed to make the repo easier
to understand.

Changes:
* Move the ext.popups.animation.less into ext.popups since that's where
its shipped.
* Remove files which are not being used.
* Since csslint now runs on ext.popups.animation.less fix the linting
issues (previously linting was not occuring)

Change-Id: Iae0a78d0b8a13353de70794b67387f2c3bab44c6
---
M extension.json
D resources/ext.popups.core/ext.popups.core.js
D resources/ext.popups.schemaPopups.utils/ext.popups.schemaPopups.utils.js
D resources/ext.popups.schemaPopups/ext.popups.schemaPopups.js
R resources/ext.popups/styles/ext.popups.animation.less
D tests/qunit/ext.popups.core.test.js
D tests/qunit/ext.popups.desktopRenderer.test.js
D tests/qunit/ext.popups.renderer.article.test.js
D tests/qunit/ext.popups.schemaPopups.utils.test.js
9 files changed, 3 insertions(+), 1,136 deletions(-)

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



diff --git a/extension.json b/extension.json
index e9ec449..c59442c 100644
--- a/extension.json
+++ b/extension.json
@@ -112,7 +112,7 @@
},
"styles": [

"resources/ext.popups/styles/ext.popups.core.less",
-   
"resources/ext.popups.desktop/ext.popups.animation.less",
+   
"resources/ext.popups/styles/ext.popups.animation.less",

"resources/ext.popups/styles/ext.popups.settings.less"
],
"messages": [
diff --git a/resources/ext.popups.core/ext.popups.core.js 
b/resources/ext.popups.core/ext.popups.core.js
deleted file mode 100644
index bc4fe65..000
--- a/resources/ext.popups.core/ext.popups.core.js
+++ /dev/null
@@ -1,134 +0,0 @@
-( function ( $, mw ) {
-   'use strict';
-   var previewCountStorageKey = 'ext.popups.core.previewCount',
-   popupsEnabledStorageKey = 'mwe-popups-enabled';
-
-   /**
-* @class mw.popups
-* @singleton
-*/
-   mw.popups = {};
-
-   /**
-* The API object used for all this extension's requests
-* @property {Object} api
-*/
-   mw.popups.api = new mw.Api();
-
-   /**
-* Whether the page is being scrolled.
-* @property {boolean} scrolled
-*/
-   mw.popups.scrolled = false;
-
-   /**
-* Temporarily remove the title attribute of a link so that
-* the tooltip doesn't show up alongside the Hovercard.
-*
-* @method removeTooltip
-* @param {jQuery.Object} $link link from which to strip title
-*/
-   mw.popups.removeTooltip = function ( $link ) {
-   // We shouldn't empty the title attribute of links that
-   // can't have Hovercards, ie. TextExtracts didn't return
-   // anything. It's set in the article.init after attempting
-   // to make an API request.
-   if (
-   $link.data( 'dont-empty-title' ) !== true &&
-   $link.filter( '[title]:not([title=""])' ).length
-   ) {
-   $link
-   .data( 'title', $link.attr( 'title' ) )
-   .attr( 'title', '' );
-   }
-   };
-
-   /**
-* Restore previously-removed title attribute.
-*
-* @method restoreTooltip
-* @param {jQuery.Object} $link link to which to restore title
-*/
-   mw.popups.restoreTooltip = function ( $link ) {
-   $link.attr( 'title', $link.data( 'title' ) );
-   };
-
-   /**
-* Register a hover event that may render a popup on an appropriate 
link.
-*
-* @method setupTriggers
-* @param {jQuery.Object} $elements to bind events to
-* @param {string} events to bind to
-*/
-   mw.popups.setupTriggers = function ( $elements, events ) {
-   $elements.on( events, function ( event ) {
-   if ( mw.popups.scrolled ) {
-   return;
-   }
-
-   mw.popups.render.render( $( this ), event, 
mw.popups.getRandomToken() );
-   } );
-   };
-
-   /**
-* Get action based on click event
-*
-* @method getAction
-* @param {Object} event
-* @return {string}
-*/
-   mw.popups.getAction = function ( event ) {
-   if ( event.which === 2 ) { // middle click
- 

[MediaWiki-commits] [Gerrit] operations/puppet[production]: Enable aqs1008-b (AQS cassandra cluster)

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

Change subject: Enable aqs1008-b (AQS cassandra cluster)
..

Enable aqs1008-b (AQS cassandra cluster)

Bug: T155654
Change-Id: Ib2a2e3b4d4c9e823761230f32c44a28a83e2e3ea
---
M hieradata/hosts/aqs1008.yaml
M hieradata/role/common/aqs.yaml
2 files changed, 7 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/56/335756/1

diff --git a/hieradata/hosts/aqs1008.yaml b/hieradata/hosts/aqs1008.yaml
index cce8bbf..eb5e3b9 100644
--- a/hieradata/hosts/aqs1008.yaml
+++ b/hieradata/hosts/aqs1008.yaml
@@ -8,8 +8,8 @@
 listen_address: 10.64.16.74 #aqs1008-a.eqiad.wmnet
 rpc_address: 10.64.16.74
 rpc_interface: eth0
-#  b:
-#jmx_port: 7190
-#listen_address: 10.64.16.78 #aqs1008-b.eqiad.wmnet
-#rpc_address: 10.64.16.78
-#rpc_interface: eth0
+  b:
+jmx_port: 7190
+listen_address: 10.64.16.78 #aqs1008-b.eqiad.wmnet
+rpc_address: 10.64.16.78
+rpc_interface: eth0
diff --git a/hieradata/role/common/aqs.yaml b/hieradata/role/common/aqs.yaml
index 02af7b3..d6bc771 100644
--- a/hieradata/role/common/aqs.yaml
+++ b/hieradata/role/common/aqs.yaml
@@ -30,6 +30,7 @@
 - aqs1007-a.eqiad.wmnet
 - aqs1007-b.eqiad.wmnet
 - aqs1008-a.eqiad.wmnet
+- aqs1008-b.eqiad.wmnet
 cassandra::max_heap_size: 16g
 # 1/4 heap size, no more than 100m/thread
 cassandra::heap_newsize: 2048m
@@ -80,6 +81,7 @@
 - aqs1007-a.eqiad.wmnet
 - aqs1007-b.eqiad.wmnet
 - aqs1008-a.eqiad.wmnet
+- aqs1008-b.eqiad.wmnet
 aqs::logstash_host: logstash1001.eqiad.wmnet
 aqs::cassandra_default_consistency: localOne
 aqs::cassandra_local_dc: "%{::site}"

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Tools: Outfactor jobkill script to toollabs::node::all

2017-02-02 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/335755 )

Change subject: Tools: Outfactor jobkill script to toollabs::node::all
..

Tools: Outfactor jobkill script to toollabs::node::all

Change-Id: Iac3b5c5c8b5e48930eebd85cdd15b12451003d13
---
M modules/role/manifests/toollabs/node/compute/dedicated.pp
M modules/role/manifests/toollabs/node/compute/general.pp
M modules/role/manifests/toollabs/node/web.pp
M modules/toollabs/manifests/node/all.pp
4 files changed, 8 insertions(+), 28 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/55/335755/1

diff --git a/modules/role/manifests/toollabs/node/compute/dedicated.pp 
b/modules/role/manifests/toollabs/node/compute/dedicated.pp
index aed44b3..a0ecc61 100644
--- a/modules/role/manifests/toollabs/node/compute/dedicated.pp
+++ b/modules/role/manifests/toollabs/node/compute/dedicated.pp
@@ -44,13 +44,4 @@
 config  => 'toollabs/gridengine/host-unrestricted.erb',
 require => File['/var/lib/gridengine'],
 }
-
-file { '/usr/local/bin/jobkill':
-ensure => file,
-owner  => 'root',
-group  => 'root',
-mode   => '0555',
-source => 'puppet:///modules/toollabs/jobkill',
-}
-
 }
diff --git a/modules/role/manifests/toollabs/node/compute/general.pp 
b/modules/role/manifests/toollabs/node/compute/general.pp
index 8b2a916..050a550 100644
--- a/modules/role/manifests/toollabs/node/compute/general.pp
+++ b/modules/role/manifests/toollabs/node/compute/general.pp
@@ -23,14 +23,4 @@
 }
 
 class { '::toollabs::hostgroups': groups => [ '@general' ] }
-
-file { '/usr/local/bin/jobkill':
-ensure => file,
-owner  => 'root',
-group  => 'root',
-mode   => '0555',
-source => 'puppet:///modules/toollabs/jobkill',
-}
-
 }
-
diff --git a/modules/role/manifests/toollabs/node/web.pp 
b/modules/role/manifests/toollabs/node/web.pp
index 8968b29..d118d87 100644
--- a/modules/role/manifests/toollabs/node/web.pp
+++ b/modules/role/manifests/toollabs/node/web.pp
@@ -54,13 +54,4 @@
 source  => 'puppet:///modules/toollabs/portreleaser',
 require => 
File['/usr/local/lib/python2.7/dist-packages/portgrabber.py'],
 }
-
-file { '/usr/local/bin/jobkill':
-ensure => file,
-owner  => 'root',
-group  => 'root',
-mode   => '0555',
-source => 'puppet:///modules/toollabs/jobkill',
-}
-
 }
diff --git a/modules/toollabs/manifests/node/all.pp 
b/modules/toollabs/manifests/node/all.pp
index 722892b..762542c 100644
--- a/modules/toollabs/manifests/node/all.pp
+++ b/modules/toollabs/manifests/node/all.pp
@@ -21,4 +21,12 @@
 size => inline_template('<%= @memorysize_mb.to_i * 3 %>MB'),
 }
 }
+
+file { '/usr/local/bin/jobkill':
+ensure => file,
+owner  => 'root',
+group  => 'root',
+mode   => '0555',
+source => 'puppet:///modules/toollabs/jobkill',
+}
 }

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...ContentTranslation[master]: Set the tools container height to fill viewport height

2017-02-02 Thread Santhosh (Code Review)
Santhosh has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/335754 )

Change subject: Set the tools container height to fill viewport height
..

Set the tools container height to fill viewport height

Changed the class names to use single hyphens

Change-Id: Ie15e76c8ea5853074b6c93cae7b1030a74ae461b
---
M modules/ui/mw.cx.ui.ToolsColumn.js
M modules/ui/styles/mw.cx.ui.ToolsColumn.less
2 files changed, 7 insertions(+), 3 deletions(-)


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

diff --git a/modules/ui/mw.cx.ui.ToolsColumn.js 
b/modules/ui/mw.cx.ui.ToolsColumn.js
index 39f4f39..674d37b 100644
--- a/modules/ui/mw.cx.ui.ToolsColumn.js
+++ b/modules/ui/mw.cx.ui.ToolsColumn.js
@@ -11,14 +11,14 @@
this.progressBar = new mw.cx.widgets.ProgressBarWidget( config );
this.toolContainer = new OO.ui.StackLayout( {
continuous: true,
-   classes: [ 'cx-column--tools-container' ],
+   classes: [ 'cx-column-tools-container' ],
expanded: false,
padded: true
} );
// Configuration initialization
this.config = $.extend( {}, config, {
continuous: true,
-   classes: [ 'cx-column', 'cx-column--tools' ],
+   classes: [ 'cx-column', 'cx-column-tools' ],
expanded: false,
scrollable: false,
padded: false,
diff --git a/modules/ui/styles/mw.cx.ui.ToolsColumn.less 
b/modules/ui/styles/mw.cx.ui.ToolsColumn.less
index ce06ae2..2c74c07 100644
--- a/modules/ui/styles/mw.cx.ui.ToolsColumn.less
+++ b/modules/ui/styles/mw.cx.ui.ToolsColumn.less
@@ -1,6 +1,6 @@
 @import "../../widgets/common/ext.cx.column.less";
 
-.cx-column--tools {
+.cx-column-tools {
.mw-ui-one-whole(@palm);
 
background-color: #f0f0f0;
@@ -20,4 +20,8 @@
@media @palm {
.stick-to-bottom;
}
+
+   .cx-column-tools-container {
+   height: 100vh;
+   }
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie15e76c8ea5853074b6c93cae7b1030a74ae461b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ContentTranslation
Gerrit-Branch: master
Gerrit-Owner: Santhosh 

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


[MediaWiki-commits] [Gerrit] mediawiki...ContentTranslation[master]: Add machine translation tool

2017-02-02 Thread Santhosh (Code Review)
Santhosh has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/335753 )

Change subject: Add machine translation tool
..

Add machine translation tool

This is no-op now, just the tool card and drop down.

Bug: T152586
Change-Id: Idb7c30d4833d42901c66ac864578fa538f7d2d22
---
M extension.json
A modules/tools/mw.cx.tools.MachineTranslationTool.js
A modules/tools/styles/mw.cx.tools.MachineTranslationTool.less
3 files changed, 114 insertions(+), 0 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation 
refs/changes/53/335753/1

diff --git a/extension.json b/extension.json
index 1486aae..a2bf0f9 100644
--- a/extension.json
+++ b/extension.json
@@ -1706,6 +1706,7 @@
},
"mw.cx.tools": {
"dependencies": [
+   "mw.cx.tools.MachineTranslationTool",
"mw.cx.tools.SearchTool",
"mw.cx.tools.ReferenceTool",
"mw.cx.tools.InstructionsTool",
@@ -1713,6 +1714,27 @@
"mw.cx.tools.LinkTool"
]
},
+   "mw.cx.tools.MachineTranslationTool": {
+   "scripts": [
+   "tools/mw.cx.tools.MachineTranslationTool.js"
+   ],
+   "styles": [
+   
"tools/styles/mw.cx.tools.MachineTranslationTool.less"
+   ],
+   "messages": [
+   "cx-tools-mt-title",
+   "cx-tools-mt-use-source",
+   "cx-tools-mt-reset",
+   "cx-tools-mt-provider-title",
+   "cx-tools-mt-dont-use",
+   "cx-tools-mt-set-default",
+   "cx-tools-mt-new-provider",
+   "cx-tools-mt-new-providers-available"
+   ],
+   "dependencies": [
+   "mw.cx.tools.TranslationTool"
+   ]
+   },
"mw.cx.tools.SearchTool": {
"scripts": [
"tools/mw.cx.tools.SearchTool.js"
diff --git a/modules/tools/mw.cx.tools.MachineTranslationTool.js 
b/modules/tools/mw.cx.tools.MachineTranslationTool.js
new file mode 100644
index 000..7bc494d
--- /dev/null
+++ b/modules/tools/mw.cx.tools.MachineTranslationTool.js
@@ -0,0 +1,79 @@
+/**
+ * Reference tool
+ *
+ * @class
+ * @extends mw.cx.tools.TranslationTool
+ * @constructor
+ * @param {mw.cx.ui.TranslationUnit} ui
+ * @param {Object} config
+ */
+mw.cx.tools.MachineTranslationTool = function CXMachineTranslationTool( ui, 
config ) {
+   config.title = mw.msg( 'cx-tools-mt-title' );
+   config.name = 'machinetranslation';
+   config.language = config.targetLanguage;
+   config.order = 5;
+   // Parent constructor
+   mw.cx.tools.MachineTranslationTool.super.call( this, ui, config );
+   this.ui.connect( this, {
+   click: 'showTool'
+   } );
+};
+
+/* Inheritance */
+OO.inheritClass( mw.cx.tools.MachineTranslationTool, 
mw.cx.tools.TranslationTool );
+
+mw.cx.tools.MachineTranslationTool.static.name = 'machinetranslation';
+mw.cx.tools.MachineTranslationTool.static.defaultProvider = null;
+
+/**
+ * @inheritDoc
+ */
+mw.cx.tools.MachineTranslationTool.prototype.getActions = function () {
+   this.keepDefault = new OO.ui.ButtonWidget( {
+   label: mw.msg( 'cx-tools-mt-set-default' ),
+   icon: 'check',
+   framed: false,
+   classes: [ 'cx-mt-set-default' ]
+   } );
+   this.actions = [
+   this.keepDefault
+   ];
+   this.keepDefault.connect( this, {
+   click: 'setDefaultProvider'
+   } );
+   return this.actions;
+};
+
+mw.cx.tools.MachineTranslationTool.prototype.getContent = function () {
+   var noMT, useSource, resetMT;
+
+   noMT = new OO.ui.MenuOptionWidget( {
+   data: 'no-mt',
+   label: mw.msg( 'cx-tools-mt-dont-use' )
+   } );
+   useSource = new OO.ui.MenuOptionWidget( {
+   data: 'source-mt',
+   label: mw.msg( 'cx-tools-mt-use-source' )
+   } );
+   resetMT = new OO.ui.MenuOptionWidget( {
+   data: 'reset-mt',
+   label: mw.msg( 'cx-tools-mt-reset' )
+   } );
+   this.mtProviderSelector = new OO.ui.DropdownWidget( {
+   classes: [ 'card-mt-providers-menu' ],
+   menu: {
+   items: [ useSource, noMT, resetMT ]
+   }
+   } );
+   this.mtProviderSelector.getMenu().selectItemByData( 'source-mt' );
+
+   return

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Avoid joining against page table when finding a page's oldes...

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

Change subject: Avoid joining against page table when finding a page's oldest 
revision.
..


Avoid joining against page table when finding a page's oldest revision.

Bug: T156537
Change-Id: Ifd27710cada823318ac3662d3c16323eb9a78839
---
M includes/page/WikiPage.php
M tests/phpunit/includes/page/WikiPageTest.php
2 files changed, 43 insertions(+), 4 deletions(-)

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



diff --git a/includes/page/WikiPage.php b/includes/page/WikiPage.php
index 1c1412a..d9f6f63 100644
--- a/includes/page/WikiPage.php
+++ b/includes/page/WikiPage.php
@@ -582,12 +582,10 @@
$row = null;
while ( $continue ) {
$row = $db->selectRow(
-   [ 'page', 'revision' ],
+   [ 'revision' ],
$revSelectFields,
[
-   'page_namespace' => 
$this->mTitle->getNamespace(),
-   'page_title' => 
$this->mTitle->getDBkey(),
-   'rev_page = page_id'
+   'rev_page' => $this->getId()
],
__METHOD__,
[
diff --git a/tests/phpunit/includes/page/WikiPageTest.php 
b/tests/phpunit/includes/page/WikiPageTest.php
index d32915b..6b911bf 100644
--- a/tests/phpunit/includes/page/WikiPageTest.php
+++ b/tests/phpunit/includes/page/WikiPageTest.php
@@ -753,6 +753,47 @@
 */
 
/**
+* @covers WikiPage::getOldestRevision
+*/
+   public function testGetOldestRevision() {
+   $page = $this->newPage( "WikiPageTest_testGetOldestRevision" );
+   $page->doEditContent(
+   new WikitextContent( 'one' ),
+   "first edit",
+   EDIT_NEW
+   );
+   $rev1 = $page->getRevision();
+
+   $page = new WikiPage( $page->getTitle() );
+   $page->doEditContent(
+   new WikitextContent( 'two' ),
+   "second edit",
+   EDIT_UPDATE
+   );
+
+   $page = new WikiPage( $page->getTitle() );
+   $page->doEditContent(
+   new WikitextContent( 'three' ),
+   "third edit",
+   EDIT_UPDATE
+   );
+
+   // sanity check
+   $this->assertNotEquals(
+   $rev1->getId(),
+   $page->getRevision()->getId(),
+   '$page->getRevision()->getId()'
+   );
+
+   // actual test
+   $this->assertEquals(
+   $rev1->getId(),
+   $page->getOldestRevision()->getId(),
+   '$page->getOldestRevision()->getId()'
+   );
+   }
+
+   /**
 * @todo FIXME: this is a better rollback test than the one below, but 
it
 * keeps failing in jenkins for some reason.
 */

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ifd27710cada823318ac3662d3c16323eb9a78839
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Daniel Kinzler 
Gerrit-Reviewer: Aaron Schulz 
Gerrit-Reviewer: Jcrespo 
Gerrit-Reviewer: Kaldari 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...ContentTranslation[master]: Class instance naming consistency

2017-02-02 Thread Santhosh (Code Review)
Santhosh has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/335752 )

Change subject: Class instance naming consistency
..

Class instance naming consistency

Change-Id: Id6aefdcac299685fff36ddab4d3eaf2efdba8740
---
M modules/dm/translationunits/mw.cx.dm.TranslationUnit.js
M modules/tools/mw.cx.tools.DictionaryTool.js
M modules/tools/mw.cx.tools.InstructionsTool.js
M modules/tools/mw.cx.tools.LinkTool.js
M modules/tools/mw.cx.tools.ReferenceTool.js
M modules/tools/mw.cx.tools.SearchTool.js
M modules/tools/mw.cx.tools.TranslationTool.js
M modules/ui/translationunits/mw.cx.ui.ImageTranslationUnit.js
M modules/ui/translationunits/mw.cx.ui.LinkTranslationUnit.js
M modules/ui/translationunits/mw.cx.ui.ReferenceTranslationUnit.js
M modules/ui/translationunits/mw.cx.ui.SectionTranslationUnit.js
M modules/ui/translationunits/mw.cx.ui.SentenceTranslationUnit.js
M modules/ui/translationunits/mw.cx.ui.TemplateTranslationUnit.js
M modules/ui/translationunits/mw.cx.ui.TranslationUnit.js
14 files changed, 87 insertions(+), 88 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation 
refs/changes/52/335752/1

diff --git a/modules/dm/translationunits/mw.cx.dm.TranslationUnit.js 
b/modules/dm/translationunits/mw.cx.dm.TranslationUnit.js
index bf0138c..4619feb 100644
--- a/modules/dm/translationunits/mw.cx.dm.TranslationUnit.js
+++ b/modules/dm/translationunits/mw.cx.dm.TranslationUnit.js
@@ -119,7 +119,6 @@
}
 };
 
-
 /**
  * Get a unitque id for this translation unit
  * @return {string}
diff --git a/modules/tools/mw.cx.tools.DictionaryTool.js 
b/modules/tools/mw.cx.tools.DictionaryTool.js
index 0418586..5f2575a 100644
--- a/modules/tools/mw.cx.tools.DictionaryTool.js
+++ b/modules/tools/mw.cx.tools.DictionaryTool.js
@@ -4,16 +4,16 @@
  * @class
  * @extends mw.cx.tools.TranslationTool
  * @constructor
- * @param {mw.cx.ui.TranslationUnit} translationUnit
+ * @param {mw.cx.ui.TranslationUnit} ui
  * @param {Object} config
  */
-mw.cx.tools.DictionaryTool = function CXDictionaryTool( translationUnit, 
config ) {
+mw.cx.tools.DictionaryTool = function CXDictionaryTool( ui, config ) {
config.order = 3;
config.title = 'Dictionary';
-   this.translationUnit = translationUnit;
+   this.ui = ui;
// Parent constructor
-   mw.cx.tools.DictionaryTool.super.call( this, translationUnit, config );
-   this.translationUnitUIModel.connect( this, {
+   mw.cx.tools.DictionaryTool.super.call( this, ui, config );
+   this.ui.connect( this, {
select: 'onSelect'
} );
 };
diff --git a/modules/tools/mw.cx.tools.InstructionsTool.js 
b/modules/tools/mw.cx.tools.InstructionsTool.js
index 84aa11b..df15c58 100644
--- a/modules/tools/mw.cx.tools.InstructionsTool.js
+++ b/modules/tools/mw.cx.tools.InstructionsTool.js
@@ -37,13 +37,13 @@
  * @class
  * @extends mw.cx.tools.TranslationTool
  * @constructor
- * @param {mw.cx.ui.TranslationUnit} translationUnit
+ * @param {mw.cx.ui.TranslationUnit} ui
  * @param {Object} config
  */
-mw.cx.tools.InstructionsTool = function CXInstructionsTool( translationUnit, 
config ) {
+mw.cx.tools.InstructionsTool = function CXInstructionsTool( ui, config ) {
config.order = 2;
// Parent constructor
-   mw.cx.tools.InstructionsTool.super.call( this, translationUnit, config 
);
+   mw.cx.tools.InstructionsTool.super.call( this, ui, config );
 };
 
 /* Inheritance */
diff --git a/modules/tools/mw.cx.tools.LinkTool.js 
b/modules/tools/mw.cx.tools.LinkTool.js
index d51ffda..675c9d9 100644
--- a/modules/tools/mw.cx.tools.LinkTool.js
+++ b/modules/tools/mw.cx.tools.LinkTool.js
@@ -4,19 +4,19 @@
  * @class
  * @extends mw.cx.tools.TranslationTool
  * @constructor
- * @param {mw.cx.ui.TranslationView} translationUnit
+ * @param {mw.cx.ui.TranslationView} ui
  * @param {Object} config
  */
 
-mw.cx.tools.LinkTool = function CXLinkTool( translationUnit, config ) {
+mw.cx.tools.LinkTool = function CXLinkTool( ui, config ) {
config.order = 4;
config.title = 'Link';
config.language = config.targetLanguage;
this.sourceTitle = null;
this.targetTitle = null;
// Parent constructor
-   mw.cx.tools.LinkTool.super.call( this, translationUnit, config );
-   this.translationUnitUIModel.connect( this, {
+   mw.cx.tools.LinkTool.super.call( this, ui, config );
+   this.ui.connect( this, {
click: 'showTool',
focus: 'showTool'
} );
@@ -55,7 +55,7 @@
 
 mw.cx.tools.LinkTool.prototype.getContent = function () {
var panel, $image, $linkTitle, $linkDesc, $linkInfo;
-   this.targetTitle = this.translationUnitDataModel.getTargetTitle();
+   this.targetTitle = this.model.getTargetTitle();
$image = $( '' )
.addClass( 'cx-tools-link-image cx-tools-link-image-empty' );
 
@@ -65,7 +6

[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: T109897: Remove implicit_table_data_tag rule

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

Change subject: T109897: Remove implicit_table_data_tag rule
..


T109897: Remove implicit_table_data_tag rule

 * The test " tags should be recognized in an explicit 
   context, but not in an implicit  context" was removed because we
   consider fostered content as broken wikitext, which gives us license
   to not have to match the php parser bug for bug.

   What's happening in that test is that the php parser disables indent
   pre in table row tags , which then gets fostered by tidy.

   A previous incarnation of this patchset added some code to the
   handlePres post-processing pass to undo pre wrapping when they're
   fostered siblings (ie. the ones with the .fostered property in dp).
   We can restore that behaviour if this proves to be more common than
   expected.

 * Note the page from the task that gets fixed,
   /en.wikipedia.org/v3/page/html/Hartmut_Briesenick/636696119

   The reduced test case renders differently, but reasonably,
   
/www.mediawiki.org/v3/page/html/User%3ASSastry_(WMF)%2FTests%2FTables%2F1/1856312

Change-Id: I2ed9349995ea410ba4ad05d75b29466f3a65158f
---
M lib/wt2html/pegTokenizer.pegjs
M tests/parserTests.txt
2 files changed, 9 insertions(+), 83 deletions(-)

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



diff --git a/lib/wt2html/pegTokenizer.pegjs b/lib/wt2html/pegTokenizer.pegjs
index ca741b8..9afa9d6 100644
--- a/lib/wt2html/pegTokenizer.pegjs
+++ b/lib/wt2html/pegTokenizer.pegjs
@@ -1635,8 +1635,6 @@
 & { return stops.push('table', false); }
 a:table_attributes
 tagEndPos:("" { stops.pop('table'); return endOffset(); })
-// handle tables with missing table cells after a row
-td:implicit_table_data_tag?
 {
 var coms = tu.popComments(a);
 if (coms) {
@@ -1656,9 +1654,6 @@
 var res = [ trToken ];
 if (coms) {
   res = res.concat(coms.buf);
-}
-if (td) {
-  res = res.concat(td);
 }
 return res;
 }
@@ -1691,21 +1686,6 @@
 da.startTagSrc = p;
 }
 return td.concat(tds);
-}
-
-implicit_table_data_tag
-  = & sol // Implicit table data tag added only when content starts on a 
newline
-!( nl_comment_space* (pipe / [!+-]) )
-! "}"
-tagEndPos:("" { return endOffset(); })
-b:nested_block+
-tds:tds {
-b = tu.flattenIfArray(b);
-var nlTok = b.shift();
-var td = tu.buildTableTokens("td", "|", '', [nlTok.dataAttribs.tsr[1], 
tagEndPos], endOffset(), b);
-td[0].dataAttribs.autoInsertedStart = true;
-td[0].dataAttribs.autoInsertedEnd = true;
-return [ nlTok ].concat(td, tds);
 }
 
 table_data_tag
diff --git a/tests/parserTests.txt b/tests/parserTests.txt
index 4f40a28..ec06a3c 100644
--- a/tests/parserTests.txt
+++ b/tests/parserTests.txt
@@ -6945,12 +6945,6 @@
 foo
 !! end
 
-## Note that Parsoid output differs from PHP and PHP+tidy here.
-## The lack of  tags in the PHP output is arguably a bug in the
-## PHP parser, which tidy then compounds by fostering the content
-## entirely out of the table.  Parsoid recognizes the table context
-## and generates  and  wrappers as needed.  Hopefully nobody
-## depends on PHP's treatment of broken table markup!
 !! test
 Implicit  after a |-
 !! options
@@ -6969,56 +6963,12 @@
 !! html/php+tidy
 a
 !! html/parsoid
-
-a
-
+a
+
+
+
 !! end
 
-# Again, Parsoid adds implicit s here, PHP and Tidy strip the b out.
-!! test
- tags should be recognized in an explicit  context, but not in an 
implicit  context
-!! options
-parsoid=wt2html,html2html
-!! wikitext
-{|
-|-
-|
- a
-|-
- b
-|}
-!! html/php
-
-
-
-
-a
-
-
- b
-
-
-!! html/php+tidy
-b
-
-
-
-
-a
-
-
-
-!! html/parsoid
-
-
-a
- b
-
-
-!! end
-
-# PHP + Tidy strips the list out of the table; Parsoid wraps it.
-# Parsoid generates the missing , so wt2wt won't succeed.
 !! test
 Lists should be recognized in an implicit  context
 !! options
@@ -7039,13 +6989,10 @@
 a
 
 !! html/parsoid
-
-
-
-a
-
-
-
+a
+
+
+
 !! end
 
 !! test
@@ -7066,8 +7013,7 @@
 !! html/parsoid
 
 
-  a 
 b
-
+  a  b
 !! end
 
 !! test

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

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

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


[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Add TransactionProcessor tests for wrapping, unwrapping and ...

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

Change subject: Add TransactionProcessor tests for wrapping, unwrapping and 
rewrapping
..

Add TransactionProcessor tests for wrapping, unwrapping and rewrapping

We had transaction builder tests for these, but there were no tests asserting
that wrapping transactions (which are perhaps the weirdest case when it comes
to tree synchronization) actually process correctly.

Change-Id: Ib621308294ad3ae632f0af87ec129dee7d7aba27
---
M tests/dm/ve.dm.TransactionProcessor.test.js
1 file changed, 45 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor 
refs/changes/50/335750/1

diff --git a/tests/dm/ve.dm.TransactionProcessor.test.js 
b/tests/dm/ve.dm.TransactionProcessor.test.js
index a79ab81..01bf70e 100644
--- a/tests/dm/ve.dm.TransactionProcessor.test.js
+++ b/tests/dm/ve.dm.TransactionProcessor.test.js
@@ -331,6 +331,51 @@
data.splice( 3, 1 );
}
},
+   'wrapping elements': {
+   calls: [
+   [ 'pushRetain', 55 ],
+   [ 'pushReplace', 55, 0, [ { type: 
'list', attributes: { style: 'number' } }, { type: 'listItem' } ] ],
+   [ 'pushRetain', 3 ],
+   [ 'pushReplace', 58, 0, [ { type: 
'/listItem' }, { type: 'listItem' } ] ],
+   [ 'pushRetain', 3 ],
+   [ 'pushReplace', 61, 0, [ { type: 
'/listItem' }, { type: '/list' } ] ]
+   ],
+   expected: function ( data ) {
+   data.splice( 61, 0, { type: '/listItem' 
}, { type: '/list' } );
+   data.splice( 58, 0, { type: '/listItem' 
}, { type: 'listItem' } );
+   data.splice( 55, 0, { type: 'list', 
attributes: { style: 'number' } }, { type: 'listItem' } );
+   }
+   },
+   'unwrapping elements': {
+   calls: [
+   [ 'pushRetain', 43 ],
+   [ 'pushReplace', 43, 2, [] ],
+   [ 'pushRetain', 3 ],
+   [ 'pushReplace', 48, 2, [] ],
+   [ 'pushRetain', 3 ],
+   [ 'pushReplace', 53, 2, [] ]
+   ],
+   expected: function ( data ) {
+   data.splice( 53, 2 );
+   data.splice( 48, 2 );
+   data.splice( 43, 2 );
+   }
+   },
+   'rewrapping elements': {
+   calls: [
+   [ 'pushRetain', 43 ],
+   [ 'pushReplace', 43, 2, [ { type: 
'list', attributes: { style: 'number' } }, { type: 'listItem' } ] ],
+   [ 'pushRetain', 3 ],
+   [ 'pushReplace', 48, 2, [ { type: 
'/listItem' }, { type: 'listItem' } ] ],
+   [ 'pushRetain', 3 ],
+   [ 'pushReplace', 53, 2, [ { type: 
'/listItem' }, { type: '/list' } ] ]
+   ],
+   expected: function ( data ) {
+   data.splice( 53, 2, { type: '/listItem' 
}, { type: '/list' } );
+   data.splice( 48, 2, { type: '/listItem' 
}, { type: 'listItem' } );
+   data.splice( 43, 2, { type: 'list', 
attributes: { style: 'number' } }, { type: 'listItem' } );
+   }
+   },
'applying a link across an existing annotation 
boundary': {
data: [
{ type: 'paragraph' },

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib621308294ad3ae632f0af87ec129dee7d7aba27
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
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] apps...wikipedia[master]: Maintain per-wiki IDs for the logged-in user

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

Change subject: Maintain per-wiki IDs for the logged-in user
..

Maintain per-wiki IDs for the logged-in user

A user may edit a page for a wiki other than the app's current language
state.  We should log the appropriate ID for the wiki.  Currently we
use the id for the app language state.

This updates user ID handling to maintain a map of the languages with
which the user interacts, so that the appropriate one may be logged when
the user makes an edit.

Change-Id: Ia86803be5c861f7e2dbded43f691dbc13b0c7fbb
---
M app/src/main/java/org/wikipedia/WikipediaApp.java
M app/src/main/java/org/wikipedia/analytics/EditFunnel.java
M app/src/main/java/org/wikipedia/json/GsonUnmarshaller.java
M app/src/main/java/org/wikipedia/login/LoginClient.java
M app/src/main/java/org/wikipedia/login/User.java
M app/src/main/java/org/wikipedia/login/UserInfoStorage.java
M app/src/main/java/org/wikipedia/settings/Prefs.java
M app/src/main/res/values/preference_keys.xml
M app/src/main/res/xml/developer_preferences.xml
M app/src/test/java/org/wikipedia/login/UserTest.java
10 files changed, 92 insertions(+), 82 deletions(-)


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

diff --git a/app/src/main/java/org/wikipedia/WikipediaApp.java 
b/app/src/main/java/org/wikipedia/WikipediaApp.java
index 698801f..20bcb51 100644
--- a/app/src/main/java/org/wikipedia/WikipediaApp.java
+++ b/app/src/main/java/org/wikipedia/WikipediaApp.java
@@ -266,8 +266,9 @@
 @NonNull
 public String getAppOrSystemLanguageCode() {
 String code = appLanguageState.getAppOrSystemLanguageCode();
-if (User.isLoggedIn() && !User.getUser().getUserIDLang().equals(code)) 
{
-updateUserIdForLanguage(code);
+// noinspection ConstantConditions
+if (User.isLoggedIn() && !User.getUser().hasIdForLang(code)) {
+getIdForLanguage(code);
 }
 return code;
 }
@@ -282,17 +283,15 @@
 resetWikiSite();
 }
 
-private void updateUserIdForLanguage(@NonNull final String code) {
+private void getIdForLanguage(@NonNull final String code) {
 final WikiSite wikiSite = WikiSite.forLanguageCode(code);
 idClient.request(wikiSite, new UserIdClient.Callback() {
 @Override
-public void success(@NonNull 
Call> call,
-int userId) {
+public void success(@NonNull 
Call> call, int id) {
 User user = User.getUser();
 if (user != null) {
-user.setUserID(userId);
-user.setUserIDLang(code);
-L.v("Found user ID " + userId + " for " + code);
+user.putIdForLanguage(code, id);
+L.v("Found user ID " + id + " for " + code);
 }
 }
 
diff --git a/app/src/main/java/org/wikipedia/analytics/EditFunnel.java 
b/app/src/main/java/org/wikipedia/analytics/EditFunnel.java
index baaccb5..840c727 100644
--- a/app/src/main/java/org/wikipedia/analytics/EditFunnel.java
+++ b/app/src/main/java/org/wikipedia/analytics/EditFunnel.java
@@ -151,13 +151,9 @@
 @Override
 protected JSONObject preprocessData(@NonNull JSONObject eventData) {
 if (User.isLoggedIn()) {
-if (User.getUser().getUserID() == 0) {
-// Means we are logged in, but before we started counting 
UserID.
-// Send -1 to record these
-preprocessData(eventData, "userID", -1);
-} else {
-preprocessData(eventData, "userID", 
User.getUser().getUserID());
-}
+// noinspection ConstantConditions
+preprocessData(eventData, "userID",
+
User.getUser().getIdForLanguage(title.getWikiSite().languageCode()));
 }
 preprocessData(eventData, "pageNS", title.getNamespace());
 return super.preprocessData(eventData);
diff --git a/app/src/main/java/org/wikipedia/json/GsonUnmarshaller.java 
b/app/src/main/java/org/wikipedia/json/GsonUnmarshaller.java
index a6599f4..b11f36f 100644
--- a/app/src/main/java/org/wikipedia/json/GsonUnmarshaller.java
+++ b/app/src/main/java/org/wikipedia/json/GsonUnmarshaller.java
@@ -6,8 +6,6 @@
 import com.google.gson.Gson;
 import com.google.gson.reflect.TypeToken;
 
-import java.util.Collection;
-
 public final class GsonUnmarshaller {
 /** @return Unmarshalled object. */
 public static  T unmarshal(Class clazz, @Nullable String json) {
@@ -15,7 +13,7 @@
 }
 
 /** @return Unmarshalled collection of objects. */
-public static > T unmarshal(TypeToken 
typeToken, @Nullable String json) {
+public static  T unmarshal(TypeToken typeToken, @Nullable String 
json) {
 return unmarshal(GsonUtil.getDefaultGson(), typeToken,

[MediaWiki-commits] [Gerrit] mediawiki...Cargo[master]: Another possible improvement of quote-handling in full-text ...

2017-02-02 Thread Yaron Koren (Code Review)
Yaron Koren has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/335748 )

Change subject: Another possible improvement of quote-handling in full-text 
search
..


Another possible improvement of quote-handling in full-text search

Change-Id: Ib58c2a979fd1dbcf7472b313d727cf2b579493d5
---
M CargoQueryDisplayer.php
1 file changed, 1 insertion(+), 8 deletions(-)

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



diff --git a/CargoQueryDisplayer.php b/CargoQueryDisplayer.php
index 6a4da18..30a20f4 100644
--- a/CargoQueryDisplayer.php
+++ b/CargoQueryDisplayer.php
@@ -268,14 +268,7 @@
foreach ( $terms as $i => $term ) {
// Try to map from a MySQL search to a PHP one -
// this code could probably be improved.
-   $term = str_replace( array( '+', '*' ), '', $term );
-   // Get rid of quote marks, but only if they're at the
-   // beginning and end of the string.
-   $firstChars = substr( $term, 0, 3 );
-   $lastChars = substr( $term, -3 );
-   if ( ( $firstChars == '\b"' && $lastChars == '"\b' ) || 
( $firstChars == "\b'" && $lastChars == "'\b" ) ) {
-   $term = '\b' . substr( $term, 3, -3 ) . '\b';
-   }
+   $term = str_replace( array( '"', "'", '+', '*' ), '', 
$term );
// What is the point of this...?
if ( strpos( $term, '*' ) !== false ) {
$term = '\b' . $term . '\b';

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib58c2a979fd1dbcf7472b313d727cf2b579493d5
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Cargo
Gerrit-Branch: master
Gerrit-Owner: Yaron Koren 
Gerrit-Reviewer: Yaron Koren 
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...Cargo[master]: Another possible improvement of quote-handling in full-text ...

2017-02-02 Thread Yaron Koren (Code Review)
Yaron Koren has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/335748 )

Change subject: Another possible improvement of quote-handling in full-text 
search
..

Another possible improvement of quote-handling in full-text search

Change-Id: Ib58c2a979fd1dbcf7472b313d727cf2b579493d5
---
M CargoQueryDisplayer.php
1 file changed, 1 insertion(+), 8 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Cargo 
refs/changes/48/335748/2

diff --git a/CargoQueryDisplayer.php b/CargoQueryDisplayer.php
index 6a4da18..30a20f4 100644
--- a/CargoQueryDisplayer.php
+++ b/CargoQueryDisplayer.php
@@ -268,14 +268,7 @@
foreach ( $terms as $i => $term ) {
// Try to map from a MySQL search to a PHP one -
// this code could probably be improved.
-   $term = str_replace( array( '+', '*' ), '', $term );
-   // Get rid of quote marks, but only if they're at the
-   // beginning and end of the string.
-   $firstChars = substr( $term, 0, 3 );
-   $lastChars = substr( $term, -3 );
-   if ( ( $firstChars == '\b"' && $lastChars == '"\b' ) || 
( $firstChars == "\b'" && $lastChars == "'\b" ) ) {
-   $term = '\b' . substr( $term, 3, -3 ) . '\b';
-   }
+   $term = str_replace( array( '"', "'", '+', '*' ), '', 
$term );
// What is the point of this...?
if ( strpos( $term, '*' ) !== false ) {
$term = '\b' . $term . '\b';

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib58c2a979fd1dbcf7472b313d727cf2b579493d5
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Cargo
Gerrit-Branch: master
Gerrit-Owner: Yaron Koren 
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/dns[master]: switch webproxies away from carbon to install1002/2002

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

Change subject: switch webproxies away from carbon to install1002/2002
..

switch webproxies away from carbon to install1002/2002

Change-Id: I2e4cd072a0050d51b77cc29acd494b6e803c8ed9
---
M templates/wmnet
1 file changed, 4 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/dns 
refs/changes/47/335747/1

diff --git a/templates/wmnet b/templates/wmnet
index e5c5b5b..b885b01 100644
--- a/templates/wmnet
+++ b/templates/wmnet
@@ -24,7 +24,7 @@
 
 ; Service aliases
 syslog  1H  IN CNAMElithium.eqiad.wmnet.
-webproxy1H  IN CNAMEcarbon.wikimedia.org.
+webproxy1H  IN CNAMEinstall1002.wikimedia.org.
 carbon-relay1H  IN CNAMEgraphite1001.eqiad.wmnet.
 graphite1H  IN CNAMEgraphite1001.eqiad.wmnet.
 graphite-in 1H  IN CNAMEgraphite1001.eqiad.wmnet.
@@ -2224,7 +2224,7 @@
 ; Service aliases
 config-master   1H  IN CNAMEpuppetmaster1001.eqiad.wmnet.
 puppet  1H  IN CNAMEpuppetmaster2001.codfw.wmnet.
-webproxy1H  IN CNAMEcarbon.wikimedia.org.
+webproxy1H  IN CNAMEinstall2002.wikimedia.org.
 deployment  1H  IN CNAMEtin.eqiad.wmnet.
 statsd  1H  IN CNAMEgraphite2001.codfw.wmnet.
 syslog  1H  IN CNAMEwezen.codfw.wmnet.
@@ -4076,7 +4076,7 @@
 ;
 config-master   1H  IN CNAMEpuppetmaster1001.eqiad.wmnet.
 puppet  1H  IN CNAMEpuppetmaster1001.eqiad.wmnet.
-webproxy1H  IN CNAMEcarbon.wikimedia.org.
+webproxy1H  IN CNAMEinstall1002.wikimedia.org.
 
 ; etcd client discovery
 _etcd._tcp  5M  IN SRV  0 1 2379 conf1001.eqiad.wmnet.
@@ -4268,7 +4268,7 @@
 ;
 config-master   1H  IN CNAMEpuppetmaster1001.eqiad.wmnet.
 puppet  5M  IN CNAMEpuppetmaster2001.codfw.wmnet.
-webproxy1H  IN CNAMEcarbon.wikimedia.org.
+webproxy1H  IN CNAMEinstall2002.wikimedia.org.
 
 ; etcd client discovery
 _etcd._tcp  5M  IN SRV  0 1 2379 conf1001.eqiad.wmnet.

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2e4cd072a0050d51b77cc29acd494b6e803c8ed9
Gerrit-PatchSet: 1
Gerrit-Project: operations/dns
Gerrit-Branch: master
Gerrit-Owner: Dzahn 

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


[MediaWiki-commits] [Gerrit] mediawiki...GooglePlaces[master]: Add handling for arrays, such as weekday_text

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

Change subject: Add handling for arrays, such as weekday_text
..


Add handling for arrays, such as weekday_text

Change-Id: I8ef8b052b77d11933bf95d2434d793f767d1623e
---
M GooglePlaces.hooks.php
M extension.json
2 files changed, 27 insertions(+), 5 deletions(-)

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



diff --git a/GooglePlaces.hooks.php b/GooglePlaces.hooks.php
index cdbc4a0..59f1f0a 100644
--- a/GooglePlaces.hooks.php
+++ b/GooglePlaces.hooks.php
@@ -1,4 +1,5 @@
  $value ) {
+   foreach ( $result as $value ) {
if ( is_array( $value ) ) {
$element = 
self::getArrayElementFromType( $value, $type, $field );
if ( $element !== '' ) {
@@ -210,7 +218,7 @@
 * If $element is unset, return the first value of that sibling array.
 *
 * @param array $array
-* @param array $type
+* @param array $types
 * @param string $element
 */
private static function getElementWithMatchingType( array $array, 
$types, $element = '' ) {
@@ -220,7 +228,6 @@
return $return;
} else {
return $array[$element];
-
}
} else {
return '';
@@ -255,4 +262,19 @@
$wgFooterIcons['poweredby']['googleplaces'] = 
self::getFooterIcon();
}
}
+
+   /**
+* Implodes an array into a string, but also escapes instances of $glue 
into its HTML
+* ampersand representation.
+*
+* @param string $glue
+* @param array $pieces
+* @return string
+*/
+   private static function htmlEscapeImplode( $glue, array $pieces ) {
+   foreach ( $pieces as &$piece ) {
+   $piece = str_replace( $glue, '&#' . ord( $glue ) . ';', 
$piece );
+   }
+   return implode( $glue, $pieces );
+   }
 }
diff --git a/extension.json b/extension.json
index acff003..d0eb0da 100644
--- a/extension.json
+++ b/extension.json
@@ -3,7 +3,7 @@
"author": "Ike Hecht",
"url": "https://www.mediawiki.org/wiki/Extension:GooglePlaces";,
"descriptionmsg": "googleplaces-desc",
-   "version": "1.0",
+   "version": "1.1",
"type": "parserhook",
"AutoloadClasses": {
"GooglePlacesHooks": "GooglePlaces.hooks.php",

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8ef8b052b77d11933bf95d2434d793f767d1623e
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/GooglePlaces
Gerrit-Branch: master
Gerrit-Owner: tosfos 
Gerrit-Reviewer: Aklapper 
Gerrit-Reviewer: jenkins-bot <>
Gerrit-Reviewer: tosfos 

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


[MediaWiki-commits] [Gerrit] wikimedia...rainbow[master]: Point to new datasets

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

Change subject: Point to new datasets
..

Point to new datasets

Change-Id: Id384962d485931ebcb904e491ae0bf641d38c9bf
---
M CHANGELOG.md
M server.R
M utils.R
3 files changed, 272 insertions(+), 249 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/discovery/rainbow 
refs/changes/46/335746/1

diff --git a/CHANGELOG.md b/CHANGELOG.md
index efb55e8..f01c6ea 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,6 +1,17 @@
 # Change Log (Patch Notes)
+
 All notable changes to this project will be documented in this file.
 
+## 2017/02/02
+- Updated to work with new datasets generated by Reportupdater-based golden 
([T150915](https://phabricator.wikimedia.org/T150915))
+
+## 2016
+- Added PaulScore ([T144424](https://phabricator.wikimedia.org/T144424))
+- Added ZRR broken up by language-project pairs 
([T126244](https://phabricator.wikimedia.org/T126244))
+- Added Invoke Source and Click Positions for Android 
([T143726](https://phabricator.wikimedia.org/T143726))
+- Added visited result survival 
([T113297](https://phabricator.wikimedia.org/T113297))
+- Added dwell-time & user engagement metrics 
([T113297](https://phabricator.wikimedia.org/T113297), 
[T113513](https://phabricator.wikimedia.org/T113513), [Change 
240593](https://gerrit.wikimedia.org/r/#/c/240593/))
+
 ## 2015/11/10
 - Updated the readme
 - Moved certain code blocks to **polloi** for use in other dashboards
diff --git a/server.R b/server.R
index 62678bd..343dd5f 100644
--- a/server.R
+++ b/server.R
@@ -1,9 +1,9 @@
-library(shiny)
-library(shinydashboard)
-library(dygraphs)
-library(sparkline)
-library(DT)
-library(data.table)
+suppressPackageStartupMessages({
+  library(shiny)
+  library(shinydashboard)
+  library(dygraphs)
+  library(sparkline)
+})
 
 source("utils.R")
 
@@ -162,7 +162,7 @@
   ## App value boxes
   output$app_event_searches <- renderValueBox(
 valueBox(
-  value = android_dygraph_means[3],
+  value = ios_dygraph_means["search sessions"] + 
android_dygraph_means["search sessions"],
   subtitle = "Search sessions per day",
   icon = icon("search"),
   color = "green"
@@ -171,7 +171,7 @@
 
   output$app_event_resultsets <- renderValueBox(
 valueBox(
-  value = android_dygraph_means[2],
+  value = ios_dygraph_means["Result pages opened"] + 
android_dygraph_means["Result pages opened"],
   subtitle = "Result sets per day",
   icon = icon("list", lib = "glyphicon"),
   color = "green"
@@ -180,7 +180,7 @@
 
   output$app_event_clickthroughs <- renderValueBox(
 valueBox(
-  value = android_dygraph_means[1],
+  value = ios_dygraph_means["clickthroughs"] + 
android_dygraph_means["clickthroughs"],
   subtitle = "Clickthroughs per day",
   icon = icon("hand-up", lib = "glyphicon"),
   color = "green"
@@ -240,36 +240,35 @@
 
   ## API plots
   output$cirrus_aggregate <- renderDygraph({
-split_dataset$cirrus[, c(1, 3)] %>%
+split_dataset$cirrus %>%
   polloi::smoother(smooth_level = 
polloi::smooth_switch(input$smoothing_global, input$smoothing_fulltext_search)) 
%>%
-
   polloi::make_dygraph(xlab = "Date", ylab = "Searches", title = 
"Full-text via API usage by day", legend_name = "Searches") %>%
   dyRangeSelector
   })
 
   output$open_aggregate <- renderDygraph({
-split_dataset$open[, c(1, 3)] %>%
+split_dataset$open %>%
   polloi::smoother(smooth_level = 
polloi::smooth_switch(input$smoothing_global, input$smoothing_open_search)) %>%
   polloi::make_dygraph(xlab = "Date", ylab = "Searches", title = 
"OpenSearch API usage by day", legend_name = "Searches") %>%
   dyRangeSelector
   })
 
   output$geo_aggregate <- renderDygraph({
-split_dataset$geo[, c(1, 3)] %>%
+split_dataset$geo %>%
   polloi::smoother(smooth_level = 
polloi::smooth_switch(input$smoothing_global, input$smoothing_geo_search)) %>%
   polloi::make_dygraph(xlab = "Date", ylab = "Searches", title = "Geo 
Search API usage by day", legend_name = "Searches") %>%
   dyRangeSelector
   })
 
   output$language_aggregate <- renderDygraph({
-split_dataset$language[, c(1, 3)] %>%
+split_dataset$language %>%
   polloi::smoother(smooth_level = 
polloi::smooth_switch(input$smoothing_global, input$smoothing_language_search)) 
%>%
   polloi::make_dygraph(xlab = "Date", ylab = "Searches", title = "Language 
Search API usage by day", legend_name = "Searches") %>%
   dyRangeSelector
   })
 
   output$prefix_aggregate <- renderDygraph({
-split_dataset$prefix[, c(1, 3)] %>%
+split_dataset$prefix %>%
   polloi::smoother(smooth_level = 
polloi::smooth_switch(input$smoothing_global, input$smoothing_prefix_search)) 
%>%
   polloi::make_dygraph(xlab = "Date", ylab = "Searches", title = "Prefix 
Search API usage by day", legend_name = "Searches") %>%
   dyRa

[MediaWiki-commits] [Gerrit] mediawiki...mobileapps[master]: Fix news links

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

Change subject: Fix news links
..

Fix news links

anchor.href is the resolved URI of the href. It could change
depending on the value of html/head/base element. Parsoid emits it
like this: . So 
results to '/wiki/foo'.

We probably want to use anchor.getAttribute('href') instead to have
something more predictable.

Moved removeFragment() and extracted removeLinkPrefix() to mobile-util.
I also created a convenience function for this since this is a pattern
that might be useful in other places.

This patch changes two occurrences in the news endpoint: one for
topicTitle and another for storyTitle.
I also checked for other uses of .href in the code. The only one not
changed in this patch is in mobile-text. That one seems to be actually
used correctly.

Updated news test to try to catch this if we were to run into the
same issue. There was also an issue with the if check that prevented
the asserts inside the if block to be executed.

Bug: T157040
Change-Id: I8eb2f7d8763c00d0bb1e864fc0d308315a742570
---
M lib/feed/news.js
M lib/mobile-util.js
M test/features/news/news.js
M test/lib/mobile-util/mobile-util-test.js
4 files changed, 51 insertions(+), 31 deletions(-)


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

diff --git a/lib/feed/news.js b/lib/feed/news.js
index 120c3ef..eea1715 100644
--- a/lib/feed/news.js
+++ b/lib/feed/news.js
@@ -8,28 +8,19 @@
 const HTTPError = require('../util').HTTPError;
 const NEWS_TEMPLATES = require('../../etc/feed/news-sites');
 
-function removeFragment(href) {
-if (href.indexOf('#') > -1) {
-return href.substring(0, href.indexOf('#'));
-}
-return href;
-}
-
 function constructStory(restbaseTpl, domain, lang, storyHtml) {
 const story = { links: [] };
 const linkTitles = [];
 
 const topicAnchor = 
storyHtml.querySelector(NEWS_TEMPLATES[lang].topicAnchorSelector);
-const topicTitle = topicAnchor && 
removeFragment(topicAnchor.href.slice(1));
+const topicTitle = mUtil.extractDbTitleFromAnchor(topicAnchor);
 storyHtml.querySelectorAll('a[rel="mw:WikiLink"]').forEach((anchor) => {
-const href = anchor.href;
-const title = removeFragment(href.slice(1));
-
-if (linkTitles.indexOf(title) === -1) {
-story.links.splice(title === topicTitle ? 0 : story.links.length, 
0, {
-$merge: [ mUtil.getRbPageSummaryUrl(restbaseTpl, domain, 
title) ]
+const storyTitle = mUtil.extractDbTitleFromAnchor(anchor);
+if (linkTitles.indexOf(storyTitle) === -1) {
+story.links.splice(storyTitle === topicTitle ? 0 : 
story.links.length, 0, {
+$merge: [ mUtil.getRbPageSummaryUrl(restbaseTpl, domain, 
storyTitle) ]
 });
-linkTitles.push(title);
+linkTitles.push(storyTitle);
 }
 });
 
@@ -76,6 +67,5 @@
 promise,
 
 // visible for testing
-removeFragment,
 constructStory
 };
diff --git a/lib/mobile-util.js b/lib/mobile-util.js
index 5b79ec0..f7249e5 100644
--- a/lib/mobile-util.js
+++ b/lib/mobile-util.js
@@ -112,6 +112,21 @@
 return (domain === 'en.wikipedia.org' || domain === 
'en.wikipedia.beta.wmflabs.org');
 };
 
+mUtil.removeFragment = function(href) {
+if (href.indexOf('#') > -1) {
+return href.substring(0, href.indexOf('#'));
+}
+return href;
+};
+
+mUtil.removeLinkPrefix = function(href) {
+return href.replace(/^\.\//, '');
+};
+
+mUtil.extractDbTitleFromAnchor = function(anchor) {
+return anchor && 
mUtil.removeFragment(mUtil.removeLinkPrefix(anchor.getAttribute('href')));
+};
+
 // Merge two arrays of objects by the specified property.
 // Stolen from https://jsfiddle.net/guya/eAWKR/.
 mUtil.mergeByProp = function(arr1, arr2, prop, pushIfKeyNotFound) {
diff --git a/test/features/news/news.js b/test/features/news/news.js
index 85f0014..36f9997 100644
--- a/test/features/news/news.js
+++ b/test/features/news/news.js
@@ -62,15 +62,15 @@
 assert.deepEqual(res.status, 200);
 assert.ok(res.body.length);
 res.body.forEach((elem) => {
-if ({}.hasOwnProperty.call(res.body, elem)) {
-assert.ok(elem.story, 'story should be 
present');
-assert.ok(elem.links, 'links should be 
present');
-elem.links.forEach((link) => {
-assert.ok(link.$merge, '$merge should be 
present');
-assert.ok(link.missing === undefined,
-'no missing links should be present');
-});
-}
+assert.ok(elem.story, 'story 

[MediaWiki-commits] [Gerrit] mediawiki...RegexBlock[master]: Quick SQLite port of the DB schema

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

Change subject: Quick SQLite port of the DB schema
..


Quick SQLite port of the DB schema

Change-Id: I8f3b71218b4774b0b3729c5acbab36970d80ba8d
---
M regexblock_schema.sql
1 file changed, 11 insertions(+), 9 deletions(-)

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



diff --git a/regexblock_schema.sql b/regexblock_schema.sql
index 1ee5a34..c088e71 100644
--- a/regexblock_schema.sql
+++ b/regexblock_schema.sql
@@ -1,26 +1,28 @@
 CREATE TABLE /*_*/blockedby (
-   blckby_id int(5) NOT NULL AUTO_INCREMENT PRIMARY KEY,
+   blckby_id int(5) NOT NULL PRIMARY KEY AUTO_INCREMENT,
blckby_name varchar(255) NOT NULL,
blckby_blocker varchar(255) NOT NULL,
blckby_timestamp char(14) NOT NULL,
blckby_expire char(14) NOT NULL,
blckby_create tinyint(1) NOT NULL default '1',
blckby_exact tinyint(1) NOT NULL default 0,
-   blckby_reason tinyblob NOT NULL,
-   UNIQUE KEY blckby_name (blckby_name),
-   KEY blckby_timestamp (blckby_timestamp),
-   KEY blckby_expire (blckby_expire)
+   blckby_reason tinyblob NOT NULL
 )/*$wgDBTableOptions*/;
 
+CREATE UNIQUE INDEX /*i*/blckby_name ON /*_*/blockedby (blckby_name);
+CREATE INDEX /*i*/blckby_timestamp ON /*_*/blockedby (blckby_timestamp);
+CREATE INDEX /*i*/blckby_expire ON /*_*/blockedby (blckby_expire);
+
 CREATE TABLE /*_*/stats_blockedby (
-   stats_id int(8) NOT NULL AUTO_INCREMENT PRIMARY KEY,
+   stats_id int(8) NOT NULL PRIMARY KEY AUTO_INCREMENT,
stats_blckby_id int(8) NOT NULL,
stats_user varchar(255) NOT NULL,
stats_blocker varchar(255) NOT NULL,
stats_timestamp char(14) NOT NULL,
stats_ip char(15) NOT NULL,
stats_match varchar(255) NOT NULL default '',
-   stats_dbname varchar(255) NOT NULL default '',
-   KEY stats_blckby_id_key (stats_blckby_id),
-   KEY stats_timestamp (stats_timestamp)
+   stats_dbname varchar(255) NOT NULL default ''
 )/*$wgDBTableOptions*/;
+
+CREATE INDEX /*i*/stats_blckby_id_key ON /*_*/stats_blockedby 
(stats_blckby_id);
+CREATE INDEX /*i*/stats_timestamp ON /*_*/stats_blockedby (stats_timestamp);
\ No newline at end of file

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8f3b71218b4774b0b3729c5acbab36970d80ba8d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/RegexBlock
Gerrit-Branch: master
Gerrit-Owner: Jack Phoenix 
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...RegexBlock[master]: Quick SQLite port of the DB schema

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

Change subject: Quick SQLite port of the DB schema
..

Quick SQLite port of the DB schema

Change-Id: I8f3b71218b4774b0b3729c5acbab36970d80ba8d
---
M regexblock_schema.sql
1 file changed, 11 insertions(+), 9 deletions(-)


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

diff --git a/regexblock_schema.sql b/regexblock_schema.sql
index 1ee5a34..c088e71 100644
--- a/regexblock_schema.sql
+++ b/regexblock_schema.sql
@@ -1,26 +1,28 @@
 CREATE TABLE /*_*/blockedby (
-   blckby_id int(5) NOT NULL AUTO_INCREMENT PRIMARY KEY,
+   blckby_id int(5) NOT NULL PRIMARY KEY AUTO_INCREMENT,
blckby_name varchar(255) NOT NULL,
blckby_blocker varchar(255) NOT NULL,
blckby_timestamp char(14) NOT NULL,
blckby_expire char(14) NOT NULL,
blckby_create tinyint(1) NOT NULL default '1',
blckby_exact tinyint(1) NOT NULL default 0,
-   blckby_reason tinyblob NOT NULL,
-   UNIQUE KEY blckby_name (blckby_name),
-   KEY blckby_timestamp (blckby_timestamp),
-   KEY blckby_expire (blckby_expire)
+   blckby_reason tinyblob NOT NULL
 )/*$wgDBTableOptions*/;
 
+CREATE UNIQUE INDEX /*i*/blckby_name ON /*_*/blockedby (blckby_name);
+CREATE INDEX /*i*/blckby_timestamp ON /*_*/blockedby (blckby_timestamp);
+CREATE INDEX /*i*/blckby_expire ON /*_*/blockedby (blckby_expire);
+
 CREATE TABLE /*_*/stats_blockedby (
-   stats_id int(8) NOT NULL AUTO_INCREMENT PRIMARY KEY,
+   stats_id int(8) NOT NULL PRIMARY KEY AUTO_INCREMENT,
stats_blckby_id int(8) NOT NULL,
stats_user varchar(255) NOT NULL,
stats_blocker varchar(255) NOT NULL,
stats_timestamp char(14) NOT NULL,
stats_ip char(15) NOT NULL,
stats_match varchar(255) NOT NULL default '',
-   stats_dbname varchar(255) NOT NULL default '',
-   KEY stats_blckby_id_key (stats_blckby_id),
-   KEY stats_timestamp (stats_timestamp)
+   stats_dbname varchar(255) NOT NULL default ''
 )/*$wgDBTableOptions*/;
+
+CREATE INDEX /*i*/stats_blckby_id_key ON /*_*/stats_blockedby 
(stats_blckby_id);
+CREATE INDEX /*i*/stats_timestamp ON /*_*/stats_blockedby (stats_timestamp);
\ No newline at end of file

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...VoteNY[master]: SQLite support

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

Change subject: SQLite support
..


SQLite support

Change-Id: I5c4f7d3a2b28dd4963a4157165bc28cc5ccf70db
---
M VoteHooks.php
M vote.mysql
2 files changed, 7 insertions(+), 1 deletion(-)

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



diff --git a/VoteHooks.php b/VoteHooks.php
index e423c84..b27e675 100644
--- a/VoteHooks.php
+++ b/VoteHooks.php
@@ -212,6 +212,12 @@
 */
public static function addTable( $updater ) {
$dbt = $updater->getDB()->getType();
+   // If using SQLite, just use the MySQL/MariaDB schema, it's 
compatible
+   // anyway. Only PGSQL and some more exotic variants need a 
totally
+   // different schema.
+   if ( $dbt === 'sqlite' ) {
+   $dbt = 'mysql';
+   }
$file = __DIR__ . "/vote.$dbt";
if ( file_exists( $file ) ) {
$updater->addExtensionUpdate( array( 'addTable', 
'Vote', $file, true ) );
diff --git a/vote.mysql b/vote.mysql
index de0dea1..e0a303e 100644
--- a/vote.mysql
+++ b/vote.mysql
@@ -1,6 +1,6 @@
 CREATE TABLE /*_*/Vote (
   -- Internal ID to identify between different vote tags on different pages
-  `vote_id` int(11) NOT NULL auto_increment PRIMARY KEY,
+  `vote_id` int(11) NOT NULL PRIMARY KEY auto_increment,
   -- Username (if any) of the person who voted
   `username` varchar(255) NOT NULL default '0',
   -- User ID of the person who voted

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5c4f7d3a2b28dd4963a4157165bc28cc5ccf70db
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VoteNY
Gerrit-Branch: master
Gerrit-Owner: Jack Phoenix 
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...VoteNY[master]: SQLite support

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

Change subject: SQLite support
..

SQLite support

Change-Id: I5c4f7d3a2b28dd4963a4157165bc28cc5ccf70db
---
M VoteHooks.php
M vote.mysql
2 files changed, 7 insertions(+), 1 deletion(-)


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

diff --git a/VoteHooks.php b/VoteHooks.php
index e423c84..b27e675 100644
--- a/VoteHooks.php
+++ b/VoteHooks.php
@@ -212,6 +212,12 @@
 */
public static function addTable( $updater ) {
$dbt = $updater->getDB()->getType();
+   // If using SQLite, just use the MySQL/MariaDB schema, it's 
compatible
+   // anyway. Only PGSQL and some more exotic variants need a 
totally
+   // different schema.
+   if ( $dbt === 'sqlite' ) {
+   $dbt = 'mysql';
+   }
$file = __DIR__ . "/vote.$dbt";
if ( file_exists( $file ) ) {
$updater->addExtensionUpdate( array( 'addTable', 
'Vote', $file, true ) );
diff --git a/vote.mysql b/vote.mysql
index de0dea1..e0a303e 100644
--- a/vote.mysql
+++ b/vote.mysql
@@ -1,6 +1,6 @@
 CREATE TABLE /*_*/Vote (
   -- Internal ID to identify between different vote tags on different pages
-  `vote_id` int(11) NOT NULL auto_increment PRIMARY KEY,
+  `vote_id` int(11) NOT NULL PRIMARY KEY auto_increment,
   -- Username (if any) of the person who voted
   `username` varchar(255) NOT NULL default '0',
   -- User ID of the person who voted

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

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

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


[MediaWiki-commits] [Gerrit] wikimedia...SmashPig[master]: WIP normalize recurring messages at the listener

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

Change subject: WIP normalize recurring messages at the listener
..

WIP normalize recurring messages at the listener

This will require a slight tweak to the consumer in CRM, to detect
already-normalized recurring payments.

Each message type will handle its own normalization, as with some
other classes.

Also gets the silly KeyedOpaque thing out of Paypal since we can
write directly to the Redis queues now.

Bug: T107372
Change-Id: Ic982667bab0e216677557139c43592a921d948d4
---
M PaymentProviders/PayPal/Job.php
M PaymentProviders/PayPal/Message.php
A PaymentProviders/PayPal/PaymentMessage.php
A PaymentProviders/PayPal/RecurringMessage.php
A PaymentProviders/PayPal/RefundMessage.php
A PaymentProviders/PayPal/SubscriptionMessage.php
M SmashPig.yaml
7 files changed, 124 insertions(+), 72 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/SmashPig 
refs/changes/42/335742/1

diff --git a/PaymentProviders/PayPal/Job.php b/PaymentProviders/PayPal/Job.php
index 2871afb..b76727f 100644
--- a/PaymentProviders/PayPal/Job.php
+++ b/PaymentProviders/PayPal/Job.php
@@ -51,77 +51,34 @@
throw new Exception( 'Invalid PayPal message: ' . 
json_encode( $request ) );
}
 
-   $msg_type = null;
+   $msgClass = null;
+   $queue = '';
foreach ( $this->config->val( 'messages' ) as $type => $conf ) {
if ( in_array( $txn_type, $conf['txn_types'] ) ) {
-   $msg_type = $type;
+   $msgClass = $conf['class'];
+   $queue = $conf['queue'];
}
}
 
-   if ( ! $msg_type ) {
+   if ( !$msgClass ) {
throw new Exception( 'Invalid PayPal message type: ' . 
$txn_type );
}
 
// Transform into new message.
 
-   // FIXME this could just be an array, but we need compat with
-   // keyedopaque* until activemq goes away
-   $new_msg = new Message;
-   // FIXME hacks because the recurring consumer doesn't want
-   // a normalized message
-   if ( $msg_type === 'recurring' ) {
-   foreach ( $request as $key => $val ) {
-   $new_msg->$key = $val;
-   }
-   } else {
-   $map = $this->config->val( 'var_map' );
-   foreach ( $map as $rx => $tx ) {
-   if ( array_key_exists( $rx, $request ) ) {
-   $new_msg->$tx = $request[$rx];
-   }
-   }
-
-   // FIXME: var map can't put one thing in two places
-   if ( isset( $new_msg->contribution_tracking_id ) ) {
-   $new_msg->order_id = 
$new_msg->contribution_tracking_id;
-   }
-
-   // FIXME represent special case as var_map config 
override?
-   if ( $msg_type === 'refund' ) {
-   $new_msg->gateway_refund_id = 
$request['txn_id'];
-   $new_msg->gross_currency = 
$request['mc_currency'];
-   if ( isset( $new_msg->type ) &&
-   $new_msg->type === 
'chargeback_settlement' ) {
-   $new_msg->type = 'chargeback';
-   } else {
-   $new_msg->type = $msg_type;
-   }
-   }
-
-   // If someone's PayPal account is set to their name we 
don't want
-   // it to go in the address box. They should put in a 
business name
-   // or something.
-   if ( isset( $new_msg->supplemental_address_1 )
-   && $new_msg->supplemental_address_1 ===
-   "{$new_msg->first_name} {$new_msg->last_name}" 
) {
-   unset( $new_msg->supplemental_address_1 );
-   }
-
-   // FIXME once recurring uses normalized msg it needs 
this too
-   $new_msg->date = strtotime( $new_msg->date );
-   }
+   $creator = array( $msgClass, 'fromIpnMessage' );
+   $normalized = call_user_func( $creator, $request );
 
if ( $txn_type == 'express_checkout' ) {
-   $new_msg->gateway = 'paypal_ec';
+   $normalized['gateway'] = 'paypal_ec';
} else {
- 

[MediaWiki-commits] [Gerrit] wikimedia...SmashPig[master]: Add source fields to arrays, not just objects

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

Change subject: Add source fields to arrays, not just objects
..

Add source fields to arrays, not just objects

Change-Id: Ie55006deb446df96fa50e5e487b2e9559155d3c0
---
M CrmLink/Messages/SourceFields.php
1 file changed, 16 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/SmashPig 
refs/changes/41/335741/1

diff --git a/CrmLink/Messages/SourceFields.php 
b/CrmLink/Messages/SourceFields.php
index d8ba7c0..b360cbf 100644
--- a/CrmLink/Messages/SourceFields.php
+++ b/CrmLink/Messages/SourceFields.php
@@ -4,12 +4,21 @@
 use SmashPig\Core\Context;
 
 class SourceFields {
-   public static function addToMessage( $message ) {
-   $message->source_name  = 'SmashPig';
-   $message->source_type = 'listener';
-   $message->source_host = gethostname();
-   $message->source_run_id = getmypid();
-   $message->source_version = Context::get()->getSourceRevision();
-   $message->source_enqueued_time = time();
+   public static function addToMessage( &$message ) {
+   if ( is_array( $message ) ) {
+   $message['source_name'] = 'SmashPig';
+   $message['source_type'] = 'listener';
+   $message['source_host'] = gethostname();
+   $message['source_run_id'] = getmypid();
+   $message['source_version'] = 
Context::get()->getSourceRevision();
+   $message['source_enqueued_time'] = time();
+   } else {
+   $message->source_name = 'SmashPig';
+   $message->source_type = 'listener';
+   $message->source_host = gethostname();
+   $message->source_run_id = getmypid();
+   $message->source_version = 
Context::get()->getSourceRevision();
+   $message->source_enqueued_time = time();
+   }
}
 }

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...FanBoxes[master]: FU SQLite

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

Change subject: FU SQLite
..


FU SQLite

Change-Id: I40f0acc740a0e51c5d628f5ef481065cbe780ade
---
M fantag.sql
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/fantag.sql b/fantag.sql
index 67952ae..06ad51b 100644
--- a/fantag.sql
+++ b/fantag.sql
@@ -1,5 +1,5 @@
 CREATE TABLE /*_*/fantag (
-  fantag_id int(11) NOT NULL auto_increment PRIMARY KEY,
+  fantag_id int(11) NOT NULL PRIMARY KEY auto_increment,
   fantag_title varchar(100) NOT NULL,
   fantag_pg_id int(11) NOT NULL,
   fantag_left_text varchar(20) default NULL,
@@ -21,7 +21,7 @@
 CREATE INDEX /*i*/fantag_pg_id ON /*_*/fantag (fantag_pg_id);
 
 CREATE TABLE /*_*/user_fantag (
-  userft_id int(11) NOT NULL auto_increment PRIMARY KEY,
+  userft_id int(11) NOT NULL PRIMARY KEY auto_increment,
   userft_fantag_id int(11) NOT NULL,
   userft_user_id int(11) NOT NULL,
   userft_user_name varchar(255) NOT NULL,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I40f0acc740a0e51c5d628f5ef481065cbe780ade
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/FanBoxes
Gerrit-Branch: master
Gerrit-Owner: Jack Phoenix 
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...PollNY[master]: FU SQLite

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

Change subject: FU SQLite
..


FU SQLite

Change-Id: I9c302a75f4851463821ac4083b7d22d793114db7
---
M poll.sql
1 file changed, 3 insertions(+), 3 deletions(-)

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



diff --git a/poll.sql b/poll.sql
index f98de78..5a3cf14 100644
--- a/poll.sql
+++ b/poll.sql
@@ -1,6 +1,6 @@
 -- Three tables for PollNY extension
 CREATE TABLE /*_*/poll_choice (
-  `pc_id` int(11) NOT NULL auto_increment PRIMARY KEY,
+  `pc_id` int(11) NOT NULL PRIMARY KEY auto_increment,
   `pc_poll_id` int(11) NOT NULL default '0',
   `pc_order` int(5) default '0',
   `pc_text` text NOT NULL,
@@ -10,7 +10,7 @@
 CREATE INDEX /*i*/pc_poll_id ON /*_*/poll_choice (pc_poll_id);
 
 CREATE TABLE /*_*/poll_question (
-  `poll_id` int(11) NOT NULL auto_increment PRIMARY KEY,
+  `poll_id` int(11) NOT NULL PRIMARY KEY auto_increment,
   `poll_page_id` int(11) NOT NULL default '0',
   `poll_user_id` int(11) NOT NULL default '0',
   `poll_user_name` varchar(255) NOT NULL default '',
@@ -29,7 +29,7 @@
 CREATE INDEX /*i*/poll_random ON /*_*/poll_question (poll_random);
 
 CREATE TABLE /*_*/poll_user_vote (
-  `pv_id` int(11) NOT NULL auto_increment PRIMARY KEY,
+  `pv_id` int(11) NOT NULL PRIMARY KEY auto_increment,
   `pv_poll_id` int(11) NOT NULL default '0',
   `pv_pc_id` int(5) default '0',
   `pv_user_id` int(11) NOT NULL default '0',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9c302a75f4851463821ac4083b7d22d793114db7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/PollNY
Gerrit-Branch: master
Gerrit-Owner: Jack Phoenix 
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...FanBoxes[master]: FU SQLite

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

Change subject: FU SQLite
..

FU SQLite

Change-Id: I40f0acc740a0e51c5d628f5ef481065cbe780ade
---
M fantag.sql
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/FanBoxes 
refs/changes/40/335740/1

diff --git a/fantag.sql b/fantag.sql
index 67952ae..06ad51b 100644
--- a/fantag.sql
+++ b/fantag.sql
@@ -1,5 +1,5 @@
 CREATE TABLE /*_*/fantag (
-  fantag_id int(11) NOT NULL auto_increment PRIMARY KEY,
+  fantag_id int(11) NOT NULL PRIMARY KEY auto_increment,
   fantag_title varchar(100) NOT NULL,
   fantag_pg_id int(11) NOT NULL,
   fantag_left_text varchar(20) default NULL,
@@ -21,7 +21,7 @@
 CREATE INDEX /*i*/fantag_pg_id ON /*_*/fantag (fantag_pg_id);
 
 CREATE TABLE /*_*/user_fantag (
-  userft_id int(11) NOT NULL auto_increment PRIMARY KEY,
+  userft_id int(11) NOT NULL PRIMARY KEY auto_increment,
   userft_fantag_id int(11) NOT NULL,
   userft_user_id int(11) NOT NULL,
   userft_user_name varchar(255) NOT NULL,

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...QuizGame[master]: FU SQLite

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

Change subject: FU SQLite
..


FU SQLite

Change-Id: I33ef40e540a0c88944b9cf45e3d9874d951573c5
---
M quizgame.sql
1 file changed, 4 insertions(+), 4 deletions(-)

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



diff --git a/quizgame.sql b/quizgame.sql
index 393991b..cb0d308 100644
--- a/quizgame.sql
+++ b/quizgame.sql
@@ -1,6 +1,6 @@
 -- Tables for QuizGame extension
 CREATE TABLE /*_*/quizgame_questions (
-  `q_id` int(11) unsigned NOT NULL auto_increment PRIMARY KEY,
+  `q_id` int(11) unsigned NOT NULL PRIMARY KEY auto_increment,
   `q_user_id` int(11) unsigned NOT NULL default '0',
   `q_user_name` varchar(255) NOT NULL default '',
   -- One of the QuizGameHome::$FLAG_* static variables
@@ -23,7 +23,7 @@
 CREATE INDEX /*i*/q_random ON /*_*/quizgame_questions (q_random);
 
 CREATE TABLE /*_*/quizgame_answers (
-  `a_id` int(10) unsigned NOT NULL auto_increment PRIMARY KEY,
+  `a_id` int(10) unsigned NOT NULL PRIMARY KEY auto_increment,
   `a_q_id` int(10) unsigned NOT NULL default '0',
   `a_choice_id` int(11) unsigned NOT NULL default '0',
   `a_user_id` int(11) unsigned NOT NULL default '0',
@@ -38,7 +38,7 @@
 CREATE INDEX /*i*/a_user_name ON /*_*/quizgame_answers (a_user_name);
 
 CREATE TABLE /*_*/quizgame_choice (
-  `choice_id` int(11) NOT NULL auto_increment PRIMARY KEY,
+  `choice_id` int(11) NOT NULL PRIMARY KEY auto_increment,
   `choice_q_id` int(11) NOT NULL default '0',
   `choice_order` int(5) default '0',
   `choice_text` text NOT NULL,
@@ -49,7 +49,7 @@
 CREATE INDEX /*i*/choice_q_id ON /*_*/quizgame_choice (choice_q_id);
 
 CREATE TABLE /*_*/quizgame_user_view (
-  `uv_id` int(11) unsigned NOT NULL auto_increment PRIMARY KEY,
+  `uv_id` int(11) unsigned NOT NULL PRIMARY KEY auto_increment,
   `uv_q_id` int(11) unsigned NOT NULL default '0',
   `uv_user_id` int(11) unsigned NOT NULL default '0',
   `uv_user_name` varchar(255) NOT NULL default '',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I33ef40e540a0c88944b9cf45e3d9874d951573c5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/QuizGame
Gerrit-Branch: master
Gerrit-Owner: Jack Phoenix 
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...PictureGame[master]: FU SQLite

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

Change subject: FU SQLite
..


FU SQLite

Change-Id: Ia9cdadf8d83b66d53b14d2104de488bf233b4d3d
---
M picturegame.sql
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/picturegame.sql b/picturegame.sql
index efee6fb..39e8313 100644
--- a/picturegame.sql
+++ b/picturegame.sql
@@ -1,6 +1,6 @@
 -- Required tables for the PictureGame extension
 CREATE TABLE /*_*/picturegame_images (
-  `id` int(10) unsigned NOT NULL auto_increment PRIMARY KEY,
+  `id` int(10) unsigned NOT NULL PRIMARY KEY auto_increment,
   -- Both of these were originally varchar(64)
   `img1` varchar(255) NOT NULL default '',
   `img2` varchar(255) NOT NULL default '',
@@ -26,7 +26,7 @@
   `picid` int(10) unsigned NOT NULL default '0',
   `userid` int(5) default NULL,
   `imgpicked` int(1) unsigned NOT NULL default '0',
-  `id` int(10) unsigned NOT NULL auto_increment PRIMARY KEY,
+  `id` int(10) unsigned NOT NULL PRIMARY KEY auto_increment,
   `username` varchar(255) default NULL,
   `vote_date` datetime default NULL
 ) /*$wgDBTableOptions*/;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia9cdadf8d83b66d53b14d2104de488bf233b4d3d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/PictureGame
Gerrit-Branch: master
Gerrit-Owner: Jack Phoenix 
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...PollNY[master]: FU SQLite

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

Change subject: FU SQLite
..

FU SQLite

Change-Id: I9c302a75f4851463821ac4083b7d22d793114db7
---
M poll.sql
1 file changed, 3 insertions(+), 3 deletions(-)


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

diff --git a/poll.sql b/poll.sql
index f98de78..5a3cf14 100644
--- a/poll.sql
+++ b/poll.sql
@@ -1,6 +1,6 @@
 -- Three tables for PollNY extension
 CREATE TABLE /*_*/poll_choice (
-  `pc_id` int(11) NOT NULL auto_increment PRIMARY KEY,
+  `pc_id` int(11) NOT NULL PRIMARY KEY auto_increment,
   `pc_poll_id` int(11) NOT NULL default '0',
   `pc_order` int(5) default '0',
   `pc_text` text NOT NULL,
@@ -10,7 +10,7 @@
 CREATE INDEX /*i*/pc_poll_id ON /*_*/poll_choice (pc_poll_id);
 
 CREATE TABLE /*_*/poll_question (
-  `poll_id` int(11) NOT NULL auto_increment PRIMARY KEY,
+  `poll_id` int(11) NOT NULL PRIMARY KEY auto_increment,
   `poll_page_id` int(11) NOT NULL default '0',
   `poll_user_id` int(11) NOT NULL default '0',
   `poll_user_name` varchar(255) NOT NULL default '',
@@ -29,7 +29,7 @@
 CREATE INDEX /*i*/poll_random ON /*_*/poll_question (poll_random);
 
 CREATE TABLE /*_*/poll_user_vote (
-  `pv_id` int(11) NOT NULL auto_increment PRIMARY KEY,
+  `pv_id` int(11) NOT NULL PRIMARY KEY auto_increment,
   `pv_poll_id` int(11) NOT NULL default '0',
   `pv_pc_id` int(5) default '0',
   `pv_user_id` int(11) NOT NULL default '0',

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...QuizGame[master]: FU SQLite

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

Change subject: FU SQLite
..

FU SQLite

Change-Id: I33ef40e540a0c88944b9cf45e3d9874d951573c5
---
M quizgame.sql
1 file changed, 4 insertions(+), 4 deletions(-)


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

diff --git a/quizgame.sql b/quizgame.sql
index 393991b..cb0d308 100644
--- a/quizgame.sql
+++ b/quizgame.sql
@@ -1,6 +1,6 @@
 -- Tables for QuizGame extension
 CREATE TABLE /*_*/quizgame_questions (
-  `q_id` int(11) unsigned NOT NULL auto_increment PRIMARY KEY,
+  `q_id` int(11) unsigned NOT NULL PRIMARY KEY auto_increment,
   `q_user_id` int(11) unsigned NOT NULL default '0',
   `q_user_name` varchar(255) NOT NULL default '',
   -- One of the QuizGameHome::$FLAG_* static variables
@@ -23,7 +23,7 @@
 CREATE INDEX /*i*/q_random ON /*_*/quizgame_questions (q_random);
 
 CREATE TABLE /*_*/quizgame_answers (
-  `a_id` int(10) unsigned NOT NULL auto_increment PRIMARY KEY,
+  `a_id` int(10) unsigned NOT NULL PRIMARY KEY auto_increment,
   `a_q_id` int(10) unsigned NOT NULL default '0',
   `a_choice_id` int(11) unsigned NOT NULL default '0',
   `a_user_id` int(11) unsigned NOT NULL default '0',
@@ -38,7 +38,7 @@
 CREATE INDEX /*i*/a_user_name ON /*_*/quizgame_answers (a_user_name);
 
 CREATE TABLE /*_*/quizgame_choice (
-  `choice_id` int(11) NOT NULL auto_increment PRIMARY KEY,
+  `choice_id` int(11) NOT NULL PRIMARY KEY auto_increment,
   `choice_q_id` int(11) NOT NULL default '0',
   `choice_order` int(5) default '0',
   `choice_text` text NOT NULL,
@@ -49,7 +49,7 @@
 CREATE INDEX /*i*/choice_q_id ON /*_*/quizgame_choice (choice_q_id);
 
 CREATE TABLE /*_*/quizgame_user_view (
-  `uv_id` int(11) unsigned NOT NULL auto_increment PRIMARY KEY,
+  `uv_id` int(11) unsigned NOT NULL PRIMARY KEY auto_increment,
   `uv_q_id` int(11) unsigned NOT NULL default '0',
   `uv_user_id` int(11) unsigned NOT NULL default '0',
   `uv_user_name` varchar(255) NOT NULL default '',

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...PictureGame[master]: FU SQLite

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

Change subject: FU SQLite
..

FU SQLite

Change-Id: Ia9cdadf8d83b66d53b14d2104de488bf233b4d3d
---
M picturegame.sql
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/PictureGame 
refs/changes/37/335737/1

diff --git a/picturegame.sql b/picturegame.sql
index efee6fb..39e8313 100644
--- a/picturegame.sql
+++ b/picturegame.sql
@@ -1,6 +1,6 @@
 -- Required tables for the PictureGame extension
 CREATE TABLE /*_*/picturegame_images (
-  `id` int(10) unsigned NOT NULL auto_increment PRIMARY KEY,
+  `id` int(10) unsigned NOT NULL PRIMARY KEY auto_increment,
   -- Both of these were originally varchar(64)
   `img1` varchar(255) NOT NULL default '',
   `img2` varchar(255) NOT NULL default '',
@@ -26,7 +26,7 @@
   `picid` int(10) unsigned NOT NULL default '0',
   `userid` int(5) default NULL,
   `imgpicked` int(1) unsigned NOT NULL default '0',
-  `id` int(10) unsigned NOT NULL auto_increment PRIMARY KEY,
+  `id` int(10) unsigned NOT NULL PRIMARY KEY auto_increment,
   `username` varchar(255) default NULL,
   `vote_date` datetime default NULL
 ) /*$wgDBTableOptions*/;

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...Challenge[master]: FU SQLite

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

Change subject: FU SQLite
..


FU SQLite

SQLite is super-picky about the order of PRIMARY KEY/AUTO_INCREMENT.

Change-Id: I5d667b01a69f5fdb597deccf17a2ad5307d6dc6b
---
M challenge.sql
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/challenge.sql b/challenge.sql
index a55ed2c..63746f6 100644
--- a/challenge.sql
+++ b/challenge.sql
@@ -1,5 +1,5 @@
 CREATE TABLE /*_*/challenge (
-  challenge_id int(11) NOT NULL auto_increment PRIMARY KEY,
+  challenge_id int(11) NOT NULL PRIMARY KEY auto_increment,
   -- Challenger
   challenge_user_id_1 int(11) NOT NULL default 0,
   challenge_username1 varchar(255) NOT NULL default '',
@@ -23,7 +23,7 @@
 )/*$wgDBTableOptions*/;
 
 CREATE TABLE /*_*/challenge_rate (
-  challenge_rate_id int(11) NOT NULL auto_increment PRIMARY KEY,
+  challenge_rate_id int(11) NOT NULL PRIMARY KEY auto_increment,
   challenge_id int(11) NOT NULL default 0,
   challenge_rate_date varbinary(14) NOT NULL default '',
   challenge_rate_user_id int(11) NOT NULL default 0,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5d667b01a69f5fdb597deccf17a2ad5307d6dc6b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Challenge
Gerrit-Branch: master
Gerrit-Owner: Jack Phoenix 
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...Challenge[master]: FU SQLite

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

Change subject: FU SQLite
..

FU SQLite

SQLite is super-picky about the order of PRIMARY KEY/AUTO_INCREMENT.

Change-Id: I5d667b01a69f5fdb597deccf17a2ad5307d6dc6b
---
M challenge.sql
1 file changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/challenge.sql b/challenge.sql
index a55ed2c..63746f6 100644
--- a/challenge.sql
+++ b/challenge.sql
@@ -1,5 +1,5 @@
 CREATE TABLE /*_*/challenge (
-  challenge_id int(11) NOT NULL auto_increment PRIMARY KEY,
+  challenge_id int(11) NOT NULL PRIMARY KEY auto_increment,
   -- Challenger
   challenge_user_id_1 int(11) NOT NULL default 0,
   challenge_username1 varchar(255) NOT NULL default '',
@@ -23,7 +23,7 @@
 )/*$wgDBTableOptions*/;
 
 CREATE TABLE /*_*/challenge_rate (
-  challenge_rate_id int(11) NOT NULL auto_increment PRIMARY KEY,
+  challenge_rate_id int(11) NOT NULL PRIMARY KEY auto_increment,
   challenge_id int(11) NOT NULL default 0,
   challenge_rate_date varbinary(14) NOT NULL default '',
   challenge_rate_user_id int(11) NOT NULL default 0,

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

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

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Set site name for ku.wiktionary

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

Change subject: Set site name for ku.wiktionary
..


Set site name for ku.wiktionary

Bug: T29878
Change-Id: I4e4a87b238138592772151f7a2b409c410dc2373
---
M wmf-config/InitialiseSettings.php
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 0f4ebd4..78d16bb 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -1852,6 +1852,7 @@
'kowiktionary' => '위키낱말사전',
'krcwiki' => 'Википедия',
'kuwiki' => 'Wîkîpediya',
+   'kuwiktionary' => 'Wîkîferheng', // T29878
'wikitech' => 'Wikitech',
'lawiki' => 'Vicipaedia',
'lawikibooks' => 'Vicilibri',

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: phabricator: Set the elasticsearch version in a string

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

Change subject: phabricator: Set the elasticsearch version in a string
..


phabricator: Set the elasticsearch version in a string

Bug: T138881
Change-Id: I29e90f250ca2753052e5b3ee3084455d6b5c964b
---
M modules/role/manifests/phabricator/main.pp
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/modules/role/manifests/phabricator/main.pp 
b/modules/role/manifests/phabricator/main.pp
index bfb0107..717857a 100644
--- a/modules/role/manifests/phabricator/main.pp
+++ b/modules/role/manifests/phabricator/main.pp
@@ -129,7 +129,7 @@
 $phab_diffusion_ssh_host = hiera('phabricator_diffusion_ssh_host', 
'git-ssh.wikimedia.org')
 
 $elasticsearch_host = hiera('phabricator_elasticsearch_host', 
'https://search.svc.eqiad.wmnet:9243')
-$elasticsearch_version = hiera('phabricator_elasticsearch_version', 2)
+$elasticsearch_version = hiera('phabricator_elasticsearch_version', '2')
 $elasticsearch_enabled = hiera('phabricator_elasticsearch_enabled', true)
 
 # lint:ignore:arrow_alignment

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: phabricator: Set the elasticsearch version in a string

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

Change subject: phabricator: Set the elasticsearch version in a string
..

phabricator: Set the elasticsearch version in a string

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


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/35/335735/1


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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: librenms/locales/logstash/lshell linting changes

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

Change subject: librenms/locales/logstash/lshell linting changes
..


librenms/locales/logstash/lshell linting changes

Use full names for class names, as relative names are not allowed in
future Puppet versions

Add trailing commas to abide by the Coding Style guidelines

Bug: T93645
Change-Id: Ib0d39ba327f5dca9a30f6c3dbeb5f9de1b71d27e
---
M modules/librenms/manifests/web.pp
M modules/locales/manifests/all.pp
M modules/locales/manifests/extended.pp
M modules/logstash/manifests/output/elasticsearch.pp
M modules/lshell/manifests/init.pp
5 files changed, 5 insertions(+), 5 deletions(-)

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



diff --git a/modules/librenms/manifests/web.pp 
b/modules/librenms/manifests/web.pp
index 389f8f2..163f9e2 100644
--- a/modules/librenms/manifests/web.pp
+++ b/modules/librenms/manifests/web.pp
@@ -17,7 +17,7 @@
 subjects   => 'librenms.wikimedia.org',
 puppet_svc => 'apache2',
 system_svc => 'apache2',
-require=> Class['apache::mod::ssl']
+require=> Class['apache::mod::ssl'],
 }
 
 monitoring::service { 'https':
diff --git a/modules/locales/manifests/all.pp b/modules/locales/manifests/all.pp
index 3b07bc7..5a6f005 100644
--- a/modules/locales/manifests/all.pp
+++ b/modules/locales/manifests/all.pp
@@ -4,7 +4,7 @@
 # long time on Ubuntu systems; consider using locales::extended.
 
 class locales::all {
-include locales
+include ::locales
 
 # Debian ships a locales-all package which has all locales pre-generated.
 # Ubuntu doesn't, so we're forced to generate them locally every time :(
diff --git a/modules/locales/manifests/extended.pp 
b/modules/locales/manifests/extended.pp
index dacf8a0..21ce54e 100644
--- a/modules/locales/manifests/extended.pp
+++ b/modules/locales/manifests/extended.pp
@@ -5,7 +5,7 @@
 # their relative usefulness.
 
 class locales::extended {
-include locales
+include ::locales
 
 # Ubuntu has a nice supported.d mechanism; Debian doesn't, so fall back
 # into overwriting the systems config. For Debian systems, though,
diff --git a/modules/logstash/manifests/output/elasticsearch.pp 
b/modules/logstash/manifests/output/elasticsearch.pp
index eb31403..cbdf70c 100644
--- a/modules/logstash/manifests/output/elasticsearch.pp
+++ b/modules/logstash/manifests/output/elasticsearch.pp
@@ -40,7 +40,7 @@
 $template= undef,
 $template_name   = $title,
 ) {
-require logstash::output::elasticsearch::scripts
+require ::logstash::output::elasticsearch::scripts
 
 logstash::conf{ "output-elasticsearch-${title}":
 ensure   => $ensure,
diff --git a/modules/lshell/manifests/init.pp b/modules/lshell/manifests/init.pp
index 66b863a..a8dd309 100644
--- a/modules/lshell/manifests/init.pp
+++ b/modules/lshell/manifests/init.pp
@@ -50,7 +50,7 @@
 }
 
 package { 'lshell':
-ensure => present
+ensure => present,
 }
 
 file { '/etc/lshell.conf':

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib0d39ba327f5dca9a30f6c3dbeb5f9de1b71d27e
Gerrit-PatchSet: 7
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Juniorsys 
Gerrit-Reviewer: BBlack 
Gerrit-Reviewer: BryanDavis 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: Faidon Liambotis 
Gerrit-Reviewer: Gehel 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: RobH 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Related pages is shown to 90% of mobile users

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

Change subject: Related pages is shown to 90% of mobile users
..


Related pages is shown to 90% of mobile users

Note that RelatedArticlesLoggingSamplingRate is set to 0.01
which should be low enough for the traffic of English Wikipedia.

Bug: T154681
Change-Id: I3e478c6537ef2e9579c275fd2f1478729f574b04
---
M dblists/related-articles-footer-blacklisted-skins.dblist
M wmf-config/InitialiseSettings.php
2 files changed, 5 insertions(+), 1 deletion(-)

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



diff --git a/dblists/related-articles-footer-blacklisted-skins.dblist 
b/dblists/related-articles-footer-blacklisted-skins.dblist
index 78b1fbd..fe35a52 100644
--- a/dblists/related-articles-footer-blacklisted-skins.dblist
+++ b/dblists/related-articles-footer-blacklisted-skins.dblist
@@ -1,3 +1,2 @@
 ruwiki
 dewiki
-enwiki
diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 57b04f2..0f4ebd4 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -16505,6 +16505,11 @@
'related-articles-footer-blacklisted-skins' => [ 'minerva' ],
 ],
 
+'wgRelatedArticlesEnabledSamplingRate' => [
+   'default' => 1,
+   'enwiki' => 0.9,
+],
+
 'wmgUseRelatedSites' => [
'default' => false,
'wikivoyage' => true,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3e478c6537ef2e9579c275fd2f1478729f574b04
Gerrit-PatchSet: 3
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson 
Gerrit-Reviewer: Bmansurov 
Gerrit-Reviewer: Dereckson 
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: RelatedArticles enabled on French Wikipedia (mobile only)

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

Change subject: RelatedArticles enabled on French Wikipedia (mobile only)
..


RelatedArticles enabled on French Wikipedia (mobile only)

Bug: T156362
Change-Id: I0bbe00d451a135ded75b63b7ce8806fbc5cb7656
---
M dblists/related-articles-footer-blacklisted-skins.dblist
1 file changed, 0 insertions(+), 1 deletion(-)

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



diff --git a/dblists/related-articles-footer-blacklisted-skins.dblist 
b/dblists/related-articles-footer-blacklisted-skins.dblist
index 4a90eb2..78b1fbd 100644
--- a/dblists/related-articles-footer-blacklisted-skins.dblist
+++ b/dblists/related-articles-footer-blacklisted-skins.dblist
@@ -1,4 +1,3 @@
 ruwiki
-frwiki
 dewiki
 enwiki

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0bbe00d451a135ded75b63b7ce8806fbc5cb7656
Gerrit-PatchSet: 3
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson 
Gerrit-Reviewer: Dereckson 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Update apple touch icon for Wikipedia

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

Change subject: Update apple touch icon for Wikipedia
..


Update apple touch icon for Wikipedia

Bug: T152538
Change-Id: Ib6ddbd51115a4c5f7d05fd56b02a470bd7219948
---
M static/apple-touch/wikipedia.png
1 file changed, 0 insertions(+), 0 deletions(-)

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



diff --git a/static/apple-touch/wikipedia.png b/static/apple-touch/wikipedia.png
index bc49857..647669d 100644
--- a/static/apple-touch/wikipedia.png
+++ b/static/apple-touch/wikipedia.png
Binary files differ

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib6ddbd51115a4c5f7d05fd56b02a470bd7219948
Gerrit-PatchSet: 2
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson 
Gerrit-Reviewer: Bmansurov 
Gerrit-Reviewer: Dereckson 
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]: redis: Linting changes

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

Change subject: redis: Linting changes
..


redis: Linting changes

Use full names for class names, as relative names are not allowed in
future Puppet versions

Add trailing commas to abide by the Coding Style guidelines

Bug: T93645
Change-Id: Id9fc036649a8b10dac04b311a6d2cff65399a4d1
---
M modules/redis/manifests/init.pp
M modules/redis/manifests/monitoring/instance.pp
M modules/redis/manifests/multidc/ipsec.pp
3 files changed, 5 insertions(+), 5 deletions(-)

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



diff --git a/modules/redis/manifests/init.pp b/modules/redis/manifests/init.pp
index fe160fd..38e492c 100644
--- a/modules/redis/manifests/init.pp
+++ b/modules/redis/manifests/init.pp
@@ -24,7 +24,7 @@
 # Disabling transparent hugepages is strongly recommended
 # in http://redis.io/topics/latency.
 sysfs::parameters { 'disable_transparent_hugepages':
-values => { 'kernel/mm/transparent_hugepage/enabled' => 'never' }
+values => { 'kernel/mm/transparent_hugepage/enabled' => 'never' },
 }
 
 # Background save may fail under low memory condition unless
@@ -41,7 +41,7 @@
 owner  => 'root',
 group  => 'root',
 mode   => '0644',
-before => File['/etc/redis/redis.conf']
+before => File['/etc/redis/redis.conf'],
 }
 
 # Distro-specific common directives go here
diff --git a/modules/redis/manifests/monitoring/instance.pp 
b/modules/redis/manifests/monitoring/instance.pp
index f5d5ed6..801b815 100644
--- a/modules/redis/manifests/monitoring/instance.pp
+++ b/modules/redis/manifests/monitoring/instance.pp
@@ -44,7 +44,7 @@
 } else {
 monitoring::service{ "redis.${instance_name}":
 description   => "Redis status ${instance_name}",
-check_command => "check_redis!${port}!${cred_file}"
+check_command => "check_redis!${port}!${cred_file}",
 }
 }
 }
diff --git a/modules/redis/manifests/multidc/ipsec.pp 
b/modules/redis/manifests/multidc/ipsec.pp
index ff89c4d..ffe9ccc 100644
--- a/modules/redis/manifests/multidc/ipsec.pp
+++ b/modules/redis/manifests/multidc/ipsec.pp
@@ -10,8 +10,8 @@
 
 # No reason to define IPsec if the host doesn't need replication.
 if size($ipsec_host_list) > 0 {
-class { 'role::ipsec':
-hosts => $ipsec_host_list
+class { '::role::ipsec':
+hosts => $ipsec_host_list,
 }
 }
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id9fc036649a8b10dac04b311a6d2cff65399a4d1
Gerrit-PatchSet: 6
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Juniorsys 
Gerrit-Reviewer: Alexandros Kosiaris 
Gerrit-Reviewer: Asher 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: Giuseppe Lavagetto 
Gerrit-Reviewer: Ori.livneh 
Gerrit-Reviewer: Yuvipanda 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Limit page images on beta cluster to images in the lead section

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

Change subject: Limit page images on beta cluster to images in the lead section
..


Limit page images on beta cluster to images in the lead section

This will allow us to test before pushing to all users.

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

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



diff --git a/wmf-config/InitialiseSettings-labs.php 
b/wmf-config/InitialiseSettings-labs.php
index bb57348..72c92b7 100644
--- a/wmf-config/InitialiseSettings-labs.php
+++ b/wmf-config/InitialiseSettings-labs.php
@@ -573,5 +573,10 @@
'wmgUseInterwikiSorting' => [
'default' => false,
],
+
+   // T152115
+   'wgPageImagesLeadSectionOnly' => [
+   'default' => true,
+   ],
];
 } # wmflLabsSettings()

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I809c989b568038f6c32dbad59c93f5a2225342d0
Gerrit-PatchSet: 4
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson 
Gerrit-Reviewer: Dereckson 
Gerrit-Reviewer: Florianschmidtwelzow 
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]: xdummy: Linting changes

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

Change subject: xdummy: Linting changes
..


xdummy: Linting changes

Change-Id: I90be56c2df3e3063c48185557356d3ecaf6e8966
---
M modules/xdummy/manifests/init.pp
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/modules/xdummy/manifests/init.pp b/modules/xdummy/manifests/init.pp
index 8ff7733..e31bc15 100644
--- a/modules/xdummy/manifests/init.pp
+++ b/modules/xdummy/manifests/init.pp
@@ -48,6 +48,6 @@
 Package['Xorg'],
 Package['xpra'],
 User['xdummy']
-]
+],
 }
 }

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

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

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


[MediaWiki-commits] [Gerrit] operations/dns[master]: switch apt.wm.org from carbon to install1002

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

Change subject: switch apt.wm.org from carbon to install1002
..

switch apt.wm.org from carbon to install1002

Bug: T132757
Change-Id: I6a7201feb35c719805eb6863e27a338da5b96dff
---
M templates/wikimedia.org
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/dns 
refs/changes/34/335734/1

diff --git a/templates/wikimedia.org b/templates/wikimedia.org
index 24f14ae..87f5380 100644
--- a/templates/wikimedia.org
+++ b/templates/wikimedia.org
@@ -432,7 +432,7 @@
 
 annual  600 IN DYNA geoip!misc-addrs
 
-apt 300  IN CNAMEcarbon
+apt 300  IN CNAME   install1002
 
 archiva 1H  IN CNAMEmeitnerium
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6a7201feb35c719805eb6863e27a338da5b96dff
Gerrit-PatchSet: 1
Gerrit-Project: operations/dns
Gerrit-Branch: master
Gerrit-Owner: Dzahn 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: zuul: Linting changes

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

Change subject: zuul: Linting changes
..


zuul: Linting changes

Change-Id: Ibf28d2ccfefbaa912b0cad08662af6b73363de90
---
M modules/zuul/manifests/monitoring/merger.pp
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/modules/zuul/manifests/monitoring/merger.pp 
b/modules/zuul/manifests/monitoring/merger.pp
index 1c7ff58..d5598b2 100644
--- a/modules/zuul/manifests/monitoring/merger.pp
+++ b/modules/zuul/manifests/monitoring/merger.pp
@@ -7,7 +7,7 @@
 nrpe::monitor_service { 'zuul_merger':
 description   => 'zuul_merger_service_running',
 contact_group => 'contint',
-nrpe_command  => "/usr/lib/nagios/plugins/check_procs -w 1:1 -c 1:1 
--ereg-argument-array '^/usr/share/python/zuul/bin/python /usr/bin/zuul-merger'"
+nrpe_command  => "/usr/lib/nagios/plugins/check_procs -w 1:1 -c 1:1 
--ereg-argument-array '^/usr/share/python/zuul/bin/python 
/usr/bin/zuul-merger'",
 }
 
 nrpe::monitor_service { 'zuul_merger_git_daemon':

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

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

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Interwiki map update

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

Change subject: Interwiki map update
..


Interwiki map update

Bug: T156334
Change-Id: Icfbb3264eddab7e4861fc40d44213bf2c137e205
---
M wmf-config/interwiki.php
1 file changed, 4 insertions(+), 2 deletions(-)

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



diff --git a/wmf-config/interwiki.php b/wmf-config/interwiki.php
index f18b6a3..384bfde 100644
--- a/wmf-config/interwiki.php
+++ b/wmf-config/interwiki.php
@@ -1,5 +1,5 @@
  '0 
http://www.acronymfinder.com/af-query.asp?String=exact&Acronym=$1',
'__global:advisory' => '1 https://advisory.wikimedia.org/wiki/$1',
@@ -301,6 +301,8 @@
'__global:usej' => '0 http://www.tejo.org/usej/$1',
'__global:usemod' => '0 http://www.usemod.com/cgi-bin/wiki.pl?$1',
'__global:usability' => '1 https://usability.wikimedia.org/wiki/$1',
+   '__global:utrs' => '0 https://utrs.wmflabs.org/appeal.php?id=$1',
+   '__global:utrs' => '0 https://utrs.wmflabs.org/appeal.php?id=$1',
'__global:vikidia' => '0 //fr.vikidia.org/wiki/$1',
'__global:vlos' => '0 http://www.thuvienkhoahoc.com/tusach/$1',
'__global:vkol' => '0 http://kol.coldfront.net/thekolwiki/index.php/$1',
@@ -11447,7 +11449,7 @@
'__global:meta' => '1 https://meta.wikimedia.org/wiki/$1',
'__global:sep11' => '1 https://sep11.wikipedia.org/wiki/$1',
'__global:d' => '1 https://www.wikidata.org/wiki/$1',
-   '__list:__global' => 'acronym advisory advogato aew appropedia 
aquariumwiki arborwiki arxiv atmwiki baden battlestarwiki bcnbio beacha 
betawiki betawikiversity bibcode bluwiki blw botwiki boxrec brickwiki bugzilla 
bulba c c2 c2find cache cellwiki centralwikia chej choralwiki citizendium 
ckwiss comixpedia commons communityscheme communitywiki comune creativecommons 
creativecommonswiki cxej d dbdump dcc dcdatabase dcma delicious devmo dict 
dictionary disinfopedia distributedproofreaders distributedproofreadersca dmoz 
dmozs doi donate doom_wiki download dpd drae dreamhost drumcorpswiki dwjwiki 
ecoreality ecxei elibre emacswiki encyc energiewiki englyphwiki enkol 
eokulturcentro esolang etherpad ethnologue ethnologuefamily evowiki exotica 
eĉei fanimutationwiki fedora finalfantasy finnix flickrphoto flickruser 
floralwiki foldoc forthfreak foundation foxwiki freebio freebsdman 
freeculturewiki freedomdefined freefeel freekiwiki freenode freesoft ganfyd 
gardenology gausswiki gentoo genwiki gerrit git globalvoices glossarwiki 
glossarywiki google googledefine googlegroups guildwarswiki guildwiki gutenberg 
gutenbergwiki h2wiki hackerspaces hammondwiki hdl heroeswiki horizon hrfwiki 
hrwiki hupwiki iarchive imdbcharacter imdbcompany imdbname imdbtitle incubator 
infosecpedia infosphere irc ircrc iso639-3 issn iuridictum jaglyphwiki javanet 
javapedia jefo jerseydatabase jira jspwiki jstor kamelo karlsruhe kinowiki 
kmwiki komicawiki kontuwiki koslarwiki labsconsole libreplanet linguistlist 
linuxwiki linuxwikide liswiki literateprograms livepedia localwiki lojban 
lostpedia lqwiki luxo m mail mailarchive mariowiki marveldatabase meatball 
mediawikiwiki mediazilla memoryalpha meta metawiki metawikimedia metawikipedia 
metawikisearch mineralienatlas moinmoin monstropedia mosapedia mozcom 
mozillawiki mozillazinekb musicbrainz mw mwod mwot nara nkcells nosmoke nost 
nostalgia oeis oldwikisource olpc onelook openlibrary openstreetmap openwetware 
openwiki opera7wiki organicdesign orthodoxwiki osmwiki otrs otrswiki ourmedia 
outreach outreachwiki owasp panawiki patwiki personaltelco petscan phab 
phabricator phpwiki phwiki planetmath pmeg pmid pokewiki pokéwiki policy 
proofwiki psycle pyrev pythoninfo pythonwiki pywiki quality quarry rcirc 
reuterswiki rev revo rfc rheinneckar robowiki rodovid rowiki rt rtfm s23wiki 
scholar schoolswp scores scoutwiki scramble seapig seattlewiki securewikidc 
semantic-mw senseislibrary sep11 sharemap silcode slashdot slwiki sourceforge 
spcom species squeak stats stewardry strategy strategywiki sulutil svn 
swinbrain swtrain tabwiki tclerswiki technorati tenwiki test2wiki testwiki 
testwikidata tfwiki thelemapedia theopedia thinkwiki ticket tmbw tmnet tmwiki 
toollabs tools translatewiki tswiki tviv tvtropes twiki tyvawiki uncyclopedia 
unihan unreal urbandict usability usej usemod viaf vikidia vkol vlos voipinfo 
votewiki werelate wg wikia wikiapiary wikiasite wikibooks wikichristian 
wikicities wikicity wikiconference wikidata wikif1 wikifur wikihow wikiindex 
wikilemon wikilivres wikilivresru wikimac-de wikimedia wikinews wikinfo 
wikinvest wikiotics wikipapers wikipedia wikipediawikipedia wikiquote 
wikiskripta wikisophia wikisource wikispecies wikispot wikitech wikiti wikitree 
wikiversity wikivoyage wikiwikiweb wiktionary wipipedia wlug wm2005

[MediaWiki-commits] [Gerrit] operations/puppet[production]: phabricator: allow to change elasticsearch configs

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

Change subject: phabricator: allow to change elasticsearch configs
..


phabricator: allow to change elasticsearch configs

Currently the configs are hardcoded but on labs we need to change the
settings.

Bug: T138881
Change-Id: Ife3bba3893063c690736bd784d9e3cdd49deca73
---
M modules/phabricator/data/fixed_settings.yaml
M modules/role/manifests/phabricator/main.pp
2 files changed, 7 insertions(+), 4 deletions(-)

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



diff --git a/modules/phabricator/data/fixed_settings.yaml 
b/modules/phabricator/data/fixed_settings.yaml
index 7a3a4f0..cec1952 100644
--- a/modules/phabricator/data/fixed_settings.yaml
+++ b/modules/phabricator/data/fixed_settings.yaml
@@ -5,10 +5,6 @@
 # in Phabricator but only for administrators.  If you do not have the ability 
to restart the
 # associated daemons do not merge changes to this file.
 
-search.elastic.host: 'https://search.svc.eqiad.wmnet:9243'
-search.elastic.version: '2'
-search.elastic.enabled: true
-
 ui.logo:
   'logoImagePHID': 'PHID-FILE-rs3pf2brupiulr6zcnrg'
   'wordmarkText': 'Phabricator'
diff --git a/modules/role/manifests/phabricator/main.pp 
b/modules/role/manifests/phabricator/main.pp
index a17f5e6..bfb0107 100644
--- a/modules/role/manifests/phabricator/main.pp
+++ b/modules/role/manifests/phabricator/main.pp
@@ -128,6 +128,10 @@
 
 $phab_diffusion_ssh_host = hiera('phabricator_diffusion_ssh_host', 
'git-ssh.wikimedia.org')
 
+$elasticsearch_host = hiera('phabricator_elasticsearch_host', 
'https://search.svc.eqiad.wmnet:9243')
+$elasticsearch_version = hiera('phabricator_elasticsearch_version', 2)
+$elasticsearch_enabled = hiera('phabricator_elasticsearch_enabled', true)
+
 # lint:ignore:arrow_alignment
 class { '::phabricator':
 deploy_target=> $deploy_target,
@@ -142,6 +146,9 @@
   "${phab_root_dir}/libext/security/src",
   "${phab_root_dir}/libext/misc/" ],
 settings => {
+'search.elastic.host'=> $elasticsearch_host,
+'search.elastic.version' => $elasticsearch_version,
+'search.elastic.enabled' => $elasticsearch_enabled,
 'darkconsole.enabled'=> false,
 'differential.allow-self-accept' => true,
 'phabricator.base-uri'   => "https://${domain}";,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ife3bba3893063c690736bd784d9e3cdd49deca73
Gerrit-PatchSet: 11
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Paladox 
Gerrit-Reviewer: 20after4 
Gerrit-Reviewer: Chad 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: Paladox 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: ldap: Linting fixes

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

Change subject: ldap: Linting fixes
..


ldap: Linting fixes

Use full names for class names, as relative names are not allowed in
future Puppet versions

Bug: T93645
Change-Id: I6cd07411ba8aa49cd32925b98b56a19169d1fd54
---
M modules/ldap/manifests/client/includes.pp
M modules/ldap/manifests/client/nss.pp
M modules/ldap/manifests/role/client/labs.pp
M modules/ldap/manifests/yamlcreds.pp
4 files changed, 13 insertions(+), 13 deletions(-)

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



diff --git a/modules/ldap/manifests/client/includes.pp 
b/modules/ldap/manifests/client/includes.pp
index 575b367..04d2cc4 100644
--- a/modules/ldap/manifests/client/includes.pp
+++ b/modules/ldap/manifests/client/includes.pp
@@ -1,14 +1,14 @@
 class ldap::client::includes($ldapincludes, $ldapconfig) {
 if 'openldap' in $ldapincludes {
-class { 'ldap::client::openldap':
+class { '::ldap::client::openldap':
 ldapconfig   => $ldapconfig,
 ldapincludes => $ldapincludes,
 }
 }
 
 if 'pam' in $ldapincludes {
-class { 'ldap::client::pam':
-ldapconfig => $ldapconfig
+class { '::ldap::client::pam':
+ldapconfig => $ldapconfig,
 }
 } else {
 # The ldap nss package recommends this package
@@ -20,20 +20,20 @@
 }
 
 if 'nss' in $ldapincludes {
-class { 'ldap::client::nss':
-ldapconfig => $ldapconfig
+class { '::ldap::client::nss':
+ldapconfig => $ldapconfig,
 }
 }
 
 if 'sudo' in $ldapincludes {
-class { 'ldap::client::sudo':
-ldapconfig => $ldapconfig
+class { '::ldap::client::sudo':
+ldapconfig => $ldapconfig,
 }
 }
 
 if 'utils' in $ldapincludes {
-class { 'ldap::client::utils':
-ldapconfig => $ldapconfig
+class { '::ldap::client::utils':
+ldapconfig => $ldapconfig,
 }
 }
 
diff --git a/modules/ldap/manifests/client/nss.pp 
b/modules/ldap/manifests/client/nss.pp
index 21fbe18..917c483 100644
--- a/modules/ldap/manifests/client/nss.pp
+++ b/modules/ldap/manifests/client/nss.pp
@@ -38,7 +38,7 @@
 }
 
 # So scripts don't have to parse the ldap.conf format
-include ldap::yamlcreds
+include ::ldap::yamlcreds
 
 # Allow labs projects to give people custom shells
 $shell_override = hiera('user_login_shell', false)
diff --git a/modules/ldap/manifests/role/client/labs.pp 
b/modules/ldap/manifests/role/client/labs.pp
index 237769d..664bcdc 100644
--- a/modules/ldap/manifests/role/client/labs.pp
+++ b/modules/ldap/manifests/role/client/labs.pp
@@ -3,7 +3,7 @@
 $restricted_to = $::restricted_to,
 $restricted_from = $::restricted_from,
 ) {
-include ldap::role::config::labs
+include ::ldap::role::config::labs
 
 if ( $::realm == 'labs' ) {
 $includes = ['openldap', 'pam', 'nss', 'sudo', 'utils']
@@ -50,7 +50,7 @@
 $includes = $ldapincludes
 }
 
-class{ 'ldap::client::includes':
+class{ '::ldap::client::includes':
 ldapincludes => $includes,
 ldapconfig   => $ldap::role::config::labs::ldapconfig,
 }
diff --git a/modules/ldap/manifests/yamlcreds.pp 
b/modules/ldap/manifests/yamlcreds.pp
index 3cd77e7..219a495 100644
--- a/modules/ldap/manifests/yamlcreds.pp
+++ b/modules/ldap/manifests/yamlcreds.pp
@@ -1,7 +1,7 @@
 # Provision /etc/ldap.yaml file, with credentials for
 # readonly access to the labs ldap
 class ldap::yamlcreds {
-include ldap::role::config::labs
+include ::ldap::role::config::labs
 
 $ldapconfig = $::ldap::role::config::labs::ldapconfig
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6cd07411ba8aa49cd32925b98b56a19169d1fd54
Gerrit-PatchSet: 6
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Juniorsys 
Gerrit-Reviewer: Andrew Bogott 
Gerrit-Reviewer: Coren 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: Faidon Liambotis 
Gerrit-Reviewer: Yuvipanda 
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]: ores/otrs/package_builder: Linting changes

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

Change subject: ores/otrs/package_builder: Linting changes
..


ores/otrs/package_builder: Linting changes

Use full names for class names, as relative names are not allowed in
future Puppet versions

Add trailing commas to abide by the Coding Style guidelines

Bug: T93645
Change-Id: I7720660c061588c30a4daed22e67966da1493801
---
M modules/ores/manifests/precached.pp
M modules/ores/manifests/redis.pp
M modules/ores/manifests/web.pp
M modules/ores/manifests/worker.pp
M modules/otrs/manifests/init.pp
M modules/otrs/manifests/mail.pp
M modules/otrs/manifests/web.pp
M modules/otrs/tests/web.pp
M modules/package_builder/manifests/init.pp
M modules/package_builder/tests/environments.pp
M modules/package_builder/tests/hooks.pp
M modules/package_builder/tests/init.pp
12 files changed, 29 insertions(+), 29 deletions(-)

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



diff --git a/modules/ores/manifests/precached.pp 
b/modules/ores/manifests/precached.pp
index 39c921a..2eb35fe 100644
--- a/modules/ores/manifests/precached.pp
+++ b/modules/ores/manifests/precached.pp
@@ -1,7 +1,7 @@
 # = Class: ores::precached
 # Run a pre-caching daemon that listens to RCStream
 class ores::precached {
-include ores::web
+include ::ores::web
 
 $working_dir = $::ores::base::config_path
 $venv_path  = $::ores::base::venv_path
diff --git a/modules/ores/manifests/redis.pp b/modules/ores/manifests/redis.pp
index 97a108a..c28f8da 100644
--- a/modules/ores/manifests/redis.pp
+++ b/modules/ores/manifests/redis.pp
@@ -26,7 +26,7 @@
 maxmemory  => $cache_maxmemory,
 appendfilename => "${::hostname}-6380.aof",
 dbfilename => "${::hostname}-6380.rdb",
-}
+},
 }
 
 # If we specified a password use it
diff --git a/modules/ores/manifests/web.pp b/modules/ores/manifests/web.pp
index 8389302..e9fc248 100644
--- a/modules/ores/manifests/web.pp
+++ b/modules/ores/manifests/web.pp
@@ -10,7 +10,7 @@
 $celery_workers = 40,
 $extra_config = undef,
 ) {
-require ores::base
+require ::ores::base
 
 # Need to be able to also restart the worker. The uwsgi service is
 # hopefully temporary
@@ -36,7 +36,7 @@
 max-requests  => 200,
 stats-push=> 
"statsd:${graphite_server}:8125,ores.${::hostname}.uwsgi",
 memory-report => true,
-}
+},
 }
 
 # lint:ignore:arrow_alignment
@@ -44,32 +44,32 @@
 'metrics_collectors' => {
 'wmflabs_statsd' => {
 'host' => $graphite_server,
-}
+},
 },
 'ores' => {
 'data_paths' => {
 'nltk' => 
"${::ores::base::config_path}/submodules/wheels/nltk/",
-}
+},
 },
 'score_caches' => {
 'ores_redis' => {
 'host' => $redis_host,
 'port' => '6380',
-}
+},
 },
 'score_processors' => {
 'ores_celery' => {
 'BROKER_URL'=> "redis://${redis_host}:6379",
 'CELERY_RESULT_BACKEND' => "redis://${redis_host}:6379",
 'CELERYD_CONCURRENCY'   => $celery_workers,
-}
+},
 },
 'scoring_systems' => {
 'celery_queue' => {
 'BROKER_URL'=> "redis://${redis_host}:6379",
 'CELERY_RESULT_BACKEND' => "redis://${redis_host}:6379",
 'CELERYD_CONCURRENCY'   => $celery_workers,
-}
+},
 },
 }
 if $redis_password {
@@ -77,19 +77,19 @@
 'score_caches' => {
 'ores_redis' => {
 'password' => $redis_password,
-}
+},
 },
 'score_processors' => {
 'ores_celery' => {
 'BROKER_URL'=> 
"redis://:${redis_password}@${redis_host}:6379",
 'CELERY_RESULT_BACKEND' => 
"redis://:${redis_password}@${redis_host}:6379",
-}
+},
 },
 'scoring_systems' => {
 'celery_queue' => {
 'BROKER_URL'=> 
"redis://:${redis_password}@${redis_host}:6379",
 'CELERY_RESULT_BACKEND' => 
"redis://:${redis_password}@${redis_host}:6379",
-}
+},
 },
 }
 $config = deep_merge($base_config, $pass_config)
diff --git a/modules/ores/manifests/worker.pp b/modules/ores/manifests/worker.pp
index d4ec382..4dcb338 100644
--- a/modules/ores/manifests/worker.pp
+++ b/modules/ores/manifests/worker.pp
@@ -1,7 +1,7 @@
 class ores::worker(
 $log_level = 'ERROR',
 ) {
-require

[MediaWiki-commits] [Gerrit] mediawiki...SocialProfile[master]: Make up_user_id indexes unique to resolve DB query error

2017-02-02 Thread SamanthaNguyen (Code Review)
SamanthaNguyen has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/335733 )

Change subject: Make up_user_id indexes unique to resolve DB query error
..

Make up_user_id indexes unique to resolve DB query error

Bug: T157082
Change-Id: I81e0ce100a1ddb09e3803e88f1568a8df34d1119
---
M UserStats/user_points_archive.postgres.sql
M UserStats/user_points_archive.sql
M UserStats/user_points_monthly.postgres.sql
M UserStats/user_points_monthly.sql
M UserStats/user_points_weekly.postgres.sql
M UserStats/user_points_weekly.sql
6 files changed, 6 insertions(+), 6 deletions(-)


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

diff --git a/UserStats/user_points_archive.postgres.sql 
b/UserStats/user_points_archive.postgres.sql
index 3097980..2db04cc 100644
--- a/UserStats/user_points_archive.postgres.sql
+++ b/UserStats/user_points_archive.postgres.sql
@@ -10,4 +10,4 @@
   up_pointsFLOAT   NOT NULL DEFAULT 0
 );
 
-CREATE INDEX up_user_id ON user_points_archive (up_user_id);
\ No newline at end of file
+CREATE INDEX up_user_id ON user_points_archive (upa_up_user_id);
diff --git a/UserStats/user_points_archive.sql 
b/UserStats/user_points_archive.sql
index 4d13d1d..99026a9 100644
--- a/UserStats/user_points_archive.sql
+++ b/UserStats/user_points_archive.sql
@@ -7,4 +7,4 @@
   up_points float NOT NULL default 0
 ) /*$wgDBTableOptions*/;
 
-CREATE INDEX /*i*/up_user_id ON /*_*/user_points_archive (up_user_id);
\ No newline at end of file
+CREATE INDEX /*i*/up_user_id ON /*_*/user_points_archive (upa_up_user_id);
diff --git a/UserStats/user_points_monthly.postgres.sql 
b/UserStats/user_points_monthly.postgres.sql
index dcda675..c01c078 100644
--- a/UserStats/user_points_monthly.postgres.sql
+++ b/UserStats/user_points_monthly.postgres.sql
@@ -8,4 +8,4 @@
   up_pointsFLOAT   NOT NULL default 0
 );
 
-CREATE INDEX up_user_id ON user_points_monthly (up_user_id);
\ No newline at end of file
+CREATE INDEX up_user_id ON user_points_monthly (upm_up_user_id);
diff --git a/UserStats/user_points_monthly.sql 
b/UserStats/user_points_monthly.sql
index c9d0f0a..2e821f9 100644
--- a/UserStats/user_points_monthly.sql
+++ b/UserStats/user_points_monthly.sql
@@ -5,4 +5,4 @@
   up_points float NOT NULL default 0
 ) /*$wgDBTableOptions*/;
 
-CREATE INDEX /*i*/up_user_id ON /*_*/user_points_monthly (up_user_id);
\ No newline at end of file
+CREATE INDEX /*i*/up_user_id ON /*_*/user_points_monthly (upm_up_user_id);
diff --git a/UserStats/user_points_weekly.postgres.sql 
b/UserStats/user_points_weekly.postgres.sql
index 5fc53bb..6c4704f 100644
--- a/UserStats/user_points_weekly.postgres.sql
+++ b/UserStats/user_points_weekly.postgres.sql
@@ -8,4 +8,4 @@
   up_pointsFLOAT   NOT NULL default 0
 );
 
-CREATE INDEX up_user_id ON user_points_weekly (up_user_id);
\ No newline at end of file
+CREATE INDEX up_user_id ON user_points_weekly (upw_up_user_id);
diff --git a/UserStats/user_points_weekly.sql b/UserStats/user_points_weekly.sql
index a9cb4ab..523b1a9 100644
--- a/UserStats/user_points_weekly.sql
+++ b/UserStats/user_points_weekly.sql
@@ -5,4 +5,4 @@
   up_points float NOT NULL default 0
 ) /*$wgDBTableOptions*/;
 
-CREATE INDEX /*i*/up_user_id ON /*_*/user_points_weekly (up_user_id);
\ No newline at end of file
+CREATE INDEX /*i*/up_user_id ON /*_*/user_points_weekly (upw_up_user_id);

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I81e0ce100a1ddb09e3803e88f1568a8df34d1119
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SocialProfile
Gerrit-Branch: master
Gerrit-Owner: SamanthaNguyen 

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Setting wgPageAssessmentsSubprojects to true on testwiki

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

Change subject: Setting wgPageAssessmentsSubprojects to true on testwiki
..

Setting wgPageAssessmentsSubprojects to true on testwiki

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


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 57b04f2..972a2e5 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -16837,6 +16837,10 @@
'default' => true,
'enwikivoyage' => false,
 ],
+'wgPageAssessmentsSubprojects' => [
+   'default' => false,
+   'testwiki' => true,
+],
 
 'wmgUsePageImages' => [
'default' => true,

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...PageAssessments[master]: Better support for subprojects

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

Change subject: Better support for subprojects
..

Better support for subprojects

Only show show documentation for subproject parameters when they are
actually usable, i.e. $wgPageAssessmentsSubprojects is true.

Move help URLs from API descriptions to getHelpUrls().

Rewrite README and include configuration info.

Change-Id: Ifd586f184fcdde9c80c7cbd1b4643fefaa02e8bb
---
D README
A README.md
M api/ApiQueryPageAssessments.php
M api/ApiQueryProjectPages.php
M api/ApiQueryProjects.php
M i18n/en.json
6 files changed, 67 insertions(+), 32 deletions(-)


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

diff --git a/README b/README
deleted file mode 100644
index 2ae550b..000
--- a/README
+++ /dev/null
@@ -1,11 +0,0 @@
-This extension is for the purposes of storing article assessments as they 
happen in a new database table.
-This extension was designed keeping in mind Wikiprojects use-cases but they 
can be used for a number of other similar purposes.
-
-The parser function for invoking a new review is: {{#assessment:  |  | }} where 'assessment'
-is a magic word.
-
-The assessment parser function is expected to be on the Talk page of the page 
under review, however it may be included on the main page itself.
-
-A page may have more than one assessment function for different projects.
-
-See https://www.mediawiki.org/wiki/Extension:PageAssessments for further 
documentation.
diff --git a/README.md b/README.md
new file mode 100644
index 000..70acf0f
--- /dev/null
+++ b/README.md
@@ -0,0 +1,16 @@
+PageAssessments
+=
+
+See https://www.mediawiki.org/wiki/Extension:PageAssessments for detailed 
documentation.
+
+This extension is for the purposes of storing article assessments as they 
happen in a new database table. This extension was designed keeping in mind 
Wikiprojects use-cases but it can be used for a number of other similar 
purposes.
+
+The parser function for invoking a new review is: {{#assessment:  |  | }}.
+
+Configuration
+-
+
+The following configuration variables can be set from your LocalSettings.php 
file.
+
+* `$wgPageAssessmentsOnTalkPages`: Set to 'true' if page assessments are 
recorded on talk pages, or 'false' if page assessments are recorded directly on 
main namespace pages. Default is true.
+* `$wgPageAssessmentsSubprojects`: Set to 'true' if the wiki distinguishes 
between projects and subprojects. Default is false.
diff --git a/api/ApiQueryPageAssessments.php b/api/ApiQueryPageAssessments.php
index 9ef9783..b27be70 100644
--- a/api/ApiQueryPageAssessments.php
+++ b/api/ApiQueryPageAssessments.php
@@ -77,7 +77,9 @@
)
) );
$this->addWhereFld( 'pa_page_id', array_keys( $pages ) );
-   if ( !$params['subprojects'] && $wgPageAssessmentsSubprojects ) 
{
+   // If this wiki distinguishes between projects and subprojects, 
exclude
+   // subprojects (i.e. projects with parents) unless explicitly 
asked for.
+   if ( $wgPageAssessmentsSubprojects && !$params['subprojects'] ) 
{
$this->addWhere( 'pap_parent_id IS NULL' );
}
$this->addOption( 'LIMIT', $params['limit'] + 1 );
@@ -108,7 +110,9 @@
}
 
public function getAllowedParams() {
-   return array(
+   global $wgPageAssessmentsSubprojects;
+
+   $allowedParams = [
'continue' => array( ApiBase::PARAM_HELP_MSG => 
'api-help-param-continue' ),
'limit' => array(
ApiBase::PARAM_DFLT => '10',
@@ -117,21 +121,33 @@
ApiBase::PARAM_MAX => ApiBase::LIMIT_BIG1,
ApiBase::PARAM_MAX2 => ApiBase::LIMIT_BIG2,
),
-   'subprojects' => array(
+   ];
+   if ( $wgPageAssessmentsSubprojects ) {
+   $allowedParams[ 'subprojects' ] = [
ApiBase::PARAM_DFLT => false,
ApiBase::PARAM_TYPE => 'boolean',
-   ),
-   );
+   ];
+   }
+   return $allowedParams;
}
 
public function getExamplesMessages() {
-   return array(
+   global $wgPageAssessmentsSubprojects;
+
+   $exampleMessages = [

'action=query&prop=pageassessments&titles=Apple|Pear&formatversion=2'
=> 
'apihelp-query+pageassessments-example-formatversion',
'action=query&prop=pageassessments&titles=Apple'
=> 
'apihelp-query+pageassessments-

[MediaWiki-commits] [Gerrit] pywikibot/core[master]: Make Wikibase Property provide labels data

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

Change subject: Make Wikibase Property provide labels data
..


Make Wikibase Property provide labels data

Change-Id: I139ef7e263343e965a9de12acc8c531b774ce63c
---
M pywikibot/page.py
M pywikibot/site.py
M tests/wikibase_tests.py
3 files changed, 51 insertions(+), 4 deletions(-)

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



diff --git a/pywikibot/page.py b/pywikibot/page.py
index f015e45..c83e1bd 100644
--- a/pywikibot/page.py
+++ b/pywikibot/page.py
@@ -12,7 +12,7 @@
 
 """
 #
-# (C) Pywikibot team, 2008-2016
+# (C) Pywikibot team, 2008-2017
 #
 # Distributed under the terms of the MIT license.
 #
@@ -4275,6 +4275,17 @@
 self._type = self.repo.getPropertyType(self)
 return self._type
 
+@property
+def labels(self):
+"""
+Return labels of this property.
+
+@rtype: dict
+"""
+if not hasattr(self, '_labels'):
+self._labels = self.repo.get_property_labels(self)
+return self._labels
+
 @deprecated("Property.type")
 def getType(self):
 """
diff --git a/pywikibot/site.py b/pywikibot/site.py
index f2724d9..f8b59e4 100644
--- a/pywikibot/site.py
+++ b/pywikibot/site.py
@@ -6,7 +6,7 @@
 groups of wikis on the same topic in different languages.
 """
 #
-# (C) Pywikibot team, 2008-2016
+# (C) Pywikibot team, 2008-2017
 #
 # Distributed under the terms of the MIT license.
 #
@@ -7246,6 +7246,30 @@
 
 return dtype
 
+def get_property_labels(self, prop):
+"""
+Obtain labels of a property.
+
+Results are cached for 1 day.
+"""
+params = dict(
+action='wbgetentities',
+ids=prop.getID(),
+props='labels',
+)
+expiry = datetime.timedelta(days=1)
+req = self._request(expiry=expiry, parameters=params)
+data = req.submit()
+
+# the IDs returned from the API can be upper or lowercase, depending
+# on the version. See bug T55894 for more information.
+try:
+dtype = data['entities'][prop.getID()]['labels']
+except KeyError:
+dtype = data['entities'][prop.getID().lower()]['labels']
+
+return dtype
+
 @must_be(group='user')
 def editEntity(self, identification, data, bot=True, **kwargs):
 """
diff --git a/tests/wikibase_tests.py b/tests/wikibase_tests.py
index 0aaad45..70aaa22 100644
--- a/tests/wikibase_tests.py
+++ b/tests/wikibase_tests.py
@@ -1,7 +1,7 @@
 # -*- coding: utf-8 -*-
 """Tests for the Wikidata parts of the page module."""
 #
-# (C) Pywikibot team, 2008-2016
+# (C) Pywikibot team, 2008-2017
 #
 # Distributed under the terms of the MIT license.
 #
@@ -18,7 +18,7 @@
 import pywikibot
 
 from pywikibot import pagegenerators
-from pywikibot.page import WikibasePage, ItemPage, PropertyPage
+from pywikibot.page import WikibasePage, ItemPage, Property, PropertyPage
 from pywikibot.site import Namespace, NamespacesDict
 from pywikibot.tools import MediaWikiVersion
 
@@ -718,6 +718,18 @@
 self.assertEqual(item.getRedirectTarget(), target)
 
 
+class TestProperty(WikidataTestCase):
+
+"""Test Property."""
+
+def test_labels(self):
+"""Test retrieving Property labels."""
+wikidata = self.get_repo()
+property = Property(wikidata, 'P625')
+expected = {'language': 'en', 'value': 'coordinate location'}
+self.assertDictEqual(property.labels['en'], expected)
+
+
 class TestPropertyPage(WikidataTestCase):
 
 """Test PropertyPage."""

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I139ef7e263343e965a9de12acc8c531b774ce63c
Gerrit-PatchSet: 7
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Phantom42 
Gerrit-Reviewer: John Vandenberg 
Gerrit-Reviewer: Matěj Suchánek 
Gerrit-Reviewer: Phantom42 
Gerrit-Reviewer: Sn1per 
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/dns[master]: lower TTL of apt.wikimedia.org to 300

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

Change subject: lower TTL of apt.wikimedia.org to 300
..


lower TTL of apt.wikimedia.org to 300

Lower TTL of apt.wm.org so when later switching it away from
carbon the transition is faster / reverting is quicker if needed.

Change-Id: I23505f49b7f38c03d36b4ef0f47d693b096c8087
---
M templates/wikimedia.org
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/templates/wikimedia.org b/templates/wikimedia.org
index c6449f8..24f14ae 100644
--- a/templates/wikimedia.org
+++ b/templates/wikimedia.org
@@ -432,7 +432,7 @@
 
 annual  600 IN DYNA geoip!misc-addrs
 
-apt 1H  IN CNAMEcarbon
+apt 300  IN CNAMEcarbon
 
 archiva 1H  IN CNAMEmeitnerium
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I23505f49b7f38c03d36b4ef0f47d693b096c8087
Gerrit-PatchSet: 1
Gerrit-Project: operations/dns
Gerrit-Branch: master
Gerrit-Owner: Dzahn 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/dns[master]: lower TTL of apt.wikimedia.org to 300

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

Change subject: lower TTL of apt.wikimedia.org to 300
..

lower TTL of apt.wikimedia.org to 300

Lower TTL of apt.wm.org so when later switching it away from
carbon the transition is faster / reverting is quicker if needed.

Change-Id: I23505f49b7f38c03d36b4ef0f47d693b096c8087
---
M templates/wikimedia.org
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/dns 
refs/changes/30/335730/1

diff --git a/templates/wikimedia.org b/templates/wikimedia.org
index c6449f8..24f14ae 100644
--- a/templates/wikimedia.org
+++ b/templates/wikimedia.org
@@ -432,7 +432,7 @@
 
 annual  600 IN DYNA geoip!misc-addrs
 
-apt 1H  IN CNAMEcarbon
+apt 300  IN CNAMEcarbon
 
 archiva 1H  IN CNAMEmeitnerium
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I23505f49b7f38c03d36b4ef0f47d693b096c8087
Gerrit-PatchSet: 1
Gerrit-Project: operations/dns
Gerrit-Branch: master
Gerrit-Owner: Dzahn 

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


[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Update: page header subtitle leading

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

Change subject: Update: page header subtitle leading
..


Update: page header subtitle leading

Reduce leading of page header subtitle text very slightly

Bug: T156677
Change-Id: If6fb7ad6ab1da82fa48ba9fe443fc54025d23937
---
M app/src/main/res/values-v23/dimens.xml
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/app/src/main/res/values-v23/dimens.xml 
b/app/src/main/res/values-v23/dimens.xml
index 5cc581e..9924f96 100644
--- a/app/src/main/res/values-v23/dimens.xml
+++ b/app/src/main/res/values-v23/dimens.xml
@@ -3,6 +3,6 @@
 
 1.05
-1.2
+1.17
 1.15
 
\ No newline at end of file

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If6fb7ad6ab1da82fa48ba9fe443fc54025d23937
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Niedzielski 
Gerrit-Reviewer: Brion VIBBER 
Gerrit-Reviewer: Dbrant 
Gerrit-Reviewer: Mholloway 
Gerrit-Reviewer: Sniedzielski 
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]: Don't show arbitrary notifications.

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

Change subject: Don't show arbitrary notifications.
..


Don't show arbitrary notifications.

(Yet.)
This restricts the notifications that the app shows to the ones that we
explicitly support.

Change-Id: Ic5c77bc1d2862a0dbc98eb8fd189b05f0a70a0a5
---
M app/src/main/java/org/wikipedia/notifications/NotificationPresenter.java
1 file changed, 5 insertions(+), 5 deletions(-)

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



diff --git 
a/app/src/main/java/org/wikipedia/notifications/NotificationPresenter.java 
b/app/src/main/java/org/wikipedia/notifications/NotificationPresenter.java
index db381a8..b8c2d34 100644
--- a/app/src/main/java/org/wikipedia/notifications/NotificationPresenter.java
+++ b/app/src/main/java/org/wikipedia/notifications/NotificationPresenter.java
@@ -25,10 +25,10 @@
 private static final int REQUEST_CODE_AGENT = 2;
 
 public static void showNotification(@NonNull Context context, Notification 
n) {
-@StringRes int title = R.string.notification_generic_title;
-String description = "";
-@DrawableRes int icon = R.mipmap.launcher;
-@ColorInt int color = ContextCompat.getColor(context, 
R.color.foundation_gray);
+@StringRes int title;
+String description;
+@DrawableRes int icon;
+@ColorInt int color;
 
 Uri historyUri = uriForPath(n, "Special:History/"
 + (n.isFromWikidata() ? n.title().text() : n.title().full()));
@@ -74,7 +74,7 @@
 builder.addAction(0, 
context.getString(R.string.notification_button_view_user), agentIntent);
 break;
 default:
-break;
+return;
 }
 
 builder.setContentIntent(PendingIntent.getActivity(context, 
REQUEST_CODE_PAGE, pageIntent, PendingIntent.FLAG_UPDATE_CURRENT))

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic5c77bc1d2862a0dbc98eb8fd189b05f0a70a0a5
Gerrit-PatchSet: 2
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Dbrant 
Gerrit-Reviewer: Brion VIBBER 
Gerrit-Reviewer: Mholloway 
Gerrit-Reviewer: Niedzielski 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/core[wmf/1.29.0-wmf.10]: Set mCache in the second MessageCache::loadFromDatabase() ca...

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

Change subject: Set mCache in the second MessageCache::loadFromDatabase() caller
..


Set mCache in the second MessageCache::loadFromDatabase() caller

The member variable is needed in the next lines, which previously
just used the array with "LATEST" set and would be seen as invalid
and discarded next time.

Bug: T157033
Change-Id: I5b84b1ae4a9c7b710ee452c61d7d9d6076ec9e6a
---
M includes/cache/MessageCache.php
1 file changed, 2 insertions(+), 1 deletion(-)

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



diff --git a/includes/cache/MessageCache.php b/includes/cache/MessageCache.php
index 9bf0840..4facc20 100644
--- a/includes/cache/MessageCache.php
+++ b/includes/cache/MessageCache.php
@@ -584,7 +584,8 @@
return;
}
// Load the messages from the master DB to 
avoid race conditions
-   $this->loadFromDB( $code, self::FOR_UPDATE );
+   $cache = $this->loadFromDB( $code, 
self::FOR_UPDATE );
+   $this->mCache[$code] = $cache;
// Load the process cache values and set the 
per-title cache keys
$page = WikiPage::factory( Title::makeTitle( 
NS_MEDIAWIKI, $title ) );
$page->loadPageData( $page::READ_LATEST );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5b84b1ae4a9c7b710ee452c61d7d9d6076ec9e6a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.29.0-wmf.10
Gerrit-Owner: 20after4 
Gerrit-Reviewer: 20after4 
Gerrit-Reviewer: Aaron Schulz 
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]: Fix: swap yellow90 and yellow30

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

Change subject: Fix: swap yellow90 and yellow30
..


Fix: swap yellow90 and yellow30

Bug: T139187
Change-Id: Ic4729b9d67adf2534a39f78600b774a999b0ec8b
---
M app/src/main/res/values/colors.xml
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/app/src/main/res/values/colors.xml 
b/app/src/main/res/values/colors.xml
index 1ff64b4..c0260c4 100644
--- a/app/src/main/res/values/colors.xml
+++ b/app/src/main/res/values/colors.xml
@@ -24,9 +24,9 @@
 #d5fdf4 
 #00af89 
 #14866d 
-#ac6600 
+#fef6e7 
 #fc3 
-#fef6e7 
+#ac6600 
 
 
 @color/base10

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic4729b9d67adf2534a39f78600b774a999b0ec8b
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Niedzielski 
Gerrit-Reviewer: Brion VIBBER 
Gerrit-Reviewer: Dbrant 
Gerrit-Reviewer: Mholloway 
Gerrit-Reviewer: Sniedzielski 
Gerrit-Reviewer: jenkins-bot <>

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


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

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

Change subject: all wikis to 1.29.0-wmf.10
..


all wikis to 1.29.0-wmf.10

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

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



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

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

2017-02-02 Thread 20after4 (Code Review)
20after4 has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/335729 )

Change subject: all wikis to 1.29.0-wmf.10
..

all wikis to 1.29.0-wmf.10

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


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

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

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Set mCache in the second MessageCache::loadFromDatabase() ca...

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

Change subject: Set mCache in the second MessageCache::loadFromDatabase() caller
..


Set mCache in the second MessageCache::loadFromDatabase() caller

The member variable is needed in the next lines, which previously
just used the array with "LATEST" set and would be seen as invalid
and discarded next time.

Bug: T157033
Change-Id: I5b84b1ae4a9c7b710ee452c61d7d9d6076ec9e6a
---
M includes/cache/MessageCache.php
1 file changed, 2 insertions(+), 1 deletion(-)

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



diff --git a/includes/cache/MessageCache.php b/includes/cache/MessageCache.php
index 9bf0840..4facc20 100644
--- a/includes/cache/MessageCache.php
+++ b/includes/cache/MessageCache.php
@@ -584,7 +584,8 @@
return;
}
// Load the messages from the master DB to 
avoid race conditions
-   $this->loadFromDB( $code, self::FOR_UPDATE );
+   $cache = $this->loadFromDB( $code, 
self::FOR_UPDATE );
+   $this->mCache[$code] = $cache;
// Load the process cache values and set the 
per-title cache keys
$page = WikiPage::factory( Title::makeTitle( 
NS_MEDIAWIKI, $title ) );
$page->loadPageData( $page::READ_LATEST );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5b84b1ae4a9c7b710ee452c61d7d9d6076ec9e6a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz 
Gerrit-Reviewer: 20after4 
Gerrit-Reviewer: MaxSem 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...Wikibase[master]: [WIP] Add prefix search for labels

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

Change subject: [WIP] Add prefix search for labels
..

[WIP] Add prefix search for labels

Change-Id: I831220363bbe3e94ee3888134d3eb3d92d06a264
Bug: T125500
---
M repo/Wikibase.hooks.php
M repo/Wikibase.php
A repo/includes/Api/ElasticTermResult.php
A repo/includes/Api/EntityPrefixSearchProfiles.php
A repo/includes/Api/EntitySearchElastic.php
M repo/includes/Api/EntitySearchHelper.php
A repo/includes/Api/EntitySearcher.php
M repo/includes/Api/SearchEntities.php
A repo/includes/Api/WikibasePrefixSearcher.php
9 files changed, 480 insertions(+), 14 deletions(-)


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

diff --git a/repo/Wikibase.hooks.php b/repo/Wikibase.hooks.php
index fa9afde..a72d468 100644
--- a/repo/Wikibase.hooks.php
+++ b/repo/Wikibase.hooks.php
@@ -874,6 +874,16 @@
}
 
/**
+* Add Wikibase content models to model list.
+* @param string[] $models List of content models
+*/
+   public static function onGetContentModels( &$models ) {
+   $wikibaseRepo = WikibaseRepo::getDefaultInstance();
+   $models = array_merge( $models,
+   
$wikibaseRepo->getEntityContentFactory()->getEntityContentModels() );
+   }
+
+   /**
 * Adds a list of data value types, sparql endpoint and concept base 
URI to
 * the action=query&meta=siteinfo API.
 *
diff --git a/repo/Wikibase.php b/repo/Wikibase.php
index 86d97ce..373d603 100644
--- a/repo/Wikibase.php
+++ b/repo/Wikibase.php
@@ -76,7 +76,7 @@
global $wgExtensionMessagesFiles, $wgMessagesDirs;
global $wgAPIModules, $wgAPIListModules, $wgSpecialPages, $wgHooks;
global $wgWBRepoSettings, $wgResourceModules, $wgValueParsers, 
$wgJobClasses;
-   global $wgWBRepoDataTypes, $wgWBRepoEntityTypes;
+   global $wgWBRepoDataTypes, $wgWBRepoEntityTypes, 
$wgEntityPrefixSearchProfiles;
 
$wgExtensionCredits['wikibase'][] = array(
'path' => __DIR__,
@@ -207,17 +207,29 @@
'class' => Wikibase\Repo\Api\SearchEntities::class,
'factory' => function( ApiMain $mainModule, $moduleName ) {
$repo = 
Wikibase\Repo\WikibaseRepo::getDefaultInstance();
+   $useElastic = true;
 
-   $entitySearchHelper = new 
Wikibase\Repo\Api\EntitySearchHelper(
-   $repo->getEntityTitleLookup(),
-   $repo->getEntityIdParser(),
-   $repo->newTermSearchInteractor( 
$repo->getUserLanguage()->getCode() ),
-   new 
Wikibase\Lib\Store\LanguageFallbackLabelDescriptionLookup(
-   $repo->getTermLookup(),
-   $repo->getLanguageFallbackChainFactory()
-   ->newFromLanguage( 
$repo->getUserLanguage() )
-   )
-   );
+   if ( $useElastic ) {
+   $entitySearchHelper = new 
Wikibase\Repo\Api\EntitySearchElastic(
+   
$repo->getLanguageFallbackChainFactory(),
+   $repo->getEntityIdParser(),
+   new 
Wikibase\Lib\Store\LanguageFallbackLabelDescriptionLookup(
+   $repo->getTermLookup(),
+   
$repo->getLanguageFallbackChainFactory()->newFromLanguage( 
$repo->getUserLanguage() )
+   ),
+   $repo->getContentModelMappings()
+   );
+   } else {
+   $entitySearchHelper = new 
Wikibase\Repo\Api\EntitySearchHelper(
+   $repo->getEntityTitleLookup(),
+   $repo->getEntityIdParser(),
+   $repo->newTermSearchInteractor( 
$repo->getUserLanguage()->getCode() ),
+   new 
Wikibase\Lib\Store\LanguageFallbackLabelDescriptionLookup(
+   $repo->getTermLookup(),
+   
$repo->getLanguageFallbackChainFactory()->newFromLanguage( 
$repo->getUserLanguage() )
+   )
+   );
+   }
 
return new Wikibase\Repo\Api\SearchEntities(
$mainModule,
@@ -553,6 +565,7 @@
$wgHooks['ContentHandlerForModelID'][] = 
'Wikibase\RepoHooks::onContentHandlerForModelID';

[MediaWiki-commits] [Gerrit] mediawiki...CirrusSearch[master]: Allow subclasses to access $resultType

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

Change subject: Allow subclasses to access $resultType
..

Allow subclasses to access $resultType

Change-Id: I26dc56272d00154a5915953e326757f76ab7e6cf
---
M includes/Searcher.php
1 file changed, 5 insertions(+), 1 deletion(-)


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

diff --git a/includes/Searcher.php b/includes/Searcher.php
index 2348a5c..6e0951a 100644
--- a/includes/Searcher.php
+++ b/includes/Searcher.php
@@ -84,7 +84,7 @@
/**
 * @var ResultsType|null type of results.  null defaults to 
FullTextResultsType
 */
-   private $resultsType;
+   protected $resultsType;
/**
 * @var string sort type
 */
@@ -601,6 +601,10 @@
return $search;
}
 
+   /**
+* Perform a single-query search.
+* @return Status
+*/
protected function searchOne() {
$search = $this->buildSearch();
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I26dc56272d00154a5915953e326757f76ab7e6cf
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CirrusSearch
Gerrit-Branch: master
Gerrit-Owner: Smalyshev 

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


[MediaWiki-commits] [Gerrit] mediawiki...MobileFrontend[branding]: Follow up with Bmansurov.

2017-02-02 Thread GuerellaNuke23 (Code Review)
GuerellaNuke23 has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/335726 )

Change subject: Follow up with Bmansurov.
..

Follow up with Bmansurov.

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


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


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If87c8687d8d4a678b40e4af02a16a5ac638a2ead
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: branding
Gerrit-Owner: GuerellaNuke23 
<6a30bl+im1bijfoikfd56979qhb3jihlg0o6sfm8qtw5bpbe...@sharklasers.com>

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


[MediaWiki-commits] [Gerrit] oojs/ui[master]: Follow up w/ file paths.

2017-02-02 Thread GuerellaNuke23 (Code Review)
GuerellaNuke23 has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/335725 )

Change subject: Follow up w/ file paths.
..

Follow up w/ file paths.

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


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/25/335725/1


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iec6f232194256535df0103591d52308b1a38dac8
Gerrit-PatchSet: 1
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: GuerellaNuke23 
<6a30bl+im1bijfoikfd56979qhb3jihlg0o6sfm8qtw5bpbe...@sharklasers.com>
Gerrit-Reviewer: GuerellaNuke23 
<6a30bl+im1bijfoikfd56979qhb3jihlg0o6sfm8qtw5bpbe...@sharklasers.com>

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


[MediaWiki-commits] [Gerrit] oojs/ui[master]: Failure at https://integration.wikimedia.org/ci/job/oojs-ui-...

2017-02-02 Thread GuerellaNuke23 (Code Review)
GuerellaNuke23 has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/335724 )

Change subject: Failure at 
https://integration.wikimedia.org/ci/job/oojs-ui-npm-node-6-jessie/161/console
..

Failure at 
https://integration.wikimedia.org/ci/job/oojs-ui-npm-node-6-jessie/161/console

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


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/24/335724/1


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7228a409dea448360383e859c7f4061d7d8b3e41
Gerrit-PatchSet: 1
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: GuerellaNuke23 
<6a30bl+im1bijfoikfd56979qhb3jihlg0o6sfm8qtw5bpbe...@sharklasers.com>

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


[MediaWiki-commits] [Gerrit] mediawiki...Popups[mpga]: Redux and redux-thunk now packaged inside ext.popups

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

Change subject: Redux and redux-thunk now packaged inside ext.popups
..

Redux and redux-thunk now packaged inside ext.popups

Until this appears in core it makes sense to package it up as
part of ext.popups resource loader module

Bug: T156333
Change-Id: I33368ecc3c8e911d96f846669bcd831c182749f2
---
M build/ext.popups/index.js
M extension.json
M package.json
D resources/ext.popups.lib/redux-thunk/LICENSE.md
D resources/ext.popups.lib/redux-thunk/redux-thunk.js
D resources/ext.popups.lib/redux/LICENSE.md
D resources/ext.popups.lib/redux/redux.js
M resources/ext.popups/index.js
8 files changed, 1,255 insertions(+), 1,087 deletions(-)


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

diff --git a/build/ext.popups/index.js b/build/ext.popups/index.js
index 154e922..25f7326 100644
--- a/build/ext.popups/index.js
+++ b/build/ext.popups/index.js
@@ -155,4 +155,6 @@
 
// FIXME: Currently needs to be exposed for testing purposes
mw.popups = popups;
-}( mediaWiki, require( './popups' ), Redux, ReduxThunk ) );
+   window.Redux = Redux;
+   window.ReduxThunk = ReduxThunk;
+}( mediaWiki, require( './popups' ), require( 'redux' ), require( 
'redux-thunk' ) ) );
diff --git a/extension.json b/extension.json
index 7023d75..bbfed2b 100644
--- a/extension.json
+++ b/extension.json
@@ -110,14 +110,7 @@
"mediawiki.ui.button",
"mediawiki.ui.icon",
"mediawiki.Uri",
-   "jquery.hidpi",
-   "ext.popups.lib"
-   ]
-   },
-   "ext.popups.lib": {
-   "scripts": [
-   "resources/ext.popups.lib/redux/redux.js",
-   
"resources/ext.popups.lib/redux-thunk/redux-thunk.js"
+   "jquery.hidpi"
]
}
},
diff --git a/package.json b/package.json
index 338e19d..99bf9dc 100644
--- a/package.json
+++ b/package.json
@@ -15,6 +15,8 @@
 "grunt-eslint": "19.0.0",
 "grunt-jsonlint": "1.1.0",
 "grunt-stylelint": "^0.6.0",
+"redux": "^3.6.0",
+"redux-thunk": "^2.2.0",
 "stylelint-config-wikimedia": "0.3.0",
 "webpack": "^1.14.0"
   }
diff --git a/resources/ext.popups.lib/redux-thunk/LICENSE.md 
b/resources/ext.popups.lib/redux-thunk/LICENSE.md
deleted file mode 100644
index a904e43..000
--- a/resources/ext.popups.lib/redux-thunk/LICENSE.md
+++ /dev/null
@@ -1,20 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2015 Dan Abramov
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of
-this software and associated documentation files (the "Software"), to deal in
-the Software without restriction, including without limitation the rights to
-use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 
of
-the Software, and to permit persons to whom the Software is furnished to do so,
-subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 
FITNESS
-FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
-COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
-IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/resources/ext.popups.lib/redux-thunk/redux-thunk.js 
b/resources/ext.popups.lib/redux-thunk/redux-thunk.js
deleted file mode 100644
index a6945ae..000
--- a/resources/ext.popups.lib/redux-thunk/redux-thunk.js
+++ /dev/null
@@ -1,91 +0,0 @@
-(function webpackUniversalModuleDefinition(root, factory) {
-   if(typeof exports === 'object' && typeof module === 'object')
-   module.exports = factory();
-   else if(typeof define === 'function' && define.amd)
-   define([], factory);
-   else if(typeof exports === 'object')
-   exports["ReduxThunk"] = factory();
-   else
-   root["ReduxThunk"] = factory();
-})(this, function() {
-return /**/ (function(modules) { // webpackBootstrap
-/**/   // The module cache
-/**/   var installedModules = {};
-
-/**/   // The require function
-/**/   function __webpack_require__(moduleId) {
-
-/**/   // Check if module is in cache
-/**/   if(installedModules[moduleId])
-/**/   return installedModules[moduleId].ex

[MediaWiki-commits] [Gerrit] oojs/ui[master]: Following up.

2017-02-02 Thread GuerellaNuke23 (Code Review)
GuerellaNuke23 has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/335722 )

Change subject: Following up.
..

Following up.

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


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/22/335722/2


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibb6dbc40efbc0fc55a38dfeec4ef4da1a01a6aba
Gerrit-PatchSet: 2
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: GuerellaNuke23 
<6a30bl+im1bijfoikfd56979qhb3jihlg0o6sfm8qtw5bpbe...@sharklasers.com>

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


[MediaWiki-commits] [Gerrit] pywikibot/core[master]: Creating modified Wikibase, remerging post-patch.

2017-02-02 Thread GuerellaNuke23 (Code Review)
GuerellaNuke23 has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/335721 )

Change subject: Creating modified Wikibase, remerging post-patch.
..

Creating modified Wikibase, remerging post-patch.

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


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/21/335721/1


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic0bb60dc3f94767281ae914c0e8f93734091596c
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: GuerellaNuke23 
<6a30bl+im1bijfoikfd56979qhb3jihlg0o6sfm8qtw5bpbe...@sharklasers.com>

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


[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Update: page header subtitle leading

2017-02-02 Thread Niedzielski (Code Review)
Niedzielski has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/335719 )

Change subject: Update: page header subtitle leading
..

Update: page header subtitle leading

Reduce leading of page header subtitle text very slightly

Bug: T156677
Change-Id: If6fb7ad6ab1da82fa48ba9fe443fc54025d23937
---
M app/src/main/res/values-v23/dimens.xml
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/app/src/main/res/values-v23/dimens.xml 
b/app/src/main/res/values-v23/dimens.xml
index 5cc581e..9924f96 100644
--- a/app/src/main/res/values-v23/dimens.xml
+++ b/app/src/main/res/values-v23/dimens.xml
@@ -3,6 +3,6 @@
 
 1.05
-1.2
+1.17
 1.15
 
\ No newline at end of file

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If6fb7ad6ab1da82fa48ba9fe443fc54025d23937
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Niedzielski 
Gerrit-Reviewer: Sniedzielski 

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


[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Fix: swap yellow90 and yellow30

2017-02-02 Thread Niedzielski (Code Review)
Niedzielski has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/335718 )

Change subject: Fix: swap yellow90 and yellow30
..

Fix: swap yellow90 and yellow30

Bug: T139187
Change-Id: Ic4729b9d67adf2534a39f78600b774a999b0ec8b
---
M app/src/main/res/values/colors.xml
1 file changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/app/src/main/res/values/colors.xml 
b/app/src/main/res/values/colors.xml
index 1ff64b4..c0260c4 100644
--- a/app/src/main/res/values/colors.xml
+++ b/app/src/main/res/values/colors.xml
@@ -24,9 +24,9 @@
 #d5fdf4 
 #00af89 
 #14866d 
-#ac6600 
+#fef6e7 
 #fc3 
-#fef6e7 
+#ac6600 
 
 
 @color/base10

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic4729b9d67adf2534a39f78600b774a999b0ec8b
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Niedzielski 
Gerrit-Reviewer: Sniedzielski 

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


[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: add support for exact leading

2017-02-02 Thread Niedzielski (Code Review)
Niedzielski has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/335720 )

Change subject: add support for exact leading
..

add support for exact leading

Change-Id: I241adb3454087f1dc1148468474c4bebc852a067
---
D 
app/screenshots-ref/org.wikipedia.richtext.LeadingSpanTest.testLayoutDirection-480dp-en-ltr-font1.0x-light.png
D 
app/screenshots-ref/org.wikipedia.richtext.LeadingSpanTest.testLayoutDirection-480dp-en-rtl-font1.0x-light.png
D 
app/screenshots-ref/org.wikipedia.richtext.LeadingSpanTest.testLeading-320dp-en-ltr-font1.0x-light-1x_leading.png
D 
app/screenshots-ref/org.wikipedia.richtext.LeadingSpanTest.testLeading-320dp-en-ltr-font1.0x-light-2x_leading.png
D 
app/screenshots-ref/org.wikipedia.richtext.LeadingSpanTest.testLeading-320dp-en-ltr-font1.5x-light-1x_leading.png
D 
app/screenshots-ref/org.wikipedia.richtext.LeadingSpanTest.testLeading-320dp-en-ltr-font1.5x-light-2x_leading.png
D 
app/screenshots-ref/org.wikipedia.richtext.LeadingSpanTest.testLeading-480dp-en-ltr-font1.0x-light-1x_leading.png
D 
app/screenshots-ref/org.wikipedia.richtext.LeadingSpanTest.testLeading-480dp-en-ltr-font1.0x-light-2x_leading.png
D 
app/screenshots-ref/org.wikipedia.richtext.LeadingSpanTest.testLeading-480dp-en-ltr-font1.5x-light-1x_leading.png
D 
app/screenshots-ref/org.wikipedia.richtext.LeadingSpanTest.testLeading-480dp-en-ltr-font1.5x-light-2x_leading.png
D 
app/screenshots-ref/org.wikipedia.richtext.LeadingSpanTest.testWidth-320dp-en-ltr-font1.0x-light-long_text.png
D 
app/screenshots-ref/org.wikipedia.richtext.LeadingSpanTest.testWidth-320dp-en-ltr-font1.0x-light-null_text.png
D 
app/screenshots-ref/org.wikipedia.richtext.LeadingSpanTest.testWidth-320dp-en-ltr-font1.0x-light-short_text.png
D 
app/screenshots-ref/org.wikipedia.richtext.LeadingSpanTest.testWidth-320dp-en-ltr-font1.5x-light-long_text.png
D 
app/screenshots-ref/org.wikipedia.richtext.LeadingSpanTest.testWidth-320dp-en-ltr-font1.5x-light-null_text.png
D 
app/screenshots-ref/org.wikipedia.richtext.LeadingSpanTest.testWidth-320dp-en-ltr-font1.5x-light-short_text.png
D 
app/screenshots-ref/org.wikipedia.richtext.LeadingSpanTest.testWidth-480dp-en-ltr-font1.0x-light-long_text.png
D 
app/screenshots-ref/org.wikipedia.richtext.LeadingSpanTest.testWidth-480dp-en-ltr-font1.0x-light-null_text.png
D 
app/screenshots-ref/org.wikipedia.richtext.LeadingSpanTest.testWidth-480dp-en-ltr-font1.0x-light-short_text.png
D 
app/screenshots-ref/org.wikipedia.richtext.LeadingSpanTest.testWidth-480dp-en-ltr-font1.5x-light-long_text.png
D 
app/screenshots-ref/org.wikipedia.richtext.LeadingSpanTest.testWidth-480dp-en-ltr-font1.5x-light-null_text.png
D 
app/screenshots-ref/org.wikipedia.richtext.LeadingSpanTest.testWidth-480dp-en-ltr-font1.5x-light-short_text.png
M 
app/screenshots-ref/org.wikipedia.views.AppTextViewTest.testLayoutDirection-480dp-en-ltr-font1.0x-light.png
M 
app/screenshots-ref/org.wikipedia.views.AppTextViewTest.testLayoutDirection-480dp-en-rtl-font1.0x-light.png
A 
app/screenshots-ref/org.wikipedia.views.AppTextViewTest.testLeading-320dp-en-ltr-font1.0x-light--1.0_leading.png
A 
app/screenshots-ref/org.wikipedia.views.AppTextViewTest.testLeading-320dp-en-ltr-font1.0x-light-0.0_leading.png
A 
app/screenshots-ref/org.wikipedia.views.AppTextViewTest.testLeading-320dp-en-ltr-font1.0x-light-10.0_leading.png
A 
app/screenshots-ref/org.wikipedia.views.AppTextViewTest.testLeading-320dp-en-ltr-font1.0x-light-100.0_leading.png
A 
app/screenshots-ref/org.wikipedia.views.AppTextViewTest.testLeading-320dp-en-ltr-font1.0x-light-20.0_leading.png
A 
app/screenshots-ref/org.wikipedia.views.AppTextViewTest.testLeading-320dp-en-ltr-font1.0x-light-50.0_leading.png
D 
app/screenshots-ref/org.wikipedia.views.AppTextViewTest.testLeading-320dp-en-ltr-font1.0x-light.png
A 
app/screenshots-ref/org.wikipedia.views.AppTextViewTest.testLeading-320dp-en-ltr-font1.5x-light--1.0_leading.png
A 
app/screenshots-ref/org.wikipedia.views.AppTextViewTest.testLeading-320dp-en-ltr-font1.5x-light-0.0_leading.png
A 
app/screenshots-ref/org.wikipedia.views.AppTextViewTest.testLeading-320dp-en-ltr-font1.5x-light-10.0_leading.png
A 
app/screenshots-ref/org.wikipedia.views.AppTextViewTest.testLeading-320dp-en-ltr-font1.5x-light-100.0_leading.png
A 
app/screenshots-ref/org.wikipedia.views.AppTextViewTest.testLeading-320dp-en-ltr-font1.5x-light-20.0_leading.png
A 
app/screenshots-ref/org.wikipedia.views.AppTextViewTest.testLeading-320dp-en-ltr-font1.5x-light-50.0_leading.png
D 
app/screenshots-ref/org.wikipedia.views.AppTextViewTest.testLeading-320dp-en-ltr-font1.5x-light.png
A 
app/screenshots-ref/org.wikipedia.views.AppTextViewTest.testLeading-480dp-en-ltr-font1.0x-light--1.0_leading.png
A 
app/screenshots-ref/org.wikipedia.views.AppTextViewTest.testLeading-480dp-en-ltr-font1.0x-light-0.0_leading.png
A 
app/screenshots-ref/org.wikipedia.views.AppTextViewTest.testLeading-480dp-en-ltr-font1.0x-light-10.0_leading.

[MediaWiki-commits] [Gerrit] operations/puppet[production]: Up post_max_size to 50M in phabricator's php.ini file

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

Change subject: Up post_max_size to 50M in phabricator's php.ini file
..

Up post_max_size to 50M in phabricator's php.ini file

I am getting warnings like this in phabricator

PHP post_max_size Not Configured
Set post_max_size in your PHP configuration to at least 32MB to support large 
file uploads.

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


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


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

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

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


[MediaWiki-commits] [Gerrit] wikipedia[refs/meta/config]: Resolving rights expiry feature.

2017-02-02 Thread GuerellaNuke23 (Code Review)
GuerellaNuke23 has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/335716 )

Change subject: Resolving rights expiry feature.
..

Resolving rights expiry feature.

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


  git pull ssh://gerrit.wikimedia.org:29418/wikipedia refs/changes/16/335716/1


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8b1fab07df4ff80ee508f73f8a29b0939381998d
Gerrit-PatchSet: 1
Gerrit-Project: wikipedia
Gerrit-Branch: refs/meta/config
Gerrit-Owner: GuerellaNuke23 
<6a30bl+im1bijfoikfd56979qhb3jihlg0o6sfm8qtw5bpbe...@sharklasers.com>

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


[MediaWiki-commits] [Gerrit] pywikibot/core[master]: +1

2017-02-02 Thread GuerellaNuke23 (Code Review)
GuerellaNuke23 has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/335715 )

Change subject: +1
..

+1

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


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/15/335715/1


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7da1b7b2ae74f140d439b6bdb0465befd2bb0400
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: GuerellaNuke23 
<6a30bl+im1bijfoikfd56979qhb3jihlg0o6sfm8qtw5bpbe...@sharklasers.com>

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Up max_execution to 20 from 10 in phabricator/php.ini.erb

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

Change subject: Up max_execution to 20 from 10 in phabricator/php.ini.erb
..

Up max_execution to 20 from 10 in phabricator/php.ini.erb

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


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/14/335714/1


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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: admin: Re-apply jforrester ssh key

2017-02-02 Thread RobH (Code Review)
RobH has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/335705 )

Change subject: admin: Re-apply jforrester ssh key
..


admin: Re-apply jforrester ssh key

This reverts commit 2b87787472fde6f41a4561cbf45423b49bb600ce.

Change-Id: I1e8adffb295998c3392fca156a60c60c28d42fb9
---
M modules/admin/data/data.yaml
1 file changed, 2 insertions(+), 1 deletion(-)

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



diff --git a/modules/admin/data/data.yaml b/modules/admin/data/data.yaml
index 6405668..fbd 100644
--- a/modules/admin/data/data.yaml
+++ b/modules/admin/data/data.yaml
@@ -1346,7 +1346,8 @@
 gid: 500
 name: jforrester
 realname: James D. Forrester
-ssh_keys: []
+ssh_keys: [ssh-rsa 
B3NzaC1yc2EDAQABAAABAQCsgEkgi7ceiRLCeBABExyA1qiFS7t0Lxs+vQndqRTukAooT16araiKSudavjr78qUAXeerSvuNm2dlQR2Bv6DZLumwPi2mFZA52LhlCm5Bj8GKSpwc9lVVWrrtjwCb8Qv+cZXquhvxMj3L0prfeMbXzkpbOBVK8J5bVIRSewVBsammz5nzd6myqeL0Z1BXiX6ihKeIjSyyiy6REWuIO5cBt3IJn6o/9IKei+Fm2UbXKegRFyOPPjXOiTItLG7iR0DI3PNT+FFAqjMXQKzQMbm8Lj0/hQIq8ViyA6xai6VDPtnFsmvKi+z8q6jZP/Omvf+5TKF5evttguYF9SrbmUrb
+jforres...@wikimedia.org]
 uid: 2417
 email: jforres...@wikimedia.org
   jmorgan:

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1e8adffb295998c3392fca156a60c60c28d42fb9
Gerrit-PatchSet: 4
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Jforrester 
Gerrit-Reviewer: Alex Monk 
Gerrit-Reviewer: Filippo Giunchedi 
Gerrit-Reviewer: RobH 
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[mpga]: Remove unused code in repo

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

Change subject: Remove unused code in repo
..

Remove unused code in repo

The existence of these files was causing me much confusion as I thought
they were still being used in the mpga branch.

If this is note the case they should be removed to make the repo easier
to understand.

Changes:
* Move the ext.popups.animation.less into ext.popups since that's where
its shipped.
* Remove files which are not being used.

Change-Id: Iae0a78d0b8a13353de70794b67387f2c3bab44c6
---
M extension.json
D resources/ext.popups.core/ext.popups.core.js
D resources/ext.popups.schemaPopups.utils/ext.popups.schemaPopups.utils.js
D resources/ext.popups.schemaPopups/ext.popups.schemaPopups.js
R resources/ext.popups/styles/ext.popups.animation.less
D tests/qunit/ext.popups.core.test.js
D tests/qunit/ext.popups.desktopRenderer.test.js
D tests/qunit/ext.popups.renderer.article.test.js
D tests/qunit/ext.popups.schemaPopups.utils.test.js
9 files changed, 1 insertion(+), 1,134 deletions(-)


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

diff --git a/extension.json b/extension.json
index e9ec449..c59442c 100644
--- a/extension.json
+++ b/extension.json
@@ -112,7 +112,7 @@
},
"styles": [

"resources/ext.popups/styles/ext.popups.core.less",
-   
"resources/ext.popups.desktop/ext.popups.animation.less",
+   
"resources/ext.popups/styles/ext.popups.animation.less",

"resources/ext.popups/styles/ext.popups.settings.less"
],
"messages": [
diff --git a/resources/ext.popups.core/ext.popups.core.js 
b/resources/ext.popups.core/ext.popups.core.js
deleted file mode 100644
index bc4fe65..000
--- a/resources/ext.popups.core/ext.popups.core.js
+++ /dev/null
@@ -1,134 +0,0 @@
-( function ( $, mw ) {
-   'use strict';
-   var previewCountStorageKey = 'ext.popups.core.previewCount',
-   popupsEnabledStorageKey = 'mwe-popups-enabled';
-
-   /**
-* @class mw.popups
-* @singleton
-*/
-   mw.popups = {};
-
-   /**
-* The API object used for all this extension's requests
-* @property {Object} api
-*/
-   mw.popups.api = new mw.Api();
-
-   /**
-* Whether the page is being scrolled.
-* @property {boolean} scrolled
-*/
-   mw.popups.scrolled = false;
-
-   /**
-* Temporarily remove the title attribute of a link so that
-* the tooltip doesn't show up alongside the Hovercard.
-*
-* @method removeTooltip
-* @param {jQuery.Object} $link link from which to strip title
-*/
-   mw.popups.removeTooltip = function ( $link ) {
-   // We shouldn't empty the title attribute of links that
-   // can't have Hovercards, ie. TextExtracts didn't return
-   // anything. It's set in the article.init after attempting
-   // to make an API request.
-   if (
-   $link.data( 'dont-empty-title' ) !== true &&
-   $link.filter( '[title]:not([title=""])' ).length
-   ) {
-   $link
-   .data( 'title', $link.attr( 'title' ) )
-   .attr( 'title', '' );
-   }
-   };
-
-   /**
-* Restore previously-removed title attribute.
-*
-* @method restoreTooltip
-* @param {jQuery.Object} $link link to which to restore title
-*/
-   mw.popups.restoreTooltip = function ( $link ) {
-   $link.attr( 'title', $link.data( 'title' ) );
-   };
-
-   /**
-* Register a hover event that may render a popup on an appropriate 
link.
-*
-* @method setupTriggers
-* @param {jQuery.Object} $elements to bind events to
-* @param {string} events to bind to
-*/
-   mw.popups.setupTriggers = function ( $elements, events ) {
-   $elements.on( events, function ( event ) {
-   if ( mw.popups.scrolled ) {
-   return;
-   }
-
-   mw.popups.render.render( $( this ), event, 
mw.popups.getRandomToken() );
-   } );
-   };
-
-   /**
-* Get action based on click event
-*
-* @method getAction
-* @param {Object} event
-* @return {string}
-*/
-   mw.popups.getAction = function ( event ) {
-   if ( event.which === 2 ) { // middle click
-   return 'opened in new tab';
-   } else if ( event.which === 1 ) {
-

[MediaWiki-commits] [Gerrit] integration/config[master]: Revert "[tools-manifest] add non voting debian-glue"

2017-02-02 Thread GuerellaNuke23 (Code Review)
Hello Paladox, Hashar, jenkins-bot,

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

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

to review the following change.


Change subject: Revert "[tools-manifest] add non voting debian-glue"
..

Revert "[tools-manifest] add non voting debian-glue"

This reverts commit 880f50d4f609a65f7015a5caa84a613ca36e3ea9.

Change-Id: I2ff64cd7a356381fdfabfb8d6f099be5271b69b9
---
M zuul/layout.yaml
1 file changed, 0 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/12/335712/1

diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index 1bc1524..56c3c98 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -2508,8 +2508,6 @@
   - name: operations/software/tools-manifest
 template:
   - name: tox-jessie
-test:
-  - debian-glue-non-voting
 
   - name: operations/software/tools-webservice
 template:

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2ff64cd7a356381fdfabfb8d6f099be5271b69b9
Gerrit-PatchSet: 1
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: GuerellaNuke23 
<6a30bl+im1bijfoikfd56979qhb3jihlg0o6sfm8qtw5bpbe...@sharklasers.com>
Gerrit-Reviewer: Hashar 
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...JsonConfig[master]: WIP: Support redirects

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

Change subject: WIP: Support redirects
..

WIP: Support redirects

Bug: T153598
Change-Id: I8797c87d852d413400a0325e4b52d857c3cf16fd
---
M includes/JCContent.php
M includes/JCContentHandler.php
M includes/JCObjContent.php
M includes/JCValidators.php
M tests/phpunit/JCTabularContentTest.php
A tests/phpunit/tabular-bad/broken-redirect.json
A tests/phpunit/tabular-bad/broken-redirect2.json
A tests/phpunit/tabular-good/09.json
8 files changed, 115 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/JsonConfig 
refs/changes/11/335711/1

diff --git a/includes/JCContent.php b/includes/JCContent.php
index e52c3a4..3a38031 100644
--- a/includes/JCContent.php
+++ b/includes/JCContent.php
@@ -2,6 +2,7 @@
 
 namespace JsonConfig;
 
+use Article;
 use FormatJson;
 use ParserOptions;
 use ParserOutput;
@@ -108,7 +109,54 @@
 * @return mixed
 */
public function validate( $data ) {
+   $this->validateRedirect( $data );
return $data;
+   }
+
+   /**
+* @inheritdoc
+*/
+   public function getRedirectTarget() {
+   return $this->parseRedirect( $this->getData() );
+   }
+
+   /**
+* Validates a blob for being a valid redirect
+* If it contains something resembling a redirect but it's invalid, 
error will be added to status
+*
+* @param mixed $data
+* @return bool Whether a redirect was found, no matter valid or not
+*/
+   protected function validateRedirect( $data ) {
+   if ( !is_object( $data ) || !property_exists( $data, 
'$redirect' ) ) {
+   return false;
+   }
+   $title = $this->parseRedirect( $data );
+
+   if ( !$title ) {
+   $this->getStatus()->error( 
'jsonconfig-err-bad-redirect', '$redirect' );
+   }
+
+   return true;
+   }
+
+   /**
+* Parses data for redirect target
+*
+* @param mixed $data
+* @return Title|null
+*/
+   private function parseRedirect( $data ) {
+   if ( !is_object( $data )
+|| !property_exists( $data, '$redirect' )
+|| !is_string( $data->{'$redirect'} )
+   ) {
+   return null;
+   }
+
+   $title = Title::newFromText( $data->{'$redirect'} );
+
+   return $title;
}
 
/**
@@ -154,21 +202,25 @@
return;
}
 
+   $lang = $options->getUserLangObj();
+
$status = $this->getStatus();
+   $html = '';
if ( !$status->isGood() ) {
// Use user's language, and split parser cache.  This 
should not have a big
// impact because data namespace is rarely viewed, but 
viewing it localized
// will be valuable
-   $lang = $options->getUserLangObj();
-   $html = $status->getHTML( false, false, $lang );
-   } else {
-   $html = '';
+   $html .= $status->getHTML( false, false, $lang );
}
 
if ( $status->isOK() ) {
-   $html .= $this
-   ->getView( $this->getModel() )
-   ->valueToHtml( $this, $title, $revId, $options, 
$generateHtml, $output );
+   $target = $this->getRedirectTarget();
+   if ( $target ) {
+   $html .= Article::getRedirectHeaderHtml( $lang, 
$target );
+   } else {
+   $html .= $this->getView( $this->getModel() )
+   ->valueToHtml( $this, $title, $revId, 
$options, $generateHtml, $output );
+   }
}
 
$output->setText( $html );
diff --git a/includes/JCContentHandler.php b/includes/JCContentHandler.php
index 5e92e7d..3a800ca 100644
--- a/includes/JCContentHandler.php
+++ b/includes/JCContentHandler.php
@@ -4,6 +4,7 @@
 
 use FormatJson;
 use TextContentHandler;
+use Title;
 
 /**
  * JSON Json Config content handler
@@ -29,6 +30,24 @@
}
 
/**
+* @inheritdoc
+*/
+   public function supportsRedirects() {
+   return true;
+   }
+
+   /**
+* @inheritdoc
+*/
+   public function makeRedirectContent( Title $destination, $text = '' ) {
+   $data = [ '$redirect' => $destination->getPrefixedText() ];
+
+   $text = FormatJson::encode( $data, true, FormatJson::ALL_OK );
+
+   return $this->unser

[MediaWiki-commits] [Gerrit] mediawiki...timeline[master]: Insert the description of the change.

2017-02-02 Thread GuerellaNuke23 (Code Review)
GuerellaNuke23 has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/335710 )

Change subject: Insert the description of the change.
..

Insert the description of the change.

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


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/timeline 
refs/changes/10/335710/1


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I829a60ff79bedf82ac6f7184884b63446065128b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/timeline
Gerrit-Branch: master
Gerrit-Owner: GuerellaNuke23 
<6a30bl+im1bijfoikfd56979qhb3jihlg0o6sfm8qtw5bpbe...@sharklasers.com>

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


[MediaWiki-commits] [Gerrit] mediawiki...timeline[master]: Revert "Extract hash mecanism to a standalone method"

2017-02-02 Thread GuerellaNuke23 (Code Review)
Hello Thcipriani, Reedy, Hashar, MaxSem, jenkins-bot,

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

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

to review the following change.


Change subject: Revert "Extract hash mecanism to a standalone method"
..

Revert "Extract hash mecanism to a standalone method"

This reverts commit bbd2c5017a3b87b001ae16e9aa9ebfffa71d65fe.

Hash still gives an error, invalid...

Change-Id: If3c32084052a2feddbb64038cca7bb906f1a410e
---
M Timeline.body.php
D tests/phpunit/Timeline_hash_Test.php
2 files changed, 8 insertions(+), 71 deletions(-)


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

diff --git a/Timeline.body.php b/Timeline.body.php
index a69a744..8cc9519 100644
--- a/Timeline.body.php
+++ b/Timeline.body.php
@@ -14,15 +14,6 @@
}
 
/**
-* Render timeline and save to file backend
-*
-* Files are saved to the file backend $wgTimelineFileBackend if set. 
Else
-* default to FSFileBackend named 'timeline-backend'.
-*
-* The rendered timeline is saved in the file backend using @see hash() 
and
-* will be reused if the hash match. You can invalidate the cache by
-* setting the global variable $wgRenderHashAppend (default: '').
-*
 * @param $timelinesrc string
 * @param $args array
 * @param Parser $parser
@@ -31,7 +22,7 @@
 * @return string HTML
 */
public static function renderTimeline( $timelinesrc, array $args, 
$parser, $frame ) {
-   global $wgUploadDirectory, $wgUploadPath, $wgArticlePath, 
$wgTmpDirectory;
+   global $wgUploadDirectory, $wgUploadPath, $wgArticlePath, 
$wgTmpDirectory, $wgRenderHashAppend;
global $wgTimelineFileBackend, $wgTimelineEpochTimestamp, 
$wgTimelinePerlCommand, $wgTimelineFile;
global $wgTimelineFontFile, $wgTimelinePloticusCommand;
 
@@ -57,7 +48,13 @@
);
}
 
-   $hash = self::hash( $timelinesrc, $args );
+   // Get a hash of the plot data.
+   // $args must be checked, because the same source text may be 
used with
+   // with different args.
+   $hash = md5( $timelinesrc . implode( '', $args ) );
+   if ( $wgRenderHashAppend != '' ) {
+   $hash = md5( $hash . $wgRenderHashAppend );
+   }
 
// Storage destination path (excluding file extension)
$fname = 'mwstore://' . $backend->getName() . 
"/timeline-render/$hash";
@@ -203,31 +200,6 @@
}
 
return $txt;
-   }
-
-   /**
-* Generate a hash of the plot data
-*
-* $args must be checked, because the same source text may be used with
-* different arguments.
-*
-* Uses global $wgRenderHashAppend to salt / vary the hash. Will 
invalidate
-* the cache as a side effect though old files will be left in the file
-* backend.
-*
-* @param $timelinesrc string
-* @param $args array
-* @return string hash
-*/
-   public static function hash( $timelinesrc, array $args ) {
-   global $wgRenderHashAppend;
-
-   $hash = md5( $timelinesrc . implode( '', $args ) );
-   if ( $wgRenderHashAppend != '' ) {
-   $hash = md5( $hash . $wgRenderHashAppend );
-   }
-
-   return $hash;
}
 
/**
diff --git a/tests/phpunit/Timeline_hash_Test.php 
b/tests/phpunit/Timeline_hash_Test.php
deleted file mode 100644
index 1f7c7c4..000
--- a/tests/phpunit/Timeline_hash_Test.php
+++ /dev/null
@@ -1,35 +0,0 @@
-setMwGlobals( 'wgRenderHashAppend', $hashAppend );
-
-   $this->assertEquals(
-   $expected,
-   Timeline::hash( $timelinesrc, $args )
-   );
-   }
-
-   public static function provideHashCases() {
-   $NO_APPEND = '';
-
-   return [
-   'no arguments' => [
-   md5( 'hello' ), 'hello', [], $NO_APPEND ],
-   'no arguments and $wgRenderHashAppend' => [
-   md5( md5( 'hello' ) . 'World' ), 'hello', [], 
'World' ],
-   'with two arguments' => [
-   md5( 'helloarg1arg2' ), 'hello',
-   [ 'arg1', 'arg2' ], $NO_APPEND
-   ],
-   'with two arguments and $wgRenderHashAppend' => [
-   md5( md5( 'helloarg1arg2' ) . 'World' ), 
'hello',
-   [ 'arg1', 'arg2' ], 'World'
-   ],
-   ];
-   }
-
-}

-- 
To view, visit https://gerrit

[MediaWiki-commits] [Gerrit] mediawiki...timeline[master]: Extract hash mecanism to a standalone method

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

Change subject: Extract hash mecanism to a standalone method
..


Extract hash mecanism to a standalone method

The hashing mecanism and cache invalidation via $wgTimelineFileBackend
is self contained. Move it to a new public method Timeline::hash().

Add tests for all cases.
Slightly document renderTimeline() while at it.

Bug: T138036
Change-Id: Ic8cb4e448323cf741eac0efd7e903e352c1a67d8
---
M Timeline.body.php
A tests/phpunit/Timeline_hash_Test.php
2 files changed, 71 insertions(+), 8 deletions(-)

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



diff --git a/Timeline.body.php b/Timeline.body.php
index 8cc9519..a69a744 100644
--- a/Timeline.body.php
+++ b/Timeline.body.php
@@ -14,6 +14,15 @@
}
 
/**
+* Render timeline and save to file backend
+*
+* Files are saved to the file backend $wgTimelineFileBackend if set. 
Else
+* default to FSFileBackend named 'timeline-backend'.
+*
+* The rendered timeline is saved in the file backend using @see hash() 
and
+* will be reused if the hash match. You can invalidate the cache by
+* setting the global variable $wgRenderHashAppend (default: '').
+*
 * @param $timelinesrc string
 * @param $args array
 * @param Parser $parser
@@ -22,7 +31,7 @@
 * @return string HTML
 */
public static function renderTimeline( $timelinesrc, array $args, 
$parser, $frame ) {
-   global $wgUploadDirectory, $wgUploadPath, $wgArticlePath, 
$wgTmpDirectory, $wgRenderHashAppend;
+   global $wgUploadDirectory, $wgUploadPath, $wgArticlePath, 
$wgTmpDirectory;
global $wgTimelineFileBackend, $wgTimelineEpochTimestamp, 
$wgTimelinePerlCommand, $wgTimelineFile;
global $wgTimelineFontFile, $wgTimelinePloticusCommand;
 
@@ -48,13 +57,7 @@
);
}
 
-   // Get a hash of the plot data.
-   // $args must be checked, because the same source text may be 
used with
-   // with different args.
-   $hash = md5( $timelinesrc . implode( '', $args ) );
-   if ( $wgRenderHashAppend != '' ) {
-   $hash = md5( $hash . $wgRenderHashAppend );
-   }
+   $hash = self::hash( $timelinesrc, $args );
 
// Storage destination path (excluding file extension)
$fname = 'mwstore://' . $backend->getName() . 
"/timeline-render/$hash";
@@ -203,6 +206,31 @@
}
 
/**
+* Generate a hash of the plot data
+*
+* $args must be checked, because the same source text may be used with
+* different arguments.
+*
+* Uses global $wgRenderHashAppend to salt / vary the hash. Will 
invalidate
+* the cache as a side effect though old files will be left in the file
+* backend.
+*
+* @param $timelinesrc string
+* @param $args array
+* @return string hash
+*/
+   public static function hash( $timelinesrc, array $args ) {
+   global $wgRenderHashAppend;
+
+   $hash = md5( $timelinesrc . implode( '', $args ) );
+   if ( $wgRenderHashAppend != '' ) {
+   $hash = md5( $hash . $wgRenderHashAppend );
+   }
+
+   return $hash;
+   }
+
+   /**
 * Do a security check on the image map HTML
 * @param $html string
 * @return string HTML
diff --git a/tests/phpunit/Timeline_hash_Test.php 
b/tests/phpunit/Timeline_hash_Test.php
new file mode 100644
index 000..1f7c7c4
--- /dev/null
+++ b/tests/phpunit/Timeline_hash_Test.php
@@ -0,0 +1,35 @@
+setMwGlobals( 'wgRenderHashAppend', $hashAppend );
+
+   $this->assertEquals(
+   $expected,
+   Timeline::hash( $timelinesrc, $args )
+   );
+   }
+
+   public static function provideHashCases() {
+   $NO_APPEND = '';
+
+   return [
+   'no arguments' => [
+   md5( 'hello' ), 'hello', [], $NO_APPEND ],
+   'no arguments and $wgRenderHashAppend' => [
+   md5( md5( 'hello' ) . 'World' ), 'hello', [], 
'World' ],
+   'with two arguments' => [
+   md5( 'helloarg1arg2' ), 'hello',
+   [ 'arg1', 'arg2' ], $NO_APPEND
+   ],
+   'with two arguments and $wgRenderHashAppend' => [
+   md5( md5( 'helloarg1arg2' ) . 'World' ), 
'hello',
+   [ 'arg1', 'arg2' ], 'World'
+   ],
+

[MediaWiki-commits] [Gerrit] mediawiki/core[wmf/1.29.0-wmf.10]: Set mCache in the second MessageCache::loadFromDatabase() ca...

2017-02-02 Thread 20after4 (Code Review)
20after4 has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/335708 )

Change subject: Set mCache in the second MessageCache::loadFromDatabase() caller
..

Set mCache in the second MessageCache::loadFromDatabase() caller

The member variable is needed in the next lines, which previously
just used the array with "LATEST" set and would be seen as invalid
and discarded next time.

Bug: T157033
Change-Id: I5b84b1ae4a9c7b710ee452c61d7d9d6076ec9e6a
---
M includes/cache/MessageCache.php
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/08/335708/1

diff --git a/includes/cache/MessageCache.php b/includes/cache/MessageCache.php
index 9bf0840..4facc20 100644
--- a/includes/cache/MessageCache.php
+++ b/includes/cache/MessageCache.php
@@ -584,7 +584,8 @@
return;
}
// Load the messages from the master DB to 
avoid race conditions
-   $this->loadFromDB( $code, self::FOR_UPDATE );
+   $cache = $this->loadFromDB( $code, 
self::FOR_UPDATE );
+   $this->mCache[$code] = $cache;
// Load the process cache values and set the 
per-title cache keys
$page = WikiPage::factory( Title::makeTitle( 
NS_MEDIAWIKI, $title ) );
$page->loadPageData( $page::READ_LATEST );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5b84b1ae4a9c7b710ee452c61d7d9d6076ec9e6a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.29.0-wmf.10
Gerrit-Owner: 20after4 
Gerrit-Reviewer: Aaron Schulz 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Set mCache in the second MessageCache::loadFromDatabase() ca...

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

Change subject: Set mCache in the second MessageCache::loadFromDatabase() caller
..

Set mCache in the second MessageCache::loadFromDatabase() caller

The member variable is needed in the next lines, which previously
just used the array with "LATEST" set and would be seen as invalid
and discarded next time.

Bug: T157033
Change-Id: I5b84b1ae4a9c7b710ee452c61d7d9d6076ec9e6a
---
M includes/cache/MessageCache.php
1 file changed, 2 insertions(+), 1 deletion(-)


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

diff --git a/includes/cache/MessageCache.php b/includes/cache/MessageCache.php
index 9bf0840..4facc20 100644
--- a/includes/cache/MessageCache.php
+++ b/includes/cache/MessageCache.php
@@ -584,7 +584,8 @@
return;
}
// Load the messages from the master DB to 
avoid race conditions
-   $this->loadFromDB( $code, self::FOR_UPDATE );
+   $cache = $this->loadFromDB( $code, 
self::FOR_UPDATE );
+   $this->mCache[$code] = $cache;
// Load the process cache values and set the 
per-title cache keys
$page = WikiPage::factory( Title::makeTitle( 
NS_MEDIAWIKI, $title ) );
$page->loadPageData( $page::READ_LATEST );

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...MobileFrontend[branding]: Convey beta mode through site branding

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

Change subject: Convey beta mode through site branding
..

Convey beta mode through site branding

Bug: T152526
Change-Id: Iba2ed4cf19f483aa91eba927e93b7ab95faa012c
---
M extension.json
M includes/skins/MinervaTemplate.php
M includes/skins/SkinMinerva.php
M includes/skins/minerva.mustache
A resources/skins.minerva.icons.images.beta/beta.svg
5 files changed, 24 insertions(+), 0 deletions(-)


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

diff --git a/extension.json b/extension.json
index a32cfa7..d79b540 100644
--- a/extension.json
+++ b/extension.json
@@ -195,6 +195,13 @@
"arrow": 
"resources/skins.minerva.icons.images.variants/arrow.svg"
}
},
+   "skins.minerva.icons.images.beta": {
+   "class": "ResourceLoaderImageModule",
+   "selector": ".mw-ui-icon-{name}:before",
+   "images": {
+   "beta": 
"resources/skins.minerva.icons.images.beta/beta.svg"
+   }
+   },
"mobile.overlay.images": {
"selectorWithoutVariant": ".mw-ui-icon-{name}:before",
"selectorWithVariant": 
".mw-ui-icon-{name}-{variant}:before",
diff --git a/includes/skins/MinervaTemplate.php 
b/includes/skins/MinervaTemplate.php
index c713c5d..18f5ed0 100644
--- a/includes/skins/MinervaTemplate.php
+++ b/includes/skins/MinervaTemplate.php
@@ -284,6 +284,8 @@
'headelement' => $data[ 'headelement' ],
'menuButton' => $data['menuButton'],
'headinghtml' => $data['footer-site-heading-html'],
+   'betaIconClass' => MobileUI::iconClass( 'beta' ),
+   'isBetaGroupMember' => $data['isBetaGroupMember'],
'searchButton' => Html::rawElement( 'a', [
'href' => SpecialPage::getTitleFor( 'Search' 
)->getLocalURL(),
'id' => 'searchIcon',
diff --git a/includes/skins/SkinMinerva.php b/includes/skins/SkinMinerva.php
index e2097c5..c50ab13 100644
--- a/includes/skins/SkinMinerva.php
+++ b/includes/skins/SkinMinerva.php
@@ -92,6 +92,8 @@
// Set the links for page secondary actions
$tpl->set( 'secondary_actions', $this->getSecondaryActions( 
$tpl ) );
 
+   $tpl->set( 'isBetaGroupMember', 
$this->mobileContext->isBetaGroupMember() );
+
// Construct various Minerva-specific interface elements
$this->preparePageContent( $tpl );
$this->prepareHeaderAndFooter( $tpl );
@@ -1324,6 +1326,9 @@
if ( $this->isFooterV2() ) {
$styles[] = 'skins.minerva.footerV2.styles';
}
+   if ( $this->mobileContext->isBetaGroupMember() ) {
+   $styles[] = 'skins.minerva.icons.images.beta';
+   }
 
return $styles;
}
diff --git a/includes/skins/minerva.mustache b/includes/skins/minerva.mustache
index 9ec03a0..dcdf4c6 100644
--- a/includes/skins/minerva.mustache
+++ b/includes/skins/minerva.mustache
@@ -14,6 +14,9 @@


{{{headinghtml}}}
+   {{#isBetaGroupMember}}
+   
+   {{/isBetaGroupMember}}



diff --git a/resources/skins.minerva.icons.images.beta/beta.svg 
b/resources/skins.minerva.icons.images.beta/beta.svg
new file mode 100644
index 000..aeff8e1
--- /dev/null
+++ b/resources/skins.minerva.icons.images.beta/beta.svg
@@ -0,0 +1,7 @@
+
+http://www.w3.org/2000/svg"; 
xmlns:xlink="http://www.w3.org/1999/xlink";>
+
+
+
+
+

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iba2ed4cf19f483aa91eba927e93b7ab95faa012c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: branding
Gerrit-Owner: Bmansurov 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: admin: Re-apply jforrester ssh key

2017-02-02 Thread Jforrester (Code Review)
Hello Alex Monk, jenkins-bot, Filippo Giunchedi,

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

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

to review the following change.


Change subject: admin: Re-apply jforrester ssh key
..

admin: Re-apply jforrester ssh key

This reverts commit 2b87787472fde6f41a4561cbf45423b49bb600ce.

Change-Id: I1e8adffb295998c3392fca156a60c60c28d42fb9
---
M modules/admin/data/data.yaml
1 file changed, 3 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/05/335705/1

diff --git a/modules/admin/data/data.yaml b/modules/admin/data/data.yaml
index 7d4ef8d..156f41a 100644
--- a/modules/admin/data/data.yaml
+++ b/modules/admin/data/data.yaml
@@ -1265,7 +1265,8 @@
 gid: 500
 name: jforrester
 realname: James D. Forrester
-ssh_keys: []
+ssh_keys: [ssh-rsa 
B3NzaC1yc2EDAQABAAABAQCsgEkgi7ceiRLCeBABExyA1qiFS7t0Lxs+vQndqRTukAooT16araiKSudavjr78qUAXeerSvuNm2dlQR2Bv6DZLumwPi2mFZA52LhlCm5Bj8GKSpwc9lVVWrrtjwCb8Qv+cZXquhvxMj3L0prfeMbXzkpbOBVK8J5bVIRSewVBsammz5nzd6myqeL0Z1BXiX6ihKeIjSyyiy6REWuIO5cBt3IJn6o/9IKei+Fm2UbXKegRFyOPPjXOiTItLG7iR0DI3PNT+FFAqjMXQKzQMbm8Lj0/hQIq8ViyA6xai6VDPtnFsmvKi+z8q6jZP/Omvf+5TKF5evttguYF9SrbmUrb
+jforres...@wikimedia.org]
 uid: 2417
   jmorgan:
 ensure: present
@@ -2186,4 +2187,4 @@
 realname: Matanya Moses
 ssh_keys:
   - ssh-rsa 
B3NzaC1yc2EDAQABAAABAQDaREf06EZa5CoRLc7sUNqZqDJVIKIxaxpsMsiG98QixtEEGQLw6W0CCwRwls+NVunzERumXJsKaAPBX5ptn5wH4ZXMfrD1y9CWqQFYkImKI4BJjCCef7xo+PwdHGf694WD+MBzuNXWzhTUUAnFKYDTvs5WEqdeXYBH4cFNVPQzG5noy7+E6g/7jBXZFVhT91OUofMvEAsOL5eIzT1nmYZex0vOPsRN8+gH0nGc0XaQ8nRWGu+n4gAHnecCJUOAILvNcFC/JF0QzmD/58vbkiJVhhAkXBVTNzxsmWCk0q6r2cIoAjfiMbS0u4tNQezz2DcJQLO5HrHwmi5Q/SbvUKtT
 matanya@arch
-uid: 2497
+uid: 2497
\ No newline at end of file

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1e8adffb295998c3392fca156a60c60c28d42fb9
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Jforrester 
Gerrit-Reviewer: Alex Monk 
Gerrit-Reviewer: Filippo Giunchedi 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Allow us to change elasticsearch configs in phabricator

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

Change subject: Allow us to change elasticsearch configs in phabricator
..

Allow us to change elasticsearch configs in phabricator

Currently they are hardcoded but on labs we need to change the settings.

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


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/03/335703/1


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

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

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Enable wgEnableWANCacheReaper in beta labs

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

Change subject: Enable wgEnableWANCacheReaper in beta labs
..

Enable wgEnableWANCacheReaper in beta labs

Change-Id: I83661f976c4cd8e1261f593466fa6dd123fa29e1
---
M wmf-config/mc-labs.php
1 file changed, 3 insertions(+), 0 deletions(-)


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

diff --git a/wmf-config/mc-labs.php b/wmf-config/mc-labs.php
index 8ef819e..b1157d6 100644
--- a/wmf-config/mc-labs.php
+++ b/wmf-config/mc-labs.php
@@ -28,4 +28,7 @@
'loggroup' => 'memcached',
 ];
 
+# Confirm page related key purges via scanning recent changes
+$wgEnableWANCacheReaper = true;
+
 } # end safe guard

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I83661f976c4cd8e1261f593466fa6dd123fa29e1
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz 

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


[MediaWiki-commits] [Gerrit] mediawiki...Cargo[master]: Possible improvement of quote-handling in full-text search

2017-02-02 Thread Yaron Koren (Code Review)
Yaron Koren has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/335701 )

Change subject: Possible improvement of quote-handling in full-text search
..


Possible improvement of quote-handling in full-text search

Change-Id: Ic3f200bd96089e4d6af949a5a44e4f1bc1128fa1
---
M CargoQueryDisplayer.php
1 file changed, 9 insertions(+), 1 deletion(-)

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



diff --git a/CargoQueryDisplayer.php b/CargoQueryDisplayer.php
index a871da7..6a4da18 100644
--- a/CargoQueryDisplayer.php
+++ b/CargoQueryDisplayer.php
@@ -268,7 +268,15 @@
foreach ( $terms as $i => $term ) {
// Try to map from a MySQL search to a PHP one -
// this code could probably be improved.
-   $term = str_replace( array( '"' /*, "'"*/, '+', '*' ), 
'', $term );
+   $term = str_replace( array( '+', '*' ), '', $term );
+   // Get rid of quote marks, but only if they're at the
+   // beginning and end of the string.
+   $firstChars = substr( $term, 0, 3 );
+   $lastChars = substr( $term, -3 );
+   if ( ( $firstChars == '\b"' && $lastChars == '"\b' ) || 
( $firstChars == "\b'" && $lastChars == "'\b" ) ) {
+   $term = '\b' . substr( $term, 3, -3 ) . '\b';
+   }
+   // What is the point of this...?
if ( strpos( $term, '*' ) !== false ) {
$term = '\b' . $term . '\b';
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic3f200bd96089e4d6af949a5a44e4f1bc1128fa1
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Cargo
Gerrit-Branch: master
Gerrit-Owner: Yaron Koren 
Gerrit-Reviewer: Yaron Koren 
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...Cargo[master]: Possible improvement of quote-handling in full-text search

2017-02-02 Thread Yaron Koren (Code Review)
Yaron Koren has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/335701 )

Change subject: Possible improvement of quote-handling in full-text search
..

Possible improvement of quote-handling in full-text search

Change-Id: Ic3f200bd96089e4d6af949a5a44e4f1bc1128fa1
---
M CargoQueryDisplayer.php
1 file changed, 9 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Cargo 
refs/changes/01/335701/2

diff --git a/CargoQueryDisplayer.php b/CargoQueryDisplayer.php
index a871da7..6a4da18 100644
--- a/CargoQueryDisplayer.php
+++ b/CargoQueryDisplayer.php
@@ -268,7 +268,15 @@
foreach ( $terms as $i => $term ) {
// Try to map from a MySQL search to a PHP one -
// this code could probably be improved.
-   $term = str_replace( array( '"' /*, "'"*/, '+', '*' ), 
'', $term );
+   $term = str_replace( array( '+', '*' ), '', $term );
+   // Get rid of quote marks, but only if they're at the
+   // beginning and end of the string.
+   $firstChars = substr( $term, 0, 3 );
+   $lastChars = substr( $term, -3 );
+   if ( ( $firstChars == '\b"' && $lastChars == '"\b' ) || 
( $firstChars == "\b'" && $lastChars == "'\b" ) ) {
+   $term = '\b' . substr( $term, 3, -3 ) . '\b';
+   }
+   // What is the point of this...?
if ( strpos( $term, '*' ) !== false ) {
$term = '\b' . $term . '\b';
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic3f200bd96089e4d6af949a5a44e4f1bc1128fa1
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Cargo
Gerrit-Branch: master
Gerrit-Owner: Yaron Koren 
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]: rcfeed: FormattedRCFeed constructor should match parent class

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

Change subject: rcfeed: FormattedRCFeed constructor should match parent class
..


rcfeed: FormattedRCFeed constructor should match parent class

I intentionally made the constructor parameter optional in the
new RCFeed class from 39a6e3dc4d84, however it was not optional
in the subclass, which the older classes are now based on top
of.

Bug: T156996
Change-Id: I05b9e15920bc39f27c402b023d1463cfbdd2efb8
---
M includes/rcfeed/FormattedRCFeed.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/includes/rcfeed/FormattedRCFeed.php 
b/includes/rcfeed/FormattedRCFeed.php
index d841681..48a9f94 100644
--- a/includes/rcfeed/FormattedRCFeed.php
+++ b/includes/rcfeed/FormattedRCFeed.php
@@ -32,7 +32,7 @@
 *  - 'formatter'
 * @see $wgRCFeeds
 */
-   public function __construct( array $params ) {
+   public function __construct( array $params = [] ) {
$this->params = $params;
}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I05b9e15920bc39f27c402b023d1463cfbdd2efb8
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Krinkle 
Gerrit-Reviewer: Aaron Schulz 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Nikerabbit 
Gerrit-Reviewer: Ottomata 
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...parsoid[master]: Only don't consider ext tags as void elements when tokenizing

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

Change subject: Only don't consider ext tags as void elements when tokenizing
..

Only don't consider ext tags as void elements when tokenizing

 * If we're sending these tokens to the dom though, that's another
   matter.

 * Otherwise, when emitting s with  children, they're
   considered autoinserted start/end, and stripped from them dom.

Change-Id: Ibac0311f56b7986e2eff0740a3e4c5b6861d2626
---
M lib/config/WikitextConstants.js
M lib/wt2html/pegTokenizer.pegjs
M lib/wt2html/tokenizer.utils.js
3 files changed, 11 insertions(+), 10 deletions(-)


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

diff --git a/lib/config/WikitextConstants.js b/lib/config/WikitextConstants.js
index b39a872..bdae1ac 100644
--- a/lib/config/WikitextConstants.js
+++ b/lib/config/WikitextConstants.js
@@ -231,13 +231,9 @@
]),
 
// See 
http://www.whatwg.org/specs/web-apps/current-work/#void-elements
-   //
-   // We are currently treating  as an extension tag since 
this is widely
-   // used on wikipedias.  So, we dont want to treat this as a 
HTML tag => it cannot
-   // be a void element
VoidTags: new Set([
'AREA', 'BASE', 'BR', 'COL', 'COMMAND', 'EMBED', 'HR', 
'IMG',
-   'INPUT', 'KEYGEN', 'LINK', 'META', 'PARAM', /* 
'SOURCE', */
+   'INPUT', 'KEYGEN', 'LINK', 'META', 'PARAM', 'SOURCE',
'TRACK', 'WBR',
]),
},
diff --git a/lib/wt2html/pegTokenizer.pegjs b/lib/wt2html/pegTokenizer.pegjs
index ca741b8..7a70103 100644
--- a/lib/wt2html/pegTokenizer.pegjs
+++ b/lib/wt2html/pegTokenizer.pegjs
@@ -1248,7 +1248,11 @@
 stops.pop('extTag');
 
 var lcName = name.toLowerCase();
-var isVoidElt = Util.isVoidElement(lcName) ? true : null;
+
+// Extension tags don't necessarily have the same semantics as html 
tags,
+// so don't treat them as void elements.
+var isVoidElt = Util.isVoidElement(lcName) && 
!env.conf.wiki.extensionTags.has(lcName);
+
 // Support 
 var broken = false;
 if (lcName === 'br' && end) {
@@ -1256,14 +1260,15 @@
 end = null;
 }
 
-var res = tu.buildXMLTag(name, lcName, attribs, end, selfclose || 
isVoidElt, tsrOffsets());
+var res = tu.buildXMLTag(name, lcName, attribs, end, !!selfclose || 
isVoidElt, tsrOffsets());
 
 // change up data-attribs in one scenario
 // void-elts that aren't self-closed ==> useful for accurate RT-ing
-if (selfclose === null && isVoidElt) {
+if (!selfclose && isVoidElt) {
 res.dataAttribs.selfClose = undefined;
 res.dataAttribs.noClose = true;
 }
+
 if (broken || bad_ws.length > 0) {
 res.dataAttribs.brokenHTMLTag = true;
 }
@@ -1298,7 +1303,7 @@
   stops.pop('table');
   stops.pop('tableCellArg');
   stops.pop('extTag');
-  var t = tu.buildXMLTag(name, name.toLowerCase(), attribs, end, 
selfclose, tsrOffsets());
+  var t = tu.buildXMLTag(name, name.toLowerCase(), attribs, end, 
!!selfclose, tsrOffsets());
   return [maybeExtensionTag(t)];
 }
 / "<" "/"? tag_name & { return stops.pop('extTag'); }
diff --git a/lib/wt2html/tokenizer.utils.js b/lib/wt2html/tokenizer.utils.js
index 514ae78..b72a59a 100644
--- a/lib/wt2html/tokenizer.utils.js
+++ b/lib/wt2html/tokenizer.utils.js
@@ -149,7 +149,7 @@
 
if (endTag !== null) {
tok = new EndTagTk(lcName, attribs, da);
-   } else if (selfClose !== null) {
+   } else if (selfClose) {
da.selfClose = true;
tok = new SelfclosingTagTk(lcName, attribs, da);
} else {

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

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

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


[MediaWiki-commits] [Gerrit] operations/dns[master]: fixing my dns typo

2017-02-02 Thread RobH (Code Review)
RobH has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/335700 )

Change subject: fixing my dns typo
..


fixing my dns typo

i set the forward entry improperly for gerrit2001.wikimedia.org

Bug:T152525
Change-Id: I6939a6215d7b42880a03730b65ac6fd7b3b580ee
---
M templates/wikimedia.org
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/templates/wikimedia.org b/templates/wikimedia.org
index 2713627..c6449f8 100644
--- a/templates/wikimedia.org
+++ b/templates/wikimedia.org
@@ -129,7 +129,7 @@
 frdata-eqiad  1H  IN A208.80.155.10
 frdev-eqiad   1H  IN A208.80.155.13
 fundraising-eqiad 1H  IN A208.80.155.14
-gerrit2001  1H  IN A201.80.153.106
+gerrit2001  1H  IN A208.80.153.106
 hydrogen1H  IN A208.80.154.50
 1H  IN  2620:0:861:1:208:80:154:50
 install1001 1H  IN A208.80.154.83

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6939a6215d7b42880a03730b65ac6fd7b3b580ee
Gerrit-PatchSet: 1
Gerrit-Project: operations/dns
Gerrit-Branch: master
Gerrit-Owner: RobH 
Gerrit-Reviewer: RobH 
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/dns[master]: fixing my dns typo

2017-02-02 Thread RobH (Code Review)
RobH has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/335700 )

Change subject: fixing my dns typo
..

fixing my dns typo

i set the forward entry improperly for gerrit2001.wikimedia.org

Bug:T152525
Change-Id: I6939a6215d7b42880a03730b65ac6fd7b3b580ee
---
M templates/wikimedia.org
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/dns 
refs/changes/00/335700/1

diff --git a/templates/wikimedia.org b/templates/wikimedia.org
index 2713627..c6449f8 100644
--- a/templates/wikimedia.org
+++ b/templates/wikimedia.org
@@ -129,7 +129,7 @@
 frdata-eqiad  1H  IN A208.80.155.10
 frdev-eqiad   1H  IN A208.80.155.13
 fundraising-eqiad 1H  IN A208.80.155.14
-gerrit2001  1H  IN A201.80.153.106
+gerrit2001  1H  IN A208.80.153.106
 hydrogen1H  IN A208.80.154.50
 1H  IN  2620:0:861:1:208:80:154:50
 install1001 1H  IN A208.80.154.83

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6939a6215d7b42880a03730b65ac6fd7b3b580ee
Gerrit-PatchSet: 1
Gerrit-Project: operations/dns
Gerrit-Branch: master
Gerrit-Owner: RobH 

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


[MediaWiki-commits] [Gerrit] mediawiki...MobileFrontend[master]: Hygiene: Merge footer v2 style module into default style module

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

Change subject: Hygiene: Merge footer v2 style module into default style module
..

Hygiene: Merge footer v2 style module into default style module

Note there are no caching issues with this change.
Although a cached HTML will request a url which refers to this module
this will print a problematic modules inline style at the top of the page
but still render the same.

Bug: T157075
Change-Id: I65de70de1f88d3746f835a2578423ab517264738
---
M extension.json
R resources/skins.minerva.base.styles/footer.less
2 files changed, 1 insertion(+), 10 deletions(-)


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

diff --git a/extension.json b/extension.json
index 1376641..125e193 100644
--- a/extension.json
+++ b/extension.json
@@ -119,6 +119,7 @@

"resources/skins.minerva.base.styles/common.less",

"resources/skins.minerva.base.styles/icons.less",

"resources/skins.minerva.base.styles/images.less",
+   
"resources/skins.minerva.base.styles/footer.less",
"resources/skins.minerva.base.styles/print.less"
]
},
@@ -244,16 +245,6 @@
"user": 
"resources/skins.minerva.icons.images.scripts/userNormal.svg",
"anonymous": 
"resources/skins.minerva.icons.images.scripts/userAnonymous.svg"
}
-   },
-   "skins.minerva.footerV2.styles": {
-   "targets": [
-   "mobile",
-   "desktop"
-   ],
-   "position": "top",
-   "styles": [
-   
"resources/skins.minerva.footerV2.styles/common.less"
-   ]
},
"skins.minerva.mainPage.styles": {
"targets": [
diff --git a/resources/skins.minerva.footerV2.styles/common.less 
b/resources/skins.minerva.base.styles/footer.less
similarity index 100%
rename from resources/skins.minerva.footerV2.styles/common.less
rename to resources/skins.minerva.base.styles/footer.less

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: bootstrap_vz and vmbuilder: Do apt-get update before first ...

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

Change subject: bootstrap_vz and vmbuilder:  Do apt-get update before first 
puppet run
..


bootstrap_vz and vmbuilder:  Do apt-get update before first puppet run

I'm not sure if this is necessary, but our first puppet run is complaining
about not being able to find packages, even though they look like
they should be available from the outset.

Change-Id: I5055ea55e243d5f8c75e7d67740fca14438f712f
---
M modules/labs_bootstrapvz/files/firstboot.sh
M modules/labs_vmbuilder/files/firstboot.sh
2 files changed, 2 insertions(+), 0 deletions(-)

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



diff --git a/modules/labs_bootstrapvz/files/firstboot.sh 
b/modules/labs_bootstrapvz/files/firstboot.sh
index 1cd5550..3eee822 100644
--- a/modules/labs_bootstrapvz/files/firstboot.sh
+++ b/modules/labs_bootstrapvz/files/firstboot.sh
@@ -169,6 +169,7 @@
 # Run puppet, twice.  The second time is just to pick up packages
 #  that may have been unavailable in apt before the first puppet run
 #  updated sources.list
+apt-get update
 puppet agent --onetime --verbose --no-daemonize --no-splay --show_diff 
--waitforcert=10 --certname=${fqdn} --server=${master}
 apt-get update
 puppet agent -t
diff --git a/modules/labs_vmbuilder/files/firstboot.sh 
b/modules/labs_vmbuilder/files/firstboot.sh
index de4b823..5165934 100644
--- a/modules/labs_vmbuilder/files/firstboot.sh
+++ b/modules/labs_vmbuilder/files/firstboot.sh
@@ -118,6 +118,7 @@
 # Run puppet, twice.  The second time is just to pick up packages
 #  that may have been unavailable in apt before the first puppet run
 #  updated sources.list
+apt-get update
 puppet agent --onetime --verbose --no-daemonize --no-splay --show_diff 
--waitforcert=10 --certname=${fqdn} --server=${master}
 apt-get update
 

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

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

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


  1   2   3   >