[MediaWiki-commits] [Gerrit] Correct the entity escaping and restore parsoid data attribute - change (mediawiki...cxserver)

2014-03-25 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Correct the entity escaping and restore parsoid data attribute
..


Correct the entity escaping and restore parsoid data attribute

Change-Id: I98acc13222de73832d6607c057fe67f82160a3bd
---
D mt/providers/ROT13.js
M mt/providers/Rot13.js
M segmentation/languages/CXParser.js
3 files changed, 6 insertions(+), 33 deletions(-)

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



diff --git a/mt/providers/ROT13.js b/mt/providers/ROT13.js
deleted file mode 100644
index 4bba13c..000
--- a/mt/providers/ROT13.js
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Content Translation Machine Translation Interface.
- *
- */
-
-'use strict';
-
-/**
- * @class ROT13Service
- */
-function ROT13Service(config) {
-   this.config = config;
-}
-
-ROT13Service.prototype.translate = function ( sourceLang, targetLang, 
sourceText /*, onSuccess, onError */ ) {
-   return sourceText.replace(/[a-zA-Z]/g, function (c) {
-   return String.fromCharCode( (c <= 'Z' ? 90 : 122) >= (c = 
c.charCodeAt(0) + 13)
-   ? c
-   : c - 26);
-   } );
-};
-
-module.exports = {
-   'ROT13Service': ROT13Service
-};
\ No newline at end of file
diff --git a/mt/providers/Rot13.js b/mt/providers/Rot13.js
index e84998e..ab5ec70 100644
--- a/mt/providers/Rot13.js
+++ b/mt/providers/Rot13.js
@@ -54,7 +54,9 @@
 * Entity handler
 */
function entity( str ) {
-   return str.replace( '"', '"' );
+   return str.replace( /["'&<>]/g, function ( ch ) {
+   return '&#' + ch.charCodeAt( 0 ) + ';';
+   } );
}
 
parser.onopentag = function ( tag ) {
diff --git a/segmentation/languages/CXParser.js 
b/segmentation/languages/CXParser.js
index a4b445a..5481450 100644
--- a/segmentation/languages/CXParser.js
+++ b/segmentation/languages/CXParser.js
@@ -68,7 +68,9 @@
  * Entity handler
  */
 function entity( str ) {
-   return str.replace( '"', '"' );
+   return str.replace( /["'&<>]/g, function ( ch ) {
+   return '&#' + ch.charCodeAt( 0 ) + ';';
+   } );
 }
 
 /**
@@ -166,12 +168,6 @@
}
 
for ( attrName in tag.attributes ) {
-   if ( attrName === 'data-parsoid' || attrName === 'data-mw' ) {
-   // Parsoid gives the html with these attributes and has
-   // values as big escaped htmls. The parser has trouble 
in
-   // not leaking it to the text. So ignore these 
attributes.
-   continue;
-   }
this.print( ' ' + attrName + '="' + entity( tag.attributes[ 
attrName ] ) + '"' );
}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I98acc13222de73832d6607c057fe67f82160a3bd
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/services/cxserver
Gerrit-Branch: master
Gerrit-Owner: Santhosh 
Gerrit-Reviewer: Divec 
Gerrit-Reviewer: KartikMistry 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Segmentation: Handle all section types - change (mediawiki...cxserver)

2014-03-25 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Segmentation: Handle all section types
..


Segmentation: Handle all section types

Borrowed the definition of section types from VE.
Made all tests passing

Change-Id: If1124892ae8ac3a5477e228c061fb51ddf0b442f
---
M segmentation/languages/CXParser.js
M tests/segmentation/SegmentationTests.js
M tests/segmentation/SegmentationTests.json
3 files changed, 33 insertions(+), 11 deletions(-)

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



diff --git a/segmentation/languages/CXParser.js 
b/segmentation/languages/CXParser.js
index 60ca0a3..a4b445a 100644
--- a/segmentation/languages/CXParser.js
+++ b/segmentation/languages/CXParser.js
@@ -24,6 +24,21 @@
this.links = {};
 };
 
+CXParser.prototype.sectionTypes = [
+   'div', 'p',
+   // tables
+   'table', 'tbody', 'thead', 'tfoot', 'caption', 'th', 'tr', 'td',
+   // lists
+   'ul', 'ol', 'li', 'dl', 'dt', 'dd',
+   // HTML5 heading content
+   'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'hgroup',
+   // HTML5 sectioning content
+   'article', 'aside', 'body', 'nav', 'section', 'footer', 'header', 
'figure',
+   'figcaption', 'fieldset', 'details', 'blockquote',
+   // other
+   'hr', 'button', 'canvas', 'center', 'col', 'colgroup', 'embed',
+   'map', 'object', 'pre', 'progress', 'video'
+ ];
 /**
  * Error handler
  */
@@ -91,8 +106,8 @@
 
replacement = prevWord + sentenceSeperator;
//console.log([match, prevWord, sentenceSeperator, offset]);
-   nextLetter = sentence[offset + match.length];
-   if ( prevWord && prevWord.length < 3 && 
prevWord[0].toUpperCase() === prevWord[0] ||
+   nextLetter = sentence[ offset + match.length ];
+   if ( prevWord && prevWord.length < 3 && prevWord[ 0 
].toUpperCase() === prevWord[ 0 ] ||
nextLetter && nextLetter.toLowerCase() === nextLetter ) 
{
// abbreviation?
return replacement;
@@ -118,7 +133,7 @@
if ( !this.inSentence ) {
this.print( this.startSentence() );
}
-   this.links[this.segmentCount] = {
+   this.links[ this.segmentCount ] = {
href: href
};
this.print( ' class="cx-link" data-linkid="' + ( this.segmentCount++ ) 
+ '"' );
@@ -130,8 +145,14 @@
  */
 CXParser.prototype.onopentag = function ( tag ) {
var attrName,
-   section = /[ph1-6]|figure|ul|div/;
+   section = /[ph1-6]|figure|figcaption|ul|div/;
 
+   if ( this.sectionTypes.indexOf( tag.name ) >= 0 ) {
+   if ( this.inSentence ) {
+   // Avoid dangling sentence.
+   this.print( this.endSentence() );
+   }
+   }
if ( tag.name === 'a' && !this.inSentence ) {
// sentences starting with a link
this.print( this.startSentence() );
@@ -151,7 +172,7 @@
// not leaking it to the text. So ignore these 
attributes.
continue;
}
-   this.print( ' ' + attrName + '="' + entity( 
tag.attributes[attrName] ) + '"' );
+   this.print( ' ' + attrName + '="' + entity( tag.attributes[ 
attrName ] ) + '"' );
}
 
// Sections
@@ -175,8 +196,7 @@
  * @param {string} tag
  */
 CXParser.prototype.onclosetag = function ( tag ) {
-   var section = /[ph1-6]|figure|ul|div/;
-   if ( tag.match( section ) ) {
+   if ( this.sectionTypes.indexOf( tag ) >= 0 ) {
if ( this.inSentence ) {
// Avoid dangling sentence.
this.print( this.endSentence() );
diff --git a/tests/segmentation/SegmentationTests.js 
b/tests/segmentation/SegmentationTests.js
index f695bc9..51fba68 100644
--- a/tests/segmentation/SegmentationTests.js
+++ b/tests/segmentation/SegmentationTests.js
@@ -5,15 +5,17 @@
tests = require( './SegmentationTests.json' );
 
 for ( var lang in tests ) {
-   var languageTests = tests[lang];
+   var languageTests = tests[ lang ];
for ( var i in languageTests ) {
-   var test = languageTests[i],
+   var test = languageTests[ i ],
segmenter;
segmenter = new CXSegmenter( test.source, lang );
segmenter.segment();
var result = segmenter.getSegmentedContent();
result = result.replace( /(\r\n|\n|\t|\r)/gm, '' );
-   console.log( test.result + '\n' + result );
+   console.log( 'Test' + ': ' + test.source );
+   console.log( 'Expected' + ': ' + test.result );
+   console.log( 'Actual' + ': ' + result );
assert.equal( test.result, result );
}
 }

[MediaWiki-commits] [Gerrit] Segmentation: Add test for figure tags - change (mediawiki...cxserver)

2014-03-25 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Segmentation: Add test for figure tags
..


Segmentation: Add test for figure tags

Change-Id: I109c13613d8927bdd7b9346e5d20110e51220816
---
M tests/segmentation/SegmentationTests.json
1 file changed, 4 insertions(+), 0 deletions(-)

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



diff --git a/tests/segmentation/SegmentationTests.json 
b/tests/segmentation/SegmentationTests.json
index 23cc2df..a65b30a 100644
--- a/tests/segmentation/SegmentationTests.json
+++ b/tests/segmentation/SegmentationTests.json
@@ -27,6 +27,10 @@
{
"source": "Hydrogen is a gas",
"result": "Hydrogen is a gas"
+   },
+   {
+   "source": "Figure caption",
+   "result": "Figure 
caption"
}
],
"hi": [

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I109c13613d8927bdd7b9346e5d20110e51220816
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/cxserver
Gerrit-Branch: master
Gerrit-Owner: Santhosh 
Gerrit-Reviewer: KartikMistry 
Gerrit-Reviewer: Nikerabbit 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] system role for nova compute nodes - change (operations/puppet)

2014-03-25 Thread ArielGlenn (Code Review)
ArielGlenn has submitted this change and it was merged.

Change subject: system role for nova compute nodes
..


system role for nova compute nodes

Change-Id: I9e284ad6750ce1437377a482cf169cbaa3f7e41e
---
M manifests/role/nova.pp
1 file changed, 5 insertions(+), 0 deletions(-)

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



diff --git a/manifests/role/nova.pp b/manifests/role/nova.pp
index 7e72f88..97ee37e 100644
--- a/manifests/role/nova.pp
+++ b/manifests/role/nova.pp
@@ -420,6 +420,11 @@
include role::nova::wikiupdates,
role::nova::common
 
+system::role { 'role::nova::compute':
+ensure  => 'present',
+description => 'openstack nova compute node',
+}
+
 # Neutron roles configure their own interfaces.
if ( $use_neutron == false ) {
interface::tagged { $novaconfig["network_flat_interface"]:

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

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

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


[MediaWiki-commits] [Gerrit] system role for nova compute nodes - change (operations/puppet)

2014-03-25 Thread ArielGlenn (Code Review)
ArielGlenn has uploaded a new change for review.

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

Change subject: system role for nova compute nodes
..

system role for nova compute nodes

Change-Id: I9e284ad6750ce1437377a482cf169cbaa3f7e41e
---
M manifests/role/nova.pp
1 file changed, 5 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/94/120994/1

diff --git a/manifests/role/nova.pp b/manifests/role/nova.pp
index 7e72f88..97ee37e 100644
--- a/manifests/role/nova.pp
+++ b/manifests/role/nova.pp
@@ -420,6 +420,11 @@
include role::nova::wikiupdates,
role::nova::common
 
+system::role { 'role::nova::compute':
+ensure  => 'present',
+description => 'openstack nova compute node',
+}
+
 # Neutron roles configure their own interfaces.
if ( $use_neutron == false ) {
interface::tagged { $novaconfig["network_flat_interface"]:

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

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

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


[MediaWiki-commits] [Gerrit] system role for the osm dbs - change (operations/puppet)

2014-03-25 Thread ArielGlenn (Code Review)
ArielGlenn has submitted this change and it was merged.

Change subject: system role for the osm dbs
..


system role for the osm dbs

Change-Id: I3af0c39b1f59e80f8b8c82e44eae29a83c4fcdfb
---
M manifests/role/osm.pp
1 file changed, 10 insertions(+), 0 deletions(-)

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



diff --git a/manifests/role/osm.pp b/manifests/role/osm.pp
index bbdacdd..22ee20f 100644
--- a/manifests/role/osm.pp
+++ b/manifests/role/osm.pp
@@ -30,6 +30,11 @@
 includes => 'tuning.conf'
 }
 
+system::role { 'role::osm::master':
+ensure  => 'present',
+description => 'openstreetmaps db master',
+}
+
 postgresql::spatialdb { 'gis': }
 osm::populatedb { 'gis':
 input_pbf_file => '/srv/labsdb/planet-latest-osm.pbf',
@@ -81,6 +86,11 @@
 # have the same dbs as the master.
 #postgresql::spatialdb { 'gis': }
 
+system::role { 'role::osm::slave':
+ensure  => 'present',
+description => 'openstreetmaps db slave',
+}
+
 class {'postgresql::slave':
 master_server=> $osm_master,
 replication_pass => $passwords::osm::replication_pass,

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

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

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


[MediaWiki-commits] [Gerrit] Include group/user blocks for testing tarballs in place of debs - change (operations/puppet)

2014-03-25 Thread Springle (Code Review)
Springle has submitted this change and it was merged.

Change subject: Include group/user blocks for testing tarballs in place of debs
..


Include group/user blocks for testing tarballs in place of debs

Change-Id: Id81ccce6c5de89d7eeeb0730a1e8fc321c73
---
M modules/mariadb/manifests/config.pp
1 file changed, 15 insertions(+), 0 deletions(-)

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



diff --git a/modules/mariadb/manifests/config.pp 
b/modules/mariadb/manifests/config.pp
index 062be25..6c0b827 100644
--- a/modules/mariadb/manifests/config.pp
+++ b/modules/mariadb/manifests/config.pp
@@ -32,6 +32,21 @@
 target => '/etc/my.cnf',
 }
 
+# Include these manually. If we're testing on systems with tarballs
+# instead of debs, the user won't exist.
+group { 'mysql':
+ensure => present,
+}
+
+user { 'mysql':
+ensure => present,
+gid=> 'mysql',
+shell  => '/bin/false',
+home   => '/nonexistent',
+system => true,
+managehome => false,
+}
+
 file { "$datadir":
 ensure  => directory,
 owner   => 'mysql',

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

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

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


[MediaWiki-commits] [Gerrit] system role for the osm dbs - change (operations/puppet)

2014-03-25 Thread ArielGlenn (Code Review)
ArielGlenn has uploaded a new change for review.

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

Change subject: system role for the osm dbs
..

system role for the osm dbs

Change-Id: I3af0c39b1f59e80f8b8c82e44eae29a83c4fcdfb
---
M manifests/role/osm.pp
1 file changed, 10 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/93/120993/1

diff --git a/manifests/role/osm.pp b/manifests/role/osm.pp
index bbdacdd..22ee20f 100644
--- a/manifests/role/osm.pp
+++ b/manifests/role/osm.pp
@@ -30,6 +30,11 @@
 includes => 'tuning.conf'
 }
 
+system::role { 'role::osm::master':
+ensure  => 'present',
+description => 'openstreetmaps db master',
+}
+
 postgresql::spatialdb { 'gis': }
 osm::populatedb { 'gis':
 input_pbf_file => '/srv/labsdb/planet-latest-osm.pbf',
@@ -81,6 +86,11 @@
 # have the same dbs as the master.
 #postgresql::spatialdb { 'gis': }
 
+system::role { 'role::osm::slave':
+ensure  => 'present',
+description => 'openstreetmaps db slave',
+}
+
 class {'postgresql::slave':
 master_server=> $osm_master,
 replication_pass => $passwords::osm::replication_pass,

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

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

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


[MediaWiki-commits] [Gerrit] Include group/user blocks for testing tarballs in place of debs - change (operations/puppet)

2014-03-25 Thread Springle (Code Review)
Springle has uploaded a new change for review.

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

Change subject: Include group/user blocks for testing tarballs in place of debs
..

Include group/user blocks for testing tarballs in place of debs

Change-Id: Id81ccce6c5de89d7eeeb0730a1e8fc321c73
---
M modules/mariadb/manifests/config.pp
1 file changed, 15 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/92/120992/1

diff --git a/modules/mariadb/manifests/config.pp 
b/modules/mariadb/manifests/config.pp
index 062be25..6c0b827 100644
--- a/modules/mariadb/manifests/config.pp
+++ b/modules/mariadb/manifests/config.pp
@@ -32,6 +32,21 @@
 target => '/etc/my.cnf',
 }
 
+# Include these manually. If we're testing on systems with tarballs
+# instead of debs, the user won't exist.
+group { 'mysql':
+ensure => present,
+}
+
+user { 'mysql':
+ensure => present,
+gid=> 'mysql',
+shell  => '/bin/false',
+home   => '/nonexistent',
+system => true,
+managehome => false,
+}
+
 file { "$datadir":
 ensure  => directory,
 owner   => 'mysql',

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

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

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


[MediaWiki-commits] [Gerrit] add system role for elastic search boxes - change (operations/puppet)

2014-03-25 Thread ArielGlenn (Code Review)
ArielGlenn has submitted this change and it was merged.

Change subject: add system role for elastic search boxes
..


add system role for elastic search boxes

Change-Id: Ifd310a288f7a118ef56abbf2dc2b36e251d01e15
---
M manifests/role/elasticsearch.pp
1 file changed, 5 insertions(+), 0 deletions(-)

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



diff --git a/manifests/role/elasticsearch.pp b/manifests/role/elasticsearch.pp
index 7598a95..2d062fb 100644
--- a/manifests/role/elasticsearch.pp
+++ b/manifests/role/elasticsearch.pp
@@ -81,6 +81,11 @@
 #
 class role::elasticsearch::server inherits role::elasticsearch::config {
 
+system::role { 'role::elasticsearch::server':
+ensure  => 'present',
+description => 'elasticsearch server',
+}
+
 # Install
 class { '::elasticsearch':
 multicast_group  => $multicast_group,

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

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

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


[MediaWiki-commits] [Gerrit] add system role for elastic search boxes - change (operations/puppet)

2014-03-25 Thread ArielGlenn (Code Review)
ArielGlenn has uploaded a new change for review.

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

Change subject: add system role for elastic search boxes
..

add system role for elastic search boxes

Change-Id: Ifd310a288f7a118ef56abbf2dc2b36e251d01e15
---
M manifests/role/elasticsearch.pp
1 file changed, 5 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/91/120991/1

diff --git a/manifests/role/elasticsearch.pp b/manifests/role/elasticsearch.pp
index 7598a95..2d062fb 100644
--- a/manifests/role/elasticsearch.pp
+++ b/manifests/role/elasticsearch.pp
@@ -81,6 +81,11 @@
 #
 class role::elasticsearch::server inherits role::elasticsearch::config {
 
+system::role { 'role::elasticsearch::server':
+ensure  => 'present',
+description => 'elasticsearch server',
+}
+
 # Install
 class { '::elasticsearch':
 multicast_group  => $multicast_group,

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

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

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


[MediaWiki-commits] [Gerrit] Puppetize dbstore100[12] - change (operations/puppet)

2014-03-25 Thread Springle (Code Review)
Springle has submitted this change and it was merged.

Change subject: Puppetize dbstore100[12]
..


Puppetize dbstore100[12]

Change-Id: Ibbcc2b388a1386a147f2655603dc066b17182aee
---
M manifests/role/mariadb.pp
M manifests/site.pp
A templates/mariadb/dbstore.my.cnf.erb
3 files changed, 86 insertions(+), 0 deletions(-)

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



diff --git a/manifests/role/mariadb.pp b/manifests/role/mariadb.pp
index db424df..82957d5 100644
--- a/manifests/role/mariadb.pp
+++ b/manifests/role/mariadb.pp
@@ -53,3 +53,26 @@
 tmpdir   => '/a/tmp',
 }
 }
+
+# MariaDB 10 delayed slaves replicating all shards
+class role::mariadb::dbstore {
+
+$cluster = 'mysql'
+
+system::role { 'role::mariadb::dbstore':
+description => 'Delayed Slave',
+}
+
+# No packages yet! MariaDB 10 beta tarball in /opt
+#include mariadb::packages
+
+include passwords::misc::scripts
+
+class { 'mariadb::config':
+prompt   => 'DBSTORE',
+config   => 'mariadb/dbstore.my.cnf.erb',
+password => $passwords::misc::scripts::mysql_root_pass,
+datadir  => '/a/sqldata',
+tmpdir   => '/a/tmp',
+}
+}
diff --git a/manifests/site.pp b/manifests/site.pp
index 472748a..1c4b091 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -802,6 +802,11 @@
 include role::mariadb::tendril
 }
 
+node /^dbstore100(1|2)\.eqiad\.wmnet/ {
+include standard
+include role::mariadb::dbstore
+}
+
 node 'dobson.wikimedia.org' {
 interface::ip { 'dns::recursor':
 interface => 'eth0',
diff --git a/templates/mariadb/dbstore.my.cnf.erb 
b/templates/mariadb/dbstore.my.cnf.erb
new file mode 100644
index 000..e8259e1
--- /dev/null
+++ b/templates/mariadb/dbstore.my.cnf.erb
@@ -0,0 +1,58 @@
+# destore delayed slaves
+
+# Please use separate .cnf templates for each type of server.
+
+[client]
+port   = 3306
+socket = /tmp/mysql.sock
+
+[mysqld]
+
+skip-external-locking
+skip-name-resolve
+temp-pool
+
+user  = mysql
+socket= /tmp/mysql.sock
+port  = 3306
+datadir   = <%= @datadir %>
+tmpdir= <%= @tmpdir %>
+server_id = <%= @server_id %>
+read_only = 1
+
+max_connections= 50
+max_allowed_packet = 16M
+connect_timeout= 3
+query_cache_size   = 0
+query_cache_type   = 0
+event_scheduler= 1
+user_stat  = 1
+
+table_open_cache   = 5
+table_definition_cache = 5
+
+character_set_server = binary
+character_set_filesystem = binary
+collation_server = binary
+
+transaction-isolation  = READ-COMMITTED
+innodb_file_per_table  = 1
+innodb_buffer_pool_size= 48G
+innodb_log_file_size   = 4G
+innodb_flush_log_at_trx_commit = 0
+innodb_flush_method= O_DIRECT
+innodb_thread_concurrency  = 0
+innodb_io_capacity = 1000
+innodb_read_io_threads = 16
+innodb_write_io_threads= 8
+innodb_stats_sample_pages  = 16
+innodb_stats_method= nulls_unequal
+innodb_locks_unsafe_for_binlog = 1
+aria_pagecache_buffer_size = 32G
+
+[mysqldump]
+
+quick
+max_allowed_packet = 16M
+
+#!includedir /etc/mysql/conf.d/
\ No newline at end of file

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

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

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


[MediaWiki-commits] [Gerrit] Puppetize dbstore100[12] - change (operations/puppet)

2014-03-25 Thread Springle (Code Review)
Springle has uploaded a new change for review.

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

Change subject: Puppetize dbstore100[12]
..

Puppetize dbstore100[12]

Change-Id: Ibbcc2b388a1386a147f2655603dc066b17182aee
---
M manifests/role/mariadb.pp
M manifests/site.pp
A templates/mariadb/dbstore.my.cnf.erb
3 files changed, 86 insertions(+), 0 deletions(-)


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

diff --git a/manifests/role/mariadb.pp b/manifests/role/mariadb.pp
index db424df..82957d5 100644
--- a/manifests/role/mariadb.pp
+++ b/manifests/role/mariadb.pp
@@ -53,3 +53,26 @@
 tmpdir   => '/a/tmp',
 }
 }
+
+# MariaDB 10 delayed slaves replicating all shards
+class role::mariadb::dbstore {
+
+$cluster = 'mysql'
+
+system::role { 'role::mariadb::dbstore':
+description => 'Delayed Slave',
+}
+
+# No packages yet! MariaDB 10 beta tarball in /opt
+#include mariadb::packages
+
+include passwords::misc::scripts
+
+class { 'mariadb::config':
+prompt   => 'DBSTORE',
+config   => 'mariadb/dbstore.my.cnf.erb',
+password => $passwords::misc::scripts::mysql_root_pass,
+datadir  => '/a/sqldata',
+tmpdir   => '/a/tmp',
+}
+}
diff --git a/manifests/site.pp b/manifests/site.pp
index 472748a..1c4b091 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -802,6 +802,11 @@
 include role::mariadb::tendril
 }
 
+node /^dbstore100(1|2)\.eqiad\.wmnet/ {
+include standard
+include role::mariadb::dbstore
+}
+
 node 'dobson.wikimedia.org' {
 interface::ip { 'dns::recursor':
 interface => 'eth0',
diff --git a/templates/mariadb/dbstore.my.cnf.erb 
b/templates/mariadb/dbstore.my.cnf.erb
new file mode 100644
index 000..e8259e1
--- /dev/null
+++ b/templates/mariadb/dbstore.my.cnf.erb
@@ -0,0 +1,58 @@
+# destore delayed slaves
+
+# Please use separate .cnf templates for each type of server.
+
+[client]
+port   = 3306
+socket = /tmp/mysql.sock
+
+[mysqld]
+
+skip-external-locking
+skip-name-resolve
+temp-pool
+
+user  = mysql
+socket= /tmp/mysql.sock
+port  = 3306
+datadir   = <%= @datadir %>
+tmpdir= <%= @tmpdir %>
+server_id = <%= @server_id %>
+read_only = 1
+
+max_connections= 50
+max_allowed_packet = 16M
+connect_timeout= 3
+query_cache_size   = 0
+query_cache_type   = 0
+event_scheduler= 1
+user_stat  = 1
+
+table_open_cache   = 5
+table_definition_cache = 5
+
+character_set_server = binary
+character_set_filesystem = binary
+collation_server = binary
+
+transaction-isolation  = READ-COMMITTED
+innodb_file_per_table  = 1
+innodb_buffer_pool_size= 48G
+innodb_log_file_size   = 4G
+innodb_flush_log_at_trx_commit = 0
+innodb_flush_method= O_DIRECT
+innodb_thread_concurrency  = 0
+innodb_io_capacity = 1000
+innodb_read_io_threads = 16
+innodb_write_io_threads= 8
+innodb_stats_sample_pages  = 16
+innodb_stats_method= nulls_unequal
+innodb_locks_unsafe_for_binlog = 1
+aria_pagecache_buffer_size = 32G
+
+[mysqldump]
+
+quick
+max_allowed_packet = 16M
+
+#!includedir /etc/mysql/conf.d/
\ No newline at end of file

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

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

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


[MediaWiki-commits] [Gerrit] system roles for snapshot xml dumps (they have it for everyt... - change (operations/puppet)

2014-03-25 Thread ArielGlenn (Code Review)
ArielGlenn has submitted this change and it was merged.

Change subject: system roles for snapshot xml dumps (they have it for 
everything else)
..


system roles for snapshot xml dumps (they have it for everything else)

Change-Id: I399f5c64e5213cff55850045c0351d8c37d19f34
---
M modules/snapshot/manifests/dumps.pp
1 file changed, 21 insertions(+), 0 deletions(-)

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



diff --git a/modules/snapshot/manifests/dumps.pp 
b/modules/snapshot/manifests/dumps.pp
index 22665f4..8971e30 100644
--- a/modules/snapshot/manifests/dumps.pp
+++ b/modules/snapshot/manifests/dumps.pp
@@ -2,6 +2,27 @@
 $enable= true,
 $hugewikis = false,
 ) {
+
+if ($enable) {
+$ensure = 'present'
+}
+else {
+$ensure = 'absent'
+}
+
+if ($hugewikis) {
+system::role { 'snapshot::dumps':
+ensure  => $ensure,
+description => 'producer of xml dumps for enwiki'
+}
+}
+else {
+system::role { 'snapshot::dumps':
+ensure  => $ensure,
+description => 'producer of xml dumps for all wikis but enwiki'
+}
+}
+
 class { 'snapshot::dumps::configs':
 enable   => $enable,
 hugewikis_enable => $hugewikis,

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

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

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


[MediaWiki-commits] [Gerrit] system roles for snapshot xml dumps (they have it for everyt... - change (operations/puppet)

2014-03-25 Thread ArielGlenn (Code Review)
ArielGlenn has uploaded a new change for review.

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

Change subject: system roles for snapshot xml dumps (they have it for 
everything else)
..

system roles for snapshot xml dumps (they have it for everything else)

Change-Id: I399f5c64e5213cff55850045c0351d8c37d19f34
---
M modules/snapshot/manifests/dumps.pp
1 file changed, 21 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/89/120989/1

diff --git a/modules/snapshot/manifests/dumps.pp 
b/modules/snapshot/manifests/dumps.pp
index 22665f4..8971e30 100644
--- a/modules/snapshot/manifests/dumps.pp
+++ b/modules/snapshot/manifests/dumps.pp
@@ -2,6 +2,27 @@
 $enable= true,
 $hugewikis = false,
 ) {
+
+if ($enable) {
+$ensure = 'present'
+}
+else {
+$ensure = 'absent'
+}
+
+if ($hugewikis) {
+system::role { 'snapshot::dumps':
+ensure  => $ensure,
+description => 'producer of xml dumps for enwiki'
+}
+}
+else {
+system::role { 'snapshot::dumps':
+ensure  => $ensure,
+description => 'producer of xml dumps for all wikis but enwiki'
+}
+}
+
 class { 'snapshot::dumps::configs':
 enable   => $enable,
 hugewikis_enable => $hugewikis,

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

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

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


[MediaWiki-commits] [Gerrit] need standard for salt::minion grain-ensure - change (operations/puppet)

2014-03-25 Thread Springle (Code Review)
Springle has submitted this change and it was merged.

Change subject: need standard for salt::minion grain-ensure
..


need standard for salt::minion grain-ensure

Change-Id: I47ad6cef10417dcba479dca0f86d30fcb0df9669
---
M manifests/site.pp
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/manifests/site.pp b/manifests/site.pp
index fcc2d0f..472748a 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -798,6 +798,7 @@
 }
 
 node 'db1044.eqiad.wmnet' {
+include standard
 include role::mariadb::tendril
 }
 

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

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

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


[MediaWiki-commits] [Gerrit] need standard for salt::minion grain-ensure - change (operations/puppet)

2014-03-25 Thread Springle (Code Review)
Springle has uploaded a new change for review.

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

Change subject: need standard for salt::minion grain-ensure
..

need standard for salt::minion grain-ensure

Change-Id: I47ad6cef10417dcba479dca0f86d30fcb0df9669
---
M manifests/site.pp
1 file changed, 1 insertion(+), 0 deletions(-)


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

diff --git a/manifests/site.pp b/manifests/site.pp
index fcc2d0f..472748a 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -798,6 +798,7 @@
 }
 
 node 'db1044.eqiad.wmnet' {
+include standard
 include role::mariadb::tendril
 }
 

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

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

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


[MediaWiki-commits] [Gerrit] One DOMUtils is plenty - change (mediawiki...parsoid)

2014-03-25 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: One DOMUtils is plenty
..


One DOMUtils is plenty

Change-Id: I86c55eb0f5bb8b205608cb9993a2b084c4cfae92
---
M tests/parserTests.js
1 file changed, 3 insertions(+), 4 deletions(-)

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



diff --git a/tests/parserTests.js b/tests/parserTests.js
index 0198f21..11cc487 100755
--- a/tests/parserTests.js
+++ b/tests/parserTests.js
@@ -25,7 +25,6 @@
yargs = require('yargs'),
Alea = require('alea'),
DU = require('../lib/mediawiki.DOMUtils.js').DOMUtils,
-   DOMUtils = require( '../lib/mediawiki.DOMUtils.js' ).DOMUtils,
Logger = require('../lib/Logger.js').Logger,
PEG = require('pegjs'),
Util = require( '../lib/mediawiki.Util.js' ).Util;
@@ -528,7 +527,7 @@
if (wrapperName) {
newNode = ownerDoc.createElement(wrapperName);
newNode.appendChild(ownerDoc.createTextNode(str));
-   } else if (DOMUtils.isFosterablePosition(n)) {
+   } else if (DU.isFosterablePosition(n)) {
newNode = ownerDoc.createComment(str);
} else {
newNode = ownerDoc.createTextNode(str);
@@ -663,7 +662,7 @@
 * Currently true for template and extension content.
 */
function domSubtreeIsEditable(env, node) {
-   return !DOMUtils.isTplElementNode(env, node);
+   return !DU.isTplElementNode(env, node);
}
 
/**
@@ -675,7 +674,7 @@
 */
function nodeIsUneditable(node) {
// Text and comment nodes are always editable
-   if (!DOMUtils.isElt(node)) {
+   if (!DU.isElt(node)) {
return false;
}
 

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

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

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


[MediaWiki-commits] [Gerrit] Add a MariaDB module. - change (operations/puppet)

2014-03-25 Thread Springle (Code Review)
Springle has submitted this change and it was merged.

Change subject: Add a MariaDB module.
..


Add a MariaDB module.

The current jumble of mysql, mysql_wmf, coredb, etc, is confusing and
full of legacy stuff with variables and conditionals everywhere. Rather
than risk breaking them yet again to puppetize beta cluster deployment-db1,
and since we're comitted to MariaDBover MySQL  now, use this module to
break everything out into clear components which classes like coredb can
eventually include in place of mysql_wmf.

Things to do here:

- include the icinga and percona checks
- puppetize per-cluster grants properly
- allow for different performance tuning between master and slaves
- allow for haproxy, multi-source replication, MariaDB 10, and galera

Change-Id: Ie6621b4ed3d1eb2449ca02255dcc3885e2ddc59e
---
A manifests/role/mariadb.pp
M manifests/site.pp
A modules/mariadb/manifests/config.pp
A modules/mariadb/manifests/init.pp
A modules/mariadb/manifests/packages.pp
A modules/mariadb/templates/root.my.cnf.erb
A templates/mariadb/beta.my.cnf.erb
A templates/mariadb/default.my.cnf.erb
A templates/mariadb/tendril.my.cnf.erb
9 files changed, 281 insertions(+), 7 deletions(-)

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



diff --git a/manifests/role/mariadb.pp b/manifests/role/mariadb.pp
new file mode 100644
index 000..db424df
--- /dev/null
+++ b/manifests/role/mariadb.pp
@@ -0,0 +1,55 @@
+
+# Generic Server
+class role::mariadb {
+
+$cluster = 'misc'
+
+system::role { 'role::mariadb':
+description => 'database server',
+}
+
+include mariadb
+}
+
+# Beta Cluster Master
+# Should add separate role for slaves
+class role::mariadb::beta {
+
+$cluster = 'beta'
+
+system::role { 'role::mariadb::beta':
+description => 'beta cluster database server',
+}
+
+include mariadb::packages
+include passwords::misc::scripts
+
+class { 'mariadb::config':
+prompt   => 'BETA',
+config   => 'mariadb/beta.my.cnf.erb',
+password => $passwords::misc::scripts::mysql_beta_root_pass,
+datadir  => '/mnt/sqldata',
+tmpdir   => '/mnt/tmp',
+}
+}
+
+# What db1044 presently does...
+class role::mariadb::tendril {
+
+$cluster = 'mysql'
+
+system::role { 'role::mariadb::tendril':
+description => 'tendril database server',
+}
+
+include mariadb::packages
+include passwords::misc::scripts
+
+class { 'mariadb::config':
+prompt   => 'TENDRIL',
+config   => 'mariadb/tendril.my.cnf.erb',
+password => $passwords::misc::scripts::mysql_root_pass,
+datadir  => '/a/sqldata',
+tmpdir   => '/a/tmp',
+}
+}
diff --git a/manifests/site.pp b/manifests/site.pp
index d8c7ed2..fcc2d0f 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -797,13 +797,8 @@
 include udpprofile::collector
 }
 
-# ad-hoc mariadb test box
-node /^db10(34|44)\.eqiad\.wmnet/ {
-$cluster = 'misc'
-include standard
-include mysql_wmf
-include mysql_wmf::datadirs
-include mysql_wmf::mysqluser
+node 'db1044.eqiad.wmnet' {
+include role::mariadb::tendril
 }
 
 node 'dobson.wikimedia.org' {
diff --git a/modules/mariadb/manifests/config.pp 
b/modules/mariadb/manifests/config.pp
new file mode 100644
index 000..062be25
--- /dev/null
+++ b/modules/mariadb/manifests/config.pp
@@ -0,0 +1,48 @@
+# Please use separate .cnf templates for each type of server.
+# Keep this independent and modular. It should be includable without the 
mariadb class.
+
+class mariadb::config(
+$config   = 'mariadb/default.my.cnf.erb',
+$prompt   = '',
+$password = 'undefined',
+$datadir  = '/srv/sqldata',
+$tmpdir   = '/srv/tmp',
+) {
+
+$server_id = inline_template(
+"<%= ia = @ipaddress.split('.'); server_id = ia[0] + ia[2] + ia[3]; 
server_id %>"
+)
+
+file { '/etc/my.cnf':
+owner   => 'root',
+group   => 'root',
+mode=> '0644',
+content => template($config),
+}
+
+file { '/root/.my.cnf':
+owner   => 'root',
+group   => 'root',
+mode=> '0400',
+content => template("mariadb/root.my.cnf.erb"),
+}
+
+file { '/etc/mysql/my.cnf':
+ensure => link,
+target => '/etc/my.cnf',
+}
+
+file { "$datadir":
+ensure  => directory,
+owner   => 'mysql',
+group   => 'mysql',
+mode=> '0755',
+}
+
+file { "$tmpdir":
+ensure  => directory,
+owner   => 'mysql',
+group   => 'mysql',
+mode=> '0755',
+}
+}
\ No newline at end of file
diff --git a/modules/mariadb/manifests/init.pp 
b/modules/mariadb/manifests/init.pp
new file mode 100644
index 000..91fcdc8
--- /dev/null
+++ b/modules/mariadb/manifests/init.pp
@@ -0,0 +1,5 @@
+class mariadb {
+
+include mariadb::config
+include mariadb::pa

[MediaWiki-commits] [Gerrit] Changed right 'nukeDPL' for 'nuke' - change (mediawiki...NukeDPL)

2014-03-25 Thread Luis Felipe Schenone (Code Review)
Luis Felipe Schenone has uploaded a new change for review.

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

Change subject: Changed right 'nukeDPL' for 'nuke'
..

Changed right 'nukeDPL' for 'nuke'

Change-Id: I5161f3bc2212216ed67c5bfbcb69e0047890ce8a
---
M NukeDPL.php
1 file changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/NukeDPL.php b/NukeDPL.php
index 225efc5..985329a 100644
--- a/NukeDPL.php
+++ b/NukeDPL.php
@@ -8,9 +8,9 @@
'url' => 'http://www.mediawiki.org/wiki/Extension:NukeDPL',
 );
 
-$wgAvailableRights[] = 'nukeDPL';
+$wgAvailableRights[] = 'nuke';
 
-$wgGroupPermissions['sysop']['nukeDPL'] = true;
+$wgGroupPermissions['sysop']['nuke'] = true;
 
 $wgSpecialPages['NukeDPL'] = 'SpecialNukeDPL';
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5161f3bc2212216ed67c5bfbcb69e0047890ce8a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/NukeDPL
Gerrit-Branch: master
Gerrit-Owner: Luis Felipe Schenone 

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


[MediaWiki-commits] [Gerrit] Changed right 'nukeDPL' for 'nuke' - change (mediawiki...NukeDPL)

2014-03-25 Thread Luis Felipe Schenone (Code Review)
Luis Felipe Schenone has submitted this change and it was merged.

Change subject: Changed right 'nukeDPL' for 'nuke'
..


Changed right 'nukeDPL' for 'nuke'

Change-Id: I5161f3bc2212216ed67c5bfbcb69e0047890ce8a
---
M NukeDPL.php
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Luis Felipe Schenone: Verified; Looks good to me, approved



diff --git a/NukeDPL.php b/NukeDPL.php
index 225efc5..985329a 100644
--- a/NukeDPL.php
+++ b/NukeDPL.php
@@ -8,9 +8,9 @@
'url' => 'http://www.mediawiki.org/wiki/Extension:NukeDPL',
 );
 
-$wgAvailableRights[] = 'nukeDPL';
+$wgAvailableRights[] = 'nuke';
 
-$wgGroupPermissions['sysop']['nukeDPL'] = true;
+$wgGroupPermissions['sysop']['nuke'] = true;
 
 $wgSpecialPages['NukeDPL'] = 'SpecialNukeDPL';
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5161f3bc2212216ed67c5bfbcb69e0047890ce8a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/NukeDPL
Gerrit-Branch: master
Gerrit-Owner: Luis Felipe Schenone 
Gerrit-Reviewer: Luis Felipe Schenone 

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


[MediaWiki-commits] [Gerrit] Fix custom local MediaWiki:Helppage values - change (mediawiki/core)

2014-03-25 Thread Mattflaschen (Code Review)
Mattflaschen has uploaded a new change for review.

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

Change subject: Fix custom local MediaWiki:Helppage values
..

Fix custom local MediaWiki:Helppage values

Followup to 3a6ea89d4aa4a0fbc36a209fa13b1c6134110ca9

Change-Id: I7effec352d263f536d1d1763e9cd56d2f5154f13
---
M includes/EditPage.php
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/86/120986/1

diff --git a/includes/EditPage.php b/includes/EditPage.php
index d4b06fe..8f5b31e 100644
--- a/includes/EditPage.php
+++ b/includes/EditPage.php
@@ -2082,9 +2082,9 @@
}
# Try to add a custom edit intro, or use the standard one if 
this is not possible.
if ( !$this->showCustomIntro() && !$this->mTitle->exists() ) {
-   $helpLink = Skin::makeInternalOrExternalUrl(
+   $helpLink = wfExpandUrl( 
Skin::makeInternalOrExternalUrl(
wfMessage( 'helppage' 
)->inContentLanguage()->text()
-   );
+   ) );
if ( $wgUser->isLoggedIn() ) {
$wgOut->wrapWikiMsg(
// Suppress the external link icon, 
consider the help url an internal one

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

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

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


[MediaWiki-commits] [Gerrit] Disabled tests should be disabled - change (mediawiki...parsoid)

2014-03-25 Thread Arlolra (Code Review)
Arlolra has uploaded a new change for review.

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

Change subject: Disabled tests should be disabled
..

Disabled tests should be disabled

 * They're currently defaulted to true for historical reasons that no
   longer seem necessary.

Change-Id: If95fd9410f8d2e1ed403ea063e09670a7f71dcce
---
M tests/parserTests-blacklist.js
M tests/parserTests.js
M tests/parserTests.txt
3 files changed, 7 insertions(+), 13 deletions(-)


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

diff --git a/tests/parserTests-blacklist.js b/tests/parserTests-blacklist.js
index 185239a..6ca2799 100644
--- a/tests/parserTests-blacklist.js
+++ b/tests/parserTests-blacklist.js
@@ -430,7 +430,6 @@
 add("wt2html", "Edit comment with bare anchor link (non-local, as on 
history)", "#section");
 add("wt2html", "Space normalisation on autocomment (bug 22784)", "/* __hello__world__ */");
 add("wt2html", "percent-encoding and + signs in comments (Bug 26410)", "ABC3D% ++ +%20");
-add("wt2html", "Bad images - basic functionality", "");
 add("wt2html", "Bad images - bug 16039: text after bad image disappears", "Foo bar\n\nBar
 foo");
 add("wt2html", "Verify that displaytitle works (bug #22501) no displaytitle", 
"this is not the the title");
 add("wt2html", "Verify that displaytitle works (bug #22501) 
RestrictDisplayTitle=false", "this is 
not the the title\nParser function 
implementation for pf_displaytitle missing in Parsoid.");
@@ -706,7 +705,6 @@
 add("html2html", "Bug 4781, 5267: %26 in bracketed URL", "http://www.example.com/?title=100%2525_Bran\"; 
data-parsoid='{\"targetOff\":45,\"contentOffsets\":[45,49],\"dsr\":[0,50,45,1]}'>link\n");
 add("html2html", "Bug 4781, 5267: %28, %29 in bracketed URL", "http://www.example.com/?title=Ben-Hur_%25281959_film%2529\"; 
data-parsoid='{\"targetOff\":59,\"contentOffsets\":[59,63],\"dsr\":[0,64,59,1]}'>link\n");
 add("html2html", "Brackets in urls", "http://example.com/index.php?foozoid%255B%255D=bar\"; 
data-parsoid='{\"targetOff\":52,\"contentOffsets\":[52,98],\"dsr\":[0,99,52,1]}'>http://example.com/index.php?foozoid%5B%5D=bar\n\nhttp://example.com/index.php?foozoid%255B%255D=bar\"; 
data-parsoid='{\"targetOff\":153,\"contentOffsets\":[153,199],\"dsr\":[101,200,52,1]}'>http://example.com/index.php?foozoid%5B%5D=bar\n");
-add("html2html", "IPv6 urls (bug 21261)", "http://%5B2404:130:0:1000::187:2%5D/index.php\"; 
data-parsoid='{\"targetOff\":47,\"contentOffsets\":[47,77],\"dsr\":[0,78,47,1]}'>http://[2404:130:0:1000::187:2/index.php]\n");
 add("html2html", "Unclosed and unmatched quotes", "Bold italic text with bold 
deactivated in 
between.\n\nBold italic text with italic 
deactivated in 
between.\n\nBold text..\n\n..spanning two paragraphs (should not 
work).'\n\nBold tag left open\n\nItalic tag left open\n\nNormal text.\n\nThis year's election should beat last year's.\n\nToms car is bigger than Susans.\n\nPlain italic's plain\n");
 add("html2html", "Accept \"||\" in indented table headings", " 
\n\nh1 \n 
h2\n\n");
 add("html2html", "Table security: embedded pipes 
(http://lists.wikimedia.org/mailman/htdig/wikitech-l/2006-April/022293.html)", 
"\n\n[ftp://%257Cx\"; 
data-parsoid='{\"targetOff\":20,\"contentOffsets\":[20,30],\"dsr\":[6,31,14,1]}'>ftp://%7Cx\n]\" 
onmouseover=\"alert(document.cookie)\">test\n\n\n");
@@ -1318,7 +1316,6 @@
 add("html2wt", "URL-encoding in URL functions (single parameter)", 
"/index.php?title=Some_page&=&\n");
 add("html2wt", "URL-encoding in URL functions (multiple parameters)", 
"/index.php?title=Some_page&q=?&=&\n");
 add("html2wt", "Brackets in urls", 
"[http://example.com/index.php?foozoid%255B%255D=bar 
http://example.com/index.php?foozoid%5B%5D=bar]\n\n[http://example.com/index.php?foozoid%255B%255D=bar
 http://example.com/index.php?foozoid%5B%5D=bar]\n";);
-add("html2wt", "IPv6 urls (bug 21261)", 
"[http://%5B2404:130:0:1000::187:2%5D/index.php 
http://[2404:130:0:1000::187:2]/index.php]\n";);
 add("html2wt", "Non-extlinks in brackets", "[foo]\n[foo bar]\n[foo 
''bar'']\n[fool's] errand\n[fool's errand]\n[foo]\n[foo bar]\n[foo 
''bar'']\n[fool's] errand\n[fool's errand]\n[url=foo]\n[url=[http://example.com 
http://example.com]]\n";);
 add("html2wt", "Unclosed and unmatched quotes", "'Bold italic text '''with 
bold deactivated''' in between.'\n\n'Bold italic text ''with italic 
deactivated'' in between.'\n\n'''Bold text..'''\n\n..spanning two 
paragraphs (should not work).''\n\n'''Bold tag left open'''\n\n''Italic tag 
left open''\n\nNormal text.\n\n'''This years election 
''should'' beat '''last years.\n\n''Tom'''s car is bigger 
than Susan'''s.\n\nPlain ''italic'''s 
plain\n");
 add("html2wt", "A table with caption with default-spaced attributes and a 
table row", "{|\n|+ style=\"color: red;\" | caption1\n\n| foo\n|}\n");
diff --git a/tests/parserTests.js b/tests/parserT

[MediaWiki-commits] [Gerrit] Update OOjs UI to v0.1.0-pre (1c7875205a) - change (VisualEditor/VisualEditor)

2014-03-25 Thread Jforrester (Code Review)
Jforrester has uploaded a new change for review.

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

Change subject: Update OOjs UI to v0.1.0-pre (1c7875205a)
..

Update OOjs UI to v0.1.0-pre (1c7875205a)

New changes:
a14026f Move some styles to the Apex theme
9df7af9 Add basic styling for Agora theme
deefcf3 Localisation updates from https://translatewiki.net.
1c78752 Add initially enabled ToggleButtonWidget to demo

Change-Id: I1ea9f8e045cccacc4525ce401dc61b6d117cebb1
---
M lib/oojs-ui/i18n/hi.json
M lib/oojs-ui/oojs-ui-apex.css
M lib/oojs-ui/oojs-ui.js
M lib/oojs-ui/oojs-ui.svg.css
4 files changed, 41 insertions(+), 27 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor 
refs/changes/84/120984/1

diff --git a/lib/oojs-ui/i18n/hi.json b/lib/oojs-ui/i18n/hi.json
index 8b79d34..3c41b3e 100644
--- a/lib/oojs-ui/i18n/hi.json
+++ b/lib/oojs-ui/i18n/hi.json
@@ -4,11 +4,13 @@
 "Ansumang",
 "Devayon",
 "Rajesh",
-"Siddhartha Ghai"
+"Siddhartha Ghai",
+"Goelujjwal"
 ]
 },
 "ooui-dialog-action-close": "बंद करें",
 "ooui-outline-control-move-down": "प्रविष्टि नीचे ले जाएँ",
 "ooui-outline-control-move-up": "प्रविष्टि ऊपर ले जाएँ",
+"ooui-outline-control-remove": "आइटम हटाएँ",
 "ooui-toolbar-more": "अधिक"
 }
\ No newline at end of file
diff --git a/lib/oojs-ui/oojs-ui-apex.css b/lib/oojs-ui/oojs-ui-apex.css
index 66a8072..f86f67c 100644
--- a/lib/oojs-ui/oojs-ui-apex.css
+++ b/lib/oojs-ui/oojs-ui-apex.css
@@ -42,6 +42,11 @@
   box-shadow: 0 0 0.66em rgba(0, 0, 0, 0.25);
 }
 
+.oo-ui-frame-content {
+  font-family: sans-serif;
+  font-size: 0.8em;
+}
+
 .oo-ui-toolbar-bar {
   background: #f8fbfd;
   background-image: -webkit-gradient(linear, right top, right bottom, 
color-stop(0%, #ff), color-stop(100%, #f1f7fb));
@@ -89,7 +94,19 @@
   color: #000;
 }
 
+.oo-ui-window-body {
+  padding: 0 0.75em;
+}
+
+.oo-ui-window-icon {
+  width: 2em;
+  height: 2em;
+  margin-right: 0.5em;
+  line-height: 2em;
+}
+
 .oo-ui-window-title {
+  line-height: 2em;
   color: #333;
 }
 
@@ -105,6 +122,8 @@
 
 .oo-ui-buttonedElement.oo-ui-indicatedElement .oo-ui-buttonedElement-button > 
.oo-ui-indicatedElement-indicator,
 .oo-ui-buttonedElement.oo-ui-iconedElement .oo-ui-buttonedElement-button > 
.oo-ui-iconedElement-icon {
+  width: 1.9em;
+  height: 1.9em;
   opacity: 0.8;
 }
 
@@ -428,6 +447,10 @@
   box-shadow: inset 0 0.07em 0.07em 0 rgba(0, 0, 0, 0.07);
 }
 
+.oo-ui-optionWidget {
+  padding: 0.5em 2em 0.5em 3em;
+}
+
 .oo-ui-optionWidget-highlighted {
   background-color: #e1f3ff;
 }
@@ -475,6 +498,10 @@
   white-space: nowrap;
 }
 
+.oo-ui-buttonOptionWidget {
+  padding: 0;
+}
+
 .oo-ui-buttonOptionWidget.oo-ui-optionWidget-selected,
 .oo-ui-buttonOptionWidget.oo-ui-optionWidget-highlighted {
   background-color: transparent;
@@ -519,6 +546,7 @@
 }
 
 .oo-ui-menuSectionItemWidget {
+  padding: 0.33em 0.75em;
   color: #888;
 }
 
@@ -560,8 +588,13 @@
   box-shadow: 0 0 0.5em rgba(0, 0, 0, 0.2);
 }
 
+.oo-ui-textInputWidget {
+  width: 20em;
+}
+
 .oo-ui-textInputWidget input,
 .oo-ui-textInputWidget textarea {
+  padding: 0.5em;
   font-family: sans-serif;
   font-size: 1em;
   background-color: #fff;
diff --git a/lib/oojs-ui/oojs-ui.js b/lib/oojs-ui/oojs-ui.js
index 88eaaf8..9efc8e7 100644
--- a/lib/oojs-ui/oojs-ui.js
+++ b/lib/oojs-ui/oojs-ui.js
@@ -1,12 +1,12 @@
 /*!
- * OOjs UI v0.1.0-pre (3db4b6974d)
+ * OOjs UI v0.1.0-pre (1c7875205a)
  * https://www.mediawiki.org/wiki/OOjs_UI
  *
  * Copyright 2011–2014 OOjs Team and other contributors.
  * Released under the MIT license
  * http://oojs.mit-license.org
  *
- * Date: Mon Mar 24 2014 17:35:47 GMT-0700 (PDT)
+ * Date: Tue Mar 25 2014 20:10:09 GMT-0700 (PDT)
  */
 ( function () {
 
diff --git a/lib/oojs-ui/oojs-ui.svg.css b/lib/oojs-ui/oojs-ui.svg.css
index 92c2e89..d1065cf 100644
--- a/lib/oojs-ui/oojs-ui.svg.css
+++ b/lib/oojs-ui/oojs-ui.svg.css
@@ -1,12 +1,12 @@
 /*!
- * OOjs UI v0.1.0-pre (3db4b6974d)
+ * OOjs UI v0.1.0-pre (1c7875205a)
  * https://www.mediawiki.org/wiki/OOjs_UI
  *
  * Copyright 2011–2014 OOjs Team and other contributors.
  * Released under the MIT license
  * http://oojs.mit-license.org
  *
- * Date: Mon Mar 24 2014 17:35:47 GMT-0700 (PDT)
+ * Date: Tue Mar 25 2014 20:10:09 GMT-0700 (PDT)
  */
 
 /* Textures */
@@ -158,11 +158,6 @@
   background: none;
 }
 
-.oo-ui-frame-content {
-  font-family: sans-serif;
-  font-size: 0.8em;
-}
-
 .oo-ui-toolbar {
   clear: both;
 }
@@ -232,23 +227,14 @@
   -webkit-touch-callout: none;
 }
 
-.oo-ui-window-body {
-  padding: 0 0.75em;
-}
-
 .oo-ui-window-icon {
   float: left;
-  width: 2em;
-  height: 2em;
-  margin-right: 0.5em;
-  line-height: 2em;
-  background-position: right center;
+  background-position: center center;
   background-repeat: no-repeat;
 }
 
 .oo-ui-window-title {
   float: left;
-  line-height: 2

[MediaWiki-commits] [Gerrit] Initial commit - change (mediawiki...NukeDPL)

2014-03-25 Thread Luis Felipe Schenone (Code Review)
Luis Felipe Schenone has submitted this change and it was merged.

Change subject: Initial commit
..


Initial commit

The code for this extensions was available at 
https://www.mediawiki.org/wiki/Extension:NukeDPL/Version_1.2.3

I've updated, organized, cleaned and generally improved the code, and I'm now 
uploading it to Gerrit.

Change-Id: Ic219cd1d930877bc7d7e003921772158e95ec9d3
---
A NukeDPL.i18n.php
A NukeDPL.php
A SpecialNukeDPL.php
3 files changed, 185 insertions(+), 0 deletions(-)

Approvals:
  Luis Felipe Schenone: Verified; Looks good to me, approved



diff --git a/NukeDPL.i18n.php b/NukeDPL.i18n.php
new file mode 100644
index 000..5f55769
--- /dev/null
+++ b/NukeDPL.i18n.php
@@ -0,0 +1,35 @@
+ 'Mass delete by DPL query',
+   'nukedpl-desc' => 'Adds a [[Special:NukeDPL|Special Page]] for mass 
deletion by DPL query.',
+   'nukedpl-intro' => "This tool allows for mass deletions of pages 
selected by a DPL query.
+Enter a query below to generate a list of titles to delete.
+* Titles can be individually removed before deleting.
+* Remember, article titles are case-sensitive.
+* Queries shouldn't be surrounded by any DPL tags or braces.
+* For information about the parameter meanings, see the 
[http://semeb.com/dpldemo/index.php?title=DPL:Manual DPL Manual].",
+   'nukedpl-candidatelist' => 'View candidate list',
+   'nukedpl-nopages' => "No pages to delete using DPL-query: $1",
+   'nukedpl-nuke' => "Nuke!",
+   'nukedpl-list' => "The following pages were selected by DPL-query: 
$1 hit the button to delete them.",
+   'nukedpl-defaultreason' => "Mass removal of pages selected by 
DPL-query: ($1)",
+);
+
+$messages['de'] = array(
+   'nukedpl' => 'Massenlöschung mittels DPL query',
+   'nukedpl-desc' => 'Ergänzt eine [[Spezial:NukeDPL|Spezialseite]], die 
das massenhafte Löschen von Seiten per DPL-Query ermöglicht',
+   'nukedpl-intro' => "Diese Spezialseite erlaubt das Löschen von Seiten, 
die mittels einer DPL-Query ausgewählt wurden.
+Geben Sie unten eine DPL-Query ein, um eine Liste mit den zu löschenden Seiten 
zu generieren.
+* Seiten können aus der Liste der zu löschenden Seiten vor dem Löschen noch 
individuell entfernt werden
+* Seitentitel sind case-sensitive!
+* Queries werden nicht durch DPL Tags oder Klammern umschlossen!
+* Erklärungen zu den Parametern finden Sie auf der Seite 
[http://semeb.com/dpldemo/index.php?title=DPL:Manual DPL Manual].",
+   'nukedpl-candidatelist' => 'Anzeige der Löschkandidaten',
+   'nukedpl-nopages' => "Keine Seiten zum Löschen bei folgendem DPL-Query: 
$1",
+   'nukedpl-nuke' => "Löschen!",
+   'nukedpl-list' => "Die folgenden Seiten wurden gefunen. DPL-Query: 
$1Button drücken, um diese zu löschen.",
+   'nukedpl-defaultreason' => "Massenlöschung von Seiten mittels 
DPL-Query: ($1)",
+);
\ No newline at end of file
diff --git a/NukeDPL.php b/NukeDPL.php
new file mode 100644
index 000..225efc5
--- /dev/null
+++ b/NukeDPL.php
@@ -0,0 +1,55 @@
+ 'NukeDPL',
+   'author' => array( '[[User:Nad|Nad]]', '[[User:Luis Felipe 
Schenone|LFS]]' ),
+   'version' => 1.3,
+   'descriptionmsg' => 'nukedpl-desc',
+   'url' => 'http://www.mediawiki.org/wiki/Extension:NukeDPL',
+);
+
+$wgAvailableRights[] = 'nukeDPL';
+
+$wgGroupPermissions['sysop']['nukeDPL'] = true;
+
+$wgSpecialPages['NukeDPL'] = 'SpecialNukeDPL';
+
+$wgSpecialPageGroups['NukeDPL'] = 'pagetools';
+
+$wgExtensionMessagesFiles['NukeDPL'] = __DIR__ . '/NukeDPL.i18n.php';
+
+$wgAutoloadClasses['SpecialNukeDPL'] = __DIR__ . '/SpecialNukeDPL.php';
+
+$egNukeDPLDefaultText = '
+distinct  = true | false
+ignorecase= true | false
+title = Article
+nottitle  = Article
+titlematch= %fragment%
+nottitlematch = %fragment%
+titleregexp   = ^.+$
+nottitleregexp= ^.+$
+category  = Category1 | Category2
+notcategory   = Category1 | Category2
+categorymatch = %fragment%
+notcategorymatch  = %fragment%
+categoryregexp= ^.+$
+notcategoryregexp = ^.+$
+namespace = Namespace1 | Namespace2
+notnamespace  = Namespace1 | Namespace2
+linksfrom = Foo | Bar
+notlinksfrom  = Foo | Bar
+linksto   = Foo|Bar
+notlinksto= Foo|Bar
+imageused = Foo.jpg
+imagecontainer= Article1 | Article2
+uses  = Template1 | Template2
+notuses   = Template1 | Template2
+redirects = exclude | include | only
+createdby = User
+notcreatedby  = User
+modifiedby= User
+notmodifiedby = User
+lastmodifiedby= User
+notlastmodifiedby = User
+';
\ No newline at end of file
diff --git a/SpecialNukeDPL.php b/SpecialNukeDPL.php
new file mode 100644
index 000..72f5ba1
--- /dev/null
+++ b/SpecialNukeDPL.php
@@ -0,0 +1,95 @@
+getUser();
+   if ( !$this->userCanExecute( $user ) ) {
+   $this->displayRestr

[MediaWiki-commits] [Gerrit] Updated, organized, cleaned and improved the code previously... - change (mediawiki...NukeDPL)

2014-03-25 Thread Luis Felipe Schenone (Code Review)
Luis Felipe Schenone has uploaded a new change for review.

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

Change subject: Updated, organized, cleaned and improved the code previously 
available only at mediawiki.org
..

Updated, organized, cleaned and improved the code previously available only at 
mediawiki.org

Change-Id: Ic219cd1d930877bc7d7e003921772158e95ec9d3
---
A NukeDPL.i18n.php
A NukeDPL.php
A SpecialNukeDPL.php
3 files changed, 185 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/NukeDPL 
refs/changes/83/120983/1

diff --git a/NukeDPL.i18n.php b/NukeDPL.i18n.php
new file mode 100644
index 000..5f55769
--- /dev/null
+++ b/NukeDPL.i18n.php
@@ -0,0 +1,35 @@
+ 'Mass delete by DPL query',
+   'nukedpl-desc' => 'Adds a [[Special:NukeDPL|Special Page]] for mass 
deletion by DPL query.',
+   'nukedpl-intro' => "This tool allows for mass deletions of pages 
selected by a DPL query.
+Enter a query below to generate a list of titles to delete.
+* Titles can be individually removed before deleting.
+* Remember, article titles are case-sensitive.
+* Queries shouldn't be surrounded by any DPL tags or braces.
+* For information about the parameter meanings, see the 
[http://semeb.com/dpldemo/index.php?title=DPL:Manual DPL Manual].",
+   'nukedpl-candidatelist' => 'View candidate list',
+   'nukedpl-nopages' => "No pages to delete using DPL-query: $1",
+   'nukedpl-nuke' => "Nuke!",
+   'nukedpl-list' => "The following pages were selected by DPL-query: 
$1 hit the button to delete them.",
+   'nukedpl-defaultreason' => "Mass removal of pages selected by 
DPL-query: ($1)",
+);
+
+$messages['de'] = array(
+   'nukedpl' => 'Massenlöschung mittels DPL query',
+   'nukedpl-desc' => 'Ergänzt eine [[Spezial:NukeDPL|Spezialseite]], die 
das massenhafte Löschen von Seiten per DPL-Query ermöglicht',
+   'nukedpl-intro' => "Diese Spezialseite erlaubt das Löschen von Seiten, 
die mittels einer DPL-Query ausgewählt wurden.
+Geben Sie unten eine DPL-Query ein, um eine Liste mit den zu löschenden Seiten 
zu generieren.
+* Seiten können aus der Liste der zu löschenden Seiten vor dem Löschen noch 
individuell entfernt werden
+* Seitentitel sind case-sensitive!
+* Queries werden nicht durch DPL Tags oder Klammern umschlossen!
+* Erklärungen zu den Parametern finden Sie auf der Seite 
[http://semeb.com/dpldemo/index.php?title=DPL:Manual DPL Manual].",
+   'nukedpl-candidatelist' => 'Anzeige der Löschkandidaten',
+   'nukedpl-nopages' => "Keine Seiten zum Löschen bei folgendem DPL-Query: 
$1",
+   'nukedpl-nuke' => "Löschen!",
+   'nukedpl-list' => "Die folgenden Seiten wurden gefunen. DPL-Query: 
$1Button drücken, um diese zu löschen.",
+   'nukedpl-defaultreason' => "Massenlöschung von Seiten mittels 
DPL-Query: ($1)",
+);
\ No newline at end of file
diff --git a/NukeDPL.php b/NukeDPL.php
new file mode 100644
index 000..225efc5
--- /dev/null
+++ b/NukeDPL.php
@@ -0,0 +1,55 @@
+ 'NukeDPL',
+   'author' => array( '[[User:Nad|Nad]]', '[[User:Luis Felipe 
Schenone|LFS]]' ),
+   'version' => 1.3,
+   'descriptionmsg' => 'nukedpl-desc',
+   'url' => 'http://www.mediawiki.org/wiki/Extension:NukeDPL',
+);
+
+$wgAvailableRights[] = 'nukeDPL';
+
+$wgGroupPermissions['sysop']['nukeDPL'] = true;
+
+$wgSpecialPages['NukeDPL'] = 'SpecialNukeDPL';
+
+$wgSpecialPageGroups['NukeDPL'] = 'pagetools';
+
+$wgExtensionMessagesFiles['NukeDPL'] = __DIR__ . '/NukeDPL.i18n.php';
+
+$wgAutoloadClasses['SpecialNukeDPL'] = __DIR__ . '/SpecialNukeDPL.php';
+
+$egNukeDPLDefaultText = '
+distinct  = true | false
+ignorecase= true | false
+title = Article
+nottitle  = Article
+titlematch= %fragment%
+nottitlematch = %fragment%
+titleregexp   = ^.+$
+nottitleregexp= ^.+$
+category  = Category1 | Category2
+notcategory   = Category1 | Category2
+categorymatch = %fragment%
+notcategorymatch  = %fragment%
+categoryregexp= ^.+$
+notcategoryregexp = ^.+$
+namespace = Namespace1 | Namespace2
+notnamespace  = Namespace1 | Namespace2
+linksfrom = Foo | Bar
+notlinksfrom  = Foo | Bar
+linksto   = Foo|Bar
+notlinksto= Foo|Bar
+imageused = Foo.jpg
+imagecontainer= Article1 | Article2
+uses  = Template1 | Template2
+notuses   = Template1 | Template2
+redirects = exclude | include | only
+createdby = User
+notcreatedby  = User
+modifiedby= User
+notmodifiedby = User
+lastmodifiedby= User
+notlastmodifiedby = User
+';
\ No newline at end of file
diff --git a/SpecialNukeDPL.php b/SpecialNukeDPL.php
new file mode 100644
index 000..72f5ba1
--- /dev/null
+++ b/SpecialNukeDPL.php
@@ -0,0 +1,95 @@
+getUser();
+   if ( !$this->userCanExecute( $user ) ) {
+   $this->displayRes

[MediaWiki-commits] [Gerrit] Protect against XSS attack. - change (mediawiki...SemanticTitle)

2014-03-25 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Protect against XSS attack.
..


Protect against XSS attack.

Change-Id: I56a498d415ae708371237cf2255ab6e20939e25c
---
M SemanticTitle.class.php
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Cicalese: Looks good to me, approved
  Yaron Koren: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/SemanticTitle.class.php b/SemanticTitle.class.php
index b5ce5e6..065bebb 100644
--- a/SemanticTitle.class.php
+++ b/SemanticTitle.class.php
@@ -52,7 +52,7 @@
$value->getDIType() == 
SMWDataItem::TYPE_BLOB ) {
$name = $value->getString();
if ( $name != '' ) {
-   return $name;
+   return htmlentities($name, 
ENT_QUOTES);
}; // if
}; // if
}; // if

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I56a498d415ae708371237cf2255ab6e20939e25c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SemanticTitle
Gerrit-Branch: master
Gerrit-Owner: Cicalese 
Gerrit-Reviewer: Cicalese 
Gerrit-Reviewer: Rcdeboer 
Gerrit-Reviewer: Yaron Koren 
Gerrit-Reviewer: Yury Katkov 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Putting back several translations that where somehow lost - change (mediawiki...DisqusTag)

2014-03-25 Thread Luis Felipe Schenone (Code Review)
Luis Felipe Schenone has uploaded a new change for review.

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

Change subject: Putting back several translations that where somehow lost
..

Putting back several translations that where somehow lost

Change-Id: Ib2dd20acf1e595fed922e212470a266beafe4df3
---
M DisqusTag.i18n.php
1 file changed, 42 insertions(+), 0 deletions(-)


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

diff --git a/DisqusTag.i18n.php b/DisqusTag.i18n.php
index 57d9bb5..e7ffaf8 100644
--- a/DisqusTag.i18n.php
+++ b/DisqusTag.i18n.php
@@ -65,6 +65,13 @@
'disqustag-desc' => 'Engade a etiqueta  para 
inserir unha ligazón en liña que abre ventás emerxentes con conversas de 
[http://disqus.com Disqus]',
 );
 
+/** Upper Sorbian (hornjoserbsce)
+ * @author Michawiki
+ */
+$messages['hsb'] = array(
+   'disqustag-desc' => 'Přidawa element  za 
zasadźenje wotkaza do linkow, kotryž [http://disqus.com Disqus]-diskusije 
zwobraznja',
+);
+
 /** Hebrew (עברית)
  * @author Yona b
  */
@@ -93,6 +100,13 @@
'disqustag-desc' => '[http://disqus.com Disqus] の議論がポップアップするインライン 
リンクを挿入する  タグを追加する',
 );
 
+/** Korean (한국어)
+ * @author Priviet
+ */
+$messages['ko'] = array(
+   'disqustag-desc' => ' 태그를 추가하여 
[http://disqus.com Disqus] 토론 팝업을 띄우는 인라인 링크 삽입',
+);
+
 /** Latvian (latviešu)
  * @author Papuass
  */
@@ -105,6 +119,20 @@
  */
 $messages['mk'] = array(
'disqustag-desc' => 'Дава ознака  што се 
става во врска во самиот текст и дава скокачко прозорче за дискусии со 
[http://disqus.com Disqus]',
+);
+
+/** Dutch (Nederlands)
+ * @author Siebrand
+ */
+$messages['nl'] = array(
+   'disqustag-desc' => 'Voegt het label  toe om 
een koppeling toe te voegen voor een popup naar discussies in 
[http://disqus.com Disqus]',
+);
+
+/** Brazilian Portuguese (português do Brasil)
+ * @author Cainamarques
+ */
+$messages['pt-br'] = array(
+   'disqustag-desc' => 'Adiciona a etiqueta  
para inserir um ligação em linha que abre janelas [http://disqus.com Disqus] de 
discussão.',
 );
 
 /** Portuguese (português)
@@ -142,9 +170,23 @@
'disqustag-desc' => 'Doda oznako , ki vstavi 
znotrajvrstično povezavo za izskok pogovorov na spletišču [http://disqus.com 
Disqus]',
 );
 
+/** Swedish (svenska)
+ * @author Ainali
+ */
+$messages['sv'] = array(
+   'disqustag-desc' => 'Lägger till -taggen för 
att infoga en länk som öppnar upp [http://disqus.com Disqus]-diskussioner',
+);
+
 /** Ukrainian (українська)
  * @author Andriykopanytsia
  */
 $messages['uk'] = array(
'disqustag-desc' => 'Додає теґ , щоб 
вставити вбудоване посилання на спливні обговорення [http://disqus.com Disqus]',
 );
+
+/** Simplified Chinese (中文(简体)‎)
+ * @author Yfdyh000
+ */
+$messages['zh-hans'] = array(
+   'disqustag-desc' => 
'添加标签,用以增加一个弹出[http://disqus.com Disqus]讨论的内文链接',
+);

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib2dd20acf1e595fed922e212470a266beafe4df3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DisqusTag
Gerrit-Branch: master
Gerrit-Owner: Luis Felipe Schenone 

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


[MediaWiki-commits] [Gerrit] One DOMUtils is plenty - change (mediawiki...parsoid)

2014-03-25 Thread Arlolra (Code Review)
Arlolra has uploaded a new change for review.

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

Change subject: One DOMUtils is plenty
..

One DOMUtils is plenty

Change-Id: I86c55eb0f5bb8b205608cb9993a2b084c4cfae92
---
M tests/parserTests.js
1 file changed, 3 insertions(+), 4 deletions(-)


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

diff --git a/tests/parserTests.js b/tests/parserTests.js
index 0198f21..11cc487 100755
--- a/tests/parserTests.js
+++ b/tests/parserTests.js
@@ -25,7 +25,6 @@
yargs = require('yargs'),
Alea = require('alea'),
DU = require('../lib/mediawiki.DOMUtils.js').DOMUtils,
-   DOMUtils = require( '../lib/mediawiki.DOMUtils.js' ).DOMUtils,
Logger = require('../lib/Logger.js').Logger,
PEG = require('pegjs'),
Util = require( '../lib/mediawiki.Util.js' ).Util;
@@ -528,7 +527,7 @@
if (wrapperName) {
newNode = ownerDoc.createElement(wrapperName);
newNode.appendChild(ownerDoc.createTextNode(str));
-   } else if (DOMUtils.isFosterablePosition(n)) {
+   } else if (DU.isFosterablePosition(n)) {
newNode = ownerDoc.createComment(str);
} else {
newNode = ownerDoc.createTextNode(str);
@@ -663,7 +662,7 @@
 * Currently true for template and extension content.
 */
function domSubtreeIsEditable(env, node) {
-   return !DOMUtils.isTplElementNode(env, node);
+   return !DU.isTplElementNode(env, node);
}
 
/**
@@ -675,7 +674,7 @@
 */
function nodeIsUneditable(node) {
// Text and comment nodes are always editable
-   if (!DOMUtils.isElt(node)) {
+   if (!DU.isElt(node)) {
return false;
}
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I86c55eb0f5bb8b205608cb9993a2b084c4cfae92
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] Store event handler proxy for size change - change (mediawiki...MultimediaViewer)

2014-03-25 Thread Code Review
Gergő Tisza has uploaded a new change for review.

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

Change subject: Store event handler proxy for size change
..

Store event handler proxy for size change

Workaround for bug 63094.

Change-Id: I91855802486cd25e7109cad7d656eb40f6a3580c
---
M resources/mmv/ui/mmv.ui.reuse.embed.js
1 file changed, 7 insertions(+), 4 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MultimediaViewer 
refs/changes/79/120979/1

diff --git a/resources/mmv/ui/mmv.ui.reuse.embed.js 
b/resources/mmv/ui/mmv.ui.reuse.embed.js
index 54013b5..567ba2c 100644
--- a/resources/mmv/ui/mmv.ui.reuse.embed.js
+++ b/resources/mmv/ui/mmv.ui.reuse.embed.js
@@ -253,9 +253,12 @@
// Register handler for switching between wikitext/html snippets
this.embedSwitch.on( 'select', $.proxy( embed.handleTypeSwitch, 
embed ) );
 
+   // workaround for bug 63094
+   this.proxiedHandleSizeSwitch = this.proxiedHandleSizeSwitch  || 
$.proxy( this.handleSizeSwitch, this );
+
// Register handlers for switching between file sizes
-   this.embedHtmlSizeSwitch.getMenu().on( 'select', $.proxy( 
embed.handleSizeSwitch, embed ) );
-   this.embedWtSizeSwitch.getMenu().on( 'select', $.proxy( 
embed.handleSizeSwitch, embed ) );
+   this.embedHtmlSizeSwitch.getMenu().on( 'select', 
this.proxiedHandleSizeSwitch );
+   this.embedWtSizeSwitch.getMenu().on( 'select', 
this.proxiedHandleSizeSwitch );
};
 
/**
@@ -267,8 +270,8 @@
this.embedTextHtml.offDOMEvent( 'focus mousedown click' );
this.embedTextWikitext.offDOMEvent( 'focus mousedown click' );
this.embedSwitch.off( 'select' );
-   this.embedHtmlSizeSwitch.getMenu().off( 'select' );
-   this.embedWtSizeSwitch.getMenu().off( 'select' );
+   this.embedHtmlSizeSwitch.getMenu().off( 'select', 
this.proxiedHandleSizeSwitch );
+   this.embedWtSizeSwitch.getMenu().off( 'select', 
this.proxiedHandleSizeSwitch );
};
 
/**

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

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

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


[MediaWiki-commits] [Gerrit] Typography update to Vector skin - change (mediawiki/core)

2014-03-25 Thread Kaldari (Code Review)
Kaldari has uploaded a new change for review.

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

Change subject: Typography update to Vector skin
..

Typography update to Vector skin

See https://www.mediawiki.org/wiki/Typography_refresh

Change-Id: Ic5ba836364d04b2c3814777b69b5f47fce25292a
---
M skins/vector/components/common.less
M skins/vector/variables.less
2 files changed, 73 insertions(+), 5 deletions(-)


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

diff --git a/skins/vector/components/common.less 
b/skins/vector/components/common.less
index 8e7fc4d..0e72d20 100644
--- a/skins/vector/components/common.less
+++ b/skins/vector/components/common.less
@@ -40,6 +40,73 @@
background-color: @body-background-color;
color: @content-font-color;
direction: ltr;
+
+   .mw-editsection {
+   font-family: @content-font-family;
+   }
+
+   p {
+   line-height: inherit;
+   margin: 0.5em 0;
+   }
+
+   h1,
+   #firstHeading {
+   font-family: @content-heading-font-family;
+   font-size: 1.8em;
+   line-height: @heading-line-height;
+   margin-bottom: 0.25em;
+   padding: 0;
+   }
+
+   h2 {
+   font-family: @content-heading-font-family;
+   font-size: 1.5em;
+   line-height: @heading-line-height;
+   margin-top: 1em;
+   margin-bottom: 0.25em;
+   padding: 0;
+   }
+
+   h3,
+   h4,
+   h5,
+   h6 {
+   line-height: @content-line-height;
+   margin-top: 0.3em;
+   margin-bottom: 0;
+   padding-bottom: 0;
+   }
+
+   h3 {
+   font-size: 1.17em;
+   }
+
+   h3,
+   h4 {
+   font-weight: bold;
+   }
+
+   h4,
+   h5,
+   h6 {
+   font-size: 100%; /* (reset) */
+   }
+
+   #toc h2, .toc h2 {
+   font-size: 100%; /* (reset) */
+   font-family: @content-font-family;
+   }
+
+   // Give extra long preformatted content horizontal scroll bars
+   pre {
+   overflow-x: auto;
+   }
+
+   // Prevent citations from interfering with the line-height
+   sup {
+   line-height: 0;
+   }
 }
 
 /* Hide empty portlets */
diff --git a/skins/vector/variables.less b/skins/vector/variables.less
index 2af6389..e4eb2fa 100644
--- a/skins/vector/variables.less
+++ b/skins/vector/variables.less
@@ -5,14 +5,15 @@
 // Page content
 // FIXME: Use global variable since Echo and CentralNotice use this variable
 @content-border-color: #a7d7f9;
-@content-font-family: sans-serif;
-@content-font-color: black;
-@content-font-size: 0.8em;
-@content-line-height: 1.5em;
+@content-font-family: Arimo, "Liberation Sans", "Helvetica Neue", Helvetica, 
Arial, sans-serif;
+@content-font-color: #252525;
+@content-font-size: 0.875em;
+@content-line-height: 1.6;
 @content-padding: 1em;
 @content-heading-font-size: 1.6em;
-@content-heading-font-family: sans-serif;
+@content-heading-font-family: "Linux Libertine", Georgia, Times, serif;
 @body-background-color: #fff;
+@heading-line-height: 1.3;
 
 // Navigation
 @menu-background-color: #f6f6f6;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic5ba836364d04b2c3814777b69b5f47fce25292a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
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] Use wikibase.RepoApi in lib JavaScript - change (mediawiki...Wikibase)

2014-03-25 Thread Hoo man (Code Review)
Hoo man has uploaded a new change for review.

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

Change subject: Use wikibase.RepoApi in lib JavaScript
..

Use wikibase.RepoApi in lib JavaScript

Just to make sure this is really component independent (mw.Api only
queries the local api, while wikibase.RepoApi always queries the
api of the repo).

Change-Id: I88f0173f8a6fbc9385cb3c7f223f4e674460a190
---
M lib/resources/Resources.php
M lib/resources/formatters/wikibase.formatters.api.js
M lib/resources/parsers/wikibase.parsers.api.js
3 files changed, 8 insertions(+), 7 deletions(-)


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

diff --git a/lib/resources/Resources.php b/lib/resources/Resources.php
index 96b254b..1f90098 100644
--- a/lib/resources/Resources.php
+++ b/lib/resources/Resources.php
@@ -63,6 +63,7 @@
'parsers/wikibase.parsers.api.js',
),
'dependencies' => array(
+   'wikibase.RepoApi',
'wikibase',
),
),
@@ -129,7 +130,7 @@
'formatters/wikibase.formatters.api.js',
),
'dependencies' => array(
-   'mediawiki.api',
+   'wikibase.RepoApi',
'wikibase',
'wikibase.dataTypes'
),
diff --git a/lib/resources/formatters/wikibase.formatters.api.js 
b/lib/resources/formatters/wikibase.formatters.api.js
index 4c3f497..04b9d57 100644
--- a/lib/resources/formatters/wikibase.formatters.api.js
+++ b/lib/resources/formatters/wikibase.formatters.api.js
@@ -2,12 +2,12 @@
  * @licence GNU GPL v2+
  * @author H. Snater < mediaw...@snater.com >
  */
-( function( mw, wb, $, dataTypeStore ) {
+( function( wb, $, dataTypeStore ) {
'use strict';
 
wb.formatters = wb.formatters || {};
 
-   var api = new mw.Api();
+   var api = new wb.RepoApi();
 
/**
 * ValueFormatters API.
@@ -80,4 +80,4 @@
return deferred.promise();
};
 
-}( mediaWiki, wikibase, jQuery, wikibase.dataTypes ) );
+}( wikibase, jQuery, wikibase.dataTypes ) );
diff --git a/lib/resources/parsers/wikibase.parsers.api.js 
b/lib/resources/parsers/wikibase.parsers.api.js
index cce87d7..63577ae 100644
--- a/lib/resources/parsers/wikibase.parsers.api.js
+++ b/lib/resources/parsers/wikibase.parsers.api.js
@@ -3,12 +3,12 @@
  * @author Jeroen De Dauw < jeroended...@gmail.com >
  * @author H. Snater < mediaw...@snater.com >
  */
-( function( mw, wb, $, dv ) {
+( function( wb, $, dv ) {
'use strict';
 
wb.parsers = wb.parsers || {};
 
-   var api = new mw.Api();
+   var api = new wb.RepoApi();
 
/**
 * ValueParsers API.
@@ -85,4 +85,4 @@
}
}
 
-}( mediaWiki, wikibase, jQuery, dataValues ) );
+}( wikibase, jQuery, dataValues ) );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I88f0173f8a6fbc9385cb3c7f223f4e674460a190
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Hoo man 

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


[MediaWiki-commits] [Gerrit] puppet repo local linter - change (operations/puppet)

2014-03-25 Thread Rush (Code Review)
Rush has uploaded a new change for review.

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

Change subject: puppet repo local linter
..

puppet repo local linter

seems there was one that has not been used, or at least references
files no longer in existence since:

  Commit:  e8124806f30309bfb24350d1d6bb95ebc2017d5c
  Date:(8 months ago) 2013-08-01 19:43:45 +

Change-Id: I9e3d71c793863efa7a8c2cc5bb506fb8a39993dd
---
A linter
D local-lint
2 files changed, 58 insertions(+), 12 deletions(-)


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

diff --git a/linter b/linter
new file mode 100644
index 000..4d241c5
--- /dev/null
+++ b/linter
@@ -0,0 +1,58 @@
+#!/bin/bash
+
+usage ()
+{
+  echo "${0} -- linting puppet files"
+  echo ''
+  echo '* Without argument it lints mod files in "git status"'
+  echo '* $1 can also be a path directive to find .pp files under'
+  echo '* $1 as "site" lints site.pp explicitly'
+  echo ''
+  exit
+}
+
+bold=`tput bold`
+normal=`tput sgr0`
+
+PUPPET_LINTER=/usr/bin/puppet-lint
+test -x $PUPPET_LINTER || { echo "$PUPPET_LINTER not installed";
+if [ "$1" = "-h" ]; then exit 0;
+else usage; exit 1; fi; }
+
+if [ "$1" == "-h" ]
+  then
+usage
+exit 0
+fi
+
+if [ "$1" == "site" ]
+  then
+pfiles="manifests/site.pp"
+elif [ "$#" -gt 0 ]
+  then
+pfiles=`find ${1}/* | grep .pp`
+echo $pfiles
+else
+  pfiles=`git status | grep modified | awk '{print $3}'`
+fi
+
+if [ ${#pfiles[@]} -eq 0 ]; then
+  echo "No files found to lint"
+fi
+
+linter () {
+  tmp=`mktemp -u /tmp/%s.`
+  for file in $1
+do
+  puppet-lint $file > $tmp
+  if [ -s $tmp ]
+then
+  echo "${bold}${file}${normal}"
+  grep --color -E '^|WARNING|ERROR' $tmp
+  printf '%0.1s' "-"{1..60}; echo ""
+  fi
+rm $tmp
+  done
+}
+
+linter $pfiles
diff --git a/local-lint b/local-lint
deleted file mode 100755
index 28eb2ca..000
--- a/local-lint
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/bin/bash
-
-echo "Running a local test parse of puppet..."
-
-sed -i 's%^import "../private%#LINT#import "../private%' manifests/base.pp
-
-# Run the parser validation step, but ignore warnings about storeconfigs not
-# being set, as that is only set on the puppet master.
-puppet parser validate manifests/site.pp \
-| grep -v "You cannot collect.*storeconfig"
-
-sed -i 's%^#LINT#import "../private%import "../private%' manifests/base.pp

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

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

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


[MediaWiki-commits] [Gerrit] Ignore WIP patches when evaluating - change (mediawiki...MobileFrontend)

2014-03-25 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Ignore WIP patches when evaluating
..


Ignore WIP patches when evaluating

Sometimes WIP patches get pushed but not marked as -1 or -2
Let's exclude these when evaluating whether we have too many open patches

Change-Id: I108c7f4819d4479f72ac187990313e4fb64972d7
---
M scripts/pre-review
1 file changed, 2 insertions(+), 1 deletion(-)

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



diff --git a/scripts/pre-review b/scripts/pre-review
index 0f94c15..83840d5 100755
--- a/scripts/pre-review
+++ b/scripts/pre-review
@@ -41,7 +41,8 @@
 # This patch is updating an existing one so let's allow it.
 if change["change_id"] in commit:
 revised_patch = True
-if 'disliked' not in reviews and 'rejected' not in reviews and 'approved' 
not in reviews:
+wip = 'WIP' in change['subject']
+if 'disliked' not in reviews and 'rejected' not in reviews and 'approved' 
not in reviews and not wip:
 open_patches += 1
 
 if open_patches > 5 and not revised_patch:

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I108c7f4819d4479f72ac187990313e4fb64972d7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson 
Gerrit-Reviewer: Awjrichards 
Gerrit-Reviewer: JGonera 
Gerrit-Reviewer: Jdlrobson 
Gerrit-Reviewer: Kaldari 
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] Proper edit handling in case of redirects where page does no... - change (mediawiki...MobileFrontend)

2014-03-25 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Proper edit handling in case of redirects where page does not 
exist
..


Proper edit handling in case of redirects where page does not exist

* Add QA tests
** Separate the confirm prompt into a separate action

Bug: 62175
Change-Id: Iadaacc535283b0ba3d4cd6d3530b615bbf71ff40
---
M javascripts/modules/editor/EditorOverlayBase.js
M tests/browser/features/editor_ve.feature
M tests/browser/features/editor_wikitext_nosave.feature
M tests/browser/features/editor_wikitext_saving.feature
M tests/browser/features/step_definitions/common_steps.rb
M tests/browser/features/step_definitions/editor_steps.rb
M tests/browser/features/step_definitions/uploads_steps.rb
M tests/browser/features/uploads_lead.feature
8 files changed, 55 insertions(+), 22 deletions(-)

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



diff --git a/javascripts/modules/editor/EditorOverlayBase.js 
b/javascripts/modules/editor/EditorOverlayBase.js
index 23633fa..0defe3f 100644
--- a/javascripts/modules/editor/EditorOverlayBase.js
+++ b/javascripts/modules/editor/EditorOverlayBase.js
@@ -61,7 +61,11 @@
 
// FIXME: use generic method for following 3 lines
M.pageApi.invalidatePage( title );
-   new Page( { title: title, el: $( '#content_wrapper' ) } 
).on( 'ready', M.reloadPage );
+   new Page( { title: title, el: $( '#content_wrapper' ) } 
).on( 'ready', M.reloadPage ).
+   on( 'error', function() {
+   // Force refresh when something goes 
wrong (see bug 62175 for example)
+   window.location = mw.util.getUrl( title 
);
+   } );
M.router.navigate( '' );
 
if ( this.isNewPage ) {
diff --git a/tests/browser/features/editor_ve.feature 
b/tests/browser/features/editor_ve.feature
index f64507d..8d5f26f 100644
--- a/tests/browser/features/editor_ve.feature
+++ b/tests/browser/features/editor_ve.feature
@@ -12,7 +12,7 @@
 And The VisualEditor overlay has an editor mode switcher button
 And I click the editor mode switcher button
   When I click the source editor button
-  Then I see the wikitext editor
+  Then I see the wikitext editor overlay
 
 Scenario: Ensure we load the correct section
   Given I am on the "Duel Masters" page
diff --git a/tests/browser/features/editor_wikitext_nosave.feature 
b/tests/browser/features/editor_wikitext_nosave.feature
index a6eda08..cfba919 100644
--- a/tests/browser/features/editor_wikitext_nosave.feature
+++ b/tests/browser/features/editor_wikitext_nosave.feature
@@ -3,18 +3,16 @@
 
   Background:
 Given I am logged into the mobile website
-  And I am on the "Nonexistent_page_ijewrcmhvg34773" page
+  And I am on a page that does not exist
 When I click the edit button
 
   Scenario: Opening editor
-Then I see the wikitext editor
+Then I see the wikitext editor overlay
 
   Scenario: Closing editor (overlay button)
-When I click the editor overlay close button
-Then I should not see the editor overlay
-  And The URL of the page should contain "Nonexistent_page_ijewrcmhvg34773"
+When I click the wikitext editor overlay close button
+Then I should not see the wikitext editor overlay
 
   Scenario: Closing editor (browser button)
 When I click the browser back button
-Then I should not see the editor overlay
-  And The URL of the page should contain "Nonexistent_page_ijewrcmhvg34773"
+Then I should not see the wikitext editor overlay
diff --git a/tests/browser/features/editor_wikitext_saving.feature 
b/tests/browser/features/editor_wikitext_saving.feature
index 75d98b2..8e0c929 100644
--- a/tests/browser/features/editor_wikitext_saving.feature
+++ b/tests/browser/features/editor_wikitext_saving.feature
@@ -3,14 +3,36 @@
 
   Background:
 Given I am logged into the mobile website
-  And I am on the "San Francisco" page
 
   Scenario: Successful edit reloads language button
+And I am on the "San Francisco" page
 And I see the read in another language button
 When I click the edit button
-  And I see the wikitext editor
+  And I see the wikitext editor overlay
   And I type "ABC GHI" into the editor
   And I click continue
   And I click submit
 Then I see a toast notification
   And I see the read in another language button
+
+  Scenario: Redirects
+And I am on a page that does not exist
+When I click the edit button
+  And I clear the editor
+  And I type "#REDIRECT [[Barack Obama]]" into the editor
+  And I click continue
+  And I click submit
+  And I say OK in the confirm dialog
+Then I should not see the wikitext editor overlay
+  And The text of

[MediaWiki-commits] [Gerrit] Barebones Wikipedia Zero support for FFOS. - change (apps...wikipedia)

2014-03-25 Thread Dr0ptp4kt (Code Review)
Dr0ptp4kt has uploaded a new change for review.

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

Change subject: Barebones Wikipedia Zero support for FFOS.
..

Barebones Wikipedia Zero support for FFOS.

* This gets us by for some future state.
* In rebooted app we would do radio and some sort of header, inspection.

Change-Id: I60c7c408a0e01b81e9d0fe2108de0138804e7b74
---
M js/lib/chrome.js
M messages/messages-ast.properties
M messages/messages-br.properties
M messages/messages-ca.properties
M messages/messages-cs.properties
M messages/messages-cy.properties
M messages/messages-de.properties
M messages/messages-en.properties
M messages/messages-es.properties
M messages/messages-fa.properties
M messages/messages-fr.properties
M messages/messages-he.properties
M messages/messages-hsb.properties
M messages/messages-lb.properties
M messages/messages-mk.properties
M messages/messages-nl.properties
M messages/messages-ro.properties
M messages/messages-ru.properties
M messages/messages-sv.properties
M messages/messages-uk.properties
M messages/messages-vi.properties
21 files changed, 39 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/apps/firefox/wikipedia 
refs/changes/75/120975/1

diff --git a/js/lib/chrome.js b/js/lib/chrome.js
index f2bce57..be9e892 100644
--- a/js/lib/chrome.js
+++ b/js/lib/chrome.js
@@ -202,7 +202,25 @@
}
 
function loadFirstPage() {
-   var lastReadPage = localStorage["lastReadPage"];
+   var lastReadPage = localStorage["lastReadPage"],
+
+   /* We'll check one time here if it's Wikipedia Zero */
+   lang = preferencesDB.get('language') || 'en',
+   wikipediaZeroMessageUrl = window.PROTOCOL + '://' + 
lang + '.m.' + window.PROJECTNAME + 
'.org/w/api.php?action=zeroconfig&type=message&agent=ffos-wikipedia';
+   $.ajax({
+   url: wikipediaZeroMessageUrl,
+   dataType: 'jsonp',
+   success: function(json) {
+   if(json && json.message) {
+   alert(json.message);
+   $('#searchParam').attr('placeholder', 
mw.msg('zero-search-hint' ).toString());
+   }
+   },
+   error: function(error) {
+   console.log('Error obtaining W0 status:' + 
error.message);
+   }
+   });
+   /* Now, back to our regularly scheduled program */
return lastReadPage ? app.navigateToPage(lastReadPage) : 
app.loadMainPage();
}
 
diff --git a/messages/messages-ast.properties b/messages/messages-ast.properties
index b80d3b1..125feb2 100644
--- a/messages/messages-ast.properties
+++ b/messages/messages-ast.properties
@@ -106,3 +106,4 @@
 confirm-button-not-now=Agora non
 migrating-saved-pages-confirm-title=¿Anovar?
 migrating-saved-pages-confirm-cancel=Les páxines guardaes anteriormente tarán 
desactivaes fasta que s'anueven. Volverá a intentase l'anovamientu la próxima 
vez que s'anicie l'aplicación.
+zero-search-hint=Guetar en Wikipedia Zero
diff --git a/messages/messages-br.properties b/messages/messages-br.properties
index f3d10dc..af1b81a 100644
--- a/messages/messages-br.properties
+++ b/messages/messages-br.properties
@@ -106,3 +106,4 @@
 confirm-button-not-now=Ket diouzhtu
 migrating-saved-pages-confirm-title=Hizivaat ?
 migrating-saved-pages-confirm-cancel=Diweredekaet e vo ar pajennoù enrollet 
betek-henn betek ma vint hizivaet. Klasket e vo hizivaat adarre kentañ tro ma 
loc'ho an arload.
+zero-search-hint=Klask e Wikipedia Zero
diff --git a/messages/messages-ca.properties b/messages/messages-ca.properties
index 3b42ab5..cc57afb 100644
--- a/messages/messages-ca.properties
+++ b/messages/messages-ca.properties
@@ -107,3 +107,4 @@
 confirm-button-not-now=Ara no
 migrating-saved-pages-confirm-title=S'actualitza?
 migrating-saved-pages-confirm-cancel=S'inhabilitaran les pàgines desades 
anteriorment fins que les actualitzeu. Es tornarà a provar d'actualitzar-les la 
propera vegada que l'aplicació s'iniciï.
+zero-search-hint=Cerca a Viquipèdia Zero
diff --git a/messages/messages-cs.properties b/messages/messages-cs.properties
index 33947d4..01d3331 100644
--- a/messages/messages-cs.properties
+++ b/messages/messages-cs.properties
@@ -109,3 +109,4 @@
 confirm-button-not-now=Teď ne
 migrating-saved-pages-confirm-title=Aktualizovat?
 migrating-saved-pages-confirm-cancel=Dříve uložené stránky budou nedostupné, 
dokud nebudou aktualizovány. O aktualizaci se znovu pokusíme při příštím startu 
aplikace.
+zero-search-hint=Hledání ve Wikipedia Zero
\ No newline at end of file
diff --git a/messages/messages-cy.properties b/messages/messages-cy.properties
index 35c806e..99c962b 100644
--- a/messages/messages-cy.prope

[MediaWiki-commits] [Gerrit] Allow copying DAO objects - change (mediawiki...OAuth)

2014-03-25 Thread CSteipp (Code Review)
CSteipp has uploaded a new change for review.

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

Change subject: Allow copying DAO objects
..

Allow copying DAO objects

To allow copying between databases, it seems like it would be useful
to allow DAO's to be copied.

Change-Id: Iad92f94a73069daf80e0c612ea3c23d4b470f0de
---
M backend/MWOAuthConsumerAcceptance.php
M backend/MWOAuthDAO.php
2 files changed, 14 insertions(+), 1 deletion(-)


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

diff --git a/backend/MWOAuthConsumerAcceptance.php 
b/backend/MWOAuthConsumerAcceptance.php
index 9bafdab..0005c6e 100644
--- a/backend/MWOAuthConsumerAcceptance.php
+++ b/backend/MWOAuthConsumerAcceptance.php
@@ -33,7 +33,7 @@
/** @var string Hex token */
protected $accessToken;
/** @var string Secret HMAC key */
-   protected $secretToken;
+   protected $accessSecret;
/** @var array List of grants */
protected $grants;
/** @var string TS_MW timestamp of acceptance */
diff --git a/backend/MWOAuthDAO.php b/backend/MWOAuthDAO.php
index fe6704f..63f0f42 100644
--- a/backend/MWOAuthDAO.php
+++ b/backend/MWOAuthDAO.php
@@ -414,4 +414,17 @@
final public function checkChangeToken( RequestContext $context, 
$oldToken ) {
return ( $this->getChangeToken( $context ) === $oldToken );
}
+
+   /**
+* Clone this to another object
+* @return MWOAuthDAO
+*/
+   public function copy( DBConnRef $db ) {
+   $new = new static();
+   $rowVals = $this->decodeRow( $db, $this->getRowArray( $db ) );
+   foreach ( static::getFieldColumnMap() as $field => $column ) {
+   $new->setField( $field,  $rowVals[$column] );
+   }
+   return $new;
+   }
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iad92f94a73069daf80e0c612ea3c23d4b470f0de
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/OAuth
Gerrit-Branch: master
Gerrit-Owner: CSteipp 

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


[MediaWiki-commits] [Gerrit] Various minor code quality fixes and clean up - change (mediawiki...NavigationTiming)

2014-03-25 Thread Krinkle (Code Review)
Krinkle has uploaded a new change for review.

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

Change subject: Various minor code quality fixes and clean up
..

Various minor code quality fixes and clean up

Fixes:
* Add \b to Firefox User-Agent match, this prevents matching
  against a potential Firefox v70-89.
* Use boolean cast instead of isPlainObject (unnecessarily strict).
  No need to hardcode that it happens to be implemented as an an
  object literal right now, the API is its properties. The check
  is still useful to have in general so that we avoid an Uncaught
  TypeError for property of non-object if it is something
  unexpected, but a truethy check suffices (all truethy values
  support dot property access).
* Omit second argument to setTimeout (inspired by jQuery core).

Clean up:
* Avoid underscores in variable names.
* Avoid undescriptive variable names like "_", in this case "i"
  isn't much more descriptive by itself other than by convention
  for iteration counter.
* Whitespace.

Change-Id: I2557386f7e12bf2985b1396acba820a1bf79bd40
---
M modules/ext.navigationTiming.js
1 file changed, 11 insertions(+), 11 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/NavigationTiming 
refs/changes/73/120973/1

diff --git a/modules/ext.navigationTiming.js b/modules/ext.navigationTiming.js
index f5947c7..14463db 100644
--- a/modules/ext.navigationTiming.js
+++ b/modules/ext.navigationTiming.js
@@ -21,7 +21,7 @@
/** Assert that the attribute order complies with the W3C spec. **/
function isCompliant() {
// Tests derived from 
+   // master/navigation-timing/test_timing_attributes_order.html>
var attr, current, last = 0, order = [
'loadEventEnd',
'loadEventStart',
@@ -40,7 +40,7 @@
return false;
}
 
-   if ( /Firefox\/[78]/.test( navigator.userAgent ) ) {
+   if ( /Firefox\/[78]\b/.test( navigator.userAgent ) ) {
// The Navigation Timing API is broken in Firefox 7 and 
8 and reports
// inaccurate measurements. See 
.
return false;
@@ -74,7 +74,7 @@
'requestStart',
'responseEnd',
'responseStart'
-   ], function ( _, marker ) {
+   ], function ( i, marker ) {
var measure = timing[marker] - navStart;
if ( $.isNumeric( measure ) && measure > 0 ) {
timingData[ marker ] = measure;
@@ -96,13 +96,13 @@
function emitTiming() {
var mediaWikiLoadEnd = mw.now ? mw.now() : new Date().getTime(),
event = {
-   isHttps   : location.protocol === 'https:',
-   isAnon: mw.config.get( 'wgUserId' ) === 
null
+   isHttps: location.protocol === 'https:',
+   isAnon: mw.config.get( 'wgUserId' ) === null
},
page = {
-   pageId : mw.config.get( 'wgArticleId' ),
-   revId  : mw.config.get( 'wgCurRevisionId' ),
-   action : mw.config.get( 'wgAction' )  // view, 
submit, etc.
+   pageId: mw.config.get( 'wgArticleId' ),
+   revId: mw.config.get( 'wgCurRevisionId' ),
+   action: mw.config.get( 'wgAction' ) // view, 
submit, etc.
},
mobileMode = mw.config.get( 'wgMFMode' );
 
@@ -110,7 +110,7 @@
event.mediaWikiLoadComplete = Math.round( 
mediaWikiLoadEnd - mediaWikiLoadStart );
}
 
-   if ( $.isPlainObject( window.Geo ) && typeof Geo.country === 
'string' ) {
+   if ( window.Geo && typeof Geo.country === 'string' ) {
event.originCountry = Geo.country;
}
 
@@ -137,9 +137,9 @@
}
 
if ( inSample() ) {
-   // ensure we run after loadEventEnd.
+   // Ensure we run after loadEventEnd.
$( window ).load( function () {
-   setTimeout( emitTiming, 0 );
+   setTimeout( emitTiming );
} );
}
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2557386f7e12bf2985b1396acba820a1bf79bd40
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki

[MediaWiki-commits] [Gerrit] ops under new admin - change (operations/puppet)

2014-03-25 Thread Rush (Code Review)
Rush has uploaded a new change for review.

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

Change subject: ops under new admin
..

ops under new admin

ops is the worst example of why to break things up into
roles for modularity and reusability as it's a stasis group
with all rights.  no need for piecemeal.  But either way it should
be the first group defined.  This puts ops everywhere I could find.

Change-Id: I1fe981b82d1760e3ace8ca262d937d9245f2f110
---
M manifests/site.pp
A modules/admin/manifests/groups/ops.pp
A modules/admin/manifests/role/ops.pp
A modules/admin/manifests/users/ops.pp
4 files changed, 264 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/72/120972/1

diff --git a/manifests/site.pp b/manifests/site.pp
index d8c7ed2..df88799 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -38,6 +38,7 @@
 
 # Class for *most* servers, standard includes
 class standard {
+include admin::role::ops
 include base
 include ganglia
 include ntp::client
@@ -45,6 +46,7 @@
 }
 
 class standard-noexim {
+include admin::role::ops
 include base
 include ganglia
 include ntp::client
@@ -57,6 +59,7 @@
 # Node definitions (alphabetic order)
 
 node /^amslvs[1-4]\.esams\.wikimedia\.org$/ {
+include admin::role::ops
 if $::hostname =~ /^amslvs[12]$/ {
 $ganglia_aggregator = true
 }
@@ -77,6 +80,7 @@
 
 # amssq47 is a text varnish
 node /^amssq47\.esams\.wikimedia\.org$/ {
+include admin::role::ops
 include role::cache::text
 include role::cache::ssl::unified
 
@@ -85,6 +89,7 @@
 
 # amssq48-62 are text varnish
 node /^amssq(4[8-9]|5[0-9]|6[0-2])\.esams\.wikimedia\.org$/ {
+include admin::role::ops
 
 sysctl::parameters { 'vm dirty page flushes':
 values => {
@@ -253,6 +258,7 @@
 }
 
 include standard
+include admin::role::ops
 include admins::roots
 include misc::management::ipmi
 include role::installserver::tftp-server
@@ -350,6 +356,7 @@
 }
 
 node /^cp10(3[7-9]|40)\.eqiad\.wmnet$/ {
+include admin::role::ops
 if $::hostname =~ /^cp103[78]$/ {
 $ganglia_aggregator = true
 }
@@ -368,6 +375,7 @@
 }
 
 node 'cp1045.eqiad.wmnet', 'cp1058.eqiad.wmnet' {
+include admin::role::ops
 $ganglia_aggregator = true
 
 interface::add_ip6_mapped { 'main': }
@@ -377,6 +385,7 @@
 }
 
 node 'cp1046.eqiad.wmnet', 'cp1047.eqiad.wmnet', 'cp1059.eqiad.wmnet', 
'cp1060.eqiad.wmnet' {
+include admin::role::ops
 if $::hostname =~ /^cp104[67]$/ {
 $ganglia_aggregator = true
 }
@@ -387,6 +396,7 @@
 }
 
 node /^cp10(4[89]|5[01]|6[1-4])\.eqiad\.wmnet$/ {
+include admin::role::ops
 if $::hostname =~ /^(cp1048|cp1061)$/ {
 $ganglia_aggregator = true
 }
@@ -397,6 +407,7 @@
 }
 
 node /^cp10(5[2-5]|6[5-8])\.eqiad\.wmnet$/ {
+include admin::role::ops
 if $::hostname =~ /^cp105[23]$/ {
 $ganglia_aggregator = true
 }
@@ -407,6 +418,7 @@
 }
 
 node 'cp1056.eqiad.wmnet', 'cp1057.eqiad.wmnet', 'cp1069.eqiad.wmnet', 
'cp1070.eqiad.wmnet' {
+include admin::role::ops
 if $::hostname =~ /^cp105[67]$/ {
 $ganglia_aggregator = true
 }
@@ -430,6 +442,7 @@
 }
 
 node /^cp30(0[3-9]|10)\.esams\.wikimedia\.org$/ {
+include admin::role::ops
 if $::hostname =~ /^cp300[34]$/ {
 $ganglia_aggregator = true
 }
@@ -440,12 +453,14 @@
 }
 
 node /^cp301[1-4]\.esams\.wikimedia\.org$/ {
+include admin::role::ops
 interface::add_ip6_mapped { 'main': }
 
 include role::cache::mobile
 }
 
 node /^cp(3019|302[0-2])\.esams\.wikimedia\.org$/ {
+include admin::role::ops
 if $::hostname =~ /^cp(3019|3020)$/ {
 $ganglia_aggregator = true
 }
@@ -460,6 +475,7 @@
 #
 
 node /^cp400[1-4]\.ulsfo\.wmnet$/ {
+include admin::role::ops
 # cp4001 and cp4003 are in different racks,
 # make them each ganglia aggregators.
 if $::hostname =~ /^cp(4001|4003)$/ {
@@ -473,6 +489,7 @@
 }
 
 node /^cp40(0[5-7]|1[3-5])\.ulsfo\.wmnet$/ {
+include admin::role::ops
 if $::hostname =~ /^cp(4005|4013)$/ {
 $ganglia_aggregator = true
 }
@@ -484,6 +501,7 @@
 }
 
 node /^cp40(0[89]|1[0678])\.ulsfo\.wmnet$/ {
+include admin::role::ops
 if $::hostname =~ /^cp(4008|4016)$/ {
 $ganglia_aggregator = true
 }
@@ -495,6 +513,7 @@
 }
 
 node /^cp40(1[129]|20)\.ulsfo\.wmnet$/ {
+include admin::role::ops
 if $::hostname =~ /^cp401[19]$/ {
 $ganglia_aggregator = true
 }
@@ -506,6 +525,7 @@
 }
 
 node 'dataset2.wikimedia.org' {
+include admin::role::ops
 $cluster = 'misc'
 $gid= '500'
 
@@ -516,6 +536,7 @@
 }
 
 node 'dataset1001.wikimedia.org' {
+include admin::role::ops
 $cluster = 'misc'
 $gid= '500'
 interface::aggregate { 'bond0':
@@ -531,6 +552,7 @@
 
 # pmtpa dbs
 node /^db(63)\.pmtpa\.wmnet/ {
+include admin::role::ops
   

[MediaWiki-commits] [Gerrit] Add Element#isElementAttached - change (oojs/ui)

2014-03-25 Thread Esanders (Code Review)
Esanders has uploaded a new change for review.

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

Change subject: Add Element#isElementAttached
..

Add Element#isElementAttached

In general we may want to know if an element is attached
to the DOM.

Change-Id: I9a3d00a45323434adb54d7449a3a1dc01c2df245
---
M src/Element.js
1 file changed, 8 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/70/120970/1

diff --git a/src/Element.js b/src/Element.js
index fe04bab..1d2b9fe 100644
--- a/src/Element.js
+++ b/src/Element.js
@@ -362,6 +362,14 @@
 };
 
 /**
+ * Check if the element is attached to the DOM
+ * @return {boolean} The element is attached to the DOM
+ */
+OO.ui.Element.prototype.isElementAttached = function () {
+   return $.contains( this.getElementDocument(), this.$element[0] );
+};
+
+/**
  * Get the DOM document.
  *
  * @return {HTMLDocument} Document object

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

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

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


[MediaWiki-commits] [Gerrit] Disable tool groups when all its tools are disabled - change (oojs/ui)

2014-03-25 Thread Esanders (Code Review)
Esanders has uploaded a new change for review.

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

Change subject: Disable tool groups when all its tools are disabled
..

Disable tool groups when all its tools are disabled

Also add an option to make this behavior optional.

Change-Id: I13557f80c5567a4aaab3294371a7dcbf2d3e1184
---
M src/ToolGroup.js
M src/Widget.js
M src/toolgroups/PopupToolGroup.js
3 files changed, 60 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/71/120971/1

diff --git a/src/ToolGroup.js b/src/ToolGroup.js
index 5816222..51586f7 100644
--- a/src/ToolGroup.js
+++ b/src/ToolGroup.js
@@ -22,7 +22,9 @@
  */
 OO.ui.ToolGroup = function OoUiToolGroup( toolbar, config ) {
// Configuration initialization
-   config = config || {};
+   config = $.extend( {
+   'aggregations': { 'disable': 'itemDisable' }
+   }, config );
 
// Parent constructor
OO.ui.ToolGroup.super.call( this, config );
@@ -34,6 +36,7 @@
this.toolbar = toolbar;
this.tools = {};
this.pressed = null;
+   this.autoDisabled = false;
this.include = config.include || [];
this.exclude = config.exclude || [];
this.promote = config.promote || [];
@@ -48,6 +51,7 @@
'mouseout': OO.ui.bind( this.onMouseOut, this )
} );
this.toolbar.getToolFactory().connect( this, { 'register': 
'onToolFactoryRegister' } );
+   this.connect( this, { 'itemDisable': 'updateDisabled' } );
 
// Initialization
this.$group.addClass( 'oo-ui-toolGroup-tools' );
@@ -89,7 +93,49 @@
  */
 OO.ui.ToolGroup.static.accelTooltips = false;
 
+/**
+ * Automatically disable the toolgroup when all tools are disabled
+ *
+ * @static
+ * @property {boolean}
+ * @inheritable
+ */
+OO.ui.ToolGroup.static.autoDisable = true;
+
 /* Methods */
+
+/**
+ * @inheritdoc
+ */
+OO.ui.ToolGroup.prototype.init = function () {
+   this.populate();
+};
+
+/**
+ * @inheritdoc
+ */
+OO.ui.ToolGroup.prototype.isDisabled = function () {
+   return this.autoDisabled || 
OO.ui.ToolGroup.super.prototype.isDisabled.apply( this, arguments );
+};
+
+/**
+ * @inheritdoc
+ */
+OO.ui.ToolGroup.prototype.updateDisabled = function () {
+   var i, item, allDisabled = true;
+
+   if ( this.constructor.static.autoDisable ) {
+   for ( i = this.items.length - 1; i >= 0; i-- ) {
+   item = this.items[i];
+   if ( !item.isDisabled() ) {
+   allDisabled = false;
+   break;
+   }
+   }
+   this.autoDisabled = allDisabled;
+   }
+   OO.ui.ToolGroup.super.prototype.updateDisabled.apply( this, arguments );
+};
 
 /**
  * Handle mouse down events.
@@ -260,6 +306,8 @@
}
// Re-add tools (moving existing ones to new locations)
this.addItems( add );
+   // Disabled state may depend on items
+   this.updateDisabled();
 };
 
 /**
diff --git a/src/Widget.js b/src/Widget.js
index 3e54a86..0c777f8 100644
--- a/src/Widget.js
+++ b/src/Widget.js
@@ -66,7 +66,7 @@
 /**
  * Set the disabled state of the widget.
  *
- * This should probably change the widgets's appearance and prevent it from 
being used.
+ * This should probably change the widgets' appearance and prevent it from 
being used.
  *
  * @param {boolean} disabled Disable widget
  * @chainable
diff --git a/src/toolgroups/PopupToolGroup.js b/src/toolgroups/PopupToolGroup.js
index e70316e..48ddbfb 100644
--- a/src/toolgroups/PopupToolGroup.js
+++ b/src/toolgroups/PopupToolGroup.js
@@ -64,6 +64,16 @@
 /* Methods */
 
 /**
+ * @inheritdoc
+ */
+OO.ui.PopupToolGroup.prototype.setDisabled = function () {
+   OO.ui.PopupToolGroup.super.prototype.setDisabled.apply( this, arguments 
);
+   if ( this.isDisabled() && this.isElementAttached() ) {
+   this.setActive( false );
+   }
+};
+
+/**
  * Handle focus being lost.
  *
  * The event is actually generated from a mouseup, so it is not a normal blur 
event object.

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

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

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


[MediaWiki-commits] [Gerrit] Return null in Element#getDocument - change (oojs/ui)

2014-03-25 Thread Esanders (Code Review)
Esanders has uploaded a new change for review.

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

Change subject: Return null in Element#getDocument
..

Return null in Element#getDocument

Because throwing an exception is overkill.

Change-Id: I4b865c1397a76f732c4416b5348e58d46a80042b
---
M src/Element.js
1 file changed, 4 insertions(+), 11 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/69/120969/1

diff --git a/src/Element.js b/src/Element.js
index 14539cf..fe04bab 100644
--- a/src/Element.js
+++ b/src/Element.js
@@ -73,12 +73,10 @@
  * @static
  * @param {jQuery|HTMLElement|HTMLDocument|Window} obj Object to get the 
document for
  * @return {HTMLDocument} Document object
- * @throws {Error} If context is invalid
  */
 OO.ui.Element.getDocument = function ( obj ) {
-   var doc =
-   // jQuery - selections created "offscreen" won't have a 
context, so .context isn't reliable
-   ( obj[0] && obj[0].ownerDocument ) ||
+   // jQuery - selections created "offscreen" won't have a context, so 
.context isn't reliable
+   return ( obj[0] && obj[0].ownerDocument ) ||
// Empty jQuery selections might have a context
obj.context ||
// HTMLElement
@@ -86,13 +84,8 @@
// Window
obj.document ||
// HTMLDocument
-   ( obj.nodeType === 9 && obj );
-
-   if ( doc ) {
-   return doc;
-   }
-
-   throw new Error( 'Invalid context' );
+   ( obj.nodeType === 9 && obj ) ||
+   null;
 };
 
 /**

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

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

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


[MediaWiki-commits] [Gerrit] Add missing messages to RL module - change (mediawiki...UploadWizard)

2014-03-25 Thread Robmoen (Code Review)
Robmoen has uploaded a new change for review.

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

Change subject: Add missing messages to RL module
..

Add missing messages to RL module

I assume this has gone unnoticed due to commons having
them defined locally in MediaWiki namespace.

Change-Id: I73746d8a8a01b9b6038088f90d88e7de952a07fb
---
M UploadWizardHooks.php
1 file changed, 2 insertions(+), 0 deletions(-)


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

diff --git a/UploadWizardHooks.php b/UploadWizardHooks.php
index 73e4d94..76a3b93 100644
--- a/UploadWizardHooks.php
+++ b/UploadWizardHooks.php
@@ -157,8 +157,10 @@
'mwe-upwiz-tutorial-error-cannot-transform',
'mwe-upwiz-help-desk',
'mwe-upwiz-add-file-n',
+   'mwe-upwiz-multi-file-select',
'mwe-upwiz-add-file-0-free',
'mwe-upwiz-flickr-input-placeholder',
+   'mwe-upwiz-add-flickr-or',
'mwe-upwiz-add-flickr',
'mwe-upwiz-add-file-flickr',
'mwe-upwiz-add-file-flickr-n',

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

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

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


[MediaWiki-commits] [Gerrit] readme: Fix rendering of Markdown syntax - change (mediawiki...NavigationTiming)

2014-03-25 Thread Krinkle (Code Review)
Krinkle has uploaded a new change for review.

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

Change subject: readme: Fix rendering of Markdown syntax
..

readme: Fix rendering of Markdown syntax

* Rename to .dm so that gitblit and github render it as
  Markdown (I'm deriving from the "-" line that this is
  intended as Markdown).
* Use HTTPS for mediawiki.org.
* Wrap code in backticks.

Change-Id: I3951d9ac74a9c595a284426a8f79274071b57bda
---
D README
A README.md
2 files changed, 18 insertions(+), 15 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/NavigationTiming 
refs/changes/67/120967/1

diff --git a/README b/README
deleted file mode 100644
index 5a68a94..000
--- a/README
+++ /dev/null
@@ -1,15 +0,0 @@
-NavigationTiming
-
-NavigationTiming is a MediaWiki extension for logging perceived latency
-measurements, exposed by browsers as part of the proposed Navigation
-Timing API.
-
-Sample configuration:
-
- require_once( "$IP/extensions/EventLogging/EventLogging.php" );  // dependency
- require_once( "$IP/extensions/NavigationTiming/NavigationTiming.php" );
- $wgNavigationTimingSamplingFactor = 1;  // log 1:10,000 requests.
-
-For more information, see the extension's documentation on MediaWiki.org:
-
- http://www.mediawiki.org/wiki/Extension:NavigationTiming
diff --git a/README.md b/README.md
new file mode 100644
index 000..383314f
--- /dev/null
+++ b/README.md
@@ -0,0 +1,18 @@
+NavigationTiming
+
+
+NavigationTiming is a MediaWiki extension for logging perceived latency
+measurements, exposed by browsers as part of the proposed Navigation
+Timing API.
+
+Sample configuration:
+
+```
+require_once( "$IP/extensions/EventLogging/EventLogging.php" ); // dependency
+require_once( "$IP/extensions/NavigationTiming/NavigationTiming.php" );
+$wgNavigationTimingSamplingFactor = 1; // log 1:10,000 requests
+```
+
+For more information, see the extension's documentation on MediaWiki.org:
+
+https://www.mediawiki.org/wiki/Extension:NavigationTiming

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3951d9ac74a9c595a284426a8f79274071b57bda
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/NavigationTiming
Gerrit-Branch: master
Gerrit-Owner: Krinkle 

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


[MediaWiki-commits] [Gerrit] WIP: Bigger stub for worldpay - change (mediawiki...DonationInterface)

2014-03-25 Thread Katie Horn (Code Review)
Katie Horn has submitted this change and it was merged.

Change subject: WIP: Bigger stub for worldpay
..


WIP: Bigger stub for worldpay

It can now make a transaction! and render a form!

There are two things that still need to be injected into the form:
* The one time token 'one_time_token' which is an identifier the
  tokenizer needs in order to associate a user CC data with us
* 'wp_process_url' which is the URL we need to submit tokenization
  requests to.

Additionally; though this patch makes available a worldpay.js module,
it doesn't yet do anything with it. This script should submit the tokenization
request as a AJAX request; get the response, clear the form of incriminating
fields, and then submit a payment to us (via the donate JS API? or via form
submission.)

Change-Id: I889748f9709be8cf7070bb083864e304572942cd
---
A .jshintrc
M DonationInterface.php
M gateway_common/DataValidator.php
M gateway_common/gateway.adapter.php
M gateway_forms/RapidHtml.php
M gateway_forms/rapidhtml/RapidHtmlResources.php
M tests/TestConfiguration.php
A worldpay_gateway/forms/css/worldpay.css
A worldpay_gateway/forms/html/_donation-amount/USD.html
A worldpay_gateway/forms/html/_donation-amount/default.html
A worldpay_gateway/forms/html/_name-email/default.html
A worldpay_gateway/forms/html/_personal-information/US.html
A worldpay_gateway/forms/html/_personal-information/default.html
A worldpay_gateway/forms/html/_wp_ott_form/default.html
R worldpay_gateway/forms/html/worldpay.html
A worldpay_gateway/forms/js/worldpay.js
M worldpay_gateway/worldpay.adapter.php
M worldpay_gateway/worldpay_gateway.body.php
M worldpay_gateway/worldpay_gateway.i18n.php
19 files changed, 760 insertions(+), 88 deletions(-)

Approvals:
  Katie Horn: Verified; Looks good to me, approved



diff --git a/.jshintrc b/.jshintrc
new file mode 100644
index 000..d2b2a76
--- /dev/null
+++ b/.jshintrc
@@ -0,0 +1,38 @@
+{
+   /* Common */
+
+   // Enforcing
+   "camelcase": true,
+   "curly": true,
+   "eqeqeq": true,
+   "immed": true,
+   "latedef": true,
+   "newcap": true,
+   "noarg": true,
+   "noempty": true,
+   "nonew": true,
+   "quotmark": "single",
+   "trailing": true,
+   "undef": true,
+   "unused": true,
+   // Legacy
+   "onevar": true,
+
+   /* Local */
+
+   // Enforcing
+   "bitwise": true,
+   "forin": false,
+   "plusplus": false,
+   "regexp": true,
+   "strict": false,
+   // Relaxing
+   "es5": false,
+   "multistr": true,
+   "smarttabs": true,
+   // Environment
+   "browser": true,
+   "jquery": true,
+   // Legacy
+   "nomen": true
+}
diff --git a/DonationInterface.php b/DonationInterface.php
index c808333..bca7a84 100644
--- a/DonationInterface.php
+++ b/DonationInterface.php
@@ -478,15 +478,18 @@
 if ( $optionalParts['WorldPay'] === true ) {
$wgDonationInterfaceEnabledGateways[] = 'worldpay';
 
-   $wgAdyenGatewayHtmlFormDir = $donationinterface_dir . 
'worldpay_gateway/forms/html';
+   $wgWorldPayGatewayHtmlFormDir = $donationinterface_dir . 
'worldpay_gateway/forms/html';
 
-   $wgWorldPayGatewayURL = 'https://live.adyen.com';
+   $wgWorldPayGatewayURL = 'https://some.url.here';
 
-#  $wgWorldPayGatewayAccountInfo['example'] = array(
-#  'AccountName' => ''; // account identifier, not login name
-#  'SharedSecret' => ''; // entered in the skin editor
-#  'SkinCode' => '';
-#  );
+   /*
+   $wgWorldPayGatewayAccountInfo['default'] = array(
+   'Test' => 1,
+   'MerchantId' => 0,
+   'Username' => 'suchuser',
+   'Password' => 'suchsecret',
+   );
+   */
 }
 
 //Stomp globals
diff --git a/gateway_common/DataValidator.php b/gateway_common/DataValidator.php
index 5c61afb..1dda7cd 100644
--- a/gateway_common/DataValidator.php
+++ b/gateway_common/DataValidator.php
@@ -51,6 +51,7 @@
'paypal' => 'PaypalAdapter',
'adyen' => 'AdyenAdapter',
'amazon' => 'AmazonAdapter',
+   'worldpay' => 'WorldPayAdapter'
);

/**
diff --git a/gateway_common/gateway.adapter.php 
b/gateway_common/gateway.adapter.php
index 108cb59..c22f8f2 100644
--- a/gateway_common/gateway.adapter.php
+++ b/gateway_common/gateway.adapter.php
@@ -805,9 +805,9 @@
 * @return string The raw transaction in xml format, ready to be 
 * curl'd off to the remote server. 
 */
-   protected function buildRequestXML() {
+   protected function buildRequestXML( $rootElement = 'XML' ) {
$this->xmlDoc = new DomDocument( '1.0' );
-   $node = $this->xmlDoc->createElement( 'XML' );
+   $node = $this->xmlDoc->createElement( $rootElement );
 
// Look up the request structure for ou

[MediaWiki-commits] [Gerrit] Various clean up and refactor to make mediawiki-core-npm faster - change (integration/jenkins-job-builder-config)

2014-03-25 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Various clean up and refactor to make mediawiki-core-npm faster
..


Various clean up and refactor to make mediawiki-core-npm faster

* Switch all jobs for hasNpm nodes to use git-remoteonly-zuul

  Currently all jobs for slaves in labs (label hasNpm) throw an error
  trying to fetch from /srv/ssd/gerrit.

  Examples:
  - https://integration.wikimedia.org/ci/job/mediawiki-core-npm/5/console

  - https://integration.wikimedia.org/ci/job/mwext-VisualEditor-npm/942/console
21:44:57 ERROR: Reference path does not exist: 
/srv/ssd/gerrit/mediawiki/extensions/VisualEditor.git

  - https://integration.wikimedia.org/ci/job/oojs-core-npm/19/consoleFull
23:35:30 ERROR: Reference path does not exist: /srv/ssd/gerrit/oojs/core.git

  This change creates a separate defaults/git scm that doesn't use local
  ssd/gerrit ("git-remoteonly-zuul"), nor ssd/gerrit with url, but only the url 
method.

* Use git-clean for all scm's, not just mediawiki-core to speed up
  jobs by not re-cloning repositories.

  We already did this for the git-mwcore scm, but because that one uses 
/srv/ssd/gerrit
  we can't use that for hasNpm. Re-cloning all of mediawiki-core on hasNpm each
  job takes 3-4 minutes easily. Speed this up by doing a git-clean instead of
  a full workspace wipe.

  Since we've been doing this for mwcore for a while now and haven't seen any
  side effects (git-clean is pretty good at what it does) figured I'd just 
enable
  this for all jobs instead of trying to hack a way to do it just for 
mwcore-npm.

Misc clean up:

* There was one extra scm still hardcoded in defaults.yaml, moved that
  one to scm.yaml as well as 'git-localonly-zuul'. Now localonly, remote and
  remoteonly are all together in scm.yaml.

Change-Id: I9aa1aabdd20737881bcf51e78c5d05b6e5270f15
---
M defaults.yaml
M job-templates.yaml
M macro-scm.yaml
M mediawiki-extensions.yaml
M mediawiki.yaml
M parsoidsvc.yaml
6 files changed, 69 insertions(+), 25 deletions(-)

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



diff --git a/defaults.yaml b/defaults.yaml
index dd9aef9..6ef4a96 100644
--- a/defaults.yaml
+++ b/defaults.yaml
@@ -22,12 +22,7 @@
 project-type: freestyle
 
 scm:
- - git:
-url: '/srv/ssd/zuul/git/$ZUUL_PROJECT'
-branches:
- - '$ZUUL_COMMIT'
-refspec: '$ZUUL_REF'
-recursive-submodules: true
+ - git-localonly-zuul
 
 wrappers:
   - timeout:
@@ -36,16 +31,6 @@
   - timestamps
   - ansicolor
 
-# Same as use-zuul but fetch the Zuul changes using two repositories:
-#
-# a) git://zuul.eqiad.wmnet/*
-# Zuul maintained non-bare repository (ie does not ends with '.git')
-#
-# b) /srv/ssd/gerrit/*.git
-# Gerrit replication destination which is local and a bare repository (it ends
-# with '.git'). That requests less network access and speed up the process by
-# having git doing hardlink since the replicated repository and the workspace
-# are on the same device (mounted on /srv/ssd).
 - defaults:
 name: use-remote-zuul
 
@@ -66,6 +51,25 @@
   - ansicolor
 
 - defaults:
+name: use-remoteonly-zuul
+
+description: |
+  Job is managed by https://www.mediawiki.org/wiki/CI/JJB";>Jenkins Job Builder.
+  This job is triggered by Zuul
+
+project-type: freestyle
+
+scm:
+ - git-remoteonly-zuul
+
+wrappers:
+  - timeout:
+  timeout: 360
+  fail: true
+  - timestamps
+  - ansicolor
+
+- defaults:
 name: use-remote-zuul-no-submodules
 
 description: |
diff --git a/job-templates.yaml b/job-templates.yaml
index 218ca5b..7df46bb 100644
--- a/job-templates.yaml
+++ b/job-templates.yaml
@@ -34,7 +34,7 @@
 - job-template:
 name: '{name}-npm'
 node: hasNpm
-defaults: use-remote-zuul
+defaults: use-remoteonly-zuul
 concurrent: true
 triggers:
  - zuul
@@ -44,7 +44,7 @@
 - job-template:
 name: '{name}-npmtest'
 node: hasNpm
-defaults: use-remote-zuul
+defaults: use-remoteonly-zuul
 concurrent: true
 triggers:
  - zuul
diff --git a/macro-scm.yaml b/macro-scm.yaml
index 7a21c04..a8a94df 100644
--- a/macro-scm.yaml
+++ b/macro-scm.yaml
@@ -30,10 +30,33 @@
  - '$ZUUL_COMMIT'
 refspec: '$ZUUL_REF'
 disable-submodules: true
-# mw/core is a huge repo so dont reclone it
 wipe-workspace: false
 clean: true
 
+- scm:
+name: git-localonly-zuul
+scm:
+ - git:
+url: '/srv/ssd/zuul/git/$ZUUL_PROJECT'
+branches:
+ - '$ZUUL_COMMIT'
+refspec: '$ZUUL_REF'
+wipe-workspace: false
+clean: true
+# XXX: Why only this one recursive?
+recursive-submodules: true
+
+# Same as git-localonly-zuul but fetches the Zuul changes using two 
repositories:
+#
+# a) git://zuul.eqiad.wmnet/*
+# Zuul maintained non-b

[MediaWiki-commits] [Gerrit] Ignore WIP patches when evaluating - change (mediawiki...MobileFrontend)

2014-03-25 Thread Jdlrobson (Code Review)
Jdlrobson has uploaded a new change for review.

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

Change subject: Ignore WIP patches when evaluating
..

Ignore WIP patches when evaluating

Sometimes WIP patches get pushed but not marked as -1 or -2
Let's exclude these when evaluating whether we have too many open patches

Change-Id: I108c7f4819d4479f72ac187990313e4fb64972d7
---
M scripts/pre-review
1 file changed, 2 insertions(+), 1 deletion(-)


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

diff --git a/scripts/pre-review b/scripts/pre-review
index 0f94c15..83840d5 100755
--- a/scripts/pre-review
+++ b/scripts/pre-review
@@ -41,7 +41,8 @@
 # This patch is updating an existing one so let's allow it.
 if change["change_id"] in commit:
 revised_patch = True
-if 'disliked' not in reviews and 'rejected' not in reviews and 'approved' 
not in reviews:
+wip = 'WIP' in change['subject']
+if 'disliked' not in reviews and 'rejected' not in reviews and 'approved' 
not in reviews and not wip:
 open_patches += 1
 
 if open_patches > 5 and not revised_patch:

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I108c7f4819d4479f72ac187990313e4fb64972d7
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] Remove jdavis admin user. (no longer wmf employee, long ago ... - change (operations/puppet)

2014-03-25 Thread Jkrauska (Code Review)
Jkrauska has uploaded a new change for review.

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

Change subject: Remove jdavis admin user. (no longer wmf employee, long ago 
deactivated/disabled)
..

Remove jdavis admin user. (no longer wmf employee, long ago 
deactivated/disabled)

Change-Id: I6354b5ab3059d7cffbae5880da1922ec7032ff8b
---
M manifests/admins.pp
M manifests/site.pp
2 files changed, 0 insertions(+), 21 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/65/120965/1

diff --git a/manifests/admins.pp b/manifests/admins.pp
index 62b9f29..2c92a2d 100644
--- a/manifests/admins.pp
+++ b/manifests/admins.pp
@@ -842,26 +842,6 @@
 }
 }
 
-class jdavis inherits baseaccount {
-$username = 'jdavis'
-$realname = 'Jon Davis'
-$uid  = '1004'
-$enabled  = false
-
-unixaccount { $realname: username => $username, uid => $uid, gid => 
$gid }
-
-if $manage_home {
-Ssh_authorized_key { require => Unixaccount[$realname] }
-
-ssh_authorized_key { 'jda...@wikimedia.org':
-ensure => 'absent',
-user   => $username,
-type   => 'ssh-rsa',
-key=> 
'B3NzaC1yc2EBJQAAAQEAliYsMiUqipe/HtqzehVebaH8/kVl6RddesJC8fy/jV4TTTFpp+Ow9zpwqgS4lVgeYmrHnp3iDraTiqLlTzoB9e3hXwatzysUASn6sgep5zSTIqC7pb5xYHi6dsI+47L72vFoGfZdugXUYXqgml5JIRk++CK2KaH6udsxev/vW7iJWLxoPbXA9/dsX32/JHnHcNKWkYSjOvl+kvDsLqgnBO+smrLqLey5h1T6BObo7sM6hUUe+COpzNyJC5stP/GMUaYohHu2u9lwcIUFDB/5Wn7aY2ZyNgeoiGrS2angNoI2kNMucHw0eAtIFpXVYuuz7+ijDdGICeh0auIRfOg54Q==';
-}
-}
-}
-
 class jeluf inherits baseaccount {
 $username = 'jeluf'
 $realname = 'Jens Frank'
diff --git a/manifests/site.pp b/manifests/site.pp
index d8c7ed2..ace47af 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -2131,7 +2131,6 @@
 include ldap::role::server::corp
 include ldap::role::client::corp
 include groups::wikidev
-include accounts::jdavis
 include backup::client
 }
 

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

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

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


[MediaWiki-commits] [Gerrit] Update Math extension for cherry-pick - change (mediawiki/core)

2014-03-25 Thread Catrope (Code Review)
Catrope has uploaded a new change for review.

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

Change subject: Update Math extension for cherry-pick
..

Update Math extension for cherry-pick

Change-Id: Idc26c4f4bfbda8f960f829a930df9e0785760bab
---
M extensions/Math
1 file changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/64/120964/1

diff --git a/extensions/Math b/extensions/Math
index ba14b9b..5388ce3 16
--- a/extensions/Math
+++ b/extensions/Math
-Subproject commit ba14b9bb94bb737f415506aa1909e0fd41182f49
+Subproject commit 5388ce3746521b58730431cebecad77b24154e4e

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idc26c4f4bfbda8f960f829a930df9e0785760bab
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.23wmf19
Gerrit-Owner: Catrope 

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


[MediaWiki-commits] [Gerrit] Update Math extension for cherry-pick - change (mediawiki/core)

2014-03-25 Thread Catrope (Code Review)
Catrope has submitted this change and it was merged.

Change subject: Update Math extension for cherry-pick
..


Update Math extension for cherry-pick

Change-Id: Idc26c4f4bfbda8f960f829a930df9e0785760bab
---
M extensions/Math
1 file changed, 0 insertions(+), 0 deletions(-)

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



diff --git a/extensions/Math b/extensions/Math
index ba14b9b..5388ce3 16
--- a/extensions/Math
+++ b/extensions/Math
-Subproject commit ba14b9bb94bb737f415506aa1909e0fd41182f49
+Subproject commit 5388ce3746521b58730431cebecad77b24154e4e

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Idc26c4f4bfbda8f960f829a930df9e0785760bab
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.23wmf19
Gerrit-Owner: Catrope 
Gerrit-Reviewer: Catrope 

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


[MediaWiki-commits] [Gerrit] fix bug 43989 (Ampersands not handled properly in SF tags) - change (mediawiki...SemanticForms)

2014-03-25 Thread Foxtrott (Code Review)
Foxtrott has uploaded a new change for review.

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

Change subject: fix bug 43989 (Ampersands not handled properly in SF tags)
..

fix bug 43989 (Ampersands not handled properly in SF tags)

The problem is, that the Parser when parsing the form description replaces all 
text (including anything in  tags) by its
HTML representation. This means,  tags are not good enough to protect 
SF tags from the parser.

The solution is to use proper strip items.

It is not as nice as it should be, but that is mainly because of MediaWiki 
design issues:
* insertStripItem() should be a method of the StripItem class, not of Parser
* StripItem should have a getter method for the marker prefix

Bug: 43989
Change-Id: I8be8f5ce7fd091873eb816004db1a2d69858304e
---
M includes/SF_FormUtils.php
1 file changed, 32 insertions(+), 6 deletions(-)


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

diff --git a/includes/SF_FormUtils.php b/includes/SF_FormUtils.php
index 75a2f68..0b2aa64 100644
--- a/includes/SF_FormUtils.php
+++ b/includes/SF_FormUtils.php
@@ -389,17 +389,43 @@
$form_def = StringUtils::delimiterReplace( '', 
'', '', $form_def );
$form_def = strtr( $form_def, array( '' => '', 
'' => '' ) );
 
-   // add '' tags around every triple-bracketed form
-   // definition element, so that the wiki parser won't touch
-   // it - the parser will remove the '' tags, leaving
-   // us with what we need
-   $form_def = "__NOEDITSECTION__" . strtr( $form_def, array( 
'{{{' => '{{{', '}}}' => '}}}' ) );
+   // We cannot use the Parser strip state because the Parser 
would during parsing replace all strip items and then
+   // mangle them into HTML code. So we have to use our own. Which 
means we also can not just use
+   // Parser::insertStripItem().
+   $prefix = "\x7fUNIQ" . Parser::getRandomString();
+   $stripState = new StripState( $prefix );
+
+   // This regexp will find any SF triple braced tags (including 
correct handling of contained braces), i.e.
+   // {{{field|foo|default={{Bar} is not a problem. When used 
with preg_match and friends, $matches[0] will
+   // contain the whole SF tag, $matches[1] will contain the tag 
without the enclosing triple braces.
+   $regexp = 
'#\{\{\{((?>[^\{\}]+)|(\{((?>[^\{\}]+)|(?-2))*\}))*\}\}\}#';
+
+   // replace all SF tags by strip markers
+   $form_def = preg_replace_callback(
+
+   $regexp,
+
+   // This is essentially a copy of 
Parser::insertStripItem().
+   // The 'use' keyword will bump the minimum PHP 
version to 5.3
+   function ( array $matches ) use ( $stripState, 
$prefix ) {
+
+   static $markerIndex = 0;
+   $rnd = "$prefix-item-$markerIndex-" . 
Parser::MARKER_SUFFIX;
+   $markerIndex++;
+   $stripState->addGeneral( $rnd, 
$matches[ 0 ] );
+
+   return $rnd;
+
+   },
+
+   $form_def
+   );
 
$title = is_object( $parser->getTitle() ) ? 
$parser->getTitle():new Title();
 
// parse wiki-text
$output = $parser->parse( $form_def, $title, 
$parser->getOptions() );
-   $form_def = $output->getText();
+   $form_def = $stripState->unstripGeneral( $output->getText() );
 
self::cacheFormDefinition( $form_id, $parser, $output );
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8be8f5ce7fd091873eb816004db1a2d69858304e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SemanticForms
Gerrit-Branch: master
Gerrit-Owner: Foxtrott 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Make VE math inspector title not be null - change (mediawiki...Math)

2014-03-25 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Make VE math inspector title not be null
..


Make VE math inspector title not be null

Forgot to update this for the deferMsg refactor.

Bug: 63083
Change-Id: Ib401c36d656344b74f2358e3e32870186e54e351
---
M modules/VisualEditor/ve.ui.MWMathInspector.js
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/modules/VisualEditor/ve.ui.MWMathInspector.js 
b/modules/VisualEditor/ve.ui.MWMathInspector.js
index 37eb427..7d0a198 100644
--- a/modules/VisualEditor/ve.ui.MWMathInspector.js
+++ b/modules/VisualEditor/ve.ui.MWMathInspector.js
@@ -34,7 +34,7 @@
 
 ve.ui.MWMathInspector.static.icon = 'math';
 
-ve.ui.MWMathInspector.static.titleMessage = 
'math-visualeditor-mwmathinspector-title';
+ve.ui.MWMathInspector.static.title = OO.ui.deferMsg( 
'math-visualeditor-mwmathinspector-title' );
 
 ve.ui.MWMathInspector.static.nodeView = ve.ce.MWMathNode;
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib401c36d656344b74f2358e3e32870186e54e351
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Math
Gerrit-Branch: wmf/1.23wmf19
Gerrit-Owner: Jforrester 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Hygiene: Remove unused local variables - change (mediawiki...MobileFrontend)

2014-03-25 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Hygiene: Remove unused local variables
..


Hygiene: Remove unused local variables

Change-Id: I8b9d20d44db9f5fdc427bd80a28712c2f65ad285
---
M includes/MobilePage.php
1 file changed, 0 insertions(+), 2 deletions(-)

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



diff --git a/includes/MobilePage.php b/includes/MobilePage.php
index c8658a0..7323609 100644
--- a/includes/MobilePage.php
+++ b/includes/MobilePage.php
@@ -57,9 +57,7 @@
private function getPageImageHtml( $size, $useBackgroundImage = false ) 
{
$imageHtml = '';
// FIXME: Use more generic classes - no longer restricted to 
lists
-   $className = 'listThumb needsPhoto';
if ( $this->usePageImages ) {
-   $title = $this->title;
$file = $this->file;
if ( $file ) {
$thumb = $file->transform( array( 'width' => 
$size ) );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8b9d20d44db9f5fdc427bd80a28712c2f65ad285
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Siebrand 
Gerrit-Reviewer: Awjrichards 
Gerrit-Reviewer: JGonera 
Gerrit-Reviewer: Jdlrobson 
Gerrit-Reviewer: Kaldari 
Gerrit-Reviewer: MaxSem 
Gerrit-Reviewer: Siebrand 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Support setting column-width and list-style in

2014-03-25 Thread Alex Monk (Code Review)
Alex Monk has uploaded a new change for review.

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

Change subject: Support setting column-width and list-style in  
tag
..

Support setting column-width and list-style in  tag

Bug: 51260
Change-Id: I89f7433ec709f01173055490aab83ac11d60b23a
---
M Cite.i18n.php
M Cite_body.php
2 files changed, 63 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Cite 
refs/changes/62/120962/1

diff --git a/Cite.i18n.php b/Cite.i18n.php
index 5ae7a75..71fb397 100644
--- a/Cite.i18n.php
+++ b/Cite.i18n.php
@@ -26,7 +26,7 @@
 no parameters are allowed.
 Use ',
'cite_error_references_invalid_parameters_group' => 'Invalid 
 tag;
-parameter "group" is allowed only.
+parameters "group", "list-style" and "column-width" are allowed only.
 Use , or ',
'cite_error_references_no_backlink_label'=> 'Ran out of custom 
backlink labels.
 Define more in the [[MediaWiki:Cite references link many format 
backlink labels]] message.',
@@ -68,7 +68,7 @@
 
# Although I could just use # instead of  above and nothing here 
that
# will break on input that contains linebreaks
-   'cite_references_prefix' => '',
+   'cite_references_prefix' => '',
'cite_references_suffix' => '',
 );
 
@@ -200,7 +200,9 @@
 
 See also:
 * {{msg-mw|Cite references link accessibility label}} - if the citation is 
used one time',
-   'cite_references_prefix' => '{{notranslate}}',
+   'cite_references_prefix' => '{{notranslate}}
+Parameters:
+* $1 - List-style CSS value',
'cite_references_suffix' => '{{notranslate}}',
 );
 
diff --git a/Cite_body.php b/Cite_body.php
index 08c6072..0bacba1 100644
--- a/Cite_body.php
+++ b/Cite_body.php
@@ -552,7 +552,7 @@
 * @param $group string
 * @return string
 */
-   function guardedReferences( $str, $argv, $parser, $group = 
CITE_DEFAULT_GROUP ) {
+   function guardedReferences( $str, $argv, $parser, $group = 
CITE_DEFAULT_GROUP, $listStyle = 'decimal', $columnWidth ) {
global $wgAllowCiteGroups;
 
$this->mParser = $parser;
@@ -560,6 +560,16 @@
if ( isset( $argv['group'] ) && $wgAllowCiteGroups ) {
$group = $argv['group'];
unset ( $argv['group'] );
+   }
+
+   if ( isset( $argv['list-style'] ) ) {
+   $listStyle = $argv['list-style'];
+   unset( $argv['list-style'] );
+   }
+
+   if ( isset( $argv['column-width'] ) ) {
+   $columnWidth = $argv['column-width'];
+   unset( $argv['column-width'] );
}
 
if ( strval( $str ) !== '' ) {
@@ -600,12 +610,12 @@
$this->mRefCallStack = array();
}
 
-   if ( count( $argv ) && $wgAllowCiteGroups ) {
+   if ( isset( $argv['groups'] ) && $wgAllowCiteGroups ) {
return $this->error( 
'cite_error_references_invalid_parameters_group' );
} elseif ( count( $argv ) ) {
return $this->error( 
'cite_error_references_invalid_parameters' );
} else {
-   $s = $this->referencesFormat( $group );
+   $s = $this->referencesFormat( $group, $listStyle, 
$columnWidth );
if ( $parser->getOptions()->getIsSectionPreview() ) {
return $s;
}
@@ -623,10 +633,12 @@
 * Make output to be returned from the references() function
 *
 * @param $group
+* @param $listStyle
+* @param $columnWidth
 *
 * @return string XHTML ready for output
 */
-   function referencesFormat( $group ) {
+   function referencesFormat( $group, $listStyle, $columnWidth ) {
if ( ( count( $this->mRefs ) == 0 ) || ( empty( 
$this->mRefs[$group] ) ) ) {
return '';
}
@@ -638,8 +650,49 @@
$ent[] = $this->referencesFormatEntry( $k, $v );
}
 
-   $prefix = wfMessage( 'cite_references_prefix' 
)->inContentLanguage()->plain();
+   // Check against valid list style types
+   if ( !in_array( $listStyle, array(
+   'disc',
+   'armenian',
+   'circle',
+   'cjk-ideographic',
+   'decimal',
+   'decimal-leading-zero',
+   'georgian',
+   'hebrew',
+   'hiragana',
+   'hiragana-iroha',
+   'katakana',
+   'kata

[MediaWiki-commits] [Gerrit] Reduce connect timeout in MediaWiki::triggerJobs - change (mediawiki/core)

2014-03-25 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Reduce connect timeout in MediaWiki::triggerJobs
..


Reduce connect timeout in MediaWiki::triggerJobs

The fifth parameter to fsockopen is the number of seconds
to wait before declaring the connection a failure. When not
provided it defaults to the php ini value of 'default_socket_timeout'
which is 60s.  Under no circumstances should we wait 60s to
connect to ourselves,  100ms seems like a reasonable timeout
since its explicitly connecting to itself, but the exact timeout
could be slightly longer.

Change-Id: I18d328274ddf1e0848fce40ebf39e0466b5c4d5d
---
M includes/Wiki.php
1 file changed, 4 insertions(+), 1 deletion(-)

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



diff --git a/includes/Wiki.php b/includes/Wiki.php
index 4bf8fd3..6cf718c 100644
--- a/includes/Wiki.php
+++ b/includes/Wiki.php
@@ -655,7 +655,10 @@
$info['host'],
isset( $info['port'] ) ? $info['port'] : 80,
$errno,
-   $errstr
+   $errstr,
+   // If it takes more than 100ms to connect to ourselves 
there
+   // is a problem elsewhere.
+   0.1
);
wfRestoreWarnings();
if ( !$sock ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I18d328274ddf1e0848fce40ebf39e0466b5c4d5d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: EBernhardson 
Gerrit-Reviewer: Aaron Schulz 
Gerrit-Reviewer: Manybubbles 
Gerrit-Reviewer: Matthias Mullie 
Gerrit-Reviewer: Spage 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Sort version list returned by mwversionsinuse - change (mediawiki...scap)

2014-03-25 Thread BryanDavis (Code Review)
BryanDavis has uploaded a new change for review.

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

Change subject: Sort version list returned by mwversionsinuse
..

Sort version list returned by mwversionsinuse

The list of versions returned by the php implementation of
mwversionsinuse provides a sorted list based on the version number. The
python implementation ignored this implementation detail and instead
returned the versions in semi-random order dependent on the dict
iteration order.

This implementation also corrects a small bug found in the php version
whereby versions were sorted lexicographically rather than as version
numbers.

Change-Id: Ie26abf14ecb9ffd3fa1785787f75e9794a44fa49
---
M scap/main.py
1 file changed, 7 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/scap 
refs/changes/61/120961/1

diff --git a/scap/main.py b/scap/main.py
index 0d15c39..6003d7c 100644
--- a/scap/main.py
+++ b/scap/main.py
@@ -6,6 +6,7 @@
 
 """
 import argparse
+import distutils.version
 import os
 import subprocess
 import time
@@ -25,11 +26,15 @@
 def main(self, *extra_args):
 versions = self.active_wikiversions()
 
+# Convert to list of (version, db) tuples sorted by version number
+sorted_versions = sorted(versions.iteritems(),
+key=lambda v: distutils.version.LooseVersion(v[0]))
+
 if self.arguments.withdb:
 output = ['%s=%s' % (version, wikidb)
-for version, wikidb in versions.items()]
+for version, wikidb in sorted_versions]
 else:
-output = [str(version) for version in versions.keys()]
+output = [str(version) for version, wikidb in sorted_versions]
 
 print ' '.join(output)
 return 0

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie26abf14ecb9ffd3fa1785787f75e9794a44fa49
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/tools/scap
Gerrit-Branch: master
Gerrit-Owner: BryanDavis 

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


[MediaWiki-commits] [Gerrit] Add initially enabled ToggleButtonWidget to demo - change (oojs/ui)

2014-03-25 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Add initially enabled ToggleButtonWidget to demo
..


Add initially enabled ToggleButtonWidget to demo

To expose breakage in Ia980d90

Change-Id: I9924cf21c31db2bcefb119bdc94621c55b522616
---
M demos/widgets.js
1 file changed, 4 insertions(+), 0 deletions(-)

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



diff --git a/demos/widgets.js b/demos/widgets.js
index 06bf756..2c8957a 100644
--- a/demos/widgets.js
+++ b/demos/widgets.js
@@ -192,6 +192,10 @@
{ 'label': 'ToggleButtonWidget' }
),
new OO.ui.FieldLayout(
+   new OO.ui.ToggleButtonWidget( { 
'label': 'Toggle', 'value': true } ),
+   { 'label': 'ToggleButtonWidget 
(initially active)' }
+   ),
+   new OO.ui.FieldLayout(
new OO.ui.ToggleButtonWidget( { 'icon': 
'next' } ),
{ 'label': 'ToggleButtonWidget (icon 
only)' }
),

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

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

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


[MediaWiki-commits] [Gerrit] Sync parserTests with core. - change (mediawiki...parsoid)

2014-03-25 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Sync parserTests with core.
..


Sync parserTests with core.

This matches upstream commit 722f3bd7f9316ed20e37d5e629f313ac3f4c4f50.

Change-Id: I492ca80a33b5579e70342ee1755a4fc74bcc1323
---
M tests/fetch-parserTests.txt.js
M tests/parserTests.txt
2 files changed, 39 insertions(+), 17 deletions(-)

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



diff --git a/tests/fetch-parserTests.txt.js b/tests/fetch-parserTests.txt.js
index 31df077..18257c4 100755
--- a/tests/fetch-parserTests.txt.js
+++ b/tests/fetch-parserTests.txt.js
@@ -11,9 +11,9 @@
 // and update these hashes automatically.
 //
 // You can use 'sha1sum -b tests/parser/parserTests.txt' to compute this value:
-var expectedSHA1 = "72f7939209d065b7014c2c8738703832ee962075";
+var expectedSHA1 = "26586404129dd11814a905c4182080b459327a98";
 // git log --pretty=oneline -1 tests/parser/parserTests.txt
-var latestCommit = "bd2850d6125e6092b26d5af569b3f6e2b53a0228";
+var latestCommit = "722f3bd7f9316ed20e37d5e629f313ac3f4c4f50";
 
 var fs = require('fs'),
path = require('path'),
diff --git a/tests/parserTests.txt b/tests/parserTests.txt
index e8c853e..e8e71b8 100644
--- a/tests/parserTests.txt
+++ b/tests/parserTests.txt
@@ -21,12 +21,15 @@
 # language=XXX  set content language to XXX for this test
 # variant=XXX   set the variant of language for this test (eg zh-tw)
 # disabled  do not run test
-# parsoid   parsoid-only test (not run by PHP parser)
-# php   php-only test (not run by the parsoid parser)
+# parsoid   parsoid-specific options (not run by PHP parser unless
+# the test includes an html/php section)
+# php   php-only test (not run by the parsoid parser unless
+# the test includes an html/parsoid section)
 # showtitle make the first line the title
 # comment   run through Linker::formatComment() instead of main parser
 # local format section links in edit comment text as local links
 # notoc disable table of contents
+# thumbsize=NNN set the default thumb size to NNNpx for this test
 #
 # You can also set the following parser properties via test options:
 #  wgEnableUploads, wgAllowExternalImages, wgMaxTocLevel,
@@ -9662,7 +9665,7 @@
 ### Images
 ###
 ### For Parsoid-specific tests, see
- http://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
+ https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
 
 !! test
 Simple image
@@ -9747,13 +9750,15 @@
 
 !! test
 Allow empty links in image captions (Bug 60753)
+!! options
+thumbsize=220
 !! wikitext
 [[File:Foobar.jpg|thumb|Caption [[Link1]]
 [[]]
 [[Link2]]
 ]]
 !! html/php
-http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg"; 
width="180" height="20" class="thumbimage" 
srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, 
http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" />  
Caption Link1 [[]] Link2
+http://example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg"; 
width="220" height="25" class="thumbimage" 
srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/330px-Foobar.jpg 1.5x, 
http://example.com/images/thumb/3/3a/Foobar.jpg/440px-Foobar.jpg 2x" />  
Caption Link1 [[]] Link2
 
 !! html/parsoid
 Caption Link1
@@ -9832,6 +9837,8 @@
 
 !! test
 Image with link tails
+!! options
+thumbsize=220
 !! wikitext
 123[[File:Foobar.jpg]]456
 123[[File:Foobar.jpg|right]]456
@@ -9840,7 +9847,7 @@
 123http://example.com/images/3/3a/Foobar.jpg"; width="1941" height="220" 
/>456
 
 123http://example.com/images/3/3a/Foobar.jpg"; width="1941" 
height="220" />456
-123http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg"; 
width="180" height="20" class="thumbimage" 
srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, 
http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" />  
456
+123http://example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg"; 
width="220" height="25" class="thumbimage" 
srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/330px-Foobar.jpg 1.5x, 
http://example.com/images/thumb/3/3a/Foobar.jpg/440px-Foobar.jpg 2x" />  
456
 
 !! html/parsoid
 123456
@@ -9872,12 +9879,14 @@
 
 !! test
 Image with multiple alignments -- use first (bug 48664)
+!! options
+thumbsize=220
 !! wikitext
 [[File:Foobar.jpg|thumb|left|right|center|caption]]
 
 [[File:Foobar.jpg|middle|text-top|caption]]
 !! html/php
-http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg"; 
width="180" height="20" class="thumbimage" 
srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, 
http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" />  
caption
+http://example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg"; 
width="220" height="25" class="thumbimage" 
srcs

[MediaWiki-commits] [Gerrit] scap-recompile: always point to most recent version - change (mediawiki...scap)

2014-03-25 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: scap-recompile: always point to most recent version
..


scap-recompile: always point to most recent version

The scap-recompile script is bugged in beta.  It get the 2nd version of
MediaWiki in use to forge the destination path.  On beta there is only
one version, and the 2nd version ends up being undefined.

The scap-recompile provided by wikimedia-task-appserver used to work. It
got removed from that package...
https://gerrit.wikimedia.org/r/#/c/109950/

...and added back to puppet THOUGH IT GOT ALTERED!
https://gerrit.wikimedia.org/r/#/c/109951/

And broken for beta.

This patch use bash trickery to get the last element of the mwversion
array instead of the 2nd one.  That fix beta, I did test it on
deployment-bastion.pmtpa.wmflabs.

Change-Id: I595ea187f85ea3713c4acdf6c8a258945fcf564e
---
M bin/scap-recompile
1 file changed, 3 insertions(+), 1 deletion(-)

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



diff --git a/bin/scap-recompile b/bin/scap-recompile
index 3a08032..6b90e80 100755
--- a/bin/scap-recompile
+++ b/bin/scap-recompile
@@ -11,7 +11,9 @@
 fi
 
 arr=($mwVersionNums)
-mwVerNum=${arr[1]}
+# Only recompile from latest mw version
+# Note beta only has one version: master
+mwVerNum=${arr[${#arr[@]} -1]}
 
 echo -n "MediaWiki: Compiling texvc..."
 builddir=`mktemp -dt texvc-build.XX`

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I595ea187f85ea3713c4acdf6c8a258945fcf564e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/tools/scap
Gerrit-Branch: master
Gerrit-Owner: Hashar 
Gerrit-Reviewer: Aaron Schulz 
Gerrit-Reviewer: BryanDavis 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: Ori.livneh 
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] Add initially enabled ToggleButtonWidget to demo - change (oojs/ui)

2014-03-25 Thread Catrope (Code Review)
Catrope has uploaded a new change for review.

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

Change subject: Add initially enabled ToggleButtonWidget to demo
..

Add initially enabled ToggleButtonWidget to demo

To expose breakage in Ia980d90

Change-Id: I9924cf21c31db2bcefb119bdc94621c55b522616
---
M demos/widgets.js
1 file changed, 4 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/60/120960/1

diff --git a/demos/widgets.js b/demos/widgets.js
index 06bf756..2c8957a 100644
--- a/demos/widgets.js
+++ b/demos/widgets.js
@@ -192,6 +192,10 @@
{ 'label': 'ToggleButtonWidget' }
),
new OO.ui.FieldLayout(
+   new OO.ui.ToggleButtonWidget( { 
'label': 'Toggle', 'value': true } ),
+   { 'label': 'ToggleButtonWidget 
(initially active)' }
+   ),
+   new OO.ui.FieldLayout(
new OO.ui.ToggleButtonWidget( { 'icon': 
'next' } ),
{ 'label': 'ToggleButtonWidget (icon 
only)' }
),

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9924cf21c31db2bcefb119bdc94621c55b522616
Gerrit-PatchSet: 1
Gerrit-Project: oojs/ui
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] See if sleeping helps avoid token issues on Special:MobileOp... - change (mediawiki...MobileFrontend)

2014-03-25 Thread Jdlrobson (Code Review)
Jdlrobson has uploaded a new change for review.

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

Change subject: See if sleeping helps avoid token issues on 
Special:MobileOptions
..

See if sleeping helps avoid token issues on Special:MobileOptions

Bug: 62614
Change-Id: Ib52be0759ce43492095d3cfb7be7f92424a80cbf
---
M tests/browser/features/step_definitions/common_steps.rb
1 file changed, 3 insertions(+), 0 deletions(-)


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

diff --git a/tests/browser/features/step_definitions/common_steps.rb 
b/tests/browser/features/step_definitions/common_steps.rb
index 7717111..0c95a4c 100644
--- a/tests/browser/features/step_definitions/common_steps.rb
+++ b/tests/browser/features/step_definitions/common_steps.rb
@@ -69,6 +69,7 @@
 
 Given /^I am in beta mode$/ do
   visit(MobileOptions) do |page|
+sleep(1)
 page.beta_element.when_present.click
 page.save_settings_element.when_present.click
   end
@@ -76,9 +77,11 @@
 
 Given /^I am in alpha mode$/ do
   visit(MobileOptions) do |page|
+sleep(1)
 page.beta_element.when_present.click
 page.save_settings_element.when_present.click
 visit(MobileOptions) do |page|
+  sleep(1)
   page.alpha_element.when_present.click
   page.save_settings_element.when_present.click
 end

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib52be0759ce43492095d3cfb7be7f92424a80cbf
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] SpecialCentralAutoLogin: Move javascript to separate files f... - change (mediawiki...CentralAuth)

2014-03-25 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: SpecialCentralAutoLogin: Move javascript to separate files for 
linting
..


SpecialCentralAutoLogin: Move javascript to separate files for linting

* To make this stuff easier to edit, maintain, use and lint; move
  them to actual javascript files. They'll be automatically
  picked up by the jshint check for this repository from now on.

* Set up logic to serve these minified. Based on ResourceLoader's
  internals (this should be abstracted by MediaWiki core ideally,
  but kept it as simple as possible for now).

* Added a few line breaks to separate the different concatenated
  scripts from each another.

Change-Id: I132ea06f82ad74ba51186e698dbb917e931534a2
---
A modules/inline/anon-remove.js
A modules/inline/anon-set.js
A modules/inline/autologin.js
M specials/SpecialCentralAutoLogin.php
4 files changed, 116 insertions(+), 81 deletions(-)

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



diff --git a/modules/inline/anon-remove.js b/modules/inline/anon-remove.js
new file mode 100644
index 000..125197a
--- /dev/null
+++ b/modules/inline/anon-remove.js
@@ -0,0 +1,6 @@
+if ( 'localStorage' in window ) {
+   localStorage.removeItem( 'CentralAuthAnon' );
+}
+if ( /(^|; )CentralAuthAnon=/.test( document.cookie ) ) {
+   document.cookie = 'CentralAuthAnon=0; expires=Thu, 01 Jan 1970 00:00:01 
GMT; path=/';
+}
diff --git a/modules/inline/anon-set.js b/modules/inline/anon-set.js
new file mode 100644
index 000..86696d4
--- /dev/null
+++ b/modules/inline/anon-set.js
@@ -0,0 +1,8 @@
+var t = new Date();
+// Set CentralAuthAnon to 1 day in the future
+t.setTime( t.getTime() + 8640 );
+if ( 'localStorage' in window ) {
+   localStorage.setItem( 'CentralAuthAnon', t.getTime() );
+} else {
+   document.cookie = 'CentralAuthAnon=1; expires=' + t.toGMTString() + '; 
path=/';
+}
diff --git a/modules/inline/autologin.js b/modules/inline/autologin.js
new file mode 100644
index 000..b916dc0
--- /dev/null
+++ b/modules/inline/autologin.js
@@ -0,0 +1,52 @@
+( function ( mw, $ ) {
+   mw.loader.using( 'mediawiki.Uri', function () {
+   var current, login;
+
+   // Set returnto and returntoquery so the logout link in the 
returned
+   // html is correct.
+   current = new mw.Uri();
+   delete current.query.title;
+   delete current.query.returnto;
+   delete current.query.returntoquery;
+
+   login = new mw.Uri(
+   mw.config.get( 'wgArticlePath' ).replace( '$1', 
'Special:CentralAutoLogin/toolslist' )
+   );
+   login.query.returnto = mw.config.get( 'wgPageName' );
+   login.query.returntoquery = current.getQueryString();
+
+   $.getJSON( login.toString() )
+   .done( function ( data ) {
+   if ( data.toolslist ) {
+   $( '#p-personal ul' ).html( data.toolslist );
+   $( '#p-personal' ).addClass( 
'centralAuthPPersonalAnimation' );
+   mw.hook( 'centralauth-p-personal-reset' 
).fire();
+   } else if ( data.notify ) {
+   mw.notify(
+   mw.message(
+   
'centralauth-centralautologin-logged-in',
+   data.notify.username,
+   data.notify.gender
+   ),
+   {
+   title: mw.message( 
'centralautologin' ),
+   autoHide: false,
+   tag: 'CentralAutoLogin'
+   }
+   );
+   }
+   } )
+   .fail( function () {
+   // This happens if the user is logged in securely,
+   // while also auto-loggedin from an http page.
+   mw.notify(
+   mw.message( 
'centralauth-centralautologin-logged-in-nouser' ),
+   {
+   title: mw.message( 'centralautologin' ),
+   autoHide: false,
+   tag: 'CentralAutoLogin'
+   }
+   );
+   } );
+   } );
+}( mediaWiki, jQuery ) );
diff --git a/specials/SpecialCentralAutoLogin.php 
b/specials/SpecialCentralAutoLogin.php
index 1077603..825e921 100644
--- a/specials/SpecialCentralAutoLogin.php
+++ b/specials/SpecialCentralAutoLogin.php
@@ -12,21 +1

[MediaWiki-commits] [Gerrit] Reduce connect timeout in MediaWiki::triggerJobs - change (mediawiki/core)

2014-03-25 Thread EBernhardson (Code Review)
EBernhardson has uploaded a new change for review.

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

Change subject: Reduce connect timeout in MediaWiki::triggerJobs
..

Reduce connect timeout in MediaWiki::triggerJobs

The fifth parameter to fsockopen is the number of seconds
to wait before declaring the connection a failure. When not
provided it defaults to the php ini value of 'default_socket_timeout'
which is 60s.  Under no circumstances should we wait 60s to
connect to ourselves,  100ms seems like a reasonable timeout
since its explicitly connecting to itself, but the exact timeout
could be slightly longer.

Change-Id: I18d328274ddf1e0848fce40ebf39e0466b5c4d5d
---
M includes/Wiki.php
1 file changed, 4 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/58/120958/1

diff --git a/includes/Wiki.php b/includes/Wiki.php
index 4bf8fd3..6cf718c 100644
--- a/includes/Wiki.php
+++ b/includes/Wiki.php
@@ -655,7 +655,10 @@
$info['host'],
isset( $info['port'] ) ? $info['port'] : 80,
$errno,
-   $errstr
+   $errstr,
+   // If it takes more than 100ms to connect to ourselves 
there
+   // is a problem elsewhere.
+   0.1
);
wfRestoreWarnings();
if ( !$sock ) {

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

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

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


[MediaWiki-commits] [Gerrit] Allow schema registration via custom hook - change (mediawiki...EventLogging)

2014-03-25 Thread Ori.livneh (Code Review)
Ori.livneh has uploaded a new change for review.

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

Change subject: Allow schema registration via custom hook
..

Allow schema registration via custom hook

This patch adds a custom hook, 'EventLoggingRegisterSchemas', that extensions
can use to declare schemas. Hook handlers are called with an associative array
parameter, passed by reference, that maps schema names to revision IDs. A
simple handler for this hook may look like this:

  $wgHooks[ 'EventLoggingRegisterSchemas' ][] = function ( &$schemas ) {
$schemas[ 'MultimediaViewerNetworkPerformance' ] = 7917896;
  };

The advantage of this approach that it does not introduce a hard dependency on
the EventLogging extension. If the extension is not present, the hook never
fires.

Schemas registered in this fashion can obviously not be declared as
dependencies for ResourceLoader modules that are declared unconditionally.
Instead, the intention is that developers migrate to using mw#track to log
events, relying on the implementation provided in change I0cee7a03e.

By using a hook handler to register schemas and mw#track to log events,
extensions can be instrumented in a manner that does not introduce a hard
dependency on the EventLogging extension. Another advantage of this pattern is
that it defers the loading of schema modules and the dispatch of events to
$( window ).load, thus minimizing impact on page load time.

Change-Id: I2d29315f9a4d8fa2135c97584469c2842c1071be
---
M EventLogging.hooks.php
M EventLogging.php
2 files changed, 35 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/EventLogging 
refs/changes/57/120957/1

diff --git a/EventLogging.hooks.php b/EventLogging.hooks.php
index da5bcb6..54e73ca 100644
--- a/EventLogging.hooks.php
+++ b/EventLogging.hooks.php
@@ -36,6 +36,40 @@
}
 
/**
+* ResourceLoaderRegisterModules hook handler.
+* Allows extensions to register schema modules by adding keys to an
+* associative array which is passed by reference to each handler. The
+* array maps schema names to numeric revision IDs. By using this hook
+* handler rather than registering modules directly, extensions can have
+* a soft dependency on EventLogging. If EventLogging is not present, 
the
+* hook simply never fires. To log events for schemas that have been
+* declared in this fashion, use mw#track.
+*
+* @example
+* 
+* $wgHooks[ 'EventLoggingRegisterSchemas' ][] = function ( &$schemas ) 
{
+* $schemas[ 'MultimediaViewerNetworkPerformance' ] = 7917896;
+* };
+* 
+*
+* @param ResourceLoader &$resourceLoader
+*/
+   public static function onResourceLoaderRegisterModules( ResourceLoader 
&$resourceLoader ) {
+   $schemas = array();
+   wfRunHooks( 'EventLoggingRegisterSchemas', array( &$schemas ) );
+
+   $modules = array();
+   foreach( $schemas as $schemaName => $rev ) {
+   $modules[ "schema.$schemaName" ] = array(
+   'class'=> 'ResourceLoaderSchemaModule',
+   'schema'   => $schemaName,
+   'revision' => $rev,
+   );
+   }
+   $resourceLoader->register( $modules );
+   }
+
+   /**
 * @param array &$vars
 * @return bool
 */
diff --git a/EventLogging.php b/EventLogging.php
index d162b22..9da4625 100644
--- a/EventLogging.php
+++ b/EventLogging.php
@@ -280,6 +280,7 @@
 
 $wgHooks[ 'ResourceLoaderGetConfigVars' ][] = 
'EventLoggingHooks::onResourceLoaderGetConfigVars';
 $wgHooks[ 'ResourceLoaderTestModules' ][] = 
'EventLoggingHooks::onResourceLoaderTestModules';
+$wgHooks[ 'ResourceLoaderRegisterModules' ][] = 
'EventLoggingHooks::onResourceLoaderRegisterModules';
 
 // Registers hook and content handlers for JSON schema content iff
 // running on the MediaWiki instance housing the schemas.

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2d29315f9a4d8fa2135c97584469c2842c1071be
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/EventLogging
Gerrit-Branch: master
Gerrit-Owner: Ori.livneh 

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


[MediaWiki-commits] [Gerrit] add missing system roles - change (operations/puppet)

2014-03-25 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review.

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

Change subject: add missing system roles
..

add missing system roles

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


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

diff --git a/manifests/site.pp b/manifests/site.pp
index 1e20907..865bfcf 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -324,6 +324,9 @@
 
 # cerium,praseodymium, ruthenium and xenon are cassandra test host
 node /^(cerium|praseodymium|ruthenium|xenon)\.eqiad\.wmnet$/ {
+
+system::role { 'role::cassandra-test': description => 'Cassandra test 
server' }
+
 include standard
 include groups::wikidev
 include accounts::gwicke
@@ -2192,6 +2195,8 @@
 
 node 'sodium.wikimedia.org' {
 
+system::role { 'role::mailman': description => 'Mailman server' }
+
 $nameservers_prefix = [ $ipaddress ]
 
 include base
@@ -2422,6 +2427,7 @@
 }
 
 node 'snapshot1001.eqiad.wmnet' {
+system::role { 'role::snapshot': description => 'snapshot server' }
 $gid= '500'
 include snapshot
 class { 'snapshot::dumps': hugewikis => true }
@@ -2575,6 +2581,9 @@
 
 
 node 'tridge.wikimedia.org' {
+
+system::role { 'role::backup': description => 'Backup server' }
+
 include base
 include backup::server
 }

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

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

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


[MediaWiki-commits] [Gerrit] Update Flow - change (mediawiki/core)

2014-03-25 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Update Flow
..


Update Flow

Change-Id: Ieda96c861b768a4985edcc454d357c844a2f1c7a
---
M extensions/Flow
1 file changed, 0 insertions(+), 0 deletions(-)

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



diff --git a/extensions/Flow b/extensions/Flow
index 5a5fe6d..06fecfd 16
--- a/extensions/Flow
+++ b/extensions/Flow
-Subproject commit 5a5fe6dd91391e1724b208219757e1e4d158f4b3
+Subproject commit 06fecfdfc2789e823e01c8a8b4f78567ee9b349e

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ieda96c861b768a4985edcc454d357c844a2f1c7a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.23wmf19
Gerrit-Owner: Spage 
Gerrit-Reviewer: Spage 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Adding a component so we can bypass the visual stuff for bat... - change (mediawiki...DonationInterface)

2014-03-25 Thread Mwalker (Code Review)
Mwalker has submitted this change and it was merged.

Change subject: Adding a component so we can bypass the visual stuff for batch 
operations and api requests that don't need a form.
..


Adding a component so we can bypass the visual stuff
for batch operations and api requests that don't need a form.

Possibly necessary for WorldPay

Change-Id: I02fd8182ed25960e20cc368deba06f3f81b2fee1
---
M gateway_common/donation.api.php
M gateway_common/gateway.adapter.php
M globalcollect_gateway/globalcollect.adapter.php
M tests/Adapter/GatewayAdapterTestCase.php
M tests/TestConfiguration.php
5 files changed, 89 insertions(+), 35 deletions(-)

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



diff --git a/gateway_common/donation.api.php b/gateway_common/donation.api.php
index 4f08cd2..b7c6709 100644
--- a/gateway_common/donation.api.php
+++ b/gateway_common/donation.api.php
@@ -17,8 +17,12 @@
// @todo FIXME: Unused local variable.
$submethod = $this->donationData['payment_submethod'];
 
+   $gateway_opts = array (
+   'api_request' => 'true'
+   );
+
if ( $this->gateway == 'payflowpro' ) {
-   $gatewayObj = new PayflowProAdapter();
+   $gatewayObj = new PayflowProAdapter( $gateway_opts );
switch ( $method ) {
// TODO: add other payment methods
default:
@@ -26,9 +30,9 @@
}
} elseif ( $this->gateway == 'globalcollect' ) {
if ( $wgDonationInterfaceTestMode === true ) {
-   $gatewayObj = new TestingGlobalCollectAdapter();
+   $gatewayObj = new TestingGlobalCollectAdapter( 
$gateway_opts );
} else {
-   $gatewayObj = new GlobalCollectAdapter();
+   $gatewayObj = new GlobalCollectAdapter( 
$gateway_opts );
}
switch ( $method ) {
// TODO: add other payment methods
@@ -39,7 +43,7 @@
$result = $gatewayObj->do_transaction( 
'TEST_CONNECTION' );
}
} elseif ( $this->gateway == 'adyen' ) {
-   $gatewayObj = new AdyenAdapter();
+   $gatewayObj = new AdyenAdapter( $gateway_opts );
$result = $gatewayObj->do_transaction( 'donate' );
} else {
$this->dieUsage( "Invalid gateway 
<<<{$this->gateway}>>> passed to Donation API.", 'unknown_gateway' );
diff --git a/gateway_common/gateway.adapter.php 
b/gateway_common/gateway.adapter.php
index 723ca0d..108cb59 100644
--- a/gateway_common/gateway.adapter.php
+++ b/gateway_common/gateway.adapter.php
@@ -270,6 +270,7 @@
 */
public $posted = false;
protected $batch = false;
+   protected $api_request = false;
 
//ALL OF THESE need to be redefined in the children. Much voodoo 
depends on the accuracy of these constants. 
const GATEWAY_NAME = 'Donation Gateway';
@@ -299,13 +300,10 @@
public function __construct( $options = array() ) {
global $wgRequest;
 
-   //TODO: EXTRACT MUST DIE.
-   // Extract the options
-   extract( $options );
+   $testData = isset( $options['testData'] ) ? 
$options['testData'] : false;
+   $external_data = isset( $options['external_data'] ) ? 
$options['external_data'] : false; //not test data: Regular type.
+   $api_request = isset( $options['api_request'] ) ? 
$options['api_request'] : false; //Are we handling an API request?
 
-   $testData = isset( $testData ) ? $testData : false;
-   $external_data = isset( $external_data ) ? $external_data : 
false; //not test data: Regular type. 
-   
if ( !self::getGlobal( 'Test' ) ) {
$this->url = self::getGlobal( 'URL' );
// Only submit test data if we are in test mode.
@@ -314,6 +312,11 @@
if ( $testData ){
$external_data = $testData;
}
+   }
+
+   //so we know we can skip all the visual stuff. 
+   if ( $api_request ) {
+   $this->setApiRequest();
}
 
$this->defineOrderIDMeta(); //must happen before we go to 
DonationData.
@@ -2465,7 +2468,28 @@
return $this->batch;
}
}
-   
+
+   /**
+* Tell the gateway that it is going to be used for an API request, so
+* it can bypass setting up all the 

[MediaWiki-commits] [Gerrit] Update Flow - change (mediawiki/core)

2014-03-25 Thread Spage (Code Review)
Spage has uploaded a new change for review.

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

Change subject: Update Flow
..

Update Flow

Change-Id: Ieda96c861b768a4985edcc454d357c844a2f1c7a
---
M extensions/Flow
1 file changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/55/120955/1

diff --git a/extensions/Flow b/extensions/Flow
index 5a5fe6d..06fecfd 16
--- a/extensions/Flow
+++ b/extensions/Flow
-Subproject commit 5a5fe6dd91391e1724b208219757e1e4d158f4b3
+Subproject commit 06fecfdfc2789e823e01c8a8b4f78567ee9b349e

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ieda96c861b768a4985edcc454d357c844a2f1c7a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.23wmf19
Gerrit-Owner: Spage 

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


[MediaWiki-commits] [Gerrit] Update Wikidata to fix an exception on Client - change (mediawiki/core)

2014-03-25 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Update Wikidata to fix an exception on Client
..


Update Wikidata to fix an exception on Client

Change-Id: Ic31cee7b4a90e72cf296cb597ba3beab6f8d39f8
---
M extensions/Wikidata
1 file changed, 0 insertions(+), 0 deletions(-)

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



diff --git a/extensions/Wikidata b/extensions/Wikidata
index 8c6c953..4d8def7 16
--- a/extensions/Wikidata
+++ b/extensions/Wikidata
-Subproject commit 8c6c953b3ab2f1a11e972ee3c9b5d9231d6f9f85
+Subproject commit 4d8def721d6b1fcffda367775d341f4393658747

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic31cee7b4a90e72cf296cb597ba3beab6f8d39f8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.23wmf19
Gerrit-Owner: Hoo man 
Gerrit-Reviewer: Hoo man 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] CodeEditor now passes jslint, so make it voting - change (integration/zuul-config)

2014-03-25 Thread TheDJ (Code Review)
TheDJ has uploaded a new change for review.

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

Change subject: CodeEditor now passes jslint, so make it voting
..

CodeEditor now passes jslint, so make it voting

Bug: 61592
Change-Id: Ic097facf4a62970e80032f9e4216bfc99847b6c9
---
M layout.yaml
1 file changed, 0 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/zuul-config 
refs/changes/54/120954/1

diff --git a/layout.yaml b/layout.yaml
index 4484b53..5e44264 100644
--- a/layout.yaml
+++ b/layout.yaml
@@ -372,8 +372,6 @@
 voting: false
   - name: mwext-ClickTracking-jslint  # bug 61591
 voting: false
-  - name: mwext-CodeEditor-jslint  # bug 61592
-voting: false
   - name: mwext-CodeReview-jslint  # bug 61593
 voting: false
   - name: mwext-Collection-jslint  # bug 61594

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic097facf4a62970e80032f9e4216bfc99847b6c9
Gerrit-PatchSet: 1
Gerrit-Project: integration/zuul-config
Gerrit-Branch: master
Gerrit-Owner: TheDJ 

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


[MediaWiki-commits] [Gerrit] Sanitize embed HTML - change (mediawiki...MultimediaViewer)

2014-03-25 Thread Code Review
Gergő Tisza has uploaded a new change for review.

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

Change subject: Sanitize embed HTML
..

Sanitize embed HTML

Make sure tables, lists and other complex stuff do not get into the
embed HTML code.

Change-Id: I559dc7892e058e403ddde6994a7e1ac0c9585325
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/369
---
M resources/mmv/mmv.EmbedFileFormatter.js
1 file changed, 17 insertions(+), 0 deletions(-)


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

diff --git a/resources/mmv/mmv.EmbedFileFormatter.js 
b/resources/mmv/mmv.EmbedFileFormatter.js
index 0f6ddf6..3fc597a 100644
--- a/resources/mmv/mmv.EmbedFileFormatter.js
+++ b/resources/mmv/mmv.EmbedFileFormatter.js
@@ -73,6 +73,9 @@
 * @return {string} byline (can contain HTML)
 */
EFFP.getByline = function ( author, source ) {
+   author = author && this.whitelistHtml( author );
+   source = source && this.whitelistHtml( source );
+
if ( author && source) {
return mw.message(
'multimediaviewer-credit',
@@ -189,5 +192,19 @@
return $( '' + html + '' ).text();
};
 
+   /**
+* @param {string} html
+* @return {string}
+* FIXME this should probably be handled via dependency injection. Or 
some sort of utils class.
+*/
+   EFFP.whitelistHtml = function ( html ) {
+   var element = mw.mmv.ui.Element.prototype,
+   whitelistHtml = element.whitelistHtml,
+   $el = $( '' + html + '' );
+
+   whitelistHtml.call( element, $el );
+   return $el.html();
+   };
+
mw.mmv.EmbedFileFormatter = EmbedFileFormatter;
 }( mediaWiki, jQuery ) );

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

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

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


[MediaWiki-commits] [Gerrit] (Bug 62834) Accept multi-line comments in inline_breaks check - change (mediawiki...parsoid)

2014-03-25 Thread Subramanya Sastry (Code Review)
Subramanya Sastry has uploaded a new change for review.

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

Change subject: (Bug 62834) Accept multi-line comments in inline_breaks check
..

(Bug 62834) Accept multi-line comments in inline_breaks check

* Added a new parser test.

* But, it fails wt2html because of additional php attributes that
  our normalizer doesn't seem to be able to strip off. We have
  a lot of wt2html failures for headings. Either we fix our
  normalizer or add parsoid-specific html for these tests.
  This should be investigated separately.

Change-Id: Ie920e5c2ce307c223232c0fd2b82c880dd9a8eae
---
M lib/mediawiki.tokenizer.peg.js
M tests/parserTests-blacklist.js
M tests/parserTests.txt
3 files changed, 17 insertions(+), 1 deletion(-)


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

diff --git a/lib/mediawiki.tokenizer.peg.js b/lib/mediawiki.tokenizer.peg.js
index 210c86b..c4ccb0b 100644
--- a/lib/mediawiki.tokenizer.peg.js
+++ b/lib/mediawiki.tokenizer.peg.js
@@ -225,7 +225,7 @@
( pos === input.length - 1 ||
  input.substr( pos + 1 )
// possibly more equals 
followed by spaces or comments
-   .match(/^=*(?:[ 
\t]|<\!--(?:(?!-->)[^\r\n])+-->)*(?:[\r\n]|$)/) !== null )
+   .match(/^=*(?:[ 
\t]|<\!--(?:(?!-->)[\s\S])+-->)*(?:[\r\n]|$)/) !== null )
) || null;
case '|':
return stops.onStack('pipe') ||
diff --git a/tests/parserTests-blacklist.js b/tests/parserTests-blacklist.js
index c28718f..1762c91 100644
--- a/tests/parserTests-blacklist.js
+++ b/tests/parserTests-blacklist.js
@@ -250,6 +250,7 @@
 add("wt2html", "Short headings with trailing space should match behavior of 
Parser::doHeadings (bug 19910)", "=== 
\nThe line above must have a trailing space!\n===  \nBut just 
in case it doesn't...");
 add("wt2html", "Header with special characters (bug 25462)", "The tooltips shall not show entities to the 
user (ie. be double escaped)\n\n 
text > text \nsection 
1\n\n text < text \nsection 2\n\n text & text \nsection 3\n\n text ' text \nsection 4\n\n text \" text \nsection 5");
 add("wt2html", "HTML headers vs TOC (bug 23393)\n(__NOEDITSECTION__ for 
clearer output, doesn't matter here)", "Header 1\n Header 1.1 \n Header 1.2 \n\nHeader 2\n\n Header 2.1 \n Header 2.2 \n");
+add("wt2html", "Single-line or multiline-comments can follow headings", "foo\nbar");
 add("wt2html", "BUG 1219 URL next to image (broken)", "http://example.com\"; 
data-parsoid='{\"stx\":\"url\",\"dsr\":[0,18,0,0]}'>http://example.com");
 add("wt2html", "Namespaced link must have a title", "Project:");
 add("wt2html", "Namespaced link must have a title (bad fragment version)", "Project:#fragment");
diff --git a/tests/parserTests.txt b/tests/parserTests.txt
index e8c853e..0c9204e 100644
--- a/tests/parserTests.txt
+++ b/tests/parserTests.txt
@@ -11703,6 +11703,21 @@
 !! end
 
 !! test
+Single-line or multiline-comments can follow headings
+!! options
+parsoid=wt2html,wt2wt
+!! wikitext
+==foo==
+==bar==
+!! html
+foo
+bar
+
+!! end
+
+!! test
 BUG 1219 URL next to image (broken)
 !! wikitext
 http://example.com[[Image:foobar.jpg]]

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

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

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


[MediaWiki-commits] [Gerrit] Whitelist Sam Smith (WMF engineer) - change (integration/zuul-config)

2014-03-25 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Whitelist Sam Smith (WMF engineer)
..


Whitelist Sam Smith (WMF engineer)

Change-Id: Ib2abe3a00030026187216ab00c9df033b9429fe5
---
M layout.yaml
1 file changed, 2 insertions(+), 1 deletion(-)

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



diff --git a/layout.yaml b/layout.yaml
index c5a081a..4484b53 100644
--- a/layout.yaml
+++ b/layout.yaml
@@ -37,7 +37,7 @@
   # TODO: Figure out a way to not have to repeat this from pipeline 
'test'.
   # This email_filter and the one for 'test' can be removed once we 
have fixed bug 45499.
   email_filter:
-- 
^(?!(.*?@wikimedia\.org|.*?@wikimedia\.de|l10n-bot@translatewiki\.net|anomie\.wikipedia@gmail\.com|amir\.aharoni@mail\.huji\.ac\.il|hashar@free\.fr|jeroendedauw@gmail\.com|maxsem\.wiki@gmail\.com|mtraceur@member\.fsf\.org|niklas\.laxstrom@gmail\.com|santhosh\.thottingal@gmail\.com|s\.mazeland@xs4all\.nl|stefan\.petrea@gmail\.com|stefan@garage-coding\.com|roan\.kattouw@gmail\.com|krinklemail@gmail\.com|trevorparscal@gmail\.com|inez@wikia-inc\.com|orbit@framezero\.com|david@sheetmusic\.org\.uk|glaser@hallowelt\.biz|aude\.wiki@gmail\.com|bawolff\+wn@gmail\.com|bryan\.tongminh@gmail\.com|dereckson@espace-win\.org|hartman\.wiki@gmail\.com|hoo@online\.de|codereview@emsenhuber\.ch|daniel@nadir-seen-fire\.com|jamesin\.hongkong\.1@gmail\.com|krenair@gmail\.com|liangent@gmail\.com|mah@everybody\.org|matma\.rex@gmail\.com|raimond\.spekking@gmail\.com|robinp\.1273@gmail\.com|tim@tim-landscheidt\.de|tylerromeo@gmail\.com|umherirrender_de\.wp@web\.de|yuriastrakhan@gmail\.com|yaron57@gmail\.com|markus@semantic-mediawiki\.org|s7eph4n@gmail\.org|wiki@physikerwelt\.de|addshorewiki@gmail\.com|pragun06@gmail\.com|nilesh@nileshc\.com|benestar\.wikimedia@googlemail\.com|mlazowik@gmail\.com|pleasestand@live\.com|legoktm\.wikipedia@gmail\.com|moriel@gmail\.com|d_entous@yahoo\.com|kartik\.mistry@gmail\.com|drenfro@vistaprint\.com|matanya\.moses@gmail\.com|matanya@foss\.co\.il|andrew\.green\.df@gmail\.com|thomaspt@hotmail\.fr|tomasz@twkozlowski\.net|yuvipanda@gmail\.com|aarcos\.wiki@gmail\.com|saper@saper\.info|christian@quelltextlich\.at|maria\.pacana@gmail\.com|bebirchall@gmail\.com|shahyar@gmail\.com|federicoleva@tiscali\.it|jack@countervandalism\.net|at\.light@live\.com\.au|jackmcbarn@gmail\.com|platonides@gmail\.com|jarry1250@gmail\.com|admin@alphacorp\.tk|01tonythomas@gmail\.com|benapetr@gmail\.com|pastakhov@yandex\.ru|hardikjuneja\.hj@gmail\.com|siebrand@kitano\.nl)).*$
+- 
^(?!(.*?@wikimedia\.org|.*?@wikimedia\.de|l10n-bot@translatewiki\.net|anomie\.wikipedia@gmail\.com|amir\.aharoni@mail\.huji\.ac\.il|hashar@free\.fr|jeroendedauw@gmail\.com|maxsem\.wiki@gmail\.com|mtraceur@member\.fsf\.org|niklas\.laxstrom@gmail\.com|santhosh\.thottingal@gmail\.com|s\.mazeland@xs4all\.nl|stefan\.petrea@gmail\.com|stefan@garage-coding\.com|roan\.kattouw@gmail\.com|krinklemail@gmail\.com|trevorparscal@gmail\.com|inez@wikia-inc\.com|orbit@framezero\.com|david@sheetmusic\.org\.uk|git@samsmith\.io|glaser@hallowelt\.biz|aude\.wiki@gmail\.com|bawolff\+wn@gmail\.com|bryan\.tongminh@gmail\.com|dereckson@espace-win\.org|hartman\.wiki@gmail\.com|hoo@online\.de|codereview@emsenhuber\.ch|daniel@nadir-seen-fire\.com|jamesin\.hongkong\.1@gmail\.com|krenair@gmail\.com|liangent@gmail\.com|mah@everybody\.org|matma\.rex@gmail\.com|raimond\.spekking@gmail\.com|robinp\.1273@gmail\.com|tim@tim-landscheidt\.de|tylerromeo@gmail\.com|umherirrender_de\.wp@web\.de|yuriastrakhan@gmail\.com|yaron57@gmail\.com|markus@semantic-mediawiki\.org|s7eph4n@gmail\.org|wiki@physikerwelt\.de|addshorewiki@gmail\.com|pragun06@gmail\.com|nilesh@nileshc\.com|benestar\.wikimedia@googlemail\.com|mlazowik@gmail\.com|pleasestand@live\.com|legoktm\.wikipedia@gmail\.com|moriel@gmail\.com|d_entous@yahoo\.com|kartik\.mistry@gmail\.com|drenfro@vistaprint\.com|matanya\.moses@gmail\.com|matanya@foss\.co\.il|andrew\.green\.df@gmail\.com|thomaspt@hotmail\.fr|tomasz@twkozlowski\.net|yuvipanda@gmail\.com|aarcos\.wiki@gmail\.com|saper@saper\.info|christian@quelltextlich\.at|maria\.pacana@gmail\.com|bebirchall@gmail\.com|shahyar@gmail\.com|federicoleva@tiscali\.it|jack@countervandalism\.net|at\.light@live\.com\.au|jackmcbarn@gmail\.com|platonides@gmail\.com|jarry1250@gmail\.com|admin@alphacorp\.tk|01tonythomas@gmail\.com|benapetr@gmail\.com|pastakhov@yandex\.ru|hardikjuneja\.hj@gmail\.com|siebrand@kitano\.nl)).*$
 - event: comment-added
   comment_filter: (?im)^Patch Set \d+:\n\n\s*recheck\.?\s*$
 success-message: 'Build succeeded.'
@@ -116,6 +116,7 @@
- ^bawolff\+wn@gmail\.com$
- ^christian@quelltextlich\.at$
- ^david@sheetmusic\.org\.uk$ # David Chan
+   - ^git@samsmith\.io$ # Sam Smith
- ^glaser@hallowelt\.biz$
- ^hashar@free\.fr$
- ^jeroe

[MediaWiki-commits] [Gerrit] Make bin/scap-recompile executable - change (mediawiki...scap)

2014-03-25 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Make bin/scap-recompile executable
..


Make bin/scap-recompile executable

Change-Id: I335f931bd01c902b97ccd08874f6768e5ac3f493
---
M bin/scap-recompile
1 file changed, 0 insertions(+), 0 deletions(-)

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



diff --git a/bin/scap-recompile b/bin/scap-recompile
old mode 100644
new mode 100755

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I335f931bd01c902b97ccd08874f6768e5ac3f493
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/tools/scap
Gerrit-Branch: master
Gerrit-Owner: Hashar 
Gerrit-Reviewer: Aaron Schulz 
Gerrit-Reviewer: BryanDavis 
Gerrit-Reviewer: Ori.livneh 
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] Move diff related functions for roundtrip-test from Util mod... - change (mediawiki...parsoid)

2014-03-25 Thread Bebirchall (Code Review)
Bebirchall has uploaded a new change for review.

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

Change subject: Move diff related functions for roundtrip-test from Util module 
to Diff module
..

Move diff related functions for roundtrip-test from Util module to Diff module

Change-Id: I7715617b26eecbc435b764b7b7ae0027f01d9fff
---
M lib/mediawiki.Diff.js
M lib/mediawiki.Util.js
M tests/roundtrip-test.js
3 files changed, 122 insertions(+), 157 deletions(-)


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

diff --git a/lib/mediawiki.Diff.js b/lib/mediawiki.Diff.js
index 11a2f0b..eabbb34 100644
--- a/lib/mediawiki.Diff.js
+++ b/lib/mediawiki.Diff.js
@@ -1,5 +1,6 @@
 "use strict";
 var simpleDiff = require('simplediff');
+var jsDiff = require('diff');
 
 var Diff = {};
 (function(exports){
@@ -102,6 +103,83 @@
//  return out;
// };
 
+   // Variant of diff with some extra context
+   var contextDiff = function(a, b, color, onlyReportChanges, useLines) {
+   var diff = jsDiff.diffLines( a, b ),
+   offsetPairs = this.convertDiffToOffsetPairs( diff ),
+   results = [];
+   offsetPairs.map(function(pair) {
+   var context = 5,
+   asource = a.substring(pair[0].start - context, 
pair[0].end + context),
+   bsource = b.substring(pair[1].start - context, 
pair[1].end + context);
+   results.push('++\n' + JSON.stringify(asource));
+   results.push('--\n' + JSON.stringify(bsource));
+   //results.push('==\n' + Util.diff(a, b, color, 
onlyReportChanges, useLines));
+   });
+   if ( !onlyReportChanges || diff.length > 0 ) {
+   return results.join('\n');
+   } else {
+   return '';
+   }
+   };
+
+   exports.convertDiffToOffsetPairs = function ( diff ) {
+   var currentPair, pairs = [], srcOff = 0, outOff = 0;
+   diff.map( function ( change ) {
+   var pushPair = function ( pair, start ) {
+   if ( !pair.added ) {
+   pair.added = {start: start, end: start 
};
+   } else if ( !pair.removed ) {
+   pair.removed = {start: start, end: 
start };
+   }
+
+   pairs.push( [pair.added, pair.removed] );
+   currentPair = {};
+   };
+
+   var valueLength = change[1].join('').length;
+
+   if ( !currentPair ) {
+   currentPair = {};
+   }
+
+   if ( change[0] === '+' ) {
+   if ( currentPair.added ) {
+   pushPair( currentPair, outOff );
+   }
+
+   currentPair.added = { start: outOff };
+   outOff += valueLength;
+   currentPair.added.end = outOff;
+
+   if ( currentPair.removed ) {
+   pushPair( currentPair );
+   }
+   } else if ( change[0] === '-' ) {
+   if ( currentPair.removed ) {
+   pushPair( currentPair, srcOff );
+   }
+
+   currentPair.removed = { start: srcOff };
+   srcOff += valueLength;
+   currentPair.removed.end = srcOff;
+
+   if ( currentPair.added ) {
+   pushPair( currentPair );
+   }
+   } else {
+   if ( currentPair.added || currentPair.removed ) 
{
+   pushPair( currentPair, 
currentPair.added ? srcOff : outOff );
+   }
+
+   srcOff += valueLength;
+   outOff += valueLength;
+   }
+   } );
+
+   return pairs;
+   };
+
var escapeHTML = function(string) {
var result = string;
result = result.replace(/&/g, '&');
@@ -159,6 +237,45 @@
return diffTokens(oldString, newString, lineTokenize);
};
 
+   exports.htmlDiff = function ( a, b, color, onlyReportChanges, useLines 
) {
+   var thediff, patch, diffs = 0;
+   if ( color ) {
+

[MediaWiki-commits] [Gerrit] Enable Flow on Compact Personal Bar BF talk page - change (operations/mediawiki-config)

2014-03-25 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Enable Flow on Compact Personal Bar BF talk page
..


Enable Flow on Compact Personal Bar BF talk page

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

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



diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 2d76d1e..70f983f 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -12391,6 +12391,7 @@
'Talk:Winter', // talk page for design refresh
'User talk:Jorm (WMF)',
'Talk:Beta Features/Hovercards',
+   'Talk:Compact Personal Bar',
),
'enwiki' => array( // Bug 60178
'Wikipedia talk:WikiProject Breakfast',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7ca3051f6a9781261ab487a353e63016769fc843
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Spage 
Gerrit-Reviewer: EBernhardson 
Gerrit-Reviewer: Spage 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Update Wikidata to fix an exception on Client - change (mediawiki/core)

2014-03-25 Thread Hoo man (Code Review)
Hoo man has uploaded a new change for review.

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

Change subject: Update Wikidata to fix an exception on Client
..

Update Wikidata to fix an exception on Client

Change-Id: Ic31cee7b4a90e72cf296cb597ba3beab6f8d39f8
---
M extensions/Wikidata
1 file changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/50/120950/1

diff --git a/extensions/Wikidata b/extensions/Wikidata
index 8c6c953..4d8def7 16
--- a/extensions/Wikidata
+++ b/extensions/Wikidata
-Subproject commit 8c6c953b3ab2f1a11e972ee3c9b5d9231d6f9f85
+Subproject commit 4d8def721d6b1fcffda367775d341f4393658747

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic31cee7b4a90e72cf296cb597ba3beab6f8d39f8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.23wmf19
Gerrit-Owner: Hoo man 

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


[MediaWiki-commits] [Gerrit] Prevent throwing an exception on the watchlist if the enhanc... - change (mediawiki...Wikidata)

2014-03-25 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Prevent throwing an exception on the watchlist if the enhanced 
changes list is enabled
..


Prevent throwing an exception on the watchlist if the enhanced changes list is 
enabled

Wikibase change I7e665507

Change-Id: I525b852bc2d83385244fbfb881b8d7a283470f9e
---
M extensions/Wikibase/client/includes/hooks/SpecialWatchlistQueryHandler.php
1 file changed, 1 insertion(+), 3 deletions(-)

Approvals:
  Hoo man: Looks good to me, approved
  WikidataJenkins: Verified
  jenkins-bot: Verified



diff --git 
a/extensions/Wikibase/client/includes/hooks/SpecialWatchlistQueryHandler.php 
b/extensions/Wikibase/client/includes/hooks/SpecialWatchlistQueryHandler.php
index 745ea83..02ce7fa 100644
--- a/extensions/Wikibase/client/includes/hooks/SpecialWatchlistQueryHandler.php
+++ b/extensions/Wikibase/client/includes/hooks/SpecialWatchlistQueryHandler.php
@@ -46,11 +46,9 @@
 * @return array
 */
public function addWikibaseConditions( WebRequest $request, array 
$conds, $opts ) {
-   $hideWikibase = $opts->getValue( 'hideWikibase');
-
// do not include wikibase changes for activated enhanced 
watchlist
// since we do not support that format yet
-   if ( $this->isEnhancedChangesEnabled( $request ) === true || 
$hideWikibase === true ) {
+   if ( $this->isEnhancedChangesEnabled( $request ) === true || 
$opts->getValue( 'hideWikibase' ) === true ) {
$newConds = $this->makeHideWikibaseConds( $conds );
} else {
$newConds = $this->makeShowWikibaseConds( $conds );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I525b852bc2d83385244fbfb881b8d7a283470f9e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikidata
Gerrit-Branch: mw1.23-wmf19
Gerrit-Owner: Hoo man 
Gerrit-Reviewer: Addshore 
Gerrit-Reviewer: Aude 
Gerrit-Reviewer: Hoo man 
Gerrit-Reviewer: Tobias Gritschacher 
Gerrit-Reviewer: WikidataJenkins 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Remove reference to entity content and improve special page ... - change (mediawiki...Wikibase)

2014-03-25 Thread Jeroen De Dauw (Code Review)
Jeroen De Dauw has submitted this change and it was merged.

Change subject: Remove reference to entity content and improve special page 
comments
..


Remove reference to entity content and improve special page comments

Change-Id: I57d68da3d62d0a565a01cf124d7c09041aa7
---
M repo/includes/specials/SpecialModifyEntity.php
M repo/includes/specials/SpecialNewEntity.php
M repo/includes/specials/SpecialWikibaseRepoPage.php
3 files changed, 5 insertions(+), 11 deletions(-)

Approvals:
  WikidataJenkins: Verified
  Jeroen De Dauw: Looks good to me, approved



diff --git a/repo/includes/specials/SpecialModifyEntity.php 
b/repo/includes/specials/SpecialModifyEntity.php
index 0917ba9..ee989f8 100644
--- a/repo/includes/specials/SpecialModifyEntity.php
+++ b/repo/includes/specials/SpecialModifyEntity.php
@@ -21,8 +21,6 @@
 abstract class SpecialModifyEntity extends SpecialWikibaseRepoPage {
 
/**
-* The entity content to modify.
-*
 * @since 0.5
 *
 * @var EntityRevision
@@ -44,8 +42,6 @@
protected $rightsText;
 
/**
-* Constructor.
-*
 * @since 0.4
 *
 * @param string $title The title of the special page
diff --git a/repo/includes/specials/SpecialNewEntity.php 
b/repo/includes/specials/SpecialNewEntity.php
index 68e44b4..6e03d84 100644
--- a/repo/includes/specials/SpecialNewEntity.php
+++ b/repo/includes/specials/SpecialNewEntity.php
@@ -169,11 +169,11 @@
}
 
/**
-* Create entity content
+* Create entity
 *
 * @since 0.1
 *
-* @return Entity Created entity content of correct subtype
+* @return Entity Created entity of correct subtype
 */
abstract protected function createEntity();
 
diff --git a/repo/includes/specials/SpecialWikibaseRepoPage.php 
b/repo/includes/specials/SpecialWikibaseRepoPage.php
index 4a38b44..8da79f9 100644
--- a/repo/includes/specials/SpecialWikibaseRepoPage.php
+++ b/repo/includes/specials/SpecialWikibaseRepoPage.php
@@ -56,8 +56,6 @@
private $entityPermissionChecker;
 
/**
-* Constructor.
-*
 * @since 0.5
 *
 * @param string $title The title of the special page
@@ -122,7 +120,7 @@
}
 
/**
-* Loads the entity content for this entity id.
+* Loads the entity for this entity id.
 *
 * @since 0.5
 *
@@ -159,7 +157,7 @@
}
 
/**
-* Saves the entity content using the given summary.
+* Saves the entity using the given summary.
 *
 * @param Entity $entity
 * @param Summary $summary
@@ -189,4 +187,4 @@
 
return $status;
}
-}
\ No newline at end of file
+}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I57d68da3d62d0a565a01cf124d7c09041aa7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Aude 
Gerrit-Reviewer: Jeroen De Dauw 
Gerrit-Reviewer: WikidataJenkins 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] [WIP] Show option to log in or save anonymously when not log... - change (apps...wikipedia)

2014-03-25 Thread Yuvipanda (Code Review)
Yuvipanda has uploaded a new change for review.

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

Change subject: [WIP] Show option to log in or save anonymously when not logged 
in
..

[WIP] Show option to log in or save anonymously when not logged in

- Needs color finalization
- Needs copy finalization
- Might need a slide instead of fade in showing

Change-Id: I974d815b74c96ca12c7f9005257640b10abca2f5
---
M wikipedia/res/layout/activity_edit_section.xml
A wikipedia/res/layout/group_edit_save_options.xml
M wikipedia/res/values-qq/strings.xml
M wikipedia/res/values/strings.xml
M wikipedia/src/main/java/org/wikipedia/editing/EditPreviewFragment.java
M wikipedia/src/main/java/org/wikipedia/editing/EditSectionActivity.java
M wikipedia/src/main/java/org/wikipedia/login/LoginActivity.java
7 files changed, 143 insertions(+), 6 deletions(-)


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

diff --git a/wikipedia/res/layout/activity_edit_section.xml 
b/wikipedia/res/layout/activity_edit_section.xml
index 6c959c5..b18ba49 100644
--- a/wikipedia/res/layout/activity_edit_section.xml
+++ b/wikipedia/res/layout/activity_edit_section.xml
@@ -84,6 +84,7 @@
 android:id="@+id/edit_section_preview_container"
 android:orientation="vertical"
 >
+
 
+
+http://schemas.android.com/apk/res/android";
+android:id="@+id/edit_section_save_options_container"
+android:layout_width="match_parent"
+android:layout_height="wrap_content"
+android:orientation="horizontal"
+android:visibility="gone"
+>
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/wikipedia/res/values-qq/strings.xml 
b/wikipedia/res/values-qq/strings.xml
index 8ebed21..3f759ec 100644
--- a/wikipedia/res/values-qq/strings.xml
+++ b/wikipedia/res/values-qq/strings.xml
@@ -67,4 +67,8 @@
   Text shown as a button at the end 
of lists that let the user load more items.
   Title for screen showing list 
of edits by current user.
   Text for item in nav menu that when 
tapped shows list of edits made by the user.
+  Title of action that takes user to 
login screen so they can login before saving an edit
+  Title of action that lets the user save 
the current edit anonymously
+  Description for action that 
takes user to login screen so they can login before saving an edit
+  Description for action 
that lets the user save the current edit anonymously
 
diff --git a/wikipedia/res/values/strings.xml b/wikipedia/res/values/strings.xml
index 7294d05..f06c444 100644
--- a/wikipedia/res/values/strings.xml
+++ b/wikipedia/res/values/strings.xml
@@ -123,4 +123,12 @@
 Load more
 My Contributions
 My contributions
+Login and save
+Save anonymously
+(Descriptive text of what 
happens when you choose this option.
+Finalize before merging)
+
+(Descriptive text of why 
you should log in. Finalize this before
+merging)
+
 
diff --git 
a/wikipedia/src/main/java/org/wikipedia/editing/EditPreviewFragment.java 
b/wikipedia/src/main/java/org/wikipedia/editing/EditPreviewFragment.java
index 1f97117..88b82ab 100644
--- a/wikipedia/src/main/java/org/wikipedia/editing/EditPreviewFragment.java
+++ b/wikipedia/src/main/java/org/wikipedia/editing/EditPreviewFragment.java
@@ -91,14 +91,23 @@
 }
 
 public boolean handleBackPressed() {
-if (previewContainer.getVisibility() == View.VISIBLE) {
-Utils.crossFade(previewContainer, 
getActivity().findViewById(R.id.edit_section_container));
-
getActivity().getActionBar().setTitle(R.string.edit_section_activity_title);
-return true && editSummaryHandler.handleBackPressed();
+if (isActive()) {
+hide();
+return editSummaryHandler.handleBackPressed();
 }
 return false;
 }
 
+public void hide() {
+Utils.crossFade(previewContainer, 
getActivity().findViewById(R.id.edit_section_container));
+
getActivity().getActionBar().setTitle(R.string.edit_section_activity_title);
+}
+
+
+public boolean isActive() {
+return previewContainer.getVisibility() == View.VISIBLE;
+}
+
 @Override
 public void onSaveInstanceState(Bundle outState) {
 super.onSaveInstanceState(outState);
diff --git 
a/wikipedia/src/main/java/org/wikipedia/editing/EditSectionActivity.java 
b/wikipedia/src/main/java/org/wikipedia/editing/EditSectionActivity.java
index f22238e..c920544 100644
--- a/wikipedia/src/main/java/org/wikipedia/editing/EditSectionActivity.java
+++ b/wikipedia/src/main/java/org/wikipedia/editing/EditSectionActivity.java
@@ -47,6 +47,10 @@
 
 private EditPreviewFragment editPreviewFragment;
 
+private View editSaveOptionsContainer;
+private View editSaveOptionAnon;
+private View editSaveOptionLogIn;
+
 public void onCreate

[MediaWiki-commits] [Gerrit] Clean parsed HTML - change (mediawiki...CommonsMetadata)

2014-03-25 Thread Code Review
Gergő Tisza has uploaded a new change for review.

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

Change subject: Clean parsed HTML
..

Clean parsed HTML

* remove language names from description
* trim whitespace
* remove wrapping  (MediaWiki uses it to wrap everything
  surrounded by newlines)

Bug: 57262
Bug: 57458
Bug: 57848
Change-Id: I96ec1612b31fd7c6bed8462b6d3df26f296c09b7
---
M TemplateParser.php
M tests/phpunit/TemplateParserTest.php
2 files changed, 35 insertions(+), 13 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CommonsMetadata 
refs/changes/48/120948/1

diff --git a/TemplateParser.php b/TemplateParser.php
index c850368..8b764fc 100755
--- a/TemplateParser.php
+++ b/TemplateParser.php
@@ -61,6 +61,15 @@
'fileinfotpl_perm' => 'Permission',
);
 
+   /**
+* preg_replace patterns which will be used to clean up parsed HTML 
code.
+* @var array
+*/
+   protected static $cleanupPatterns = array(
+   '/^\s+(.*)\s+$/' => '\1', // trim whitespace
+   '/^(.*)<\/p>$/' => '\1', // clean paragraph with no styling 
- usually generated by MediaWiki
+   );
+
/** @var array */
protected $priorityLanguages = array( 'en' );
 
@@ -157,7 +166,7 @@
$method = 'parseField' . $fieldName;
 
if ( !method_exists( $this, $method ) ) {
-   $method = 'parseText';
+   $method = 'parseContents';
}
 
$data[$groupName][$fieldName] = $this->{$method}( 
$domNavigator, $informationField );
@@ -175,10 +184,10 @@
 */
protected function parseFieldArtist( DomNavigator $domNavigator, 
DOMNode $node ) {
if ( $field = $this->extractHCardProperty(  $domNavigator, 
$node, 'fn' ) ) {
-   return $this->innerHtml( $field );
+   return $this->cleanedInnerHtml( $field );
}
 
-   return $this->parseText( $domNavigator, $node );
+   return $this->parseContents( $domNavigator, $node );
}
 
/**
@@ -233,7 +242,7 @@
$data = array();
foreach ( self::$licenseFieldClasses as $class => $fieldName ) {
foreach ( $domNavigator->findElementsWithClass( '*', 
$class, $licenseNode ) as $node) {
-   $data[$fieldName] = $this->innerHtml( $node );
+   $data[$fieldName] = $this->cleanedInnerHtml( 
$node );
break;
}
}
@@ -247,21 +256,21 @@
 * @param DOMNode $node
 * @return string|array
 */
-   protected function parseText( DomNavigator $domNavigator, DOMNode $node 
) {
+   protected function parseContents( DomNavigator $domNavigator, DOMNode 
$node ) {
$languageNodes = $domNavigator->findElementsWithClassAndLang( 
'div', 'description', $node );
if ( !$languageNodes->length ) { // no language templates at all
-   return $this->innerHtml( $node );
+   return $this->cleanedInnerHtml( $node );
}
$languages = array();
foreach ( $languageNodes as $node ) {
-   //$node = $this->removeLanguageName( $domNavigator, 
$node );
+   $node = $this->removeLanguageName( $domNavigator, $node 
);
$languageCode = $node->getAttribute( 'lang' );
$languages[$languageCode] = $node;
}
if ( !$this->multiLanguage ) {
-   return $this->innerHtml( $this->selectLanguage( 
$languages ) );
+   return $this->cleanedInnerHtml( $this->selectLanguage( 
$languages ) );
} else {
-   $languages = array_map( array( $this, 'innerHtml' ), 
$languages );
+   $languages = array_map( array( $this, 
'cleanedInnerHtml' ), $languages );
$languages['_type'] = 'lang';
return $languages;
}
@@ -340,6 +349,23 @@
}
 
/**
+* Turns a node into HTML, except for the enclosing tag.
+* Cleans up the contents by removing enclosing whitespace and some 
HTML elements.
+* @param DOMNode $node
+* @return string
+*/
+   protected function cleanedInnerHtml( DOMNode $node ) {
+   $html = $this->innerHtml( $node );
+   do {
+   $oldHtml = $html;
+   foreach ( static::$cleanupPatterns as $pattern => 
$replacement ) {
+   $html = preg_replace( $pattern, $replacement, 
$html );
+   }
+  

[MediaWiki-commits] [Gerrit] Delay logging during config startup, to avoid stdout when qu... - change (wikimedia...tools)

2014-03-25 Thread Mwalker (Code Review)
Mwalker has submitted this change and it was merged.

Change subject: Delay logging during config startup, to avoid stdout when 
quiet=1
..


Delay logging during config startup, to avoid stdout when quiet=1

This is so stupid.  We need to improve the scripts' calling context to be less
twitchy.

Change-Id: I58b54d2a3edef060e0e747dedb54b259b5195afa
---
M process/globals.py
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/process/globals.py b/process/globals.py
index 319bb03..805dbd5 100644
--- a/process/globals.py
+++ b/process/globals.py
@@ -24,8 +24,8 @@
 if not os.path.exists(filename):
 continue
 
-log.info("Found config file {path}, loading...".format(path=filename))
 config = DictAsAttrDict(load_yaml(file(filename, 'r')))
+log.info("Loaded config from {path}.".format(path=filename))
 
 return
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I58b54d2a3edef060e0e747dedb54b259b5195afa
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/tools
Gerrit-Branch: master
Gerrit-Owner: Adamw 
Gerrit-Reviewer: Jgreen 
Gerrit-Reviewer: Katie Horn 
Gerrit-Reviewer: Mwalker 
Gerrit-Reviewer: Ssmith 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Prevent throwing an exception on the watchlist if the enhanc... - change (mediawiki...Wikidata)

2014-03-25 Thread Hoo man (Code Review)
Hoo man has uploaded a new change for review.

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

Change subject: Prevent throwing an exception on the watchlist if the enhanced 
changes list is enabled
..

Prevent throwing an exception on the watchlist if the enhanced changes list is 
enabled

Wikibase change I7e665507

Change-Id: I525b852bc2d83385244fbfb881b8d7a283470f9e
---
M extensions/Wikibase/client/includes/hooks/SpecialWatchlistQueryHandler.php
1 file changed, 1 insertion(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikidata 
refs/changes/47/120947/1

diff --git 
a/extensions/Wikibase/client/includes/hooks/SpecialWatchlistQueryHandler.php 
b/extensions/Wikibase/client/includes/hooks/SpecialWatchlistQueryHandler.php
index 745ea83..02ce7fa 100644
--- a/extensions/Wikibase/client/includes/hooks/SpecialWatchlistQueryHandler.php
+++ b/extensions/Wikibase/client/includes/hooks/SpecialWatchlistQueryHandler.php
@@ -46,11 +46,9 @@
 * @return array
 */
public function addWikibaseConditions( WebRequest $request, array 
$conds, $opts ) {
-   $hideWikibase = $opts->getValue( 'hideWikibase');
-
// do not include wikibase changes for activated enhanced 
watchlist
// since we do not support that format yet
-   if ( $this->isEnhancedChangesEnabled( $request ) === true || 
$hideWikibase === true ) {
+   if ( $this->isEnhancedChangesEnabled( $request ) === true || 
$opts->getValue( 'hideWikibase' ) === true ) {
$newConds = $this->makeHideWikibaseConds( $conds );
} else {
$newConds = $this->makeShowWikibaseConds( $conds );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I525b852bc2d83385244fbfb881b8d7a283470f9e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikidata
Gerrit-Branch: mw1.23-wmf19
Gerrit-Owner: Hoo man 

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


[MediaWiki-commits] [Gerrit] Prevent FormOptions from throwing an exception with the enha... - change (mediawiki...Wikibase)

2014-03-25 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Prevent FormOptions from throwing an exception with the 
enhanced changes list
..


Prevent FormOptions from throwing an exception with the enhanced changes list

This threw an excpetion as $opts only knew about the hideWikibase option
if the enhanced changes list is disabled, but in SpecialWatchlistQueryHandler
we were querying for that option unconditionally.

Bug: 63087
Change-Id: I7e66550787d359e294b288e4c966e11fec1bcef1
(cherry picked from commit b139241fefb88ba80e9ec820eda839d1829e95b2)
---
M client/includes/hooks/SpecialWatchlistQueryHandler.php
1 file changed, 1 insertion(+), 3 deletions(-)

Approvals:
  Hoo man: Looks good to me, approved
  WikidataJenkins: Verified
  jenkins-bot: Verified



diff --git a/client/includes/hooks/SpecialWatchlistQueryHandler.php 
b/client/includes/hooks/SpecialWatchlistQueryHandler.php
index 745ea83..02ce7fa 100644
--- a/client/includes/hooks/SpecialWatchlistQueryHandler.php
+++ b/client/includes/hooks/SpecialWatchlistQueryHandler.php
@@ -46,11 +46,9 @@
 * @return array
 */
public function addWikibaseConditions( WebRequest $request, array 
$conds, $opts ) {
-   $hideWikibase = $opts->getValue( 'hideWikibase');
-
// do not include wikibase changes for activated enhanced 
watchlist
// since we do not support that format yet
-   if ( $this->isEnhancedChangesEnabled( $request ) === true || 
$hideWikibase === true ) {
+   if ( $this->isEnhancedChangesEnabled( $request ) === true || 
$opts->getValue( 'hideWikibase' ) === true ) {
$newConds = $this->makeHideWikibaseConds( $conds );
} else {
$newConds = $this->makeShowWikibaseConds( $conds );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7e66550787d359e294b288e4c966e11fec1bcef1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: mw1.23-wmf19
Gerrit-Owner: Hoo man 
Gerrit-Reviewer: Hoo man 
Gerrit-Reviewer: WikidataJenkins 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Fixing a problem with ewallets, rtbt, and boletos - change (mediawiki...DonationInterface)

2014-03-25 Thread Adamw (Code Review)
Adamw has submitted this change and it was merged.

Change subject: Fixing a problem with ewallets, rtbt, and boletos
..


Fixing a problem with ewallets, rtbt, and boletos

Change-Id: I612b3368833efa724939487a37d2ee690805c0cd
---
M globalcollect_gateway/globalcollect.adapter.php
M tests/Adapter/GlobalCollect/AllTests.php
M tests/Adapter/GlobalCollect/RealTimeBankTransferEnetsTestCase.php
M tests/Adapter/GlobalCollect/RealTimeBankTransferIdealTestCase.php
A tests/Adapter/GlobalCollect/YandexTestCase.php
M tests/DonationInterfaceTestCase.php
M tests/includes/test_gateway/test.adapter.php
7 files changed, 145 insertions(+), 8 deletions(-)

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



diff --git a/globalcollect_gateway/globalcollect.adapter.php 
b/globalcollect_gateway/globalcollect.adapter.php
index fbcfc44..67317c3 100644
--- a/globalcollect_gateway/globalcollect.adapter.php
+++ b/globalcollect_gateway/globalcollect.adapter.php
@@ -2413,4 +2413,22 @@
$result = $avs_map[$this->getData_Unstaged_Escaped( 
'avs_result' )];
return $result;
}
+
+   /**
+* Used by ewallets, rtbt, and cash (boletos) to retrieve the URL we 
should
+* be posting the form data to. 
+*
+* @return string|false Returns FORMACTION if one exists in the 
transaction response, else false.
+*/
+   public function getTransactionDataFormAction() {
+
+   $data = $this->getTransactionData();
+
+   if ( is_array( $data ) && array_key_exists( 'FORMACTION', $data 
) ) {
+   return $data['FORMACTION'];
+   } else {
+   return false;
+   }
+   }
+
 }
diff --git a/tests/Adapter/GlobalCollect/AllTests.php 
b/tests/Adapter/GlobalCollect/AllTests.php
index 19c1fa6..8a25c14 100644
--- a/tests/Adapter/GlobalCollect/AllTests.php
+++ b/tests/Adapter/GlobalCollect/AllTests.php
@@ -70,7 +70,8 @@
$suite->addTestSuite( 
'DonationInterface_Adapter_GlobalCollect_RealTimeBankTransferEpsTestCase' );
$suite->addTestSuite( 
'DonationInterface_Adapter_GlobalCollect_RealTimeBankTransferIdealTestCase' );
$suite->addTestSuite( 
'DonationInterface_Adapter_GlobalCollect_RealTimeBankTransferNordeaSwedenTestCase'
 );
-   $suite->addTestSuite( 
'DonationInterface_Adapter_GlobalCollect_RealTimeBankTransferSofortuberweisungTestCase'
 ); 
+   $suite->addTestSuite( 
'DonationInterface_Adapter_GlobalCollect_RealTimeBankTransferSofortuberweisungTestCase'
 );
+   $suite->addTestSuite( 
'DonationInterface_Adapter_GlobalCollect_YandexTestCase' );
 
return $suite;
}
diff --git a/tests/Adapter/GlobalCollect/RealTimeBankTransferEnetsTestCase.php 
b/tests/Adapter/GlobalCollect/RealTimeBankTransferEnetsTestCase.php
index 1ad583e..98c9082 100644
--- a/tests/Adapter/GlobalCollect/RealTimeBankTransferEnetsTestCase.php
+++ b/tests/Adapter/GlobalCollect/RealTimeBankTransferEnetsTestCase.php
@@ -14,8 +14,6 @@
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  * GNU General Public License for more details.
  *
- * @since  r100821
- * @author Jeremy Postlethwaite 
  */
 
 /**
@@ -56,5 +54,24 @@
 
$this->buildRequestXmlForGlobalCollect( $optionsForTestData, 
$options );
}
+
+   public function testFormAction() {
+
+   $optionsForTestData = array (
+   'payment_method' => 'rtbt',
+   'payment_submethod' => 'rtbt_enets',
+   'payment_product_id' => 810,
+   );
+
+   //somewhere else?
+   $options = $this->getDonorTestData( 'ES' );
+   $options = array_merge( $options, $optionsForTestData );
+
+   $this->gatewayAdapter = $this->getFreshGatewayObject( $options 
);
+   $this->gatewayAdapter->do_transaction( 
"INSERT_ORDERWITHPAYMENT" );
+   $action = $this->gatewayAdapter->getTransactionDataFormAction();
+   $this->assertEquals( "rtbt_enets_url_placeholder", $action, 
"The enets formation is off." );
+   }
+
 }
 
diff --git a/tests/Adapter/GlobalCollect/RealTimeBankTransferIdealTestCase.php 
b/tests/Adapter/GlobalCollect/RealTimeBankTransferIdealTestCase.php
index a5b5b31..cdaff61 100644
--- a/tests/Adapter/GlobalCollect/RealTimeBankTransferIdealTestCase.php
+++ b/tests/Adapter/GlobalCollect/RealTimeBankTransferIdealTestCase.php
@@ -14,8 +14,6 @@
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  * GNU General Public License for more details.
  *
- * @since  r100822
- * @author Jeremy Postlethwaite 
  */
 
 /**
@@ -283,5 +281,24 @@
 
$this->buildRequestXmlForGlobalCollect( $optionsForTestData

[MediaWiki-commits] [Gerrit] Bind environment - change (mediawiki...parsoid)

2014-03-25 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Bind environment
..


Bind environment

Change-Id: Idc72217498132fdc655f8cf39f8e6ecc7ddcb7c5
---
M lib/mediawiki.DOMPostProcessor.js
1 file changed, 3 insertions(+), 3 deletions(-)

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



diff --git a/lib/mediawiki.DOMPostProcessor.js 
b/lib/mediawiki.DOMPostProcessor.js
index 19b36c8..d632aa8 100644
--- a/lib/mediawiki.DOMPostProcessor.js
+++ b/lib/mediawiki.DOMPostProcessor.js
@@ -89,7 +89,7 @@
  * avoid fostering. Piggy-backing the reconversion here to avoid excess
  * DOM traversals.
  */
-function prepareDOM( node ) {
+function prepareDOM( env, node ) {
DU.loadDataParsoid( node );
 
if ( DU.isElt( node ) ) {
@@ -113,7 +113,7 @@
try {
meta.setAttribute( attr.name, 
attr.value );
} catch(e) {
-   this.env.log("warning", "prepareDOM: 
Dropped invalid attribute", attr.name);
+   env.log("warning", "prepareDOM: Dropped 
invalid attribute", attr.name);
}
});
node.parentNode.insertBefore( meta, node );
@@ -142,7 +142,7 @@
 
// DOM traverser that runs before the in-order DOM handlers.
var dataParsoidLoader = new DOMTraverser(env);
-   dataParsoidLoader.addHandler( null, prepareDOM );
+   dataParsoidLoader.addHandler( null, prepareDOM.bind(null, env) );
 
// Common post processing
this.processors = [

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

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

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


[MediaWiki-commits] [Gerrit] Prevent FormOptions from throwing an exception with the enha... - change (mediawiki...Wikibase)

2014-03-25 Thread Hoo man (Code Review)
Hoo man has uploaded a new change for review.

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

Change subject: Prevent FormOptions from throwing an exception with the 
enhanced changes list
..

Prevent FormOptions from throwing an exception with the enhanced changes list

This threw an excpetion as $opts only knew about the hideWikibase option
if the enhanced changes list is disabled, but in SpecialWatchlistQueryHandler
we were querying for that option unconditionally.

Bug: 63087
Change-Id: I7e66550787d359e294b288e4c966e11fec1bcef1
(cherry picked from commit b139241fefb88ba80e9ec820eda839d1829e95b2)
---
M client/includes/hooks/SpecialWatchlistQueryHandler.php
1 file changed, 1 insertion(+), 3 deletions(-)


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

diff --git a/client/includes/hooks/SpecialWatchlistQueryHandler.php 
b/client/includes/hooks/SpecialWatchlistQueryHandler.php
index 745ea83..02ce7fa 100644
--- a/client/includes/hooks/SpecialWatchlistQueryHandler.php
+++ b/client/includes/hooks/SpecialWatchlistQueryHandler.php
@@ -46,11 +46,9 @@
 * @return array
 */
public function addWikibaseConditions( WebRequest $request, array 
$conds, $opts ) {
-   $hideWikibase = $opts->getValue( 'hideWikibase');
-
// do not include wikibase changes for activated enhanced 
watchlist
// since we do not support that format yet
-   if ( $this->isEnhancedChangesEnabled( $request ) === true || 
$hideWikibase === true ) {
+   if ( $this->isEnhancedChangesEnabled( $request ) === true || 
$opts->getValue( 'hideWikibase' ) === true ) {
$newConds = $this->makeHideWikibaseConds( $conds );
} else {
$newConds = $this->makeShowWikibaseConds( $conds );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7e66550787d359e294b288e4c966e11fec1bcef1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: mw1.23-wmf19
Gerrit-Owner: Hoo man 

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


[MediaWiki-commits] [Gerrit] Fixing a problem with ewallets, rtbt, and boletos - change (mediawiki...DonationInterface)

2014-03-25 Thread Katie Horn (Code Review)
Katie Horn has uploaded a new change for review.

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

Change subject: Fixing a problem with ewallets, rtbt, and boletos
..

Fixing a problem with ewallets, rtbt, and boletos

Change-Id: I612b3368833efa724939487a37d2ee690805c0cd
---
M globalcollect_gateway/globalcollect.adapter.php
M tests/Adapter/GlobalCollect/AllTests.php
M tests/Adapter/GlobalCollect/RealTimeBankTransferEnetsTestCase.php
M tests/Adapter/GlobalCollect/RealTimeBankTransferIdealTestCase.php
A tests/Adapter/GlobalCollect/YandexTestCase.php
M tests/DonationInterfaceTestCase.php
M tests/includes/test_gateway/test.adapter.php
7 files changed, 145 insertions(+), 8 deletions(-)


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

diff --git a/globalcollect_gateway/globalcollect.adapter.php 
b/globalcollect_gateway/globalcollect.adapter.php
index fbcfc44..67317c3 100644
--- a/globalcollect_gateway/globalcollect.adapter.php
+++ b/globalcollect_gateway/globalcollect.adapter.php
@@ -2413,4 +2413,22 @@
$result = $avs_map[$this->getData_Unstaged_Escaped( 
'avs_result' )];
return $result;
}
+
+   /**
+* Used by ewallets, rtbt, and cash (boletos) to retrieve the URL we 
should
+* be posting the form data to. 
+*
+* @return string|false Returns FORMACTION if one exists in the 
transaction response, else false.
+*/
+   public function getTransactionDataFormAction() {
+
+   $data = $this->getTransactionData();
+
+   if ( is_array( $data ) && array_key_exists( 'FORMACTION', $data 
) ) {
+   return $data['FORMACTION'];
+   } else {
+   return false;
+   }
+   }
+
 }
diff --git a/tests/Adapter/GlobalCollect/AllTests.php 
b/tests/Adapter/GlobalCollect/AllTests.php
index 19c1fa6..8a25c14 100644
--- a/tests/Adapter/GlobalCollect/AllTests.php
+++ b/tests/Adapter/GlobalCollect/AllTests.php
@@ -70,7 +70,8 @@
$suite->addTestSuite( 
'DonationInterface_Adapter_GlobalCollect_RealTimeBankTransferEpsTestCase' );
$suite->addTestSuite( 
'DonationInterface_Adapter_GlobalCollect_RealTimeBankTransferIdealTestCase' );
$suite->addTestSuite( 
'DonationInterface_Adapter_GlobalCollect_RealTimeBankTransferNordeaSwedenTestCase'
 );
-   $suite->addTestSuite( 
'DonationInterface_Adapter_GlobalCollect_RealTimeBankTransferSofortuberweisungTestCase'
 ); 
+   $suite->addTestSuite( 
'DonationInterface_Adapter_GlobalCollect_RealTimeBankTransferSofortuberweisungTestCase'
 );
+   $suite->addTestSuite( 
'DonationInterface_Adapter_GlobalCollect_YandexTestCase' );
 
return $suite;
}
diff --git a/tests/Adapter/GlobalCollect/RealTimeBankTransferEnetsTestCase.php 
b/tests/Adapter/GlobalCollect/RealTimeBankTransferEnetsTestCase.php
index 1ad583e..98c9082 100644
--- a/tests/Adapter/GlobalCollect/RealTimeBankTransferEnetsTestCase.php
+++ b/tests/Adapter/GlobalCollect/RealTimeBankTransferEnetsTestCase.php
@@ -14,8 +14,6 @@
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  * GNU General Public License for more details.
  *
- * @since  r100821
- * @author Jeremy Postlethwaite 
  */
 
 /**
@@ -56,5 +54,24 @@
 
$this->buildRequestXmlForGlobalCollect( $optionsForTestData, 
$options );
}
+
+   public function testFormAction() {
+
+   $optionsForTestData = array (
+   'payment_method' => 'rtbt',
+   'payment_submethod' => 'rtbt_enets',
+   'payment_product_id' => 810,
+   );
+
+   //somewhere else?
+   $options = $this->getDonorTestData( 'ES' );
+   $options = array_merge( $options, $optionsForTestData );
+
+   $this->gatewayAdapter = $this->getFreshGatewayObject( $options 
);
+   $this->gatewayAdapter->do_transaction( 
"INSERT_ORDERWITHPAYMENT" );
+   $action = $this->gatewayAdapter->getTransactionDataFormAction();
+   $this->assertEquals( "rtbt_enets_url_placeholder", $action, 
"The enets formation is off." );
+   }
+
 }
 
diff --git a/tests/Adapter/GlobalCollect/RealTimeBankTransferIdealTestCase.php 
b/tests/Adapter/GlobalCollect/RealTimeBankTransferIdealTestCase.php
index a5b5b31..cdaff61 100644
--- a/tests/Adapter/GlobalCollect/RealTimeBankTransferIdealTestCase.php
+++ b/tests/Adapter/GlobalCollect/RealTimeBankTransferIdealTestCase.php
@@ -14,8 +14,6 @@
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  * GNU General Public License for more details.
  *
- * @since  r100822
- * @author Jeremy Postlethwaite 
  */
 
 /**
@@ -283,

[MediaWiki-commits] [Gerrit] Prevent FormOptions from throwing an exception with the enha... - change (mediawiki...Wikibase)

2014-03-25 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Prevent FormOptions from throwing an exception with the 
enhanced changes list
..


Prevent FormOptions from throwing an exception with the enhanced changes list

This threw an excpetion as $opts only knew about the hideWikibase option
if the enhanced changes list is disabled, but in SpecialWatchlistQueryHandler
we were querying for that option unconditionally.

Bug: 63087
Change-Id: I7e66550787d359e294b288e4c966e11fec1bcef1
---
M client/includes/hooks/SpecialWatchlistQueryHandler.php
1 file changed, 1 insertion(+), 3 deletions(-)

Approvals:
  Thiemo Mättig (WMDE): Looks good to me, approved
  jenkins-bot: Verified



diff --git a/client/includes/hooks/SpecialWatchlistQueryHandler.php 
b/client/includes/hooks/SpecialWatchlistQueryHandler.php
index 745ea83..02ce7fa 100644
--- a/client/includes/hooks/SpecialWatchlistQueryHandler.php
+++ b/client/includes/hooks/SpecialWatchlistQueryHandler.php
@@ -46,11 +46,9 @@
 * @return array
 */
public function addWikibaseConditions( WebRequest $request, array 
$conds, $opts ) {
-   $hideWikibase = $opts->getValue( 'hideWikibase');
-
// do not include wikibase changes for activated enhanced 
watchlist
// since we do not support that format yet
-   if ( $this->isEnhancedChangesEnabled( $request ) === true || 
$hideWikibase === true ) {
+   if ( $this->isEnhancedChangesEnabled( $request ) === true || 
$opts->getValue( 'hideWikibase' ) === true ) {
$newConds = $this->makeHideWikibaseConds( $conds );
} else {
$newConds = $this->makeShowWikibaseConds( $conds );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7e66550787d359e294b288e4c966e11fec1bcef1
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Hoo man 
Gerrit-Reviewer: Thiemo Mättig (WMDE) 
Gerrit-Reviewer: WikidataJenkins 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] [WIP] Add an RL module that contains static(ish) config for ... - change (mediawiki...MobileApp)

2014-03-25 Thread Yuvipanda (Code Review)
Yuvipanda has uploaded a new change for review.

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

Change subject: [WIP] Add an RL module that contains static(ish) config for the 
app
..

[WIP] Add an RL module that contains static(ish) config for the app

This module will be downloaded by the app once every day or so.
We will use this to tweak config settings that can not wait
for an app update (too many issues from anon editing, or
too much spam from feedback link)

This produces JS that can be trivially parsed to be just JSON.

Change-Id: I615a06f6bdae5fdc27e3519df4e45fa50aa74110
FIXME: Actually produce just JSON.
---
M MobileApp.php
A config.js
2 files changed, 12 insertions(+), 0 deletions(-)


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

diff --git a/MobileApp.php b/MobileApp.php
index 807dd17..8620425 100644
--- a/MobileApp.php
+++ b/MobileApp.php
@@ -34,3 +34,11 @@
'localBasePath' => $localBasePath,
'remoteExtPath' => $remoteExtPath
 );
+
+$wgResourceModules['mobile.app.config'] = array(
+   'scripts' => array(
+   'config.js'
+   ),
+   'localBasePath' => $localBasePath,
+   'remoteExtPath' => $remoteExtPath
+);
diff --git a/config.js b/config.js
new file mode 100644
index 000..9b09512
--- /dev/null
+++ b/config.js
@@ -0,0 +1,4 @@
+{
+   allowAnonEditing: true,
+   hideFeedbackLink: false
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I615a06f6bdae5fdc27e3519df4e45fa50aa74110
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileApp
Gerrit-Branch: master
Gerrit-Owner: Yuvipanda 

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


[MediaWiki-commits] [Gerrit] Delay logging during config startup, to avoid stdout when qu... - change (wikimedia...tools)

2014-03-25 Thread Adamw (Code Review)
Adamw has uploaded a new change for review.

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

Change subject: Delay logging during config startup, to avoid stdout when 
quiet=1
..

Delay logging during config startup, to avoid stdout when quiet=1

This is so stupid.  We need to improve the scripts' calling context to be less
twitchy.

Change-Id: I58b54d2a3edef060e0e747dedb54b259b5195afa
---
M process/globals.py
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/tools 
refs/changes/43/120943/1

diff --git a/process/globals.py b/process/globals.py
index 319bb03..805dbd5 100644
--- a/process/globals.py
+++ b/process/globals.py
@@ -24,8 +24,8 @@
 if not os.path.exists(filename):
 continue
 
-log.info("Found config file {path}, loading...".format(path=filename))
 config = DictAsAttrDict(load_yaml(file(filename, 'r')))
+log.info("Loaded config from {path}.".format(path=filename))
 
 return
 

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

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

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


[MediaWiki-commits] [Gerrit] Bind environment - change (mediawiki...parsoid)

2014-03-25 Thread Arlolra (Code Review)
Arlolra has uploaded a new change for review.

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

Change subject: Bind environment
..

Bind environment

Change-Id: Idc72217498132fdc655f8cf39f8e6ecc7ddcb7c5
---
M lib/mediawiki.DOMPostProcessor.js
1 file changed, 3 insertions(+), 3 deletions(-)


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

diff --git a/lib/mediawiki.DOMPostProcessor.js 
b/lib/mediawiki.DOMPostProcessor.js
index 19b36c8..d632aa8 100644
--- a/lib/mediawiki.DOMPostProcessor.js
+++ b/lib/mediawiki.DOMPostProcessor.js
@@ -89,7 +89,7 @@
  * avoid fostering. Piggy-backing the reconversion here to avoid excess
  * DOM traversals.
  */
-function prepareDOM( node ) {
+function prepareDOM( env, node ) {
DU.loadDataParsoid( node );
 
if ( DU.isElt( node ) ) {
@@ -113,7 +113,7 @@
try {
meta.setAttribute( attr.name, 
attr.value );
} catch(e) {
-   this.env.log("warning", "prepareDOM: 
Dropped invalid attribute", attr.name);
+   env.log("warning", "prepareDOM: Dropped 
invalid attribute", attr.name);
}
});
node.parentNode.insertBefore( meta, node );
@@ -142,7 +142,7 @@
 
// DOM traverser that runs before the in-order DOM handlers.
var dataParsoidLoader = new DOMTraverser(env);
-   dataParsoidLoader.addHandler( null, prepareDOM );
+   dataParsoidLoader.addHandler( null, prepareDOM.bind(null, env) );
 
// Common post processing
this.processors = [

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idc72217498132fdc655f8cf39f8e6ecc7ddcb7c5
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] Remove wfDebugLog() call from wfSetupSession() - change (mediawiki/core)

2014-03-25 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Remove wfDebugLog() call from wfSetupSession()
..


Remove wfDebugLog() call from wfSetupSession()

Since Iffba121a99 (00b7f76) with the removal of wfHttpOnlySafe(),
session cookie's parameters are based only on configuration
settings, so there is no point to spam the "cookie" log group
with predicitible values.

Change-Id: I8b1cdea929cefc32dd8b01c2ecbf2d76bb64189f
---
M includes/GlobalFunctions.php
1 file changed, 0 insertions(+), 8 deletions(-)

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



diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php
index f0b0a8d..2314cb2 100644
--- a/includes/GlobalFunctions.php
+++ b/includes/GlobalFunctions.php
@@ -3513,14 +3513,6 @@
# hasn't already been set to the desired value (that causes 
errors)
ini_set( 'session.save_handler', $wgSessionHandler );
}
-   wfDebugLog( 'cookie',
-   'session_set_cookie_params: "' . implode( '", "',
-   array(
-   0,
-   $wgCookiePath,
-   $wgCookieDomain,
-   $wgCookieSecure,
-   $wgCookieHttpOnly ) ) . '"' );
session_set_cookie_params(
0, $wgCookiePath, $wgCookieDomain, $wgCookieSecure, 
$wgCookieHttpOnly );
session_cache_limiter( 'private, must-revalidate' );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8b1cdea929cefc32dd8b01c2ecbf2d76bb64189f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: IAlex 
Gerrit-Reviewer: Aaron Schulz 
Gerrit-Reviewer: Bartosz Dziewoński 
Gerrit-Reviewer: Brion VIBBER 
Gerrit-Reviewer: CSteipp 
Gerrit-Reviewer: Parent5446 
Gerrit-Reviewer: PleaseStand 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Added .gitignore and .gitreview files - change (mediawiki...cxserver)

2014-03-25 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Added .gitignore and .gitreview files
..


Added .gitignore and .gitreview files

Change-Id: Ic719dcc424af675381d34daae52ce709fb9e6829
---
A .gitignore
A .gitreview
2 files changed, 13 insertions(+), 0 deletions(-)

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



diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000..87e3e08
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,7 @@
+.svn
+*~
+*.kate-swp
+.*.swp
+.idea
+.bundle/
+node_modules
diff --git a/.gitreview b/.gitreview
new file mode 100644
index 000..57ac5dc
--- /dev/null
+++ b/.gitreview
@@ -0,0 +1,6 @@
+[gerrit]
+host=gerrit.wikimedia.org
+port=29418
+project=mediawiki/services/cxserver.git
+defaultbranch=master
+defaultrebase=0

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic719dcc424af675381d34daae52ce709fb9e6829
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/cxserver
Gerrit-Branch: master
Gerrit-Owner: KartikMistry 
Gerrit-Reviewer: Amire80 
Gerrit-Reviewer: Nikerabbit 
Gerrit-Reviewer: Santhosh 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Prevent FormOptions from throwing an exception with the enha... - change (mediawiki...Wikibase)

2014-03-25 Thread Hoo man (Code Review)
Hoo man has uploaded a new change for review.

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

Change subject: Prevent FormOptions from throwing an exception with the 
enhanced changes list
..

Prevent FormOptions from throwing an exception with the enhanced changes list

This threw and excpetion as $opts only knew about the hideWikibase option
if the enhanced changes list is disabled, but in SpecialWatchlistQueryHandler
we were querying for that option unconditionally.

Change-Id: I7e66550787d359e294b288e4c966e11fec1bcef1
---
M client/includes/hooks/SpecialWatchlistQueryHandler.php
1 file changed, 1 insertion(+), 3 deletions(-)


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

diff --git a/client/includes/hooks/SpecialWatchlistQueryHandler.php 
b/client/includes/hooks/SpecialWatchlistQueryHandler.php
index 745ea83..2f3651c 100644
--- a/client/includes/hooks/SpecialWatchlistQueryHandler.php
+++ b/client/includes/hooks/SpecialWatchlistQueryHandler.php
@@ -46,11 +46,9 @@
 * @return array
 */
public function addWikibaseConditions( WebRequest $request, array 
$conds, $opts ) {
-   $hideWikibase = $opts->getValue( 'hideWikibase');
-
// do not include wikibase changes for activated enhanced 
watchlist
// since we do not support that format yet
-   if ( $this->isEnhancedChangesEnabled( $request ) === true || 
$hideWikibase === true ) {
+   if ( $this->isEnhancedChangesEnabled( $request ) === true || 
$opts->getValue( 'hideWikibase') === true ) {
$newConds = $this->makeHideWikibaseConds( $conds );
} else {
$newConds = $this->makeShowWikibaseConds( $conds );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7e66550787d359e294b288e4c966e11fec1bcef1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Hoo man 

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


[MediaWiki-commits] [Gerrit] beta: compile texvc on both datacenters - change (integration/jenkins-job-builder-config)

2014-03-25 Thread Hashar (Code Review)
Hashar has uploaded a new change for review.

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

Change subject: beta: compile texvc on both datacenters
..

beta: compile texvc on both datacenters

Change-Id: I09424ed3bf4c2d0d5bda49959dedfe43b43b837e
---
M beta.yaml
1 file changed, 11 insertions(+), 3 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/integration/jenkins-job-builder-config 
refs/changes/40/120940/1

diff --git a/beta.yaml b/beta.yaml
index cc56557..d0beaa1 100644
--- a/beta.yaml
+++ b/beta.yaml
@@ -37,10 +37,10 @@
 #
 # Should be triggered on post merge.
 #
-- job:
-name: beta-recompile-math-texvc
+- job-template:
+name: beta-recompile-math-texvc-{datacenter}
 defaults: beta
-node: deployment-bastion
+node: deployment-bastion-{datacenter}
 
 triggers:
  - zuul
@@ -239,3 +239,11 @@
 
  - shell: |
  sudo /etc/init.d/parsoid restart
+
+- project:
+name: beta
+datacenter:
+ - eqiad
+ - pmtpa
+jobs:
+ - beta-recompile-math-texvc-{datacenter}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I09424ed3bf4c2d0d5bda49959dedfe43b43b837e
Gerrit-PatchSet: 1
Gerrit-Project: integration/jenkins-job-builder-config
Gerrit-Branch: master
Gerrit-Owner: Hashar 

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


[MediaWiki-commits] [Gerrit] beta: compile texvc on both datacenters - change (integration/zuul-config)

2014-03-25 Thread Hashar (Code Review)
Hashar has uploaded a new change for review.

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

Change subject: beta: compile texvc on both datacenters
..

beta: compile texvc on both datacenters

Change-Id: I09424ed3bf4c2d0d5bda49959dedfe43b43b837e
---
M layout.yaml
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/zuul-config 
refs/changes/39/120939/1

diff --git a/layout.yaml b/layout.yaml
index c5a081a..bc37410 100644
--- a/layout.yaml
+++ b/layout.yaml
@@ -2036,7 +2036,8 @@
   - name: extension-unittests
 extname: Math
 postmerge:
-  - beta-recompile-math-texvc
+  - beta-recompile-math-texvc-eqiad
+  - beta-recompile-math-texvc-pmtpa
 
   - name: mediawiki/extensions/MathSearch
 template:

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I09424ed3bf4c2d0d5bda49959dedfe43b43b837e
Gerrit-PatchSet: 1
Gerrit-Project: integration/zuul-config
Gerrit-Branch: master
Gerrit-Owner: Hashar 

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


[MediaWiki-commits] [Gerrit] beta: explicitly define node on each job - change (integration/jenkins-job-builder-config)

2014-03-25 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: beta: explicitly define node on each job
..


beta: explicitly define node on each job

Instead of providing the node in the 'beta' defaults, set it for each
job.  Will let me safely use different nodes in job-templates.

Jobs are unchanged.

Change-Id: I70d17a76233de228367267d08dbd722ff6a9ba27
---
M beta.yaml
1 file changed, 4 insertions(+), 4 deletions(-)

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



diff --git a/beta.yaml b/beta.yaml
index 8e2947c..a08030b 100644
--- a/beta.yaml
+++ b/beta.yaml
@@ -24,8 +24,6 @@
   Job is managed by https://www.mediawiki.org/wiki/CI/JJB";>Jenkins Job Builder.
 project-type: freestyle
 
-node: deployment-bastion
-
 wrappers:
   - timeout:
   timeout: 360
@@ -42,6 +40,7 @@
 - job:
 name: beta-recompile-math-texvc
 defaults: beta
+node: deployment-bastion
 
 triggers:
  - zuul
@@ -72,6 +71,7 @@
 - job:
 name: beta-update-databases
 defaults: beta
+node: deployment-bastion
 
 project-type: matrix
 
@@ -134,11 +134,10 @@
 - job:
 name: beta-mediawiki-config-update
 defaults: use-zuul  # FIXME should use 'beta' probably
+node: deployment-bastion
 
 triggers:
  - zuul
-
-node: deployment-bastion
 
 scm:
 # Hack, remove the git scm from `use-zuul`. There is
@@ -178,6 +177,7 @@
 - job:
 name: beta-code-update
 defaults: beta
+node: deployment-bastion
 
 builders:
   # The beta autoupdate script uses npm and need the home to be set to

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I70d17a76233de228367267d08dbd722ff6a9ba27
Gerrit-PatchSet: 2
Gerrit-Project: integration/jenkins-job-builder-config
Gerrit-Branch: master
Gerrit-Owner: Hashar 
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] beta: Use scap-recomile from the scap git repo - change (integration/jenkins-job-builder-config)

2014-03-25 Thread Hashar (Code Review)
Hashar has uploaded a new change for review.

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

Change subject: beta: Use scap-recomile from the scap git repo
..

beta: Use scap-recomile from the scap git repo

Need to point /usr/local/bin/scap-recompile.

Due to some issue with the script provided by the scap repo, this change
depends on https://gerrit.wikimedia.org/r/#/c/120936/ to be merged..

Updates job beta-recompile-math-texvc

Change-Id: I328dc8bc58d869a3d651460de6920c2588c4d0d8
---
M beta.yaml
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/integration/jenkins-job-builder-config 
refs/changes/37/120937/1

diff --git a/beta.yaml b/beta.yaml
index a08030b..cc56557 100644
--- a/beta.yaml
+++ b/beta.yaml
@@ -33,7 +33,7 @@
 
 # Job to recompile math texvc whenever the mediawiki/extensions/Math repository
 # is updated.  The job makes sure the submodule is up-to-date before triggering
-# the /usr/bin/scap-recompile script.
+# the /usr/local/bin/scap-recompile script.
 #
 # Should be triggered on post merge.
 #
@@ -56,7 +56,7 @@
 git submodule Math ;
 '
  echo "Recompiling texvc as user 'mwdeploy'"
- sudo -u mwdeploy /usr/bin/scap-recompile
+ sudo -u mwdeploy /bin/bash /usr/local/bin/scap-recompile
 
 
 # Job to run MediaWiki update.php script on all the beta wikis.

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I328dc8bc58d869a3d651460de6920c2588c4d0d8
Gerrit-PatchSet: 1
Gerrit-Project: integration/jenkins-job-builder-config
Gerrit-Branch: master
Gerrit-Owner: Hashar 

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


[MediaWiki-commits] [Gerrit] QA: Make sure watchlist tests are setup correctly - change (mediawiki...MobileFrontend)

2014-03-25 Thread Jdlrobson (Code Review)
Jdlrobson has uploaded a new change for review.

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

Change subject: QA: Make sure watchlist tests are setup correctly
..

QA: Make sure watchlist tests are setup correctly

If any of the watchlist tests doesn't run properly or is run in
isolation it causes failures due to the existing watch state of the
page being incorrect.

This change addresses the FIXME by ensuring the page is watched or not
watched as part of the Given statements.

Change-Id: Ie3ae6f8e465234ccbc32a3c449023c4a81c4de42
---
A tests/browser/features/step_definitions/watchlist_steps.rb
M tests/browser/features/support/modules/url_module.rb
M tests/browser/features/support/pages/article_page.rb
M tests/browser/features/watchlist.feature
4 files changed, 17 insertions(+), 5 deletions(-)


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

diff --git a/tests/browser/features/step_definitions/watchlist_steps.rb 
b/tests/browser/features/step_definitions/watchlist_steps.rb
new file mode 100644
index 000..05a5947
--- /dev/null
+++ b/tests/browser/features/step_definitions/watchlist_steps.rb
@@ -0,0 +1,9 @@
+Given(/^I am not watching the "(.*?)" page$/) do |article|
+  visit(ArticlePage, :using_params => {:article_name => article, 
:query_string=> '?action=unwatch'})
+  on(ArticlePage).form_element.submit
+end
+
+Given(/^I am watching the "(.*?)" page$/) do |arg1|
+  visit(ArticlePage, :using_params => {:article_name => article, 
:query_string=> '?action=watch'})
+  on(ArticlePage).form_element.submit
+end
diff --git a/tests/browser/features/support/modules/url_module.rb 
b/tests/browser/features/support/modules/url_module.rb
index 56e4f81..cd5ec72 100644
--- a/tests/browser/features/support/modules/url_module.rb
+++ b/tests/browser/features/support/modules/url_module.rb
@@ -1,10 +1,10 @@
 module URL
-  def self.url(name)
+  def self.url(name, query_string='')
 if ENV["MEDIAWIKI_URL"]
   mediawiki_url = ENV["MEDIAWIKI_URL"]
 else
   mediawiki_url = "http://127.0.0.1:80/w/index.php";
 end
-"#{mediawiki_url}#{name}?useformat=mobile"
+"#{mediawiki_url}#{name}#{query_string}"
   end
 end
diff --git a/tests/browser/features/support/pages/article_page.rb 
b/tests/browser/features/support/pages/article_page.rb
index ba1098d..83a198a 100644
--- a/tests/browser/features/support/pages/article_page.rb
+++ b/tests/browser/features/support/pages/article_page.rb
@@ -2,7 +2,7 @@
   include PageObject
 
   include URL
-  page_url URL.url("<%=params[:article_name]%>")
+  page_url URL.url("<%=params[:article_name]%>", "<%=params[:query_string]%>")
 
   # UI elements
   a(:mainmenu_button, id: "mw-mf-main-menu-button")
@@ -133,4 +133,7 @@
 
   # pagelist
   ul(:page_list, css: ".page-list")
+
+  # For pages with forms e.g. action=watch
+  form(:form, css: "#content_wrapper form")
 end
diff --git a/tests/browser/features/watchlist.feature 
b/tests/browser/features/watchlist.feature
index 345e937..48e868c 100644
--- a/tests/browser/features/watchlist.feature
+++ b/tests/browser/features/watchlist.feature
@@ -3,6 +3,7 @@
 
   Scenario: Add an article to the watchlist
 Given I am logged into the mobile website
+  And I am not watching the "Barack Obama" page
   And I am on the "Barack Obama" page
   And I click the watch star
 Then I see a toast notification
@@ -11,8 +12,7 @@
 
   Scenario: Remove an article from the watchlist
 Given I am logged into the mobile website
-# FIXME: This assumes the scenario above has run and that the article is 
in fact watched
-# Add statement to ensure the Barack Obama article is already watched.
+  And I am watching the "Barack Obama" page
   And I am on the "Barack Obama" page
 When I click the watch star
 Then I see a toast notification

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie3ae6f8e465234ccbc32a3c449023c4a81c4de42
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


  1   2   3   4   >