[MediaWiki-commits] [Gerrit] a couple of hardy hosts out there need timeout package (e.g.... - change (operations/puppet)

2013-08-16 Thread ArielGlenn (Code Review)
ArielGlenn has uploaded a new change for review.

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


Change subject: a couple of hardy hosts out there need timeout package (e.g. 
erzurumi)
..

a couple of hardy hosts out there need timeout package (e.g. erzurumi)

Change-Id: Idbf5e58b825bd306b5d008b4c7a78fad5436d71a
---
M manifests/base.pp
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/11/79311/1

diff --git a/manifests/base.pp b/manifests/base.pp
index 66b4ad7..2a0ef7e 100644
--- a/manifests/base.pp
+++ b/manifests/base.pp
@@ -86,7 +86,7 @@
ensure = latest;
}
 
-   if $::lsbdistid == Ubuntu and versioncmp($::lsbdistrelease, 10.04) 
== 0 {
+   if $::lsbdistid == Ubuntu and (versioncmp($::lsbdistrelease, 10.04) 
== 0 or versioncmp($::lsbdistrelease, 8.04) == 0) {
package {timeout:
ensure = latest;
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idbf5e58b825bd306b5d008b4c7a78fad5436d71a
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: ArielGlenn ar...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] a couple of hardy hosts out there need timeout package (e.g.... - change (operations/puppet)

2013-08-16 Thread ArielGlenn (Code Review)
ArielGlenn has submitted this change and it was merged.

Change subject: a couple of hardy hosts out there need timeout package (e.g. 
erzurumi)
..


a couple of hardy hosts out there need timeout package (e.g. erzurumi)

Change-Id: Idbf5e58b825bd306b5d008b4c7a78fad5436d71a
---
M manifests/base.pp
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/manifests/base.pp b/manifests/base.pp
index 66b4ad7..2a0ef7e 100644
--- a/manifests/base.pp
+++ b/manifests/base.pp
@@ -86,7 +86,7 @@
ensure = latest;
}
 
-   if $::lsbdistid == Ubuntu and versioncmp($::lsbdistrelease, 10.04) 
== 0 {
+   if $::lsbdistid == Ubuntu and (versioncmp($::lsbdistrelease, 10.04) 
== 0 or versioncmp($::lsbdistrelease, 8.04) == 0) {
package {timeout:
ensure = latest;
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Idbf5e58b825bd306b5d008b4c7a78fad5436d71a
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: ArielGlenn ar...@wikimedia.org
Gerrit-Reviewer: ArielGlenn ar...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Convert underscores to spaces in {{SUBJECTSPACE}} - change (mediawiki/core)

2013-08-16 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Convert underscores to spaces in {{SUBJECTSPACE}}
..


Convert underscores to spaces in {{SUBJECTSPACE}}

Bug: 46742
Change-Id: I1af2432cb453efff209e5c384eb484cff5440ebb
---
M includes/parser/Parser.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php
index 2b6363e..ba5c8de 100644
--- a/includes/parser/Parser.php
+++ b/includes/parser/Parser.php
@@ -2909,7 +2909,7 @@
$value = $this-mTitle-canTalk() ? 
wfUrlencode( $this-mTitle-getTalkNsText() ) : '';
break;
case 'subjectspace':
-   $value = $this-mTitle-getSubjectNsText();
+   $value = str_replace( '_', ' ', 
$this-mTitle-getSubjectNsText() );
break;
case 'subjectspacee':
$value = ( wfUrlencode( 
$this-mTitle-getSubjectNsText() ) );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1af2432cb453efff209e5c384eb484cff5440ebb
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Wizardist p.selits...@gmail.com
Gerrit-Reviewer: Daniel Friesen dan...@nadir-seen-fire.com
Gerrit-Reviewer: Krinkle krinklem...@gmail.com
Gerrit-Reviewer: Tim Starling tstarl...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] mod. switch view logic to catch queued or running jobs befor... - change (analytics/user-metrics)

2013-08-16 Thread Rfaulk (Code Review)
Rfaulk has submitted this change and it was merged.

Change subject: mod. switch view logic to catch queued or running jobs before 
checking cache.
..


mod. switch view logic to catch queued or running jobs before checking cache.

Change-Id: I3f57123f18f66bf3b057080553d3d2cecc0ba7b7
---
M user_metrics/api/views.py
1 file changed, 5 insertions(+), 5 deletions(-)

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



diff --git a/user_metrics/api/views.py b/user_metrics/api/views.py
index a640f26..9534a7e 100644
--- a/user_metrics/api/views.py
+++ b/user_metrics/api/views.py
@@ -412,18 +412,18 @@
 logging.info(__name__ + ' :: REQ {0}:{1}\n\tqueued={2}\n\tprocessing={3}'.
 format(url_hash, url, str(is_queued), str(is_running)))
 
-# Determine if response is already cached
-if data and not refresh:
-return make_response(jsonify(data))
-
 # Determine if the job is already queued
-elif is_queued:
+if is_queued:
 return render_template('processing.html', error=error_codes[6])
 
 # Determine if the job is already running
 elif is_running:
 return render_template('processing.html', error=error_codes[0])
 
+# Determine if response is already cached
+elif data and not refresh:
+return make_response(jsonify(data))
+
 # Add the request to the queue
 else:
 umapi_broker_context.add(REQUEST_BROKER_TARGET, url_hash, url)

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3f57123f18f66bf3b057080553d3d2cecc0ba7b7
Gerrit-PatchSet: 1
Gerrit-Project: analytics/user-metrics
Gerrit-Branch: master
Gerrit-Owner: Rfaulk rfaulk...@wikimedia.org
Gerrit-Reviewer: Rfaulk rfaulk...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] The massmessage-account-blocked message is no longer used. - change (mediawiki...MassMessage)

2013-08-16 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review.

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


Change subject: The massmessage-account-blocked message is no longer used.
..

The massmessage-account-blocked message is no longer used.

We no longer check block status locally since we assume the delivery
will be global.

Change-Id: I4b8d074a75c9e414ecdfb7a47e9954e8b253ba10
---
M MassMessage.i18n.php
1 file changed, 0 insertions(+), 1 deletion(-)


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

diff --git a/MassMessage.i18n.php b/MassMessage.i18n.php
index 9e59fde..b5ebeaa 100644
--- a/MassMessage.i18n.php
+++ b/MassMessage.i18n.php
@@ -23,7 +23,6 @@
'massmessage-fieldset-preview' = 'Preview',
'massmessage-submitted' = 'Your message has been queued.',
'massmessage-just-preview' = 'This is just a preview. Press 
{{int:massmessage-form-submit}} to send the message.',
-   'massmessage-account-blocked' = 'The account used to deliver messages 
has been blocked.',
'massmessage-spamlist-doesnotexist' = 'The specified page-list page 
does not exist.',
'massmessage-empty-subject' = 'The subject line is empty.',
'massmessage-empty-message' = 'The message body is empty.',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4b8d074a75c9e414ecdfb7a47e9954e8b253ba10
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MassMessage
Gerrit-Branch: master
Gerrit-Owner: Legoktm legoktm.wikipe...@gmail.com

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


[MediaWiki-commits] [Gerrit] vars in ganglia_new::configuration need to be set before agg... - change (operations/puppet)

2013-08-16 Thread ArielGlenn (Code Review)
ArielGlenn has uploaded a new change for review.

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


Change subject: vars in ganglia_new::configuration need to be set before 
aggregator uses them
..

vars in ganglia_new::configuration need to be set before aggregator uses them

Change-Id: Ie32eebeccf72f464f8a89f897751f05b1863ce19
---
M modules/ganglia_new/manifests/monitor/aggregator/instance.pp
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/modules/ganglia_new/manifests/monitor/aggregator/instance.pp 
b/modules/ganglia_new/manifests/monitor/aggregator/instance.pp
index c0e217a..02f9fcc 100644
--- a/modules/ganglia_new/manifests/monitor/aggregator/instance.pp
+++ b/modules/ganglia_new/manifests/monitor/aggregator/instance.pp
@@ -1,7 +1,7 @@
 define ganglia_new::monitor::aggregator::instance($site) {
Ganglia_new::Monitor::Aggregator::Instance[$title] - 
Service[ganglia-monitor-aggregator]
 
-   include ganglia_new::configuration, network::constants
+   require ganglia_new::configuration, network::constants
 
$aggregator = true
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie32eebeccf72f464f8a89f897751f05b1863ce19
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: ArielGlenn ar...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] vars in ganglia_new::configuration need to be set before agg... - change (operations/puppet)

2013-08-16 Thread ArielGlenn (Code Review)
ArielGlenn has submitted this change and it was merged.

Change subject: vars in ganglia_new::configuration need to be set before 
aggregator uses them
..


vars in ganglia_new::configuration need to be set before aggregator uses them

Change-Id: Ie32eebeccf72f464f8a89f897751f05b1863ce19
---
M modules/ganglia_new/manifests/monitor/aggregator/instance.pp
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/modules/ganglia_new/manifests/monitor/aggregator/instance.pp 
b/modules/ganglia_new/manifests/monitor/aggregator/instance.pp
index c0e217a..02f9fcc 100644
--- a/modules/ganglia_new/manifests/monitor/aggregator/instance.pp
+++ b/modules/ganglia_new/manifests/monitor/aggregator/instance.pp
@@ -1,7 +1,7 @@
 define ganglia_new::monitor::aggregator::instance($site) {
Ganglia_new::Monitor::Aggregator::Instance[$title] - 
Service[ganglia-monitor-aggregator]
 
-   include ganglia_new::configuration, network::constants
+   require ganglia_new::configuration, network::constants
 
$aggregator = true
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie32eebeccf72f464f8a89f897751f05b1863ce19
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: ArielGlenn ar...@wikimedia.org
Gerrit-Reviewer: ArielGlenn ar...@wikimedia.org
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 MassMessage magic file - change (translatewiki)

2013-08-16 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review.

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


Change subject: Add MassMessage magic file
..

Add MassMessage magic file

Change-Id: Ibdf3ef2522be326784ff93b9d29468cd9b73a29d
---
M groups/MediaWiki/mediawiki-defines.txt
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/translatewiki 
refs/changes/16/79316/1

diff --git a/groups/MediaWiki/mediawiki-defines.txt 
b/groups/MediaWiki/mediawiki-defines.txt
index d961799..1b3cfd7 100644
--- a/groups/MediaWiki/mediawiki-defines.txt
+++ b/groups/MediaWiki/mediawiki-defines.txt
@@ -817,6 +817,7 @@
 
 Mass Message
 aliasfile = MassMessage/MassMessage.alias.php
+magicfile = MassMessage/MassMessage.i18n.magic.php
 ignored = massmessage-target
 
 Math

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibdf3ef2522be326784ff93b9d29468cd9b73a29d
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Legoktm legoktm.wikipe...@gmail.com

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


[MediaWiki-commits] [Gerrit] ceph: make check_ceph_health failures CRITICAL - change (operations/puppet)

2013-08-16 Thread Faidon (Code Review)
Faidon has uploaded a new change for review.

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


Change subject: ceph: make check_ceph_health failures CRITICAL
..

ceph: make check_ceph_health failures CRITICAL

We don't nearly monitor WARNINGs as we should and we do care about these
events, so make them CRITICAL again, for now.

Change-Id: Ie6f98430b3af19774c07c22aac05e673c041d264
---
M modules/ceph/templates/check_ceph_health.erb
1 file changed, 2 insertions(+), 1 deletion(-)


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

diff --git a/modules/ceph/templates/check_ceph_health.erb 
b/modules/ceph/templates/check_ceph_health.erb
index 42209c1..65386ef 100755
--- a/modules/ceph/templates/check_ceph_health.erb
+++ b/modules/ceph/templates/check_ceph_health.erb
@@ -10,7 +10,8 @@
 if echo $HEALTH | grep -q OK; then
exit 0
 elif echo $HEALTH | grep -q WARN; then
-   exit 1
+   # make it CRITICAL as we currently don't track WARNINGs at all...
+   exit 2
 elif echo $HEALTH | grep -q ERR; then
exit 2
 else

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie6f98430b3af19774c07c22aac05e673c041d264
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Faidon fai...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Revert vars in ganglia_new::configuration need to be set be... - change (operations/puppet)

2013-08-16 Thread ArielGlenn (Code Review)
ArielGlenn has submitted this change and it was merged.

Change subject: Revert vars in ganglia_new::configuration need to be set 
before aggregator uses them
..


Revert vars in ganglia_new::configuration need to be set before aggregator 
uses them

This reverts commit 99a0826c7fbc198f2e5c26a1ed70b3ecfc970e70.

Change-Id: Id85b096a4cc638257a5f3f0832076bf4afdc6eb4
---
M modules/ganglia_new/manifests/monitor/aggregator/instance.pp
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/modules/ganglia_new/manifests/monitor/aggregator/instance.pp 
b/modules/ganglia_new/manifests/monitor/aggregator/instance.pp
index 02f9fcc..c0e217a 100644
--- a/modules/ganglia_new/manifests/monitor/aggregator/instance.pp
+++ b/modules/ganglia_new/manifests/monitor/aggregator/instance.pp
@@ -1,7 +1,7 @@
 define ganglia_new::monitor::aggregator::instance($site) {
Ganglia_new::Monitor::Aggregator::Instance[$title] - 
Service[ganglia-monitor-aggregator]
 
-   require ganglia_new::configuration, network::constants
+   include ganglia_new::configuration, network::constants
 
$aggregator = true
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id85b096a4cc638257a5f3f0832076bf4afdc6eb4
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: ArielGlenn ar...@wikimedia.org
Gerrit-Reviewer: ArielGlenn ar...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] ceph: make check_ceph_health failures CRITICAL - change (operations/puppet)

2013-08-16 Thread Faidon (Code Review)
Faidon has submitted this change and it was merged.

Change subject: ceph: make check_ceph_health failures CRITICAL
..


ceph: make check_ceph_health failures CRITICAL

We don't nearly monitor WARNINGs as we should and we do care about these
events, so make them CRITICAL again, for now.

Change-Id: Ie6f98430b3af19774c07c22aac05e673c041d264
---
M modules/ceph/templates/check_ceph_health.erb
1 file changed, 2 insertions(+), 1 deletion(-)

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



diff --git a/modules/ceph/templates/check_ceph_health.erb 
b/modules/ceph/templates/check_ceph_health.erb
index 42209c1..65386ef 100755
--- a/modules/ceph/templates/check_ceph_health.erb
+++ b/modules/ceph/templates/check_ceph_health.erb
@@ -10,7 +10,8 @@
 if echo $HEALTH | grep -q OK; then
exit 0
 elif echo $HEALTH | grep -q WARN; then
-   exit 1
+   # make it CRITICAL as we currently don't track WARNINGs at all...
+   exit 2
 elif echo $HEALTH | grep -q ERR; then
exit 2
 else

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie6f98430b3af19774c07c22aac05e673c041d264
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Faidon fai...@wikimedia.org
Gerrit-Reviewer: Faidon fai...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Add some more inputs for getParserFunctionTargets - change (mediawiki...MassMessage)

2013-08-16 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review.

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


Change subject: Add some more inputs for getParserFunctionTargets
..

Add some more inputs for getParserFunctionTargets

Change-Id: I2f913972a3bbd459ac9a813ac617952457e05ec0
---
M tests/MassMessageTest.php
1 file changed, 9 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MassMessage 
refs/changes/18/79318/1

diff --git a/tests/MassMessageTest.php b/tests/MassMessageTest.php
index 154a13b..93f888e 100644
--- a/tests/MassMessageTest.php
+++ b/tests/MassMessageTest.php
@@ -61,8 +61,17 @@
global $wgDBname;
 
return array(
+   // project page, no site provided
+   array( '{{#target:Project:Example}}', array( 'title' = 
'Project:Example', 'dbname' = $wgDBname ), ),
+   // user talk page, no site provided
array( '{{#target:User talk:Example}}', array( 'dbname' 
= $wgDBname, 'title' = 'User talk:Example' ), ),
+   // invalid titles
array( '{{#target:User:}}', array(), ),
+   array( '{{#target:Project:!!!', array(), ),
+   // project page and site
+   array( '{{#target:Project:Testing|en.wikipedia.org}}', 
array( 'title' = 'Project:Testing', 'site' = 'en.wikipedia.org' ), ),
+   // user page and site
+   array( '{{#target:User talk:Test|fr.wikipedia.org}}', 
array( 'title' = 'User talk:Test', 'site' = 'fr.wikipedia.org' ), ),
);
}
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2f913972a3bbd459ac9a813ac617952457e05ec0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MassMessage
Gerrit-Branch: master
Gerrit-Owner: Legoktm legoktm.wikipe...@gmail.com

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


[MediaWiki-commits] [Gerrit] correct parameter name in ganglia_new::configuration for cac... - change (operations/puppet)

2013-08-16 Thread ArielGlenn (Code Review)
ArielGlenn has uploaded a new change for review.

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


Change subject: correct parameter name in ganglia_new::configuration for 
cache_misc
..

correct parameter name in ganglia_new::configuration for cache_misc

Change-Id: I652b6907030b2d9a5407dc8163456bd896714bd6
---
M modules/ganglia_new/manifests/configuration.pp
1 file changed, 4 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/19/79319/1

diff --git a/modules/ganglia_new/manifests/configuration.pp 
b/modules/ganglia_new/manifests/configuration.pp
index f977e99..762e0ef 100644
--- a/modules/ganglia_new/manifests/configuration.pp
+++ b/modules/ganglia_new/manifests/configuration.pp
@@ -107,13 +107,13 @@
id= 38 },
redis = {
name  = Redis,
-   id= 39 },
+   id= 39 },
labsnfs   = {
name  = Labs NFS cluster,
-   id= 40 },
+   id= 40 },
'cache_misc'= {
'name'  = 'Misc Web caching cluster',
-   'ip_oct'= '41' },
+   'id'= 41 },
}
# NOTE: Do *not* add new clusters *per site* anymore,
# the site name will automatically be appended now,
@@ -151,4 +151,4 @@
$default_sites = [pmtpa]
}
}
-}
\ No newline at end of file
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I652b6907030b2d9a5407dc8163456bd896714bd6
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: ArielGlenn ar...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] correct parameter name in ganglia_new::configuration for cac... - change (operations/puppet)

2013-08-16 Thread ArielGlenn (Code Review)
ArielGlenn has submitted this change and it was merged.

Change subject: correct parameter name in ganglia_new::configuration for 
cache_misc
..


correct parameter name in ganglia_new::configuration for cache_misc

Change-Id: I652b6907030b2d9a5407dc8163456bd896714bd6
---
M modules/ganglia_new/manifests/configuration.pp
1 file changed, 4 insertions(+), 4 deletions(-)

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



diff --git a/modules/ganglia_new/manifests/configuration.pp 
b/modules/ganglia_new/manifests/configuration.pp
index f977e99..762e0ef 100644
--- a/modules/ganglia_new/manifests/configuration.pp
+++ b/modules/ganglia_new/manifests/configuration.pp
@@ -107,13 +107,13 @@
id= 38 },
redis = {
name  = Redis,
-   id= 39 },
+   id= 39 },
labsnfs   = {
name  = Labs NFS cluster,
-   id= 40 },
+   id= 40 },
'cache_misc'= {
'name'  = 'Misc Web caching cluster',
-   'ip_oct'= '41' },
+   'id'= 41 },
}
# NOTE: Do *not* add new clusters *per site* anymore,
# the site name will automatically be appended now,
@@ -151,4 +151,4 @@
$default_sites = [pmtpa]
}
}
-}
\ No newline at end of file
+}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I652b6907030b2d9a5407dc8163456bd896714bd6
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: ArielGlenn ar...@wikimedia.org
Gerrit-Reviewer: ArielGlenn ar...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Throw an error on non-TextContent spamlists - change (mediawiki...MassMessage)

2013-08-16 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review.

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


Change subject: Throw an error on non-TextContent spamlists
..

Throw an error on non-TextContent spamlists

Change-Id: I0aa8d6ccf5c44e208a7ffc0296b8d4aa838db814
---
M MassMessage.body.php
M SpecialMassMessage.php
2 files changed, 5 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MassMessage 
refs/changes/20/79320/1

diff --git a/MassMessage.body.php b/MassMessage.body.php
index 96a8a42..c9be8e0 100644
--- a/MassMessage.body.php
+++ b/MassMessage.body.php
@@ -179,10 +179,7 @@
if ( $content instanceof TextContent ) {
$text = $content-getNativeData();
} else {
-   // Spamlist input isn't a text page
-   // @fixme
-   // $this-status-fatal( 
'massmessage-spamlist-doesnotexist' );
-   return array();
+   return 'massmessage-spamlist-doesnotexist';
}
 
// Prep the parser
diff --git a/SpecialMassMessage.php b/SpecialMassMessage.php
index cb34c1c..fc83d4c 100644
--- a/SpecialMassMessage.php
+++ b/SpecialMassMessage.php
@@ -267,6 +267,10 @@
 
// Insert it into the job queue.
$pages = MassMessage::getParserFunctionTargets( $spamlist, 
$this-getContext() );
+   if ( !is_array( $pages ) ) {
+   $this-status-fatal( $pages );
+   return $this-status;
+   }
$pages = MassMessage::normalizeSpamList( $pages );
foreach ( $pages as $page ) {
$title = Title::newFromText( $page['title'] );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0aa8d6ccf5c44e208a7ffc0296b8d4aa838db814
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MassMessage
Gerrit-Branch: master
Gerrit-Owner: Legoktm legoktm.wikipe...@gmail.com

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


[MediaWiki-commits] [Gerrit] Add tyv.wikipedia to projects with visualeditor - change (operations/mediawiki-config)

2013-08-16 Thread Amire80 (Code Review)
Amire80 has uploaded a new change for review.

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


Change subject: Add tyv.wikipedia to projects with visualeditor
..

Add tyv.wikipedia to projects with visualeditor

Change-Id: I52176525bea8d1dbc1c6fa07bb2b87990c47343b
---
M visualeditor.dblist
1 file changed, 1 insertion(+), 0 deletions(-)


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

diff --git a/visualeditor.dblist b/visualeditor.dblist
index 179b164..3d4caba 100644
--- a/visualeditor.dblist
+++ b/visualeditor.dblist
@@ -260,6 +260,7 @@
 tumwiki
 twwiki
 tywiki
+tyvwiki
 udmwiki
 ugwiki
 ukwiki

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I52176525bea8d1dbc1c6fa07bb2b87990c47343b
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Amire80 amir.ahar...@mail.huji.ac.il

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


[MediaWiki-commits] [Gerrit] Set req.hash_ignore_busy = true for PURGE requests - change (operations/puppet)

2013-08-16 Thread Mark Bergsma (Code Review)
Mark Bergsma has uploaded a new change for review.

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


Change subject: Set req.hash_ignore_busy = true for PURGE requests
..

Set req.hash_ignore_busy = true for PURGE requests

PURGE requests should never wait for busy objects to finish a fetch.
I suspect this may be the reason why some PURGE requests take a long
time.

Change-Id: I77d54b5826237228e0d6847743d3d1c0770f29c8
---
M modules/varnish/templates/vcl/wikimedia.vcl.erb
1 file changed, 1 insertion(+), 0 deletions(-)


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

diff --git a/modules/varnish/templates/vcl/wikimedia.vcl.erb 
b/modules/varnish/templates/vcl/wikimedia.vcl.erb
index b8f77fb..ad4a34b 100644
--- a/modules/varnish/templates/vcl/wikimedia.vcl.erb
+++ b/modules/varnish/templates/vcl/wikimedia.vcl.erb
@@ -180,6 +180,7 @@
if (!client.ip ~ purge) {
error 405 Denied.;
} elsif (req.http.Host ~ %= 
vcl_config.fetch(purge_host_regex, .*) %) {
+   set req.hash_ignore_busy = true;
return (lookup);
} else {
error 204 Domain not cached here.;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I77d54b5826237228e0d6847743d3d1c0770f29c8
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Mark Bergsma m...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Add MassMessage magic file - change (translatewiki)

2013-08-16 Thread Raimond Spekking (Code Review)
Raimond Spekking has submitted this change and it was merged.

Change subject: Add MassMessage magic file
..


Add MassMessage magic file

Change-Id: Ibdf3ef2522be326784ff93b9d29468cd9b73a29d
---
M groups/MediaWiki/mediawiki-defines.txt
1 file changed, 1 insertion(+), 0 deletions(-)

Approvals:
  Raimond Spekking: Verified; Looks good to me, approved
  jenkins-bot: Checked



diff --git a/groups/MediaWiki/mediawiki-defines.txt 
b/groups/MediaWiki/mediawiki-defines.txt
index d961799..1b3cfd7 100644
--- a/groups/MediaWiki/mediawiki-defines.txt
+++ b/groups/MediaWiki/mediawiki-defines.txt
@@ -817,6 +817,7 @@
 
 Mass Message
 aliasfile = MassMessage/MassMessage.alias.php
+magicfile = MassMessage/MassMessage.i18n.magic.php
 ignored = massmessage-target
 
 Math

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibdf3ef2522be326784ff93b9d29468cd9b73a29d
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Legoktm legoktm.wikipe...@gmail.com
Gerrit-Reviewer: Raimond Spekking raimond.spekk...@gmail.com
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] sysctlfile: add newline for value invocations - change (operations/puppet)

2013-08-16 Thread Faidon (Code Review)
Faidon has submitted this change and it was merged.

Change subject: sysctlfile: add newline for value invocations
..


sysctlfile: add newline for value invocations

/etc/init/procps does cat /etc/sysctl.d/*.conf /etc/sysctl.conf | sysctl
-e -p, so not having a newline means at best means settings being
ignored, at worst means having random keys being set as values of other
keys...

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

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



diff --git a/modules/sysctlfile/manifests/init.pp 
b/modules/sysctlfile/manifests/init.pp
index 189b4e7..3b23cbf 100644
--- a/modules/sysctlfile/manifests/init.pp
+++ b/modules/sysctlfile/manifests/init.pp
@@ -42,7 +42,7 @@
 
 # if using $value, then set $key = $value in the sysctl.d file
 if $value {
-File[$sysctl_file] { content = ${key} = ${value} }
+File[$sysctl_file] { content = ${key} = ${value}\n }
 }
 # else just set the content
 elsif $content {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8dcc5779b06c188f8cc6c16c3011f252c1736180
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Faidon fai...@wikimedia.org
Gerrit-Reviewer: Faidon fai...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] sysctlfile: add newline for value invocations - change (operations/puppet)

2013-08-16 Thread Faidon (Code Review)
Faidon has uploaded a new change for review.

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


Change subject: sysctlfile: add newline for value invocations
..

sysctlfile: add newline for value invocations

/etc/init/procps does cat /etc/sysctl.d/*.conf /etc/sysctl.conf | sysctl
-e -p, so not having a newline means at best means settings being
ignored, at worst means having random keys being set as values of other
keys...

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


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

diff --git a/modules/sysctlfile/manifests/init.pp 
b/modules/sysctlfile/manifests/init.pp
index 189b4e7..3b23cbf 100644
--- a/modules/sysctlfile/manifests/init.pp
+++ b/modules/sysctlfile/manifests/init.pp
@@ -42,7 +42,7 @@
 
 # if using $value, then set $key = $value in the sysctl.d file
 if $value {
-File[$sysctl_file] { content = ${key} = ${value} }
+File[$sysctl_file] { content = ${key} = ${value}\n }
 }
 # else just set the content
 elsif $content {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8dcc5779b06c188f8cc6c16c3011f252c1736180
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Faidon fai...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Set up flood flag on shwiki - change (operations/mediawiki-config)

2013-08-16 Thread TTO (Code Review)
TTO has uploaded a new change for review.

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


Change subject: Set up flood flag on shwiki
..

Set up flood flag on shwiki

Able to be granted and revoked by both admins and bureaucrats.

Bug: 52273
Change-Id: I2f5a1d5268e543197c944125071a8faa533523a3
---
M wmf-config/InitialiseSettings.php
1 file changed, 19 insertions(+), 6 deletions(-)


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 3a6a697..ce413be 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -7468,6 +7468,7 @@
'autopatrolled' = array( 'autopatrol' = true ),
'rollbacker' = array( 'rollback' = true ),
'filemover' = array( 'movefile' = true, 'suppressredirect' = 
true ),
+   'flood' = array( 'bot' = true ),
),
'siwiki' = array(
'rollbacker'= array( 'rollback' = true ),
@@ -8044,9 +8045,15 @@
'bureaucrat' = array( 'rollbacker', 'transwiki', 'patroller' ),
'sysop' = array( 'rollbacker', 'flood', 'patroller' ),
),
-   '+shwiki' = array( // bug 50802
-   'bureaucrat' = array( 'autopatrolled', 'filemover', 
'patroller', 'rollbacker' ),
-   'sysop' = array( 'autopatrolled', 'filemover', 'patroller', 
'rollbacker' ),
+   '+shwiki' = array(
+   'bureaucrat' = array(
+   'autopatrolled', 'filemover', 'patroller', 
'rollbacker', // bug 50802
+   'flood', // bug 52273
+   ),
+   'sysop' = array(
+   'autopatrolled', 'filemover', 'patroller', 
'rollbacker', // bug 50802
+   'flood', // bug 52273
+   ),
),
'+siwiki' = array(
'sysop' = array( 'rollbacker', 'accountcreator', 
'abusefilter', 'autopatrolled', 'confirmed', 'reviewer' ),
@@ -8480,9 +8487,15 @@
'+sewikimedia' = array(
'bureaucrat' = array( 'sysop', 'bureaucrat', 'medlem' ),
),
-   '+shwiki' = array( // bug 50802
-   'bureaucrat' = array( 'autopatrolled', 'filemover', 
'patroller', 'rollbacker' ),
-   'sysop' = array( 'filemover', 'patroller', 'rollbacker' ),
+   '+shwiki' = array(
+   'sysop' = array(
+   'autopatrolled', 'filemover', 'patroller', 
'rollbacker', // bug 50802
+   'flood', // bug 52273
+   ),
+   'sysop' = array(
+   'filemover', 'patroller', 'rollbacker', // bug 50802
+   'flood', // bug 52273
+   ),
),
'+siwiki' = array(
'sysop' = array( 'rollbacker', 'accountcreator', 
'abusefilter', 'autopatrolled', 'confirmed', 'reviewer', ),

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2f5a1d5268e543197c944125071a8faa533523a3
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: TTO at.li...@live.com.au

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


[MediaWiki-commits] [Gerrit] Invalid argument supplied for foreach() in BasicFormatter.php - change (mediawiki...Echo)

2013-08-16 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Invalid argument supplied for foreach() in BasicFormatter.php
..


Invalid argument supplied for foreach() in BasicFormatter.php

bug: 52897
Change-Id: I28f447af75f699d4bd7d4d045f030e70cea437d6
---
M formatters/BasicFormatter.php
1 file changed, 10 insertions(+), 7 deletions(-)

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



diff --git a/formatters/BasicFormatter.php b/formatters/BasicFormatter.php
index 662f943..5c7ed92 100644
--- a/formatters/BasicFormatter.php
+++ b/formatters/BasicFormatter.php
@@ -57,7 +57,7 @@
parent::__construct( $params );
 
// Set up default params if any are missing
-   $params += $this-getDefaultParams();
+   $params = $this-setDefaultParams( $params );
 
// Title for archive page
$this-title = array(
@@ -101,15 +101,13 @@
}
 
/**
-* Internal function that returns notification default params
-*
+* Internal function for setting notification default params
+* @param $params array
 * @return array
 */
-   protected function getDefaultParams() {
-   return array(
+   protected function setDefaultParams( $params ) {
+   $params += array(
'title-params' = array(),
-   'flyout-message' = $this-title['message'],
-   'flyout-params' = $this-title['params'],
'bundle-message' = '',
'bundle-params' = array(),
'payload' = array(),
@@ -121,6 +119,11 @@
'email-body-batch-bundle-params' = array(),
'icon' = 'placeholder'
);
+
+   // default flyout-message to title-message if not defined
+   $params += array ( 'flyout-message' = 
$params['title-message'],  'flyout-params' = $params['title-params'] );
+
+   return $params;
}
 
/**

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I28f447af75f699d4bd7d4d045f030e70cea437d6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: Bsitu bs...@wikimedia.org
Gerrit-Reviewer: EBernhardson (WMF) ebernhard...@wikimedia.org
Gerrit-Reviewer: Kaldari rkald...@wikimedia.org
Gerrit-Reviewer: Matthias Mullie mmul...@wikimedia.org
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 Scenario: Wikilove icon exists if I visit another user page - change (qa/browsertests)

2013-08-16 Thread Zfilipin (Code Review)
Zfilipin has uploaded a new change for review.

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


Change subject: WIP Scenario: Wikilove icon exists if I visit another user page
..

WIP Scenario: Wikilove icon exists if I visit another user page

Written at eurucamp workshop.

Change-Id: I0604ce63719293e2f52b1cb0b9a16c2f40945cdb
---
M features/step_definitions/wikilove_steps.rb
M features/support/pages/wikilove_page.rb
M features/wikilove.feature
3 files changed, 12 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/qa/browsertests 
refs/changes/25/79325/1

diff --git a/features/step_definitions/wikilove_steps.rb 
b/features/step_definitions/wikilove_steps.rb
index 1e936f2..4336583 100644
--- a/features/step_definitions/wikilove_steps.rb
+++ b/features/step_definitions/wikilove_steps.rb
@@ -41,3 +41,7 @@
 Then(/^Wikilove window appears$/) do
   on(WikilovePage).wikilove_window_element.should be_visible
 end
+
+Then(/^Wikilove icon should be there$/) do
+  on(WikilovePage).wikilove_icon_element.should_not exist
+end
diff --git a/features/support/pages/wikilove_page.rb 
b/features/support/pages/wikilove_page.rb
index 6aa270b..67c0bbb 100644
--- a/features/support/pages/wikilove_page.rb
+++ b/features/support/pages/wikilove_page.rb
@@ -15,6 +15,7 @@
   text_field(:kitten_header, id: 'mw-wikilove-header')
   a(:kitten_image, id: 'mw-wikilove-gallery-img-0')
   div(:kittens, text: 'Kittens')
+  a(:wikilove_icon, text: 'WikiLove')
   text_area(:wikilove_message, id: 'mw-wikilove-message')
   div(:wikilove_spinner, id: 'mw-wikilove-image-preview-spinner')
   div(:wikilove_window, class: 'ui-dialog ui-widget ui-widget-content 
ui-corner-all ui-draggable')
diff --git a/features/wikilove.feature b/features/wikilove.feature
index 7d762b8..51d7512 100644
--- a/features/wikilove.feature
+++ b/features/wikilove.feature
@@ -4,23 +4,29 @@
   Background:
 Given I am logged in
 When I visit the User page of Selenium_user2
-  And I click Wikilove
+
+  Scenario: Wikilove icon exists if I visit another user page
+Then Wikilove icon should be there
 
   Scenario: Wikilove window appears
+When I click Wikilove
 Then Wikilove window appears
 
   Scenario: Wikilove barnstar options
+When I click Wikilove
 When I click Barnstars
 Then I should see the barnstars selectbox
   And I should see the message text field
 
   Scenario: Wikilove Food and drink options
+When I click Wikilove
 When I click Food and drink
 Then I should see the Food and drink selectbox
   And I should see the header text field containing Some baklava for you!
   And I should see the message text field
 
   Scenario: Wikilove Kittens options
+When I click Wikilove
 When I click Kittens
 Then I should be able to select an image
   And I should see the header text field containing A kitten for you!

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0604ce63719293e2f52b1cb0b9a16c2f40945cdb
Gerrit-PatchSet: 1
Gerrit-Project: qa/browsertests
Gerrit-Branch: master
Gerrit-Owner: Zfilipin zfili...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Add flag 'D' for wikidata edits on old watchlist/recentchanges - change (mediawiki...Wikibase)

2013-08-16 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Add flag 'D' for wikidata edits on old watchlist/recentchanges
..


Add flag 'D' for wikidata edits on old watchlist/recentchanges

Using $wgRecentChangesFlag for this,
which was added with If69de05c to core.

Change-Id: Idc666db1b1b2b6656fa7b593f564f3f9c885f35f
---
M client/WikibaseClient.i18n.php
M client/WikibaseClient.php
M client/includes/recentchanges/ExternalChangesLine.php
M client/tests/selenium/special/client_rc_and_wl_spec.rb
M selenium/lib/pages/client_recent_changes_page.rb
M selenium/lib/pages/watchlist_page.rb
6 files changed, 28 insertions(+), 8 deletions(-)

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



diff --git a/client/WikibaseClient.i18n.php b/client/WikibaseClient.i18n.php
index 25d7ff2..bbdcb8d 100644
--- a/client/WikibaseClient.i18n.php
+++ b/client/WikibaseClient.i18n.php
@@ -58,6 +58,8 @@
'wikibase-property-notsupportedyet' = 'Wikibase does not yet support 
property type for $1 property.',
'wikibase-rc-hide-wikidata' = '$1 Wikidata',
'wikibase-rc-show-wikidata-pref' = 'Show Wikidata edits in recent 
changes',
+   'wikibase-rc-wikibase-edit-letter' = 'D',
+   'wikibase-rc-wikibase-edit-title' = 'Wikidata edit',
'wikibase-watchlist-show-changes-pref' = 'Show Wikidata edits in your 
watchlist',
'wikibase-error-serialize-error' = 'Failed to serialize data.',
'wikibase-error-invalid-entity-id' = 'The ID entered is unknown to the 
system. Please use a valid entity ID.',
@@ -166,6 +168,8 @@
 Parameters:
 * $1 - a link with the text {{msg-mw|show}} or {{msg-mw|hide}}',
'wikibase-rc-show-wikidata-pref' = 'Option in the recent changes 
section of preferences to show wikibase changes by default in recent changes.',
+   'wikibase-rc-wikibase-edit-letter' = Very short form of \'''wikidata 
edit'''\. Used in [[Special:RecentChanges]] and [[Special:Watchlist]].,
+   'wikibase-rc-wikibase-edit-title' = 'Tooltip for 
{{msg-mw|wikibase-rc-wikibase-edit-letter}}',
'wikibase-watchlist-show-changes-pref' = 'Option in the watchlist 
section of preferences to always show wikibase edits by default in the 
watchlist.',
'wikibase-error-serialize-error' = 'Generic error for when entity data 
failed to serialize or cannot be handled.',
'wikibase-error-invalid-entity-id' = 'Generic error message when an 
invalid entity ID was entered.',
diff --git a/client/WikibaseClient.php b/client/WikibaseClient.php
index 0529a95..7bdaa41 100644
--- a/client/WikibaseClient.php
+++ b/client/WikibaseClient.php
@@ -49,7 +49,7 @@
 call_user_func( function() {
global $wgExtensionCredits, $wgExtensionMessagesFiles, 
$wgAutoloadClasses, $wgHooks;
global $wgAPIMetaModules, $wgSpecialPages, $wgSpecialPageGroups, 
$wgResourceModules;
-   global $wgWBClientStores, $wgWBClientSettings;
+   global $wgWBClientStores, $wgWBClientSettings, $wgRecentChangesFlags;
 
 
$wgExtensionCredits['wikibase'][] = array(
@@ -174,6 +174,11 @@
if ( defined( 'WB_EXPERIMENTAL_FEATURES' )  WB_EXPERIMENTAL_FEATURES 
) {
include_once( $dir . 'config/WikibaseClient.experimental.php' );
}
+
+   $wgRecentChangesFlags['wikibase-edit'] = array(
+   'letter' = 'wikibase-rc-wikibase-edit-letter',
+   'title' = 'wikibase-rc-wikibase-edit-title'
+   );
 } );
 
 $wgWBSettings = $wgWBClientSettings; // B/C alias
diff --git a/client/includes/recentchanges/ExternalChangesLine.php 
b/client/includes/recentchanges/ExternalChangesLine.php
index 68d9a7e..7c1cf18 100644
--- a/client/includes/recentchanges/ExternalChangesLine.php
+++ b/client/includes/recentchanges/ExternalChangesLine.php
@@ -100,6 +100,7 @@
}
 
$line .= self::changeSeparator();
+   $line .= $cl-recentChangesFlags( array( 'wikibase-edit' = 
true ), '' ) . ' ';
 
$title = $rc-getTitle();
$line .= \Linker::link( $title );
diff --git a/client/tests/selenium/special/client_rc_and_wl_spec.rb 
b/client/tests/selenium/special/client_rc_and_wl_spec.rb
index bf59551..a3f2806 100644
--- a/client/tests/selenium/special/client_rc_and_wl_spec.rb
+++ b/client/tests/selenium/special/client_rc_and_wl_spec.rb
@@ -41,7 +41,6 @@
 page.watch_article(article_title)
   end
   visit_page(WatchlistPage) do |page|
-
page.wlFirstResultUserLinkNoWikidata_element.text.downcase.include?(WIKI_ADMIN_USERNAME.downcase).should
 be_false
 page.show_wikibase
 page.wlFirstResultDiffLink?.should be_true
 page.wlFirstResultUserLink?.should be_true
@@ -51,6 +50,7 @@
 page.wlFirstResultLabelLink_element.text.should == article_title
 page.wlFirstResultIDLink?.should be_true
 

[MediaWiki-commits] [Gerrit] Add diff-multi to classes with explicit direction - change (mediawiki/core)

2013-08-16 Thread Amire80 (Code Review)
Amire80 has uploaded a new change for review.

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


Change subject: Add diff-multi to classes with explicit direction
..

Add diff-multi to classes with explicit direction

This ensures that the direction of the notice about the intermediate
versions is in the user language's direction.

Bug: 52321
Change-Id: I1ef8b85dc7a2f6e4a7e6be055ed0f962d5532c7f
---
M skins/common/shared.css
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/26/79326/1

diff --git a/skins/common/shared.css b/skins/common/shared.css
index a9b9d2b..3b44c45 100644
--- a/skins/common/shared.css
+++ b/skins/common/shared.css
@@ -1110,6 +1110,7 @@
direction: ltr;
unicode-bidi: embed;
 }
+.diff-multi,
 .diff-otitle,
 .diff-ntitle,
 .diff-lineno {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1ef8b85dc7a2f6e4a7e6be055ed0f962d5532c7f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Amire80 amir.ahar...@mail.huji.ac.il

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


[MediaWiki-commits] [Gerrit] Make SpecialPages Titlecase in misc::maintenance::updatequer... - change (operations/puppet)

2013-08-16 Thread ArielGlenn (Code Review)
ArielGlenn has submitted this change and it was merged.

Change subject: Make SpecialPages Titlecase in 
misc::maintenance::updatequerypages
..


Make SpecialPages Titlecase in misc::maintenance::updatequerypages

My CamelCase consistency scruple was not a good thing.
The updates were still be done only for wikis in
https://noc.wikimedia.org/conf/highlight.php?file=small.dblist
where they are not disabled; the override did not work
for the others and the script defaulted to updating
only Special:Statistics, it seems, ignoring all the rest
and considering the job done successfully (verified by Reedy).

Bug: 15434
Change-Id: I725d07397cfa6e61e0644a9a40635d608f6be98d
---
M manifests/misc/maintenance.pp
1 file changed, 6 insertions(+), 6 deletions(-)

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



diff --git a/manifests/misc/maintenance.pp b/manifests/misc/maintenance.pp
index 9bd8728..f506ae6 100644
--- a/manifests/misc/maintenance.pp
+++ b/manifests/misc/maintenance.pp
@@ -417,7 +417,7 @@
 }
 
 cron { cron-updatequerypages-ancientpages-${name}:
-command = /usr/local/bin/mwscriptwikiset 
updateSpecialPages.php ${cluster}.dblist --override --only=AncientPages  
/home/mwdeploy/updateSpecialPages/${name}-AncientPages.log 21,
+command = /usr/local/bin/mwscriptwikiset 
updateSpecialPages.php ${cluster}.dblist --override --only=Ancientpages  
/home/mwdeploy/updateSpecialPages/${name}-AncientPages.log 21,
 month = [1, 7],
 ensure = $enabled ?{
   true = present,
@@ -427,7 +427,7 @@
 }
 
 cron { cron-updatequerypages-deadendpages-${name}:
-command = /usr/local/bin/mwscriptwikiset 
updateSpecialPages.php ${cluster}.dblist --override --only=DeadendPages  
/home/mwdeploy/updateSpecialPages/${name}-DeadendPages.log 21,
+command = /usr/local/bin/mwscriptwikiset 
updateSpecialPages.php ${cluster}.dblist --override --only=Deadendpages  
/home/mwdeploy/updateSpecialPages/${name}-DeadendPages.log 21,
 month = [2, 8],
 ensure = $enabled ?{
   true = present,
@@ -437,7 +437,7 @@
 }
 
 cron { cron-updatequerypages-mostlinked-${name}:
-command = /usr/local/bin/mwscriptwikiset 
updateSpecialPages.php ${cluster}.dblist --override --only=MostLinked  
/home/mwdeploy/updateSpecialPages/${name}-MostLinked.log 21,
+command = /usr/local/bin/mwscriptwikiset 
updateSpecialPages.php ${cluster}.dblist --override --only=Mostlinked  
/home/mwdeploy/updateSpecialPages/${name}-MostLinked.log 21,
 month = [3, 9],
 ensure = $enabled ?{
   true = present,
@@ -447,7 +447,7 @@
 }
 
 cron { cron-updatequerypages-mostrevisions-${name}:
-command = /usr/local/bin/mwscriptwikiset 
updateSpecialPages.php ${cluster}.dblist --override --only=MostRevisions  
/home/mwdeploy/updateSpecialPages/${name}-MostRevisions.log 21,
+command = /usr/local/bin/mwscriptwikiset 
updateSpecialPages.php ${cluster}.dblist --override --only=Mostrevisions  
/home/mwdeploy/updateSpecialPages/${name}-MostRevisions.log 21,
 month = [4, 10],
 ensure = $enabled ?{
   true = present,
@@ -457,7 +457,7 @@
 }
 
 cron { cron-updatequerypages-wantedpages-${name}:
-command = /usr/local/bin/mwscriptwikiset 
updateSpecialPages.php ${cluster}.dblist --override --only=WantedPages  
/home/mwdeploy/updateSpecialPages/${name}-WantedPages.log 21,
+command = /usr/local/bin/mwscriptwikiset 
updateSpecialPages.php ${cluster}.dblist --override --only=Wantedpages  
/home/mwdeploy/updateSpecialPages/${name}-WantedPages.log 21,
 month = [5, 11],
 ensure = $enabled ?{
   true = present,
@@ -467,7 +467,7 @@
 }
 
 cron { cron-updatequerypages-fewestrevisions-${name}:
-command = /usr/local/bin/mwscriptwikiset 
updateSpecialPages.php ${cluster}.dblist --override --only=FewestRevisions  
/home/mwdeploy/updateSpecialPages/${name}-FewestRevisions.log 21,
+command = /usr/local/bin/mwscriptwikiset 
updateSpecialPages.php ${cluster}.dblist --override --only=Fewestrevisions  
/home/mwdeploy/updateSpecialPages/${name}-FewestRevisions.log 21,
 month = [6, 12],
 ensure = $enabled ?{
 

[MediaWiki-commits] [Gerrit] Updating Thank You Templates - change (wikimedia...crm)

2013-08-16 Thread Pcoombe (Code Review)
Pcoombe has submitted this change and it was merged.

Change subject: Updating Thank You Templates
..


Updating Thank You Templates

Change-Id: I8430ab3550d6bb84cb8a0fb7a84ce828826fb258
---
M sites/all/modules/thank_you/templates/html/thank_you.ja.html
M sites/all/modules/thank_you/templates/html/thank_you.sr.html
M sites/all/modules/thank_you/templates/txt/thank_you.ja.txt
M sites/all/modules/thank_you/templates/txt/thank_you.sr.txt
4 files changed, 10 insertions(+), 10 deletions(-)

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



diff --git a/sites/all/modules/thank_you/templates/html/thank_you.ja.html 
b/sites/all/modules/thank_you/templates/html/thank_you.ja.html
index 2397df8..d5ab7b3 100644
--- a/sites/all/modules/thank_you/templates/html/thank_you.ja.html
+++ b/sites/all/modules/thank_you/templates/html/thank_you.ja.html
@@ -1,12 +1,12 @@
-p$familyname 様/p
+p{{contact.first_name}} 様/p
 
 pウィキメディア財団にご寄付いただきありがとうございました。/p
 
 
p私どもの寄付お願いのバナーを無視するのはとても簡単なことです。にもかかわらず、あなたがそうしなかったことを大変うれしく思います。ウィキペディアはこのようにして日々の請求書を支払っているのです―つまりあなたのような方々から頂いたお金で、私たちはこのサイトを無料で全世界の皆さんにご利用いただけるよう維持していけるのです。/p
 
-p人々は私にこのように言います。私がウィキペディアに寄付するのは、それが有用であり、しかも完璧でないにしても信頼できることが分かったからです、ウィキペディアはみんなのために書かれたものだと分かったからです、と。誰かのPR計画を進めたり、特定の価値観を押し付けたり、あなたに何か正しくないことを信じさせようとしたりすることは意図していません。私たちの目的は真実を伝えることであり、あなたがいるからこそそれが可能になるのです。このサイトに資金提供をしたという事実こそが、私たちの独立性を維持し、あなたが必要とし、欲しているものをウィキペディアが提供することを可能にし続けているのです。まさにあるべき姿です。/p
+pみなさんは自分がウィキペディアに寄付するのは、ウィキペディアが役に立ったから、完璧でないにしても、みんなのために書かれていて信頼できるからだ、と言ってくれています。ウィキペディアは誰かが自己宣伝するのを助けたり、特定の価値観を押し付けたり、真実でないことを信じさせようとしたりするためのものではありません。私たちの目的は真実を伝えることであり、あなたがいるからこそそれが可能になるのです。このサイトに資金提供をしたという事実こそが、私たちの独立性を維持し、あなたが必要とし、欲しているものをウィキペディアが提供することを可能にし続けているのです。まさにあるべき姿です。/p
 
-pあなたには以下のことを知っておいていただきたく思います。あなたの寄付は単に、あなた自身へのサービス提供コストをカバーするだけのものではありません。平均的な寄付者は自身がウィキペディアを利用するためだけでなく、他の何百人もが利用するためにも支払ってくれているのです。あなたの寄付によって、例えば次のような人々がウィキペディアを利用し続けられるようになります。プログラミングを独学で勉強している大志を抱いたバンガロールの子ども、パーキンソン病であると診断されたばかりのウィーンにいる中年の主婦、1850年代の英国について調べている小説家、カール・セーガンのことがたった今わかったサンサルバドルにいる10歳の子ども、といった人々です。/p
+pあなたには以下のことを知っておいていただきたく思います。あなたの寄付は単に、あなた自身へのサービス提供コストをカバーするだけのものではありません。平均的な寄付者は自身がウィキペディアを利用するためだけでなく、他の何百人もが利用するためにも支払ってくれているのです。あなたの寄付によって、例えば次のような人々がウィキペディアを利用し続けられるようになります。バンガロールにいてプログラミングを独学している野心的な女の子、ウィーンでパーキンソン病であると診断されたばかりの中年の主婦、1850年代の英国について調べている小説家、サンサルバドルでカール・セーガンのことがたった今わかった10歳の子ども、といった人々です。/p
 
 
pこうした方々を代表して、そしてウィキペディアとその他の姉妹プロジェクトの5億人にもおよぶ読者に代わって、全人類の叡智の総和をすべての人々に利用可能にしようという、私たちの試みに加わっていただいたことを感謝いたします。あなたのご寄付が世界をよりよい場所にします。ありがとうございます。/p
 
@@ -46,7 +46,7 @@
 
 piウィキメディア財団からのメールを受け取らない/i/p
 
-pご寄付いただきました方には私たちの活動や募金活動についてご報告させていただいています。今後、このようなお知らせを受け取らないことをご希望される場合は、以下の項目をクリックしてください。/p
+pご寄付いただきました方には私たちの活動や募金活動についてご報告させていただいています。このようなお知らせをご希望でない場合は、以下のリンクをクリックしてください。後ほど送信先リストから削除いたします。/p
 
 a style=padding-left: 25px; href={{unsubscribe_link|raw}}お知らせの購読をやめる/a
 
diff --git a/sites/all/modules/thank_you/templates/html/thank_you.sr.html 
b/sites/all/modules/thank_you/templates/html/thank_you.sr.html
index 91bce4a..dc51d6b 100644
--- a/sites/all/modules/thank_you/templates/html/thank_you.sr.html
+++ b/sites/all/modules/thank_you/templates/html/thank_you.sr.html
@@ -1,4 +1,4 @@
-pДарги {{contact.first_name}}/p
+pДраги {{contact.first_name}}/p
 
 pХвала на донацији Задужбини Викимедије. Заиста
 сте дивни!/p
diff --git a/sites/all/modules/thank_you/templates/txt/thank_you.ja.txt 
b/sites/all/modules/thank_you/templates/txt/thank_you.ja.txt
index 99437d4..9105588 100644
--- a/sites/all/modules/thank_you/templates/txt/thank_you.ja.txt
+++ b/sites/all/modules/thank_you/templates/txt/thank_you.ja.txt
@@ -1,14 +1,14 @@
 
 
-   $familyname 様 
+   {{contact.first_name}} 様 
 
ウィキメディア財団にご寄付いただきありがとうございました。 
 

私どもの寄付お願いのバナーを無視するのはとても簡単なことです。にもかかわらず、あなたがそうしなかったことを大変うれしく思います。ウィキペディアはこのようにして日々の請求書を支払っているのです―つまりあなたのような方々から頂いたお金で、私たちはこのサイトを無料で全世界の皆さんにご利用いただけるよう維持していけるのです。
 
 
-   
人々は私にこのように言います。私がウィキペディアに寄付するのは、それが有用であり、しかも完璧でないにしても信頼できることが分かったからです、ウィキペディアはみんなのために書かれたものだと分かったからです、と。誰かのPR計画を進めたり、特定の価値観を押し付けたり、あなたに何か正しくないことを信じさせようとしたりすることは意図していません。私たちの目的は真実を伝えることであり、あなたがいるからこそそれが可能になるのです。このサイトに資金提供をしたという事実こそが、私たちの独立性を維持し、あなたが必要とし、欲しているものをウィキペディアが提供することを可能にし続けているのです。まさにあるべき姿です。
 
+   
みなさんは自分がウィキペディアに寄付するのは、ウィキペディアが役に立ったから、完璧でないにしても、みんなのために書かれていて信頼できるからだ、と言ってくれています。ウィキペディアは誰かが自己宣伝するのを助けたり、特定の価値観を押し付けたり、真実でないことを信じさせようとしたりするためのものではありません。私たちの目的は真実を伝えることであり、あなたがいるからこそそれが可能になるのです。このサイトに資金提供をしたという事実こそが、私たちの独立性を維持し、あなたが必要とし、欲しているものをウィキペディアが提供することを可能にし続けているのです。まさにあるべき姿です。
 
 
-   
あなたには以下のことを知っておいていただきたく思います。あなたの寄付は単に、あなた自身へのサービス提供コストをカバーするだけのものではありません。平均的な寄付者は自身がウィキペディアを利用するためだけでなく、他の何百人もが利用するためにも支払ってくれているのです。あなたの寄付によって、例えば次のような人々がウィキペディアを利用し続けられるようになります。プログラミングを独学で勉強している大志を抱いたバンガロールの子ども、パーキンソン病であると診断されたばかりのウィーンにいる中年の主婦、1850年代の英国について調べている小説家、カール・セーガンのことがたった今わかったサンサルバドルにいる10歳の子ども、といった人々です。
 
+   

[MediaWiki-commits] [Gerrit] fix up torrus conf file generation for squid/varnish caches - change (operations/puppet)

2013-08-16 Thread ArielGlenn (Code Review)
ArielGlenn has uploaded a new change for review.

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


Change subject: fix up torrus conf file generation for squid/varnish caches
..

fix up torrus conf file generation for squid/varnish caches

Change-Id: I7a6f349be1fc0aecf65de5ca782e9eb829792585
---
M manifests/role/cache.pp
1 file changed, 4 insertions(+), 0 deletions(-)


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

diff --git a/manifests/role/cache.pp b/manifests/role/cache.pp
index d871621..1f59d35 100644
--- a/manifests/role/cache.pp
+++ b/manifests/role/cache.pp
@@ -48,6 +48,7 @@
'sq77.wikimedia.org',
'sq78.wikimedia.org',
],
+   pmtpa = [],
eqiad-squid = [
'cp1001.eqiad.wmnet',   # API
'cp1002.eqiad.wmnet',   # API
@@ -159,6 +160,8 @@
'sq85.wikimedia.org',
'sq86.wikimedia.org',
],
+   pmtpa = [],
+   eqiad-squid = [],
'eqiad' = [
'cp1048.eqiad.wmnet',
'cp1049.eqiad.wmnet',
@@ -169,6 +172,7 @@
'cp1063.eqiad.wmnet',
'cp1064.eqiad.wmnet',
],
+   esams-squid = [],
esams = [
'cp3003.esams.wikimedia.org',
'cp3004.esams.wikimedia.org',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7a6f349be1fc0aecf65de5ca782e9eb829792585
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: ArielGlenn ar...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] fix up torrus conf file generation for squid/varnish caches - change (operations/puppet)

2013-08-16 Thread ArielGlenn (Code Review)
ArielGlenn has submitted this change and it was merged.

Change subject: fix up torrus conf file generation for squid/varnish caches
..


fix up torrus conf file generation for squid/varnish caches

Change-Id: I7a6f349be1fc0aecf65de5ca782e9eb829792585
---
M manifests/role/cache.pp
1 file changed, 4 insertions(+), 0 deletions(-)

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



diff --git a/manifests/role/cache.pp b/manifests/role/cache.pp
index d871621..1f59d35 100644
--- a/manifests/role/cache.pp
+++ b/manifests/role/cache.pp
@@ -48,6 +48,7 @@
'sq77.wikimedia.org',
'sq78.wikimedia.org',
],
+   pmtpa = [],
eqiad-squid = [
'cp1001.eqiad.wmnet',   # API
'cp1002.eqiad.wmnet',   # API
@@ -159,6 +160,8 @@
'sq85.wikimedia.org',
'sq86.wikimedia.org',
],
+   pmtpa = [],
+   eqiad-squid = [],
'eqiad' = [
'cp1048.eqiad.wmnet',
'cp1049.eqiad.wmnet',
@@ -169,6 +172,7 @@
'cp1063.eqiad.wmnet',
'cp1064.eqiad.wmnet',
],
+   esams-squid = [],
esams = [
'cp3003.esams.wikimedia.org',
'cp3004.esams.wikimedia.org',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7a6f349be1fc0aecf65de5ca782e9eb829792585
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: ArielGlenn ar...@wikimedia.org
Gerrit-Reviewer: ArielGlenn ar...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] fix up torrus aggregation for varnish/squid caches - change (operations/puppet)

2013-08-16 Thread ArielGlenn (Code Review)
ArielGlenn has uploaded a new change for review.

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


Change subject: fix up torrus aggregation for varnish/squid caches
..

fix up torrus aggregation for varnish/squid caches

Change-Id: I2583729ceb02fb0651d1837a21c08f38a6983fbf
---
M templates/torrus/cdn-aggregates.xml.erb
1 file changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/28/79328/1

diff --git a/templates/torrus/cdn-aggregates.xml.erb 
b/templates/torrus/cdn-aggregates.xml.erb
index 88b787d..b94593e 100644
--- a/templates/torrus/cdn-aggregates.xml.erb
+++ b/templates/torrus/cdn-aggregates.xml.erb
@@ -8,7 +8,7 @@
 
 def squid_rpn(role, site, list=nil)
result = 
-   list = node_list(role, site) if list == nil
+   list = node_list(role, site+'-squid') if list == nil
list.each do |node|
result  
{/Squids/#{site}/#{role}/#{node}/%layer%/%squidmetric%},
end
@@ -39,7 +39,7 @@
/param

param name=expr-Squid_api_pmtpa
-%= squid_rpn('text', 'pmtpa', node_list('api', 'pmtpa')) %
+%= squid_rpn('text', 'pmtpa', node_list('api', 'pmtpa'+'-squid')) %
/param
 
param name=expr-Squid_upload_pmtpa  
@@ -51,7 +51,7 @@
/param
 
param name=expr-Squid_api_eqiad
-%= squid_rpn('text', 'eqiad', node_list('api', 'eqiad')) %
+%= squid_rpn('text', 'eqiad', node_list('api', 'eqiad'+'-squid')) %
/param
 
param name=expr-Squid_text_esams

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2583729ceb02fb0651d1837a21c08f38a6983fbf
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: ArielGlenn ar...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] fix up torrus aggregation for varnish/squid caches - change (operations/puppet)

2013-08-16 Thread ArielGlenn (Code Review)
ArielGlenn has submitted this change and it was merged.

Change subject: fix up torrus aggregation for varnish/squid caches
..


fix up torrus aggregation for varnish/squid caches

Change-Id: I2583729ceb02fb0651d1837a21c08f38a6983fbf
---
M templates/torrus/cdn-aggregates.xml.erb
1 file changed, 3 insertions(+), 3 deletions(-)

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



diff --git a/templates/torrus/cdn-aggregates.xml.erb 
b/templates/torrus/cdn-aggregates.xml.erb
index 88b787d..b94593e 100644
--- a/templates/torrus/cdn-aggregates.xml.erb
+++ b/templates/torrus/cdn-aggregates.xml.erb
@@ -8,7 +8,7 @@
 
 def squid_rpn(role, site, list=nil)
result = 
-   list = node_list(role, site) if list == nil
+   list = node_list(role, site+'-squid') if list == nil
list.each do |node|
result  
{/Squids/#{site}/#{role}/#{node}/%layer%/%squidmetric%},
end
@@ -39,7 +39,7 @@
/param

param name=expr-Squid_api_pmtpa
-%= squid_rpn('text', 'pmtpa', node_list('api', 'pmtpa')) %
+%= squid_rpn('text', 'pmtpa', node_list('api', 'pmtpa'+'-squid')) %
/param
 
param name=expr-Squid_upload_pmtpa  
@@ -51,7 +51,7 @@
/param
 
param name=expr-Squid_api_eqiad
-%= squid_rpn('text', 'eqiad', node_list('api', 'eqiad')) %
+%= squid_rpn('text', 'eqiad', node_list('api', 'eqiad'+'-squid')) %
/param
 
param name=expr-Squid_text_esams

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2583729ceb02fb0651d1837a21c08f38a6983fbf
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: ArielGlenn ar...@wikimedia.org
Gerrit-Reviewer: ArielGlenn ar...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Refactoring nrpe module (round 2/??) - change (operations/puppet)

2013-08-16 Thread Akosiaris (Code Review)
Akosiaris has uploaded a new change for review.

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


Change subject: Refactoring nrpe module (round 2/??)
..

Refactoring nrpe module (round 2/??)

/usr/local/lib/nagios/plugins directory for plugins shipped by module
Merge nrpe::packages and nrpe::service classes in nrpe class
nrpe class now accepts an allowed_hosts argument. It defaults to undef.
Cleaned-up Service['nagios-nrpe-server']
 hasrestart defaults to true in puppet 2.7
 hasstatus defaults to true in puppet 2.7 so pattern is not needed
 restart not needed (init script works fine)
Updated rspec examples
Updated puppet tests
Removed spec fixtures that caused a problem with puppet doc(cyclic deps)
Added Rake code to create and purge above fixtures before each run
Updated nrpe_local.cfg.erb

Change-Id: I96bcccae226c0b308ec528a52259d4c1bf764afb
---
M manifests/base.pp
M modules/nrpe/Rakefile
R modules/nrpe/files/plugins/check_dpkg
M modules/nrpe/manifests/check.pp
M modules/nrpe/manifests/init.pp
D modules/nrpe/manifests/packages.pp
D modules/nrpe/manifests/service.pp
M modules/nrpe/spec/classes/nrpe_spec.rb
D modules/nrpe/spec/classes/packages_spec.rb
D modules/nrpe/spec/classes/service_spec.rb
D modules/nrpe/spec/fixtures/modules/nrpe/files
D modules/nrpe/spec/fixtures/modules/nrpe/manifests
D modules/nrpe/spec/fixtures/modules/nrpe/templates
M modules/nrpe/templates/nrpe_local.cfg.erb
M modules/nrpe/tests/check.pp
D modules/nrpe/tests/packages.pp
D modules/nrpe/tests/service.pp
17 files changed, 123 insertions(+), 123 deletions(-)


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

diff --git a/manifests/base.pp b/manifests/base.pp
index 2a0ef7e..ca1fac7 100644
--- a/manifests/base.pp
+++ b/manifests/base.pp
@@ -431,7 +431,7 @@
sudo_user { [ nagios, icinga ]: privileges = ['ALL = 
NOPASSWD: /usr/local/bin/check-raid.py'] }
nrpe::monitor_service { raid : description = RAID, 
nrpe_command  = sudo /usr/local/bin/check-raid.py }
nrpe::monitor_service { disk_space : description = Disk 
space, nrpe_command  = /usr/lib/nagios/plugins/check_disk -w 6% -c 3% -l -e 
}
-   nrpe::monitor_service { dpkg : description = DPKG, 
nrpe_command  = /usr/lib/nagios/plugins/check_dpkg }
+   nrpe::monitor_service { dpkg : description = DPKG, 
nrpe_command  = /usr/local/lib/nagios/plugins/check_dpkg }
 
## this is only needed for the raid checks.
## should be able to move into sudo_user def above once puppet 
is caught up
diff --git a/modules/nrpe/Rakefile b/modules/nrpe/Rakefile
index e6443dc..a2e935e 100644
--- a/modules/nrpe/Rakefile
+++ b/modules/nrpe/Rakefile
@@ -1,7 +1,33 @@
 require 'rake'
+require 'fileutils'
 
 require 'rspec/core/rake_task'
 
+symlinks = { 'spec/fixtures/modules/nrpe/files' = '../../../../files',
+   'spec/fixtures/modules/nrpe/manifests' = '../../../../manifests',
+   'spec/fixtures/modules/nrpe/templates' = '../../../../templates',
+}
+
+task :default = [:setup, :spec, :teardown] do
+end
+
+task :setup do
+  FileUtils.mkdir_p('spec/fixtures/modules/nrpe')
+  symlinks.each do |x|
+if !File.exist?(x[0])
+  FileUtils.ln_s(x[1], x[0])
+end
+  end
+end
+
+task :teardown do
+  symlinks.each { |x| FileUtils.rm(x[0], :force = true) }
+  FileUtils.rmdir('spec/fixtures/modules/nrpe')
+  FileUtils.rmdir('spec/fixtures/modules')
+end
+
 RSpec::Core::RakeTask.new(:spec) do |t|
+  t.fail_on_error = false
   t.pattern = 'spec/*/*_spec.rb'
 end
+
diff --git a/modules/nrpe/files/check_dpkg 
b/modules/nrpe/files/plugins/check_dpkg
similarity index 100%
rename from modules/nrpe/files/check_dpkg
rename to modules/nrpe/files/plugins/check_dpkg
old mode 100644
new mode 100755
diff --git a/modules/nrpe/manifests/check.pp b/modules/nrpe/manifests/check.pp
index 20cf66b..7261432 100644
--- a/modules/nrpe/manifests/check.pp
+++ b/modules/nrpe/manifests/check.pp
@@ -13,7 +13,7 @@
 #   Install a NRPE check definition in /etc/nagios/nrpe.d/
 #
 # Requires:
-#   Class[nrpe::packages]
+#   Class[nrpe]
 #
 # Sample Usage:
 #   nrpe::check { 'check_myprocess':
@@ -21,7 +21,7 @@
 #   }
 
 define nrpe::check($command) {
-Class[nrpe::packages] - Nrpe::Check[$title]
+class {'nrpe': }
 
 file { /etc/nagios/nrpe.d/${title}.cfg:
 owner   = root,
diff --git a/modules/nrpe/manifests/init.pp b/modules/nrpe/manifests/init.pp
index 022eda6..f985631 100644
--- a/modules/nrpe/manifests/init.pp
+++ b/modules/nrpe/manifests/init.pp
@@ -1,6 +1,6 @@
 # Class: nrpe
 #
-# This installes nrpe packages, ensures service in running and collects all
+# This installes nrpe packages, ensures service is running and collects all
 # configuration
 #
 # Parameters:
@@ -11,16 +11,62 @@
 #   Collect all needed exported resources
 #
 # Requires:
-#   Class[nrpe::packages]
-#   Class[nrpe::service]
-#   

[MediaWiki-commits] [Gerrit] wrong fix for torrus cache aggregation, trying again - change (operations/puppet)

2013-08-16 Thread ArielGlenn (Code Review)
ArielGlenn has uploaded a new change for review.

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


Change subject: wrong fix for torrus cache aggregation, trying again
..

wrong fix for torrus cache aggregation, trying again

Change-Id: I83a6f4bcf0904b651bba962b1a16270f0ea071c1
---
M templates/torrus/cdn-aggregates.xml.erb
1 file changed, 8 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/30/79330/1

diff --git a/templates/torrus/cdn-aggregates.xml.erb 
b/templates/torrus/cdn-aggregates.xml.erb
index b94593e..f8e1fc5 100644
--- a/templates/torrus/cdn-aggregates.xml.erb
+++ b/templates/torrus/cdn-aggregates.xml.erb
@@ -6,9 +6,14 @@
return 
scope.lookupvar(role::cache::configuration::decommissioned_nodes)[role][site] 
+ scope.lookupvar(role::cache::configuration::active_nodes)[realm][role][site]
 end
 
+def node_list_squid(role, site)
+   realm = scope.lookupvar('::realm')
+   return 
scope.lookupvar(role::cache::configuration::decommissioned_nodes)[role][site] 
+ 
scope.lookupvar(role::cache::configuration::active_nodes)[realm][role][site+'-squid']
+end
+
 def squid_rpn(role, site, list=nil)
result = 
-   list = node_list(role, site+'-squid') if list == nil
+   list = node_list_squid(role, site) if list == nil
list.each do |node|
result  
{/Squids/#{site}/#{role}/#{node}/%layer%/%squidmetric%},
end
@@ -39,7 +44,7 @@
/param

param name=expr-Squid_api_pmtpa
-%= squid_rpn('text', 'pmtpa', node_list('api', 'pmtpa'+'-squid')) %
+%= squid_rpn('text', 'pmtpa', node_list_squid('api', 'pmtpa')) %
/param
 
param name=expr-Squid_upload_pmtpa  
@@ -51,7 +56,7 @@
/param
 
param name=expr-Squid_api_eqiad
-%= squid_rpn('text', 'eqiad', node_list('api', 'eqiad'+'-squid')) %
+%= squid_rpn('text', 'eqiad', node_list_squid('api', 'eqiad')) %
/param
 
param name=expr-Squid_text_esams

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I83a6f4bcf0904b651bba962b1a16270f0ea071c1
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: ArielGlenn ar...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] wrong fix for torrus cache aggregation, trying again - change (operations/puppet)

2013-08-16 Thread ArielGlenn (Code Review)
ArielGlenn has submitted this change and it was merged.

Change subject: wrong fix for torrus cache aggregation, trying again
..


wrong fix for torrus cache aggregation, trying again

Change-Id: I83a6f4bcf0904b651bba962b1a16270f0ea071c1
---
M templates/torrus/cdn-aggregates.xml.erb
1 file changed, 8 insertions(+), 3 deletions(-)

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



diff --git a/templates/torrus/cdn-aggregates.xml.erb 
b/templates/torrus/cdn-aggregates.xml.erb
index b94593e..f8e1fc5 100644
--- a/templates/torrus/cdn-aggregates.xml.erb
+++ b/templates/torrus/cdn-aggregates.xml.erb
@@ -6,9 +6,14 @@
return 
scope.lookupvar(role::cache::configuration::decommissioned_nodes)[role][site] 
+ scope.lookupvar(role::cache::configuration::active_nodes)[realm][role][site]
 end
 
+def node_list_squid(role, site)
+   realm = scope.lookupvar('::realm')
+   return 
scope.lookupvar(role::cache::configuration::decommissioned_nodes)[role][site] 
+ 
scope.lookupvar(role::cache::configuration::active_nodes)[realm][role][site+'-squid']
+end
+
 def squid_rpn(role, site, list=nil)
result = 
-   list = node_list(role, site+'-squid') if list == nil
+   list = node_list_squid(role, site) if list == nil
list.each do |node|
result  
{/Squids/#{site}/#{role}/#{node}/%layer%/%squidmetric%},
end
@@ -39,7 +44,7 @@
/param

param name=expr-Squid_api_pmtpa
-%= squid_rpn('text', 'pmtpa', node_list('api', 'pmtpa'+'-squid')) %
+%= squid_rpn('text', 'pmtpa', node_list_squid('api', 'pmtpa')) %
/param
 
param name=expr-Squid_upload_pmtpa  
@@ -51,7 +56,7 @@
/param
 
param name=expr-Squid_api_eqiad
-%= squid_rpn('text', 'eqiad', node_list('api', 'eqiad'+'-squid')) %
+%= squid_rpn('text', 'eqiad', node_list_squid('api', 'eqiad')) %
/param
 
param name=expr-Squid_text_esams

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I83a6f4bcf0904b651bba962b1a16270f0ea071c1
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: ArielGlenn ar...@wikimedia.org
Gerrit-Reviewer: ArielGlenn ar...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Give grep a chance to find the usages - change (mediawiki/core)

2013-08-16 Thread Shirayuki (Code Review)
Shirayuki has uploaded a new change for review.

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


Change subject: Give grep a chance to find the usages
..

Give grep a chance to find the usages

Change-Id: I18846326539b814fa7fa93ca54117dac3572e4b0
---
M includes/CategoryViewer.php
M includes/EditPage.php
M includes/Preferences.php
M includes/ProtectionForm.php
M includes/Skin.php
M includes/SkinTemplate.php
M includes/User.php
M includes/UserMailer.php
M includes/actions/InfoAction.php
M includes/installer/CliInstaller.php
M includes/installer/WebInstaller.php
M includes/installer/WebInstallerPage.php
M includes/job/jobs/DoubleRedirectJob.php
M includes/specials/SpecialJavaScriptTest.php
M includes/specials/SpecialProtectedpages.php
M includes/specials/SpecialProtectedtitles.php
M includes/specials/SpecialUserrights.php
M languages/Language.php
18 files changed, 58 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/31/79331/1

diff --git a/includes/CategoryViewer.php b/includes/CategoryViewer.php
index 562ca0c..0c44e96 100644
--- a/includes/CategoryViewer.php
+++ b/includes/CategoryViewer.php
@@ -649,11 +649,6 @@
 * returned?  This function says what. Each type is considered 
independently
 * of the other types.
 *
-* Note for grepping: uses the messages category-article-count,
-* category-article-count-limited, category-subcat-count,
-* category-subcat-count-limited, category-file-count,
-* category-file-count-limited.
-*
 * @param int $rescnt The number of items returned by our database 
query.
 * @param int $dbcnt The number of items according to the category 
table.
 * @param string $type 'subcat', 'article', or 'file'
@@ -701,8 +696,12 @@
$this-cat-refreshCounts();
} else {
# Case 3: hopeless.  Don't give a total count at all.
+   # Give grep a chance to find the usages: 
category-subcat-count-limited,
+   # category-article-count-limited, 
category-file-count-limited
return $this-msg( category-$type-count-limited 
)-numParams( $rescnt )-parseAsBlock();
}
+   # Give grep a chance to find the usages: 
category-subcat-count-limited,
+   # category-article-count-limited, category-file-count-limited
return $this-msg( category-$type-count )-numParams( 
$rescnt, $totalcnt )-parseAsBlock();
}
 }
diff --git a/includes/EditPage.php b/includes/EditPage.php
index 59b7480..f244828 100644
--- a/includes/EditPage.php
+++ b/includes/EditPage.php
@@ -967,6 +967,7 @@
$undoMsg = 'norev';
}
 
+   // Give grep a chance to find the 
usages: undo-success, undo-failure, undo-norev
$class = ( $undoMsg == 'success' ? '' : 
'error ' ) . mw-undo-{$undoMsg};
$this-editFormPageTop .= 
$wgOut-parse( div class=\{$class}\ .
wfMessage( 'undo-' . $undoMsg 
)-plain() . '/div', true, /* interface */true );
diff --git a/includes/Preferences.php b/includes/Preferences.php
index f5f63ea..2bb1e64 100644
--- a/includes/Preferences.php
+++ b/includes/Preferences.php
@@ -978,6 +978,8 @@
 
foreach ( $watchTypes as $action = $pref ) {
if ( $user-isAllowed( $action ) ) {
+   // Give grep a chance to find the usages:
+   // tog-watchdefault, tog-watchmoves, 
tog-watchdeletion, tog-watchcreations
$defaultPreferences[$pref] = array(
'type' = 'toggle',
'section' = 
'watchlist/advancedwatchlist',
diff --git a/includes/ProtectionForm.php b/includes/ProtectionForm.php
index 4d41d9e..94ebc61 100644
--- a/includes/ProtectionForm.php
+++ b/includes/ProtectionForm.php
@@ -365,6 +365,8 @@
 
foreach ( $this-mRestrictions as $action = $selected ) {
/* Not all languages have V_x - N_x relation */
+   // Give grep a chance to find the usages:
+   // restriction-edit, restriction-move, 
restriction-create, restriction-upload
$msg = wfMessage( 'restriction-' . $action );
$out .= trtd .
Xml::openElement( 'fieldset' ) .
diff --git a/includes/Skin.php b/includes/Skin.php
index de9c9dc..b714886 100644
--- a/includes/Skin.php
+++ b/includes/Skin.php
@@ -82,6 +82,8 @@
static function getSkinNameMessages() {
$messages = array();
foreach ( 

[MediaWiki-commits] [Gerrit] Give grep a chance to find the usages - change (mediawiki/core)

2013-08-16 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Give grep a chance to find the usages
..


Give grep a chance to find the usages

Change-Id: I18846326539b814fa7fa93ca54117dac3572e4b0
---
M includes/CategoryViewer.php
M includes/EditPage.php
M includes/Preferences.php
M includes/ProtectionForm.php
M includes/Skin.php
M includes/SkinTemplate.php
M includes/User.php
M includes/UserMailer.php
M includes/actions/InfoAction.php
M includes/installer/CliInstaller.php
M includes/installer/WebInstaller.php
M includes/installer/WebInstallerPage.php
M includes/job/jobs/DoubleRedirectJob.php
M includes/specials/SpecialJavaScriptTest.php
M includes/specials/SpecialProtectedpages.php
M includes/specials/SpecialProtectedtitles.php
M includes/specials/SpecialUserrights.php
M languages/Language.php
18 files changed, 58 insertions(+), 5 deletions(-)

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



diff --git a/includes/CategoryViewer.php b/includes/CategoryViewer.php
index 562ca0c..0c44e96 100644
--- a/includes/CategoryViewer.php
+++ b/includes/CategoryViewer.php
@@ -649,11 +649,6 @@
 * returned?  This function says what. Each type is considered 
independently
 * of the other types.
 *
-* Note for grepping: uses the messages category-article-count,
-* category-article-count-limited, category-subcat-count,
-* category-subcat-count-limited, category-file-count,
-* category-file-count-limited.
-*
 * @param int $rescnt The number of items returned by our database 
query.
 * @param int $dbcnt The number of items according to the category 
table.
 * @param string $type 'subcat', 'article', or 'file'
@@ -701,8 +696,12 @@
$this-cat-refreshCounts();
} else {
# Case 3: hopeless.  Don't give a total count at all.
+   # Give grep a chance to find the usages: 
category-subcat-count-limited,
+   # category-article-count-limited, 
category-file-count-limited
return $this-msg( category-$type-count-limited 
)-numParams( $rescnt )-parseAsBlock();
}
+   # Give grep a chance to find the usages: 
category-subcat-count-limited,
+   # category-article-count-limited, category-file-count-limited
return $this-msg( category-$type-count )-numParams( 
$rescnt, $totalcnt )-parseAsBlock();
}
 }
diff --git a/includes/EditPage.php b/includes/EditPage.php
index 59b7480..f244828 100644
--- a/includes/EditPage.php
+++ b/includes/EditPage.php
@@ -967,6 +967,7 @@
$undoMsg = 'norev';
}
 
+   // Give grep a chance to find the 
usages: undo-success, undo-failure, undo-norev
$class = ( $undoMsg == 'success' ? '' : 
'error ' ) . mw-undo-{$undoMsg};
$this-editFormPageTop .= 
$wgOut-parse( div class=\{$class}\ .
wfMessage( 'undo-' . $undoMsg 
)-plain() . '/div', true, /* interface */true );
diff --git a/includes/Preferences.php b/includes/Preferences.php
index f5f63ea..2bb1e64 100644
--- a/includes/Preferences.php
+++ b/includes/Preferences.php
@@ -978,6 +978,8 @@
 
foreach ( $watchTypes as $action = $pref ) {
if ( $user-isAllowed( $action ) ) {
+   // Give grep a chance to find the usages:
+   // tog-watchdefault, tog-watchmoves, 
tog-watchdeletion, tog-watchcreations
$defaultPreferences[$pref] = array(
'type' = 'toggle',
'section' = 
'watchlist/advancedwatchlist',
diff --git a/includes/ProtectionForm.php b/includes/ProtectionForm.php
index 4d41d9e..94ebc61 100644
--- a/includes/ProtectionForm.php
+++ b/includes/ProtectionForm.php
@@ -365,6 +365,8 @@
 
foreach ( $this-mRestrictions as $action = $selected ) {
/* Not all languages have V_x - N_x relation */
+   // Give grep a chance to find the usages:
+   // restriction-edit, restriction-move, 
restriction-create, restriction-upload
$msg = wfMessage( 'restriction-' . $action );
$out .= trtd .
Xml::openElement( 'fieldset' ) .
diff --git a/includes/Skin.php b/includes/Skin.php
index de9c9dc..b714886 100644
--- a/includes/Skin.php
+++ b/includes/Skin.php
@@ -82,6 +82,8 @@
static function getSkinNameMessages() {
$messages = array();
foreach ( self::getSkinNames() as $skinKey = $skinName 

[MediaWiki-commits] [Gerrit] ValueFormatter for Time DataValue - change (mediawiki...DataValues)

2013-08-16 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: ValueFormatter for Time DataValue
..


ValueFormatter for Time DataValue

(bug 48937)

Change-Id: I0dd02909834ce8b428daea86e8bd2bf87ba9a085
---
M ValueFormatters/ValueFormatters.classes.php
M ValueFormatters/ValueFormatters.mw.php
M ValueFormatters/ValueFormatters.php
A ValueFormatters/includes/formatters/TimeFormatter.php
A ValueFormatters/includes/formatters/TimeIsoFormatter.php
A ValueFormatters/tests/phpunit/formatters/TimeFormatterTest.php
6 files changed, 284 insertions(+), 2 deletions(-)

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



diff --git a/ValueFormatters/ValueFormatters.classes.php 
b/ValueFormatters/ValueFormatters.classes.php
index 1713cc7..ca2ddc3 100644
--- a/ValueFormatters/ValueFormatters.classes.php
+++ b/ValueFormatters/ValueFormatters.classes.php
@@ -36,6 +36,8 @@
'ValueFormatters\GeoCoordinateFormatter' = 
'includes/formatters/GeoCoordinateFormatter.php',
'ValueFormatters\IriFormatter' = 
'includes/formatters/IriFormatter.php',
'ValueFormatters\StringFormatter' = 
'includes/formatters/StringFormatter.php',
+   'ValueFormatters\TimeIsoFormatter' = 
'includes/formatters/TimeIsoFormatter.php',
+   'ValueFormatters\TimeFormatter' = 
'includes/formatters/TimeFormatter.php',
 
'ValueFormatters\Test\ValueFormatterFactoryTest' = 
'tests/phpunit/ValueFormatterFactoryTest.php',
'ValueFormatters\Test\ValueFormatterTestBase' = 
'tests/phpunit/ValueFormatterTestBase.php',
diff --git a/ValueFormatters/ValueFormatters.mw.php 
b/ValueFormatters/ValueFormatters.mw.php
index 9c11d74..f138125 100644
--- a/ValueFormatters/ValueFormatters.mw.php
+++ b/ValueFormatters/ValueFormatters.mw.php
@@ -49,7 +49,8 @@
 }
 
 $wgValueFormatters = array(
-   \DataValues\GeoCoordinateValue::getType() = 
'ValueFormatters\GeoCoordinateFormatter'
+   \DataValues\GeoCoordinateValue::getType() = 
'ValueFormatters\GeoCoordinateFormatter',
+   \DataValues\TimeValue::getType() = 'ValueFormatters\TimeFormatter',
 );
 
 /**
diff --git a/ValueFormatters/ValueFormatters.php 
b/ValueFormatters/ValueFormatters.php
index 563974a..2c27b01 100644
--- a/ValueFormatters/ValueFormatters.php
+++ b/ValueFormatters/ValueFormatters.php
@@ -58,7 +58,8 @@
  * @deprecated since 0.1 This is a global registry that provides no control 
over object lifecycle
  */
 $wgValueFormatters = array(
-   'globecoordinate' = 'ValueFormatters\GeoCoordinateFormatter'
+   'globecoordinate' = 'ValueFormatters\GeoCoordinateFormatter',
+   'timevalue' = 'ValueFormatters\TimeFormatter',
 );
 
 spl_autoload_register( function ( $className ) {
diff --git a/ValueFormatters/includes/formatters/TimeFormatter.php 
b/ValueFormatters/includes/formatters/TimeFormatter.php
new file mode 100644
index 000..5c122cf
--- /dev/null
+++ b/ValueFormatters/includes/formatters/TimeFormatter.php
@@ -0,0 +1,95 @@
+?php
+
+namespace ValueFormatters;
+
+use DataValues\TimeValue;
+use InvalidArgumentException;
+
+/**
+ * Time formatter.
+ *
+ * Some code in this class has been borrowed from the
+ * MapsCoordinateParser class of the Maps extension for MediaWiki.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @since 0.1
+ *
+ * @file
+ * @ingroup ValueFormatters
+ *
+ * @licence GNU GPL v2+
+ * @author H. Snater  mediaw...@snater.com 
+ */
+class TimeFormatter extends ValueFormatterBase {
+   const CALENDAR_GREGORIAN = 'http://www.wikidata.org/entity/Q1985727';
+   const CALENDAR_JULIAN = 'http://www.wikidata.org/entity/Q1985786';
+
+   const OPT_LANGUAGE = 'language';
+   const OPT_CALENDARNAMES = 'calendars';
+   const OPT_TIME_ISO_FORMATTER = 'time iso formatter';
+
+   /**
+* @since 0.1
+*
+* @param FormatterOptions $options
+*/
+   public function __construct( FormatterOptions $options ) {
+   parent::__construct( $options );
+
+   $this-defaultOption( self::OPT_LANGUAGE, null );
+
+   $this-defaultOption( self::OPT_CALENDARNAMES, array(
+   self::CALENDAR_GREGORIAN = 'Gregorian',
+ 

[MediaWiki-commits] [Gerrit] Register StringFormatter - change (mediawiki...DataValues)

2013-08-16 Thread Tobias Gritschacher (Code Review)
Tobias Gritschacher has uploaded a new change for review.

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


Change subject: Register StringFormatter
..

Register StringFormatter

Bug: 46366
Change-Id: Id1ba48162ba718473d5f1534e24ebd6445a27a24
---
M ValueFormatters/ValueFormatters.mw.php
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DataValues 
refs/changes/32/79332/1

diff --git a/ValueFormatters/ValueFormatters.mw.php 
b/ValueFormatters/ValueFormatters.mw.php
index b32bf51..8eba748 100644
--- a/ValueFormatters/ValueFormatters.mw.php
+++ b/ValueFormatters/ValueFormatters.mw.php
@@ -36,6 +36,7 @@
 $wgValueFormatters = array(
\DataValues\GeoCoordinateValue::getType() = 
'ValueFormatters\GeoCoordinateFormatter',
\DataValues\TimeValue::getType() = 'ValueFormatters\TimeFormatter',
+   \DataValues\StringValue::getType() = 'ValueFormatters\StringFormatter',
 );
 
 /**

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id1ba48162ba718473d5f1534e24ebd6445a27a24
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DataValues
Gerrit-Branch: master
Gerrit-Owner: Tobias Gritschacher tobias.gritschac...@wikimedia.de

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


[MediaWiki-commits] [Gerrit] Implemented MwTimeIsoFormatter in Wikibase - change (mediawiki...Wikibase)

2013-08-16 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Implemented MwTimeIsoFormatter in Wikibase
..


Implemented MwTimeIsoFormatter in Wikibase

(requires change I0dd02909834ce8b428daea86e8bd2bf87ba9a085)
Implements ValueFormatters extension's TimeIsoFormatter interface in the 
Wikibase extension
making use of native MediaWiki functionality. Invoking the TimeFormatter is 
done in I72bd2c4.

Change-Id: I0d36f6a5ec0d7d28deaeed6a71e279b73fd2e449
---
M lib/WikibaseLib.classes.php
A lib/includes/formatters/MwTimeIsoFormatter.php
A lib/tests/phpunit/formatters/MwTimeIsoFormatterTest.php
3 files changed, 187 insertions(+), 0 deletions(-)

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



diff --git a/lib/WikibaseLib.classes.php b/lib/WikibaseLib.classes.php
index 4f4b844..89e105d 100644
--- a/lib/WikibaseLib.classes.php
+++ b/lib/WikibaseLib.classes.php
@@ -87,6 +87,7 @@
// includes/formatters
'Wikibase\Lib\EntityIdFormatter' = 
'includes/formatters/EntityIdFormatter.php',
'Wikibase\Lib\EntityIdLabelFormatter' = 
'includes/formatters/EntityIdLabelFormatter.php',
+   'Wikibase\Lib\MwTimeIsoFormatter' = 
'includes/formatters/MwTimeIsoFormatter.php',
 
// includes/modules
'Wikibase\RepoAccessModule' = 
'includes/modules/RepoAccessModule.php',
diff --git a/lib/includes/formatters/MwTimeIsoFormatter.php 
b/lib/includes/formatters/MwTimeIsoFormatter.php
new file mode 100644
index 000..e457cb8
--- /dev/null
+++ b/lib/includes/formatters/MwTimeIsoFormatter.php
@@ -0,0 +1,82 @@
+?php
+
+namespace Wikibase\Lib;
+
+use \ValueFormatters\TimeIsoFormatter;
+
+/**
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @since 0.4
+ *
+ * @file
+ * @ingroup WikibaseLib
+ *
+ * @licence GNU GPL v2+
+ * @author H. Snater  mediaw...@snater.com 
+ */
+class MwTimeIsoFormatter implements TimeIsoFormatter {
+
+   /**
+* MediaWiki language object.
+* @var \Language
+*/
+   private $language;
+
+   public function __construct( $language ) {
+   $this-language = $language;
+   }
+
+   /**
+* @see TimeIsoFormatter::formatDate
+*/
+   public function formatDate( $extendedIsoTimestamp, $precision ) {
+   if(
+   // TODO: Localize dates not featuring a positive 
4-digit year.
+   preg_match( '/^\+0*(\d{4})-/', $extendedIsoTimestamp, 
$matches )
+   // TODO: Support precision above year
+$precision = 9
+   ) {
+   // Positive 4-digit year allows using Language object.
+   $strippedTime = preg_replace( '/^(\+0*)(\d{4})/', '$2', 
$extendedIsoTimestamp );
+
+   $timestamp = wfTimestamp( TS_MW, $strippedTime );
+   $dateFormat = $this-language-getDateFormatString(
+   'date',
+   $this-language-getDefaultDateFormat()
+   );
+
+   // TODO: Implement more sophisticated replace algorithm 
since characters may be escaped
+   //  or, even better, find a way to avoid having to do 
replacements.
+   if( $precision  11 ) {
+   // Remove day placeholder:
+   $dateFormat = preg_replace( 
'/((x\w{1})?(j|t)|d)/', '', $dateFormat );
+   }
+
+   if( $precision  10 ) {
+   // Remove month placeholder:
+   $dateFormat = preg_replace( 
'/((x\w{1})?(F|n)|m)/', '', $dateFormat );
+   }
+
+   // TODO: Currently, the year will always be formatted 
with 4 digits. Years  1000 will
+   //  features leading zero(s) that would need to be 
stripped.
+   return $this-language-sprintfDate( trim( $dateFormat 
), $timestamp );
+   } else {
+   return $extendedIsoTimestamp;
+   }
+  

[MediaWiki-commits] [Gerrit] Fix comments for grep - change (mediawiki/core)

2013-08-16 Thread Shirayuki (Code Review)
Shirayuki has uploaded a new change for review.

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


Change subject: Fix comments for grep
..

Fix comments for grep

* category-*-count messages

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


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/33/79333/1

diff --git a/includes/CategoryViewer.php b/includes/CategoryViewer.php
index 0c44e96..a9f5d23 100644
--- a/includes/CategoryViewer.php
+++ b/includes/CategoryViewer.php
@@ -700,8 +700,8 @@
# category-article-count-limited, 
category-file-count-limited
return $this-msg( category-$type-count-limited 
)-numParams( $rescnt )-parseAsBlock();
}
-   # Give grep a chance to find the usages: 
category-subcat-count-limited,
-   # category-article-count-limited, category-file-count-limited
+   # Give grep a chance to find the usages:
+   # category-subcat-count, category-article-count, 
category-file-count
return $this-msg( category-$type-count )-numParams( 
$rescnt, $totalcnt )-parseAsBlock();
}
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If5a58c4f128d15969c56955af43aff76954ca94b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Shirayuki shirayuk...@gmail.com

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


[MediaWiki-commits] [Gerrit] Register StringFormatter - change (mediawiki...DataValues)

2013-08-16 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Register StringFormatter
..


Register StringFormatter

Bug: 46366
Change-Id: Id1ba48162ba718473d5f1534e24ebd6445a27a24
---
M ValueFormatters/ValueFormatters.mw.php
1 file changed, 1 insertion(+), 0 deletions(-)

Approvals:
  Jeroen De Dauw: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/ValueFormatters/ValueFormatters.mw.php 
b/ValueFormatters/ValueFormatters.mw.php
index b32bf51..8eba748 100644
--- a/ValueFormatters/ValueFormatters.mw.php
+++ b/ValueFormatters/ValueFormatters.mw.php
@@ -36,6 +36,7 @@
 $wgValueFormatters = array(
\DataValues\GeoCoordinateValue::getType() = 
'ValueFormatters\GeoCoordinateFormatter',
\DataValues\TimeValue::getType() = 'ValueFormatters\TimeFormatter',
+   \DataValues\StringValue::getType() = 'ValueFormatters\StringFormatter',
 );
 
 /**

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id1ba48162ba718473d5f1534e24ebd6445a27a24
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DataValues
Gerrit-Branch: master
Gerrit-Owner: Tobias Gritschacher tobias.gritschac...@wikimedia.de
Gerrit-Reviewer: Jeroen De Dauw jeroended...@gmail.com
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] helium backup director/storage server - change (operations/puppet)

2013-08-16 Thread Akosiaris (Code Review)
Akosiaris has uploaded a new change for review.

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


Change subject: helium backup director/storage server
..

helium backup director/storage server

Change-Id: I6db35aa15cb800b4dc917a60099baacff486e7a3
---
M manifests/role/backup.pp
M manifests/site.pp
2 files changed, 40 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/34/79334/1

diff --git a/manifests/role/backup.pp b/manifests/role/backup.pp
index b881de4..4b1f39b 100644
--- a/manifests/role/backup.pp
+++ b/manifests/role/backup.pp
@@ -1,7 +1,7 @@
 # A set of roles for the backup director, storage and client as they are
 # configured in WMF
 
-$director = FILLMEIN
+$director = helium.eqiad.wmnet
 
 class role::backup::director {
 system_role { role::backup::director: description = Primary Backup 
server }
@@ -92,16 +92,50 @@
 class role::backup::storage() {
 system_role { role::backup::storage: description = Storage backup 
server }
 
+include nfs::netapp::common
+
 class { 'bacula::storage':
 director= $director,
 sd_max_concur_jobs  = 5,
 sqlvariant  = 'mysql',
 }
 
-bacula::storage::device { 'FileStorage':
+file { [ '/srv/bacula-sd1',
+ '/srv/bacula-sd2' ]:
+ensure  = directory,
+owner   = bacula,
+group   = bacula,
+mode= '0660',
+require = Class['bacula::storage'],
+}
+
+mount { /srv/bacula-sd1 :
+ensure  = mounted,
+device  = ${nfs::netapp::common::device}:/vol/bacula-sd1,
+fstype  = nfs,
+options = ${nfs::netapp::common::options},rw,
+require = File['/srv/bacula-sd1'],
+}
+
+mount { /srv/bacula-sd2 :
+ensure  = mounted,
+device  = ${nfs::netapp::common::device}:/vol/bacula-sd2,
+fstype  = nfs,
+options = ${nfs::netapp::common::options},rw,
+require = File['/srv/bacula-sd2'],
+}
+
+bacula::storage::device { 'FileStorage2':
 device_type = 'File',
 media_type  = 'File',
-archive_device  = '/srv/backups',
+archive_device  = '/srv/bacula-sd2',
+max_concur_jobs = 2,
+}
+
+bacula::storage::device { 'FileStorage1':
+device_type = 'File',
+media_type  = 'File',
+archive_device  = '/srv/bacula-sd1',
 max_concur_jobs = 2,
 }
 }
diff --git a/manifests/site.pp b/manifests/site.pp
index a0487ff..d01311a 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -1037,7 +1037,9 @@
 
 node helium.eqiad.wmnet {
 include standard,
-role::poolcounter
+role::poolcounter,
+   role::backup::director,
+   role::backup::storage
 }
 
 node holmium.wikimedia.org {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6db35aa15cb800b4dc917a60099baacff486e7a3
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Akosiaris akosia...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Add tyv.wikipedia to projects with visualeditor - change (operations/mediawiki-config)

2013-08-16 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Add tyv.wikipedia to projects with visualeditor
..


Add tyv.wikipedia to projects with visualeditor

Bug: 49328
Change-Id: I52176525bea8d1dbc1c6fa07bb2b87990c47343b
---
M visualeditor.dblist
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/visualeditor.dblist b/visualeditor.dblist
index 179b164..3d4caba 100644
--- a/visualeditor.dblist
+++ b/visualeditor.dblist
@@ -260,6 +260,7 @@
 tumwiki
 twwiki
 tywiki
+tyvwiki
 udmwiki
 ugwiki
 ukwiki

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I52176525bea8d1dbc1c6fa07bb2b87990c47343b
Gerrit-PatchSet: 2
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Amire80 amir.ahar...@mail.huji.ac.il
Gerrit-Reviewer: Reedy re...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Simplify entry point - change (mediawiki...Diff)

2013-08-16 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Simplify entry point
..


Simplify entry point

Change-Id: I7a79957347ef2cf2189cc51ef165b26035f5ecdb
---
M Diff.mw.php
M Diff.php
D Diff.standalone.php
3 files changed, 22 insertions(+), 60 deletions(-)

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



diff --git a/Diff.mw.php b/Diff.mw.php
index 90ed926..a4dff18 100644
--- a/Diff.mw.php
+++ b/Diff.mw.php
@@ -23,13 +23,6 @@
 
 $wgExtensionMessagesFiles['DiffExtension'] = __DIR__ . '/Diff.i18n.php';
 
-// Autoloading
-foreach ( include( __DIR__ . '/Diff.classes.php' ) as $class = $file ) {
-   if ( !array_key_exists( $class, $GLOBALS['wgAutoloadLocalClasses'] ) ) {
-   $wgAutoloadClasses[$class] = __DIR__ . '/' . $file;
-   }
-}
-
 /**
  * Hook to add PHPUnit test cases.
  * @see https://www.mediawiki.org/wiki/Manual:Hooks/UnitTestsList
diff --git a/Diff.php b/Diff.php
index 33d4534..024510c 100644
--- a/Diff.php
+++ b/Diff.php
@@ -1,20 +1,6 @@
 ?php
 
 /**
- * Initialization file for the Diff extension.
- *
- * Documentation:  
https://www.mediawiki.org/wiki/Extension:Diff
- * Support 
https://www.mediawiki.org/wiki/Extension_talk:Diff
- * Source code:
https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/extensions/Diff.git
- *
- * @file
- * @ingroup Diff
- *
- * @licence GNU GPL v2+
- * @author Jeroen De Dauw  jeroended...@gmail.com 
- */
-
-/**
  * This documentation group collects source code files belonging to Diff.
  *
  * @defgroup Diff Diff
@@ -28,11 +14,29 @@
  * @ingroup Test
  */
 
+if ( defined( 'Diff_VERSION' ) ) {
+   // Do not initialize more then once.
+   return;
+}
+
 define( 'Diff_VERSION', '0.8 alpha' );
 
 // @codeCoverageIgnoreStart
-call_user_func( function() {
-   $extension = defined( 'MEDIAWIKI' ) ? 'mw' : 'standalone';
-   require_once __DIR__ . '/Diff.' . $extension . '.php';
+spl_autoload_register( function ( $className ) {
+   static $classes = false;
+
+   if ( $classes === false ) {
+   $classes = include( __DIR__ . '/' . 'Diff.classes.php' );
+   }
+
+   if ( array_key_exists( $className, $classes ) ) {
+   include_once __DIR__ . '/' . $classes[$className];
+   }
 } );
-// @codeCoverageIgnoreEnd
+
+if ( defined( 'MEDIAWIKI' ) ) {
+   call_user_func( function() {
+   require_once __DIR__ . '/Diff.mw.php';
+   } );
+}
+// @codeCoverageIgnoreEnd
\ No newline at end of file
diff --git a/Diff.standalone.php b/Diff.standalone.php
deleted file mode 100644
index d816255..000
--- a/Diff.standalone.php
+++ /dev/null
@@ -1,35 +0,0 @@
-?php
-
-/**
- * Standalone setup for the diff library.
- * The library should be included via the main entry point, Diff.php.
- *
- * Documentation:  
https://www.mediawiki.org/wiki/Extension:Diff
- * Support 
https://www.mediawiki.org/wiki/Extension_talk:Diff
- * Source code:
https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/extensions/Diff.git
- *
- * @file
- * @ingroup Diff
- *
- * @licence GNU GPL v2+
- * @author Jeroen De Dauw  jeroended...@gmail.com 
- */
-
-if ( !defined( 'Diff_VERSION' ) ) {
-   die( 'Not an entry point for MediaWiki. Use Diff.php' );
-}
-
-// @codeCoverageIgnoreStart
-spl_autoload_register( function ( $className ) {
-   static $classes = false;
-
-   if ( $classes === false ) {
-   $classes = include( __DIR__ . '/' . 'Diff.classes.php' );
-   }
-
-   if ( array_key_exists( $className, $classes ) ) {
-   include_once __DIR__ . '/' . $classes[$className];
-   }
-} );
-// @codeCoverageIgnoreEnd
-

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7a79957347ef2cf2189cc51ef165b26035f5ecdb
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Diff
Gerrit-Branch: master
Gerrit-Owner: Jeroen De Dauw jeroended...@gmail.com
Gerrit-Reviewer: Addshore addshorew...@gmail.com
Gerrit-Reviewer: Daniel Werner daniel.wer...@wikimedia.de
Gerrit-Reviewer: Tobias Gritschacher tobias.gritschac...@wikimedia.de
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 ListDiffer and CallbackListDiffer to make use of new ... - change (mediawiki...Diff)

2013-08-16 Thread Daniel Werner (Code Review)
Daniel Werner has submitted this change and it was merged.

Change subject: Update ListDiffer and CallbackListDiffer to make use of new 
ArrayComparer classes
..


Update ListDiffer and CallbackListDiffer to make use of new ArrayComparer 
classes

Change-Id: I4437d21a5557d30a1031332f2653d3659c91b8ba
---
M RELEASE-NOTES.md
M src/ArrayComparer/StrategicArrayComparer.php
M src/differ/CallbackListDiffer.php
M src/differ/ListDiffer.php
M tests/phpunit/ArrayComparer/StrategicArrayComparerTest.php
M tests/phpunit/differ/CallbackListDifferTest.php
M tests/phpunit/differ/ListDifferTest.php
7 files changed, 91 insertions(+), 107 deletions(-)

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



diff --git a/RELEASE-NOTES.md b/RELEASE-NOTES.md
index 01e3a08..93dd64d 100644
--- a/RELEASE-NOTES.md
+++ b/RELEASE-NOTES.md
@@ -15,10 +15,18 @@
 
 * MapPatcher will now report conflicts for remove operations that specify a 
value to be removed
 different from the value in the structure being patched.
+* ListDiffer now supports arbitrary array comparison behaviour by using an 
ArrayComparer strategy.
+* The installation and usage documentation can now be found in README.md.
 
  Removals
 
 * Removed obsolete tests/phpunit.php test runner
+* Removed obsolete INSTALL file. Installation instructions are now in 
README.md.
+
+ Deprecations
+
+* The comparison mode flag in the ListDiffer constructor has been deprecated 
in favour of
+  the ArrayComparer strategy it now has.
 
 ## Version 0.7 (2013-07-16)
 
diff --git a/src/ArrayComparer/StrategicArrayComparer.php 
b/src/ArrayComparer/StrategicArrayComparer.php
index fbf0977..555925a 100644
--- a/src/ArrayComparer/StrategicArrayComparer.php
+++ b/src/ArrayComparer/StrategicArrayComparer.php
@@ -3,6 +3,7 @@
 namespace Diff\ArrayComparer;
 
 use Diff\Comparer\ValueComparer;
+use RuntimeException;
 
 /**
  * Computes the difference between two arrays by comparing elements with
@@ -60,11 +61,16 @@
 * @param array $haystack
 *
 * @return bool|int|string
+* @throws RuntimeException
 */
protected function arraySearch( $needle, array $haystack ) {
foreach ( $haystack as $valueOffset = $thing ) {
$areEqual = $this-valueComparer-valuesAreEqual( 
$needle, $thing );
 
+   if ( !is_bool( $areEqual ) ) {
+   throw new RuntimeException( 'ValueComparer 
returned a non-boolean value' );
+   }
+
if ( $areEqual ) {
return $valueOffset;
}
diff --git a/src/differ/CallbackListDiffer.php 
b/src/differ/CallbackListDiffer.php
index e8f9e11..ce8c21f 100644
--- a/src/differ/CallbackListDiffer.php
+++ b/src/differ/CallbackListDiffer.php
@@ -2,7 +2,8 @@
 
 namespace Diff;
 
-use Exception;
+use Diff\ArrayComparer\StrategicArrayComparer;
+use Diff\Comparer\CallbackComparer;
 
 /**
  * Differ that only looks at the values of the arrays (and thus ignores key 
differences).
@@ -21,11 +22,11 @@
 class CallbackListDiffer implements Differ {
 
/**
-* @since 0.5
+* @since 0.8
 *
-* @var callable|null
+* @var ListDiffer
 */
-   protected $comparisonCallback = null;
+   protected $differ = null;
 
/**
 * Constructor.
@@ -35,7 +36,7 @@
 * @param callable $comparisonCallback
 */
public function __construct( $comparisonCallback ) {
-   $this-comparisonCallback = $comparisonCallback;
+   $this-differ = new ListDiffer( new StrategicArrayComparer( new 
CallbackComparer( $comparisonCallback ) ) );
}
 
/**
@@ -49,68 +50,7 @@
 * @return DiffOp[]
 */
public function doDiff( array $oldValues, array $newValues ) {
-   $operations = array();
-
-   foreach ( $this-diffArrays( $newValues, $oldValues ) as 
$addition ) {
-   $operations[] = new DiffOpAdd( $addition );
-   }
-
-   foreach ( $this-diffArrays( $oldValues, $newValues ) as 
$removal ) {
-   $operations[] = new DiffOpRemove( $removal );
-   }
-
-   return $operations;
-   }
-
-   /**
-* @since 0.5
-*
-* @param array $arrayOne
-* @param array $arrayTwo
-*
-* @return array
-*/
-   protected function diffArrays( array $arrayOne, array $arrayTwo ) {
-   $notInTwo = array();
-
-   foreach ( $arrayOne as $element ) {
-   $valueOffset = $this-arraySearch( $element, $arrayTwo 
);
-
-   if ( $valueOffset === false ) {
-   $notInTwo[] = $element;
-   continue;
-   }
-
-   

[MediaWiki-commits] [Gerrit] Editor - change (mediawiki...Flow)

2013-08-16 Thread Matthias Mullie (Code Review)
Matthias Mullie has uploaded a new change for review.

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


Change subject: Editor
..

Editor

Change-Id: I6a5fb9b066daef4a74ab2e965e92b25131bce58f
---
M Flow.php
A includes/api/ApiQueryRevisionContentFlow.php
M modules/discussion/discussion.js
A modules/editor/ext.flow.editor.js
A modules/editor/ext.flow.none.js
A modules/editor/ext.flow.ve.js
M special/SpecialFlow.php
7 files changed, 220 insertions(+), 4 deletions(-)


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

diff --git a/Flow.php b/Flow.php
index 7ff4339..c3cd3ca 100755
--- a/Flow.php
+++ b/Flow.php
@@ -111,7 +111,9 @@
 
 // API modules
 $wgAutoloadClasses['ApiQueryFlow'] = $dir/includes/api/ApiQueryFlow.php;
+$wgAutoloadClasses['ApiQueryRevisionContentFlow'] = 
$dir/includes/api/ApiQueryRevisionContentFlow.php;
 $wgAutoloadClasses['ApiFlow'] = $dir/includes/api/ApiFlow.php;
+$wgAPIListModules['flow-revision-content'] = 'ApiQueryRevisionContentFlow';
 $wgAPIListModules['flow'] = 'ApiQueryFlow';
 $wgAPIModules['flow'] = 'ApiFlow';
 
@@ -134,7 +136,6 @@
// 'styles' = 'base/ext.flow.base.css',
'scripts' = 'base/ext.flow.base.js',
'dependencies' = array(
-   'ext.visualEditor.standalone',
'mediawiki.api',
'jquery.json',
),
@@ -150,6 +151,7 @@
'dependencies' = array(
'mediawiki.ui',
'ext.flow.base',
+   'ext.flow.editor',
),
'messages' = array(
'flow-newtopic-start-placeholder',
@@ -162,6 +164,23 @@
'flow-edit-title-submit',
'flow-edit-post-submit',
),
+   ),
+   'ext.flow.editor' = $flowResourceTemplate + array(
+   'scripts' = 'editor/ext.flow.editor.js',
+   'dependencies' = array(
+   'ext.flow.ve',
+   'ext.flow.none',
+   ),
+   ),
+   'ext.flow.ve' = $flowResourceTemplate + array(
+   'scripts' = 'editor/ext.flow.ve.js',
+   'dependencies' = array(
+   'ext.visualEditor.standalone',
+   'ext.visualEditor.core',
+   ),
+   ),
+   'ext.flow.none' = $flowResourceTemplate + array(
+   'scripts' = 'editor/ext.flow.none.js',
),
 );
 
@@ -191,7 +210,7 @@
 // use this workflow
 $wgFlowDefaultWorkflow = 'discussion';
 
-$wgFlowUseParsoid = false;
+$wgFlowUseParsoid = true;
 $wgFlowParsoidURL = 'http://localhost:8000';
 $wgFlowParsoidPrefix = 'localhost';
 $wgFlowParsoidTimeout = 100;
diff --git a/includes/api/ApiQueryRevisionContentFlow.php 
b/includes/api/ApiQueryRevisionContentFlow.php
new file mode 100644
index 000..1fa3b00
--- /dev/null
+++ b/includes/api/ApiQueryRevisionContentFlow.php
@@ -0,0 +1,65 @@
+?php
+
+use Flow\Model\UUID;
+
+class ApiQueryRevisionContentFlow extends ApiQueryBase {
+   public function __construct( $query, $moduleName ) {
+   parent::__construct( $query, $moduleName, 'rev' );
+   }
+
+   public function execute() {
+   $params = $this-extractRequestParams();
+
+   $container = include __DIR__ . /../../container.php;
+   if ( !isset( $container[$params['container']] ) ) {
+   throw new \MWException( 'Unknown container: '. 
$params['container'] );
+   }
+
+   $post = $container[$params['container']]-find( array( 'rev_id' 
= UUID::create( $params['id'] ) ) );
+   if ( !isset( $post[0] ) ) {
+   throw new \MWException( 'Unknown post: '. $params['id'] 
);
+   }
+
+   $result = array(
+   'html' = $post[0]-getContent(),
+   'wikitext' = 
\Flow\ParsoidUtils::convertHtml5ToWikitext( $post[0]-getContent() ),
+   );
+   $this-getResult()-addValue( 'query', $this-getModuleName(), 
$result );
+   }
+
+   public function getAllowedParams() {
+   return array(
+   'id' = array(
+   ApiBase::PARAM_REQUIRED = true,
+   ),
+   'container' = array(
+   ApiBase::PARAM_REQUIRED = true,
+   ),
+   );
+   }
+
+   public function getParamDescription() {
+   return array(
+   'id' = 'Hex-encoded rev_id',
+   'container' = 'Revision storage container',
+   );
+   }
+
+   public function getDescription() {
+   return 'Gets parsed content for Revision objects';
+   }
+
+   public function 

[MediaWiki-commits] [Gerrit] helium backup director/storage server - change (operations/puppet)

2013-08-16 Thread Akosiaris (Code Review)
Akosiaris has submitted this change and it was merged.

Change subject: helium backup director/storage server
..


helium backup director/storage server

Change-Id: I6db35aa15cb800b4dc917a60099baacff486e7a3
---
M manifests/role/backup.pp
M manifests/site.pp
2 files changed, 61 insertions(+), 12 deletions(-)

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



diff --git a/manifests/role/backup.pp b/manifests/role/backup.pp
index b881de4..f032d8e 100644
--- a/manifests/role/backup.pp
+++ b/manifests/role/backup.pp
@@ -1,10 +1,13 @@
 # A set of roles for the backup director, storage and client as they are
 # configured in WMF
 
-$director = FILLMEIN
+class role::backup::config {
+$director = 'helium.eqiad.wmnet'
+$database = 'db1001.eqiad.wmnet'
+}
 
 class role::backup::director {
-system_role { role::backup::director: description = Primary Backup 
server }
+system_role { 'role::backup::director': description = 'Backup server' }
 
 class { 'bacula::director':
 sqlvariant  = 'mysql',
@@ -12,9 +15,9 @@
 }
 
 # One pool for all
-bacula::director::pool { 'WMF':
+bacula::director::pool { 'production':
 max_vols = 30,
-storage  = 'WMFFiles',
+storage  = 'FileStorage1',
 volume_retention = '180 days',
 }
 
@@ -24,7 +27,15 @@
 $days = ['Sat', 'Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri']
 
 backup::schedule { $days:
-pool= 'WMF',
+pool= 'production',
+}
+
+bacula::director::catalog { 'production':
+dbname  = 'bacula',
+dbuser  = 'bacula',
+dbhost  = $bacula::config::database,
+dbport  = '3306',
+dbpassword  = $passwords::bacula::database
 }
 
 # This has been taken straight from old files/backup/disklist-*
@@ -83,25 +94,61 @@
 includes = [ '/var/vmail' ]
 }
 
-# The console should be on the director 
+# The console should be on the director
 bacula::console { 'bconsole':
 director   = $::fqdn,
 }
 }
 
 class role::backup::storage() {
-system_role { role::backup::storage: description = Storage backup 
server }
+system_role { 'role::backup::storage': description = 'Backup Storage' }
+
+include nfs::netapp::common
 
 class { 'bacula::storage':
-director= $director,
+director= $role::backup::config::director,
 sd_max_concur_jobs  = 5,
 sqlvariant  = 'mysql',
 }
-
-bacula::storage::device { 'FileStorage':
+
+# We have two storage devices to overcome any limitations from backend
+# infrastructure (e.g. Netapp used to have only  16T volumes)
+file { ['/srv/bacula-sd1',
+'/srv/bacula-sd2' ]:
+ensure  = directory,
+owner   = 'bacula',
+group   = 'bacula',
+mode= '0660',
+require = Class['bacula::storage'],
+}
+
+mount { '/srv/bacula-sd1' :
+ensure  = mounted,
+device  = ${nfs::netapp::common::device}:/vol/bacula-sd1,
+fstype  = 'nfs',
+options = ${nfs::netapp::common::options},rw,
+require = File['/srv/bacula-sd1'],
+}
+
+mount { '/srv/bacula-sd2' :
+ensure  = mounted,
+device  = ${nfs::netapp::common::device}:/vol/bacula-sd2,
+fstype  = 'nfs',
+options = ${nfs::netapp::common::options},rw,
+require = File['/srv/bacula-sd2'],
+}
+
+bacula::storage::device { 'FileStorage1':
 device_type = 'File',
 media_type  = 'File',
-archive_device  = '/srv/backups',
+archive_device  = '/srv/bacula-sd1',
+max_concur_jobs = 2,
+}
+
+bacula::storage::device { 'FileStorage2':
+device_type = 'File',
+media_type  = 'File',
+archive_device  = '/srv/bacula-sd2',
 max_concur_jobs = 2,
 }
 }
diff --git a/manifests/site.pp b/manifests/site.pp
index a0487ff..aa82d79 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -1037,7 +1037,9 @@
 
 node helium.eqiad.wmnet {
 include standard,
-role::poolcounter
+role::poolcounter,
+role::backup::director,
+role::backup::storage
 }
 
 node holmium.wikimedia.org {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6db35aa15cb800b4dc917a60099baacff486e7a3
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Akosiaris akosia...@wikimedia.org
Gerrit-Reviewer: Akosiaris akosia...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Removing duplicate definition in backup.pp - change (operations/puppet)

2013-08-16 Thread Akosiaris (Code Review)
Akosiaris has uploaded a new change for review.

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


Change subject: Removing duplicate definition in backup.pp
..

Removing duplicate definition in backup.pp

Change-Id: Id0abac49a937506976832f3154e38a48e0c2cbde
---
M manifests/role/backup.pp
1 file changed, 0 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/37/79337/1

diff --git a/manifests/role/backup.pp b/manifests/role/backup.pp
index f032d8e..3df2ba0 100644
--- a/manifests/role/backup.pp
+++ b/manifests/role/backup.pp
@@ -48,9 +48,6 @@
 bacula::director::fileset { 'a-eventlogging':
 includes = [ '/a/eventlogging' ]
 }
-bacula::director::fileset { 'a-sqldata':
-includes = [ '/a/sqldata' ]
-}
 bacula::director::fileset { 'home':
 includes = [ '/home' ]
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id0abac49a937506976832f3154e38a48e0c2cbde
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Akosiaris akosia...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Removing duplicate definition in backup.pp - change (operations/puppet)

2013-08-16 Thread Akosiaris (Code Review)
Akosiaris has submitted this change and it was merged.

Change subject: Removing duplicate definition in backup.pp
..


Removing duplicate definition in backup.pp

Change-Id: Id0abac49a937506976832f3154e38a48e0c2cbde
---
M manifests/role/backup.pp
1 file changed, 0 insertions(+), 3 deletions(-)

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



diff --git a/manifests/role/backup.pp b/manifests/role/backup.pp
index f032d8e..3df2ba0 100644
--- a/manifests/role/backup.pp
+++ b/manifests/role/backup.pp
@@ -48,9 +48,6 @@
 bacula::director::fileset { 'a-eventlogging':
 includes = [ '/a/eventlogging' ]
 }
-bacula::director::fileset { 'a-sqldata':
-includes = [ '/a/sqldata' ]
-}
 bacula::director::fileset { 'home':
 includes = [ '/home' ]
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id0abac49a937506976832f3154e38a48e0c2cbde
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Akosiaris akosia...@wikimedia.org
Gerrit-Reviewer: Akosiaris akosia...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] bacula::console is a class not a definition - change (operations/puppet)

2013-08-16 Thread Akosiaris (Code Review)
Akosiaris has uploaded a new change for review.

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


Change subject: bacula::console is a class not a definition
..

bacula::console is a class not a definition

Fix error in backup.pp

Change-Id: Ica1f932b757711d50ec81a219d32a48dd03509b9
---
M manifests/role/backup.pp
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/38/79338/1

diff --git a/manifests/role/backup.pp b/manifests/role/backup.pp
index 3df2ba0..3625f49 100644
--- a/manifests/role/backup.pp
+++ b/manifests/role/backup.pp
@@ -92,7 +92,7 @@
 }
 
 # The console should be on the director
-bacula::console { 'bconsole':
+class { 'bacula::console':
 director   = $::fqdn,
 }
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ica1f932b757711d50ec81a219d32a48dd03509b9
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Akosiaris akosia...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] bacula::console is a class not a definition - change (operations/puppet)

2013-08-16 Thread Akosiaris (Code Review)
Akosiaris has submitted this change and it was merged.

Change subject: bacula::console is a class not a definition
..


bacula::console is a class not a definition

Fix error in backup.pp

Change-Id: Ica1f932b757711d50ec81a219d32a48dd03509b9
---
M manifests/role/backup.pp
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/manifests/role/backup.pp b/manifests/role/backup.pp
index 3df2ba0..3625f49 100644
--- a/manifests/role/backup.pp
+++ b/manifests/role/backup.pp
@@ -92,7 +92,7 @@
 }
 
 # The console should be on the director
-bacula::console { 'bconsole':
+class { 'bacula::console':
 director   = $::fqdn,
 }
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ica1f932b757711d50ec81a219d32a48dd03509b9
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Akosiaris akosia...@wikimedia.org
Gerrit-Reviewer: Akosiaris akosia...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] initial deploy of ytterbium for eventual gerrit replacement - change (operations/puppet)

2013-08-16 Thread RobH (Code Review)
RobH has submitted this change and it was merged.

Change subject: initial deploy of ytterbium for eventual gerrit replacement
..


initial deploy of ytterbium for eventual gerrit replacement

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

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



diff --git a/manifests/site.pp b/manifests/site.pp
index aa82d79..15737b5 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -2985,6 +2985,14 @@
 include standard
 }
 
+node ytterbium.wikimedia.org {
+
+sudo_user { demon: privileges = ['ALL = NOPASSWD: ALL'] }
+
+include standard-noexim
+}
+
+
 node yvon.wikimedia.org {
 include base,
 ganglia,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id9515980433f66fb29f3945b13b5514317fd4213
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: RobH r...@wikimedia.org
Gerrit-Reviewer: RobH r...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Revert ytterbium install troubleshooting - change (operations/puppet)

2013-08-16 Thread RobH (Code Review)
RobH has submitted this change and it was merged.

Change subject: Revert ytterbium install troubleshooting
..


Revert ytterbium install troubleshooting

This reverts commit 9f6839de09630eaa3245646cad6df1397389ff49.

Change-Id: I7247f29ad9a3e12a40c529e307154c0a09d1a93e
---
M files/autoinstall/netboot.cfg
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/files/autoinstall/netboot.cfg b/files/autoinstall/netboot.cfg
index a5dd998..5a8761a 100755
--- a/files/autoinstall/netboot.cfg
+++ b/files/autoinstall/netboot.cfg
@@ -40,7 +40,7 @@
capella) echo partman/lvs.cfg ;; \

cp102[1-9]|cp10[3-6][0-9]|cp1070|cp30[0-9][0-9]|sq6[7-9]|sq70|dysprosium) echo 
partman/raid1-varnish.cfg ;; \

antimony|barium|caesium|celsus|cerium|erbium|europium|gadolinium|holmium|magnesium|neodymium|palladium|promethium|rubidium|strontium|terbium|titanium|xenon|wtp100[1-4])
 echo partman/lvm.cfg ;; \
-   constable|kuo|lardner|mexia|tola|ytterbium) echo 
partman/lvm.cfg ;; \
+   constable|kuo|lardner|mexia|tola) echo partman/lvm.cfg ;; \
lvs*) echo partman/lvs.cfg ;; \
ekrem) echo partman/raid1.cfg ;; \
eeden) echo partman/raid1-1partition.cfg ;; \
@@ -65,7 +65,7 @@
search[0-9]*) echo partman/search.cfg ;; \
snapshot[1-4]|snapshot100[1-4]) echo partman/snapshot.cfg ;; \
stat1002) echo partman/lvm-noraid-large.a.cfg ;; \
-   
copper|emery|neon|harmon|ssl[1-3]0[0-9][0-9]|ssl[0-9]|zirconium) echo 
partman/raid1-lvm.cfg ;; \
+   
copper|emery|neon|harmon|ssl[1-3]0[0-9][0-9]|ssl[0-9]|ytterbium|zirconium) echo 
partman/raid1-lvm.cfg ;; \
solr[1-3]|solr100[1-3]) echo partman/lvm.cfg ;; \
virt[5-9]|virt1[0-1]) echo partman/virt-raid10-cisco.cfg ;; \
virt100[1-3]) echo partman/virt-raid10-cisco-ceph.cfg ;; \

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7247f29ad9a3e12a40c529e307154c0a09d1a93e
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: RobH r...@wikimedia.org
Gerrit-Reviewer: RobH r...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] initial deploy of ytterbium for eventual gerrit replacement - change (operations/puppet)

2013-08-16 Thread RobH (Code Review)
RobH has uploaded a new change for review.

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


Change subject: initial deploy of ytterbium for eventual gerrit replacement
..

initial deploy of ytterbium for eventual gerrit replacement

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


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/39/79339/1

diff --git a/manifests/site.pp b/manifests/site.pp
index aa82d79..15737b5 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -2985,6 +2985,14 @@
 include standard
 }
 
+node ytterbium.wikimedia.org {
+
+sudo_user { demon: privileges = ['ALL = NOPASSWD: ALL'] }
+
+include standard-noexim
+}
+
+
 node yvon.wikimedia.org {
 include base,
 ganglia,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id9515980433f66fb29f3945b13b5514317fd4213
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: RobH r...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Set req.hash_ignore_busy = true for PURGE requests - change (operations/puppet)

2013-08-16 Thread BBlack (Code Review)
BBlack has submitted this change and it was merged.

Change subject: Set req.hash_ignore_busy = true for PURGE requests
..


Set req.hash_ignore_busy = true for PURGE requests

PURGE requests should never wait for busy objects to finish a fetch.
I suspect this may be the reason why some PURGE requests take a long
time.

Change-Id: I77d54b5826237228e0d6847743d3d1c0770f29c8
---
M modules/varnish/templates/vcl/wikimedia.vcl.erb
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/modules/varnish/templates/vcl/wikimedia.vcl.erb 
b/modules/varnish/templates/vcl/wikimedia.vcl.erb
index b8f77fb..ad4a34b 100644
--- a/modules/varnish/templates/vcl/wikimedia.vcl.erb
+++ b/modules/varnish/templates/vcl/wikimedia.vcl.erb
@@ -180,6 +180,7 @@
if (!client.ip ~ purge) {
error 405 Denied.;
} elsif (req.http.Host ~ %= 
vcl_config.fetch(purge_host_regex, .*) %) {
+   set req.hash_ignore_busy = true;
return (lookup);
} else {
error 204 Domain not cached here.;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I77d54b5826237228e0d6847743d3d1c0770f29c8
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Mark Bergsma m...@wikimedia.org
Gerrit-Reviewer: BBlack bbl...@wikimedia.org
Gerrit-Reviewer: Faidon fai...@wikimedia.org
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 ganglia monitoring for vhtcpd. - change (operations/puppet)

2013-08-16 Thread BBlack (Code Review)
BBlack has submitted this change and it was merged.

Change subject: Add ganglia monitoring for vhtcpd.
..


Add ganglia monitoring for vhtcpd.

Monitor vhtcpd's internal statistics to help spot trends and possible issues
with cache purge requests. See [[bugzilla:43449#c14]].

- Gmond monitoring script that reads from /tmp/vhtcpd.stats
- vhtcpd.pyconf
- New puppet class varnish::monitoring::ganglia::vhtcpd
- Apply puppet class wherever varnish::htcppurger is used

Bug: 43449
Change-Id: I1f581a94dae5e16353060d3b49f5fe411854e77a
---
M manifests/role/cache.pp
A modules/varnish/files/ganglia/ganglia-vhtcpd.py
A modules/varnish/manifests/monitoring/ganglia/vhtcpd.pp
A modules/varnish/templates/ganglia/vhtcpd.pyconf.erb
4 files changed, 278 insertions(+), 0 deletions(-)

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



diff --git a/manifests/role/cache.pp b/manifests/role/cache.pp
index 1f59d35..75ee409 100644
--- a/manifests/role/cache.pp
+++ b/manifests/role/cache.pp
@@ -546,6 +546,8 @@
 
class { varnish::htcppurger: varnish_instances = [ 
127.0.0.1:80, 127.0.0.1:3128 ] }
 
+   include varnish::monitoring::ganglia::vhtcpd
+
varnish::instance { text-backend:
name = ,
vcl = text-backend,
@@ -679,6 +681,8 @@
}
 
class { varnish::htcppurger: varnish_instances = [ 
127.0.0.1:80, 127.0.0.1:3128 ] }
+
+   include varnish::monitoring::ganglia::vhtcpd
 
case $::realm {
'production': {
@@ -946,6 +950,8 @@
 
class { varnish::htcppurger: varnish_instances = [ 
127.0.0.1:80, 127.0.0.1:3128 ] }
 
+   include varnish::monitoring::ganglia::vhtcpd
+
varnish::instance { mobile-backend:
name = ,
vcl = mobile-backend,
diff --git a/modules/varnish/files/ganglia/ganglia-vhtcpd.py 
b/modules/varnish/files/ganglia/ganglia-vhtcpd.py
new file mode 100644
index 000..0994037
--- /dev/null
+++ b/modules/varnish/files/ganglia/ganglia-vhtcpd.py
@@ -0,0 +1,209 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+# Copyright (c) 2013 Bryan Davis and Wikimedia Foundation. All Rights Reserved.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+Gmond module for vhtcpd statistics
+
+:copyright: (c) 2013 Bryan Davis and Wikimedia Foundation. All Rights Reserved.
+:author: Bryan Davis bd...@wikimedia.org
+:license: GPL
+
+
+import time
+import copy
+
+CONF = {
+'log': '/tmp/vhtcpd.stats',
+'prefix': 'vhtcpd_',
+'cache_secs': 5,
+'groups': 'vhtcpd',
+}
+METRICS = {
+'time': 0,
+'data': {
+'uptime': 0,
+'inpkts_recvd': 0,
+'inpkts_sane': 0,
+'inpkts_enqueued': 0,
+'inpkts_dequeued': 0,
+'queue_overflows': 0,
+'queue_size': 0,
+'queue_max_size': 0,
+}
+}
+LAST_METRICS = copy.deepcopy(METRICS)
+
+
+def build_desc (skel, prop):
+Build a description dict from a template.
+
+:param skel: template dict
+:param prop: substitution dict
+:returns: New dict
+
+d = skel.copy()
+for k,v in prop.iteritems():
+d[k] = v
+return d
+#end build_desc
+
+
+def get_metrics():
+Return all metrics
+global METRICS, LAST_METRICS
+
+if (time.time() - METRICS['time'])  CONF['cache_secs']:
+#cache stale, re-read the source file
+with open(CONF['log'], 'rb') as log_file:
+raw = log_file.read()
+
+metrics = {}
+for chunk in raw.split():
+(k,v) = chunk.split(':', 2)
+try:
+metrics[k] = int(v)
+except ValueError:
+metrics[k] = 0
+
+#update cache
+LAST_METRICS = copy.deepcopy(METRICS)
+METRICS = {
+'time': time.time(),
+'data': metrics,
+}
+
+return [METRICS, LAST_METRICS]
+#end get_metrics
+
+
+def clean_name(name):
+Strip prefix from metric name.
+return name[len(CONF['prefix']):]
+#end clean_name
+
+
+def get_value(name):
+Get the current value for a metric.
+metrics = get_metrics()[0]
+name = clean_name(name)
+try:
+val = metrics['data'][name]
+except StandardError:
+val = 0
+return val
+#end get_value
+
+
+def get_delta(name):
+Get the delta since last sample for a metric.
+(curr, last) = get_metrics()
+
+name = 

[MediaWiki-commits] [Gerrit] Route list outbound mail to a separate SMTP transport - change (operations/puppet)

2013-08-16 Thread Mark Bergsma (Code Review)
Mark Bergsma has uploaded a new change for review.

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


Change subject: Route list outbound mail to a separate SMTP transport
..

Route list outbound mail to a separate SMTP transport

This allows separate SMTP settings/parameters to be used,
and avoids problems due to message batching mixed with normal mail
at the remote_smtp transport

Change-Id: I7cebaa9a30a8859d4244ba5b815afb5cdeb3d08c
---
M manifests/mail.pp
M templates/exim/exim4.conf.SMTP_IMAP_MM.erb
2 files changed, 20 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/42/79342/1

diff --git a/manifests/mail.pp b/manifests/mail.pp
index 41f5108..05f9914 100644
--- a/manifests/mail.pp
+++ b/manifests/mail.pp
@@ -131,6 +131,8 @@
#   Enable/disable SpamAssassin spam checking
#   - $outbound_ips:
#   IP addresses to use for sending outbound e-mail
+   #   - $list_outbound_ips:
+   #   IP addresses to use for sending outbound e-mail from Mailman
#   - $hold_domains:
#   List of domains to hold on the queue without processing
class roled(
@@ -146,6 +148,7 @@
$rt_relay=false,
$enable_spamassassin=false,
$outbound_ips=[ $ipaddress ],
+   $list_outbound_ips=[],
$hold_domains=[] ) {
 
class { exim::config: install_type = heavy, queuerunner = 
combined }
diff --git a/templates/exim/exim4.conf.SMTP_IMAP_MM.erb 
b/templates/exim/exim4.conf.SMTP_IMAP_MM.erb
index a940c7f..bff891f 100644
--- a/templates/exim/exim4.conf.SMTP_IMAP_MM.erb
+++ b/templates/exim/exim4.conf.SMTP_IMAP_MM.erb
@@ -339,7 +339,17 @@
transport = bulk_smtp
ignore_target_hosts = ; 0.0.0.0 ; 127.0.0.0/8 ; 10/8 ; 172.16/12 ; 
192.168/16
no_verify
-% end %
+
+% end -%
+% if enable_mailman == true then -%
+list_outbound:
+   driver = dnslookup
+   condition = ${if match_ip{$sender_host_address}{@[]}}
+   senders = *@lists.wikimedia.org
+   transport = list_smtp
+   no_verify
+
+% end -%
 % if enable_mail_relay != false then -%
 # Send donate.wikimedia.org mail to Fundraising CiviCRM server
 donate:
@@ -654,7 +664,12 @@
 % if (enable_otrs_server == false ) -%
interface = ; %= outbound_ips.join( ; ) %
 % end -%
-% if (enable_mailman == true ) -%
+% if enable_mailman == true ) -%
+
+list_smtp:
+   driver = smtp
+   hosts_avoid_tls = ; 0.0.0.0/0 ; 0::0/0
+   interface = ; %= list_outbound_ips.join( ; ) %
helo_data = lists.wikimedia.org
 % end -%
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7cebaa9a30a8859d4244ba5b815afb5cdeb3d08c
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Mark Bergsma m...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Add a parserTest documenting interaction of tabs and preform... - change (mediawiki/core)

2013-08-16 Thread Cscott (Code Review)
Cscott has uploaded a new change for review.

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


Change subject: Add a parserTest documenting interaction of tabs and 
preformatted text.
..

Add a parserTest documenting interaction of tabs and preformatted text.

Tabs are apparently used this way on the front page of plwiki.

Change-Id: I0a65d5a9783071e91696ed2b96887f44199a999d
---
M tests/parser/parserTests.txt
1 file changed, 16 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/41/79341/1

diff --git a/tests/parser/parserTests.txt b/tests/parser/parserTests.txt
index 91fabb7..751ec41 100644
--- a/tests/parser/parserTests.txt
+++ b/tests/parser/parserTests.txt
@@ -1311,6 +1311,22 @@
 !! end
 
 !! test
+Tabs don't trigger preformatted text
+!! input
+   This is not
+preformatted text.
+ This is preformatted text.
+   So is this.
+!! result
+pThis is not
+preformatted text.
+/p
+preThis is preformatted text.
+   So is this.
+/pre
+!! end
+
+!! test
 Ident preformatting with inline content
 !! input
  a

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0a65d5a9783071e91696ed2b96887f44199a999d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Cscott canan...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Fix big writes in tests. - change (mediawiki...CirrusSearch)

2013-08-16 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Fix big writes in tests.
..


Fix big writes in tests.

When we sent a whole article to the page using selenium this caused
firefox to lock up.  Now, instead of sending the whole article we chunk
it and send it.  No more locking up!

Change-Id: I99bd1d0c115d4eb8c30f9a89dece45c1b55066e8
---
M tests/browser/features/step_definitions/page_steps.rb
1 file changed, 8 insertions(+), 4 deletions(-)

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



diff --git a/tests/browser/features/step_definitions/page_steps.rb 
b/tests/browser/features/step_definitions/page_steps.rb
index 972bb72..0a58ab4 100644
--- a/tests/browser/features/step_definitions/page_steps.rb
+++ b/tests/browser/features/step_definitions/page_steps.rb
@@ -30,10 +30,14 @@
 step 'I am logged in'
 visit(EditPage, using_params: {page_name: title})
   end
-  if (add) then
-page.article_text += text
-  else
-page.article_text = text
+  if !add then
+page.article_text = ''
+  end
+  # Firefox chokes on huge batches of text so split it into chunks and use
+  # send_keys rather than page-objects built in += because that clears and
+  # resends everything
+  text.chars.each_slice(1000) do |chunk|
+page.article_text_element.send_keys(chunk)
   end
   page.save
 end

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I99bd1d0c115d4eb8c30f9a89dece45c1b55066e8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CirrusSearch
Gerrit-Branch: master
Gerrit-Owner: Manybubbles never...@wikimedia.org
Gerrit-Reviewer: Cmcmahon cmcma...@wikimedia.org
Gerrit-Reviewer: Demon ch...@wikimedia.org
Gerrit-Reviewer: Zfilipin zfili...@wikimedia.org
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 parserTests for the interaction of italics and possessives. - change (mediawiki/core)

2013-08-16 Thread Cscott (Code Review)
Cscott has uploaded a new change for review.

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


Change subject: Add parserTests for the interaction of italics and possessives.
..

Add parserTests for the interaction of italics and possessives.

Bug: 49926
Change-Id: I9756a1fb0bd583e6a4495ef28c3c159492dad871
---
M tests/parser/parserTests.txt
1 file changed, 23 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/43/79343/1

diff --git a/tests/parser/parserTests.txt b/tests/parser/parserTests.txt
index 91fabb7..8268fd5 100644
--- a/tests/parser/parserTests.txt
+++ b/tests/parser/parserTests.txt
@@ -447,9 +447,9 @@
 
 !! end
 
-# this example taken from the simple/Moon article
+# this example taken from the [[simple:Moon]] article (bug 47326)
 !! test
-Italics and possessives
+Italics and possessives (1)
 !! input
 obtained by ''[[Lunar Prospector]]'''s gamma-ray spectrometer
 !! result
@@ -457,6 +457,27 @@
 /p
 !! end
 
+# this example taken from [[en:Flaming Pie]] (bug 49926)
+!! test
+Italics and possessives (2)
+!! input
+'Flaming Pie' is ... released in 1997. In ''Flaming Pie'''s liner notes
+!! result
+pibFlaming Pie/b/i is ... released in 1997. In iFlaming Pie'/is 
liner notes
+/p
+!! end
+
+# this example taken from [[en:Dictionary]] (bug 49926)
+!! test
+Italics and possessives (3)
+!! input
+The first monolingual dictionary written in a Romance language was ''Sebastián 
Covarrubias''' ''Tesoro de la lengua castellana o española'', published in 1611 
in Madrid. In 1612 the first edition of the ''Vocabolario dell'[[Accademia 
della Crusca]]'', for Italian, was published. In 1690 in Rotterdam was 
published, posthumously, the ''Dictionnaire Universel''.
+!! result
+pThe first monolingual dictionary written in a Romance language was 
iSebastián Covarrubias'/i iTesoro de la lengua castellana o española/i, 
published in 1611 in Madrid. In 1612 the first edition of the iVocabolario 
dell'a 
href=/index.php?title=Accademia_della_Cruscaamp;action=editamp;redlink=1 
class=new title=Accademia della Crusca (page does not exist)Accademia 
della Crusca/a/i, for Italian, was published. In 1690 in Rotterdam was 
published, posthumously, the iDictionnaire Universel/i.
+/p
+!! end
+
+
 ###
 ### 2-quote opening sequence tests
 ###

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9756a1fb0bd583e6a4495ef28c3c159492dad871
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Cscott canan...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Hygiene: Start enforcing modules - change (mediawiki...MobileFrontend)

2013-08-16 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Hygiene: Start enforcing modules
..


Hygiene: Start enforcing modules

This will make leakage from beta/alpha to stable more obvious

Change-Id: I7bf02628dd256cd6e30eecf9bf91ba08cc5fd22a
---
M javascripts/common/history-alpha.js
M javascripts/common/modules.js
M javascripts/modules/talk.js
M javascripts/specials/overlays/preview.js
M tests/javascripts/fixtures.js
5 files changed, 12 insertions(+), 0 deletions(-)

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



diff --git a/javascripts/common/history-alpha.js 
b/javascripts/common/history-alpha.js
index 49277c2..1d80e08 100644
--- a/javascripts/common/history-alpha.js
+++ b/javascripts/common/history-alpha.js
@@ -1,4 +1,5 @@
 ( function( M, $ ) {
+   M.assertMode( [ 'alpha' ] );
 
var
Page = M.require( 'page' ),
diff --git a/javascripts/common/modules.js b/javascripts/common/modules.js
index 9a64365..1c68e61 100644
--- a/javascripts/common/modules.js
+++ b/javascripts/common/modules.js
@@ -1,6 +1,13 @@
 mw.mobileFrontend = {
_modules: {},
 
+   assertMode: function( modes ) {
+   var mode = mw.config.get( 'wgMFMode' );
+   if ( modes.indexOf( mode ) === -1 ) {
+   throw new Error( 'Attempt to run module outside 
declared environment mode ' + mode  );
+   }
+   },
+
/**
 * Require (import) a module previously defined using define().
 *
diff --git a/javascripts/modules/talk.js b/javascripts/modules/talk.js
index fe22211..ee2c310 100644
--- a/javascripts/modules/talk.js
+++ b/javascripts/modules/talk.js
@@ -1,4 +1,5 @@
 ( function( M, $ ) {
+   M.assertMode( [ 'beta', 'alpha' ] );
 
var
Overlay = M.require( 'Overlay' ),
diff --git a/javascripts/specials/overlays/preview.js 
b/javascripts/specials/overlays/preview.js
index f6c8bac..e3923a3 100644
--- a/javascripts/specials/overlays/preview.js
+++ b/javascripts/specials/overlays/preview.js
@@ -1,4 +1,5 @@
 ( function( M, $ ) {
+   M.assertMode( [ 'beta', 'alpha' ] );
var Overlay = M.require( 'Overlay' ),
ua = window.navigator.userAgent,
device = 'unknown',
diff --git a/tests/javascripts/fixtures.js b/tests/javascripts/fixtures.js
index e0bada5..31de835 100644
--- a/tests/javascripts/fixtures.js
+++ b/tests/javascripts/fixtures.js
@@ -1,2 +1,4 @@
 // turn sinon into a global
 window.sinon = sinon;
+// force alpha so all code passes M.assert
+mw.config.set( 'wgMFMode', 'alpha' );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7bf02628dd256cd6e30eecf9bf91ba08cc5fd22a
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson jrob...@wikimedia.org
Gerrit-Reviewer: JGonera jgon...@wikimedia.org
Gerrit-Reviewer: Jdlrobson jrob...@wikimedia.org
Gerrit-Reviewer: Kaldari rkald...@wikimedia.org
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 role::backup::config - change (operations/puppet)

2013-08-16 Thread Akosiaris (Code Review)
Akosiaris has uploaded a new change for review.

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


Change subject: include role::backup::config
..

include role::backup::config

So that variables can be referenced. Also fix a typo

Change-Id: I6bf0540713d996e3ded0ca6ee40126607d30fb92
---
M manifests/role/backup.pp
1 file changed, 6 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/44/79344/1

diff --git a/manifests/role/backup.pp b/manifests/role/backup.pp
index 3625f49..1399b0a 100644
--- a/manifests/role/backup.pp
+++ b/manifests/role/backup.pp
@@ -7,6 +7,9 @@
 }
 
 class role::backup::director {
+include role::backup::config
+include passwords::bacula
+
 system_role { 'role::backup::director': description = 'Backup server' }
 
 class { 'bacula::director':
@@ -33,7 +36,7 @@
 bacula::director::catalog { 'production':
 dbname  = 'bacula',
 dbuser  = 'bacula',
-dbhost  = $bacula::config::database,
+dbhost  = $role::backup::config::database,
 dbport  = '3306',
 dbpassword  = $passwords::bacula::database
 }
@@ -98,6 +101,8 @@
 }
 
 class role::backup::storage() {
+include role::backup::config
+
 system_role { 'role::backup::storage': description = 'Backup Storage' }
 
 include nfs::netapp::common

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6bf0540713d996e3ded0ca6ee40126607d30fb92
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Akosiaris akosia...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Bug 51647: Allow right clicking on nearby - change (mediawiki...MobileFrontend)

2013-08-16 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Bug 51647: Allow right clicking on nearby
..


Bug 51647: Allow right clicking on nearby

Change-Id: I3b9c803ca51ff26e631dbdb15f859d3cdc33fd80
---
M javascripts/specials/nearby.js
1 file changed, 2 insertions(+), 1 deletion(-)

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



diff --git a/javascripts/specials/nearby.js b/javascripts/specials/nearby.js
index ff6e040..83e9a1b 100644
--- a/javascripts/specials/nearby.js
+++ b/javascripts/specials/nearby.js
@@ -55,7 +55,8 @@
},
postRender: function() {
var self = this;
-   this.$( 'a' ).on( 'mousedown', function( ev ) {
+   // use mouseup to allow right click
+   this.$( 'a' ).on( 'mouseup', function( ev ) {
// name funnel for watchlists to catch 
subsequent uploads
$.cookie( 'mwUploadsFunnel', 'nearby', 
{ expires: new Date( new Date().getTime() + 6) } );
self.openPage( ev );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3b9c803ca51ff26e631dbdb15f859d3cdc33fd80
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson jrob...@wikimedia.org
Gerrit-Reviewer: JGonera jgon...@wikimedia.org
Gerrit-Reviewer: Krinkle krinklem...@gmail.com
Gerrit-Reviewer: MaxSem maxsem.w...@gmail.com
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 role::backup::config - change (operations/puppet)

2013-08-16 Thread Akosiaris (Code Review)
Akosiaris has submitted this change and it was merged.

Change subject: include role::backup::config
..


include role::backup::config

So that variables can be referenced. Also fix a typo

Change-Id: I6bf0540713d996e3ded0ca6ee40126607d30fb92
---
M manifests/role/backup.pp
1 file changed, 6 insertions(+), 1 deletion(-)

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



diff --git a/manifests/role/backup.pp b/manifests/role/backup.pp
index 3625f49..1399b0a 100644
--- a/manifests/role/backup.pp
+++ b/manifests/role/backup.pp
@@ -7,6 +7,9 @@
 }
 
 class role::backup::director {
+include role::backup::config
+include passwords::bacula
+
 system_role { 'role::backup::director': description = 'Backup server' }
 
 class { 'bacula::director':
@@ -33,7 +36,7 @@
 bacula::director::catalog { 'production':
 dbname  = 'bacula',
 dbuser  = 'bacula',
-dbhost  = $bacula::config::database,
+dbhost  = $role::backup::config::database,
 dbport  = '3306',
 dbpassword  = $passwords::bacula::database
 }
@@ -98,6 +101,8 @@
 }
 
 class role::backup::storage() {
+include role::backup::config
+
 system_role { 'role::backup::storage': description = 'Backup Storage' }
 
 include nfs::netapp::common

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6bf0540713d996e3ded0ca6ee40126607d30fb92
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Akosiaris akosia...@wikimedia.org
Gerrit-Reviewer: Akosiaris akosia...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] SpecialWikibaseQueryPage::formatRow is no longer abstract - change (mediawiki...Wikibase)

2013-08-16 Thread Daniel Werner (Code Review)
Daniel Werner has uploaded a new change for review.

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


Change subject: SpecialWikibaseQueryPage::formatRow is no longer abstract
..

SpecialWikibaseQueryPage::formatRow is no longer abstract

Moved the most common implementation of it into the base class since it seems 
like the natural
formatting in the usual cases which can easily be predicted since we are always 
dealing with
Entities (or rather entity IDs) as results to be displayed.

Also cleaned up several redundant doxygen comments, simply use @see rather than 
having copies
of whole member signatures when overwriting them in subclasses.

Change-Id: I69c0b503a13efe51a906786bb1f99f6b076f0554
---
M lib/includes/specials/SpecialWikibasePage.php
M lib/includes/specials/SpecialWikibaseQueryPage.php
M repo/includes/specials/SpecialEntitiesWithoutPage.php
M repo/includes/specials/SpecialItemByTitle.php
M repo/includes/specials/SpecialItemDisambiguation.php
M repo/includes/specials/SpecialItemResolver.php
M repo/includes/specials/SpecialItemsWithoutSitelinks.php
7 files changed, 23 insertions(+), 91 deletions(-)


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

diff --git a/lib/includes/specials/SpecialWikibasePage.php 
b/lib/includes/specials/SpecialWikibasePage.php
index 9f9aa20..4057fbc 100644
--- a/lib/includes/specials/SpecialWikibasePage.php
+++ b/lib/includes/specials/SpecialWikibasePage.php
@@ -69,14 +69,13 @@
 * @see SpecialPage::getDescription
 *
 * @since 0.1
-* @return String
 */
public function getDescription() {
return $this-msg( 'special-' . strtolower( $this-getName() ) 
)-text();
}
 
/**
-* Sets headers - this should be called from the execute() method of 
all derived classes!
+* @see SpecialPage::setHeaders
 *
 * @since 0.1
 */
@@ -87,13 +86,9 @@
}
 
/**
-* Main method.
+* @see SpecialPage::execute
 *
 * @since 0.1
-*
-* @param string|null $subPage
-*
-* @return boolean
 */
public function execute( $subPage ) {
$subPage = is_null( $subPage ) ? '' : $subPage;
diff --git a/lib/includes/specials/SpecialWikibaseQueryPage.php 
b/lib/includes/specials/SpecialWikibaseQueryPage.php
index ec1a2fa..0e3953c 100644
--- a/lib/includes/specials/SpecialWikibaseQueryPage.php
+++ b/lib/includes/specials/SpecialWikibaseQueryPage.php
@@ -62,23 +62,31 @@
 * Formats a row for display.
 * If the function returns false, the line output will be skipped.
 *
-* @since 0.3
+* @since 0.4 (as abstract function with same interface in 0.3)
 *
 * @param $entry
 *
-* @return string|null
+* @return string|false
 */
-   protected abstract function formatRow( $entry );
+   protected function formatRow( $entry ) {
+   try {
+   $title = 
\Wikibase\EntityContentFactory::singleton()-getTitleForId( $entry );
+   return Linker::linkKnown( $title );
+   } catch ( MWException $e ) {
+   wfWarn( Error formatting result row:  . 
$e-getMessage() );
+   return false;
+   }
+   }
 
/**
 * Return the result of the query
 *
 * @since 0.3
 *
-* @param integer $offset
-* @param integer $limit
+* @param integer $offset Start to include at number of entries from 
the start title
+* @param integer $limit Stop at number of entries after start of 
inclusion
 *
-* @return array
+* @return Array[]
 */
protected abstract function getResult( $offset = 0, $limit = 0 );
 
diff --git a/repo/includes/specials/SpecialEntitiesWithoutPage.php 
b/repo/includes/specials/SpecialEntitiesWithoutPage.php
index bcdc4b4..75f70d1 100644
--- a/repo/includes/specials/SpecialEntitiesWithoutPage.php
+++ b/repo/includes/specials/SpecialEntitiesWithoutPage.php
@@ -60,10 +60,6 @@
 * @see SpecialWikibasePage::execute
 *
 * @since 0.4
-*
-* @param string $subPage
-*
-* @return boolean
 */
public function execute( $subPage ) {
if ( !parent::execute( $subPage ) ) {
@@ -206,33 +202,9 @@
}
 
/**
-* @see SpecialWikibaseQueryPage::formatRow
-*
-* @since 0.3
-*
-* @param $entry The entry is for this call an EntityId
-*
-* @return string|null
-*/
-   protected function formatRow( $entry ) {
-   try {
-   $title = 
\Wikibase\EntityContentFactory::singleton()-getTitleForId( $entry );
-   return 

[MediaWiki-commits] [Gerrit] Route list outbound mail to a separate SMTP transport - change (operations/puppet)

2013-08-16 Thread Mark Bergsma (Code Review)
Mark Bergsma has submitted this change and it was merged.

Change subject: Route list outbound mail to a separate SMTP transport
..


Route list outbound mail to a separate SMTP transport

This allows separate SMTP settings/parameters to be used,
and avoids problems due to message batching mixed with normal mail
at the remote_smtp transport

Change-Id: I7cebaa9a30a8859d4244ba5b815afb5cdeb3d08c
---
M manifests/mail.pp
M manifests/site.pp
M templates/exim/exim4.conf.SMTP_IMAP_MM.erb
3 files changed, 23 insertions(+), 2 deletions(-)

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



diff --git a/manifests/mail.pp b/manifests/mail.pp
index 41f5108..f26175a 100644
--- a/manifests/mail.pp
+++ b/manifests/mail.pp
@@ -131,6 +131,8 @@
#   Enable/disable SpamAssassin spam checking
#   - $outbound_ips:
#   IP addresses to use for sending outbound e-mail
+   #   - $list_outbound_ips:
+   #   IP addresses to use for sending outbound e-mail from 
Mailman
#   - $hold_domains:
#   List of domains to hold on the queue without processing
class roled(
@@ -146,6 +148,7 @@
$rt_relay=false,
$enable_spamassassin=false,
$outbound_ips=[ $ipaddress ],
+   $list_outbound_ips=[],
$hold_domains=[] ) {
 
class { exim::config: install_type = heavy, queuerunner = 
combined }
diff --git a/manifests/site.pp b/manifests/site.pp
index 15737b5..a3384c3 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -2421,6 +2421,7 @@
 
 class { exim::roled:
 outbound_ips = [ 208.80.154.4, 2620:0:861:1::2 ],
+list_outbound_ips = [ 208.80.154.4, 2620:0:861:1::2 ],
 local_domains = [ +system_domains, +mailman_domains ],
 enable_mail_relay = secondary,
 enable_mailman = true,
diff --git a/templates/exim/exim4.conf.SMTP_IMAP_MM.erb 
b/templates/exim/exim4.conf.SMTP_IMAP_MM.erb
index a940c7f..cdcbeef 100644
--- a/templates/exim/exim4.conf.SMTP_IMAP_MM.erb
+++ b/templates/exim/exim4.conf.SMTP_IMAP_MM.erb
@@ -318,6 +318,16 @@
 
 begin routers
 
+% if enable_mailman == true then -%
+list_outbound:
+   driver = dnslookup
+   domains = ! +local_domains
+   senders = *@lists.wikimedia.org
+   condition = ${if match_ip{$sender_host_address}{@[]}}
+   transport = list_smtp
+   no_verify
+
+% end -%
 % if enable_mail_relay == secondary then -%
 # Route relay domains only if the higher prio MXes are in the allowed list
 secondary:
@@ -339,7 +349,8 @@
transport = bulk_smtp
ignore_target_hosts = ; 0.0.0.0 ; 127.0.0.0/8 ; 10/8 ; 172.16/12 ; 
192.168/16
no_verify
-% end %
+
+% end -%
 % if enable_mail_relay != false then -%
 # Send donate.wikimedia.org mail to Fundraising CiviCRM server
 donate:
@@ -654,7 +665,13 @@
 % if (enable_otrs_server == false ) -%
interface = ; %= outbound_ips.join( ; ) %
 % end -%
-% if (enable_mailman == true ) -%
+% if enable_mailman == true -%
+   helo_data = lists.wikimedia.org
+
+list_smtp:
+   driver = smtp
+   hosts_avoid_tls = ; 0.0.0.0/0 ; 0::0/0
+   interface = ; %= list_outbound_ips.join( ; ) %
helo_data = lists.wikimedia.org
 % end -%
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7cebaa9a30a8859d4244ba5b815afb5cdeb3d08c
Gerrit-PatchSet: 7
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Mark Bergsma m...@wikimedia.org
Gerrit-Reviewer: Mark Bergsma m...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Fix fatal error when revision data isn't loaded properly - change (mediawiki...CirrusSearch)

2013-08-16 Thread Demon (Code Review)
Demon has uploaded a new change for review.

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


Change subject: Fix fatal error when revision data isn't loaded properly
..

Fix fatal error when revision data isn't loaded properly

When pages are being created, this hook gets run before all of
the revision data has made it to the slaves. So fall back to the
master if we can't load the revision data.

Bug: 52907
Change-Id: I65420d0e4339fa8d40fd054b82ae7b57e2afd350
---
M CirrusSearch.body.php
1 file changed, 7 insertions(+), 0 deletions(-)


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

diff --git a/CirrusSearch.body.php b/CirrusSearch.body.php
index 2673975..c4dfdca 100644
--- a/CirrusSearch.body.php
+++ b/CirrusSearch.body.php
@@ -397,6 +397,13 @@
$title = $linkUpdate-getTitle();
$articleId = $title-getArticleID();
$revision = Revision::loadFromPageId( wfGetDB( DB_SLAVE ), 
$articleId );
+
+   // This usually happens on page creation when all the revision 
data hasn't
+   // replicated out to the slaves
+   if ( !$revision ) {
+   Revision::loadFromPageId( wfGetDB( DB_MASTER ), 
$articleId );
+   }
+
$update = new SearchUpdate( $articleId, $title, 
$revision-getContent() );
$update-doUpdate();
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I65420d0e4339fa8d40fd054b82ae7b57e2afd350
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CirrusSearch
Gerrit-Branch: master
Gerrit-Owner: Demon ch...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Bug 51219: Don't require a newline when round-tripping exist... - change (mediawiki...Parsoid)

2013-08-16 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Bug 51219: Don't require a newline when round-tripping existing 
tables
..


Bug 51219: Don't require a newline when round-tripping existing tables

Check if the table or the following node is modified, and only require a
newline if that is the case. This means that modified or new text content will
no longer trigger a newline, but a new paragraph will. This still won't make a
difference in practice for the default serialization of new text content as
the VE will normally return new text wrapped in paragraphs or other elements.
In any case, serializing text on the same line as a table end tag is safe as
the block-level table tag will suppress paragraph wrapping in the PHP parser.

Also added two Parsoid-only test cases both for round-tripping and new content
serialization behavior.

Change-Id: I1342601ceedd28d1002f40463e3160ed6714d792
---
M js/lib/mediawiki.WikitextSerializer.js
M js/tests/parserTests.txt
2 files changed, 55 insertions(+), 1 deletion(-)

Approvals:
  Subramanya Sastry: Looks good to me, approved
  Cscott: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/js/lib/mediawiki.WikitextSerializer.js 
b/js/lib/mediawiki.WikitextSerializer.js
index 45bcb4d..9839eb5 100644
--- a/js/lib/mediawiki.WikitextSerializer.js
+++ b/js/lib/mediawiki.WikitextSerializer.js
@@ -2235,7 +2235,15 @@
return {min:1, max:2};
}
},
-   after: id({min:1, max:2}),
+   after: function (node, otherNode) {
+   if (DU.isNewElt(node) ||
+   (DU.isElt(otherNode)  
DU.isNewElt(otherNode)))
+   {
+   return {min:1, max:2};
+   } else {
+   return {min:0, max:2};
+   }
+   },
firstChild: id({min:1, max:2}),
lastChild: id({min:1})
}
diff --git a/js/tests/parserTests.txt b/js/tests/parserTests.txt
index bf26412..7b187a0 100644
--- a/js/tests/parserTests.txt
+++ b/js/tests/parserTests.txt
@@ -4285,6 +4285,52 @@
 /table
 !! end
 
+!! test
+Parsoid: Round-trip tables directly followed by content (bug 51219)
+!! options
+parsoid=wt2html,wt2wt
+!! input
+{|
+|foo
+|} bar
+
+{|
+|baz
+|}bquux/b
+!! result
+tabletbody
+tr
+tdfoo/td/tr/tbody/table bar
+table
+tbody
+tr
+tdbaz/td/tr/tbody/tablebquux/b
+!! end
+
+!! test
+Parsoid: Default to a newline after tables in new content (bug 51219)
+!! options
+parsoid=html2wt
+!! input
+{|
+|-
+|foo
+|}
+nowiki /nowikibar
+{|
+|-
+|baz
+|}
+'''quux'''
+!! result
+tabletbody
+tr
+tdfoo/td/tr/tbody/table bar
+tabletbody
+tr
+tdbaz/td/tr/tbody/tablebquux/b
+!! end
+
 ###
 ### Internal links
 ###

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1342601ceedd28d1002f40463e3160ed6714d792
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Parsoid
Gerrit-Branch: master
Gerrit-Owner: GWicke gwi...@wikimedia.org
Gerrit-Reviewer: Cscott canan...@wikimedia.org
Gerrit-Reviewer: Subramanya Sastry ssas...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Fix fatal error when revision data isn't loaded properly - change (mediawiki...CirrusSearch)

2013-08-16 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Fix fatal error when revision data isn't loaded properly
..


Fix fatal error when revision data isn't loaded properly

When pages are being created, this hook gets run before all of
the revision data has made it to the slaves. So fall back to the
master if we can't load the revision data.

Bug: 52907
Change-Id: I65420d0e4339fa8d40fd054b82ae7b57e2afd350
---
M CirrusSearch.body.php
1 file changed, 7 insertions(+), 0 deletions(-)

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



diff --git a/CirrusSearch.body.php b/CirrusSearch.body.php
index 2673975..c4dfdca 100644
--- a/CirrusSearch.body.php
+++ b/CirrusSearch.body.php
@@ -397,6 +397,13 @@
$title = $linkUpdate-getTitle();
$articleId = $title-getArticleID();
$revision = Revision::loadFromPageId( wfGetDB( DB_SLAVE ), 
$articleId );
+
+   // This usually happens on page creation when all the revision 
data hasn't
+   // replicated out to the slaves
+   if ( !$revision ) {
+   Revision::loadFromPageId( wfGetDB( DB_MASTER ), 
$articleId );
+   }
+
$update = new SearchUpdate( $articleId, $title, 
$revision-getContent() );
$update-doUpdate();
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I65420d0e4339fa8d40fd054b82ae7b57e2afd350
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CirrusSearch
Gerrit-Branch: master
Gerrit-Owner: Demon ch...@wikimedia.org
Gerrit-Reviewer: Demon ch...@wikimedia.org
Gerrit-Reviewer: Manybubbles never...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Updating Cirrus to master - change (mediawiki/core)

2013-08-16 Thread Demon (Code Review)
Demon has uploaded a new change for review.

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


Change subject: Updating Cirrus to master
..

Updating Cirrus to master

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


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/47/79347/1

diff --git a/extensions/CirrusSearch b/extensions/CirrusSearch
index f332c48..1e227ea 16
--- a/extensions/CirrusSearch
+++ b/extensions/CirrusSearch
-Subproject commit f332c4818a685367dca68ce70c04fbfced358cf4
+Subproject commit 1e227eaf4bc6eb0e7deb647b6fe80da22dad34f3

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iabfe775b27c59a674708accbec1e4f0c16d97b50
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.22wmf13
Gerrit-Owner: Demon ch...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Added an i18n message used by the applet generated by the ex... - change (mediawiki...FormelApplet)

2013-08-16 Thread Rudolf.grossmann (Code Review)
Rudolf.grossmann has uploaded a new change for review.

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


Change subject: Added an i18n message used by the applet generated by the 
extension (3rd try with Linux line endings)
..

Added an i18n message used by the applet generated by the extension (3rd try 
with Linux line endings)

Change-Id: I71d9a0ab7fad05224c6e04a7473c311cbf50de60
---
M FormelApplet.i18n.php
1 file changed, 1 insertion(+), 426 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/FormelApplet 
refs/changes/49/79349/1

diff --git a/FormelApplet.i18n.php b/FormelApplet.i18n.php
index 954d554..b763cfc 100644
--- a/FormelApplet.i18n.php
+++ b/FormelApplet.i18n.php
@@ -3,431 +3,8 @@
  *
  * Internationalization file for the FormelApplet extension.
  *
- * corresponding to FormelApplet.php Version 1.3i
- * @file
- * @ingroup Extensions
- */
-
-$messages = array();
-
-/** English
- * @author Rudolf Grossmann
- */
-$messages['en'] = array(
-   'formelapplet-desc' = 'Add [http://wiki.formelapplet.de FormelApplet] 
applets to pages.',
-   'formelapplet-nojava' = 'Please install $1 to use this page.',
-   'formelapplet-missing-parameter' = 'Missing parameter (width or height 
or term/solution).',
-   'formelapplet-file-not-found' = 'File $1 not found.',
-   'formelapplet-error' = 'Error in FormelApplet MediaWiki extension: 
em$1/em',
-   'RCM_permil' = 'Permil',
-);
-
-/** Message documentation (Message documentation)
- * @author Garrett Brown/Rudolf Grossmann
- * @author Kghbln
- * @author Shirayuki
- */
-$messages['qqq'] = array(
-   'formelapplet-desc' = '{{desc|name=Formel 
Applet|url=http://www.mediawiki.org/wiki/Extension:FormelApplet}}',
-   'formelapplet-nojava' = 'Error message if Java not installed with link 
where to get from.',
-   'formelapplet-missing-parameter' = 'Error message if parameter width 
or height or term/solution missing.
-
-{{doc-important|Do not translate the parameters width, height or 
term/solution.}}',
-   'formelapplet-file-not-found' = 'Error message if file not found.',
-   'formelapplet-error' = 'General part of error message.',
-   'RCM_permil' = 'Permil - used by menu of applet generated by 
FormelApplet MediaWiki extension.',
-);
-
-/** Asturian (asturianu)
- * @author Rudolf.Grossmann
- * @author Xuacu
- */
-$messages['ast'] = array(
-   'formelapplet-desc' = 'Amestar les miniaplicaciones 
[http://wiki.formelapplet.de FormelApplet] 
-nes páxines.',
-   'formelapplet-nojava' = 'Instale $1 pa usar esta páxina.',
-   'formelapplet-missing-parameter' = 'Falta un parámetru (width o 
height o term/solution).',
-   'formelapplet-file-not-found' = Nun s'alcontró el ficheru $1.,
-   'formelapplet-error' = 'Error na estensión FormelApplet de MediaWiki: 
em$1/em',
-);
-
-/** Breton (brezhoneg)
- * @author Y-M D
- */
-$messages['br'] = array(
-   'formelapplet-nojava' = 'Mar plij stalit $1 evit implijout ar 
bajenn-mañ.',
-   'formelapplet-file-not-found' = N'eo ket bet kavet ar restr $1.,
-);
-
-/** Czech (česky)
- * @author Vks
- */
-$messages['cs'] = array(
-   'formelapplet-file-not-found' = 'Soubor $1 nebyl nalezen.',
-);
-
-/** German (Deutsch)
- * @author Kghbln
- * @author Metalhead64
- * @author Metalhead64/Rudolf Grossmann
- */
-$messages['de'] = array(
-   'formelapplet-desc' = 'Ermöglicht die Nutzung von 
[http://wiki.formelapplet.de FormelApplets] auf Seiten',
-   'formelapplet-nojava' = 'Bitte installiere $1, um diese Seite nutzen 
zu können.',
-   'formelapplet-missing-parameter' = 'Ein Parameter wurde nicht 
angegeben und fehlt daher („width“, „height“ oder „term/solution“).',
-   'formelapplet-file-not-found' = 'Die Datei $1 wurde nicht gefunden.',
-   'formelapplet-error' = 'Bei der MediaWiki-Programmerweiterung 
FormelApplet ist ein Fehler aufgetreten: em$1/em',
-);
-
-/** German (formal address) (Deutsch (Sie-Form)‎)
- * @author Kghbln
- */
-$messages['de-formal'] = array(
-   'formelapplet-nojava' = 'Bitte installieren Sie $1, um diese Seite 
nutzen zu können.',
-);
-
-/** Zazaki (Zazaki)
- * @author Erdemaslancan
- */
-$messages['diq'] = array(
-   'formelapplet-file-not-found' = 'Zey $1 theba çıniyo',
-);
-
-/** Lower Sorbian (dolnoserbski)
- * @author Michawiki
- */
-$messages['dsb'] = array(
-   'formelapplet-desc' = 'Bokam aplety [http://wiki.formelapplet.de 
FormelApplet] pśidaś',
-   'formelapplet-nojava' = 'Pšosym instalěruj $1, aby toś ten bok 
wužywał.',
-   'formelapplet-missing-parameter' = 'Felujucy parameter (width, 
height abo term/solution).',
-   'formelapplet-file-not-found' = 'Dataja $1 njejo se namakała.',
-   'formelapplet-error' = 'Zmólka w rozšyrjenju MediaWiki FormelApplet: 
em$1/em',
-);
-
-/** Greek (Ελληνικά)
- * @author ZaDiak
- */
-$messages['el'] = array(
-   'formelapplet-file-not-found' = 'Το αρχείο $1 

[MediaWiki-commits] [Gerrit] Updating Cirrus to master - change (mediawiki/core)

2013-08-16 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Updating Cirrus to master
..


Updating Cirrus to master

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

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



diff --git a/extensions/CirrusSearch b/extensions/CirrusSearch
index f332c48..1e227ea 16
--- a/extensions/CirrusSearch
+++ b/extensions/CirrusSearch
-Subproject commit f332c4818a685367dca68ce70c04fbfced358cf4
+Subproject commit 1e227eaf4bc6eb0e7deb647b6fe80da22dad34f3

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iabfe775b27c59a674708accbec1e4f0c16d97b50
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.22wmf13
Gerrit-Owner: Demon ch...@wikimedia.org
Gerrit-Reviewer: Demon ch...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Re-enable jshint warnings. - change (mediawiki...Parsoid)

2013-08-16 Thread Arlolra (Code Review)
Arlolra has uploaded a new change for review.

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


Change subject: Re-enable jshint warnings.
..

Re-enable jshint warnings.

This syntax isn't function scoped like the other one.

Change-Id: I33592296a167795b9b17ba7aa2a46c608a3f54cb
---
M js/lib/mediawiki.TokenTransformManager.js
M js/lib/pegTokenizer.pegjs.txt
2 files changed, 2 insertions(+), 0 deletions(-)


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

diff --git a/js/lib/mediawiki.TokenTransformManager.js 
b/js/lib/mediawiki.TokenTransformManager.js
index 4d3bc5c..3ae626e 100644
--- a/js/lib/mediawiki.TokenTransformManager.js
+++ b/js/lib/mediawiki.TokenTransformManager.js
@@ -1536,6 +1536,7 @@
/* jshint -W053 */
// we need to make a non-primitive string in order to add 
properties
source = new String( source );
+   /* jshint +W053 */
source.get = this._getID;
return source;
} else {
diff --git a/js/lib/pegTokenizer.pegjs.txt b/js/lib/pegTokenizer.pegjs.txt
index 57a09c3..cdece5e 100644
--- a/js/lib/pegTokenizer.pegjs.txt
+++ b/js/lib/pegTokenizer.pegjs.txt
@@ -516,6 +516,7 @@
 /* jshint -W053 */
 // we need to make a non-primitive string in order to add 
properties
 b[0] = new String( bs );
+/* jshint +W053 */
 bs = b[0];
 }
 if (bs.dataAttribs === undefined) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I33592296a167795b9b17ba7aa2a46c608a3f54cb
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Parsoid
Gerrit-Branch: master
Gerrit-Owner: Arlolra abrea...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] remove peter from icinga - change (operations/puppet)

2013-08-16 Thread Asher (Code Review)
Asher has uploaded a new change for review.

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


Change subject: remove peter from icinga
..

remove peter from icinga

Change-Id: I3e2d9a468c272ba67b89dbe9eb86ac52e0ba97ff
---
M files/icinga/contactgroups.cfg
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/50/79350/1

diff --git a/files/icinga/contactgroups.cfg b/files/icinga/contactgroups.cfg
index 3066519..5b0fd95 100644
--- a/files/icinga/contactgroups.cfg
+++ b/files/icinga/contactgroups.cfg
@@ -6,7 +6,7 @@
 
 define contactgroup {
contactgroup_name   sms
-   members 
akosiaris,afeldman,atglenn,bblack,cmjohnson,ctwoo,dzahn,faidon,jgreen,ksnider,lcarr,mark,py,rlane,rkattouw,robh,tstarling
+   members 
akosiaris,afeldman,atglenn,bblack,cmjohnson,ctwoo,dzahn,faidon,jgreen,ksnider,lcarr,mark,rlane,rkattouw,robh,tstarling
 }
 
  define contactgroup {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3e2d9a468c272ba67b89dbe9eb86ac52e0ba97ff
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Asher afeld...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] remove peter from icinga - change (operations/puppet)

2013-08-16 Thread Asher (Code Review)
Asher has submitted this change and it was merged.

Change subject: remove peter from icinga
..


remove peter from icinga

Change-Id: I3e2d9a468c272ba67b89dbe9eb86ac52e0ba97ff
---
M files/icinga/contactgroups.cfg
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/files/icinga/contactgroups.cfg b/files/icinga/contactgroups.cfg
index 3066519..5b0fd95 100644
--- a/files/icinga/contactgroups.cfg
+++ b/files/icinga/contactgroups.cfg
@@ -6,7 +6,7 @@
 
 define contactgroup {
contactgroup_name   sms
-   members 
akosiaris,afeldman,atglenn,bblack,cmjohnson,ctwoo,dzahn,faidon,jgreen,ksnider,lcarr,mark,py,rlane,rkattouw,robh,tstarling
+   members 
akosiaris,afeldman,atglenn,bblack,cmjohnson,ctwoo,dzahn,faidon,jgreen,ksnider,lcarr,mark,rlane,rkattouw,robh,tstarling
 }
 
  define contactgroup {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3e2d9a468c272ba67b89dbe9eb86ac52e0ba97ff
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Asher afeld...@wikimedia.org
Gerrit-Reviewer: Asher afeld...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] OWD CSV - change (mediawiki...WikiLexicalData)

2013-08-16 Thread Kipcool (Code Review)
Kipcool has submitted this change and it was merged.

Change subject: OWD CSV
..


OWD CSV

Change-Id: I9d5b496d7bd09aecb49c3a8e2e41f785399ae42c
---
M OmegaWiki/Attribute.php
M OmegaWiki/DefinedMeaning.php
M OmegaWiki/Expression.php
M includes/formatCSV.php
A includes/jobs/OWOwdListJob.php
M includes/setup/OWJobs.php
M includes/specials/SpecialOWDownloads.php
7 files changed, 598 insertions(+), 32 deletions(-)

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



diff --git a/OmegaWiki/Attribute.php b/OmegaWiki/Attribute.php
index 8c4b661..91391c4 100644
--- a/OmegaWiki/Attribute.php
+++ b/OmegaWiki/Attribute.php
@@ -6,15 +6,15 @@
public $type = ;
 
/**
-* @param $id   (String) or null if 
-* @param $name (String) 
-* @param $type (String or Structure) 
+* @param $id   (String) or null if
+* @param $name (String)
+* @param $type (String or Structure)
 *  If String, can be language, spelling, boolean,
- *  defined-meaning, defining-expression, relation-type, 
attribute,
+*  defined-meaning, defining-expression, relation-type, 
attribute,
 *  collection, short-text, text
 *
 *  If Structure, see below.
-*/
+*/
public function __construct( $id, $name, $type ) {
$this-id = $id;
$this-name = $name;
@@ -29,7 +29,7 @@
$this-type = $type;
}
 
-   // Since the attribute is a structure and unnamed, we use 
+   // Since the attribute is a structure and unnamed, we use
// the default label associated with it.
if ( is_null( $this-id )  ( $this-type instanceof Structure 
) ) {
$this-id = $this-type-getStructureType();
@@ -38,7 +38,7 @@
$this-type-setStructureType( $this-id );
}
}
-   
+
public function getId() {
return $this-id;
}
@@ -54,7 +54,7 @@
 class Structure {
private $attributes;
private $type;
-   
+
public function getAttributes() {
return $this-attributes;
}
@@ -80,7 +80,7 @@
 *'anonymous-structure' unless there is only a
 *a single Attribute object, in which case the 
structure
 *will inherit its ID. Do not pass null.
-* @param $structure (Array or Parameter list) One or more Attribute 
objects. 
+* @param $structure (Array or Parameter list) One or more Attribute 
objects.
 *
 */
public function __construct( $argumentList ) {
@@ -88,7 +88,7 @@
# We're trying to be clever.
$args = func_get_args();
$this-attributes = null;
-   
+
if ( $args[0] instanceof Attribute ) {
$this-attributes = $args;
} elseif ( is_array( $args[0] ) ) {
@@ -125,34 +125,208 @@
public function supportsAttributeId( $attributeId ) {
 // $result = false;
 // $i = 0;
-// 
+//
 // while (!$result  $i  count($this-attributes)) {
 // $result = $this-attributes[$i]-id == $attributeId;
 // $i++;
 // }
-// 
+//
 // return $result;
return true;
}
-   
+
public function supportsAttribute( Attribute $attribute ) {
return $this-supportsAttributeId( $attribute-id );
}
-   
+
public function __tostring() {
$result = {;
 
if ( count( $this-attributes )  0 ) {
$result .= $this-attributes[0]-id;
-   
+
for ( $i = 1; $i  count( $this-attributes ); $i++ )
$result .= ,  . $this-attributes[$i]-id;
}
 
$result .= };
-   
+
return $result;
}
 }
 
+class Attributes {
 
+   public function __construct() {
+   }
+
+   /**
+* returns an array of the Text Attributes name and the text itself
+* for a language
+*
+* else returns array()
+*
+* Note: $options can be used to introduce new variables
+*/
+   public static function getTextAttributes( $objectId, $options = 
array(), $dc = null ) {
+   if ( is_null( $dc ) ) {
+   $dc = wdGetDataSetContext();
+   }
+   $dbr = wfGetDB( DB_SLAVE );
+
+   $cond = array();
+   if ( isset( $options['ORDER BY'] ) ) {
+   $cond['ORDER BY']= $options['ORDER BY'];
+   } else {
+   

[MediaWiki-commits] [Gerrit] Simplified the setup code by combining some functions - change (mediawiki...OAuth)

2013-08-16 Thread CSteipp (Code Review)
CSteipp has submitted this change and it was merged.

Change subject: Simplified the setup code by combining some functions
..


Simplified the setup code by combining some functions

Change-Id: I435cb3032f3b09cc209a3c36987105ebdfb6cd2b
---
M OAuth.php
M OAuth.setup.php
M api/MWOAuthAPI.setup.php
M frontend/MWOAuthUI.setup.php
4 files changed, 55 insertions(+), 85 deletions(-)

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



diff --git a/OAuth.php b/OAuth.php
index faf1668..a0deb37 100644
--- a/OAuth.php
+++ b/OAuth.php
@@ -38,25 +38,14 @@
 require( __DIR__ . '/OAuth.setup.php' );
 MWOAuthSetup::defineSourcePaths( $wgAutoloadClasses, $wgExtensionMessagesFiles 
);
 
-# Define JS/CSS modules and file locations
-MWOAuthUISetup::defineResourceModules( $wgResourceModules );
-
-$wgLogTypes[] = 'mwoauthconsumer';
-# Log name and description as well as action handlers
-MWOAuthUISetup::defineLogBasicDescription( $wgLogNames, $wgLogHeaders, 
$wgFilterLogTypes );
-MWOAuthUISetup::defineLogActionHandlers( $wgLogActions, $wgLogActionsHandlers 
);
-
-# Basic hook handlers
-MWOAuthSetup::defineHookHandlers( $wgHooks );
-# GUI-related hook handlers
-MWOAuthUISetup::defineHookHandlers( $wgHooks );
-# API-related hook handlers
-MWOAuthAPISetup::defineHookHandlers( $wgHooks );
+# Setup steps that does not depend on configuration
+MWOAuthSetup::unconditionalSetup();
+MWOAuthUISetup::unconditionalSetup();
+MWOAuthAPISetup::unconditionalSetup();
 
 # Actually register special pages and set default $wgMWOAuthCentralWiki
 $wgExtensionFunctions[] = function() {
global $wgMWOAuthCentralWiki, $wgMWOAuthSharedUserIDs;
-   global $wgSpecialPages, $wgSpecialPageGroups;
 
if ( $wgMWOAuthCentralWiki === false ) {
// Treat each wiki as its own central wiki as there is no 
actual one
@@ -65,5 +54,5 @@
// There is actually a central wiki, requiring global user IDs 
via hook
$wgMWOAuthSharedUserIDs = true;
}
-   MWOAuthUISetup::defineSpecialPages( $wgSpecialPages, 
$wgSpecialPageGroups );
+   MWOAuthUISetup::conditionalSetup();
 };
diff --git a/OAuth.setup.php b/OAuth.setup.php
index a1b9795..bdc5f16 100644
--- a/OAuth.setup.php
+++ b/OAuth.setup.php
@@ -82,13 +82,15 @@
}
 
/**
-* @param array $hooks $wgHooks
+* This function must NOT depend on any config vars
+*
 * @return void
 */
-   public static function defineHookHandlers( $hooks ) {
-   $hooks['LoadExtensionSchemaUpdates'][] = 
'MWOAuthUpdaterHooks::addSchemaUpdates';
+   public static function unconditionalSetup() {
+   global $wgHooks;
 
-   $hooks['UnitTestsList'][] = function( array $files ) {
+   $wgHooks['LoadExtensionSchemaUpdates'][] = 
'MWOAuthUpdaterHooks::addSchemaUpdates';
+   $wgHooks['UnitTestsList'][] = function( array $files ) {
$directoryIterator = new RecursiveDirectoryIterator( 
__DIR__ . '/tests/' );
foreach ( new RecursiveIteratorIterator( 
$directoryIterator ) as $fileInfo ) {
if ( substr( $fileInfo-getFilename(), -8 ) === 
'Test.php' ) {
diff --git a/api/MWOAuthAPI.setup.php b/api/MWOAuthAPI.setup.php
index 5179a07..1e57e9a 100644
--- a/api/MWOAuthAPI.setup.php
+++ b/api/MWOAuthAPI.setup.php
@@ -4,6 +4,22 @@
  */
 class MWOAuthAPISetup {
/**
+* This function must NOT depend on any config vars
+*
+* @return void
+*/
+   public static function unconditionalSetup() {
+   global $wgHooks;
+
+   $wgHooks['UserLoadFromSession'][] = __CLASS__ . 
'::onUserLoadFromSession';
+   $wgHooks['UserLoadAfterLoadFromSession'][] = __CLASS__ . 
'::onUserLoadAfterLoadFromSession';
+   $wgHooks['UserGetRights'][] = __CLASS__ . '::onUserGetRights';
+   $wgHooks['UserIsEveryoneAllowed'][] = __CLASS__ . 
'::onUserIsEveryoneAllowed';
+   $wgHooks['ApiCheckCanExecute'][] = __CLASS__ . 
'::onApiCheckCanExecute';
+   $wgHooks['RecentChange_save'][] = __CLASS__ . 
'::onRecentChange_save';
+   }
+
+   /**
 * Create the appropriate type of exception to throw, based on MW_API
 *
 * @param string $msgKey Key for the error message
@@ -52,20 +68,6 @@
throw self::makeException( 
'mwoauth-invalid-authorization', $result-getMessage() );
}
return $result;
-   }
-
-   /**
-* Register hooks handlers
-* @param Array $hooks $wgHooks (assoc array of hooks and handlers)
-* @return void
-*/
-   public static function defineHookHandlers( array $hooks ) {
-   $hooks['UserLoadFromSession'][] = __CLASS__ . 
'::onUserLoadFromSession';
-   

[MediaWiki-commits] [Gerrit] Tweak RDFa markup of page metadata in head. - change (mediawiki...Parsoid)

2013-08-16 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Tweak RDFa markup of page metadata in head.
..


Tweak RDFa markup of page metadata in head.

The RDFa we were emitting was semantically questionable.  Fix it up to
use dublin core terms to more clearly describe the relationship between
the parsoid output, the canonical wikipedia page, the author of the
revision, and the various revisions of the article.  Thanks to
Daniel Friesen for discussion and RDFa semantics-checking.

We use Special:Redirect/revision/XXX and Special:Redirect/user/YYY
as the stable names for a revision and author, respectively.
These were added in I8b0785f4fbdb3dd438a7a45263c5f375ff9d2208.

Bug: 45206
Change-Id: I7da7762462635530189c0d994e89f83a38c1f5ff
Obsoletes: Icf6854f7d985efb5117410d305f3e632f3778284
---
M js/lib/mediawiki.DOMPostProcessor.js
1 file changed, 92 insertions(+), 51 deletions(-)

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



diff --git a/js/lib/mediawiki.DOMPostProcessor.js 
b/js/lib/mediawiki.DOMPostProcessor.js
index d06ffd2..c4c9482 100644
--- a/js/lib/mediawiki.DOMPostProcessor.js
+++ b/js/lib/mediawiki.DOMPostProcessor.js
@@ -4,6 +4,7 @@
 
 var events = require('events'),
util = require('util'),
+   url = require('url'),
JSUtils = require('./jsutils.js').JSUtils,
Util = require('./mediawiki.Util.js').Util,
DU = require('./mediawiki.DOMUtils.js').DOMUtils,
@@ -14,19 +15,48 @@
 
 // map from mediawiki metadata names to RDFa property names
 var metadataMap = {
-   ns: 'mw:articleNamespace',
+   ns: {
+   property: 'mw:articleNamespace',
+   content: '%d'
+   },
// the articleID is not stable across article deletion/restore, while
// the revisionID is.  So we're going to omit the articleID from the
// parsoid API for now; uncomment if we find a use case.
//id: 'mw:articleId',
-   rev_revid: 'schema:CreativeWork/version',
-   rev_parentid:  'schema:CreativeWork/version/parent',
-   rev_timestamp: 'schema:CreativeWork/dateModified',
+
+   // 'rev_revid' is used to set the overall subject of the document, we 
don't
+   // need to add a specific meta or link element for it.
+
+   rev_parentid:  {
+   rel: 'dc:replaces',
+   resource: 'mwr:revision/%d'
+   },
+   rev_timestamp: {
+   property: 'dc:modified',
+   content: function(m) {
+   return new Date(m.rev_timestamp).toISOString();
+   }
+   },
// user is not stable (but userid is)
-   rev_user:  'schema:CreativeWork/contributor/username',
-   rev_userid:'schema:CreativeWork/contributor',
-   rev_sha1:  'mw:revisionSHA1',
-   rev_comment:   'schema:CreativeWork/comment'
+   rev_user:  {
+   about: function(m) {
+   return 'mwr:user/' + m.rev_userid;
+   },
+   property: 'dc:title',
+   content: '%s'
+   },
+   rev_userid:{
+   rel: 'dc:contributor',
+   resource: 'mwr:user/%d'
+   },
+   rev_sha1:  {
+   property: 'mw:revisionSHA1',
+   content: '%s'
+   },
+   rev_comment:   {
+   property: 'dc:description',
+   content: '%s'
+   }
 };
 
 // Sanity check for dom behavior: we are
@@ -2994,14 +3024,12 @@
 }
 
 /**
- * @method
- *
- * Create a meta element in the document.head with the given attrs.
-*/
-function appendMeta(document, attrs) {
-   var elt = document.createElement('meta');
-   DU.addAttributes(elt, attrs);
-   document.head.appendChild(elt);
+ * Create an element in the document.head with the given attrs.
+ */
+function appendToHead(document, tagName, attrs) {
+   var elt = document.createElement( tagName );
+   DU.addAttributes( elt, attrs || Object.create(null) );
+   document.head.appendChild( elt );
 }
 
 function DOMPostProcessor(env, options) {
@@ -3083,55 +3111,68 @@
// So, this is a hacky patch to set data-parsoid on document.body
cleanupAndSaveDataParsoid(document.body);
 
-   // add mw: RDFa prefix to top level
-   document.documentElement.setAttribute('prefix',
- 'mw: http://mediawiki.org/rdf/');
-
-   // add head content based on page meta data
+   // add head element if it was missing
if (!document.head) {
document.documentElement.
insertBefore(document.createElement('head'), 
document.body);
}
-   appendMeta(document, { charset: UTF-8 });
-   // don't let schema: prefix leak into body
-   document.head.setAttribute('prefix', 'schema: http://schema.org/');
-   var m = env.page.meta || {};
-   

[MediaWiki-commits] [Gerrit] Keep session data accross requests (even client ignores cook... - change (mediawiki...OAuth)

2013-08-16 Thread Aaron Schulz (Code Review)
Aaron Schulz has uploaded a new change for review.

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


Change subject: Keep session data accross requests (even client ignores cookies)
..

Keep session data accross requests (even client ignores cookies)

Change-Id: Ie861487ad6768c7f702d107a9f325a2f6635edab
---
M api/MWOAuthAPI.setup.php
1 file changed, 13 insertions(+), 2 deletions(-)


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

diff --git a/api/MWOAuthAPI.setup.php b/api/MWOAuthAPI.setup.php
index 1e57e9a..e661eb8 100644
--- a/api/MWOAuthAPI.setup.php
+++ b/api/MWOAuthAPI.setup.php
@@ -81,6 +81,8 @@
 * @return boolean
 */
public static function onUserLoadFromSession( User $user, $result ) {
+   global $wgMemc;
+
$user-oAuthSessionData = array();
try {
$accesstoken = self::getOAuthAccessToken();
@@ -107,8 +109,17 @@
'accesstoken' = $accesstoken,
'rights' = 
MWOAuthUtils::getGrantRights( $access-get( 'grants' ) ),
);
-   // Setup a session for this OAuth user, so edit 
tokens work
-   wfSetupSession();
+   // Setup a session for this OAuth user, so edit 
tokens work.
+   // Preserve the session ID used so clients can 
ignore cookies.
+   $key = wfMemcKey( 'oauthsessionid', 
$access-get( 'id' ) );
+   $sessionId = $wgMemc-get( $key ) ?: 
MWCryptRand::generateHex( 32, true );
+   $wgMemc-set( $key, $sessionId, 3600 ); // 
create/renew
+   wfSetupSession( $sessionId ); // create/reuse 
this anonymous session
+   Hooks::register( 'AfterFinalPageOutput', 
function( $out ) {
+   // Just in case, make sure this is not 
a valid login session for sanity
+   
RequestContext::getMain()-getRequest()-setSessionData( 'wsUserName', null );
+   } );
+
$result = true;
}
} catch( ErrorPageError $ex ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie861487ad6768c7f702d107a9f325a2f6635edab
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/OAuth
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz asch...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Updating Kraken to cope with libdclass 2.2.2 - change (analytics/kraken)

2013-08-16 Thread Diederik (Code Review)
Diederik has submitted this change and it was merged.

Change subject: Updating Kraken to cope with libdclass 2.2.2
..


Updating Kraken to cope with libdclass 2.2.2

Although libdclass 2.2.2 can now be used, we still rely on the dtree
file from libdclass-data 2.0.14 (i.e.: the dtree file in version
1.13), due significant changes in the patterns of newer dtree files.

Change-Id: I3621ed24a83fe8cfdc431e74c3867e7b92b5603c
---
M README.md
M kraken-dclass/pom.xml
A kraken-dclass/src/main/java/dclass/dClass.java
D 
kraken-dclass/src/main/java/org/wikimedia/analytics/dclassjni/DclassWrapper.java
M 
kraken-dclass/src/main/java/org/wikimedia/analytics/dclassjni/DeviceClassification.java
D 
kraken-dclass/src/test/java/org/wikimedia/analytics/dclassjni/DclassLoaderTest.java
A 
kraken-dclass/src/test/java/org/wikimedia/analytics/dclassjni/DclassWrapperTest.java
A 
kraken-dclass/src/test/java/org/wikimedia/analytics/dclassjni/DeviceClassificationTest.java
8 files changed, 229 insertions(+), 181 deletions(-)

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



diff --git a/README.md b/README.md
index ddde037..b2f04e4 100644
--- a/README.md
+++ b/README.md
@@ -38,7 +38,7 @@
 
 ### Debian-like systems
 
-If your an a Debian system, you can probably just grab the most recent .deb 
files of libdclass0 and libdclassjni0 for your architecture from 
[garage-coding](http://garage-coding.com/releases/libdclass-dev/) and install 
them using dpkg and can proceed to the next step.
+If your an a Debian system, you can probably just grab the most recent .deb 
files of libdclass0 and libdclass-jni for your architecture from [Wikimedia's 
apt repository](http://apt.wikimedia.org/wikimedia/pool/main/d/dclass/) and 
install them using dpkg and can proceed to the next step.
 
 ### Non-Debian-like systems
 
@@ -46,7 +46,7 @@
 
  Getting files by hand
 
-For an amd64 system with the most recent version being 2.0.14,
+For an amd64 system with the most recent version being 2.2.0,
 that would be:
 
 mkdir dclass
@@ -54,19 +54,19 @@
 
 mkdir libdclass0
 cd libdclass0
-wget 
http://garage-coding.com/releases/libdclass-dev/libdclass0_2.0.14_amd64.deb
-ar x libdclass0_2.0.14_amd64.deb
+wget 
http://apt.wikimedia.org/wikimedia/pool/main/d/dclass/libdclass0_2.2.2-1_amd64.deb
+ar x libdclass0_2.2.2-1_amd64.deb
 tar -xzvf data.tar.gz
-sudo mv usr/lib/libdclass.so.0.0.0 /usr/lib/libdclass.so.0
+sudo mv usr/lib/x86_64-linux-gnu/libdclass.so.0.0.0 /usr/lib/libdclass.so.0
 sudo chmod +x /usr/lib/libdclass.so.0
 cd ..
 
-mkdir libdclassjni0
-cd libdclassjni0
-wget 
http://garage-coding.com/releases/libdclass-dev/libdclassjni0_2.0.14_amd64.deb
-ar x libdclassjni0_2.0.14_amd64.deb
+mkdir libdclass-jni
+cd libdclass-jni
+wget 
http://apt.wikimedia.org/wikimedia/pool/main/d/dclass/libdclass-jni_2.2.2-1_amd64.deb
+ar x libdclass-jni_2.2.2-1_amd64.deb
 tar -xzvf data.tar.gz
-sudo mv usr/lib/libdclassjni.so.0.0.0 /usr/lib/libdclassjni.so
+sudo mv usr/lib/x86_64-linux-gnu/jni/libdclassjni.so.0.0.0 
/usr/lib/libdclassjni.so
 sudo chmod +x /usr/lib/libdclassjni.so
 cd ..
 
@@ -104,9 +104,9 @@
 
 ## openddr.dtree file
 
-Get a openddr.dtree file from an [Analytics Team 
member](http://www.mediawiki.org/wiki/Analytics), and store it as
+Get a openddr.dtree file (version 1.13) from an [Analytics Team 
member](http://www.mediawiki.org/wiki/Analytics), and store it as
 
-/usr/share/libdclass/dtrees/openddr.dtree
+/usr/share/libdclass/openddr.dtree
 
 ## GeoIP files
 
diff --git a/kraken-dclass/pom.xml b/kraken-dclass/pom.xml
index f91dab5..cf755d8 100644
--- a/kraken-dclass/pom.xml
+++ b/kraken-dclass/pom.xml
@@ -17,13 +17,6 @@
 /parent
 
 dependencies
-!--
-dependency
-groupIdorg.apache.devicemap/groupId
-artifactIdopenddr-java/artifactId
-version0.9.9-SNAPSHOT/version
-/dependency
---
 /dependencies
 
 properties
diff --git a/kraken-dclass/src/main/java/dclass/dClass.java 
b/kraken-dclass/src/main/java/dclass/dClass.java
new file mode 100644
index 000..bee86b7
--- /dev/null
+++ b/kraken-dclass/src/main/java/dclass/dClass.java
@@ -0,0 +1,144 @@
+/**
+ * Copyright (C) 2012-2013  Wikimedia Foundation
+
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with 

[MediaWiki-commits] [Gerrit] Add a parserTest documenting interaction of tabs and preform... - change (mediawiki/core)

2013-08-16 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Add a parserTest documenting interaction of tabs and 
preformatted text.
..


Add a parserTest documenting interaction of tabs and preformatted text.

Tabs are apparently used this way on the front page of plwiki.

Change-Id: I0a65d5a9783071e91696ed2b96887f44199a999d
---
M tests/parser/parserTests.txt
1 file changed, 16 insertions(+), 0 deletions(-)

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



diff --git a/tests/parser/parserTests.txt b/tests/parser/parserTests.txt
index 91fabb7..751ec41 100644
--- a/tests/parser/parserTests.txt
+++ b/tests/parser/parserTests.txt
@@ -1311,6 +1311,22 @@
 !! end
 
 !! test
+Tabs don't trigger preformatted text
+!! input
+   This is not
+preformatted text.
+ This is preformatted text.
+   So is this.
+!! result
+pThis is not
+preformatted text.
+/p
+preThis is preformatted text.
+   So is this.
+/pre
+!! end
+
+!! test
 Ident preformatting with inline content
 !! input
  a

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0a65d5a9783071e91696ed2b96887f44199a999d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Cscott canan...@wikimedia.org
Gerrit-Reviewer: Cscott canan...@wikimedia.org
Gerrit-Reviewer: Subramanya Sastry ssas...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Bug 52856: Fix the thank button - change (mediawiki...MobileFrontend)

2013-08-16 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Bug 52856: Fix the thank button
..


Bug 52856: Fix the thank button

Doesn't pass the revision. Doh.

Change-Id: I04061da6ffee7268d5fc07596256d79c24c4e74d
---
M javascripts/modules/thanks.js
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/javascripts/modules/thanks.js b/javascripts/modules/thanks.js
index 7fad52e..339a378 100644
--- a/javascripts/modules/thanks.js
+++ b/javascripts/modules/thanks.js
@@ -47,7 +47,7 @@
.on( 'click', function() {
var $thankLink = $( this ),
name = $user.data( 'user-name' 
),
-   rev = $user.data( 'user-id' ),
+   rev = $user.data( 'revision-id' 
),
gender = $user.data( 
'user-gender' );
 
if ( !$thankLink.hasClass( 'thanked' ) 
) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I04061da6ffee7268d5fc07596256d79c24c4e74d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson jrob...@wikimedia.org
Gerrit-Reviewer: JGonera jgon...@wikimedia.org
Gerrit-Reviewer: Kaldari rkald...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Fix expected output of parser test added in commit 51b12086. - change (mediawiki...Parsoid)

2013-08-16 Thread Cscott (Code Review)
Cscott has uploaded a new change for review.

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


Change subject: Fix expected output of parser test added in commit 51b12086.
..

Fix expected output of parser test added in commit 51b12086.

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


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

diff --git a/js/tests/parserTests.txt b/js/tests/parserTests.txt
index 2d45ad9..d997df2 100644
--- a/js/tests/parserTests.txt
+++ b/js/tests/parserTests.txt
@@ -1664,7 +1664,7 @@
 !! end
 
 !! test
-Templates: Don't strip whitespace from positional-param values (PHP parser)
+Templates: Don't strip whitespace from positional-param values
 !! options
 !! input
 {{echo|a }}
@@ -1687,13 +1687,13 @@
  }}g
 !! result
 pa 
-/ppb  
+/ppb 
 /p
 prec 
 /pre
 pbr /
 /p
-pred 
+pred
 /pre
 pbr /
 /p

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3676b340db891eefdfb856178395be34c180aea0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Parsoid
Gerrit-Branch: master
Gerrit-Owner: Cscott canan...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Fix expected output of parser test added in commit 51b12086. - change (mediawiki...Parsoid)

2013-08-16 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Fix expected output of parser test added in commit 51b12086.
..


Fix expected output of parser test added in commit 51b12086.

Change-Id: I3676b340db891eefdfb856178395be34c180aea0
---
M js/tests/parserTests-blacklist.js
M js/tests/parserTests.txt
2 files changed, 5 insertions(+), 5 deletions(-)

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



diff --git a/js/tests/parserTests-blacklist.js 
b/js/tests/parserTests-blacklist.js
index 2307d95..c7ce45a 100644
--- a/js/tests/parserTests-blacklist.js
+++ b/js/tests/parserTests-blacklist.js
@@ -51,7 +51,7 @@
 add(wt2html, Templates: Indent-Pre: 1b. Templates that break a line should 
suppress pre);
 add(wt2html, Templates: Indent-Pre: 1e. Wrapping should be based on 
expanded content);
 add(wt2html, Templates: Indent-Pre: 1f: Wrapping should be based on 
expanded content);
-add(wt2html, Templates: Don't strip whitespace from positional-param values 
(PHP parser));
+add(wt2html, Templates: Don't strip whitespace from positional-param 
values);
 add(wt2html, 2a. Indent-Pre and tables);
 add(wt2html, 2b. Indent-Pre and tables);
 add(wt2html, 2c. Indent-Pre and tables (bug 42252));
@@ -1286,7 +1286,7 @@
 add(html2wt, Templates: Indent-Pre: 1e. Wrapping should be based on 
expanded content);
 add(html2wt, Templates: Indent-Pre: 1f: Wrapping should be based on 
expanded content);
 add(html2wt, Templates: Strip leading and trailing whitespace from 
named-param values);
-add(html2wt, Templates: Don't strip whitespace from positional-param values 
(PHP parser));
+add(html2wt, Templates: Don't strip whitespace from positional-param 
values);
 add(html2wt, 1a. Indent-Pre and Comments);
 add(html2wt, 1b. Indent-Pre and Comments);
 add(html2wt, 1c. Indent-Pre and Comments);
diff --git a/js/tests/parserTests.txt b/js/tests/parserTests.txt
index 2d45ad9..d997df2 100644
--- a/js/tests/parserTests.txt
+++ b/js/tests/parserTests.txt
@@ -1664,7 +1664,7 @@
 !! end
 
 !! test
-Templates: Don't strip whitespace from positional-param values (PHP parser)
+Templates: Don't strip whitespace from positional-param values
 !! options
 !! input
 {{echo|a }}
@@ -1687,13 +1687,13 @@
  }}g
 !! result
 pa 
-/ppb  
+/ppb 
 /p
 prec 
 /pre
 pbr /
 /p
-pred 
+pred
 /pre
 pbr /
 /p

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3676b340db891eefdfb856178395be34c180aea0
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Parsoid
Gerrit-Branch: master
Gerrit-Owner: Cscott canan...@wikimedia.org
Gerrit-Reviewer: Subramanya Sastry ssas...@wikimedia.org
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 up with Parsoid parserTests. - change (mediawiki/core)

2013-08-16 Thread Cscott (Code Review)
Cscott has uploaded a new change for review.

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


Change subject: Sync up with Parsoid parserTests.
..

Sync up with Parsoid parserTests.

This now aligns with Parsoid commit bf60ad87877b573c9db813fe56f38842e2c52a3d

Change-Id: I9647d5010e06263a31970d8c168667af56c75b77
---
M tests/parser/parserTests.txt
1 file changed, 145 insertions(+), 40 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/53/79353/1

diff --git a/tests/parser/parserTests.txt b/tests/parser/parserTests.txt
index 74f4471..146f867 100644
--- a/tests/parser/parserTests.txt
+++ b/tests/parser/parserTests.txt
@@ -1629,66 +1629,82 @@
 /pre
 !!end
 
+#
+# Transclusion parameter whitespace stripping tests
+# Behavior is different for positional and named parameters
+#
 !! test
-Templates: Single-line variant of parameter whitespace stripping test
+Templates: Strip leading and trailing whitespace from named-param values
 !! input
-{{echo| a}}
+{{echo|1= a }}
 
-{{echo|1= a}}
-
-{{echo|{{echo| a
-
-{{echo|1={{echo| a
-!! result
-prea
-/pre
-pa
-/p
-prea
-/pre
-pa
-/p
-!! end
-
-!! test
-Templates: Strip whitespace from named parameters, but not positional ones
-!! input
-{{echo|
- foo}}
-
-{{echo|
-* foo}}
+{{echo|1= {{echo|b}} }}
 
 {{echo| 1 =
- foo}}
+ c }}
 
 {{echo| 1 =
-* foo}}
+* d
+}}
 !! result
-prefoo
-/pre
-pbr /
+pa
+/ppb
+/ppc
 /p
-ulli foo
-/li/ul
-pfoo
-/p
-ulli foo
+ulli d
 /li/ul
 
 !! end
 
 !! test
-Templates: Dont strip whitespace from whitespace/comment-only arguments
+Templates: Don't strip whitespace from positional-param values
+!! options
 !! input
-{{echo| }}
-{{echo|!--cmt--}}
-{{echo| !--cmt-- }}
+{{echo|a }}
+
+{{echo|{{echo|b}} }}
+
+{{echo| c 
+}}
+
+{{echo| {{echo|d}}
+}}
+
+{{echo|
+ e}}
+
+{{echo|
+* f}}
+
+{{echo|
+ }}g
 !! result
+pa 
+/ppb 
+/p
+prec 
+/pre
 pbr /
 /p
+pred
+/pre
+pbr /
+/p
+pree
+/pre
+pbr /
+/p
+ulli f
+/li/ul
+pbr /
+/p
+preg
+/pre
 !! end
 
+#
+# Transclusion parameter escaping tests
+#
 !! test
 Templates: Parsoid parameter escaping test 1
 !! options
@@ -2336,6 +2352,19 @@
 pthis text
 should be left alone
 /p
+!! end
+
+# Bug 52473
+!! test
+Definition Lists: Hacky use to indent tables (WS-insensitive)
+!! options
+parsoid
+!! input
+: {|
+|a
+|} 
+!! result
+dldd tabletrtda/td/tr/table /dd/dl
 !! end
 ## The PHP parser treats : items (dd) without a corresponding ; item (dt)
 ## as an empty dt item.  It also ignores all but the last ; when followed
@@ -4262,6 +4291,52 @@
 tdullia/li/ul/td
 /tr
 /table
+!! end
+
+!! test
+Parsoid: Round-trip tables directly followed by content (bug 51219)
+!! options
+parsoid=wt2html,wt2wt
+!! input
+{|
+|foo
+|} bar
+
+{|
+|baz
+|}bquux/b
+!! result
+tabletbody
+tr
+tdfoo/td/tr/tbody/table bar
+table
+tbody
+tr
+tdbaz/td/tr/tbody/tablebquux/b
+!! end
+
+!! test
+Parsoid: Default to a newline after tables in new content (bug 51219)
+!! options
+parsoid=html2wt
+!! input
+{|
+|-
+|foo
+|}
+nowiki /nowikibar
+{|
+|-
+|baz
+|}
+'''quux'''
+!! result
+tabletbody
+tr
+tdfoo/td/tr/tbody/table bar
+tabletbody
+tr
+tdbaz/td/tr/tbody/tablebquux/b
 !! end
 
 ###
@@ -17152,6 +17227,19 @@
 /body
 !!end
 
+## Currently the p-wrapper is fragile in how adds / removes transformations.
+## Having nested or stray pre tags results in the attempt to add duplicates,
+## causing an assertion fail. This test tries to prevent that situation.
+!!test
+Ensure ParagraphWrapper can deal with stray closing pre tags
+!!options
+parsoid=wt2html
+!!input
+plain text/pre
+!!result
+plain text
+!!end
+
 # -
 # The following section of tests are primarily to spec requirements
 # around serialization of new/edited content.
@@ -17186,6 +17274,23 @@
 # the test because this test is required to test serialization of
 # new content and preferred whitespace style.
 !! test
+Lists: Serialize correctly even when list content is wrapped in p-tags (like 
VE does)
+!! options
+parsoid=html2wt
+!! input
+
+* foo
+!! result
+ul
+lipfoo/p/li
+/ul
+!! end
+
+# Wacky -- the leading newline in input is required because
+# that is what the serializer emits. To be fixed. Not fixing
+# the test because this test is required to test serialization of
+# new content and preferred whitespace style.
+!! test
 Lists: Add space after bullets
 !! options
 parsoid=html2wt

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

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

[MediaWiki-commits] [Gerrit] Story 986: Log watchlist interactions - change (mediawiki...MobileFrontend)

2013-08-16 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Story 986: Log watchlist interactions
..


Story 986: Log watchlist interactions

Log various things around watchlist and diff view
activity

See: https://gerrit.wikimedia.org/r/76026

Change-Id: Ifd8b173c1851a01d61464547ffa382dfd1b9
---
M includes/Resources.php
M javascripts/common/application.js
A javascripts/loggingSchemas/watchlist.js
M javascripts/modules/mf-watchstar.js
A javascripts/specials/mobilediff.js
M javascripts/specials/watchlist.js
6 files changed, 76 insertions(+), 3 deletions(-)

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



diff --git a/includes/Resources.php b/includes/Resources.php
index 0f404a2..6fd95d3 100644
--- a/includes/Resources.php
+++ b/includes/Resources.php
@@ -654,6 +654,7 @@
),
'mobile.watchlist.scripts' = 
$wgMFMobileSpecialPageResourceScriptBoilerplate + array(
'scripts' = array(
+   'javascripts/loggingSchemas/watchlist.js',
'javascripts/specials/watchlist.js',
),
),
@@ -716,6 +717,16 @@
),
),
 
+   'mobile.mobilediff.scripts' = $wgMFMobileResourceBoilerplate + array(
+   'dependencies' = array(
+   'mobile.startup',
+   ),
+   'scripts' = array(
+   'javascripts/loggingSchemas/watchlist.js',
+   'javascripts/specials/mobilediff.js',
+   ),
+   ),
+
'mobile.mobilediff.scripts.beta' = $wgMFMobileResourceBoilerplate + 
array(
// should be no dependencies except mobile.head and position to 
top to avoid flash of unstyled content
'dependencies' = array(
diff --git a/javascripts/common/application.js 
b/javascripts/common/application.js
index dc5c9fc..1a427b2 100644
--- a/javascripts/common/application.js
+++ b/javascripts/common/application.js
@@ -230,7 +230,9 @@
// FIXME: sandbox from mf-application.js
function log( schemaName, data ) {
if ( mw.eventLog ) {
-   mw.eventLog.logEvent( schemaName, data );
+   return mw.eventLog.logEvent( schemaName, data );
+   } else {
+   return $.Deferred().reject( 'EventLogging not 
installed.' );
}
}
 
diff --git a/javascripts/loggingSchemas/watchlist.js 
b/javascripts/loggingSchemas/watchlist.js
new file mode 100644
index 000..1930c84
--- /dev/null
+++ b/javascripts/loggingSchemas/watchlist.js
@@ -0,0 +1,33 @@
+( function( M, $ ) {
+   var qs = window.location.search.substr( 1 ),
+   params = mw.mobileFrontend.deParam( qs );
+
+   M.define( 'loggingSchemas/watchlist', {
+   log: function( action, destination ) {
+   return M.log( 'MobileWatchlistInteraction', {
+   action: action,
+   userEditCount: parseInt( mw.config.get( 
'wgUserEditCount' ), 10 ),
+   watchlistview: params.watchlistview,
+   filter: params.filters,
+   destination: destination,
+   page: mw.config.get( 'wgTitle' ),
+   username: mw.config.get( 'wgUserName' ),
+   mobileMode: mw.config.get( 'wgMFMode' )
+   } );
+   },
+   hijackLink: function( selector, action ) {
+   var schema = this;
+   function linkHandler( ev ) {
+   var action = $( this ).data( 'action' ),
+   href = $( this ).attr( 'href' );
+   ev.preventDefault();
+   schema.log( action, href ).always( function() {
+   window.location.href = href;
+   } );
+   }
+   $( selector ).data( 'action', action ).
+   on( 'click', linkHandler );
+   }
+   } );
+
+} )( mw.mobileFrontend, jQuery );
diff --git a/javascripts/modules/mf-watchstar.js 
b/javascripts/modules/mf-watchstar.js
index 7229a35..fbabb6d 100644
--- a/javascripts/modules/mf-watchstar.js
+++ b/javascripts/modules/mf-watchstar.js
@@ -107,12 +107,14 @@
 
// FIXME change when micro.tap.js in stable
$( watchBtn ).on( mw.config.get( 'wgMFMode' ) === 'alpha' ? 
'tap' : 'click', function( ev ) {
+   var isWatched = $( watchBtn ).hasClass( 'watched' );
if( prevent ) {
ev.preventDefault();
}
prevent = true;
 

[MediaWiki-commits] [Gerrit] Story 920: Force upload CTA on beta - change (mediawiki...MobileFrontend)

2013-08-16 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Story 920: Force upload CTA on beta
..


Story 920: Force upload CTA on beta

Thus force the blue help screen and help us experiment
more with getting to a stage where people can login via
the upload CTA and not upload selfies.

(As requested by Maryana)

Change-Id: I17bc8673bd3612e4c76bdf3d9c857cc315cdc84d
---
M includes/skins/SkinMobileBeta.php
1 file changed, 7 insertions(+), 0 deletions(-)

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



diff --git a/includes/skins/SkinMobileBeta.php 
b/includes/skins/SkinMobileBeta.php
index f8aa8e9..c13fa3d 100644
--- a/includes/skins/SkinMobileBeta.php
+++ b/includes/skins/SkinMobileBeta.php
@@ -13,6 +13,13 @@
$out-addModuleStyles( 'mobile.styles.beta' );
}
 
+   public function getSkinConfigVariables() {
+   $vars = parent::getSkinConfigVariables();
+   // force cta on in beta
+   $vars['wgMFEnablePhotoUploadCTA'] = true;
+   return $vars;
+   }
+
public function getDefaultModules() {
$modules = parent::getDefaultModules();
$modules['beta'] = array( 'mobile.beta' );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I17bc8673bd3612e4c76bdf3d9c857cc315cdc84d
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson jrob...@wikimedia.org
Gerrit-Reviewer: JGonera jgon...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Render the list of categories as a normal subheading for log... - change (mediawiki...MobileFrontend)

2013-08-16 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Render the list of categories as a normal subheading for logged 
in mobile users.
..


Render the list of categories as a normal subheading for logged in mobile users.

Depends on Change-Id I09679ac8515768a34c1ee436dfd32a50c9a89011 on mediawiki/core

Bug: 22660
Change-Id: I13afda7037082cc0aab98f69d37b296b18edc1aa
---
M MobileFrontend.php
M includes/skins/MinervaTemplate.php
A includes/skins/MobileTemplateAlpha.php
M includes/skins/SkinMobileAlpha.php
4 files changed, 27 insertions(+), 2 deletions(-)

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



diff --git a/MobileFrontend.php b/MobileFrontend.php
index f9abcc3..db27bff 100644
--- a/MobileFrontend.php
+++ b/MobileFrontend.php
@@ -67,6 +67,7 @@
'MinervaTemplate' = 'skins/MinervaTemplate',
'MobileTemplate' = 'skins/MobileTemplate',
'MobileTemplateBeta' = 'skins/MobileTemplateBeta',
+   'MobileTemplateAlpha' = 'skins/MobileTemplateAlpha',
'MobileTemplateWML' = 'skins/MobileTemplateWML',
'SkinMinerva' = 'skins/SkinMinerva',
'SkinMobile' = 'skins/SkinMobile',
diff --git a/includes/skins/MinervaTemplate.php 
b/includes/skins/MinervaTemplate.php
index f3c4e50..ec91768 100644
--- a/includes/skins/MinervaTemplate.php
+++ b/includes/skins/MinervaTemplate.php
@@ -98,6 +98,10 @@
}
}
 
+   protected function renderMetaSections() {
+   $this-renderLanguages();
+   }
+
protected function renderContentWrapper( $data ) {
$isSpecialPage = $this-getSkin()-getTitle()-isSpecialPage();
?
@@ -111,7 +115,7 @@
div id=content class=content
?php
echo $data[ 'bodytext' ];
-   $this-renderLanguages();
+   $this-renderMetaSections();
$this-renderHistoryLink( $data );
?
/div
diff --git a/includes/skins/MobileTemplateAlpha.php 
b/includes/skins/MobileTemplateAlpha.php
new file mode 100644
index 000..11c1544
--- /dev/null
+++ b/includes/skins/MobileTemplateAlpha.php
@@ -0,0 +1,20 @@
+?php
+class MobileTemplateAlpha extends MobileTemplate {
+   protected function renderCategories() {
+   ?
+   div class=section
+   h2 class=section_heading 
id=section_categories
+   span?php $this-msg( 'categories' ) 
?/span
+   /h2
+   div class=content_block 
id=content_categories
+   ?php echo 
$this-getSkin()-getCategoryLinks( false /* don't render the heading */ ); ?
+   /div
+   /div
+   ?php
+   }
+
+   protected function renderMetaSections() {
+   $this-renderCategories();
+   parent::renderMetaSections();
+   }
+}
\ No newline at end of file
diff --git a/includes/skins/SkinMobileAlpha.php 
b/includes/skins/SkinMobileAlpha.php
index 31343f1..2b6eeda 100644
--- a/includes/skins/SkinMobileAlpha.php
+++ b/includes/skins/SkinMobileAlpha.php
@@ -1,7 +1,7 @@
 ?php
 
 class SkinMobileAlpha extends SkinMobileBeta {
-   public $template = 'MobileTemplateBeta';
+   public $template = 'MobileTemplateAlpha';
protected $mode = 'alpha';
 
protected function getSearchPlaceHolderText() {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I13afda7037082cc0aab98f69d37b296b18edc1aa
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Pypt shirshe...@gmail.com
Gerrit-Reviewer: Jdlrobson jrob...@wikimedia.org
Gerrit-Reviewer: Kaldari rkald...@wikimedia.org
Gerrit-Reviewer: MaxSem maxsem.w...@gmail.com
Gerrit-Reviewer: Pypt shirshe...@gmail.com
Gerrit-Reviewer: awjrichards aricha...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Build link-less images with span not a - change (mediawiki...VisualEditor)

2013-08-16 Thread Esanders (Code Review)
Esanders has uploaded a new change for review.

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


Change subject: Build link-less images with span not a
..

Build link-less images with span not a

toDataElement part fixed in  I6d496f7. This fixes the
toDomElement part so we don't trigger a round trip warning.

Bug: 51963
Change-Id: I27a7579890d669a8b980710db1bafe066b744236
---
M modules/ve-mw/dm/nodes/ve.dm.MWBlockImageNode.js
1 file changed, 9 insertions(+), 7 deletions(-)


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

diff --git a/modules/ve-mw/dm/nodes/ve.dm.MWBlockImageNode.js 
b/modules/ve-mw/dm/nodes/ve.dm.MWBlockImageNode.js
index 263cefd..2e76107 100644
--- a/modules/ve-mw/dm/nodes/ve.dm.MWBlockImageNode.js
+++ b/modules/ve-mw/dm/nodes/ve.dm.MWBlockImageNode.js
@@ -46,14 +46,14 @@
 ve.dm.MWBlockImageNode.static.toDataElement = function ( domElements, 
converter ) {
var $figure = $( domElements[0] ),
// images with link='' have a span wrapper instead
-   $wrapper = $figure.children( 'a,span' ).eq( 0 ),
-   $img = $wrapper.children( 'img' ).eq( 0 ),
+   $imgWrapper = $figure.children( 'a, span' ).eq( 0 ),
+   $img = $imgWrapper.children( 'img' ).eq( 0 ),
$caption = $figure.children( 'figcaption' ).eq( 0 ),
typeofAttr = $figure.attr( 'typeof' ),
classes = $figure.attr( 'class' ),
recognizedClasses = [],
attributes = {
-   href: $wrapper.attr( 'href' ) || '',
+   href: $imgWrapper.attr( 'href' ) || '',
src: $img.attr( 'src' ),
width: $img.attr( 'width' ),
height: $img.attr( 'height' ),
@@ -126,7 +126,7 @@
 ve.dm.MWBlockImageNode.static.toDomElements = function ( data, doc, converter 
) {
var dataElement = data[0],
figure = doc.createElement( 'figure' ),
-   a = doc.createElement( 'a' ),
+   imgWrapper = doc.createElement( dataElement.attributes.href !== 
'' ? 'a' : 'span' ),
img = doc.createElement( 'img' ),
wrapper = doc.createElement( 'div' ),
classes = [],
@@ -182,13 +182,15 @@
} else if ( classes.length  0 ) {
figure.className = classes.join( ' ' );
}
-   a.setAttribute( 'href', dataElement.attributes.href );
+   if ( dataElement.attributes.href !== '' ) {
+   imgWrapper.setAttribute( 'href', dataElement.attributes.href );
+   }
img.setAttribute( 'src', dataElement.attributes.src );
img.setAttribute( 'width', dataElement.attributes.width );
img.setAttribute( 'height', dataElement.attributes.height );
img.setAttribute( 'resource', dataElement.attributes.resource );
-   figure.appendChild( a );
-   a.appendChild( img );
+   figure.appendChild( imgWrapper );
+   imgWrapper.appendChild( img );
 
// If length of captionData is smaller or equal to 2 it means that 
there is no caption or that
// it is empty - in both cases we are going to skip appending 
figcaption.

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I27a7579890d669a8b980710db1bafe066b744236
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Esanders esand...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Build link-less images with span not a - change (mediawiki...VisualEditor)

2013-08-16 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Build link-less images with span not a
..


Build link-less images with span not a

toDataElement part fixed in  I6d496f7. This fixes the
toDomElement part so we don't trigger a round trip warning.

Bug: 51963
Change-Id: I27a7579890d669a8b980710db1bafe066b744236
---
M modules/ve-mw/dm/nodes/ve.dm.MWBlockImageNode.js
1 file changed, 9 insertions(+), 7 deletions(-)

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



diff --git a/modules/ve-mw/dm/nodes/ve.dm.MWBlockImageNode.js 
b/modules/ve-mw/dm/nodes/ve.dm.MWBlockImageNode.js
index 263cefd..2e76107 100644
--- a/modules/ve-mw/dm/nodes/ve.dm.MWBlockImageNode.js
+++ b/modules/ve-mw/dm/nodes/ve.dm.MWBlockImageNode.js
@@ -46,14 +46,14 @@
 ve.dm.MWBlockImageNode.static.toDataElement = function ( domElements, 
converter ) {
var $figure = $( domElements[0] ),
// images with link='' have a span wrapper instead
-   $wrapper = $figure.children( 'a,span' ).eq( 0 ),
-   $img = $wrapper.children( 'img' ).eq( 0 ),
+   $imgWrapper = $figure.children( 'a, span' ).eq( 0 ),
+   $img = $imgWrapper.children( 'img' ).eq( 0 ),
$caption = $figure.children( 'figcaption' ).eq( 0 ),
typeofAttr = $figure.attr( 'typeof' ),
classes = $figure.attr( 'class' ),
recognizedClasses = [],
attributes = {
-   href: $wrapper.attr( 'href' ) || '',
+   href: $imgWrapper.attr( 'href' ) || '',
src: $img.attr( 'src' ),
width: $img.attr( 'width' ),
height: $img.attr( 'height' ),
@@ -126,7 +126,7 @@
 ve.dm.MWBlockImageNode.static.toDomElements = function ( data, doc, converter 
) {
var dataElement = data[0],
figure = doc.createElement( 'figure' ),
-   a = doc.createElement( 'a' ),
+   imgWrapper = doc.createElement( dataElement.attributes.href !== 
'' ? 'a' : 'span' ),
img = doc.createElement( 'img' ),
wrapper = doc.createElement( 'div' ),
classes = [],
@@ -182,13 +182,15 @@
} else if ( classes.length  0 ) {
figure.className = classes.join( ' ' );
}
-   a.setAttribute( 'href', dataElement.attributes.href );
+   if ( dataElement.attributes.href !== '' ) {
+   imgWrapper.setAttribute( 'href', dataElement.attributes.href );
+   }
img.setAttribute( 'src', dataElement.attributes.src );
img.setAttribute( 'width', dataElement.attributes.width );
img.setAttribute( 'height', dataElement.attributes.height );
img.setAttribute( 'resource', dataElement.attributes.resource );
-   figure.appendChild( a );
-   a.appendChild( img );
+   figure.appendChild( imgWrapper );
+   imgWrapper.appendChild( img );
 
// If length of captionData is smaller or equal to 2 it means that 
there is no caption or that
// it is empty - in both cases we are going to skip appending 
figcaption.

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I27a7579890d669a8b980710db1bafe066b744236
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Esanders esand...@wikimedia.org
Gerrit-Reviewer: Catrope roan.katt...@gmail.com
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Alpha talk: Stop blank replying - change (mediawiki...MobileFrontend)

2013-08-16 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Alpha talk: Stop blank replying
..


Alpha talk: Stop blank replying

Ensure that some text needs to be entered

Change-Id: I1586f0567889b41194f6509df22e329c62d2eb94
---
M javascripts/modules/talk/TalkSectionOverlay.js
1 file changed, 34 insertions(+), 27 deletions(-)

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



diff --git a/javascripts/modules/talk/TalkSectionOverlay.js 
b/javascripts/modules/talk/TalkSectionOverlay.js
index 804e1bc..254ca56 100644
--- a/javascripts/modules/talk/TalkSectionOverlay.js
+++ b/javascripts/modules/talk/TalkSectionOverlay.js
@@ -14,40 +14,47 @@
info: mw.msg( 'mobile-frontend-talk-reply-info' )
},
postRender: function( options ) {
-   var self = this, $comment = this.$( '.comment' );
+   var self = this, $comment = this.$( '.comment' ),
+   $textarea = $comment.find( 'textarea' );
this._super( options );
this.$( '.loading' ).remove();
if ( !M.isLoggedIn() || mw.config.get( 'wgMFMode' ) !== 
'alpha' ) {
$comment.remove();
} else {
+   $textarea.on( 'focus', function() {
+   $textarea.removeClass( 'error' );
+   } );
$comment.find( 'button' ).on( 'click', 
function() {
-   var $textarea = self.$( 'textarea' ),
-   val = $textarea.val();
-   $comment.hide();
-   self.$( '.loading' ).show();
-   // sign and add newline to front
-   val = '\n\n' + val + ' ';
-   api.getToken().done( function( token ) {
-   api.post( {
-   action: 'edit',
-   title: options.title,
-   section: 
options.section.id,
-   token: token,
-   appendtext: val
-   } ).done( function( data ) {
-   self.$( '.loading' 
).hide();
-   $comment.show();
-   if ( data.error ) {
-   
$textarea.addClass( 'error' );
-   } else {
-   self.hide();
-   
self.parent.hide();
-   popup.show( 
mw.msg( 'mobile-frontend-talk-reply-success' ), 'toast' );
-   // invalidate 
the cache
-   
M.history.invalidateCachedPage( options.title );
-   }
+   var val = $textarea.val();
+   if ( val ) {
+   $comment.hide();
+   self.$( '.loading' ).show();
+   // sign and add newline to front
+   val = '\n\n' + val + ' ';
+   api.getToken().done( function( 
token ) {
+   api.post( {
+   action: 'edit',
+   title: 
options.title,
+   section: 
options.section.id,
+   token: token,
+   appendtext: val
+   } ).done( function( 
data ) {
+   self.$( 
'.loading' ).hide();
+   $comment.show();
+   if ( data.error 
) {
+   

[MediaWiki-commits] [Gerrit] Hygiene: Drop mf- prefix from less files - change (mediawiki...MobileFrontend)

2013-08-16 Thread Jdlrobson (Code Review)
Jdlrobson has uploaded a new change for review.

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


Change subject: Hygiene: Drop mf- prefix from less files
..

Hygiene: Drop mf- prefix from less files

Change-Id: Ic4d57de95a7b61b3c31bfbcbdccf5c9804aa3f2e
---
M includes/Resources.php
R less/actions/history.less
R less/common/buttons.less
M less/common/common-js.less
R less/common/common.less
M less/common/drawer.less
R less/common/enwp.less
R less/common/footer.less
R less/common/hacks.less
R less/common/navigation.less
M less/common/notifications.less
M less/common/overlays.less
M less/common/pageactions.less
M less/common/pagelist.less
R less/common/typography.less
M less/common/ui.less
M less/common/user.less
R less/mixins.less
M less/modules/editor.less
M less/modules/issues.less
M less/modules/languages.less
M less/modules/search.less
R less/modules/tables.less
M less/modules/talk.less
R less/modules/toggle.less
M less/modules/tutorials.less
M less/modules/uploads.less
R less/modules/watchstar.less
M less/specials/mobilediff.less
M less/specials/mobileoptions.less
M less/specials/nearby.less
M less/specials/notifications.less
M less/specials/search.less
M less/specials/uploads.less
M less/specials/userlogin.less
M less/specials/watchlist.less
R less/variables.less
R stylesheets/actions/history.css
D stylesheets/actions/mf-edit.css
M stylesheets/common/common-js.css
R stylesheets/common/common.css
R stylesheets/common/enwp.css
R stylesheets/common/footer.css
R stylesheets/common/hacks.css
R stylesheets/common/navigation.css
R stylesheets/common/typography.css
M stylesheets/modules/editor.css
R stylesheets/modules/references.css
R stylesheets/modules/tables.css
R stylesheets/modules/toggle.css
R stylesheets/modules/watchstar.css
51 files changed, 103 insertions(+), 241 deletions(-)


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

diff --git a/includes/Resources.php b/includes/Resources.php
index 0f404a2..375e9db 100644
--- a/includes/Resources.php
+++ b/includes/Resources.php
@@ -98,24 +98,24 @@
'mobile.styles.page' = $wgMFMobileResourceBoilerplate + array(
'dependencies' = array( 'mobile.startup' ),
'styles' = array(
-   'stylesheets/common/mf-enwp.css'
+   'stylesheets/common/enwp.css'
),
),
 
'mobile.styles' = $wgMFMobileResourceBoilerplate + array(
'styles' = array(
'stylesheets/externals/reset.css',
-   'stylesheets/common/mf-common.css',
+   'stylesheets/common/common.css',
'stylesheets/common/ui.css',
-   'stylesheets/common/mf-typography.css',
-   'stylesheets/common/mf-footer.css',
-   'stylesheets/modules/mf-toggle.css',
+   'stylesheets/common/typography.css',
+   'stylesheets/common/footer.css',
+   'stylesheets/modules/toggle.css',
'stylesheets/common/pagelist.css',
// FIXME: move to module mobile.stable.styles for some 
reason it breaks RTL when in that module
-   'stylesheets/common/mf-navigation.css',
+   'stylesheets/common/navigation.css',
'stylesheets/common/overlays.css',
'stylesheets/common/drawer.css',
-   'stylesheets/common/mf-hacks.css',
+   'stylesheets/common/hacks.css',
'stylesheets/common/pageactions.css',
),
'position' = 'top',
@@ -318,7 +318,7 @@
'styles' = array(
),
'scripts' = array(
-   'stylesheets/actions/mf-history.css',
+   'stylesheets/actions/history.css',
),
'group' = 'other',
),
@@ -352,7 +352,7 @@
'mobile-frontend-nearby-to-page',
),
'styles' = array(
-   'stylesheets/modules/mf-tables.css',
+   'stylesheets/modules/tables.css',
'stylesheets/modules/nearbypages.css',
),
'scripts' = array(
@@ -378,9 +378,9 @@
'stylesheets/common/common-js.css',
'stylesheets/modules/languages.css',
'stylesheets/modules/search.css',
-   'stylesheets/modules/mf-references.css',
+   'stylesheets/modules/references.css',
'stylesheets/modules/issues.css',
-   'stylesheets/modules/mf-watchstar.css',
+   'stylesheets/modules/watchstar.css',

[MediaWiki-commits] [Gerrit] Bug 52515: Correct reply message - change (mediawiki...MobileFrontend)

2013-08-16 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Bug 52515: Correct reply message
..


Bug 52515: Correct reply message

Change-Id: I3964a032cc2609d97eae0d416e95ee1a2db37948
---
M javascripts/modules/talk/TalkSectionOverlay.js
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/javascripts/modules/talk/TalkSectionOverlay.js 
b/javascripts/modules/talk/TalkSectionOverlay.js
index 254ca56..ef567b7 100644
--- a/javascripts/modules/talk/TalkSectionOverlay.js
+++ b/javascripts/modules/talk/TalkSectionOverlay.js
@@ -9,7 +9,7 @@
defaults: {
closeMsg: mw.msg( 'mobile-frontend-overlay-escape' ),
reply: mw.msg( 'mobile-frontend-talk-reply' ),
-   confirmMsg: mw.msg( 'mobile-frontend-editor-confirm' ),
+   confirmMsg: mw.msg( 'mobile-frontend-editor-save' ),
licenseMsg: mw.msg( 'mobile-frontend-editor-license' ),
info: mw.msg( 'mobile-frontend-talk-reply-info' )
},

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3964a032cc2609d97eae0d416e95ee1a2db37948
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson jrob...@wikimedia.org
Gerrit-Reviewer: JGonera jgon...@wikimedia.org
Gerrit-Reviewer: Jdlrobson jrob...@wikimedia.org
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: Sync parserTests with core. - change (mediawiki...Parsoid)

2013-08-16 Thread Cscott (Code Review)
Cscott has uploaded a new change for review.

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


Change subject: WIP: Sync parserTests with core.
..

WIP: Sync parserTests with core.

This matches upstream commit x.

The following bugs are related to the blacklist changes:
* Bug 6200, bug 52761: newlines and preformatted in blockquote
* Bug 52938: Tabs do not cause indent-pres, only spaces do
* Bug 49926: posessives and italics
* Bug 52762: lines with WS and comments only should be transparent to all

Change-Id: I5a8281a67e1978459a1f14dd4503ea1e497a8fe8
---
M js/tests/fetch-parserTests.txt.js
M js/tests/parserTests-blacklist.js
M js/tests/parserTests.txt
3 files changed, 177 insertions(+), 102 deletions(-)


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

diff --git a/js/tests/fetch-parserTests.txt.js 
b/js/tests/fetch-parserTests.txt.js
index a3426bc..f9c5684 100755
--- a/js/tests/fetch-parserTests.txt.js
+++ b/js/tests/fetch-parserTests.txt.js
@@ -10,9 +10,9 @@
 // and update these hashes automatically.
 //
 // You can use 'sha1sum -b tests/parser/parserTests.txt' to compute this value:
-var expectedSHA1 = 3aa4ff168f50d5a9981372ffcbb5b501c13e;
+var expectedSHA1 = 2900c9165e78a62167667f740fac1385fa450cfe;
 // git log --pretty=oneline -1 tests/parser/parserTests.txt
-var latestCommit = 9b22f7bc26f770e339bd9fa6b3542c84bb7723eb;
+var latestCommit = xx;
 
 var fs = require('fs'),
path = require('path'),
diff --git a/js/tests/parserTests-blacklist.js 
b/js/tests/parserTests-blacklist.js
index c7ce45a..ce2fa66 100644
--- a/js/tests/parserTests-blacklist.js
+++ b/js/tests/parserTests-blacklist.js
@@ -38,7 +38,8 @@
 add(wt2html, Extra newlines: More paragraphs with indented comment);
 add(wt2html, Extra newlines between heading and content are swallowed);
 add(wt2html, Italics and bold);
-add(wt2html, Italics and possessives);
+add(wt2html, Italics and possessives (1));
+add(wt2html, Italics and possessives (2));
 add(wt2html, Italicized possessive);
 add(wt2html, Non-word characters don't terminate tag names (bug 17663, 
40670, 52022));
 add(wt2html, Bare pipe character (bug 52363));
@@ -46,7 +47,7 @@
 add(wt2html, Entities inside nowiki);
 add(wt2html, Comment on its own line post-expand);
 add(wt2html, Comment on its own line post-expand with non-significant 
whitespace);
-add(wt2html, Bug 6200: Preformatted in blockquote);
+add(wt2html, Tabs don't trigger preformatted text);
 add(wt2html, Templates: Indent-Pre: 1a. Templates that break a line should 
suppress pre);
 add(wt2html, Templates: Indent-Pre: 1b. Templates that break a line should 
suppress pre);
 add(wt2html, Templates: Indent-Pre: 1e. Wrapping should be based on 
expanded content);
@@ -55,7 +56,6 @@
 add(wt2html, 2a. Indent-Pre and tables);
 add(wt2html, 2b. Indent-Pre and tables);
 add(wt2html, 2c. Indent-Pre and tables (bug 42252));
-add(wt2html, 3b. Indent-Pre and block tags (pre-content on separate line));
 add(wt2html, 4. Multiple spaces at start-of-line);
 add(wt2html, 6. Pre-blocks should extend across lines with leading WS even 
when there is no wrappable content);
 add(wt2html, Definition Lists: Nesting: Multi-level (Parsoid only));
@@ -84,7 +84,8 @@
 add(wt2html, Handling html with a div self-closing tag);
 add(wt2html, 2. Lists with start-of-line-transparent tokens before bullets: 
Template close);
 add(wt2html, List interrupted by empty line or heading);
-add(wt2html, Single-comment whitespace lines dont break lists, and so do 
multi-comment whitespace lines);
+add(wt2html, Single-comment whitespace lines dont break lists, and neither 
do multi-comment whitespace lines);
+add(wt2html, Replacing whitespace with tabs still doesn't break the list 
(gerrit 78327));
 add(wt2html, Test the li-hack\n(Cannot test this with PHP parser since it 
relies on Tidy for the hack));
 add(wt2html, Unclosed formatting tags that straddle lists are closed and 
reopened\n(Parsoid-only since php parser generates broken html -- relies on 
Tidy to fix up));
 add(wt2html, Magic Word: {{CURRENTMONTH1}});
@@ -414,6 +415,7 @@
 add(wt2html, anchorencode trims spaces);
 add(wt2html, anchorencode deals with links);
 add(wt2html, anchorencode encodes like the TOC generator: (bug 18431));
+add(wt2html, Bug 6200: blockquotes and paragraph formatting);
 add(wt2html, Parsing of overlapping (improperly nested) inline html tags 
(Parsoid));
 add(wt2html, Self-link in language variants);
 add(wt2html, Link to another existing title shouldn't be parsed as 
self-link even if it's a variant of this title);
@@ -534,7 +536,9 @@
 
 // Blacklist for wt2wt
 add(wt2wt, Italics and bold);
-add(wt2wt, Italics and possessives);
+add(wt2wt, Italics and possessives (1));
+add(wt2wt, Italics and possessives (2));
+add(wt2wt, Italics and possessives (3));
 add(wt2wt, Italics and bold: 2-quote opening sequence: (2,3));
 add(wt2wt, Italics and bold: 2-quote opening 

[MediaWiki-commits] [Gerrit] Remove symlinkis from 1.22wmf6 through 1.22wmf8 - change (operations/mediawiki-config)

2013-08-16 Thread Reedy (Code Review)
Reedy has uploaded a new change for review.

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


Change subject: Remove symlinkis from 1.22wmf6 through 1.22wmf8
..

Remove symlinkis from 1.22wmf6 through 1.22wmf8

Change-Id: Ia9d02f13f0ea54ff3e613f01325385a96355900d
---
D docroot/bits/static-1.22wmf6/extensions
D docroot/bits/static-1.22wmf6/resources
D docroot/bits/static-1.22wmf6/skins
D docroot/bits/static-1.22wmf7/extensions
D docroot/bits/static-1.22wmf7/resources
D docroot/bits/static-1.22wmf7/skins
D docroot/bits/static-1.22wmf8/extensions
D docroot/bits/static-1.22wmf8/resources
D docroot/bits/static-1.22wmf8/skins
D w/static-1.22wmf6/extensions
D w/static-1.22wmf6/resources
D w/static-1.22wmf6/skins
D w/static-1.22wmf7/extensions
D w/static-1.22wmf7/resources
D w/static-1.22wmf7/skins
D w/static-1.22wmf8/extensions
D w/static-1.22wmf8/resources
D w/static-1.22wmf8/skins
18 files changed, 0 insertions(+), 18 deletions(-)


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

diff --git a/docroot/bits/static-1.22wmf6/extensions 
b/docroot/bits/static-1.22wmf6/extensions
deleted file mode 12
index f05f9fc..000
--- a/docroot/bits/static-1.22wmf6/extensions
+++ /dev/null
@@ -1 +0,0 @@
-/usr/local/apache/common-local/php-1.22wmf6/extensions
\ No newline at end of file
diff --git a/docroot/bits/static-1.22wmf6/resources 
b/docroot/bits/static-1.22wmf6/resources
deleted file mode 12
index 5ed9e66..000
--- a/docroot/bits/static-1.22wmf6/resources
+++ /dev/null
@@ -1 +0,0 @@
-/usr/local/apache/common-local/php-1.22wmf6/resources
\ No newline at end of file
diff --git a/docroot/bits/static-1.22wmf6/skins 
b/docroot/bits/static-1.22wmf6/skins
deleted file mode 12
index 8750461..000
--- a/docroot/bits/static-1.22wmf6/skins
+++ /dev/null
@@ -1 +0,0 @@
-/usr/local/apache/common-local/php-1.22wmf6/skins/
\ No newline at end of file
diff --git a/docroot/bits/static-1.22wmf7/extensions 
b/docroot/bits/static-1.22wmf7/extensions
deleted file mode 12
index d573a6a..000
--- a/docroot/bits/static-1.22wmf7/extensions
+++ /dev/null
@@ -1 +0,0 @@
-/usr/local/apache/common-local/php-1.22wmf7/extensions
\ No newline at end of file
diff --git a/docroot/bits/static-1.22wmf7/resources 
b/docroot/bits/static-1.22wmf7/resources
deleted file mode 12
index 13f647e..000
--- a/docroot/bits/static-1.22wmf7/resources
+++ /dev/null
@@ -1 +0,0 @@
-/usr/local/apache/common-local/php-1.22wmf7/resources
\ No newline at end of file
diff --git a/docroot/bits/static-1.22wmf7/skins 
b/docroot/bits/static-1.22wmf7/skins
deleted file mode 12
index 26559fd..000
--- a/docroot/bits/static-1.22wmf7/skins
+++ /dev/null
@@ -1 +0,0 @@
-/usr/local/apache/common-local/php-1.22wmf7/skins/
\ No newline at end of file
diff --git a/docroot/bits/static-1.22wmf8/extensions 
b/docroot/bits/static-1.22wmf8/extensions
deleted file mode 12
index b2d6861..000
--- a/docroot/bits/static-1.22wmf8/extensions
+++ /dev/null
@@ -1 +0,0 @@
-/usr/local/apache/common-local/php-1.22wmf8/extensions
\ No newline at end of file
diff --git a/docroot/bits/static-1.22wmf8/resources 
b/docroot/bits/static-1.22wmf8/resources
deleted file mode 12
index 137d397..000
--- a/docroot/bits/static-1.22wmf8/resources
+++ /dev/null
@@ -1 +0,0 @@
-/usr/local/apache/common-local/php-1.22wmf8/resources
\ No newline at end of file
diff --git a/docroot/bits/static-1.22wmf8/skins 
b/docroot/bits/static-1.22wmf8/skins
deleted file mode 12
index 458eca7..000
--- a/docroot/bits/static-1.22wmf8/skins
+++ /dev/null
@@ -1 +0,0 @@
-/usr/local/apache/common-local/php-1.22wmf8/skins/
\ No newline at end of file
diff --git a/w/static-1.22wmf6/extensions b/w/static-1.22wmf6/extensions
deleted file mode 12
index f05f9fc..000
--- a/w/static-1.22wmf6/extensions
+++ /dev/null
@@ -1 +0,0 @@
-/usr/local/apache/common-local/php-1.22wmf6/extensions
\ No newline at end of file
diff --git a/w/static-1.22wmf6/resources b/w/static-1.22wmf6/resources
deleted file mode 12
index 5ed9e66..000
--- a/w/static-1.22wmf6/resources
+++ /dev/null
@@ -1 +0,0 @@
-/usr/local/apache/common-local/php-1.22wmf6/resources
\ No newline at end of file
diff --git a/w/static-1.22wmf6/skins b/w/static-1.22wmf6/skins
deleted file mode 12
index eb25bbc..000
--- a/w/static-1.22wmf6/skins
+++ /dev/null
@@ -1 +0,0 @@
-/usr/local/apache/common-local/php-1.22wmf6/skins
\ No newline at end of file
diff --git a/w/static-1.22wmf7/extensions b/w/static-1.22wmf7/extensions
deleted file mode 12
index d573a6a..000
--- a/w/static-1.22wmf7/extensions
+++ /dev/null
@@ -1 +0,0 @@
-/usr/local/apache/common-local/php-1.22wmf7/extensions
\ No newline at end of file
diff --git a/w/static-1.22wmf7/resources b/w/static-1.22wmf7/resources
deleted file mode 12
index 13f647e..000
--- a/w/static-1.22wmf7/resources
+++ /dev/null
@@ -1 +0,0 @@

[MediaWiki-commits] [Gerrit] Keep session data accross requests (even client ignores cook... - change (mediawiki...OAuth)

2013-08-16 Thread CSteipp (Code Review)
CSteipp has submitted this change and it was merged.

Change subject: Keep session data accross requests (even client ignores cookies)
..


Keep session data accross requests (even client ignores cookies)

Change-Id: Ie861487ad6768c7f702d107a9f325a2f6635edab
---
M api/MWOAuthAPI.setup.php
1 file changed, 13 insertions(+), 2 deletions(-)

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



diff --git a/api/MWOAuthAPI.setup.php b/api/MWOAuthAPI.setup.php
index 1e57e9a..e661eb8 100644
--- a/api/MWOAuthAPI.setup.php
+++ b/api/MWOAuthAPI.setup.php
@@ -81,6 +81,8 @@
 * @return boolean
 */
public static function onUserLoadFromSession( User $user, $result ) {
+   global $wgMemc;
+
$user-oAuthSessionData = array();
try {
$accesstoken = self::getOAuthAccessToken();
@@ -107,8 +109,17 @@
'accesstoken' = $accesstoken,
'rights' = 
MWOAuthUtils::getGrantRights( $access-get( 'grants' ) ),
);
-   // Setup a session for this OAuth user, so edit 
tokens work
-   wfSetupSession();
+   // Setup a session for this OAuth user, so edit 
tokens work.
+   // Preserve the session ID used so clients can 
ignore cookies.
+   $key = wfMemcKey( 'oauthsessionid', 
$access-get( 'id' ) );
+   $sessionId = $wgMemc-get( $key ) ?: 
MWCryptRand::generateHex( 32, true );
+   $wgMemc-set( $key, $sessionId, 3600 ); // 
create/renew
+   wfSetupSession( $sessionId ); // create/reuse 
this anonymous session
+   Hooks::register( 'AfterFinalPageOutput', 
function( $out ) {
+   // Just in case, make sure this is not 
a valid login session for sanity
+   
RequestContext::getMain()-getRequest()-setSessionData( 'wsUserName', null );
+   } );
+
$result = true;
}
} catch( ErrorPageError $ex ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie861487ad6768c7f702d107a9f325a2f6635edab
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/OAuth
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz asch...@wikimedia.org
Gerrit-Reviewer: CSteipp cste...@wikimedia.org
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 symlinkis from 1.22wmf6 through 1.22wmf8 - change (operations/mediawiki-config)

2013-08-16 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Remove symlinkis from 1.22wmf6 through 1.22wmf8
..


Remove symlinkis from 1.22wmf6 through 1.22wmf8

Change-Id: Ia9d02f13f0ea54ff3e613f01325385a96355900d
---
D docroot/bits/static-1.22wmf6/extensions
D docroot/bits/static-1.22wmf6/resources
D docroot/bits/static-1.22wmf6/skins
D docroot/bits/static-1.22wmf7/extensions
D docroot/bits/static-1.22wmf7/resources
D docroot/bits/static-1.22wmf7/skins
D docroot/bits/static-1.22wmf8/extensions
D docroot/bits/static-1.22wmf8/resources
D docroot/bits/static-1.22wmf8/skins
D w/static-1.22wmf6/extensions
D w/static-1.22wmf6/resources
D w/static-1.22wmf6/skins
D w/static-1.22wmf7/extensions
D w/static-1.22wmf7/resources
D w/static-1.22wmf7/skins
D w/static-1.22wmf8/extensions
D w/static-1.22wmf8/resources
D w/static-1.22wmf8/skins
18 files changed, 0 insertions(+), 18 deletions(-)

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



diff --git a/docroot/bits/static-1.22wmf6/extensions 
b/docroot/bits/static-1.22wmf6/extensions
deleted file mode 12
index f05f9fc..000
--- a/docroot/bits/static-1.22wmf6/extensions
+++ /dev/null
@@ -1 +0,0 @@
-/usr/local/apache/common-local/php-1.22wmf6/extensions
\ No newline at end of file
diff --git a/docroot/bits/static-1.22wmf6/resources 
b/docroot/bits/static-1.22wmf6/resources
deleted file mode 12
index 5ed9e66..000
--- a/docroot/bits/static-1.22wmf6/resources
+++ /dev/null
@@ -1 +0,0 @@
-/usr/local/apache/common-local/php-1.22wmf6/resources
\ No newline at end of file
diff --git a/docroot/bits/static-1.22wmf6/skins 
b/docroot/bits/static-1.22wmf6/skins
deleted file mode 12
index 8750461..000
--- a/docroot/bits/static-1.22wmf6/skins
+++ /dev/null
@@ -1 +0,0 @@
-/usr/local/apache/common-local/php-1.22wmf6/skins/
\ No newline at end of file
diff --git a/docroot/bits/static-1.22wmf7/extensions 
b/docroot/bits/static-1.22wmf7/extensions
deleted file mode 12
index d573a6a..000
--- a/docroot/bits/static-1.22wmf7/extensions
+++ /dev/null
@@ -1 +0,0 @@
-/usr/local/apache/common-local/php-1.22wmf7/extensions
\ No newline at end of file
diff --git a/docroot/bits/static-1.22wmf7/resources 
b/docroot/bits/static-1.22wmf7/resources
deleted file mode 12
index 13f647e..000
--- a/docroot/bits/static-1.22wmf7/resources
+++ /dev/null
@@ -1 +0,0 @@
-/usr/local/apache/common-local/php-1.22wmf7/resources
\ No newline at end of file
diff --git a/docroot/bits/static-1.22wmf7/skins 
b/docroot/bits/static-1.22wmf7/skins
deleted file mode 12
index 26559fd..000
--- a/docroot/bits/static-1.22wmf7/skins
+++ /dev/null
@@ -1 +0,0 @@
-/usr/local/apache/common-local/php-1.22wmf7/skins/
\ No newline at end of file
diff --git a/docroot/bits/static-1.22wmf8/extensions 
b/docroot/bits/static-1.22wmf8/extensions
deleted file mode 12
index b2d6861..000
--- a/docroot/bits/static-1.22wmf8/extensions
+++ /dev/null
@@ -1 +0,0 @@
-/usr/local/apache/common-local/php-1.22wmf8/extensions
\ No newline at end of file
diff --git a/docroot/bits/static-1.22wmf8/resources 
b/docroot/bits/static-1.22wmf8/resources
deleted file mode 12
index 137d397..000
--- a/docroot/bits/static-1.22wmf8/resources
+++ /dev/null
@@ -1 +0,0 @@
-/usr/local/apache/common-local/php-1.22wmf8/resources
\ No newline at end of file
diff --git a/docroot/bits/static-1.22wmf8/skins 
b/docroot/bits/static-1.22wmf8/skins
deleted file mode 12
index 458eca7..000
--- a/docroot/bits/static-1.22wmf8/skins
+++ /dev/null
@@ -1 +0,0 @@
-/usr/local/apache/common-local/php-1.22wmf8/skins/
\ No newline at end of file
diff --git a/w/static-1.22wmf6/extensions b/w/static-1.22wmf6/extensions
deleted file mode 12
index f05f9fc..000
--- a/w/static-1.22wmf6/extensions
+++ /dev/null
@@ -1 +0,0 @@
-/usr/local/apache/common-local/php-1.22wmf6/extensions
\ No newline at end of file
diff --git a/w/static-1.22wmf6/resources b/w/static-1.22wmf6/resources
deleted file mode 12
index 5ed9e66..000
--- a/w/static-1.22wmf6/resources
+++ /dev/null
@@ -1 +0,0 @@
-/usr/local/apache/common-local/php-1.22wmf6/resources
\ No newline at end of file
diff --git a/w/static-1.22wmf6/skins b/w/static-1.22wmf6/skins
deleted file mode 12
index eb25bbc..000
--- a/w/static-1.22wmf6/skins
+++ /dev/null
@@ -1 +0,0 @@
-/usr/local/apache/common-local/php-1.22wmf6/skins
\ No newline at end of file
diff --git a/w/static-1.22wmf7/extensions b/w/static-1.22wmf7/extensions
deleted file mode 12
index d573a6a..000
--- a/w/static-1.22wmf7/extensions
+++ /dev/null
@@ -1 +0,0 @@
-/usr/local/apache/common-local/php-1.22wmf7/extensions
\ No newline at end of file
diff --git a/w/static-1.22wmf7/resources b/w/static-1.22wmf7/resources
deleted file mode 12
index 13f647e..000
--- a/w/static-1.22wmf7/resources
+++ /dev/null
@@ -1 +0,0 @@
-/usr/local/apache/common-local/php-1.22wmf7/resources
\ No newline at 

[MediaWiki-commits] [Gerrit] re-organizing the return value of report nodes - change (analytics/wikimetrics)

2013-08-16 Thread Milimetric (Code Review)
Milimetric has uploaded a new change for review.

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


Change subject: re-organizing the return value of report nodes
..

re-organizing the return value of report nodes

Change-Id: Iea50bfc69841e9efe530fb1d92be27ffa8d20690
---
M tests/fixtures.py
M tests/test_models/test_report_response.py
M wikimetrics/controllers/reports.py
M wikimetrics/models/persistent_report.py
M wikimetrics/models/report_nodes/aggregate_report.py
D wikimetrics/models/report_nodes/concat_metrics_report.py
M wikimetrics/models/report_nodes/multi_project_metric_report.py
M wikimetrics/models/report_nodes/report.py
M wikimetrics/models/report_nodes/run_report.py
M wikimetrics/run.py
10 files changed, 192 insertions(+), 173 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/analytics/wikimetrics 
refs/changes/29/79429/1

diff --git a/tests/fixtures.py b/tests/fixtures.py
index 4f3da64..b24a02e 100644
--- a/tests/fixtures.py
+++ b/tests/fixtures.py
@@ -252,25 +252,25 @@
 report_created = PersistentReport(
 user_id=web_test_user.id,
 status=celery.states.PENDING,
-result_key=None,
+queue_result_key=None,
 show_in_ui=True
 )
 report_started = PersistentReport(
 user_id=web_test_user.id,
 status=celery.states.STARTED,
-result_key=None,
+queue_result_key=None,
 show_in_ui=True
 )
 report_started2 = PersistentReport(
 user_id=web_test_user.id,
 status=celery.states.STARTED,
-result_key=None,
+queue_result_key=None,
 show_in_ui=True
 )
 report_finished = PersistentReport(
 user_id=web_test_user.id,
 status=celery.states.SUCCESS,
-result_key=None,
+queue_result_key=None,
 show_in_ui=True
 )
 self.session.add_all([
diff --git a/tests/test_models/test_report_response.py 
b/tests/test_models/test_report_response.py
index 254ba56..f356b62 100644
--- a/tests/test_models/test_report_response.py
+++ b/tests/test_models/test_report_response.py
@@ -1,7 +1,10 @@
-from wikimetrics.models import Cohort, RunReport, MultiProjectMetricReport, 
Aggregation
+from nose.tools import assert_equals, assert_true
+from celery.exceptions import SoftTimeLimitExceeded
+from wikimetrics.models import (
+Cohort, RunReport, MultiProjectMetricReport, Aggregation, PersistentReport
+)
 from wikimetrics.metrics import NamespaceEdits
 from ..fixtures import QueueDatabaseTest
-from nose.tools import assert_equals, assert_true
 
 
 class RunReportTest(QueueDatabaseTest):
@@ -20,7 +23,7 @@
 },
 'metric': {
 'name': 'NamespaceEdits',
-'namespaces': [0,1,2],
+'namespaces': [0, 1, 2],
 'start_date': '2013-06-01',
 'end_date': '2013-09-01',
 'individualResults': True,
@@ -31,7 +34,12 @@
 },
 }]
 jr = RunReport(desired_responses, user_id=self.test_user_id)
-results = jr.task.delay(jr).get()[0]
+results = jr.task.delay(jr).get()
+result_key = self.session.query(PersistentReport)\
+.filter(PersistentReport.id == jr.children[0].persistent_id)\
+.one()\
+.result_key
+results = results[result_key]
 # TODO: figure out why one of the resulting wiki_user_ids is None here
 assert_equals(
 results[Aggregation.IND][0][self.test_mediawiki_user_id]['edits'],
@@ -46,7 +54,7 @@
 },
 'metric': {
 'name': 'NamespaceEdits',
-'namespaces': [0,1,2],
+'namespaces': [0, 1, 2],
 'start_date': '2013-06-01',
 'end_date': '2013-09-01',
 'individualResults': True,
@@ -57,7 +65,12 @@
 },
 }]
 jr = RunReport(desired_responses, user_id=self.test_user_id)
-results = jr.task.delay(jr).get()[0]
+results = jr.task.delay(jr).get()
+result_key = self.session.query(PersistentReport)\
+.filter(PersistentReport.id == jr.children[0].persistent_id)\
+.one()\
+.result_key
+results = results[result_key]
 assert_equals(
 results[Aggregation.IND][0][self.test_mediawiki_user_id]['edits'],
 2,
@@ -76,7 +89,7 @@
 },
 'metric': {
 'name': 'BytesAdded',
-'namespaces': [0,1,2],
+'namespaces': [0, 1, 2],
 'start_date': '2013-06-01',
 'end_date': '2013-09-01',
 'individualResults': True,
@@ -87,8 +100,12 @@
 },
 }]
 jr = RunReport(desired_responses, user_id=self.test_user_id)
-

[MediaWiki-commits] [Gerrit] re-organizing the return value of report nodes - change (analytics/wikimetrics)

2013-08-16 Thread Milimetric (Code Review)
Milimetric has submitted this change and it was merged.

Change subject: re-organizing the return value of report nodes
..


re-organizing the return value of report nodes

Change-Id: Iea50bfc69841e9efe530fb1d92be27ffa8d20690
---
M tests/fixtures.py
M tests/test_models/test_report_response.py
M wikimetrics/controllers/reports.py
M wikimetrics/models/persistent_report.py
M wikimetrics/models/report_nodes/aggregate_report.py
D wikimetrics/models/report_nodes/concat_metrics_report.py
M wikimetrics/models/report_nodes/multi_project_metric_report.py
M wikimetrics/models/report_nodes/report.py
M wikimetrics/models/report_nodes/run_report.py
M wikimetrics/run.py
10 files changed, 192 insertions(+), 173 deletions(-)

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



diff --git a/tests/fixtures.py b/tests/fixtures.py
index 4f3da64..b24a02e 100644
--- a/tests/fixtures.py
+++ b/tests/fixtures.py
@@ -252,25 +252,25 @@
 report_created = PersistentReport(
 user_id=web_test_user.id,
 status=celery.states.PENDING,
-result_key=None,
+queue_result_key=None,
 show_in_ui=True
 )
 report_started = PersistentReport(
 user_id=web_test_user.id,
 status=celery.states.STARTED,
-result_key=None,
+queue_result_key=None,
 show_in_ui=True
 )
 report_started2 = PersistentReport(
 user_id=web_test_user.id,
 status=celery.states.STARTED,
-result_key=None,
+queue_result_key=None,
 show_in_ui=True
 )
 report_finished = PersistentReport(
 user_id=web_test_user.id,
 status=celery.states.SUCCESS,
-result_key=None,
+queue_result_key=None,
 show_in_ui=True
 )
 self.session.add_all([
diff --git a/tests/test_models/test_report_response.py 
b/tests/test_models/test_report_response.py
index 254ba56..f356b62 100644
--- a/tests/test_models/test_report_response.py
+++ b/tests/test_models/test_report_response.py
@@ -1,7 +1,10 @@
-from wikimetrics.models import Cohort, RunReport, MultiProjectMetricReport, 
Aggregation
+from nose.tools import assert_equals, assert_true
+from celery.exceptions import SoftTimeLimitExceeded
+from wikimetrics.models import (
+Cohort, RunReport, MultiProjectMetricReport, Aggregation, PersistentReport
+)
 from wikimetrics.metrics import NamespaceEdits
 from ..fixtures import QueueDatabaseTest
-from nose.tools import assert_equals, assert_true
 
 
 class RunReportTest(QueueDatabaseTest):
@@ -20,7 +23,7 @@
 },
 'metric': {
 'name': 'NamespaceEdits',
-'namespaces': [0,1,2],
+'namespaces': [0, 1, 2],
 'start_date': '2013-06-01',
 'end_date': '2013-09-01',
 'individualResults': True,
@@ -31,7 +34,12 @@
 },
 }]
 jr = RunReport(desired_responses, user_id=self.test_user_id)
-results = jr.task.delay(jr).get()[0]
+results = jr.task.delay(jr).get()
+result_key = self.session.query(PersistentReport)\
+.filter(PersistentReport.id == jr.children[0].persistent_id)\
+.one()\
+.result_key
+results = results[result_key]
 # TODO: figure out why one of the resulting wiki_user_ids is None here
 assert_equals(
 results[Aggregation.IND][0][self.test_mediawiki_user_id]['edits'],
@@ -46,7 +54,7 @@
 },
 'metric': {
 'name': 'NamespaceEdits',
-'namespaces': [0,1,2],
+'namespaces': [0, 1, 2],
 'start_date': '2013-06-01',
 'end_date': '2013-09-01',
 'individualResults': True,
@@ -57,7 +65,12 @@
 },
 }]
 jr = RunReport(desired_responses, user_id=self.test_user_id)
-results = jr.task.delay(jr).get()[0]
+results = jr.task.delay(jr).get()
+result_key = self.session.query(PersistentReport)\
+.filter(PersistentReport.id == jr.children[0].persistent_id)\
+.one()\
+.result_key
+results = results[result_key]
 assert_equals(
 results[Aggregation.IND][0][self.test_mediawiki_user_id]['edits'],
 2,
@@ -76,7 +89,7 @@
 },
 'metric': {
 'name': 'BytesAdded',
-'namespaces': [0,1,2],
+'namespaces': [0, 1, 2],
 'start_date': '2013-06-01',
 'end_date': '2013-09-01',
 'individualResults': True,
@@ -87,8 +100,12 @@
 },
 }]
 jr = RunReport(desired_responses, user_id=self.test_user_id)
-results = jr.task.delay(jr).get()[0]
-print(results)
+ 

[MediaWiki-commits] [Gerrit] Bug 50603: Handle |{{echo|{{!}} Foo}} - change (mediawiki...Parsoid)

2013-08-16 Thread GWicke (Code Review)
GWicke has uploaded a new change for review.

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


Change subject: Bug 50603: Handle |{{echo|{{!}} Foo}}
..

Bug 50603: Handle |{{echo|{{!}} Foo}}

Add a DOM post-processor pass that fixes the handling of this test case:

{|
|{{echo|{{!}} Foo}}
|}

The first td is removed and the appropriate adjustments to the
transclusion-generated td are performed (DSR adjustment, data-mw updates).

Also add two test cases to verify wt2html, wt2wt and html2wt modes.

This is the first (and easier) part of bug 50603, the second part is still
TODO.

Change-Id: Ibb3fbfdaf71d2242d9b7c6ca0d9f1ab29f56e616
---
A js/lib/dom.t.TDFixups.js
M js/lib/mediawiki.DOMPostProcessor.js
M js/tests/parserTests.txt
3 files changed, 110 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Parsoid 
refs/changes/30/79430/1

diff --git a/js/lib/dom.t.TDFixups.js b/js/lib/dom.t.TDFixups.js
new file mode 100644
index 000..2b14ca7
--- /dev/null
+++ b/js/lib/dom.t.TDFixups.js
@@ -0,0 +1,80 @@
+var DU = require('./mediawiki.DOMUtils.js').DOMUtils;
+
+
+/**
+ * Strip the double td for this test case:
+ * |{{echo|{{!}} Foo}}
+ *
+ * See https://bugzilla.wikimedia.org/show_bug.cgi?id=50603
+ */
+function stripDoubleTDs (env, node) {
+   var nextNode = node.nextSibling;
+
+   /* Does `node` contain nothing or just non-newline whitespace? */
+   function nodeEssentiallyEmpty(node) {
+   var childNodes = node.childNodes;
+   if (0 === childNodes.length) {
+   return true;
+   } else if (childNodes.length  1) {
+   return false;
+   } else {
+   var child = childNodes[0];
+   return (child.nodeName === #text 
+   /^[ \t]*$/.test(child.nodeValue));
+   }
+   }
+
+   if (!DU.isLiteralHTMLNode(node) 
+   node.data.parsoid.autoInsertedEnd === true 
+   nextNode !== null 
+   nextNode.nodeName === 'TD' 
+   !DU.isLiteralHTMLNode(nextNode) 
+   DU.isTplElementNode(env, nextNode) 
+   nodeEssentiallyEmpty(node))
+   {
+   console.log(nextNode.outerHTML);
+   // Update the dsr. Since we are coalescing the first
+   // node with the second (or, more precisely, deleting
+   // the first node), we have to update the second DSR's
+   // starting point and start tag width.
+   var nodeDSR = node.data.parsoid.dsr,
+   nextNodeDSR = nextNode.data.parsoid.dsr;
+
+   if (nodeDSR  nextNodeDSR) {
+   nextNodeDSR[0] = nodeDSR[0];
+   }
+
+   // Now update data-mw
+   // XXX: use data.mw for data-mw as well!
+   var dataMW = DU.getJSONAttribute(nextNode, 'data-mw'),
+   nodeSrc = DU.getWTSource(env, node);
+   if (!dataMW.parts) {
+   dataMW.parts = [
+   nodeSrc,
+   {
+   template: {
+   target: dataMW.target,
+   params: dataMW.params,
+   i: 0
+   }
+   }
+   ];
+   dataMW.target = undefined;
+   dataMW.params = undefined;
+   } else {
+   dataMW.unshift(nodeSrc);
+   }
+   DU.setJSONAttribute(nextNode, 'data-mw', dataMW);
+
+   // Delete the duplicated td node.
+   node.parentNode.removeChild(node);
+   // This node was deleted, so don't continue processing on it.
+   return nextNode;
+   }
+
+   return true;
+}
+
+if (typeof module === object) {
+   module.exports.stripDoubleTDs = stripDoubleTDs;
+}
diff --git a/js/lib/mediawiki.DOMPostProcessor.js 
b/js/lib/mediawiki.DOMPostProcessor.js
index d06ffd2..962e983 100644
--- a/js/lib/mediawiki.DOMPostProcessor.js
+++ b/js/lib/mediawiki.DOMPostProcessor.js
@@ -10,7 +10,9 @@
wtc = require('./mediawiki.wikitext.constants.js'),
Consts = wtc.WikitextConstants,
Node = wtc.Node,
-   domino = require('./domino');
+   domino = require('./domino'),
+
+   TDFixups = require('./dom.t.TDFixups.js');
 
 // map from mediawiki metadata names to RDFa property names
 var metadataMap = {
@@ -3050,6 +3052,7 @@
var domVisitor2 = new DOMTraverser();
domVisitor2.addHandler( 'meta', stripMarkerMetas.bind(null, 
env.conf.parsoid.editMode) );
domVisitor2.addHandler( 'li', cleanUpLIHack.bind( null, env ) );
+   

  1   2   >