[MediaWiki-commits] [Gerrit] add map properties for set default to all map elements - change (mediawiki...MultiMaps)

2013-02-22 Thread Pastakhov (Code Review)
Pastakhov has uploaded a new change for review.

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


Change subject: add map properties for set default to all map elements
..

add map properties for set default to all map elements

* title
* text
* color
* weight
* opacity
* fillcolor
* fillopacity
* fill

Change-Id: I682e8893c3d31a66f37ced5ee5fff74ec2536bf4
---
M includes/BaseMapService.php
M services/Google/ext.google.js
2 files changed, 57 insertions(+), 12 deletions(-)


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

diff --git a/includes/BaseMapService.php b/includes/BaseMapService.php
index c067c45..8648446 100644
--- a/includes/BaseMapService.php
+++ b/includes/BaseMapService.php
@@ -127,7 +127,15 @@
'maxzoom',
'center',
'bounds',
+   'title',
+   'text',
'icon',
+   'color',
+   'weight',
+   'opacity',
+   'fillcolor',
+   'fillopacity',
+   'fill',
);
 
/**
@@ -255,7 +263,7 @@
 
$matches = array();
foreach ($param as $value) {
-   if( preg_match('/^\s*(\w+)\s*=(.+)$/s', $value, 
&$matches) ) {
+   if( preg_match('/^\s*(\w+)\s*=\s*(.+)\s*$/s', $value, 
&$matches) ) {
$name = strtolower($matches[1]);
if( array_search($name, 
$this->availableMapElements) !== false ) {
$this->addMapElement($name, 
$matches[2]);
diff --git a/services/Google/ext.google.js b/services/Google/ext.google.js
index 61ca486..20edeee 100644
--- a/services/Google/ext.google.js
+++ b/services/Google/ext.google.js
@@ -61,12 +61,7 @@
* @param {Object} properties Contains the fields lat, lon, 
title, text and icon
* @param {String} icon Global value for all icons
*/
-   this.addMarker = function (properties, icon) {
-   if( icon ) {
-   if( !properties.icon ) {
-   properties.icon = icon;
-   }
-   }
+   this.addMarker = function (properties) {
var value = 
this.convertPropertiesToGoogleOptions(properties);
value.options.position = new 
google.maps.LatLng(properties.pos[0].lat, properties.pos[0].lon);
value.options.map = this.map;
@@ -152,6 +147,48 @@
}
};
 
+   this.setDefaultOptions = function (elementname, elementoptions) 
{
+   if( options.title && !elementoptions.title ) {
+   elementoptions.title = options.title;
+   }
+   if( options.text && !elementoptions.text ) {
+   elementoptions.text = options.text;
+   }
+
+   switch( elementname ) {
+   case 'marker':
+   if( options.icon && 
!elementoptions.icon ) {
+   elementoptions.icon = 
options.icon;
+   }
+   break;
+   case 'polygon':
+   case 'circle':
+   case 'rectangle':
+   if( options.fillcolor && 
!elementoptions.fillcolor ) {
+   elementoptions.fillcolor = 
options.fillcolor;
+   }
+   if( options.fillopacity && 
!elementoptions.fillopacity ) {
+   elementoptions.fillopacity = 
options.fillopacity;
+   }
+   if( options.fill && 
!elementoptions.fill ) {
+   elementoptions.fill = 
options.fill;
+   }
+   // break is not necessary here
+   case 'line':
+   if( options.color && 
!elementoptions.color ) {
+   elementoptions.color = 
options.color;
+   }
+   if( options.weight && 
!elementoptions.weight ) {
+   elementoptions.weight = 
options.weight;
+   }
+   if( options.opacity && 
!elementoptions.opacity ) {
+

[MediaWiki-commits] [Gerrit] add map properties for set default to all map elements - change (mediawiki...MultiMaps)

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

Change subject: add map properties for set default to all map elements
..


add map properties for set default to all map elements

* title
* text
* color
* weight
* opacity
* fillcolor
* fillopacity
* fill

Change-Id: I682e8893c3d31a66f37ced5ee5fff74ec2536bf4
---
M includes/BaseMapService.php
M services/Google/ext.google.js
2 files changed, 57 insertions(+), 12 deletions(-)

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



diff --git a/includes/BaseMapService.php b/includes/BaseMapService.php
index c067c45..8648446 100644
--- a/includes/BaseMapService.php
+++ b/includes/BaseMapService.php
@@ -127,7 +127,15 @@
'maxzoom',
'center',
'bounds',
+   'title',
+   'text',
'icon',
+   'color',
+   'weight',
+   'opacity',
+   'fillcolor',
+   'fillopacity',
+   'fill',
);
 
/**
@@ -255,7 +263,7 @@
 
$matches = array();
foreach ($param as $value) {
-   if( preg_match('/^\s*(\w+)\s*=(.+)$/s', $value, 
&$matches) ) {
+   if( preg_match('/^\s*(\w+)\s*=\s*(.+)\s*$/s', $value, 
&$matches) ) {
$name = strtolower($matches[1]);
if( array_search($name, 
$this->availableMapElements) !== false ) {
$this->addMapElement($name, 
$matches[2]);
diff --git a/services/Google/ext.google.js b/services/Google/ext.google.js
index 61ca486..20edeee 100644
--- a/services/Google/ext.google.js
+++ b/services/Google/ext.google.js
@@ -61,12 +61,7 @@
* @param {Object} properties Contains the fields lat, lon, 
title, text and icon
* @param {String} icon Global value for all icons
*/
-   this.addMarker = function (properties, icon) {
-   if( icon ) {
-   if( !properties.icon ) {
-   properties.icon = icon;
-   }
-   }
+   this.addMarker = function (properties) {
var value = 
this.convertPropertiesToGoogleOptions(properties);
value.options.position = new 
google.maps.LatLng(properties.pos[0].lat, properties.pos[0].lon);
value.options.map = this.map;
@@ -152,6 +147,48 @@
}
};
 
+   this.setDefaultOptions = function (elementname, elementoptions) 
{
+   if( options.title && !elementoptions.title ) {
+   elementoptions.title = options.title;
+   }
+   if( options.text && !elementoptions.text ) {
+   elementoptions.text = options.text;
+   }
+
+   switch( elementname ) {
+   case 'marker':
+   if( options.icon && 
!elementoptions.icon ) {
+   elementoptions.icon = 
options.icon;
+   }
+   break;
+   case 'polygon':
+   case 'circle':
+   case 'rectangle':
+   if( options.fillcolor && 
!elementoptions.fillcolor ) {
+   elementoptions.fillcolor = 
options.fillcolor;
+   }
+   if( options.fillopacity && 
!elementoptions.fillopacity ) {
+   elementoptions.fillopacity = 
options.fillopacity;
+   }
+   if( options.fill && 
!elementoptions.fill ) {
+   elementoptions.fill = 
options.fill;
+   }
+   // break is not necessary here
+   case 'line':
+   if( options.color && 
!elementoptions.color ) {
+   elementoptions.color = 
options.color;
+   }
+   if( options.weight && 
!elementoptions.weight ) {
+   elementoptions.weight = 
options.weight;
+   }
+   if( options.opacity && 
!elementoptions.opacity ) {
+   el

[MediaWiki-commits] [Gerrit] [Scribunto] Add message to be ignored - change (translatewiki)

2013-02-22 Thread Raimond Spekking (Code Review)
Raimond Spekking has uploaded a new change for review.

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


Change subject: [Scribunto] Add message to be ignored
..

[Scribunto] Add message to be ignored

https://gerrit.wikimedia.org/r/#/c/50143/2/Scribunto.i18n.php,unified

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


  git pull ssh://gerrit.wikimedia.org:29418/translatewiki 
refs/changes/50/50350/1

diff --git a/groups/MediaWiki/mediawiki-defines.txt 
b/groups/MediaWiki/mediawiki-defines.txt
index 9894285..e57f354 100644
--- a/groups/MediaWiki/mediawiki-defines.txt
+++ b/groups/MediaWiki/mediawiki-defines.txt
@@ -1116,6 +1116,7 @@
 Scribunto
 magicfile = Scribunto/Scribunto.magic.php
 optional = scribunto-lua-backtrace-line
+ignored = scribunto-doc-subpage-show
 
 Search Extra NS
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibb6f043e78b6d48b950a4499427df9cc6b2fcf2d
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Raimond Spekking 

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


[MediaWiki-commits] [Gerrit] [Scribunto] Add message to be ignored - change (translatewiki)

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

Change subject: [Scribunto] Add message to be ignored
..


[Scribunto] Add message to be ignored

https://gerrit.wikimedia.org/r/#/c/50143/2/Scribunto.i18n.php,unified

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

Approvals:
  Raimond Spekking: Verified; Looks good to me, approved



diff --git a/groups/MediaWiki/mediawiki-defines.txt 
b/groups/MediaWiki/mediawiki-defines.txt
index 9894285..e57f354 100644
--- a/groups/MediaWiki/mediawiki-defines.txt
+++ b/groups/MediaWiki/mediawiki-defines.txt
@@ -1116,6 +1116,7 @@
 Scribunto
 magicfile = Scribunto/Scribunto.magic.php
 optional = scribunto-lua-backtrace-line
+ignored = scribunto-doc-subpage-show
 
 Search Extra NS
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibb6f043e78b6d48b950a4499427df9cc6b2fcf2d
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Raimond Spekking 
Gerrit-Reviewer: Raimond Spekking 

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


[MediaWiki-commits] [Gerrit] fix JSHint warning by use /*falls through*/ - change (mediawiki...MultiMaps)

2013-02-22 Thread Pastakhov (Code Review)
Pastakhov has uploaded a new change for review.

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


Change subject: fix JSHint warning by use /*falls through*/
..

fix JSHint warning by use /*falls through*/

Change-Id: I25b295d1b48875873c71d0d998caf5e5804a48e5
---
M services/Google/ext.google.js
1 file changed, 1 insertion(+), 0 deletions(-)


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

diff --git a/services/Google/ext.google.js b/services/Google/ext.google.js
index 20edeee..3b3523c 100644
--- a/services/Google/ext.google.js
+++ b/services/Google/ext.google.js
@@ -174,6 +174,7 @@
elementoptions.fill = 
options.fill;
}
// break is not necessary here
+   /*falls through*/
case 'line':
if( options.color && 
!elementoptions.color ) {
elementoptions.color = 
options.color;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I25b295d1b48875873c71d0d998caf5e5804a48e5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MultiMaps
Gerrit-Branch: master
Gerrit-Owner: Pastakhov 

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


[MediaWiki-commits] [Gerrit] fix JSHint warning by use /*falls through*/ - change (mediawiki...MultiMaps)

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

Change subject: fix JSHint warning by use /*falls through*/
..


fix JSHint warning by use /*falls through*/

Change-Id: I25b295d1b48875873c71d0d998caf5e5804a48e5
---
M services/Google/ext.google.js
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/services/Google/ext.google.js b/services/Google/ext.google.js
index 20edeee..3b3523c 100644
--- a/services/Google/ext.google.js
+++ b/services/Google/ext.google.js
@@ -174,6 +174,7 @@
elementoptions.fill = 
options.fill;
}
// break is not necessary here
+   /*falls through*/
case 'line':
if( options.color && 
!elementoptions.color ) {
elementoptions.color = 
options.color;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I25b295d1b48875873c71d0d998caf5e5804a48e5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MultiMaps
Gerrit-Branch: master
Gerrit-Owner: Pastakhov 
Gerrit-Reviewer: Pastakhov 
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 utf-8 decoding of client-side URLs - change (mediawiki...EventLogging)

2013-02-22 Thread Ori.livneh (Code Review)
Ori.livneh has uploaded a new change for review.

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


Change subject: Fix utf-8 decoding of client-side URLs
..

Fix utf-8 decoding of client-side URLs

Change-Id: I0f4ea76b911e572405bcfbde23be74d29f7fd783
---
M server/eventlogging/compat.py
M server/tests/test_parser.py
2 files changed, 15 insertions(+), 5 deletions(-)


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

diff --git a/server/eventlogging/compat.py b/server/eventlogging/compat.py
index 77742ff..746572e 100644
--- a/server/eventlogging/compat.py
+++ b/server/eventlogging/compat.py
@@ -12,6 +12,7 @@
 """
 # flake8: noqa
 # pylint: disable=E0611, F0401, E1101
+from __future__ import unicode_literals
 
 import functools
 import hashlib
@@ -37,7 +38,12 @@
 else:
 items = operator.methodcaller('iteritems')
 from urllib2 import urlopen
-from urllib import unquote
+from urllib import unquote as _unquote
+
+@functools.wraps(_unquote)
+def unquote(string):
+string = string.decode('string_escape')
+return _unquote(string).decode('utf-8')
 
 
 @functools.wraps(uuid.uuid5)
diff --git a/server/tests/test_parser.py b/server/tests/test_parser.py
index 1e00669..48ab0fa 100644
--- a/server/tests/test_parser.py
+++ b/server/tests/test_parser.py
@@ -6,6 +6,8 @@
   This module contains tests for :class:`eventlogging.LogParser`.
 
 """
+from __future__ import unicode_literals
+
 import calendar
 import datetime
 import unittest
@@ -26,15 +28,17 @@
 class LogParserTestCase(unittest.TestCase):
 """Test case for LogParser."""
 
+maxDiff = None
+
 def test_parse_client_side_events(self):
 """Parser test: client-side events (%q %l %n %t %h)."""
 parser = eventlogging.LogParser('%q %l %n %t %h')
 raw = ('?%7B%22wiki%22%3A%22testwiki%22%2C%22schema%22%3A%22Generic'
'%22%2C%22revision%22%3A13%2C%22clientValidated%22%3Atrue%2C'
'%22event%22%3A%7B%22articleId%22%3A1%2C%22articleTitle%22%3'
-   'A%22Main%20Page%22%7D%2C%22webHost%22%3A%22test.wikipedia.o'
-   'rg%22%7D; cp3022.esams.wikimedia.org 132073 2013-01-19T23:1'
-   '6:38 86.149.229.149')
+   'A%22H%C3%A9ctor%20Elizondo%22%7D%2C%22webHost%22%3A%22test.'
+   'wikipedia.org%22%7D; cp3022.esams.wikimedia.org 132073 2013'
+   '-01-19T23:16:38 86.149.229.149')
 parsed = {
 'recvFrom': 'cp3022.esams.wikimedia.org',
 'clientValidated': True,
@@ -46,7 +50,7 @@
 'schema': 'Generic',
 'revision': 13,
 'event': {
-'articleTitle': 'Main Page',
+'articleTitle': 'Héctor Elizondo',
 'articleId': 1
 }
 }

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

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

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


[MediaWiki-commits] [Gerrit] capsule_uuid: return hex string, not UUID obj - change (mediawiki...EventLogging)

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

Change subject: capsule_uuid: return hex string, not UUID obj
..


capsule_uuid: return hex string, not UUID obj

In Python 2, uuid.hex is bytes; in Python 3, unicode. It's a dynamic
descriptor, so it can't easily be overridden without getting clever. I thought
about it and decided I don't really like objects that wrap primitives anyhow.
Better to have capsule_uuid() return a unicode string containing the
hexadecimal representation of the UUID.

Change-Id: Ib91aa58449d685d9f31b42130f244edc631948e1
---
M server/eventlogging/jrm.py
M server/eventlogging/schema.py
M server/tests/test_schema.py
3 files changed, 4 insertions(+), 3 deletions(-)

Approvals:
  Ori.livneh: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/server/eventlogging/jrm.py b/server/eventlogging/jrm.py
index c586a65..fe6c5d2 100644
--- a/server/eventlogging/jrm.py
+++ b/server/eventlogging/jrm.py
@@ -170,7 +170,7 @@
 scid = (event['schema'], event['revision'])
 table = get_table(meta, scid)
 event = flatten(event)
-event['uuid'] = capsule_uuid(event).hex
+event['uuid'] = capsule_uuid(event)
 event = {k: v for k, v in items(event) if k not in NO_DB_PROPERTIES}
 return table.insert(values=event).execute()
 
diff --git a/server/eventlogging/schema.py b/server/eventlogging/schema.py
index 3576795..3c9d1c7 100644
--- a/server/eventlogging/schema.py
+++ b/server/eventlogging/schema.py
@@ -60,7 +60,8 @@
   `recvFrom`, `seqId`, and `timestamp`).
 
 """
-return uuid5(uuid.NAMESPACE_URL, EVENTLOGGING_URL_FORMAT % capsule)
+id = uuid5(uuid.NAMESPACE_URL, EVENTLOGGING_URL_FORMAT % capsule)
+return '%032x' % id.int
 
 
 def get_schema(scid, encapsulate=False):
diff --git a/server/tests/test_schema.py b/server/tests/test_schema.py
index 08d60e1..21c80c3 100644
--- a/server/tests/test_schema.py
+++ b/server/tests/test_schema.py
@@ -94,4 +94,4 @@
 def test_capsule_uuid(self):
 """capsule_uuid() generates a unique UUID for capsule objects."""
 self.assertEqual(eventlogging.capsule_uuid(self.event),
- uuid.UUID(hex='babb66f34a0a5de3be0c6513088be33e'))
+ 'babb66f34a0a5de3be0c6513088be33e')

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib91aa58449d685d9f31b42130f244edc631948e1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/EventLogging
Gerrit-Branch: master
Gerrit-Owner: Ori.livneh 
Gerrit-Reviewer: Mattflaschen 
Gerrit-Reviewer: Ori.livneh 
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 utf-8 decoding of client-side URLs - change (mediawiki...EventLogging)

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

Change subject: Fix utf-8 decoding of client-side URLs
..


Fix utf-8 decoding of client-side URLs

Change-Id: I0f4ea76b911e572405bcfbde23be74d29f7fd783
---
M server/eventlogging/compat.py
M server/tests/test_parser.py
2 files changed, 15 insertions(+), 5 deletions(-)

Approvals:
  Ori.livneh: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/server/eventlogging/compat.py b/server/eventlogging/compat.py
index 77742ff..746572e 100644
--- a/server/eventlogging/compat.py
+++ b/server/eventlogging/compat.py
@@ -12,6 +12,7 @@
 """
 # flake8: noqa
 # pylint: disable=E0611, F0401, E1101
+from __future__ import unicode_literals
 
 import functools
 import hashlib
@@ -37,7 +38,12 @@
 else:
 items = operator.methodcaller('iteritems')
 from urllib2 import urlopen
-from urllib import unquote
+from urllib import unquote as _unquote
+
+@functools.wraps(_unquote)
+def unquote(string):
+string = string.decode('string_escape')
+return _unquote(string).decode('utf-8')
 
 
 @functools.wraps(uuid.uuid5)
diff --git a/server/tests/test_parser.py b/server/tests/test_parser.py
index 1e00669..48ab0fa 100644
--- a/server/tests/test_parser.py
+++ b/server/tests/test_parser.py
@@ -6,6 +6,8 @@
   This module contains tests for :class:`eventlogging.LogParser`.
 
 """
+from __future__ import unicode_literals
+
 import calendar
 import datetime
 import unittest
@@ -26,15 +28,17 @@
 class LogParserTestCase(unittest.TestCase):
 """Test case for LogParser."""
 
+maxDiff = None
+
 def test_parse_client_side_events(self):
 """Parser test: client-side events (%q %l %n %t %h)."""
 parser = eventlogging.LogParser('%q %l %n %t %h')
 raw = ('?%7B%22wiki%22%3A%22testwiki%22%2C%22schema%22%3A%22Generic'
'%22%2C%22revision%22%3A13%2C%22clientValidated%22%3Atrue%2C'
'%22event%22%3A%7B%22articleId%22%3A1%2C%22articleTitle%22%3'
-   'A%22Main%20Page%22%7D%2C%22webHost%22%3A%22test.wikipedia.o'
-   'rg%22%7D; cp3022.esams.wikimedia.org 132073 2013-01-19T23:1'
-   '6:38 86.149.229.149')
+   'A%22H%C3%A9ctor%20Elizondo%22%7D%2C%22webHost%22%3A%22test.'
+   'wikipedia.org%22%7D; cp3022.esams.wikimedia.org 132073 2013'
+   '-01-19T23:16:38 86.149.229.149')
 parsed = {
 'recvFrom': 'cp3022.esams.wikimedia.org',
 'clientValidated': True,
@@ -46,7 +50,7 @@
 'schema': 'Generic',
 'revision': 13,
 'event': {
-'articleTitle': 'Main Page',
+'articleTitle': 'Héctor Elizondo',
 'articleId': 1
 }
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0f4ea76b911e572405bcfbde23be74d29f7fd783
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/EventLogging
Gerrit-Branch: master
Gerrit-Owner: Ori.livneh 
Gerrit-Reviewer: Ori.livneh 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Drop unused import - change (mediawiki...EventLogging)

2013-02-22 Thread Ori.livneh (Code Review)
Ori.livneh has uploaded a new change for review.

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


Change subject: Drop unused import
..

Drop unused import

Change-Id: I15d1eaf196488259649265402775c6f6cba44999
---
M server/tests/test_schema.py
1 file changed, 0 insertions(+), 1 deletion(-)


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

diff --git a/server/tests/test_schema.py b/server/tests/test_schema.py
index 21c80c3..56bebbb 100644
--- a/server/tests/test_schema.py
+++ b/server/tests/test_schema.py
@@ -15,7 +15,6 @@
 from __future__ import unicode_literals
 
 import unittest
-import uuid
 
 import eventlogging
 

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

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

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


[MediaWiki-commits] [Gerrit] Drop unused import - change (mediawiki...EventLogging)

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

Change subject: Drop unused import
..


Drop unused import

Change-Id: I15d1eaf196488259649265402775c6f6cba44999
---
M server/tests/test_schema.py
1 file changed, 0 insertions(+), 1 deletion(-)

Approvals:
  Ori.livneh: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/server/tests/test_schema.py b/server/tests/test_schema.py
index 21c80c3..56bebbb 100644
--- a/server/tests/test_schema.py
+++ b/server/tests/test_schema.py
@@ -15,7 +15,6 @@
 from __future__ import unicode_literals
 
 import unittest
-import uuid
 
 import eventlogging
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I15d1eaf196488259649265402775c6f6cba44999
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/EventLogging
Gerrit-Branch: master
Gerrit-Owner: Ori.livneh 
Gerrit-Reviewer: Ori.livneh 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] The first element may not be a marker, marker a default anyw... - change (mediawiki...MultiMaps)

2013-02-22 Thread Pastakhov (Code Review)
Pastakhov has uploaded a new change for review.

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


Change subject: The first element may not be a marker, marker a default anywhere
..

The first element may not be a marker, marker a default anywhere

Change-Id: If2385363c654c477b612bcd3f3bd0ce7c27e2392
---
M includes/BaseMapService.php
M tests/phpunit/services/Leaflet/LeafletTest.php
2 files changed, 12 insertions(+), 43 deletions(-)


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

diff --git a/includes/BaseMapService.php b/includes/BaseMapService.php
index 8648446..9fcf9c5 100644
--- a/includes/BaseMapService.php
+++ b/includes/BaseMapService.php
@@ -259,8 +259,6 @@
$this->reset();
}
 
-   $this->addElementMarker( array_shift($param) );
-
$matches = array();
foreach ($param as $value) {
if( preg_match('/^\s*(\w+)\s*=\s*(.+)\s*$/s', $value, 
&$matches) ) {
@@ -277,8 +275,8 @@
}
continue;
} else {
-   list($paramname) = explode('=', $value, 2);
-   $this->errormessages[] = \wfMessage( 
'multimaps-unknown-parameter', "$paramname" )->escaped();
+   // Default map element = 'marker'
+   $this->addMapElement('marker', $value);
}
}
}
diff --git a/tests/phpunit/services/Leaflet/LeafletTest.php 
b/tests/phpunit/services/Leaflet/LeafletTest.php
index cada5cd..0017e8d 100644
--- a/tests/phpunit/services/Leaflet/LeafletTest.php
+++ b/tests/phpunit/services/Leaflet/LeafletTest.php
@@ -108,14 +108,14 @@
 
public function testParsePolygons() {
$this->assertEquals(
-   \FormatJson::encode( $this->object->getMapData( 
array(' ', 
'polygons=62.103882522897855,5.09765625:58.309488840677645,5.712890625:58.95000823335702,10.8984375:61.68987220046001,12.83203125:63.35212928507874,11.865234375:64.1297836764257,13.974609375:65.58572002329473,14.326171875:68.56038368664157,18.28125:68.52823492039876,20.126953125:69.2249968541159,20.56640625:69.2249968541159,21.708984375:68.6245436634471,23.466796875:69.00567519658819,25.400390625:69.96043926902487,26.630859375:70.1403642720717,28.564453125:69.25614923150721,28.828125:69.83962194067463,31.201171875:70.75796562654924,29.8828125:71.10254274232307,25.576171875:70.72897946208789,22.67578125:69.99053495947653,18.10546875:67.84241647327927,13.095703125:68.33437594128185,15.908203125:63.704722429433225,9.4921875:63.782486031165014,8.61328125',
 'service=leaflet') ) ),
+   \FormatJson::encode( $this->object->getMapData( 
array('polygons=62.103882522897855,5.09765625:58.309488840677645,5.712890625:58.95000823335702,10.8984375:61.68987220046001,12.83203125:63.35212928507874,11.865234375:64.1297836764257,13.974609375:65.58572002329473,14.326171875:68.56038368664157,18.28125:68.52823492039876,20.126953125:69.2249968541159,20.56640625:69.2249968541159,21.708984375:68.6245436634471,23.466796875:69.00567519658819,25.400390625:69.96043926902487,26.630859375:70.1403642720717,28.564453125:69.25614923150721,28.828125:69.83962194067463,31.201171875:70.75796562654924,29.8828125:71.10254274232307,25.576171875:70.72897946208789,22.67578125:69.99053495947653,18.10546875:67.84241647327927,13.095703125:68.33437594128185,15.908203125:63.704722429433225,9.4921875:63.782486031165014,8.61328125',
 'service=leaflet') ) ),

'{"polygons":[{"pos":[{"lat":62.103882522898,"lon":5.09765625},{"lat":58.309488840678,"lon":5.712890625},{"lat":58.950008233357,"lon":10.8984375},{"lat":61.68987220046,"lon":12.83203125},{"lat":63.352129285079,"lon":11.865234375},{"lat":64.129783676426,"lon":13.974609375},{"lat":65.585720023295,"lon":14.326171875},{"lat":68.560383686642,"lon":18.28125},{"lat":68.528234920399,"lon":20.126953125},{"lat":69.224996854116,"lon":20.56640625},{"lat":69.224996854116,"lon":21.708984375},{"lat":68.624543663447,"lon":23.466796875},{"lat":69.005675196588,"lon":25.400390625},{"lat":69.960439269025,"lon":26.630859375},{"lat":70.140364272072,"lon":28.564453125},{"lat":69.256149231507,"lon":28.828125},{"lat":69.839621940675,"lon":31.201171875},{"lat":70.757965626549,"lon":29.8828125},{"lat":71.102542742323,"lon":25.576171875},{"lat":70.728979462088,"lon":22.67578125},{"lat":69.990534959477,"lon":18.10546875},{"lat":67.842416473279,"lon":13.095703125},{"lat":68.334375941282,"lon":15.908203125},{"lat":63.704722429433,"lon":9.4921875},{"lat":63.782486031165,"lon":8.61328125}]}],"bounds":{"ne":{"lat":71.102542742323,"lon":31.201171875},"sw":{"lat":58.309488840678,"lon":5.09765625}}}'
);
}
 
publi

[MediaWiki-commits] [Gerrit] The first element may not be a marker, marker a default anyw... - change (mediawiki...MultiMaps)

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

Change subject: The first element may not be a marker, marker a default anywhere
..


The first element may not be a marker, marker a default anywhere

Change-Id: If2385363c654c477b612bcd3f3bd0ce7c27e2392
---
M includes/BaseMapService.php
M tests/phpunit/services/Leaflet/LeafletTest.php
2 files changed, 12 insertions(+), 43 deletions(-)

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



diff --git a/includes/BaseMapService.php b/includes/BaseMapService.php
index 8648446..9fcf9c5 100644
--- a/includes/BaseMapService.php
+++ b/includes/BaseMapService.php
@@ -259,8 +259,6 @@
$this->reset();
}
 
-   $this->addElementMarker( array_shift($param) );
-
$matches = array();
foreach ($param as $value) {
if( preg_match('/^\s*(\w+)\s*=\s*(.+)\s*$/s', $value, 
&$matches) ) {
@@ -277,8 +275,8 @@
}
continue;
} else {
-   list($paramname) = explode('=', $value, 2);
-   $this->errormessages[] = \wfMessage( 
'multimaps-unknown-parameter', "$paramname" )->escaped();
+   // Default map element = 'marker'
+   $this->addMapElement('marker', $value);
}
}
}
diff --git a/tests/phpunit/services/Leaflet/LeafletTest.php 
b/tests/phpunit/services/Leaflet/LeafletTest.php
index cada5cd..0017e8d 100644
--- a/tests/phpunit/services/Leaflet/LeafletTest.php
+++ b/tests/phpunit/services/Leaflet/LeafletTest.php
@@ -108,14 +108,14 @@
 
public function testParsePolygons() {
$this->assertEquals(
-   \FormatJson::encode( $this->object->getMapData( 
array(' ', 
'polygons=62.103882522897855,5.09765625:58.309488840677645,5.712890625:58.95000823335702,10.8984375:61.68987220046001,12.83203125:63.35212928507874,11.865234375:64.1297836764257,13.974609375:65.58572002329473,14.326171875:68.56038368664157,18.28125:68.52823492039876,20.126953125:69.2249968541159,20.56640625:69.2249968541159,21.708984375:68.6245436634471,23.466796875:69.00567519658819,25.400390625:69.96043926902487,26.630859375:70.1403642720717,28.564453125:69.25614923150721,28.828125:69.83962194067463,31.201171875:70.75796562654924,29.8828125:71.10254274232307,25.576171875:70.72897946208789,22.67578125:69.99053495947653,18.10546875:67.84241647327927,13.095703125:68.33437594128185,15.908203125:63.704722429433225,9.4921875:63.782486031165014,8.61328125',
 'service=leaflet') ) ),
+   \FormatJson::encode( $this->object->getMapData( 
array('polygons=62.103882522897855,5.09765625:58.309488840677645,5.712890625:58.95000823335702,10.8984375:61.68987220046001,12.83203125:63.35212928507874,11.865234375:64.1297836764257,13.974609375:65.58572002329473,14.326171875:68.56038368664157,18.28125:68.52823492039876,20.126953125:69.2249968541159,20.56640625:69.2249968541159,21.708984375:68.6245436634471,23.466796875:69.00567519658819,25.400390625:69.96043926902487,26.630859375:70.1403642720717,28.564453125:69.25614923150721,28.828125:69.83962194067463,31.201171875:70.75796562654924,29.8828125:71.10254274232307,25.576171875:70.72897946208789,22.67578125:69.99053495947653,18.10546875:67.84241647327927,13.095703125:68.33437594128185,15.908203125:63.704722429433225,9.4921875:63.782486031165014,8.61328125',
 'service=leaflet') ) ),

'{"polygons":[{"pos":[{"lat":62.103882522898,"lon":5.09765625},{"lat":58.309488840678,"lon":5.712890625},{"lat":58.950008233357,"lon":10.8984375},{"lat":61.68987220046,"lon":12.83203125},{"lat":63.352129285079,"lon":11.865234375},{"lat":64.129783676426,"lon":13.974609375},{"lat":65.585720023295,"lon":14.326171875},{"lat":68.560383686642,"lon":18.28125},{"lat":68.528234920399,"lon":20.126953125},{"lat":69.224996854116,"lon":20.56640625},{"lat":69.224996854116,"lon":21.708984375},{"lat":68.624543663447,"lon":23.466796875},{"lat":69.005675196588,"lon":25.400390625},{"lat":69.960439269025,"lon":26.630859375},{"lat":70.140364272072,"lon":28.564453125},{"lat":69.256149231507,"lon":28.828125},{"lat":69.839621940675,"lon":31.201171875},{"lat":70.757965626549,"lon":29.8828125},{"lat":71.102542742323,"lon":25.576171875},{"lat":70.728979462088,"lon":22.67578125},{"lat":69.990534959477,"lon":18.10546875},{"lat":67.842416473279,"lon":13.095703125},{"lat":68.334375941282,"lon":15.908203125},{"lat":63.704722429433,"lon":9.4921875},{"lat":63.782486031165,"lon":8.61328125}]}],"bounds":{"ne":{"lat":71.102542742323,"lon":31.201171875},"sw":{"lat":58.309488840678,"lon":5.09765625}}}'
);
}
 
public function testParseOneRectangle() {

[MediaWiki-commits] [Gerrit] (bug 35341): 'user' icon in SVG with cross-browser fallback - change (mediawiki/core)

2013-02-22 Thread Pginer (Code Review)
Pginer has uploaded a new change for review.

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


Change subject: (bug 35341): 'user' icon in SVG with cross-browser fallback
..

(bug 35341): 'user' icon in SVG with cross-browser fallback

A SVG version of the user icon is provided only for browsers supporting SVG.
To ensure browser compatibility, the SVG version is provided in a two-layer 
background where the first layer is a transparent gradient.
The fact that browsers supporting CSS gradients are a stict subset of those 
supporting SVG guarantees that any non-SVG capable browser would attempt to 
render the SVG version.

Change-Id: I914da0649459744ccca9e1a78e9f48fe66e1a77f
---
M skins/vector/screen.css
1 file changed, 2 insertions(+), 0 deletions(-)


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

diff --git a/skins/vector/screen.css b/skins/vector/screen.css
index 2e09ee1..b7f0de0 100644
--- a/skins/vector/screen.css
+++ b/skins/vector/screen.css
@@ -783,6 +783,8 @@
 #pt-login {
/* @embed */
background: url(images/user-icon.png) left top no-repeat;
+   background-image: -webkit-linear-gradient(transparent, transparent), 
url(images/user-icon.svg);
+   background-image: linear-gradient(transparent, transparent), 
url(images/user-icon.svg);
padding-left: 15px !important;
text-transform: none;
 }

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

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

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


[MediaWiki-commits] [Gerrit] (Bug 45270) Add messages for new user group - change (mediawiki...WikimediaMessages)

2013-02-22 Thread Raimond Spekking (Code Review)
Raimond Spekking has uploaded a new change for review.

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


Change subject: (Bug 45270) Add messages for new user group
..

(Bug 45270) Add messages for new user group

Introduced with https://gerrit.wikimedia.org/r/#/c/50196/

Change-Id: If1b609626e929839e8f32fc3ceac173bac7cfa1f
---
M WikimediaMessages.i18n.php
1 file changed, 5 insertions(+), 0 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikimediaMessages 
refs/changes/56/50356/1

diff --git a/WikimediaMessages.i18n.php b/WikimediaMessages.i18n.php
index 3b5284e..8f15bf8 100644
--- a/WikimediaMessages.i18n.php
+++ b/WikimediaMessages.i18n.php
@@ -199,6 +199,11 @@
'group-translationadmin-member' => '{{GENDER:$1|translation 
administrator}}',
'grouppage-translationadmin'=> '{{ns:project}}:Translation 
administrators', # only translate this message to other languages if you have 
to change it
 
+   # Bug 45270 due to https://gerrit.wikimedia.org/r/#/c/50196/
+   'group-centralnoticeadmin'=> 'Central notice administrators',
+   'group-centralnoticeadmin-member' => '{{GENDER:$1|Central notice 
administrator}}',
+   'grouppage-centralnoticeadmin'=> '{{ns:project}}:Central notice 
administrators',
+
# mediawiki.org specific user group
 
'group-coder'=> 'Coders',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If1b609626e929839e8f32fc3ceac173bac7cfa1f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikimediaMessages
Gerrit-Branch: master
Gerrit-Owner: Raimond Spekking 

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


[MediaWiki-commits] [Gerrit] global map options for all map services - change (mediawiki...MultiMaps)

2013-02-22 Thread Pastakhov (Code Review)
Pastakhov has uploaded a new change for review.

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


Change subject: global map options for all map services
..

global map options for all map services

Change-Id: I7435d522d7ecd277b020195b17abc6ecf0377bc3
---
M MultiMaps.php
A resources/multimaps.js
M services/Google/ext.google.js
M services/Leaflet/ext.leaflet.js
M services/Yandex/ext.yandex.js
5 files changed, 65 insertions(+), 58 deletions(-)


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

diff --git a/MultiMaps.php b/MultiMaps.php
index 3b8b604..b5e00af 100644
--- a/MultiMaps.php
+++ b/MultiMaps.php
@@ -69,6 +69,7 @@
 //define modules that can later be loaded during the output
 $wgResourceModules['ext.MultiMaps'] = array(
'styles' => array('resources/multimaps.css'),
+   'scripts' => array('resources/multimaps.js'),
'localBasePath' => $dir,
'remoteExtPath' => 'MultiMaps',
'group' => 'ext.MultiMaps',
diff --git a/resources/multimaps.js b/resources/multimaps.js
new file mode 100644
index 000..2ea00f8
--- /dev/null
+++ b/resources/multimaps.js
@@ -0,0 +1,49 @@
+/**
+ * JavaScript for MultiMaps extension.
+ * @see http://www.mediawiki.org/wiki/Extension:MultiMaps
+ *
+ * @author Pavel Astakhov < pastak...@yandex.ru >
+ */
+
+function multimapsFillByGlobalOptions ( globalOptions, elementname, 
elementoptions ) {
+   if( globalOptions.title && !elementoptions.title ) {
+   elementoptions.title = globalOptions.title;
+   }
+   if( globalOptions.text && !elementoptions.text ) {
+   elementoptions.text = globalOptions.text;
+   }
+
+   switch( elementname ) {
+   case 'marker':
+   if( globalOptions.icon && !elementoptions.icon ) {
+   elementoptions.icon = globalOptions.icon;
+   }
+   break;
+   case 'polygon':
+   case 'circle':
+   case 'rectangle':
+   if( globalOptions.fillcolor && 
!elementoptions.fillcolor ) {
+   elementoptions.fillcolor = 
globalOptions.fillcolor;
+   }
+   if( globalOptions.fillopacity && 
!elementoptions.fillopacity ) {
+   elementoptions.fillopacity = 
globalOptions.fillopacity;
+   }
+   if( globalOptions.fill && !elementoptions.fill ) {
+   elementoptions.fill = globalOptions.fill;
+   }
+   // break is not necessary here
+   /*falls through*/
+   case 'line':
+   if( globalOptions.color && !elementoptions.color ) {
+   elementoptions.color = globalOptions.color;
+   }
+   if( globalOptions.weight && !elementoptions.weight ) {
+   elementoptions.weight = globalOptions.weight;
+   }
+   if( globalOptions.opacity && !elementoptions.opacity ) {
+   elementoptions.opacity = globalOptions.opacity;
+   }
+   break;
+   }
+   return elementoptions;
+}
\ No newline at end of file
diff --git a/services/Google/ext.google.js b/services/Google/ext.google.js
index 3b3523c..5e894a7 100644
--- a/services/Google/ext.google.js
+++ b/services/Google/ext.google.js
@@ -147,49 +147,6 @@
}
};
 
-   this.setDefaultOptions = function (elementname, elementoptions) 
{
-   if( options.title && !elementoptions.title ) {
-   elementoptions.title = options.title;
-   }
-   if( options.text && !elementoptions.text ) {
-   elementoptions.text = options.text;
-   }
-
-   switch( elementname ) {
-   case 'marker':
-   if( options.icon && 
!elementoptions.icon ) {
-   elementoptions.icon = 
options.icon;
-   }
-   break;
-   case 'polygon':
-   case 'circle':
-   case 'rectangle':
-   if( options.fillcolor && 
!elementoptions.fillcolor ) {
-   elementoptions.fillcolor = 
options.fillcolor;
-   }
-   if( options.fillopacity && 
!elementoptions.fillopacity ) {
-

[MediaWiki-commits] [Gerrit] global map options for all map services - change (mediawiki...MultiMaps)

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

Change subject: global map options for all map services
..


global map options for all map services

Change-Id: I7435d522d7ecd277b020195b17abc6ecf0377bc3
---
M MultiMaps.php
A resources/multimaps.js
M services/Google/ext.google.js
M services/Leaflet/ext.leaflet.js
M services/Yandex/ext.yandex.js
5 files changed, 67 insertions(+), 70 deletions(-)

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



diff --git a/MultiMaps.php b/MultiMaps.php
index 3b8b604..b5e00af 100644
--- a/MultiMaps.php
+++ b/MultiMaps.php
@@ -69,6 +69,7 @@
 //define modules that can later be loaded during the output
 $wgResourceModules['ext.MultiMaps'] = array(
'styles' => array('resources/multimaps.css'),
+   'scripts' => array('resources/multimaps.js'),
'localBasePath' => $dir,
'remoteExtPath' => 'MultiMaps',
'group' => 'ext.MultiMaps',
diff --git a/resources/multimaps.js b/resources/multimaps.js
new file mode 100644
index 000..2ea00f8
--- /dev/null
+++ b/resources/multimaps.js
@@ -0,0 +1,49 @@
+/**
+ * JavaScript for MultiMaps extension.
+ * @see http://www.mediawiki.org/wiki/Extension:MultiMaps
+ *
+ * @author Pavel Astakhov < pastak...@yandex.ru >
+ */
+
+function multimapsFillByGlobalOptions ( globalOptions, elementname, 
elementoptions ) {
+   if( globalOptions.title && !elementoptions.title ) {
+   elementoptions.title = globalOptions.title;
+   }
+   if( globalOptions.text && !elementoptions.text ) {
+   elementoptions.text = globalOptions.text;
+   }
+
+   switch( elementname ) {
+   case 'marker':
+   if( globalOptions.icon && !elementoptions.icon ) {
+   elementoptions.icon = globalOptions.icon;
+   }
+   break;
+   case 'polygon':
+   case 'circle':
+   case 'rectangle':
+   if( globalOptions.fillcolor && 
!elementoptions.fillcolor ) {
+   elementoptions.fillcolor = 
globalOptions.fillcolor;
+   }
+   if( globalOptions.fillopacity && 
!elementoptions.fillopacity ) {
+   elementoptions.fillopacity = 
globalOptions.fillopacity;
+   }
+   if( globalOptions.fill && !elementoptions.fill ) {
+   elementoptions.fill = globalOptions.fill;
+   }
+   // break is not necessary here
+   /*falls through*/
+   case 'line':
+   if( globalOptions.color && !elementoptions.color ) {
+   elementoptions.color = globalOptions.color;
+   }
+   if( globalOptions.weight && !elementoptions.weight ) {
+   elementoptions.weight = globalOptions.weight;
+   }
+   if( globalOptions.opacity && !elementoptions.opacity ) {
+   elementoptions.opacity = globalOptions.opacity;
+   }
+   break;
+   }
+   return elementoptions;
+}
\ No newline at end of file
diff --git a/services/Google/ext.google.js b/services/Google/ext.google.js
index 3b3523c..5e894a7 100644
--- a/services/Google/ext.google.js
+++ b/services/Google/ext.google.js
@@ -147,49 +147,6 @@
}
};
 
-   this.setDefaultOptions = function (elementname, elementoptions) 
{
-   if( options.title && !elementoptions.title ) {
-   elementoptions.title = options.title;
-   }
-   if( options.text && !elementoptions.text ) {
-   elementoptions.text = options.text;
-   }
-
-   switch( elementname ) {
-   case 'marker':
-   if( options.icon && 
!elementoptions.icon ) {
-   elementoptions.icon = 
options.icon;
-   }
-   break;
-   case 'polygon':
-   case 'circle':
-   case 'rectangle':
-   if( options.fillcolor && 
!elementoptions.fillcolor ) {
-   elementoptions.fillcolor = 
options.fillcolor;
-   }
-   if( options.fillopacity && 
!elementoptions.fillopacity ) {
-   elementoptions.fillopacity = 
options.

[MediaWiki-commits] [Gerrit] Revert "global map options for all map services" - change (mediawiki...MultiMaps)

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

Change subject: Revert "global map options for all map services"
..


Revert "global map options for all map services"

This reverts commit 3796244c1ddf969bf60e65fe0d66969a38c4c57b

Change-Id: Ic603aa3a149155b5ce9b72feb769d13433525a49
---
M MultiMaps.php
D resources/multimaps.js
M services/Google/ext.google.js
M services/Leaflet/ext.leaflet.js
M services/Yandex/ext.yandex.js
5 files changed, 70 insertions(+), 67 deletions(-)

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



diff --git a/MultiMaps.php b/MultiMaps.php
index b5e00af..3b8b604 100644
--- a/MultiMaps.php
+++ b/MultiMaps.php
@@ -69,7 +69,6 @@
 //define modules that can later be loaded during the output
 $wgResourceModules['ext.MultiMaps'] = array(
'styles' => array('resources/multimaps.css'),
-   'scripts' => array('resources/multimaps.js'),
'localBasePath' => $dir,
'remoteExtPath' => 'MultiMaps',
'group' => 'ext.MultiMaps',
diff --git a/resources/multimaps.js b/resources/multimaps.js
deleted file mode 100644
index 2ea00f8..000
--- a/resources/multimaps.js
+++ /dev/null
@@ -1,49 +0,0 @@
-/**
- * JavaScript for MultiMaps extension.
- * @see http://www.mediawiki.org/wiki/Extension:MultiMaps
- *
- * @author Pavel Astakhov < pastak...@yandex.ru >
- */
-
-function multimapsFillByGlobalOptions ( globalOptions, elementname, 
elementoptions ) {
-   if( globalOptions.title && !elementoptions.title ) {
-   elementoptions.title = globalOptions.title;
-   }
-   if( globalOptions.text && !elementoptions.text ) {
-   elementoptions.text = globalOptions.text;
-   }
-
-   switch( elementname ) {
-   case 'marker':
-   if( globalOptions.icon && !elementoptions.icon ) {
-   elementoptions.icon = globalOptions.icon;
-   }
-   break;
-   case 'polygon':
-   case 'circle':
-   case 'rectangle':
-   if( globalOptions.fillcolor && 
!elementoptions.fillcolor ) {
-   elementoptions.fillcolor = 
globalOptions.fillcolor;
-   }
-   if( globalOptions.fillopacity && 
!elementoptions.fillopacity ) {
-   elementoptions.fillopacity = 
globalOptions.fillopacity;
-   }
-   if( globalOptions.fill && !elementoptions.fill ) {
-   elementoptions.fill = globalOptions.fill;
-   }
-   // break is not necessary here
-   /*falls through*/
-   case 'line':
-   if( globalOptions.color && !elementoptions.color ) {
-   elementoptions.color = globalOptions.color;
-   }
-   if( globalOptions.weight && !elementoptions.weight ) {
-   elementoptions.weight = globalOptions.weight;
-   }
-   if( globalOptions.opacity && !elementoptions.opacity ) {
-   elementoptions.opacity = globalOptions.opacity;
-   }
-   break;
-   }
-   return elementoptions;
-}
\ No newline at end of file
diff --git a/services/Google/ext.google.js b/services/Google/ext.google.js
index 5e894a7..3b3523c 100644
--- a/services/Google/ext.google.js
+++ b/services/Google/ext.google.js
@@ -147,6 +147,49 @@
}
};
 
+   this.setDefaultOptions = function (elementname, elementoptions) 
{
+   if( options.title && !elementoptions.title ) {
+   elementoptions.title = options.title;
+   }
+   if( options.text && !elementoptions.text ) {
+   elementoptions.text = options.text;
+   }
+
+   switch( elementname ) {
+   case 'marker':
+   if( options.icon && 
!elementoptions.icon ) {
+   elementoptions.icon = 
options.icon;
+   }
+   break;
+   case 'polygon':
+   case 'circle':
+   case 'rectangle':
+   if( options.fillcolor && 
!elementoptions.fillcolor ) {
+   elementoptions.fillcolor = 
options.fillcolor;
+   }
+   if( options.fillopacity && 
!elementoptions.fillopacity ) {
+ 

[MediaWiki-commits] [Gerrit] (bug 44228) Using compatible css class option name in suggester - change (mediawiki...Wikibase)

2013-02-22 Thread Anja Jentzsch (Code Review)
Anja Jentzsch has uploaded a new change for review.

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


Change subject: (bug 44228) Using compatible css class option name in suggester
..

(bug 44228) Using compatible css class option name in suggester

Change-Id: I10913ee6511379f4032c18000839c0f4663fe53d
---
M lib/resources/jquery.ui/jquery.ui.entityselector.js
M lib/resources/jquery.ui/jquery.ui.suggester.js
2 files changed, 4 insertions(+), 4 deletions(-)


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

diff --git a/lib/resources/jquery.ui/jquery.ui.entityselector.js 
b/lib/resources/jquery.ui/jquery.ui.entityselector.js
index 9856b25..f8b2728 100644
--- a/lib/resources/jquery.ui/jquery.ui.entityselector.js
+++ b/lib/resources/jquery.ui/jquery.ui.entityselector.js
@@ -504,7 +504,7 @@
action: function( entityselector ) {
entityselector.more();
},
-   'class': 'ui-entityselector-more'
+   cssClass: 'ui-entityselector-more'
} );
},
 
diff --git a/lib/resources/jquery.ui/jquery.ui.suggester.js 
b/lib/resources/jquery.ui/jquery.ui.suggester.js
index 411d626..9625346 100644
--- a/lib/resources/jquery.ui/jquery.ui.suggester.js
+++ b/lib/resources/jquery.ui/jquery.ui.suggester.js
@@ -64,7 +64,7 @@
  * @option customListItem.action {Function} The action to perform when 
selecting the additional
  * list item.
  * Parameters: (1) Reference to the entity selector widget
- * @option customListItem.class {String} (optional) Additional css class(es) 
to assign to the custom
+ * @option customListItem.cssClass {String} (optional) Additional css 
class(es) to assign to the custom
  * item's  node.
  *
  * @event response Triggered when the API call returned successful.
@@ -344,8 +344,8 @@
} ),
$a = $( '' ).appendTo( $li );
 
-   if ( customListItem.class ) {
-   $li.addClass( customListItem.class );
+   if ( customListItem.cssClass ) {
+   $li.addClass( customListItem.cssClass );
}
 
if ( typeof content === 'string' ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I10913ee6511379f4032c18000839c0f4663fe53d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: mw1.21-wmf10
Gerrit-Owner: Anja Jentzsch 
Gerrit-Reviewer: Henning Snater 

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


[MediaWiki-commits] [Gerrit] (bug 44228) Using compatible css class option name in suggester - change (mediawiki...Wikibase)

2013-02-22 Thread Anja Jentzsch (Code Review)
Anja Jentzsch has submitted this change and it was merged.

Change subject: (bug 44228) Using compatible css class option name in suggester
..


(bug 44228) Using compatible css class option name in suggester

Change-Id: I10913ee6511379f4032c18000839c0f4663fe53d
---
M lib/resources/jquery.ui/jquery.ui.entityselector.js
M lib/resources/jquery.ui/jquery.ui.suggester.js
2 files changed, 4 insertions(+), 4 deletions(-)

Approvals:
  Anja Jentzsch: Verified; Looks good to me, approved



diff --git a/lib/resources/jquery.ui/jquery.ui.entityselector.js 
b/lib/resources/jquery.ui/jquery.ui.entityselector.js
index 9856b25..f8b2728 100644
--- a/lib/resources/jquery.ui/jquery.ui.entityselector.js
+++ b/lib/resources/jquery.ui/jquery.ui.entityselector.js
@@ -504,7 +504,7 @@
action: function( entityselector ) {
entityselector.more();
},
-   'class': 'ui-entityselector-more'
+   cssClass: 'ui-entityselector-more'
} );
},
 
diff --git a/lib/resources/jquery.ui/jquery.ui.suggester.js 
b/lib/resources/jquery.ui/jquery.ui.suggester.js
index 411d626..9625346 100644
--- a/lib/resources/jquery.ui/jquery.ui.suggester.js
+++ b/lib/resources/jquery.ui/jquery.ui.suggester.js
@@ -64,7 +64,7 @@
  * @option customListItem.action {Function} The action to perform when 
selecting the additional
  * list item.
  * Parameters: (1) Reference to the entity selector widget
- * @option customListItem.class {String} (optional) Additional css class(es) 
to assign to the custom
+ * @option customListItem.cssClass {String} (optional) Additional css 
class(es) to assign to the custom
  * item's  node.
  *
  * @event response Triggered when the API call returned successful.
@@ -344,8 +344,8 @@
} ),
$a = $( '' ).appendTo( $li );
 
-   if ( customListItem.class ) {
-   $li.addClass( customListItem.class );
+   if ( customListItem.cssClass ) {
+   $li.addClass( customListItem.cssClass );
}
 
if ( typeof content === 'string' ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I10913ee6511379f4032c18000839c0f4663fe53d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: mw1.21-wmf10
Gerrit-Owner: Anja Jentzsch 
Gerrit-Reviewer: Anja Jentzsch 
Gerrit-Reviewer: Henning Snater 
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 45270) Add messages for new user group - change (mediawiki...WikimediaMessages)

2013-02-22 Thread Jalexander (Code Review)
Jalexander has submitted this change and it was merged.

Change subject: (Bug 45270) Add messages for new user group
..


(Bug 45270) Add messages for new user group

Introduced with https://gerrit.wikimedia.org/r/#/c/50196/

Change-Id: If1b609626e929839e8f32fc3ceac173bac7cfa1f
---
M WikimediaMessages.i18n.php
1 file changed, 5 insertions(+), 0 deletions(-)

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



diff --git a/WikimediaMessages.i18n.php b/WikimediaMessages.i18n.php
index 3b5284e..8f15bf8 100644
--- a/WikimediaMessages.i18n.php
+++ b/WikimediaMessages.i18n.php
@@ -199,6 +199,11 @@
'group-translationadmin-member' => '{{GENDER:$1|translation 
administrator}}',
'grouppage-translationadmin'=> '{{ns:project}}:Translation 
administrators', # only translate this message to other languages if you have 
to change it
 
+   # Bug 45270 due to https://gerrit.wikimedia.org/r/#/c/50196/
+   'group-centralnoticeadmin'=> 'Central notice administrators',
+   'group-centralnoticeadmin-member' => '{{GENDER:$1|Central notice 
administrator}}',
+   'grouppage-centralnoticeadmin'=> '{{ns:project}}:Central notice 
administrators',
+
# mediawiki.org specific user group
 
'group-coder'=> 'Coders',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If1b609626e929839e8f32fc3ceac173bac7cfa1f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikimediaMessages
Gerrit-Branch: master
Gerrit-Owner: Raimond Spekking 
Gerrit-Reviewer: Jalexander 
Gerrit-Reviewer: Siebrand 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Added JobQueue that uses Amazon SQS. - change (mediawiki...AWSSDK)

2013-02-22 Thread Parent5446 (Code Review)
Parent5446 has uploaded a new change for review.

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


Change subject: Added JobQueue that uses Amazon SQS.
..

Added JobQueue that uses Amazon SQS.

Increased required SDK version for SQS support. Added
JobQueue class that uses SDK to use SQS as a back-end
for job queues.

Change-Id: I8e8225a440b56506a1c6d0f953e5d5a80c3e1f7e
---
M AWSSDK.php
A JobQueueAmazonSqs.php
M composer.json
M composer.lock
4 files changed, 255 insertions(+), 33 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/AWSSDK 
refs/changes/61/50361/1

diff --git a/AWSSDK.php b/AWSSDK.php
index 87e4219..824ace5 100644
--- a/AWSSDK.php
+++ b/AWSSDK.php
@@ -11,6 +11,14 @@
'descriptionmsg' => 'awssdk-desc'
 );
 
+$wgAWSCredentials = array(
+   'key' => false,
+   'secret' => false
+);
+
+$wgAWSRegion = false;
+
+$wgAutoloadClasses['JobQueueAmazonSqs'] = $dir . 'JobQueueAmazonSqs.php';
 $wgExtensionMessagesFiles['AWSSDK'] = $dir . 'AWSSDK.i18n.php';
 
 require_once( $dir . 'vendor/autoload.php' );
diff --git a/JobQueueAmazonSqs.php b/JobQueueAmazonSqs.php
new file mode 100644
index 000..5fcf26f
--- /dev/null
+++ b/JobQueueAmazonSqs.php
@@ -0,0 +1,209 @@
+http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup Extensions
+ */
+
+/**
+ * A job queue that uses the Amazon SQS service as a back-end.
+ *
+ * @see JobQueue
+ * @author Tyler Romeo 
+ */
+class JobQueueAmazonSqs extends JobQueue {
+   private $size = null;
+   private $ackSize = null;
+
+   function __construct( array $params ) {
+   global $wgAWSCredentials, $wgAWSRegion, $wgAWSUseHTTPS;
+   parent::__construct( $params );
+
+   $this->client = SqsClient::factory( array(
+   'key' => $wgAWSCredentials['key'],
+   'secret' => $wgAWSCredentials['secret'],
+   'region' => $wgAWSRegion,
+   'scheme' => $wgAWSUseHTTPS ? 'https' : 'http',
+   'ssl.cert' => $wgAWSUseHTTPS ? true : null
+   ) );
+
+   $this->queue = $this->client->createQueue( array(
+   'QueueName' => 'mediawiki-' . $this->wiki . 
'-jobqueue-' . $this->type
+   ) );
+   }
+
+   function doAck( Job $job ) {
+   $this->client->deleteMessage( array(
+   'QueueUrl' => $this->queue['QueueUrl'],
+   'ReceiptHandle' => $job->getParams()['aws_receipt']
+   ) );
+   return true;
+   }
+
+   function doBatchPush( array $jobs, $flags ) {
+   $entries = array();
+   foreach( $jobs as $job ) {
+   $entries[] = array(
+   'Id' => $job->getId(),
+   'MessageBody' => serialize( array(
+   'cmd' => $job->getType(),
+   'id' => $job->getId(),
+   'namespace' => 
$job->getTitle()->getNamespace(),
+   'title' => $job->getTitle()->getText(),
+   'params' => $job->getParams()
+   ) )
+   );
+   }
+
+   $res = $this->client->sendMessageBatch( array(
+   'QueueUrl' => $this->queue['QueueUrl'],
+   'Entries' => $entries
+   ) );
+
+   if( count( $res['Failed'] ) ) {
+   throw new MWException( 'Jobs failed to push to the AWS 
SQS Job Queue.' );
+   }
+
+   return true;
+   }
+
+   function doDeduplicateRootJob( Job $job ) {
+   global $wgMemc;
+
+   $params = $job->getParams();
+   if ( !isset( $params['rootJobSignature'] ) ) {
+   throw new MWException( "Cannot register root job; 
missing 'rootJobSignature'." );
+   } elseif ( !isset( $params['rootJobTimestamp'] ) ) {
+   throw new MWException( "Cannot register root job; 
missing 'rootJobTimestamp'." );
+   }
+   $key = $this->getRootJobCacheKey( $params['rootJobSignature'] );
+
+   // current last timestamp of this job
+   $timestamp = $wgMemc->get( $key );
+   if ( $timestamp >= $params['rootJobTimestamp'] ) {
+   // a newer version of this root job was enqueued
+   return true;
+   } else {
+   // Update the timestamp of the last root job started at 
the location...
+   return $wgMemc->set( $key, $params['rootJobTimestamp'], 
JobQueueDB::ROOTJOB_TTL );
+   }
+   }
+
+   function doGetAcquiredCount() {
+   if( $this->ackSize

[MediaWiki-commits] [Gerrit] Use {{int:}} syntax to ensure consistent translations - change (mediawiki...WikimediaMessages)

2013-02-22 Thread Raimond Spekking (Code Review)
Raimond Spekking has uploaded a new change for review.

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


Change subject: Use {{int:}} syntax to ensure consistent translations
..

Use {{int:}} syntax to ensure consistent translations

Use protocol relaive links

UNTESTED patch. I am not sure that {{int:}} works here

Change-Id: I2b5cdc5a803e15e3fa695056a9a03eea340d0695
---
M WikimediaMessages.i18n.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/WikimediaMessages.i18n.php b/WikimediaMessages.i18n.php
index 8f15bf8..417133b 100644
--- a/WikimediaMessages.i18n.php
+++ b/WikimediaMessages.i18n.php
@@ -226,7 +226,7 @@
 text in the other namespaces is available under the Creative Commons 
Attribution/Share-Alike License;
 additional terms may apply.
 See Terms of Use for details.',
-   'wikidata-shortcopyrightwarning' => 'By clicking "save", you agree to 
the [https://wikimediafoundation.org/wiki/Terms_of_Use terms of use], and you 
irrevocably agree to release your contribution under the 
[https://creativecommons.org/publicdomain/zero/1.0/ CC0 license].',
+'wikidata-shortcopyrightwarning' => 'By clicking "{{int:wikibase-save}}", you 
agree to the [//wikimediafoundation.org/wiki/Terms_of_Use terms of use], and 
you irrevocably agree to release your contribution under the 
[//creativecommons.org/publicdomain/zero/1.0/ CC0 license].',
'wikimedia-copyrightwarning' => 'By clicking the "{{int:savearticle}}" 
button, you agree to the [//wikimediafoundation.org/wiki/Terms_of_Use Terms of 
Use], and you irrevocably agree to release your contribution under the 
[//en.wikipedia.org/wiki/Wikipedia:Text_of_Creative_Commons_Attribution-ShareAlike_3.0_Unported_License
 CC-BY-SA 3.0 License] and the 
[//en.wikipedia.org/wiki/Wikipedia:Text_of_the_GNU_Free_Documentation_License 
GFDL].
 You agree that a hyperlink or URL is sufficient attribution under the Creative 
Commons license.',
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2b5cdc5a803e15e3fa695056a9a03eea340d0695
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikimediaMessages
Gerrit-Branch: master
Gerrit-Owner: Raimond Spekking 

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


[MediaWiki-commits] [Gerrit] Proofread - change (mediawiki...Translate)

2013-02-22 Thread Santhosh (Code Review)
Santhosh has uploaded a new change for review.

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


Change subject: Proofread
..

Proofread

* proofread jQuery plugin
* Integration with message table with proofread mode and translate mode
* Messagetable takes care of dynamic loading of messages
* Integration with translate editor

Works sometimes, but more polishing in follow up commits

Change-Id: I219a29522c9184c86cce96c2391867f09546da7c
---
M Translate.php
A resources/css/ext.translate.proofread.css
A resources/images/check-hi.png
A resources/images/check.png
A resources/images/outdated.png
A resources/images/translate.png
A resources/images/uncheck-hi.png
A resources/images/uncheck.png
M resources/js/ext.translate.messagetable.js
A resources/js/ext.translate.proofread.js
M utils/TuxMessageTable.php
11 files changed, 359 insertions(+), 5 deletions(-)


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

diff --git a/Translate.php b/Translate.php
index ef502f3..2fe2af4 100644
--- a/Translate.php
+++ b/Translate.php
@@ -241,8 +241,12 @@
'scripts' => array(
'resources/js/ext.translate.editor.js',
'resources/js/ext.translate.editor.helpers.js',
+   'resources/js/ext.translate.proofread.js',
),
-   'styles' => 'resources/css/ext.translate.editor.css',
+   'styles' => array(
+   'resources/css/ext.translate.editor.css',
+   'resources/css/ext.translate.proofread.css',
+   ),
'dependencies' => array(
'ext.translate.base',
'ext.translate.grid',
@@ -290,6 +294,7 @@
'position' => 'top',
 ) + $resourcePaths;
 
+
 $wgResourceModules['ext.translate.groupselector'] = array(
'styles' => 'resources/css/ext.translate.groupselector.css',
'scripts' => 'resources/js/ext.translate.groupselector.js',
diff --git a/resources/css/ext.translate.proofread.css 
b/resources/css/ext.translate.proofread.css
new file mode 100644
index 000..9a89459
--- /dev/null
+++ b/resources/css/ext.translate.proofread.css
@@ -0,0 +1,68 @@
+.tux-message-proofread {
+   height: auto;
+   min-height: 50px;
+   padding: 5px;
+   padding-bottom: 10px;
+   background-color: #FFF;
+   vertical-align: middle;
+   border-bottom: 1px solid #C9C9C9;
+}
+
+.tux-proofread-source {
+   font-size: 15px;
+}
+
+.tux-proofread-translation {
+   font-size: 16px;
+   font-weight: bold;
+}
+
+.tux-proofread-status.outdated {
+   /* @embed */
+   background: url(../images/outdated.png) left center no-repeat;
+   height: 40px;
+}
+
+.tux-proofread-status.translated {
+   /* @embed */
+   background: url(../images/translate.png) left center no-repeat;
+   height: 40px;
+}
+
+
+.tux-proofread-action {
+   /* @embed */
+   background: url(../images/uncheck.png) right center no-repeat;
+   height: 40px;
+   cursor: pointer;
+}
+
+.tux-proofread-action:hover {
+   /* @embed */
+   background: url(../images/uncheck-hi.png) right center no-repeat;
+   height: 40px;
+}
+
+.tux-proofread-action.proofread {
+   /* @embed */
+   background: url(../images/check.png) right center no-repeat;
+   height: 40px;
+}
+
+.tux-proofread-action.proofread:hover{
+   /* @embed */
+   background: url(../images/check-hi.png) right center no-repeat;
+   height: 40px;
+}
+
+.tux-proofread-edit {
+   /* @embed */
+   background-image: url(../images/label-pen.png);
+   background-image: -webkit-linear-gradient(transparent, transparent), 
url(../images/label-pen.svg);
+   background-image: -moz-linear-gradient(transparent, transparent), 
url(../images/label-pen.svg);
+   background-image: linear-gradient(transparent, transparent), 
url(../images/label-pen.svg);
+   background-repeat: no-repeat;
+   background-position: right center;
+   height: 40px;
+   cursor: pointer;
+}
diff --git a/resources/images/check-hi.png b/resources/images/check-hi.png
new file mode 100644
index 000..4fabd0d
--- /dev/null
+++ b/resources/images/check-hi.png
Binary files differ
diff --git a/resources/images/check.png b/resources/images/check.png
new file mode 100644
index 000..15546f6
--- /dev/null
+++ b/resources/images/check.png
Binary files differ
diff --git a/resources/images/outdated.png b/resources/images/outdated.png
new file mode 100644
index 000..63b7aa2
--- /dev/null
+++ b/resources/images/outdated.png
Binary files differ
diff --git a/resources/images/translate.png b/resources/images/translate.png
new file mode 100644
index 000..f15e8bf
--- /dev/null
+++ b/resources/images/translate.png
Binary files differ
diff --git a/resources/images/uncheck-hi.png b/resources/images/uncheck-hi.png
new file mode 100644
index 000..d4063a3
--- /dev/null
+++ b/resources/images/uncheck-hi.pn

[MediaWiki-commits] [Gerrit] Give the admins::parsoid group shell access to the Parsoid m... - change (operations/puppet)

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

Change subject: Give the admins::parsoid group shell access to the Parsoid 
machine
..


Give the admins::parsoid group shell access to the Parsoid machine

Gabriel tried to ssh into mexia to inspect the state of a hung Parsoid
process there, but couldn't. Looks like we only had admins::roots for
the Parsoid machines, so I propose we add admins::parsoid. For now this
group only has Gabriel and myself in it.

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

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



diff --git a/manifests/admins.pp b/manifests/admins.pp
index 1a42032..b918838 100644
--- a/manifests/admins.pp
+++ b/manifests/admins.pp
@@ -2660,3 +2660,11 @@
include accounts::mwalker
 
 }
+
+class admins::parsoid {
+   $gid = 500   # 'wikidev' by default
+   include groups::wikidev
+
+   include accounts::gwicke
+   include accounts::catrope
+}
diff --git a/manifests/site.pp b/manifests/site.pp
index cf9852c..ecf4c17 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -2470,6 +2470,7 @@
 
include standard,
admins::roots,
+   admins::parsoid,
misc::parsoid
 
class { "lvs::realserver": realserver_ips => [ "10.2.1.28" ] }
@@ -2490,6 +2491,7 @@
 
include standard,
admins::roots,
+   admins::parsoid,
misc::parsoid::cache,
misc::parsoid
 }
@@ -2504,6 +2506,7 @@
 
include standard,
admins::roots,
+   admins::parsoid,
misc::parsoid
 
class { "lvs::realserver": realserver_ips => [ "10.2.2.28" ] }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic0bbae905d07623e3ed3a2fd4661aed9df15dff7
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Catrope 
Gerrit-Reviewer: ArielGlenn 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: Pyoungmeister 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Parse wiki markup like in the other warning message - change (mediawiki...ReplaceText)

2013-02-22 Thread Yaron Koren (Code Review)
Yaron Koren has submitted this change and it was merged.

Change subject: Parse wiki markup like in the other warning message
..


Parse wiki markup like in the other warning message

Change-Id: I7f16f80291a1dfc9997aefdcd7a12ebec40b923d
---
M SpecialReplaceText.php
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Yaron Koren: Verified; Looks good to me, approved



diff --git a/SpecialReplaceText.php b/SpecialReplaceText.php
index 4f8847e..c42f190 100644
--- a/SpecialReplaceText.php
+++ b/SpecialReplaceText.php
@@ -211,7 +211,7 @@
$warning_msg = null;
 
if ( $this->replacement === '' ) {
-   $warning_msg = 
$this->msg('replacetext_blankwarning')->escaped();
+   $warning_msg = 
$this->msg('replacetext_blankwarning')->text();
} elseif ( count( $titles_for_edit ) > 0 ) {
$res = $this->doSearchQuery( 
$this->replacement, $this->selected_namespaces, $this->category, $this->prefix, 
$this->use_regex );
$count = $res->numRows();

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7f16f80291a1dfc9997aefdcd7a12ebec40b923d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ReplaceText
Gerrit-Branch: master
Gerrit-Owner: Raimond Spekking 
Gerrit-Reviewer: Nikerabbit 
Gerrit-Reviewer: Raimond Spekking 
Gerrit-Reviewer: Yaron Koren 

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


[MediaWiki-commits] [Gerrit] (bug 45165) Create rollbacker group for wikidatawiki - change (operations/mediawiki-config)

2013-02-22 Thread Reedy (Code Review)
Reedy has submitted this change and it was merged.

Change subject: (bug 45165) Create rollbacker group for wikidatawiki
..


(bug 45165) Create rollbacker group for wikidatawiki

Change-Id: Ibcff6012d66315420b69c12ce5fd043ac2aaa346
---
M wmf-config/InitialiseSettings.php
1 file changed, 3 insertions(+), 2 deletions(-)

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



diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index e5dacdd..c52a5f5 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -7651,6 +7651,7 @@
'autopatrol' => true, // bug 41907
'patrol' => true, // bug 42052
),
+   'rollbacker' => array( 'rollback' => true ), // bug 45165
),
// due to mass vandalism complaint, 2006-04-11
'zhwiki' => array(
@@ -8104,7 +8105,7 @@
'sysop' => array( 'flood' ),
),
'+wikidatawiki' => array(
-   'sysop' => array( 'autopatrolled' ), // bug 41907
+   'sysop' => array( 'autopatrolled', 'rollbacker' ), // bug 
41907, 45165
),
'+zhwiki' => array(
'bureaucrat' => array( 'flood' ),
@@ -8501,7 +8502,7 @@
'sysop' => array( 'flood' ),
),
'+wikidatawiki' => array(
-   'sysop' => array( 'autopatrolled' ), // bug 41907
+   'sysop' => array( 'autopatrolled', 'rollbacker' ), // bug 
41907, 45165
'bureaucrat' => array( 'translationadmin' ), // bug 44395
),
'+wikimaniateamwiki' => array(

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibcff6012d66315420b69c12ce5fd043ac2aaa346
Gerrit-PatchSet: 2
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Reedy 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Support fallback chains in Message::getKey(). - change (mediawiki/core)

2013-02-22 Thread Daniel Kinzler (Code Review)
Daniel Kinzler has uploaded a new change for review.

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


Change subject: Support fallback chains in Message::getKey().
..

Support fallback chains in Message::getKey().

This is a follow-up to I8ee9da400. It makes getKey() always return a single
string, and adds getKeys() which always returns an array.

Change-Id: Id5dfbeb6fb89b0109dbcecd1fdbf8b8c9d128085
---
M includes/Message.php
M tests/phpunit/includes/MessageTest.php
2 files changed, 53 insertions(+), 2 deletions(-)


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

diff --git a/includes/Message.php b/includes/Message.php
index 6e533a3..e11d6d6 100644
--- a/includes/Message.php
+++ b/includes/Message.php
@@ -221,20 +221,41 @@
 */
public function __construct( $key, $params = array() ) {
global $wgLang;
+
+   if ( is_array( $key ) && empty( $key ) ) {
+   throw new MWException( "At least one message key must 
be provided!" );
+   }
+
$this->key = $key;
$this->parameters = array_values( $params );
$this->language = $wgLang;
}
 
/**
-* Returns the message key
+* Returns the message key. If this Message instance was created with 
an array
+* of keys, the first one is assumed to be the preferred key, and 
returned here.
 *
 * @since 1.21
 *
 * @return string
 */
public function getKey() {
-   return $this->key;
+   if ( is_array( $this->key ) ) {
+   return reset( $this->key ); // first value
+   } else {
+   return $this->key;
+   }
+   }
+
+   /**
+* Returns the message keys as an arrays in order of preference.
+*
+* @since 1.21
+*
+* @return arrays
+*/
+   public function getKeys() {
+   return (array)$this->key;
}
 
/**
diff --git a/tests/phpunit/includes/MessageTest.php 
b/tests/phpunit/includes/MessageTest.php
index c378bb8..b7fdebc 100644
--- a/tests/phpunit/includes/MessageTest.php
+++ b/tests/phpunit/includes/MessageTest.php
@@ -71,4 +71,34 @@
function testInLanguageThrows() {
wfMessage( 'foo' )->inLanguage( 123 );
}
+
+   /**
+* @expectedException MWException
+*/
+   function testNoKey() {
+   new Message( array() );
+   }
+
+   function testGetKey() {
+   $m = new Message( "foo" );
+   $this->assertEquals( "foo", $m->getKey() );
+
+   $m = new Message( array( "foo", "bar" ) );
+   $this->assertEquals( "foo", $m->getKey() );
+   }
+
+   function testGetKeys() {
+   $m = new Message( "foo" );
+   $this->assertEquals( array( "foo" ), $m->getKeys() );
+
+   $m = new Message( array( "foo", "bar" ) );
+   $this->assertEquals( array( "foo", "bar" ), $m->getKeys() );
+   }
+
+   function testGetParams() {
+   $m = new Message( "foo" );
+   $m->params( "2", 5 );
+
+   $this->assertEquals( array( "2", 5 ), $m->getParams() );
+   }
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id5dfbeb6fb89b0109dbcecd1fdbf8b8c9d128085
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Daniel Kinzler 

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


[MediaWiki-commits] [Gerrit] (bug 45124) Allow wikidatawiki sysops to add/remove confirme... - change (operations/mediawiki-config)

2013-02-22 Thread Reedy (Code Review)
Reedy has submitted this change and it was merged.

Change subject: (bug 45124) Allow wikidatawiki sysops to add/remove confirmed 
status
..


(bug 45124) Allow wikidatawiki sysops to add/remove confirmed status

Change-Id: Ic97313a073ad9cf906b194fbad824887ed2aa510
---
M wmf-config/InitialiseSettings.php
1 file changed, 10 insertions(+), 2 deletions(-)

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



diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index c52a5f5..029deb6 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -8105,7 +8105,11 @@
'sysop' => array( 'flood' ),
),
'+wikidatawiki' => array(
-   'sysop' => array( 'autopatrolled', 'rollbacker' ), // bug 
41907, 45165
+   'sysop' => array(
+   'autopatrolled', // bug 41907
+   'rollbacker', // bug 45165
+   'confirmed', // bug 45124
+   ),
),
'+zhwiki' => array(
'bureaucrat' => array( 'flood' ),
@@ -8502,7 +8506,11 @@
'sysop' => array( 'flood' ),
),
'+wikidatawiki' => array(
-   'sysop' => array( 'autopatrolled', 'rollbacker' ), // bug 
41907, 45165
+   'sysop' => array(
+   'autopatrolled', // bug 41907
+   'rollbacker', // bug 45165
+   'confirmed', // bug 45124
+   ),
'bureaucrat' => array( 'translationadmin' ), // bug 44395
),
'+wikimaniateamwiki' => array(

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic97313a073ad9cf906b194fbad824887ed2aa510
Gerrit-PatchSet: 4
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Alex Monk 
Gerrit-Reviewer: Reedy 
Gerrit-Reviewer: Techman224 
Gerrit-Reviewer: Vogone 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Move Agora.i18n.php to match path - change (mediawiki...Agora)

2013-02-22 Thread Reedy (Code Review)
Reedy has submitted this change and it was merged.

Change subject: Move Agora.i18n.php to match path
..


Move Agora.i18n.php to match path

Without this fix, LocalisationCache.php warns it can't find the file.

Change-Id: I423b2ea5c9d8c7f33e78fca77fea81938925535e
---
R Agora.i18n.php
1 file changed, 0 insertions(+), 0 deletions(-)

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



diff --git a/modules/Agora.i18n.php b/Agora.i18n.php
similarity index 100%
rename from modules/Agora.i18n.php
rename to Agora.i18n.php

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I423b2ea5c9d8c7f33e78fca77fea81938925535e
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Agora
Gerrit-Branch: master
Gerrit-Owner: Spage 
Gerrit-Reviewer: Reedy 
Gerrit-Reviewer: Robmoen 
Gerrit-Reviewer: Trevor Parscal 

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


[MediaWiki-commits] [Gerrit] Use {{int:templatesandbox-suffix}} in {{int:templatesandbox-... - change (mediawiki...TemplateSandbox)

2013-02-22 Thread Anomie (Code Review)
Anomie has submitted this change and it was merged.

Change subject: Use {{int:templatesandbox-suffix}} in 
{{int:templatesandbox-text}}
..


Use {{int:templatesandbox-suffix}} in {{int:templatesandbox-text}}

As I observed, some translators translated the path with the suffix
(sandbox), which isn't the same as its translation in
{{int:templatesandbox-text}}. This may confuse the user. To avoid this,
the actual translation from the appropriate message is used.

Change-Id: I85a1d38256905c9e1d6f2bde07c112adcd0f12fb
---
M TemplateSandbox.i18n.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/TemplateSandbox.i18n.php b/TemplateSandbox.i18n.php
index ee71643..b6ced34 100644
--- a/TemplateSandbox.i18n.php
+++ b/TemplateSandbox.i18n.php
@@ -17,7 +17,7 @@
'templatesandbox-suffix' => 'sandbox',
'templatesandbox-legend' => 'Template sandbox',
'templatesandbox-text' => 'You can choose a set of templates saved in 
your sandbox space by using an appropriate sandbox prefix.
-For example, if you want to preview a version of {{ns:Template}}:Test that you 
have saved as "{{ns:User}}:Foo/sandbox/{{ns:Template}}:Test", use 
"{{ns:User}}:Foo/sandbox" as the prefix.',
+For example, if you want to preview a version of {{ns:Template}}:Test that you 
have saved as 
"{{ns:User}}:Foo/{{int:templatesandbox-suffix}}/{{ns:Template}}:Test", use 
"{{ns:User}}:Foo/{{int:templatesandbox-suffix}}" as the prefix.',
'templatesandbox-prefix-label' => 'Sandbox prefix:',
'templatesandbox-page-label' => 'Render page:',
'templatesandbox-revid-label' => 'Render revision:',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I85a1d38256905c9e1d6f2bde07c112adcd0f12fb
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/TemplateSandbox
Gerrit-Branch: master
Gerrit-Owner: Wizardist 
Gerrit-Reviewer: Anomie 
Gerrit-Reviewer: Siebrand 

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


[MediaWiki-commits] [Gerrit] (Bug #44961) get rid of "Patch Set" in comments - change (operations/puppet)

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

Change subject: (Bug #44961) get rid of "Patch Set" in comments
..


(Bug #44961) get rid of "Patch Set" in comments

Change-Id: Ic261fb4458bff5344e583ea3ddc368ee46c24a8e
---
M files/gerrit/hooks/comment-added
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/files/gerrit/hooks/comment-added b/files/gerrit/hooks/comment-added
index 4877f5d..3e87aaf 100755
--- a/files/gerrit/hooks/comment-added
+++ b/files/gerrit/hooks/comment-added
@@ -17,7 +17,7 @@
 self.parser.add_option("--VRIF", dest="verified")
 self.parser.add_option("--CRVW", dest="codereview")
 (options, args) = self.parser.parse_args()
-comment = options.comment.splitlines()
+comment = re.sub(r"^\s*Patch Set \d+:.*$", '', options.comment, 
flags=re.MULTILINE).strip().splitlines()
 if comment:
 comment = comment[0]
 if len(comment) > 103:

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic261fb4458bff5344e583ea3ddc368ee46c24a8e
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: AzaToth 
Gerrit-Reviewer: ArielGlenn 
Gerrit-Reviewer: Demon 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: Matmarex 
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 45111) Fix the squashing of whitespace and control chars - change (mediawiki...Wikibase)

2013-02-22 Thread John Erling Blad (Code Review)
John Erling Blad has uploaded a new change for review.

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


Change subject: (Bug 45111) Fix the squashing of whitespace and control chars
..

(Bug 45111) Fix the squashing of whitespace and control chars

Change-Id: Icc9e48d33b9f5c4ae0a3fd8000c4c54d2883b66d
---
M lib/includes/Term.php
M lib/includes/Utils.php
M lib/tests/phpunit/UtilsTest.php
M repo/includes/Autocomment.php
M repo/includes/api/ApiEditEntity.php
M repo/includes/api/ApiGetEntities.php
M repo/includes/api/ApiModifyEntity.php
M repo/includes/api/ApiSetAliases.php
M repo/includes/api/ApiSetDescription.php
M repo/includes/api/ApiSetLabel.php
M repo/includes/api/ApiSetSiteLink.php
M repo/includes/specials/SpecialCreateEntity.php
A repo/maintenance/rebuildSummaryPerEntity.php
13 files changed, 139 insertions(+), 49 deletions(-)


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

diff --git a/lib/includes/Term.php b/lib/includes/Term.php
index 3de40f3..dbfaad2 100644
--- a/lib/includes/Term.php
+++ b/lib/includes/Term.php
@@ -233,7 +233,7 @@
//  But that requires us to load ALL the language objects,
//  which loads ALL the messages, which makes us run out
//  of RAM (see bug 41103).
-   return mb_strtolower( Utils::squashToNFC( $text ) );
+   return mb_strtolower( Utils::trimToNFC( $text ) );
}
 
/**
diff --git a/lib/includes/Utils.php b/lib/includes/Utils.php
index d9dcf5b..ac5f5d8 100644
--- a/lib/includes/Utils.php
+++ b/lib/includes/Utils.php
@@ -179,17 +179,27 @@
}
 
/**
-* Trim initial and trailing whitespace, and compress internal ones.
+* Trim initial and trailing whitespace and control chars, and 
optionally compress internal ones.
 *
 * @since 0.1
 *
 * @param string $inputString The actual string to process.
+* @param boolean $squashInternal If the internal spaces should also be 
fixed.
 *
 * @return string where whitespace possibly are removed.
 */
-   static public function squashWhitespace( $inputString ) {
-   $trimmed = preg_replace( '/^[\pZ\pC]+|[\pZ\pC]+$/u', '', 
$inputString );
-   return preg_replace('/[\pZ\pC]+/u', ' ', $trimmed );
+   static public function trimWhitespace( $inputString, $squashInternal = 
true ) {
+   // strip initial/trailing whitespace and control chars
+   $trimmed = preg_replace( '/^[\p{Z}\p{Cc}]+|[\p{Z}\p{Cc}]+$/u', 
'', $inputString );
+   if ( $squashInternal === true ) {
+   // replace inner space and control chars with space
+   $trimmed = preg_replace( '/[\p{Z}\p{Cc}]+/u', ' ', 
$trimmed );
+   }
+   else {
+   // replace inner space and control chars with space
+   $trimmed = preg_replace( '/[\p{Cc}]/u', ' ', $trimmed );
+   }
+   return $trimmed;
}
 
/**
@@ -211,11 +221,12 @@
 * @since 0.1
 *
 * @param string $inputString
+* @param boolean $squashInternal If the internal spaces should also be 
fixed.
 *
 * @return string on NFC form
 */
-   static public function squashToNFC( $inputString ) {
-   return self::cleanupToNFC( self::squashWhitespace( $inputString 
) );
+   static public function trimToNFC( $inputString, $squashInternal = true 
) {
+   return self::cleanupToNFC( self::trimWhitespace( $inputString, 
$squashInternal ) );
}
 
/**
diff --git a/lib/tests/phpunit/UtilsTest.php b/lib/tests/phpunit/UtilsTest.php
index 819c015..b786c58 100644
--- a/lib/tests/phpunit/UtilsTest.php
+++ b/lib/tests/phpunit/UtilsTest.php
@@ -46,21 +46,28 @@
 
/**
 * @group WikibaseUtils
-* @dataProvider providerSquashWhitespace
+* @dataProvider providerTrimWhitespace
 */
-   public function testSquashWhitespace( $string, $expected ) {
-   $this->assertEquals( $expected, Utils::squashWhitespace( 
$string ) );
+   public function testTrimWhitespace( $string, $squashInner, $expected ) {
+   $this->assertEquals( $expected, Utils::trimWhitespace( $string, 
$squashInner ) );
}
 
-   public static function providerSquashWhitespace() {
+   public static function providerTrimWhitespace() {
return array(
-   array( 'foo bar', 'foo bar'),
-   array( ' foo  bar ', 'foo bar'),
-   array( '  foo   bar  ', 'foo bar'),
-   array( "foo\tbar", 'foo bar'),
-   array( "foo\nbar", 'foo bar'),
-   array( "foo\rbar", 'foo bar'),
-   array( "\r 

[MediaWiki-commits] [Gerrit] pep8 on operations/dumps - change (integration/jenkins-job-builder-config)

2013-02-22 Thread Hashar (Code Review)
Hashar has uploaded a new change for review.

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


Change subject: pep8 on operations/dumps
..

pep8 on operations/dumps

Also renamed operations-software.yaml to operations-misc.yaml

Change-Id: Iea463a7aafb506b16e7c196d272adde75a7cd735
---
A operations-misc.yaml
D operations-software.yaml
2 files changed, 11 insertions(+), 5 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/integration/jenkins-job-builder-config 
refs/changes/66/50366/1

diff --git a/operations-misc.yaml b/operations-misc.yaml
new file mode 100644
index 000..bf1a149
--- /dev/null
+++ b/operations-misc.yaml
@@ -0,0 +1,11 @@
+- project:
+name: 'operations-software'
+gerrit-name: 'operations/software'
+jobs:
+ - '{name}-pep8'
+
+- project:
+name: 'operations-dumps'
+gerrit-name: 'operations/dumps'
+jobs:
+ - '{name}-pep8'
diff --git a/operations-software.yaml b/operations-software.yaml
deleted file mode 100644
index 9a5c2c3..000
--- a/operations-software.yaml
+++ /dev/null
@@ -1,5 +0,0 @@
-- project:
-name: 'operations-software'
-gerrit-name: 'operations/software'
-jobs:
- - '{name}-pep8'

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iea463a7aafb506b16e7c196d272adde75a7cd735
Gerrit-PatchSet: 1
Gerrit-Project: integration/jenkins-job-builder-config
Gerrit-Branch: master
Gerrit-Owner: Hashar 

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


[MediaWiki-commits] [Gerrit] pep8 on operations/dumps - change (integration/jenkins-job-builder-config)

2013-02-22 Thread Hashar (Code Review)
Hashar has submitted this change and it was merged.

Change subject: pep8 on operations/dumps
..


pep8 on operations/dumps

Also renamed operations-software.yaml to operations-misc.yaml

Change-Id: Iea463a7aafb506b16e7c196d272adde75a7cd735
---
A operations-misc.yaml
D operations-software.yaml
2 files changed, 11 insertions(+), 5 deletions(-)

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



diff --git a/operations-misc.yaml b/operations-misc.yaml
new file mode 100644
index 000..bf1a149
--- /dev/null
+++ b/operations-misc.yaml
@@ -0,0 +1,11 @@
+- project:
+name: 'operations-software'
+gerrit-name: 'operations/software'
+jobs:
+ - '{name}-pep8'
+
+- project:
+name: 'operations-dumps'
+gerrit-name: 'operations/dumps'
+jobs:
+ - '{name}-pep8'
diff --git a/operations-software.yaml b/operations-software.yaml
deleted file mode 100644
index 9a5c2c3..000
--- a/operations-software.yaml
+++ /dev/null
@@ -1,5 +0,0 @@
-- project:
-name: 'operations-software'
-gerrit-name: 'operations/software'
-jobs:
- - '{name}-pep8'

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iea463a7aafb506b16e7c196d272adde75a7cd735
Gerrit-PatchSet: 1
Gerrit-Project: integration/jenkins-job-builder-config
Gerrit-Branch: master
Gerrit-Owner: Hashar 
Gerrit-Reviewer: Hashar 

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


[MediaWiki-commits] [Gerrit] properly stop output buffering - change (mediawiki/core)

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

Change subject: properly stop output buffering
..


properly stop output buffering

While setting up itself, the Maintenance class attempt flush and end the
output buffering mecanism. It was done using a call to ob_end_flush()
which has two culprit:
- it throws an E_NOTICE whenever output buffering is already disabled
- does not flush all buffers

By querying ob_get_level() we can find out whether output buffering has
been enabled and can thus stop using the '@' operator.

Test plan:

 $ php -a
 # Output buffering nested level
 php > print ob_get_level();
 0
 # Start buffering
 php > ob_start();
 # Check nesting level (nothing shown since we buffer output)
 php > print ob_get_level();
 # Actually show buffer content
 php > ob_flush();
 1
 # Flush / end, no notice since we were buffering:
 php > ob_end_flush();
 # Second attempt will throw a notice
 php > ob_end_flush();

 Notice: ob_end_flush(): failed to delete and flush buffer. No buffer to
delete or flush in php shell code on line 1

 Call Stack:
   162.3024 643656   1. {main}() php shell code:0
   162.3025 643736   2. ob_end_flush() php shell code:1

 php >

The while( ob_get_level() > 0) solves it nicely (IMO).

Change-Id: I1490cced5c17fc537ef9e6e1304a492deec3a6a9
---
M maintenance/Maintenance.php
1 file changed, 4 insertions(+), 1 deletion(-)

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



diff --git a/maintenance/Maintenance.php b/maintenance/Maintenance.php
index b2bbf9b..a13453d 100644
--- a/maintenance/Maintenance.php
+++ b/maintenance/Maintenance.php
@@ -513,8 +513,11 @@
define( 'MEDIAWIKI', true );
 
$wgCommandLineMode = true;
+
# Turn off output buffering if it's on
-   @ob_end_flush();
+   while( ob_get_level() > 0 ) {
+   ob_end_flush();
+   }
 
$this->validateParamsAndArgs();
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1490cced5c17fc537ef9e6e1304a492deec3a6a9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Hashar 
Gerrit-Reviewer: Demon 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] trigger pep8 on operations/dumps - change (integration/zuul-config)

2013-02-22 Thread Hashar (Code Review)
Hashar has uploaded a new change for review.

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


Change subject: trigger pep8 on operations/dumps
..

trigger pep8 on operations/dumps

Change-Id: If1885a33c93c3239d9e01ec27f32b4c5bf371ad9
---
M layout.yaml
1 file changed, 6 insertions(+), 0 deletions(-)


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

diff --git a/layout.yaml b/layout.yaml
index b40209b..b562229 100644
--- a/layout.yaml
+++ b/layout.yaml
@@ -416,6 +416,12 @@
   - operations-debs-adminbot-pep8
   - operations-debs-adminbot-pyflakes
 
+  - name: operations/dumps
+check:
+  - operations-dumps-pep8
+gate-and-submit:
+  - operations-dumps-pep8
+
   - name: operations/mediawiki-config
 check:
   - operations-mw-config-phplint

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

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

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


[MediaWiki-commits] [Gerrit] trigger pep8 on operations/dumps - change (integration/zuul-config)

2013-02-22 Thread Hashar (Code Review)
Hashar has submitted this change and it was merged.

Change subject: trigger pep8 on operations/dumps
..


trigger pep8 on operations/dumps

Change-Id: If1885a33c93c3239d9e01ec27f32b4c5bf371ad9
---
M layout.yaml
1 file changed, 6 insertions(+), 0 deletions(-)

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



diff --git a/layout.yaml b/layout.yaml
index b40209b..b562229 100644
--- a/layout.yaml
+++ b/layout.yaml
@@ -416,6 +416,12 @@
   - operations-debs-adminbot-pep8
   - operations-debs-adminbot-pyflakes
 
+  - name: operations/dumps
+check:
+  - operations-dumps-pep8
+gate-and-submit:
+  - operations-dumps-pep8
+
   - name: operations/mediawiki-config
 check:
   - operations-mw-config-phplint

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If1885a33c93c3239d9e01ec27f32b4c5bf371ad9
Gerrit-PatchSet: 1
Gerrit-Project: integration/zuul-config
Gerrit-Branch: master
Gerrit-Owner: Hashar 
Gerrit-Reviewer: Hashar 

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


[MediaWiki-commits] [Gerrit] Serialize figure-captions in non-sol state to prevent RT err... - change (mediawiki...Parsoid)

2013-02-22 Thread Subramanya Sastry (Code Review)
Subramanya Sastry has uploaded a new change for review.

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


Change subject: Serialize figure-captions in non-sol state to prevent RT errors.
..

Serialize figure-captions in non-sol state to prevent RT errors.

* Figure captions are not in a Start-Of-Line (SOL) in wikitext,
  so they have to serialized in non-sol state as well.  Without
  this, captions that have wikitext-like-chars in the sol-position
  will get nowiki-escaped. For example,

  [[File:foo.jpg|thumb| bar]] will get serialized to:
  [[File:foo.jpg|thumb| bar]]

* This is a bug that crept in with a switch from token-based
  serialization handlers to DOM-based handlers in 8939c69. But, the
  bug was hidden because of two reasons. We didn't have parser tests
  to cover this scenario. But, wikitext above wasn't getting parsed
  to figure-tags because of bugs from 6e4ef20e that tackled i18n.
  This i18n bug was fixed in 54695ae3 which exposed the figure
  serialization bug in RT-testing.

* This patch fixes the original bug.

* No change in parser test results.  TODO: Add new ones.

Change-Id: Iaa111628dd3d30118d85837a138fe10ff3d2e325
---
M js/lib/mediawiki.WikitextSerializer.js
1 file changed, 16 insertions(+), 5 deletions(-)


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

diff --git a/js/lib/mediawiki.WikitextSerializer.js 
b/js/lib/mediawiki.WikitextSerializer.js
index 6a38dee..5b19afb 100644
--- a/js/lib/mediawiki.WikitextSerializer.js
+++ b/js/lib/mediawiki.WikitextSerializer.js
@@ -519,7 +519,7 @@
return escapedText(text);
}
 
-   var sol = state.onStartOfLine || state.emitNewlineOnNextToken,
+   var sol = state.onStartOfLine,
hasNewlines = text.match(/\n./),
hasTildes = text.match(/~{3,5}/);
if (!fullCheckNeeded && !hasNewlines && !hasTildes) {
@@ -730,10 +730,22 @@
return cb('');
}
 
+   // Captions dont start on a new line
+   //
+   // So, even though the figure might be in a sol-state, serialize the
+   // caption in a no-sol state and restore old state.  This is required
+   // to prevent spurious wikitext escaping for this example:
+   //
+   // [[File:foo.jpg|thumb| bar]] ==> [[File:foo.jpg|thumb| 
bar]]
+   //
+   // In sol state, text " bar" should be nowiki escaped to prevent it from
+   // parsing to an indent-pre.  But, not in figure captions.
+   var captionSrc, oldSOLState = state.onStartOfLine;
+   state.onStartOfLine = false;
+   captionSrc = state.serializeChildrenToString(caption.childNodes, 
WSP.wteHandlers.aHandler);
+   state.onStartOfLine = oldSOLState;
 
-   var captionSrc = state.serializeChildrenToString(caption.childNodes,
-   
WSP.wteHandlers.aHandler),
-   imgResource = (img && img.getAttribute('resource') || 
'').replace(/(^\[:)|(\]$)/g, ''),
+   var imgResource = (img && img.getAttribute('resource') || 
'').replace(/(^\[:)|(\]$)/g, ''),
outBits = [imgResource],
figAttrs = dp.optionList,
optNames = dp.optNames,
@@ -940,7 +952,6 @@
// When processing link text, we are no longer in newline state
// since that will be preceded by "[[" or "[" text in target wikitext.
state.onStartOfLine = false;
-   state.emitNewlineOnNextToken = false;
state.wteHandlerStack.push(WSP.wteHandlers.wikilinkHandler);
var res = WSP.escapeWikiText(state, contentString);
state.wteHandlerStack.pop();

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

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

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


[MediaWiki-commits] [Gerrit] Allow adding arbitrary properties to OutputPage - change (mediawiki/core)

2013-02-22 Thread Demon (Code Review)
Demon has submitted this change and it was merged.

Change subject: Allow adding arbitrary properties to OutputPage
..


Allow adding arbitrary properties to OutputPage

Helps to pass extension-specific data

Change-Id: Iea98510abc100128733361f2d2287802f35bb359
---
M includes/OutputPage.php
1 file changed, 31 insertions(+), 0 deletions(-)

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



diff --git a/includes/OutputPage.php b/includes/OutputPage.php
index 89d7c0b..b0ee815 100644
--- a/includes/OutputPage.php
+++ b/includes/OutputPage.php
@@ -249,6 +249,11 @@
private $mRedirectedFrom = null;
 
/**
+* Additional key => value data
+*/
+   private $mProperties = array();
+
+   /**
 * Constructor for OutputPage. This should not be called directly.
 * Instead a new RequestContext should be created and it will 
implicitly create
 * a OutputPage tied to that context.
@@ -621,6 +626,32 @@
}
 
/**
+* Set an additional output property
+* @since 1.21
+*
+* @param string $name
+* @param mixed $value
+*/
+   public function setProperty( $name, $value ) {
+   $this->mProperties[$name] = $value;
+   }
+
+   /**
+* Get an additional output property
+* @since 1.21
+*
+* @param $name
+* @return mixed: Property value or null if not found
+*/
+   public function getProperty( $name ) {
+   if ( isset( $this->mProperties[$name] ) ) {
+   return $this->mProperties[$name];
+   } else {
+   return null;
+   }
+   }
+
+   /**
 * checkLastModified tells the client to use the client-cached page if
 * possible. If successful, the OutputPage is disabled so that
 * any future call to OutputPage->output() have no effect.

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iea98510abc100128733361f2d2287802f35bb359
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: MaxSem 
Gerrit-Reviewer: Anomie 
Gerrit-Reviewer: Demon 
Gerrit-Reviewer: MaxSem 
Gerrit-Reviewer: Reedy 
Gerrit-Reviewer: awjrichards 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] [FileRepo] Changed LocalFile locking to avoid breaking trans... - change (mediawiki/core)

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

Change subject: [FileRepo] Changed LocalFile locking to avoid breaking 
transactions.
..


[FileRepo] Changed LocalFile locking to avoid breaking transactions.

* Only BEGIN on lock() if no trx was in progress.
  Likewise, only COMMIT in unlock() if the lock() call started a trx.
* This can avoid problems with commiting page update transactions
  prematurely, which could leave broken page stub rows. (bug 40178)

Change-Id: I9a0adb25ee107df9a6bf70c6103ddfb7f034be25
---
M includes/filerepo/file/LocalFile.php
1 file changed, 8 insertions(+), 2 deletions(-)

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



diff --git a/includes/filerepo/file/LocalFile.php 
b/includes/filerepo/file/LocalFile.php
index ee49448..27386b4 100644
--- a/includes/filerepo/file/LocalFile.php
+++ b/includes/filerepo/file/LocalFile.php
@@ -71,6 +71,7 @@
$extraDataLoaded,  # Whether or not lazy-loaded data has been 
loaded from the database
$upgraded, # Whether the row was upgraded on load
$locked,   # True if the image row is locked
+   $lockedOwnTrx, # True if the image row is locked with a 
lock initiated transaction
$missing,  # True if file is not present in file 
system. Not to be cached in memcached
$deleted;  # Bitfield akin to rev_deleted
 
@@ -1669,7 +1670,10 @@
$dbw = $this->repo->getMasterDB();
 
if ( !$this->locked ) {
-   $dbw->begin( __METHOD__ );
+   if ( !$dbw->trxLevel() ) {
+   $dbw->begin( __METHOD__ );
+   $this->lockedOwnTrx = true;
+   }
$this->locked++;
}
 
@@ -1684,9 +1688,10 @@
function unlock() {
if ( $this->locked ) {
--$this->locked;
-   if ( !$this->locked ) {
+   if ( !$this->locked && $this->lockedOwnTrx ) {
$dbw = $this->repo->getMasterDB();
$dbw->commit( __METHOD__ );
+   $this->lockedOwnTrx = false;
}
}
}
@@ -1698,6 +1703,7 @@
$this->locked = false;
$dbw = $this->repo->getMasterDB();
$dbw->rollback( __METHOD__ );
+   $this->lockedOwnTrx = false;
}
 
/**

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9a0adb25ee107df9a6bf70c6103ddfb7f034be25
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz 
Gerrit-Reviewer: Demon 
Gerrit-Reviewer: Tim Starling 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Fix E_NOTICE and remove error suppression operators - change (mediawiki...WikiCategoryTagCloud)

2013-02-22 Thread Demon (Code Review)
Demon has submitted this change and it was merged.

Change subject: Fix E_NOTICE and remove error suppression operators
..


Fix E_NOTICE and remove error suppression operators

Change-Id: I092ba43dc065b2a4275bb8773034f6dc506129bb
---
M WikiCategoryTagCloud.php
1 file changed, 10 insertions(+), 13 deletions(-)

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



diff --git a/WikiCategoryTagCloud.php b/WikiCategoryTagCloud.php
index f93cacf..2efec19 100644
--- a/WikiCategoryTagCloud.php
+++ b/WikiCategoryTagCloud.php
@@ -72,11 +72,12 @@
 
$dbr = wfGetDB( DB_SLAVE );
 
-   $cloud_style = @$params['style'];
-   $cloud_classes = preg_split( '/\s+/', @$params['class'] );
-   array_unshift( $cloud_classes, 'tagcloud' );
-   $link_style = $params['linkstyle'];
-   $link_classes = preg_split( '/\s+/', @$params['linkclass'] );
+   $params += array(
+   'style' => '',
+   'class' => '',
+   'linkstyle' => '',
+   'linkclass' => '',
+   );
$min_count_input = getBoxExtensionOption( $input, 'min_count' );
$min_size_input = getBoxExtensionOption( $input, 'min_size' );
$increase_factor_input = getBoxExtensionOption( $input, 
'increase_factor' );
@@ -114,7 +115,7 @@
$count = $dbr->numRows( $res );
 
$htmlOut = '';
-   $htmlOut = $htmlOut . '";
+   $htmlOut .= '';
 
$min = 100;
$max = - 1;
@@ -134,13 +135,9 @@
for ( $i = 0; $i < $count; $i++ ) {
$textSize = $MIN_SIZE + ( $INCREASE_FACTOR * ( $tags[$i][1] ) ) 
/ ( $max );
$title = Title::makeTitle( NS_CATEGORY, $tags[$i][0] );
-   $style = $link_style;
-   if ( $style != '' && substr( $style, -1 ) != ';' ) {
-   $style .= ';';
-   }
-   $style .= "font-size: {$textSize}%;";
-   $currentRow = 'getLocalURL() 
. '">' .
+   $style = 'font-size: '.$textSize.'%; '.$params['linkstyle'];
+   $currentRow = '' .
$title->getText() . '  ';
$htmlOut = $htmlOut . $currentRow;
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I092ba43dc065b2a4275bb8773034f6dc506129bb
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/WikiCategoryTagCloud
Gerrit-Branch: master
Gerrit-Owner: VitaliyFilippov 
Gerrit-Reviewer: Daniel Friesen 
Gerrit-Reviewer: Demon 
Gerrit-Reviewer: VitaliyFilippov 

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


[MediaWiki-commits] [Gerrit] .pep8 configuration file - change (operations/dumps)

2013-02-22 Thread Hashar (Code Review)
Hashar has uploaded a new change for review.

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


Change subject: .pep8 configuration file
..

.pep8 configuration file

Ignores some whitespace related checks:

 W191 indentation contains tabs
 E122 continuation line missing indentation or outdented
 E128 continuation line under-indented for visual indent

Change-Id: I1b56c6d553d1b2c13282c669c50793f92023
---
A .pep8
1 file changed, 5 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/dumps 
refs/changes/69/50369/1

diff --git a/.pep8 b/.pep8
new file mode 100644
index 000..e48fd40
--- /dev/null
+++ b/.pep8
@@ -0,0 +1,5 @@
+[pep8]
+# W191 indentation contains tabs
+# E122 continuation line missing indentation or outdented
+# E128 continuation line under-indented for visual indent
+ignore = W191,E122,E128

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1b56c6d553d1b2c13282c669c50793f92023
Gerrit-PatchSet: 1
Gerrit-Project: operations/dumps
Gerrit-Branch: master
Gerrit-Owner: Hashar 

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


[MediaWiki-commits] [Gerrit] pep8: E302 expected 2 blank lines, found 1 - change (operations/dumps)

2013-02-22 Thread Hashar (Code Review)
Hashar has uploaded a new change for review.

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


Change subject: pep8: E302 expected 2 blank lines, found 1
..

pep8: E302 expected 2 blank lines, found 1

Change-Id: I0b60eccc88c32e96637abeb84c82abf099ed9a44
---
M WikiDump.py
M monitor.py
M worker.py
3 files changed, 32 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/dumps 
refs/changes/70/50370/1

diff --git a/WikiDump.py b/WikiDump.py
index cca4160..49699b4 100644
--- a/WikiDump.py
+++ b/WikiDump.py
@@ -8,13 +8,16 @@
 import threading
 import time
 
+
 def fileAge(filename):
return time.time() - os.stat(filename).st_mtime
+
 
 def atomicCreate(filename, mode='w'):
"""Create a file, aborting if it already exists..."""
fd = os.open(filename, os.O_EXCL + os.O_CREAT + os.O_WRONLY)
return os.fdopen(fd, mode)
+
 
 def shellEscape(param):
"""Escape a string parameter, or set of strings, for the shell."""
@@ -26,10 +29,12 @@
else:
return tuple([shellEscape(x) for x in param])
 
+
 def prettySize(size):
"""Return a string with an attractively formatted file size."""
quanta = ("%d bytes", "%d KB", "%0.1f MB", "%0.1f GB", "%0.1f TB")
return _prettySize(size, quanta)
+
 
 def _prettySize(size, quanta):
if size < 1024 or len(quanta) == 1:
@@ -37,15 +42,19 @@
else:
return _prettySize(size / 1024.0, quanta[1:])
 
+
 def today():
return time.strftime("%Y%m%d", time.gmtime())
+
 
 def prettyTime():
return time.strftime("%Y-%m-%d %H:%M:%S", time.gmtime())
 
+
 def prettyDate(key):
"Prettify a MediaWiki date key"
return "-".join((key[0:4], key[4:6], key[6:8]))
+
 
 def dumpFile(filename, text):
"""Dump a string to a file, as atomically as possible, via a temporary 
file in the same directory."""
@@ -61,11 +70,13 @@
# Of course nothing else will work on Windows. ;)
os.rename(tempFilename, filename)
 
+
 def readFile(filename):
file = open(filename, "r")
text = file.read()
file.close()
return text
+
 
 def dbList(filename):
"""Read database list from a file"""
@@ -78,6 +89,7 @@
infile.close()
dbs.sort()
return dbs
+
 
 class Config(object):
def __init__(self):
@@ -353,6 +365,7 @@
def lockAge(self):
return fileAge(self.lockFile())
 
+
 class LockWatchdog(threading.Thread):
"""Touch the given file every 10 seconds until asked to stop."""

@@ -389,6 +402,7 @@
"""Run me inside..."""
os.utime(self.lockfile, None)
 
+
 def cleanup():
"""Call cleanup handlers for any background threads..."""
for watchdog in LockWatchdog.threads:
diff --git a/monitor.py b/monitor.py
index 5c229a4..be2e429 100644
--- a/monitor.py
+++ b/monitor.py
@@ -5,6 +5,7 @@
 
 config = WikiDump.Config()
 
+
 def generateIndex():
running = False
states = []
@@ -34,6 +35,7 @@
"status": status,
"items": "\n".join(states)}

+
 def updateIndex():
outputFileName = os.path.join(config.publicDir, config.index)
WikiDump.dumpFile(outputFileName, generateIndex())
diff --git a/worker.py b/worker.py
index cafc246..6092f8a 100644
--- a/worker.py
+++ b/worker.py
@@ -12,6 +12,7 @@
 from os.path import dirname, exists, getsize, join, realpath
 from WikiDump import prettyTime, prettySize, shellEscape
 
+
 def splitPath(path):
# For some reason, os.path.split only does one level.
parts = []
@@ -24,6 +25,7 @@
(path, file) = os.path.split(path)
return parts
 
+
 def relativePath(path, base):
"""Return a relative path to 'path' from the directory 'base'."""
path = splitPath(path)
@@ -34,6 +36,7 @@
for prefix in base:
path.insert(0, "..")
return os.path.join(*path)
+
 
 def md5File(filename):
summer = md5.new()
@@ -46,14 +49,18 @@
infile.close()
return summer.hexdigest()
 
+
 def md5FileLine(filename):
return "%s  %s\n" % (md5File(filename), os.path.basename(filename))
+
 
 def xmlEscape(text):
return text.replace("&", "&").replace("<", "<").replace(">", 
">")
 
+
 class BackupError(Exception):
pass
+
 
 class Runner(object):
 
@@ -559,6 +566,7 @@
rssPath = self.latestPath(file + "-rss.xml")
WikiDump.dumpFile(rssPath, rssText)
 
+
 class Dump(object):
def __init__(self, desc):
self._desc = desc
@@ -608,6 +616,7 @@
def matchCheckpoint(self, checkpoint):
return checkpoint == self.__class__.__name__
 
+
 class PublicTable(Dump):
"""Dump of a table using MySQL's mysqldump utility."""
 
@@ -629,6 +638,7 @@
 
def matchCheckpoint(self, checkpoint):
return

[MediaWiki-commits] [Gerrit] pep8 whitespaces fixing - change (operations/dumps)

2013-02-22 Thread Hashar (Code Review)
Hashar has uploaded a new change for review.

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


Change subject: pep8 whitespaces fixing
..

pep8 whitespaces fixing

W293 blank line contains whitespace
W291 trailing whitespace
E101 indentation contains mixed spaces and tabs
E201 whitespace after '('
E202 whitespace before ')'

Change-Id: I198cb8ac04071f2d461990910e0a9a0ec0872cbf
---
M WikiDump.py
M monitor.py
M worker.py
3 files changed, 86 insertions(+), 86 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/dumps 
refs/changes/71/50371/1

diff --git a/WikiDump.py b/WikiDump.py
index 49699b4..ec03431 100644
--- a/WikiDump.py
+++ b/WikiDump.py
@@ -58,14 +58,14 @@
 
 def dumpFile(filename, text):
"""Dump a string to a file, as atomically as possible, via a temporary 
file in the same directory."""
-   
+
# I'd use os.tempnam() here but it whines about symlinks attacks.
tempFilename = filename + ".tmp"
-   
+
file = open(tempFilename, "wt")
file.write(text)
file.close()
-   
+
# This may fail across filesystems or on Windows.
# Of course nothing else will work on Windows. ;)
os.rename(tempFilename, filename)
@@ -130,7 +130,7 @@
}
conf = ConfigParser.SafeConfigParser(defaults)
conf.read(files)
-   
+
self.dbList = dbList(conf.get("wiki", "dblist"))
self.privateList = dbList(conf.get("wiki", "privatelist"))
biglistFile = conf.get("wiki", "biglist")
@@ -143,32 +143,32 @@
self.flaggedRevsList = dbList(flaggedRevsFile)
else:
self.flaggedRevsList = []
-   
+
self.wikiDir = conf.get("wiki", "dir")
self.forceNormal = conf.getint("wiki", "forceNormal")
self.halt = conf.getint("wiki", "halt")
-   
+
self.publicDir = conf.get("output", "public")
self.privateDir = conf.get("output", "private")
self.webRoot = conf.get("output", "webroot")
self.index = conf.get("output", "index")
self.templateDir = conf.get("output", "templateDir")
-   
+
self.adminMail = conf.get("reporting", "adminmail")
self.mailFrom = conf.get("reporting", "mailfrom")
self.smtpServer = conf.get("reporting", "smtpserver")
self.staleAge = conf.getint("reporting", "staleAge")
-   
+
self.dbUser = conf.get("database", "user")
self.dbPassword = conf.get("database", "password")
-   
+
self.php = conf.get("tools", "php")
self.bzip2 = conf.get("tools", "bzip2")
self.sevenzip = conf.get("tools", "sevenzip")
self.mysql = conf.get("tools", "mysql")
-   
+
self.keep = conf.getint("cleanup", "keep")
-   
+
def dbListByAge(self):
"""
Sort wikis in reverse order of last successful dump :
@@ -202,11 +202,11 @@
available.append((dumpFailed, age, db))
available.sort()
return [db for (failed, age, db) in available]
-   
+
def readTemplate(self, name):
template = os.path.join(self.templateDir, name)
return readFile(template)
-   
+
def mail(self, subject, body):
"""Send out a quickie email."""
message = email.MIMEText.MIMEText(body)
@@ -229,19 +229,19 @@
self.dbName = dbName
self.date = None
self.watchdog = None
-   
+
def isPrivate(self):
return self.dbName in self.config.privateList
-   
+
def isBig(self):
return self.dbName in self.config.bigList
 
def hasFlaggedRevs(self):
return self.dbName in self.config.flaggedRevsList
-   
+
def isLocked(self):
return os.path.exists(self.lockFile())
-   
+
def isStale(self):
if not self.isLocked():
return False
@@ -253,21 +253,21 @@
return False
 
# Paths and directories...
-   
+
def publicDir(self):
if self.isPrivate():
return self.privateDir()
else:
return os.path.join(self.config.publicDir, self.dbName)
-   
+
def privateDir(self):
return os.path.join(self.config.privateDir, self.dbName)
-   
+
def webDir(self):
return "/".join((self.config.webRoot, self.dbName))
-   
+
# Actions!
-   
+
def lock(self):
if not o

[MediaWiki-commits] [Gerrit] .pep8 configuration file - change (operations/dumps)

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

Change subject: .pep8 configuration file
..


.pep8 configuration file

Ignores some whitespace related checks:

 W191 indentation contains tabs
 E122 continuation line missing indentation or outdented
 E128 continuation line under-indented for visual indent

Change-Id: I1b56c6d553d1b2c13282c669c50793f92023
---
A .pep8
1 file changed, 5 insertions(+), 0 deletions(-)

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



diff --git a/.pep8 b/.pep8
new file mode 100644
index 000..e48fd40
--- /dev/null
+++ b/.pep8
@@ -0,0 +1,5 @@
+[pep8]
+# W191 indentation contains tabs
+# E122 continuation line missing indentation or outdented
+# E128 continuation line under-indented for visual indent
+ignore = W191,E122,E128

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

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

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


[MediaWiki-commits] [Gerrit] operations-dumps-pep8 is lonely and need to vote V+2 - change (integration/zuul-config)

2013-02-22 Thread Hashar (Code Review)
Hashar has uploaded a new change for review.

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


Change subject: operations-dumps-pep8 is lonely and need to vote V+2
..

operations-dumps-pep8 is lonely and need to vote V+2

Change-Id: I7088d4125928afa52ba830ab41f04e52c046e1e5
---
M layout.yaml
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/layout.yaml b/layout.yaml
index b562229..1e23bbd 100644
--- a/layout.yaml
+++ b/layout.yaml
@@ -417,7 +417,7 @@
   - operations-debs-adminbot-pyflakes
 
   - name: operations/dumps
-check:
+check-voter:
   - operations-dumps-pep8
 gate-and-submit:
   - operations-dumps-pep8

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

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

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


[MediaWiki-commits] [Gerrit] operations-dumps-pep8 is lonely and need to vote V+2 - change (integration/zuul-config)

2013-02-22 Thread Hashar (Code Review)
Hashar has submitted this change and it was merged.

Change subject: operations-dumps-pep8 is lonely and need to vote V+2
..


operations-dumps-pep8 is lonely and need to vote V+2

Change-Id: I7088d4125928afa52ba830ab41f04e52c046e1e5
---
M layout.yaml
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/layout.yaml b/layout.yaml
index b562229..1e23bbd 100644
--- a/layout.yaml
+++ b/layout.yaml
@@ -417,7 +417,7 @@
   - operations-debs-adminbot-pyflakes
 
   - name: operations/dumps
-check:
+check-voter:
   - operations-dumps-pep8
 gate-and-submit:
   - operations-dumps-pep8

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7088d4125928afa52ba830ab41f04e52c046e1e5
Gerrit-PatchSet: 1
Gerrit-Project: integration/zuul-config
Gerrit-Branch: master
Gerrit-Owner: Hashar 
Gerrit-Reviewer: Hashar 

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


[MediaWiki-commits] [Gerrit] jquery.badge: Add ability to display the number zero. - change (test/mediawiki)

2013-02-22 Thread Krinkle (Code Review)
Krinkle has uploaded a new change for review.

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


Change subject: jquery.badge: Add ability to display the number zero.
..

jquery.badge: Add ability to display the number zero.

Cupcake ipsum dolor sit. Amet tart cheesecake tiramisu chocolate cake
topping. Icing ice cream sweet roll. Biscuit dragée toffee wypas.

I love tootsie roll donut oat cake soufflé. Chupa chups danish carrot
cake. I love chocolate candy cookie sesame snaps sesame snaps lollipop
carrot cake.

Sweet roll dragée bear claw cheesecake dragée. Icing apple pie
macaroon carrot cake I love I love ice cream sweet roll. Brownie
powder bonbon marshmallow dessert liquorice I love tiramisu.

Follows-up Id5e7cbb1.

Bug: 1234
Change-Id: I88c5f819c42d9fe1468be6b2cf74413d7d6d6907
---
A smoigel/.jshintrc
A smoigel/LICENSE.txt
A smoigel/Origin.js
A smoigel/README.md
4 files changed, 118 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/test/mediawiki 
refs/changes/74/50374/1

diff --git a/smoigel/.jshintrc b/smoigel/.jshintrc
new file mode 100644
index 000..32d942e
--- /dev/null
+++ b/smoigel/.jshintrc
@@ -0,0 +1,14 @@
+{
+   // Restrict
+   "strict": false,
+
+   // Tolerate
+
+   // Environment
+   "node": true,
+   "es5": true,
+
+   // Legacy
+   "white": true,
+   "nomen": false
+}
diff --git a/smoigel/LICENSE.txt b/smoigel/LICENSE.txt
new file mode 100644
index 000..4cbe10d
--- /dev/null
+++ b/smoigel/LICENSE.txt
@@ -0,0 +1,20 @@
+Copyright (c) 2012-2013 Timo Tijhof
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/smoigel/Origin.js b/smoigel/Origin.js
new file mode 100644
index 000..88fca5d
--- /dev/null
+++ b/smoigel/Origin.js
@@ -0,0 +1,81 @@
+/*global
+   Registry, TraditionRegistry,
+   Color,
+   Fruit, PearFruit,
+   Event, BirthdayEvent, TransferEvent,
+   Basket, BigBasket, FruitBigBasket,
+   Human, MaleHuman, FemaleHuman,
+   InvalidArgumentError
+*/
+var util = require('util');
+
+/**
+ * "Origin"
+ *
+ * Based on a scene from an episode of Friday Night Dinner.
+ *
+ * @package Smoigel
+ * @author Timo Tijhof, 2013
+ */
+
+var traditions = TraditionRegistry.getSingleton();
+
+var e = new TransferEvent({
+   spec: {
+   from: {
+   instanceof: Human
+   },
+
+   items: [SmoigelBasket],
+
+   /**
+* Custom validation.
+* @param {Human} target
+* @param {Event} concurrentEvent Instance of spec.when.
+* @return {boolean}
+*/
+   to: function (target, concurrentEvent) {
+   // To the eldest son of the family, so, a male.
+   return target instanceof MaleHuman &&
+   // Validate the target is a child in the family 
of the home
+   // the party subject lives in. Not a sibling 
per se, because
+   // he or she could be either a child or a 
parent.
+   // The gift should be given to the eldest son 
of the family he lives in
+   // (not of the family the object is born in, 
per se).
+   
concurrentEvent.getSubject().getHomeFamily().getChildren().toArray().indexOf(target)
 !== -1 &&
+   // Finally confirm he has no older siblings.
+   target.siblings.sort(function (a, b) {
+   return a.age < b.age; 
+   })[0] === target;
+   },
+   when: BirthdayEvent
+   }
+});
+
+/**
+ * A non-empty basket of green-coloured fruits
+ * that are not pears.
+ *
+ * @class
+ * @extends FruitBigBasket
+ *
+ * @constructor
+ * @param {Array} items
+ * @throws {Inva

[MediaWiki-commits] [Gerrit] Remove Jasmine tests and associated setup files. - change (mediawiki...Parsoid)

2013-02-22 Thread Subramanya Sastry (Code Review)
Subramanya Sastry has uploaded a new change for review.

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


Change subject: Remove Jasmine tests and associated setup files.
..

Remove Jasmine tests and associated setup files.

* No longer used.  These tests have long since been folded
  into core parser tests.

Change-Id: I676df1e9fdcb76fb9c72ed6bdd344a06a4c29f94
---
D js/tests/package.json
D js/tests/parsoid.js
D js/tests/specs.js
D js/tests/specs/html2wt.spec.js
4 files changed, 0 insertions(+), 195 deletions(-)


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

diff --git a/js/tests/package.json b/js/tests/package.json
deleted file mode 100644
index 09dd6c8..000
--- a/js/tests/package.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
-   "name": "parsoid-tests",
-   "description": "Jasmine test for Parsoid",
-   "version": "0.0.1",
-   "dependencies": {
-   "domino": "~1.0.8",
-"jasmine-node": "~1.2.3",
-"should": "x.x.x"
-   }
-}
diff --git a/js/tests/parsoid.js b/js/tests/parsoid.js
deleted file mode 100644
index a3b3b54..000
--- a/js/tests/parsoid.js
+++ /dev/null
@@ -1,53 +0,0 @@
-var domino = require('domino');
-
-// No instance properties
-function Parsoid() {}
-
-function initParsoid() {
-   var path = require('path');
-   var fileDependencies = [];
-   var basePath = '..';
-
-   function _require(filename) {
-   var fullpath = path.join( basePath, filename );
-   fileDependencies.push( fullpath );
-   return require( fullpath );
-   }
-
-   function _import(filename, symbols) {
-   var module = _require(filename);
-   symbols.forEach(function(symbol) {
-   global[symbol] = module[symbol];
-   });
-   }
-
-   _import(path.join('lib', 'mediawiki.parser.environment.js'), 
['MWParserEnvironment']);
-   _import(path.join('lib', 'mediawiki.ParsoidConfig.js'), 
['ParsoidConfig']);
-   _import(path.join('lib', 'mediawiki.parser.js'), 
['ParserPipelineFactory']);
-   _import(path.join('lib', 'mediawiki.WikitextSerializer.js'), 
['WikitextSerializer']);
-
-   var options = {
-   fetchTemplates: false,
-   debug: false,
-   trace: false
-   };
-   var parsoidConfig = new ParsoidConfig( null, options );
-
-   MWParserEnvironment.getParserEnv( parsoidConfig, null, null, null, 
function ( err, mwEnv ) {
-   if ( err !== null ) {
-   console.error( err.toString() );
-   process.exit( 1 );
-   }
-   // "class" properties
-   Parsoid.createDocument = function(html) {
-   return domino.createDocument(html);
-   };
-   Parsoid.serializer = new WikitextSerializer({env: mwEnv});
-   } );
-}
-
-initParsoid();
-
-if (typeof module === "object") {
-   module.exports.Parsoid = Parsoid;
-}
diff --git a/js/tests/specs.js b/js/tests/specs.js
deleted file mode 100644
index d6c3255..000
--- a/js/tests/specs.js
+++ /dev/null
@@ -1,28 +0,0 @@
-// Code copied from 
http://elegantcode.com/2011/03/07/taking-baby-steps-with-node-js-bdd-style-unit-tests-with-jasmine-node-sprinkled-with-some-should/
-// and suitably adapted for our purposes
-
-var jasmine = require('jasmine-node');
-
-Object.keys(jasmine).forEach(function ( key ) {
-   global[key] = jasmine[key];
-});
-
-var isVerbose = true;
-var showColors = true;
-
-process.argv.slice(2).forEach(function(arg){
-switch(arg) {
-  case '--color': showColors = true; break;
-  case '--no-color': showColors = false; break;
-  case '--no-verbose': isVerbose = false; break;
-  }
-});
-
-jasmine.executeSpecsInFolder({
-specFolder:__dirname + '/specs',
-onComplete: function(runner, log) {
-   process.exit(runner.results().failedCount);
-},
-isVerbose: isVerbose,
-showColors: showColors
-});
diff --git a/js/tests/specs/html2wt.spec.js b/js/tests/specs/html2wt.spec.js
deleted file mode 100644
index 29b28cb..000
--- a/js/tests/specs/html2wt.spec.js
+++ /dev/null
@@ -1,104 +0,0 @@
-var should  = require('should'),
-   parsoid = require('../parsoid').Parsoid;
-
-// Helpers
-function dom(snippet) {
-   var document = parsoid.createDocument('' + snippet + 
'');
-   return document.body;
-}
-
-function wikitext(dom) {
-   var out = [];
-parsoid.serializer.serializeDOM(dom, function(c) {
-   out.push(c);
-   });
-   return out.join('');
-}
-
-function char_sequence(c, n) {
-   var buf = [];
-   for (var i = 0; i < n; i++) {
-   buf.push(c);
-   }
-   return buf.join('');
-}
-
-// Heading specs
-describe("Headings", function() {
-   // Regular non-empty specs
-   it("should be serialized proper

[MediaWiki-commits] [Gerrit] pep8: E302 expected 2 blank lines, found 1 - change (operations/dumps)

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

Change subject: pep8: E302 expected 2 blank lines, found 1
..


pep8: E302 expected 2 blank lines, found 1

Change-Id: I0b60eccc88c32e96637abeb84c82abf099ed9a44
---
M WikiDump.py
M monitor.py
M worker.py
3 files changed, 32 insertions(+), 0 deletions(-)

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



diff --git a/WikiDump.py b/WikiDump.py
index cca4160..49699b4 100644
--- a/WikiDump.py
+++ b/WikiDump.py
@@ -8,13 +8,16 @@
 import threading
 import time
 
+
 def fileAge(filename):
return time.time() - os.stat(filename).st_mtime
+
 
 def atomicCreate(filename, mode='w'):
"""Create a file, aborting if it already exists..."""
fd = os.open(filename, os.O_EXCL + os.O_CREAT + os.O_WRONLY)
return os.fdopen(fd, mode)
+
 
 def shellEscape(param):
"""Escape a string parameter, or set of strings, for the shell."""
@@ -26,10 +29,12 @@
else:
return tuple([shellEscape(x) for x in param])
 
+
 def prettySize(size):
"""Return a string with an attractively formatted file size."""
quanta = ("%d bytes", "%d KB", "%0.1f MB", "%0.1f GB", "%0.1f TB")
return _prettySize(size, quanta)
+
 
 def _prettySize(size, quanta):
if size < 1024 or len(quanta) == 1:
@@ -37,15 +42,19 @@
else:
return _prettySize(size / 1024.0, quanta[1:])
 
+
 def today():
return time.strftime("%Y%m%d", time.gmtime())
+
 
 def prettyTime():
return time.strftime("%Y-%m-%d %H:%M:%S", time.gmtime())
 
+
 def prettyDate(key):
"Prettify a MediaWiki date key"
return "-".join((key[0:4], key[4:6], key[6:8]))
+
 
 def dumpFile(filename, text):
"""Dump a string to a file, as atomically as possible, via a temporary 
file in the same directory."""
@@ -61,11 +70,13 @@
# Of course nothing else will work on Windows. ;)
os.rename(tempFilename, filename)
 
+
 def readFile(filename):
file = open(filename, "r")
text = file.read()
file.close()
return text
+
 
 def dbList(filename):
"""Read database list from a file"""
@@ -78,6 +89,7 @@
infile.close()
dbs.sort()
return dbs
+
 
 class Config(object):
def __init__(self):
@@ -353,6 +365,7 @@
def lockAge(self):
return fileAge(self.lockFile())
 
+
 class LockWatchdog(threading.Thread):
"""Touch the given file every 10 seconds until asked to stop."""

@@ -389,6 +402,7 @@
"""Run me inside..."""
os.utime(self.lockfile, None)
 
+
 def cleanup():
"""Call cleanup handlers for any background threads..."""
for watchdog in LockWatchdog.threads:
diff --git a/monitor.py b/monitor.py
index 5c229a4..be2e429 100644
--- a/monitor.py
+++ b/monitor.py
@@ -5,6 +5,7 @@
 
 config = WikiDump.Config()
 
+
 def generateIndex():
running = False
states = []
@@ -34,6 +35,7 @@
"status": status,
"items": "\n".join(states)}

+
 def updateIndex():
outputFileName = os.path.join(config.publicDir, config.index)
WikiDump.dumpFile(outputFileName, generateIndex())
diff --git a/worker.py b/worker.py
index cafc246..6092f8a 100644
--- a/worker.py
+++ b/worker.py
@@ -12,6 +12,7 @@
 from os.path import dirname, exists, getsize, join, realpath
 from WikiDump import prettyTime, prettySize, shellEscape
 
+
 def splitPath(path):
# For some reason, os.path.split only does one level.
parts = []
@@ -24,6 +25,7 @@
(path, file) = os.path.split(path)
return parts
 
+
 def relativePath(path, base):
"""Return a relative path to 'path' from the directory 'base'."""
path = splitPath(path)
@@ -34,6 +36,7 @@
for prefix in base:
path.insert(0, "..")
return os.path.join(*path)
+
 
 def md5File(filename):
summer = md5.new()
@@ -46,14 +49,18 @@
infile.close()
return summer.hexdigest()
 
+
 def md5FileLine(filename):
return "%s  %s\n" % (md5File(filename), os.path.basename(filename))
+
 
 def xmlEscape(text):
return text.replace("&", "&").replace("<", "<").replace(">", 
">")
 
+
 class BackupError(Exception):
pass
+
 
 class Runner(object):
 
@@ -559,6 +566,7 @@
rssPath = self.latestPath(file + "-rss.xml")
WikiDump.dumpFile(rssPath, rssText)
 
+
 class Dump(object):
def __init__(self, desc):
self._desc = desc
@@ -608,6 +616,7 @@
def matchCheckpoint(self, checkpoint):
return checkpoint == self.__class__.__name__
 
+
 class PublicTable(Dump):
"""Dump of a table using MySQL's mysqldump utility."""
 
@@ -629,6 +638,7 @@
 
def matchCheckpoint(self, checkpoint):
return checkpoint == self.__class__

[MediaWiki-commits] [Gerrit] (bug 44893) Set up redirect from tartupeedia.ee to a page on... - change (operations/apache-config)

2013-02-22 Thread Dzahn (Code Review)
Dzahn has submitted this change and it was merged.

Change subject: (bug 44893) Set up redirect from tartupeedia.ee to a page on 
etwiki
..


(bug 44893) Set up redirect from tartupeedia.ee to a page on etwiki

Change-Id: I56871eebce06a81ef5f73f920ca0805111c47c45
---
M redirects.conf
1 file changed, 5 insertions(+), 0 deletions(-)

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



diff --git a/redirects.conf b/redirects.conf
index e32d657..1bea954 100644
--- a/redirects.conf
+++ b/redirects.conf
@@ -46,6 +46,7 @@
 sep11.wikipedia.org \
 sources.wikipedia.org \
 status.wikipedia.org \
+tartupeedia.ee *.tartupeedia.ee \
 textbook.wikipedia.org \
 vikimedija.org *.vikimedija.org \
 wicipediacymraeg.org *.wicipediacymraeg.org \
@@ -615,6 +616,10 @@
 RewriteCond %{HTTP_HOST} =wlm.wikimedia.org
 RewriteRule ^(.*)$ http://toolserver.org/~erfgoed$1 [R=301,L,NE]
 
+# tartupeedia.ee (WMEE-owned domain) - bug 44893
+RewriteCond %{HTTP_HOST} (.*)tartupeedia\.ee$
+RewriteRule ^(.*)$ https://et.wikipedia.org/wiki/Portaal:Tartupeedia 
[R=301,L]
+
 # Send anything else that matched the ServerAlias to en.wikipedia.org
 RewriteRule ^(.*)$ http://en.wikipedia.org$1 [R=301,L,NE]
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I56871eebce06a81ef5f73f920ca0805111c47c45
Gerrit-PatchSet: 5
Gerrit-Project: operations/apache-config
Gerrit-Branch: master
Gerrit-Owner: Alex Monk 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: Jeremyb 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] pep8 whitespaces fixing - change (operations/dumps)

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

Change subject: pep8 whitespaces fixing
..


pep8 whitespaces fixing

W293 blank line contains whitespace
W291 trailing whitespace
E101 indentation contains mixed spaces and tabs
E201 whitespace after '('
E202 whitespace before ')'

Change-Id: I198cb8ac04071f2d461990910e0a9a0ec0872cbf
---
M WikiDump.py
M monitor.py
M worker.py
3 files changed, 86 insertions(+), 86 deletions(-)

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



diff --git a/WikiDump.py b/WikiDump.py
index 49699b4..ec03431 100644
--- a/WikiDump.py
+++ b/WikiDump.py
@@ -58,14 +58,14 @@
 
 def dumpFile(filename, text):
"""Dump a string to a file, as atomically as possible, via a temporary 
file in the same directory."""
-   
+
# I'd use os.tempnam() here but it whines about symlinks attacks.
tempFilename = filename + ".tmp"
-   
+
file = open(tempFilename, "wt")
file.write(text)
file.close()
-   
+
# This may fail across filesystems or on Windows.
# Of course nothing else will work on Windows. ;)
os.rename(tempFilename, filename)
@@ -130,7 +130,7 @@
}
conf = ConfigParser.SafeConfigParser(defaults)
conf.read(files)
-   
+
self.dbList = dbList(conf.get("wiki", "dblist"))
self.privateList = dbList(conf.get("wiki", "privatelist"))
biglistFile = conf.get("wiki", "biglist")
@@ -143,32 +143,32 @@
self.flaggedRevsList = dbList(flaggedRevsFile)
else:
self.flaggedRevsList = []
-   
+
self.wikiDir = conf.get("wiki", "dir")
self.forceNormal = conf.getint("wiki", "forceNormal")
self.halt = conf.getint("wiki", "halt")
-   
+
self.publicDir = conf.get("output", "public")
self.privateDir = conf.get("output", "private")
self.webRoot = conf.get("output", "webroot")
self.index = conf.get("output", "index")
self.templateDir = conf.get("output", "templateDir")
-   
+
self.adminMail = conf.get("reporting", "adminmail")
self.mailFrom = conf.get("reporting", "mailfrom")
self.smtpServer = conf.get("reporting", "smtpserver")
self.staleAge = conf.getint("reporting", "staleAge")
-   
+
self.dbUser = conf.get("database", "user")
self.dbPassword = conf.get("database", "password")
-   
+
self.php = conf.get("tools", "php")
self.bzip2 = conf.get("tools", "bzip2")
self.sevenzip = conf.get("tools", "sevenzip")
self.mysql = conf.get("tools", "mysql")
-   
+
self.keep = conf.getint("cleanup", "keep")
-   
+
def dbListByAge(self):
"""
Sort wikis in reverse order of last successful dump :
@@ -202,11 +202,11 @@
available.append((dumpFailed, age, db))
available.sort()
return [db for (failed, age, db) in available]
-   
+
def readTemplate(self, name):
template = os.path.join(self.templateDir, name)
return readFile(template)
-   
+
def mail(self, subject, body):
"""Send out a quickie email."""
message = email.MIMEText.MIMEText(body)
@@ -229,19 +229,19 @@
self.dbName = dbName
self.date = None
self.watchdog = None
-   
+
def isPrivate(self):
return self.dbName in self.config.privateList
-   
+
def isBig(self):
return self.dbName in self.config.bigList
 
def hasFlaggedRevs(self):
return self.dbName in self.config.flaggedRevsList
-   
+
def isLocked(self):
return os.path.exists(self.lockFile())
-   
+
def isStale(self):
if not self.isLocked():
return False
@@ -253,21 +253,21 @@
return False
 
# Paths and directories...
-   
+
def publicDir(self):
if self.isPrivate():
return self.privateDir()
else:
return os.path.join(self.config.publicDir, self.dbName)
-   
+
def privateDir(self):
return os.path.join(self.config.privateDir, self.dbName)
-   
+
def webDir(self):
return "/".join((self.config.webRoot, self.dbName))
-   
+
# Actions!
-   
+
def lock(self):
if not os.path.isdir(self.privateDir(

[MediaWiki-commits] [Gerrit] Fix exception handling, lint - change (operations/puppet)

2013-02-22 Thread MaxSem (Code Review)
MaxSem has uploaded a new change for review.

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


Change subject: Fix exception handling, lint
..

Fix exception handling, lint

Change-Id: I5748b374f37d886c80a66afc6bf6a91f22058a50
---
M files/nagios/check_solr
1 file changed, 13 insertions(+), 7 deletions(-)


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

diff --git a/files/nagios/check_solr b/files/nagios/check_solr
index bcf3f3d..cab3499 100755
--- a/files/nagios/check_solr
+++ b/files/nagios/check_solr
@@ -1,7 +1,6 @@
 #!/usr/bin/env python
 
 import urllib2
-import sqlite3
 import xml.etree.ElementTree as ET
 from optparse import OptionParser
 import json
@@ -32,6 +31,7 @@
 warnings = []
 unknowns = []
 
+
 def http_get(path):
 url = 'http://' + host + '/solr/' + path
 return urllib2.urlopen(url, None, cmd_options.timeout).read()
@@ -46,12 +46,12 @@
 warnings.append(message % (value, limits[1]))
 
 
-def check_stat(entry, statName, limits, stat_name):
+def check_stat(entry, stat, limits, stat_name):
 if limits == None:
 return
 stats = entry.find('stats')
 for node in stats.getiterator('stat'):
-if node.attrib['name'] == statName:
+if node.attrib['name'] == stat:
 check_value(node.text, limits, stat_name + ' is %s (gt %s)')
 return
 unknowns.append('Parameter "%s" not found in response' % stat)
@@ -125,16 +125,22 @@
 return 0
 
 
+def format_exception(ex):
+return '%s: %s' % (type(ex).__name__, ex)
+
+
 try:
 check_all_stats()
 check_replication()
 
-except Exception as err:
-(e, ) = err.args
-if isinstance(err, urllib2.URLError) and e.errno == 115:
+except urllib2.URLError as ex:
+(e, ) = ex.args
+if e.errno == 115:
 msg = 'Request timeout after %ds' % cmd_options.timeout
 else:
-msg = '%s: %s' % (type(err).__name__, e)
+msg = format_exception(ex)
 unknowns.append(msg)
+except Exception as ex:
+unknowns.append(format_exception(ex))
 
 exit(process_results())

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

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

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


[MediaWiki-commits] [Gerrit] (bug 44961) 'Patch Set' no more part of comments - change (integration/zuul-config)

2013-02-22 Thread Hashar (Code Review)
Hashar has submitted this change and it was merged.

Change subject: (bug 44961) 'Patch Set' no more part of comments
..


(bug 44961) 'Patch Set' no more part of comments

https://gerrit.wikimedia.org/r/#/c/50041 makes it so Gerrit no more
append 'Patchset #:' before a user comment.  This has been the case
since the last upgrade.

This patch restore the regex matching 'recheck' to the old behavior.

This reverts commits:
 960e79466b56f8b547b477864a80f98afd0b0082
 6fc5d865e4427b5baff78e56da75018d31db4d37.

Change-Id: I05001c920471ba33b94174702c8afd59f762e3e5
---
M layout.yaml
1 file changed, 3 insertions(+), 3 deletions(-)

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



diff --git a/layout.yaml b/layout.yaml
index 1e23bbd..200e8dc 100644
--- a/layout.yaml
+++ b/layout.yaml
@@ -36,7 +36,7 @@
 trigger:
   - event: patchset-created
   - event: comment-added
-comment_filter: (?im)^Patch Set \d+:\n\n\s*recheck\.?\s*$
+comment_filter: (?i)^\s*recheck\.?\s*$
 
   # Pipeline doing prechecks such as syntax linting
   # DOES report back to Gerrit.
@@ -45,7 +45,7 @@
 trigger:
   - event: patchset-created
   - event: comment-added
-comment_filter: (?im)^Patch Set \d+:\n\n\s*recheck\.?\s*$
+comment_filter: (?i)^\s*recheck\.?\s*$
 success:
   # Prevents people from being able to submit a change
   # before unit tests have been run since submit requires V+2.
@@ -64,7 +64,7 @@
 trigger:
   - event: patchset-created
   - event: comment-added
-comment_filter: (?im)^Patch Set \d+:\n\n\s*recheck\.?\s*$
+comment_filter: (?i)^\s*recheck\.?\s*$
 success:
   verified: 2
   code-review: 0

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I05001c920471ba33b94174702c8afd59f762e3e5
Gerrit-PatchSet: 2
Gerrit-Project: integration/zuul-config
Gerrit-Branch: master
Gerrit-Owner: Hashar 
Gerrit-Reviewer: Hashar 

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


[MediaWiki-commits] [Gerrit] Additional tests to catch future Parsoid regressions. - change (mediawiki/core)

2013-02-22 Thread Subramanya Sastry (Code Review)
Subramanya Sastry has uploaded a new change for review.

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


Change subject: Additional tests to catch future Parsoid regressions.
..

Additional tests to catch future Parsoid regressions.

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


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/77/50377/1

diff --git a/tests/parser/parserTests.txt b/tests/parser/parserTests.txt
index df8b9e2..d63fb3b 100644
--- a/tests/parser/parserTests.txt
+++ b/tests/parser/parserTests.txt
@@ -2648,6 +2648,21 @@
 
 !! end
 
+!!test
+Text in square brackets that is not a link should parse as text
+!!input
+[foo]
+[{{echo|foo}}]
+[url={{echo|foo}}]
+[url=http://example.com]
+!!result
+[foo]
+[foo]
+[url=foo]
+[url=http://example.com";>http://example.com]
+
+!!end
+
 !! test
 URL-encoding in URL functions (single parameter)
 !! input
@@ -7050,6 +7065,15 @@
 
 !!end
 
+!!test
+Parsoid: Image caption containing leading space
+(The leading space should not trigger nowiki escaping in wt2wt mode)
+!! input
+[[Image:Foobar.jpg|thumb| bar]]
+!! result
+http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg"; 
width="180" height="20" class="thumbimage" 
srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, 
http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" />  
bar
+
+!!end
 
 !! test
 Bug 3090: External links other than http: in image captions

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1fd9bb201983769d19c1b8fd5a5422f89258722c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Subramanya Sastry 

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


[MediaWiki-commits] [Gerrit] Partial revert of change 40557 - restored previous English-l... - change (mediawiki...SemanticForms)

2013-02-22 Thread Yaron Koren (Code Review)
Yaron Koren has uploaded a new change for review.

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


Change subject: Partial revert of change 40557 - restored previous 
English-language value
..

Partial revert of change 40557 - restored previous English-language value

...for the message 'sf_createform_allowmultiple'. Also tried to restore as
many values in other languages as possible.

Change-Id: I53adcde9b19ef6263cbc79e93d5d812390325deb
---
M languages/SF_Messages.php
1 file changed, 35 insertions(+), 35 deletions(-)


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

diff --git a/languages/SF_Messages.php b/languages/SF_Messages.php
index 5255dba..7ca0aa7 100644
--- a/languages/SF_Messages.php
+++ b/languages/SF_Messages.php
@@ -87,7 +87,7 @@
'sf_createform_nameinputdesc'=> '(the form is usually given the 
same name as its main template):',
'sf_createform_template' => 'Template:',
'sf_createform_templatelabelinput'   => 'Template label (optional):',
-   'sf_createform_allowmultiple'=> 'Allow for multiple (as opposed 
to zero) instances of this template in the created page',
+   'sf_createform_allowmultiple'=> 'Allow for multiple (or zero) 
instances of this template in the created page',
'sf_createform_field'=> 'Field:',
'sf_createform_fieldprop'=> 'This field defines the 
property $1, of type $2.',
'sf_createform_fieldproplist'=> 'This field defines a list of 
elements that have the property $1, of type $2.',
@@ -363,7 +363,7 @@
'sf_createform_nameinputdesc' => '(Konventë është që emri të formuar 
pas shabllonin kryesor ajo krijohet):', # Fuzzy
'sf_createform_template' => 'Stampa:',
'sf_createform_templatelabelinput' => 'Etiketa Template (opsional):',
-   'sf_createform_allowmultiple' => 'Lejo për të shumta (ose zero) raste 
të këtij template në faqen e krijuar', # Fuzzy
+   'sf_createform_allowmultiple' => 'Lejo për të shumta (ose zero) raste 
të këtij template në faqen e krijuar',
'sf_createform_field' => 'Fusha:',
'sf_createform_fieldprop' => 'Kjo fushë definon pronën $1, e llojit 
$2.',
'sf_createform_fieldproplist' => 'Kjo fushë përcakton një listë të 
elementëve që kanë pronë $1, e llojit $2.',
@@ -434,7 +434,7 @@
'sf_createform_nameinputdesc' => '(النموذج تتم تسميته عادة مثل قالبه 
الرئيسي):',
'sf_createform_template' => 'القالب:',
'sf_createform_templatelabelinput' => 'علامة القالب (اختياري):',
-   'sf_createform_allowmultiple' => 'السماح بوجود عدة (أو صفر) نسخة من هذا 
القالب في الصفحة المنشأة', # Fuzzy
+   'sf_createform_allowmultiple' => 'السماح بوجود عدة (أو صفر) نسخة من هذا 
القالب في الصفحة المنشأة',
'sf_createform_field' => 'الحقل:',
'sf_createform_fieldprop' => 'هذا الحقل يعرف الخاصية $1، من نوع $2.',
'sf_createform_fieldproplist' => 'هذا الحقل يعرف قائمة من العناصر التي 
تمتلك الخاصية $1، من نوع $2.',
@@ -591,7 +591,7 @@
'sf_createform_nameinput' => 'اسم الاستمارة',
'sf_createform_template' => 'القالب:',
'sf_createform_templatelabelinput' => 'علامة القالب (اختياري):',
-   'sf_createform_allowmultiple' => 'السماح بوجود عدة (أو صفر) نسخة من هذا 
القالب فى الصفحة المنشأة', # Fuzzy
+   'sf_createform_allowmultiple' => 'السماح بوجود عدة (أو صفر) نسخة من هذا 
القالب فى الصفحة المنشأة', 
'sf_createform_field' => 'الحقل:',
'sf_createform_fieldprop' => 'هذا الحقل يعرف الخاصية $1، من نوع $2.',
'sf_createform_fieldproplist' => 'هذا الحقل يعرف قائمة من العناصر التى 
تمتلك الخاصية $1، من نوع $2.',
@@ -835,7 +835,7 @@
'sf_createform_nameinputdesc' => '(форма звычайна атрымлівае тую ж 
назву, што і яе асноўны шаблён):',
'sf_createform_template' => 'Шаблён:',
'sf_createform_templatelabelinput' => 'Пазнака шаблёну (неабавязкова):',
-   'sf_createform_allowmultiple' => 'Дазволіць некалькі (ці нуль) 
экзэмпляраў гэтага шаблёну ў ствараемай старонцы', # Fuzzy
+   'sf_createform_allowmultiple' => 'Дазволіць некалькі (ці нуль) 
экзэмпляраў гэтага шаблёну ў ствараемай старонцы', 
'sf_createform_field' => 'Поле:',
'sf_createform_fieldprop' => 'Гэта поле вызначае ўласьцівасьць $1 тыпу 
$2.',
'sf_createform_fieldproplist' => 'Гэта поле вызначае сьпіс элемэнтаў, 
якія маюць уласьцівасьць $1 тыпу $2.',
@@ -1088,7 +1088,7 @@
'sf_createform_nameinputdesc' => '(ar boaz eo envel ar furmskrid diouzh 
anv e batrom pennañ) :',
'sf_createform_template' => 'Patrom :',
'sf_createform_templatelabelinput' => 'Tikedenn patrom (diret) :',
-   'sf_createform_allowmultiple' => 'Aotren a ra eiladoù eus ar patrom-mañ 
(pe hini ebet) er bajenn grouet', # Fuzzy
+   'sf_createform_allowmultiple' => 'Aotren a ra eiladoù eus ar patrom-mañ 
(pe hi

[MediaWiki-commits] [Gerrit] Partial revert of change 40557 - restored previous English-l... - change (mediawiki...SemanticForms)

2013-02-22 Thread Yaron Koren (Code Review)
Yaron Koren has submitted this change and it was merged.

Change subject: Partial revert of change 40557 - restored previous 
English-language value
..


Partial revert of change 40557 - restored previous English-language value

...for the message 'sf_createform_allowmultiple'. Also tried to restore as
many values in other languages as possible.

Change-Id: I53adcde9b19ef6263cbc79e93d5d812390325deb
---
M languages/SF_Messages.php
1 file changed, 35 insertions(+), 35 deletions(-)

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



diff --git a/languages/SF_Messages.php b/languages/SF_Messages.php
index 5255dba..7ca0aa7 100644
--- a/languages/SF_Messages.php
+++ b/languages/SF_Messages.php
@@ -87,7 +87,7 @@
'sf_createform_nameinputdesc'=> '(the form is usually given the 
same name as its main template):',
'sf_createform_template' => 'Template:',
'sf_createform_templatelabelinput'   => 'Template label (optional):',
-   'sf_createform_allowmultiple'=> 'Allow for multiple (as opposed 
to zero) instances of this template in the created page',
+   'sf_createform_allowmultiple'=> 'Allow for multiple (or zero) 
instances of this template in the created page',
'sf_createform_field'=> 'Field:',
'sf_createform_fieldprop'=> 'This field defines the 
property $1, of type $2.',
'sf_createform_fieldproplist'=> 'This field defines a list of 
elements that have the property $1, of type $2.',
@@ -363,7 +363,7 @@
'sf_createform_nameinputdesc' => '(Konventë është që emri të formuar 
pas shabllonin kryesor ajo krijohet):', # Fuzzy
'sf_createform_template' => 'Stampa:',
'sf_createform_templatelabelinput' => 'Etiketa Template (opsional):',
-   'sf_createform_allowmultiple' => 'Lejo për të shumta (ose zero) raste 
të këtij template në faqen e krijuar', # Fuzzy
+   'sf_createform_allowmultiple' => 'Lejo për të shumta (ose zero) raste 
të këtij template në faqen e krijuar',
'sf_createform_field' => 'Fusha:',
'sf_createform_fieldprop' => 'Kjo fushë definon pronën $1, e llojit 
$2.',
'sf_createform_fieldproplist' => 'Kjo fushë përcakton një listë të 
elementëve që kanë pronë $1, e llojit $2.',
@@ -434,7 +434,7 @@
'sf_createform_nameinputdesc' => '(النموذج تتم تسميته عادة مثل قالبه 
الرئيسي):',
'sf_createform_template' => 'القالب:',
'sf_createform_templatelabelinput' => 'علامة القالب (اختياري):',
-   'sf_createform_allowmultiple' => 'السماح بوجود عدة (أو صفر) نسخة من هذا 
القالب في الصفحة المنشأة', # Fuzzy
+   'sf_createform_allowmultiple' => 'السماح بوجود عدة (أو صفر) نسخة من هذا 
القالب في الصفحة المنشأة',
'sf_createform_field' => 'الحقل:',
'sf_createform_fieldprop' => 'هذا الحقل يعرف الخاصية $1، من نوع $2.',
'sf_createform_fieldproplist' => 'هذا الحقل يعرف قائمة من العناصر التي 
تمتلك الخاصية $1، من نوع $2.',
@@ -591,7 +591,7 @@
'sf_createform_nameinput' => 'اسم الاستمارة',
'sf_createform_template' => 'القالب:',
'sf_createform_templatelabelinput' => 'علامة القالب (اختياري):',
-   'sf_createform_allowmultiple' => 'السماح بوجود عدة (أو صفر) نسخة من هذا 
القالب فى الصفحة المنشأة', # Fuzzy
+   'sf_createform_allowmultiple' => 'السماح بوجود عدة (أو صفر) نسخة من هذا 
القالب فى الصفحة المنشأة', 
'sf_createform_field' => 'الحقل:',
'sf_createform_fieldprop' => 'هذا الحقل يعرف الخاصية $1، من نوع $2.',
'sf_createform_fieldproplist' => 'هذا الحقل يعرف قائمة من العناصر التى 
تمتلك الخاصية $1، من نوع $2.',
@@ -835,7 +835,7 @@
'sf_createform_nameinputdesc' => '(форма звычайна атрымлівае тую ж 
назву, што і яе асноўны шаблён):',
'sf_createform_template' => 'Шаблён:',
'sf_createform_templatelabelinput' => 'Пазнака шаблёну (неабавязкова):',
-   'sf_createform_allowmultiple' => 'Дазволіць некалькі (ці нуль) 
экзэмпляраў гэтага шаблёну ў ствараемай старонцы', # Fuzzy
+   'sf_createform_allowmultiple' => 'Дазволіць некалькі (ці нуль) 
экзэмпляраў гэтага шаблёну ў ствараемай старонцы', 
'sf_createform_field' => 'Поле:',
'sf_createform_fieldprop' => 'Гэта поле вызначае ўласьцівасьць $1 тыпу 
$2.',
'sf_createform_fieldproplist' => 'Гэта поле вызначае сьпіс элемэнтаў, 
якія маюць уласьцівасьць $1 тыпу $2.',
@@ -1088,7 +1088,7 @@
'sf_createform_nameinputdesc' => '(ar boaz eo envel ar furmskrid diouzh 
anv e batrom pennañ) :',
'sf_createform_template' => 'Patrom :',
'sf_createform_templatelabelinput' => 'Tikedenn patrom (diret) :',
-   'sf_createform_allowmultiple' => 'Aotren a ra eiladoù eus ar patrom-mañ 
(pe hini ebet) er bajenn grouet', # Fuzzy
+   'sf_createform_allowmultiple' => 'Aotren a ra eiladoù eus ar patrom-mañ 
(pe hini ebet) er bajenn grouet',
'sf_createform

[MediaWiki-commits] [Gerrit] Configure hooks-bugzilla plugin for gerrit - change (operations/puppet)

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

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


Change subject: Configure hooks-bugzilla plugin for gerrit
..

Configure hooks-bugzilla plugin for gerrit

Change-Id: I4120b7b89e737aae430b1328f1edc8ecee9d5457
---
M manifests/gerrit.pp
M templates/gerrit/gerrit.config.erb
M templates/gerrit/secure.config.erb
3 files changed, 6 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/79/50379/1

diff --git a/manifests/gerrit.pp b/manifests/gerrit.pp
index 2bd75be..94a3c57 100644
--- a/manifests/gerrit.pp
+++ b/manifests/gerrit.pp
@@ -28,6 +28,7 @@
$dbname = $db_name
$dbuser = $db_user
$dbpass = $passwords::gerrit::gerrit_db_pass
+   $bzpass = $passwords::gerrit::gerrit_bz_pass
 
# Setup LDAP
include role::ldap::config::labs
diff --git a/templates/gerrit/gerrit.config.erb 
b/templates/gerrit/gerrit.config.erb
index d22ce6e..0dcc0eb 100644
--- a/templates/gerrit/gerrit.config.erb
+++ b/templates/gerrit/gerrit.config.erb
@@ -101,3 +101,6 @@
 [changeMerge]
test = true
checkFrequency = 0
+[bugzilla]
+   url = https://bugzilla.wikimedia.org
+   username = gerritad...@wikimedia.org
diff --git a/templates/gerrit/secure.config.erb 
b/templates/gerrit/secure.config.erb
index 1690a9f..50b78dc 100644
--- a/templates/gerrit/secure.config.erb
+++ b/templates/gerrit/secure.config.erb
@@ -5,3 +5,5 @@
password = <%= ldap_proxyagent_pass %>
 [auth]
registerEmailPrivateKey = <%= email_key %>
+[bugzilla]
+   password = <%= bzpass %>

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

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

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


[MediaWiki-commits] [Gerrit] Add Special:ItemsWithoutSitelinks that list all items withou... - change (mediawiki...Wikibase)

2013-02-22 Thread John Erling Blad (Code Review)
John Erling Blad has submitted this change and it was merged.

Change subject: Add Special:ItemsWithoutSitelinks that list all items without 
any site link
..


Add Special:ItemsWithoutSitelinks that list all items without any site link

Edits also the label of Special:EntitiesWithoutLabel to be consistent with
the others special page names.

Change-Id: I032208726699d104c8ee76ef97e3f61b5f78f334
---
M repo/Wikibase.i18n.alias.php
M repo/Wikibase.i18n.php
M repo/Wikibase.php
M repo/includes/specials/SpecialEntitiesWithoutLabel.php
A repo/includes/specials/SpecialItemsWithoutSitelinks.php
M repo/includes/store/EntityPerPage.php
M repo/includes/store/sql/EntityPerPageTable.php
7 files changed, 158 insertions(+), 6 deletions(-)

Approvals:
  John Erling Blad: Verified; Looks good to me, approved



diff --git a/repo/Wikibase.i18n.alias.php b/repo/Wikibase.i18n.alias.php
index 3e652a7..ab4fc8d 100644
--- a/repo/Wikibase.i18n.alias.php
+++ b/repo/Wikibase.i18n.alias.php
@@ -26,6 +26,7 @@
'SetDescription' => array( 'SetDescription' ),
'SetAliases' => array( 'SetAliases' ),
'EntitiesWithoutLabel' => array( 'EntitiesWithoutLabel' ),
+   'ItemsWithoutSitelinks' => array( 'ItemsWithoutSitelinks' ),
 );
 
 /** Arabic (العربية) */
@@ -195,4 +196,4 @@
'ItemDisambiguation' => array( '项目消歧义' ),
'ListDatatypes' => array( '列出数据类型' ),
'SetLabel' => array( '设置标签' ),
-);
\ No newline at end of file
+);
diff --git a/repo/Wikibase.i18n.php b/repo/Wikibase.i18n.php
index a98c028..224f97c 100644
--- a/repo/Wikibase.i18n.php
+++ b/repo/Wikibase.i18n.php
@@ -172,11 +172,12 @@
'wikibase-listdatatypes-intro' => 'This is a list of all datatypes 
currently in use on this installation:',
'wikibase-history-title-with-label' => 'Revision history of "$2" ($1)',
'wikibase-history-title-without-label' => 'Revision history of ($1)',
-   'special-entitieswithoutlabel' => 'List of entities without label',
+   'special-entitieswithoutlabel' => 'Entities without label',
'wikibase-entitieswithoutlabel-legend' => 'Get list of entities without 
label',
'wikibase-entitieswithoutlabel-label-language' => 'Language:',
'wikibase-entitieswithoutlabel-submit' => 'Find',
'wikibase-entitieswithoutlabel-invalid-language' => '"$1" is not a 
valid language code.',
+   'special-itemswithoutsitelinks' => 'Items without sitelinks',
'special-entitydata' => 'Entity data',
'wikibase-entitydata-not-found' => "No entity with ID $1 was found.",
'wikibase-entitydata-bad-revision' => "Can't show revision $2 of entity 
$1.",
@@ -585,6 +586,7 @@
'wikibase-entitieswithoutlabel-label-language' => 'Label for the input 
field to change the language.',
'wikibase-entitieswithoutlabel-submit' => 'Label for the button that 
activate the action.',
'wikibase-entitieswithoutlabel-invalid-language' => 'Error message 
shown when the language code passed in parameter is invalid. $1 is invalid 
language code.',
+   'special-itemswithoutsitelinks' => 'This special page returns a list of 
items without any site link',
'special-entitydata' => 'Title for special page that provides a linked 
data interface and easy way to get the JSON data representation for an entity.',
'wikibase-entitydata-not-found' => 'Error shown when no entity with the 
given ID could be found. Paramters:
 * $1 is the given ID',
diff --git a/repo/Wikibase.php b/repo/Wikibase.php
index cb3eae7..2111cee 100644
--- a/repo/Wikibase.php
+++ b/repo/Wikibase.php
@@ -157,6 +157,8 @@
 $wgAutoloadClasses['Wikibase\ItemHandler'] = $dir 
. 'includes/content/ItemHandler.php';
 $wgAutoloadClasses['Wikibase\PropertyContent'] = $dir 
. 'includes/content/PropertyContent.php';
 $wgAutoloadClasses['Wikibase\PropertyHandler'] = $dir 
. 'includes/content/PropertyHandler.php';
+$wgAutoloadClasses['Wikibase\QueryContent']= $dir . 
'includes/content/QueryContent.php';
+$wgAutoloadClasses['Wikibase\QueryHandler']= $dir . 
'includes/content/QueryHandler.php';
 
 // includes/specials
 $wgAutoloadClasses['SpecialCreateEntity']  = $dir 
. 'includes/specials/SpecialCreateEntity.php';
@@ -170,6 +172,7 @@
 $wgAutoloadClasses['SpecialSetDescription']= $dir . 
'includes/specials/SpecialSetDescription.php';
 $wgAutoloadClasses['SpecialSetAliases']= $dir 
. 'includes/specials/SpecialSetAliases.php';
 $wgAutoloadClasses['SpecialEntitiesWithoutLabel']  = $dir . 
'includes/specials/SpecialEntitiesWithoutLabel.php';
+$wgAutoloadClasses['SpecialItemsWithoutSitelinks'] = $dir . 
'includes/specials/SpecialItemsWithoutSitelinks.php';
 $wgAutoloadClasses['SpecialListDatatypes'] = 

[MediaWiki-commits] [Gerrit] Fix buggy token passing in parserFunctions expandKV and rejo... - change (mediawiki...Parsoid)

2013-02-22 Thread Subramanya Sastry (Code Review)
Subramanya Sastry has uploaded a new change for review.

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


Change subject: Fix buggy token passing in parserFunctions expandKV and 
rejoinKV.
..

Fix buggy token passing in parserFunctions expandKV and rejoinKV.

* expandKV and rejoinKV were not always passing tokens back in
  { tokens: token-array } form to the callbacks.  This was caught
  by verifyTokensIntegrity check in Async TTM on the following
  wikitext snippet from en:England_national_football_team

{{Football kit |
| pattern_la= |pattern_b= |pattern_ra= |pattern_sh= |pattern_so=
| leftarm=fff|body=fff|rightarm=fff|shorts=fff|socks=00|title= Home
}}

* Surprisingly parsing the page via localhost:8000/en/... didn't
  report the error to the console.  Neither did a rt-run through
  roundtrip-test.js.  Need to check where the error went in case
  the error message got lost rather than a different code path
  getting exercised because of async. related reasons.

* No change in parser test results.

Change-Id: I15e4f922f259382e3241b2da7a8a22ec9b498841
---
M js/lib/ext.core.ParserFunctions.js
M js/lib/mediawiki.TokenTransformManager.js
2 files changed, 6 insertions(+), 3 deletions(-)


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

diff --git a/js/lib/ext.core.ParserFunctions.js 
b/js/lib/ext.core.ParserFunctions.js
index ef3ce69..0c27de4 100644
--- a/js/lib/ext.core.ParserFunctions.js
+++ b/js/lib/ext.core.ParserFunctions.js
@@ -28,7 +28,9 @@
 
 // Temporary helper.
 ParserFunctions.prototype._rejoinKV = function ( trim, k, v ) {
-   if ( k.length ) {
+   if ( k.constructor === String && k.length > 0 ) {
+   return [k].concat( ['='], v );
+   } else if (k.constructor === Array && k.length > 0) {
return k.concat( ['='], v );
} else {
return trim ? Util.tokenTrim(v) : v;
@@ -47,7 +49,7 @@
if ( kv === undefined ) {
cb( { tokens: [ defaultValue || '' ] } );
} else if ( kv.constructor === String ) {
-   return cb( kv );
+   return cb( { tokens: [kv] } );
} else if ( kv.k.constructor === String && kv.v.constructor === String 
) {
if ( kv.k ) {
cb( { tokens: [kv.k + '=' + kv.v] } );
diff --git a/js/lib/mediawiki.TokenTransformManager.js 
b/js/lib/mediawiki.TokenTransformManager.js
index 82e4e87..d2564f3 100644
--- a/js/lib/mediawiki.TokenTransformManager.js
+++ b/js/lib/mediawiki.TokenTransformManager.js
@@ -34,7 +34,8 @@
}
 
if (ret.tokens && ret.tokens.constructor !== Array) {
-   console.warn( 'ret.tokens not an array: ' + JSON.stringify( ret 
) );
+   console.warn( 'ret.tokens not an array: ' + 
ret.tokens.constructor.name);
+   console.warn( 'ret.tokens: ' + JSON.stringify( ret ) );
console.trace();
ret.tokens = [ ret.tokens ];
}

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

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

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


[MediaWiki-commits] [Gerrit] Remove line that disables DISTINCT with blobs - change (mediawiki...SemanticMediaWiki)

2013-02-22 Thread Markus Kroetzsch (Code Review)
Markus Kroetzsch has uploaded a new change for review.

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


Change subject: Remove line that disables DISTINCT with blobs
..

Remove line that disables DISTINCT with blobs

This fixes bug 45129.

Change-Id: I5f8028c4a7b360b144304055d2938c6b8694ff37
---
M includes/storage/SQLStore/SMW_SQLStore3_Readers.php
1 file changed, 0 insertions(+), 2 deletions(-)


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

diff --git a/includes/storage/SQLStore/SMW_SQLStore3_Readers.php 
b/includes/storage/SQLStore/SMW_SQLStore3_Readers.php
index f6d8e60..c9cb0fb 100644
--- a/includes/storage/SQLStore/SMW_SQLStore3_Readers.php
+++ b/includes/storage/SQLStore/SMW_SQLStore3_Readers.php
@@ -311,8 +311,6 @@
"$fieldname AS v$valuecount";
}
 
-   // Don't use DISTINCT with text blobs:
-   if ( $typeid == 'l' ) $usedistinct = false;
$valuecount += 1;
}
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5f8028c4a7b360b144304055d2938c6b8694ff37
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SemanticMediaWiki
Gerrit-Branch: master
Gerrit-Owner: Markus Kroetzsch 

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


[MediaWiki-commits] [Gerrit] Remove line that disables DISTINCT with blobs - change (mediawiki...SemanticMediaWiki)

2013-02-22 Thread Jeroen De Dauw (Code Review)
Jeroen De Dauw has submitted this change and it was merged.

Change subject: Remove line that disables DISTINCT with blobs
..


Remove line that disables DISTINCT with blobs

This fixes bug 45129.

Change-Id: I5f8028c4a7b360b144304055d2938c6b8694ff37
---
M includes/storage/SQLStore/SMW_SQLStore3_Readers.php
1 file changed, 0 insertions(+), 2 deletions(-)

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



diff --git a/includes/storage/SQLStore/SMW_SQLStore3_Readers.php 
b/includes/storage/SQLStore/SMW_SQLStore3_Readers.php
index f6d8e60..c9cb0fb 100644
--- a/includes/storage/SQLStore/SMW_SQLStore3_Readers.php
+++ b/includes/storage/SQLStore/SMW_SQLStore3_Readers.php
@@ -311,8 +311,6 @@
"$fieldname AS v$valuecount";
}
 
-   // Don't use DISTINCT with text blobs:
-   if ( $typeid == 'l' ) $usedistinct = false;
$valuecount += 1;
}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5f8028c4a7b360b144304055d2938c6b8694ff37
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SemanticMediaWiki
Gerrit-Branch: master
Gerrit-Owner: Markus Kroetzsch 
Gerrit-Reviewer: Jeroen De Dauw 
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 the rval logic in start_volume - change (operations/puppet)

2013-02-22 Thread Andrew Bogott (Code Review)
Andrew Bogott has uploaded a new change for review.

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


Change subject: Fix the rval logic in start_volume
..

Fix the rval logic in start_volume

0 is success; previously were reporting success as failure
and failure as success.

Change-Id: Iaf6df8b1ea4583fd7a65b76eb0c150d772173e8f
---
M files/ldap/scripts/manage-volumes-daemon
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/82/50382/1

diff --git a/files/ldap/scripts/manage-volumes-daemon 
b/files/ldap/scripts/manage-volumes-daemon
index 58b328a..5b0cabc 100755
--- a/files/ldap/scripts/manage-volumes-daemon
+++ b/files/ldap/scripts/manage-volumes-daemon
@@ -219,7 +219,7 @@
self.deathwatch.pop(volume)
self.log("Starting volume %s" % volume)
ret = self.ssh_exec_command('sudo gluster volume start ' + 
volume, True)
-   if ret:
+   if ret == 0:
self.log("Started volume: %s" % volume)
else:
self.log("Failed to start volume: %s" % volume)

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iaf6df8b1ea4583fd7a65b76eb0c150d772173e8f
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Andrew Bogott 

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


[MediaWiki-commits] [Gerrit] (mingle 397) Append configurable string to photo upload desc... - change (mediawiki...MobileFrontend)

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

Change subject: (mingle 397) Append configurable string to photo upload 
description
..


(mingle 397) Append configurable string to photo upload description

* Adds config var wgMFPhotoUploadAppendToDesc, the value of which will
be appended to a photo description during upload.

Change-Id: I7df9dce791693ed1fa79b9b2066116430f34cb92
---
M MobileFrontend.php
M includes/skins/SkinMobile.php
M javascripts/modules/mf-photo.js
3 files changed, 15 insertions(+), 2 deletions(-)

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



diff --git a/MobileFrontend.php b/MobileFrontend.php
index 7afe854..09cfeec 100644
--- a/MobileFrontend.php
+++ b/MobileFrontend.php
@@ -681,3 +681,8 @@
  * people receiving cached versions of pages intended for someone else's 
devices.
  */
 $wgMFAutodetectMobileView = false;
+
+/**
+ * (wiki)text to append to photo description during photo upload.
+ */
+$wgMFPhotoUploadAppendToDesc = '';
diff --git a/includes/skins/SkinMobile.php b/includes/skins/SkinMobile.php
index fad2ba0..958f619 100644
--- a/includes/skins/SkinMobile.php
+++ b/includes/skins/SkinMobile.php
@@ -892,7 +892,11 @@
}
 
public function prepareData() {
-   global $wgExtensionAssetsPath, $wgScriptPath, 
$wgMobileFrontendLogo, $wgArticlePath;
+   global $wgExtensionAssetsPath,
+   $wgScriptPath,
+   $wgMobileFrontendLogo,
+   $wgArticlePath,
+   $wgMFPhotoUploadAppendToDesc;
 
wfProfileIn( __METHOD__ );
$this->setRef( 'wgExtensionAssetsPath', $wgExtensionAssetsPath 
);
@@ -934,6 +938,7 @@
'hookOptions' => $hookOptions,
'username' => $user->isAnon() ? '' : 
$user->getName(),
'can_edit' => $user->isAllowed( 'edit' ) && 
$title->getNamespace() == NS_MAIN,
+   'photoUploadAppendToDesc' => 
$wgMFPhotoUploadAppendToDesc,
),
);
 
diff --git a/javascripts/modules/mf-photo.js b/javascripts/modules/mf-photo.js
index dfe6b5f..be692d9 100644
--- a/javascripts/modules/mf-photo.js
+++ b/javascripts/modules/mf-photo.js
@@ -62,8 +62,10 @@
'mobile-frontend-photo-article-donate-comment';
 
self.getToken( 'edit', function( tokenData ) {
-   var formData = new FormData();
+   var formData = new FormData(), descTextToAppend;
options.fileName = generateFileName( 
options.file, options.pageTitle );
+   descTextToAppend = M.getConfig( 
'photoUploadAppendToDesc' );
+   descTextToAppend = ( descTextToAppend.length ) 
? '\n\n' + descTextToAppend : '';
 
formData.append( 'filename', options.fileName );
formData.append( 'comment', mw.msg( 
options.editSummaryMessage ) );
@@ -71,6 +73,7 @@
formData.append( 'token', 
tokenData.tokens.edittoken );
formData.append( 'text',
'== {{int:filedesc}} ==\n' + 
options.description +
+   descTextToAppend +
'\n\n== {{int:license-header}} 
==\n{{self|cc-by-sa-3.0}}'
);
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7df9dce791693ed1fa79b9b2066116430f34cb92
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: awjrichards 
Gerrit-Reviewer: JGonera 
Gerrit-Reviewer: MaxSem 
Gerrit-Reviewer: awjrichards 
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 the rval logic in start_volume - change (operations/puppet)

2013-02-22 Thread Andrew Bogott (Code Review)
Andrew Bogott has submitted this change and it was merged.

Change subject: Fix the rval logic in start_volume
..


Fix the rval logic in start_volume

0 is success; previously were reporting success as failure
and failure as success.

Change-Id: Iaf6df8b1ea4583fd7a65b76eb0c150d772173e8f
---
M files/ldap/scripts/manage-volumes-daemon
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/files/ldap/scripts/manage-volumes-daemon 
b/files/ldap/scripts/manage-volumes-daemon
index 58b328a..5b0cabc 100755
--- a/files/ldap/scripts/manage-volumes-daemon
+++ b/files/ldap/scripts/manage-volumes-daemon
@@ -219,7 +219,7 @@
self.deathwatch.pop(volume)
self.log("Starting volume %s" % volume)
ret = self.ssh_exec_command('sudo gluster volume start ' + 
volume, True)
-   if ret:
+   if ret == 0:
self.log("Started volume: %s" % volume)
else:
self.log("Failed to start volume: %s" % volume)

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iaf6df8b1ea4583fd7a65b76eb0c150d772173e8f
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Andrew Bogott 
Gerrit-Reviewer: Andrew Bogott 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Update Math to master - change (mediawiki/core)

2013-02-22 Thread Ori.livneh (Code Review)
Ori.livneh has uploaded a new change for review.

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


Change subject: Update Math to master
..

Update Math to master

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


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/83/50383/1

diff --git a/extensions/Math b/extensions/Math
index c869831..9ba4ef2 16
--- a/extensions/Math
+++ b/extensions/Math
-Subproject commit c869831f45861f36cc2e6a9ef57a4e7c3e2e
+Subproject commit 9ba4ef269d9ea1adc016cbc83e58aef1be45b6f9

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia5cd233f52c2eb1afd3da67f2dbbca0417ddb57b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.21wmf10
Gerrit-Owner: Ori.livneh 

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


[MediaWiki-commits] [Gerrit] Update Math to master - change (mediawiki/core)

2013-02-22 Thread Ori.livneh (Code Review)
Ori.livneh has uploaded a new change for review.

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


Change subject: Update Math to master
..

Update Math to master

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


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/84/50384/1

diff --git a/extensions/Math b/extensions/Math
index 8a04254..9ba4ef2 16
--- a/extensions/Math
+++ b/extensions/Math
-Subproject commit 8a04254e6df5e8e5c2312529ebebc496c7b4fee6
+Subproject commit 9ba4ef269d9ea1adc016cbc83e58aef1be45b6f9

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I500bebfd11905042307dfa3b54a8032b1e1a2c46
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.21wmf9
Gerrit-Owner: Ori.livneh 

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


[MediaWiki-commits] [Gerrit] Initial commit of Kafka Module. - change (operations...kafka)

2013-02-22 Thread Ottomata (Code Review)
Ottomata has uploaded a new change for review.

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


Change subject: Initial commit of Kafka Module.
..

Initial commit of Kafka Module.

This was originally created at https://github.com/wikimedia/puppet-kafka,
but has been slightly modified.

Change-Id: Ibfa23af7c61dc5f1b5176c92a835460646d6bd26
---
A README.md
A manifests/init.pp
A manifests/server.pp
A templates/consumer.properties.erb
A templates/log4j.properties.erb
A templates/producer.properties.erb
A templates/server.properties.erb
7 files changed, 389 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet/kafka 
refs/changes/85/50385/1

diff --git a/README.md b/README.md
new file mode 100644
index 000..1178385
--- /dev/null
+++ b/README.md
@@ -0,0 +1,41 @@
+# Kafka Puppet Module
+
+A Puppet module for installing and managing [Apache 
Kafka](http://kafka.apache.org/) brokers.
+This module is maintained at https://github.com/wikimedia/puppet-kafka.
+
+This module is currently being maintained by The Wikimedia Foundation at
+[operations/puppet/kafka](https://gerrit.wikimedia.org/r/gitweb?p=operations%2Fpuppet%2Fkafka.git;a=summary)
+and mirrored on [GitHub](https://github.com/wikimedia/operations-puppet-kafka).
+It was originally developed at https://github.com/wikimedia/puppet-kafka.
+
+
+## Requirements:
+- Java
+- An Apache Kafka package.  You can use one available at
+[the Wikimedia apt 
repository](http://apt.wikimedia.org/wikimedia/pool/universe/k/kafka/),
+or build your own using 
[operations/debs/kakfa](https://gerrit.wikimedia.org/r/gitweb?p=operations/debs/kafka.git;a=summary).
+
+## Usage:
+
+### Just the package and client configs:
+```puppet
+# install the kafka package and configure kafka.
+class { "kafka":
+  zookeeper_hosts => ["zk1:2181", "zk2:2181", "zk3:2181"],
+}
+```
+
+### Start a kafka broker server
+```puppet
+# kafka::server requires base kafka class
+class { "kafka":
+  zookeeper_hosts => ["zk1:2181", "zk2:2181", "zk3:2181"],
+}
+class { "kafka::server":
+log_dir => "/var/lib/kafka",
+}
+```
+
+If you do not set```broker_id``` on ```kafka::server```, the ```broker_id```
+will be inferred from integers in the node's hostname.  E.g. kafka01 will
+render ```server.properties``` with ```brokerid``` == 1.
diff --git a/manifests/init.pp b/manifests/init.pp
new file mode 100644
index 000..6a9fe1c
--- /dev/null
+++ b/manifests/init.pp
@@ -0,0 +1,34 @@
+# == Class kafka
+# Installs Kafka package and sets up defaults configs for clients (producer & 
consumer).
+#
+# == Parameters:
+# $zookeeper_hosts  - Array of zookeeper hostname/IP(:port)s.  
Default: none, localhost will be used as the Kafka Broker list.
+# $zookeeper_connectiontimeout_ms   - Timeout in ms for connecting to 
zookeeper.  Default: 100
+# $kafka_log_file   - File in which to store Kafka logs (not 
event data).  Default: /var/log/kafka/kafka.log
+# $producer_type- Specifies whether the messages are (by 
default) sent asynchronously (async) or synchronously (sync).  Default: async
+# $producer_batch_size  - The number of messages batched at the 
producer.  Default: 200
+#
+class kafka(
+   $zookeeper_hosts= undef,
+   $zookeeper_connectiontimeout_ms = 100,
+   $kafka_log_file = "/var/log/kafka/kafka.log",
+   $producer_type  = "async",
+   $producer_batch_size= 200)
+{
+   package { "kafka": ensure => "installed" }
+
+   file { "/etc/kafka/log4j.properties":
+   content => template("kafka/log4j.properties.erb"),
+   require => Package["kafka"],
+   }
+
+   file { "/etc/kafka/producer.properties":
+   content => template("kafka/producer.properties.erb"),
+   require => Package["kafka"],
+   }
+
+   file { "/etc/kafka/consumer.properties":
+   content => template("kafka/consumer.properties.erb"),
+   require => Package["kafka"],
+   }
+}
diff --git a/manifests/server.pp b/manifests/server.pp
new file mode 100644
index 000..4b10843
--- /dev/null
+++ b/manifests/server.pp
@@ -0,0 +1,71 @@
+# == Class kafka::server
+# Sets up a Kafka Broker Server and ensures that it is running.
+#
+# == Parameters:
+# $broker_id - Unique integer ID of this 
broker.  Default: uses numbers extracted from the node's hostname
+# $log_dir   - Directory in which the broker 
will store its received log event data.  Default: /var/lib/kafka/log
+# $port  - Broker listen port.  Default: 
9092
+# $num_threads   - The number of processor threads 
the socket server uses for receiving and answering requests.  Default: # of 
cores
+# $num_partitions

[MediaWiki-commits] [Gerrit] Specialpage MathDebug - change (mediawiki...Math)

2013-02-22 Thread Physikerwelt (Code Review)
Physikerwelt has uploaded a new change for review.

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


Change subject: Specialpage MathDebug
..

Specialpage MathDebug

This commit introduces the specialpage mathdebug. This page tests the rendering 
of typical math-expression using different rendering engines.
It is accessible if wgDebugMath is set to true for users with sysadmin rights.

Change-Id: I39f853a5a2a1a5dabdd0350b11b4ed3c0fe17ef8
---
A SpecialMathDebug.php
1 file changed, 529 insertions(+), 0 deletions(-)


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

diff --git a/SpecialMathDebug.php b/SpecialMathDebug.php
new file mode 100644
index 000..3824e07
--- /dev/null
+++ b/SpecialMathDebug.php
@@ -0,0 +1,529 @@
+getOutput();
+   $out->setArticleRelated( false );
+   $out->setRobotPolicy( "noindex,nofollow" );
+   $out->setPageTitle( $this->getDescription() );
+   }
+   function execute( $par ) {
+   global $wgDebugMath;
+   $output = $this->getOutput();
+   $this->setHeaders();
+   if ( $wgDebugMath ) {
+   if (  !$this->userCanExecute( $this->getUser() )  ) {
+   $this->displayRestrictionError();
+   return;
+   } else {
+   $this->testParser();
+   }
+   } else {
+   $output->addWikiText( '\'\'\'This page is avaliblible 
in math debug mode only.\'\'\'' . "\n\n" .
+   'Enable the math debug mode by setting  
$wgDebugMath = true .' );
+   }
+   }
+   function testParser() {
+   $out = $this->getOutput();
+   foreach ( self::testQuery() as $t ) {
+   $out->addWikiText( "MW_MATH_SOURCE:" . 
MathRenderer::renderMath( $t, array(), MW_MATH_SOURCE ) );
+   $out->addWikiText( "MW_MATH_PNG:", false );
+   $out->addHTML( MathRenderer::renderMath( $t, array(), 
MW_MATH_PNG ) . "" );
+   $out->addWikiText( "MW_MATH_MATHJAX:", false );
+   $out->addHTML( MathRenderer::renderMath( $t, array(), 
MW_MATH_MATHJAX ) );
+   }
+   }
+
+   private static function testQuery() {
+   return array( 'math_tex' => '\\int_a^b x^{5x dx',
+   'e^{i \\pi} + 1 = 0\\,\\!',
+   
'\\definecolor{red}{RGB}{255,0,0}\\pagecolor{red}e^{i \\pi} + 1 = 0\\,\\!',
+   '\\sqrt{\\pi}',
+   '\\text{abc}',
+   '\\text 
{abcdefghijklmnopqrstuvwxyzàáâãäåæçčďèéěêëìíîïňñòóôõöřšť÷øùúůûüýÿž}',
+   '\\text 
{abcdefghijklmnopqrstuvwxyzàáâãäåæçčďèéěêëìíîïňñòóôõöřšť÷øùúůûüýÿž}\\,',
+   '\\mbox 
{abcdefghijklmnopqrstuvwxyzàáâãäåæçčďèéěêëìíîïňñòóôõöřšť÷øùúůûüýÿž}',
+   '\\mbox 
{abcdefghijklmnopqrstuvwxyzàáâãäåæçčďèéěêëìíîïňñòóôõöřšť÷øùúůûüýÿž}\\,',
+   '\\mbox {ð}',
+   '\\mbox {þ}',
+   '\\alpha\\,\\!',
+   ' f(x) = x^2\\,\\!',
+   '\\sqrt{2}',
+   '\\sqrt{1-e^2}\\!',
+   '',
+   '\\dot{a}, \\ddot{a}, \\acute{a}, \\grave{a} 
\\!',
+   '\\check{a}, \\breve{a}, \\tilde{a}, \\bar{a} 
\\!',
+   '\\hat{a}, \\widehat{a}, \\vec{a} \\!',
+   '\\exp_a b = a^b, \\exp b = e^b, 10^m \\!',
+   '\\ln c, \\lg d = \\log e, \\log_{10} f \\!',
+   '\\sin a, \\cos b, \\tan c, \\cot d, \\sec e, 
\\csc f\\!',
+   '\\arcsin h, \\arccos i, \\arctan j \\!',
+   '\\sinh k, \\cosh l, \\tanh m, \\coth n \\!',
+   '\\operatorname{sh}\\,k, 
\\operatorname{ch}\\,l, \\operatorname{th}\\,m, \\operatorname{coth}\\,n \\!',
+   '\\operatorname{argsh}\\,o, 
\\operatorname{argch}\\,p, \\operatorname{argth}\\,q \\!',
+   '\\sgn r, \\left\\vert s \\right\\vert \\!',
+   '\\min(x,y), \\max(x,y) \\!',
+   '\\min x, \\max y, \\inf s, \\sup t \\!',
+   '\\lim u, \\liminf v, \\limsup w \\!',
+   '\\dim p, \\deg q, \\det m, \\ker\\phi \\!',
+   '\\Pr j, \\hom l, \\lVert z \\rVert, \\arg z 
\\!',
+   'dt, \\operatorname{d}\\!t, \\partial t, 
\\nabla\\ps

[MediaWiki-commits] [Gerrit] Update Math to master - change (mediawiki/core)

2013-02-22 Thread Ori.livneh (Code Review)
Ori.livneh has submitted this change and it was merged.

Change subject: Update Math to master
..


Update Math to master

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

Approvals:
  Ori.livneh: Verified; Looks good to me, approved
  jenkins-bot: Verified



diff --git a/extensions/Math b/extensions/Math
index c869831..9ba4ef2 16
--- a/extensions/Math
+++ b/extensions/Math
-Subproject commit c869831f45861f36cc2e6a9ef57a4e7c3e2e
+Subproject commit 9ba4ef269d9ea1adc016cbc83e58aef1be45b6f9

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia5cd233f52c2eb1afd3da67f2dbbca0417ddb57b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.21wmf10
Gerrit-Owner: Ori.livneh 
Gerrit-Reviewer: Ori.livneh 
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 Math to master - change (mediawiki/core)

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

Change subject: Update Math to master
..


Update Math to master

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

Approvals:
  Ori.livneh: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/extensions/Math b/extensions/Math
index 8a04254..9ba4ef2 16
--- a/extensions/Math
+++ b/extensions/Math
-Subproject commit 8a04254e6df5e8e5c2312529ebebc496c7b4fee6
+Subproject commit 9ba4ef269d9ea1adc016cbc83e58aef1be45b6f9

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I500bebfd11905042307dfa3b54a8032b1e1a2c46
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.21wmf9
Gerrit-Owner: Ori.livneh 
Gerrit-Reviewer: Ori.livneh 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Set template to append to mobile photo upload desc - change (operations/mediawiki-config)

2013-02-22 Thread awjrichards (Code Review)
awjrichards has uploaded a new change for review.

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


Change subject: Set template to append to mobile photo upload desc
..

Set template to append to mobile photo upload desc

Change-Id: I6caa10ad0de2daf697acad7afe5f165857d2c1d7
---
M wmf-config/InitialiseSettings.php
M wmf-config/mobile.php
2 files changed, 4 insertions(+), 0 deletions(-)


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 029deb6..4fd22ad 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -11088,6 +11088,9 @@
'default' => 'commonswiki',
'test2wiki' => '',
 ),
+'wmgMFPhotoUploadAppendToDesc' => array(
+   'default' => '{{Uploaded from Mobile|platform=Web|version=}}',
+),
 
 'wgExtraGenderNamespaces' => array(
'default' => array(),
diff --git a/wmf-config/mobile.php b/wmf-config/mobile.php
index 1773797..15f706f 100644
--- a/wmf-config/mobile.php
+++ b/wmf-config/mobile.php
@@ -9,6 +9,7 @@
$wgMFNearby = $wmgMFNearby && $wmgEnableGeoData;
$wgMFPhotoUploadEndpoint = $wmgMFPhotoUploadEndpoint;
$wgMFPhotoUploadWiki = $wmgMFPhotoUploadWiki;
+   $wgMFPhotoUploadAppendToDesc = $wmgMFPhotoUploadAppendToDesc;
$wgMFRemotePostFeedbackUsername = $wmgMFRemotePostFeedbackUsername;
$wgMFRemotePostFeedbackPassword = $wmgMFRemotePostFeedbackPassword;
$wgMFRemotePostFeedback = true;

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

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

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


[MediaWiki-commits] [Gerrit] Clear killlist on resets - change (mediawiki...GeoData)

2013-02-22 Thread MaxSem (Code Review)
MaxSem has uploaded a new change for review.

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


Change subject: Clear killlist on resets
..

Clear killlist on resets

Change-Id: I60df31bcbe64bd78eaf0d810a270b64712d8f62b
---
M solrupdate.php
1 file changed, 7 insertions(+), 3 deletions(-)


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

diff --git a/solrupdate.php b/solrupdate.php
index a167f88..92997d6 100644
--- a/solrupdate.php
+++ b/solrupdate.php
@@ -50,7 +50,14 @@
if ( $this->hasOption( 'reset' ) ) {
$this->output( "Resetting update tracking...\n" );
$dbw->delete( 'geo_updates', array( 'gu_wiki' => 
$wikiId ), __METHOD__ );
+   $this->output( "Truncating killlist...\n" );
+   $table = $dbw->tableName( 'geo_killlist' );
+   $dbw->query( "TRUNCATE TABLE $table", __METHOD__ );
+   $cutoffKilllist = false;
+   } else {
+   $cutoffKilllist = $dbr->selectField( 'geo_killlist', 
'MAX( gk_killed_id )', '', __METHOD__ );
}
+   $cutoffTags = $dbr->selectField( 'geo_tags', 'MAX( gt_id )', 
'', __METHOD__ );
 
if ( $this->hasOption( 'clear-killlist' ) ) {
$days = intval( $this->getOption( 'clear-killlist' ) );
@@ -88,9 +95,6 @@
$lastTag = $row->gu_last_tag;
$lastKill = $row->gu_last_kill;
}
-
-   $cutoffTags = $dbr->selectField( 'geo_tags', 'MAX( gt_id )', 
'', __METHOD__ );
-   $cutoffKilllist = $dbr->selectField( 'geo_killlist', 'MAX( 
gk_killed_id )', '', __METHOD__ );
 
$solr = SolrGeoData::newClient( 'master' );
 

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

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

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


[MediaWiki-commits] [Gerrit] [Agora] i18n file was moved up to extension root - change (translatewiki)

2013-02-22 Thread Raimond Spekking (Code Review)
Raimond Spekking has uploaded a new change for review.

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


Change subject: [Agora] i18n file was moved up to extension root
..

[Agora] i18n file was moved up to extension root

file path can be removed now

Change-Id: I8a1cf03aa8785d2dd757f1a0a3fef1997168a01f
---
M groups/MediaWiki/mediawiki-defines.txt
1 file changed, 0 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/translatewiki 
refs/changes/89/50389/1

diff --git a/groups/MediaWiki/mediawiki-defines.txt 
b/groups/MediaWiki/mediawiki-defines.txt
index e57f354..d432c6b 100644
--- a/groups/MediaWiki/mediawiki-defines.txt
+++ b/groups/MediaWiki/mediawiki-defines.txt
@@ -19,7 +19,6 @@
 aliasfile = AdminLinks/AdminLinks.alias.php
 
 Agora
-file = Agora/modules/Agora.i18n.php
 
 AJAX Poll
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8a1cf03aa8785d2dd757f1a0a3fef1997168a01f
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Raimond Spekking 

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


[MediaWiki-commits] [Gerrit] [Agora] i18n file was moved up to extension root - change (translatewiki)

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

Change subject: [Agora] i18n file was moved up to extension root
..


[Agora] i18n file was moved up to extension root

file path can be removed now

Change-Id: I8a1cf03aa8785d2dd757f1a0a3fef1997168a01f
---
M groups/MediaWiki/mediawiki-defines.txt
1 file changed, 0 insertions(+), 1 deletion(-)

Approvals:
  Raimond Spekking: Verified; Looks good to me, approved



diff --git a/groups/MediaWiki/mediawiki-defines.txt 
b/groups/MediaWiki/mediawiki-defines.txt
index e57f354..d432c6b 100644
--- a/groups/MediaWiki/mediawiki-defines.txt
+++ b/groups/MediaWiki/mediawiki-defines.txt
@@ -19,7 +19,6 @@
 aliasfile = AdminLinks/AdminLinks.alias.php
 
 Agora
-file = Agora/modules/Agora.i18n.php
 
 AJAX Poll
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8a1cf03aa8785d2dd757f1a0a3fef1997168a01f
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Raimond Spekking 
Gerrit-Reviewer: Raimond Spekking 

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


[MediaWiki-commits] [Gerrit] (bug 44988) unbreak $.suggestions up/down arrow navigation [... - change (mediawiki/core)

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

Change subject: (bug 44988) unbreak $.suggestions up/down arrow navigation 
[regression]
..


(bug 44988) unbreak $.suggestions up/down arrow navigation [regression]

It was borked in I87940ca8 due to a superfluous dot.

Change-Id: If7bfb25a4c9e9f01a8acdaeabfe18c346dfea03d
---
M resources/jquery/jquery.suggestions.js
1 file changed, 4 insertions(+), 4 deletions(-)

Approvals:
  Anomie: Looks good to me, approved
  Hoo man: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/resources/jquery/jquery.suggestions.js 
b/resources/jquery/jquery.suggestions.js
index 3448b7a..44382f0 100644
--- a/resources/jquery/jquery.suggestions.js
+++ b/resources/jquery/jquery.suggestions.js
@@ -309,11 +309,11 @@
var selected = context.data.$container.find( 
'.suggestions-result-current' );
if ( !result.get || selected.get( 0 ) !== result.get( 0 ) ) {
if ( result === 'prev' ) {
-   if( selected.is( '.suggestions-special' ) ) {
+   if( selected.hasClass( 'suggestions-special' ) 
) {
result = context.data.$container.find( 
'.suggestions-result:last' );
} else {
result = selected.prev();
-   if ( !( result.length && 
result.hasClass( '.suggestions-result' ) ) ) {
+   if ( !( result.length && 
result.hasClass( 'suggestions-result' ) ) ) {
// there is something in the 
DOM between selected element and the wrapper, bypass it
result = selected.parents( 
'.suggestions-results > *' ).prev().find( '.suggestions-result' ).eq(0);
}
@@ -337,12 +337,12 @@
}
} else {
result = selected.next();
-   if ( !( result.length && 
result.hasClass( '.suggestions-result' ) ) ) {
+   if ( !( result.length && 
result.hasClass( 'suggestions-result' ) ) ) {
// there is something in the 
DOM between selected element and the wrapper, bypass it
result = selected.parents( 
'.suggestions-results > *' ).next().find( '.suggestions-result' ).eq(0);
}
 
-   if ( selected.is( 
'.suggestions-special' ) ) {
+   if ( selected.hasClass( 
'suggestions-special' ) ) {
result = $( [] );
} else if (
result.length === 0 &&

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If7bfb25a4c9e9f01a8acdaeabfe18c346dfea03d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Matmarex 
Gerrit-Reviewer: Anomie 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: Hoo man 
Gerrit-Reviewer: Ori.livneh 
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 E3Experiments, GuidedTour & GettingStarted for split ... - change (mediawiki/core)

2013-02-22 Thread Ori.livneh (Code Review)
Ori.livneh has uploaded a new change for review.

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


Change subject: Update E3Experiments, GuidedTour & GettingStarted for split test
..

Update E3Experiments, GuidedTour & GettingStarted for split test

Change-Id: I5c1499fae6953d01b18b16fb8e0b93d05c272cd4
---
M extensions/E3Experiments
M extensions/GettingStarted
M extensions/GuidedTour
3 files changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/90/50390/1

diff --git a/extensions/E3Experiments b/extensions/E3Experiments
index 0912c58..4e9af22 16
--- a/extensions/E3Experiments
+++ b/extensions/E3Experiments
-Subproject commit 0912c58dab45359385a7e923587bae293b335a46
+Subproject commit 4e9af227fc50b6c6c82135a7d124923ebb7d5568
diff --git a/extensions/GettingStarted b/extensions/GettingStarted
index d478b49..b712963 16
--- a/extensions/GettingStarted
+++ b/extensions/GettingStarted
-Subproject commit d478b497826b39d4b5d42f533c99d7f6dd3ada03
+Subproject commit b712963668e9a5f990a380cebb0a2312c3b2d4c6
diff --git a/extensions/GuidedTour b/extensions/GuidedTour
index da2aa9a..d7a1d9e 16
--- a/extensions/GuidedTour
+++ b/extensions/GuidedTour
-Subproject commit da2aa9a3a9071a6b518dc2eae66bc1702995a4a2
+Subproject commit d7a1d9e4ddfb9f88981c6805e871f1ef9aca5052

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5c1499fae6953d01b18b16fb8e0b93d05c272cd4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.21wmf9
Gerrit-Owner: Ori.livneh 

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


[MediaWiki-commits] [Gerrit] Create tests for ve.FormatAction.convert - change (mediawiki...VisualEditor)

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

Change subject: Create tests for ve.FormatAction.convert
..


Create tests for ve.FormatAction.convert

These 3 tests convert different selections of list items to headings.

Bug: 45216
Change-Id: I6cf042d9d5aa4afb68c0992f444b600ed69f0c04
---
M VisualEditor.hooks.php
A demos/ve/pages/isolation.html
A modules/ve/test/actions/ve.FormatAction.test.js
M modules/ve/test/dm/ve.dm.example.js
M modules/ve/test/index.php
5 files changed, 168 insertions(+), 0 deletions(-)

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



diff --git a/VisualEditor.hooks.php b/VisualEditor.hooks.php
index eb3bc32..c6a0104 100644
--- a/VisualEditor.hooks.php
+++ b/VisualEditor.hooks.php
@@ -81,6 +81,8 @@
've.BranchNode.test.js',
've.LeafNode.test.js',
've.Factory.test.js',
+   // VisualEditor Actions Tests
+   'actions/ve.FormatAction.test.js',
// VisualEditor DataModel Tests
'dm/ve.dm.example.js',
'dm/ve.dm.NodeFactory.test.js',
diff --git a/demos/ve/pages/isolation.html b/demos/ve/pages/isolation.html
new file mode 100644
index 000..38869c6
--- /dev/null
+++ b/demos/ve/pages/isolation.html
@@ -0,0 +1 @@
+Item 1Item 2Item 3ParagraphItem 
4Item 5Item 6Cell 
1Cell 2Cell 3Cell 
4Not allowed by dm:Title in 
listPreformatted in list
\ No newline at end of file
diff --git a/modules/ve/test/actions/ve.FormatAction.test.js 
b/modules/ve/test/actions/ve.FormatAction.test.js
new file mode 100644
index 000..7549e74
--- /dev/null
+++ b/modules/ve/test/actions/ve.FormatAction.test.js
@@ -0,0 +1,73 @@
+/*!
+ * VisualEditor Actions FormatAction tests.
+ *
+ * @copyright 2011-2013 VisualEditor Team and others; see AUTHORS.txt
+ * @license The MIT License (MIT); see LICENSE.txt
+ */
+
+QUnit.module( 've.FormatAction' );
+
+/* Tests */
+
+function runConverterTest( assert, range, type, attributes, expectedSelection, 
expectedData, label ) {
+   var dom = ve.createDocumentFromHTML( ve.dm.example.isolationHTML ),
+   surface = new ve.Surface( $(''),  dom ),
+   formatAction = new ve.FormatAction( surface ),
+   data = ve.copyArray( 
surface.getModel().getDocument().getFullData() );
+
+   surface.getModel().change( null, range );
+   formatAction.convert( type, attributes );
+
+   expectedData( data );
+
+   assert.deepEqual( surface.getModel().getDocument().getFullData(), data, 
label + ': data models match' );
+   assert.deepEqual( surface.getModel().getSelection(), expectedSelection, 
label + ': selections match' );
+}
+
+QUnit.test( 'convert', 12, function ( assert ) {
+   var rebuilt = { 'changed': { 'rebuilt': 1 } },
+   created = { 'changed': { 'created': 1 } },
+   createdAndRebuilt = { 'changed': { 'created': 1, 'rebuilt': 1 } 
};
+
+   runConverterTest( assert, new ve.Range( 14, 16 ), 'heading', { level: 2 
}, new ve.Range( 14, 16 ), function( data ) {
+   data[0].internal = rebuilt;
+   data.splice( 11, 2, { 'type': '/list' }, { 'type': 'heading', 
'attributes': { 'level': 2 }, 'internal': created } );
+   data.splice( 19, 2, { 'type': '/heading' }, { 'type': 'list', 
'attributes': { 'style': 'bullet' }, 'internal': createdAndRebuilt } );
+   }, 'converting partial selection of list item "Item 2" to level 2 
heading' );
+
+   runConverterTest( assert, new ve.Range( 15, 50 ), 'heading', { level: 3 
}, new ve.Range( 15, 44 ), function( data ) {
+   data[0].internal = rebuilt;
+   data.splice( 11, 2, { 'type': '/list' }, { 'type': 'heading', 
'attributes': { 'level': 3 }, 'internal': created } );
+   data.splice( 19, 4, { 'type': '/heading' }, { 'type': 
'heading', 'attributes': { 'level': 3 }, 'internal': created } );
+   data.splice( 27, 4, { 'type': '/heading' }, { 'type': 
'heading', 'attributes': { 'level': 3 }, 'internal': created } );
+   data.splice( 38, 4, { 'type': '/heading' }, { 'type': 
'heading', 'attributes': { 'level': 3 }, 'internal': created } );
+   data.splice( 46, 2, { 'type': '/heading' }, { 'type': 'list', 
'attributes': { 'style': 'bullet' }, 'internal': created } );
+   }, 'converting partial selection across two lists surrounding a 
paragraph' );
+
+   runConverterTest( assert, new ve.Range( 4, 28 ), 'heading', { level: 1 
}, new ve.Range( 2, 22 ), function( data ) {
+   data[0].internal = rebuilt;
+   data.splice( 0, 3, { 'type': 'heading', 'attributes': { 
'level': 1 }, 'internal': created } );
+   data.splice( 7, 4, { 'type': '/heading' }, { 'type': 'heading', 
'attribut

[MediaWiki-commits] [Gerrit] Add wtp1002-4 to Parsoid deployment list - change (operations/puppet)

2013-02-22 Thread Catrope (Code Review)
Catrope has uploaded a new change for review.

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


Change subject: Add wtp1002-4 to Parsoid deployment list
..

Add wtp1002-4 to Parsoid deployment list

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


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

diff --git a/manifests/role/deployment.pp b/manifests/role/deployment.pp
index 4ba5346..48bb920 100644
--- a/manifests/role/deployment.pp
+++ b/manifests/role/deployment.pp
@@ -102,7 +102,7 @@
 
 class role::deployment::salt_masters::production {
   $mediawiki_regex = 
"^(srv|mw|snapshot|tmh)|(searchidx2|searchidx1001).*.(eqiad|pmtpa).wmnet$|^(hume|spence|fenari).wikimedia.org$"
-  $parsoid_regex = 
"^(wtp1|mexia|tola|lardner|kuo|celsus|constable|wtp1001|caesium|xenon|cerium|titanium)\..*"
+  $parsoid_regex = 
"^(wtp1|mexia|tola|lardner|kuo|celsus|constable|wtp1001|wtp1002|wtp1003|wtp1004|caesium|xenon|cerium|titanium)\..*"
   $deployment_servers = {
 "pmtpa" => "tin.eqiad.wmnet",
 "eqiad" => "tin.eqiad.wmnet",

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

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

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


[MediaWiki-commits] [Gerrit] Update E3Experiments, GuidedTour & GettingStarted for split ... - change (mediawiki/core)

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

Change subject: Update E3Experiments, GuidedTour & GettingStarted for split test
..


Update E3Experiments, GuidedTour & GettingStarted for split test

Change-Id: I5c1499fae6953d01b18b16fb8e0b93d05c272cd4
---
M extensions/E3Experiments
M extensions/GettingStarted
M extensions/GuidedTour
3 files changed, 0 insertions(+), 0 deletions(-)

Approvals:
  Ori.livneh: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/extensions/E3Experiments b/extensions/E3Experiments
index 0912c58..4e9af22 16
--- a/extensions/E3Experiments
+++ b/extensions/E3Experiments
-Subproject commit 0912c58dab45359385a7e923587bae293b335a46
+Subproject commit 4e9af227fc50b6c6c82135a7d124923ebb7d5568
diff --git a/extensions/GettingStarted b/extensions/GettingStarted
index d478b49..b712963 16
--- a/extensions/GettingStarted
+++ b/extensions/GettingStarted
-Subproject commit d478b497826b39d4b5d42f533c99d7f6dd3ada03
+Subproject commit b712963668e9a5f990a380cebb0a2312c3b2d4c6
diff --git a/extensions/GuidedTour b/extensions/GuidedTour
index da2aa9a..d7a1d9e 16
--- a/extensions/GuidedTour
+++ b/extensions/GuidedTour
-Subproject commit da2aa9a3a9071a6b518dc2eae66bc1702995a4a2
+Subproject commit d7a1d9e4ddfb9f88981c6805e871f1ef9aca5052

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5c1499fae6953d01b18b16fb8e0b93d05c272cd4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.21wmf9
Gerrit-Owner: Ori.livneh 
Gerrit-Reviewer: Ori.livneh 
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 wtp1002-4 to Parsoid deployment list - change (operations/puppet)

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

Change subject: Add wtp1002-4 to Parsoid deployment list
..


Add wtp1002-4 to Parsoid deployment list

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

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



diff --git a/manifests/role/deployment.pp b/manifests/role/deployment.pp
index 4ba5346..48bb920 100644
--- a/manifests/role/deployment.pp
+++ b/manifests/role/deployment.pp
@@ -102,7 +102,7 @@
 
 class role::deployment::salt_masters::production {
   $mediawiki_regex = 
"^(srv|mw|snapshot|tmh)|(searchidx2|searchidx1001).*.(eqiad|pmtpa).wmnet$|^(hume|spence|fenari).wikimedia.org$"
-  $parsoid_regex = 
"^(wtp1|mexia|tola|lardner|kuo|celsus|constable|wtp1001|caesium|xenon|cerium|titanium)\..*"
+  $parsoid_regex = 
"^(wtp1|mexia|tola|lardner|kuo|celsus|constable|wtp1001|wtp1002|wtp1003|wtp1004|caesium|xenon|cerium|titanium)\..*"
   $deployment_servers = {
 "pmtpa" => "tin.eqiad.wmnet",
 "eqiad" => "tin.eqiad.wmnet",

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia5ee55fea523275955ab98f57b76807632d00cc1
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Catrope 
Gerrit-Reviewer: RobH 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Fix bug with replacements in translateOffset() - change (mediawiki...VisualEditor)

2013-02-22 Thread Catrope (Code Review)
Catrope has uploaded a new change for review.

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


Change subject: Fix bug with replacements in translateOffset()
..

Fix bug with replacements in translateOffset()

In our test case, offset 12 was mapped to 16, but that should be 11.
The problem here was that the offset right before the removal was
mapped to right after the removal, but that's only valid if we're
dealing with a removal, not when we're dealing with a replacement
where we're both removing and inserting data.

Change-Id: Ibf3c1463c0de009578cd50736f19bae82669ced8
---
M modules/ve/dm/ve.dm.Transaction.js
M modules/ve/test/dm/ve.dm.Transaction.test.js
2 files changed, 14 insertions(+), 2 deletions(-)


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

diff --git a/modules/ve/dm/ve.dm.Transaction.js 
b/modules/ve/dm/ve.dm.Transaction.js
index 760ec19..bfaa703 100644
--- a/modules/ve/dm/ve.dm.Transaction.js
+++ b/modules/ve/dm/ve.dm.Transaction.js
@@ -697,8 +697,20 @@
if ( offset === cursor + removeLength ) {
// Offset points to right after the removal, 
translate it
return offset + adjustment;
-   } else if ( offset >= cursor && offset < cursor + 
removeLength ) {
+   } else if ( offset === cursor ) {
+   // The offset points to right before the 
removal or replacement
+   if ( insertLength === 0 ) {
+   // Translate it to after the removal
+   return cursor + removeLength + 
adjustment;
+   } else {
+   // Translate it to before the 
replacement
+   // To translate this correctly, we have 
to use adjustment as it was before
+   // we adjusted it for this replacement
+   return cursor + adjustment - 
insertLength + removeLength;
+   }
+   } else if ( offset > cursor && offset < cursor + 
removeLength ) {
// The offset points inside of the removal
+   // Translate it to after the removal
return cursor + removeLength + adjustment;
}
cursor += removeLength;
diff --git a/modules/ve/test/dm/ve.dm.Transaction.test.js 
b/modules/ve/test/dm/ve.dm.Transaction.test.js
index e454fc5..a10677f 100644
--- a/modules/ve/test/dm/ve.dm.Transaction.test.js
+++ b/modules/ve/test/dm/ve.dm.Transaction.test.js
@@ -792,7 +792,7 @@
9: 8,
10: 9,
11: 10,
-   12: 16,
+   12: 11,
13: 16,
14: 17,
15: 21,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibf3c1463c0de009578cd50736f19bae82669ced8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Catrope 

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


[MediaWiki-commits] [Gerrit] Added needed parameter to Database::select(), missing for ye... - change (mediawiki...SemanticForms)

2013-02-22 Thread Yaron Koren (Code Review)
Yaron Koren has uploaded a new change for review.

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


Change subject: Added needed parameter to Database::select(), missing for years 
(d'oh)
..

Added needed parameter to Database::select(), missing for years (d'oh)

Change-Id: I6d0b067f4f49efc5dd8ca39c2b9ba34c6bf12e3e
---
M specials/SF_CreateForm.php
1 file changed, 1 insertion(+), 0 deletions(-)


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

diff --git a/specials/SF_CreateForm.php b/specials/SF_CreateForm.php
index 4519c4f..78c00b8 100644
--- a/specials/SF_CreateForm.php
+++ b/specials/SF_CreateForm.php
@@ -94,6 +94,7 @@
'page',
'page_title',
array( 'page_namespace' => NS_TEMPLATE, 
'page_is_redirect' => 0 ),
+   __METHOD__,
array( 'ORDER BY' => 'page_title' )
);
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6d0b067f4f49efc5dd8ca39c2b9ba34c6bf12e3e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SemanticForms
Gerrit-Branch: master
Gerrit-Owner: Yaron Koren 

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


[MediaWiki-commits] [Gerrit] Added needed parameter to Database::select(), missing for ye... - change (mediawiki...SemanticForms)

2013-02-22 Thread Yaron Koren (Code Review)
Yaron Koren has submitted this change and it was merged.

Change subject: Added needed parameter to Database::select(), missing for years 
(d'oh)
..


Added needed parameter to Database::select(), missing for years (d'oh)

Change-Id: I6d0b067f4f49efc5dd8ca39c2b9ba34c6bf12e3e
---
M specials/SF_CreateForm.php
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/specials/SF_CreateForm.php b/specials/SF_CreateForm.php
index 4519c4f..78c00b8 100644
--- a/specials/SF_CreateForm.php
+++ b/specials/SF_CreateForm.php
@@ -94,6 +94,7 @@
'page',
'page_title',
array( 'page_namespace' => NS_TEMPLATE, 
'page_is_redirect' => 0 ),
+   __METHOD__,
array( 'ORDER BY' => 'page_title' )
);
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6d0b067f4f49efc5dd8ca39c2b9ba34c6bf12e3e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SemanticForms
Gerrit-Branch: master
Gerrit-Owner: Yaron Koren 
Gerrit-Reviewer: Yaron Koren 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] (bug 45423) Create SurfaceFragment.isolate method - change (mediawiki...VisualEditor)

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

Change subject: (bug 45423) Create SurfaceFragment.isolate method
..


(bug 45423) Create SurfaceFragment.isolate method

This method will take a selection of siblings and ensure they
are the only chlidren in their first parent which can be placed anywhere
(for example the first parent of a tableCell which can be placed anywhere
is a table, and for a listItem is a list).

The method ensures no redundant empty tags are created, so if
the selection encompasses all siblings then no action is taken.

Also in this commit are two test cases run against ve.dm.example.isolationData.

Change-Id: I783bd5ecd9d43d61f9b2685985409b4d746cbe94
---
M modules/ve/dm/ve.dm.SurfaceFragment.js
M modules/ve/test/dm/ve.dm.SurfaceFragment.test.js
2 files changed, 131 insertions(+), 1 deletion(-)

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



diff --git a/modules/ve/dm/ve.dm.SurfaceFragment.js 
b/modules/ve/dm/ve.dm.SurfaceFragment.js
index fd9e095..c208099 100644
--- a/modules/ve/dm/ve.dm.SurfaceFragment.js
+++ b/modules/ve/dm/ve.dm.SurfaceFragment.js
@@ -690,3 +690,88 @@
// TODO: Implement
return this;
 };
+
+/**
+ * Isolates the nodes in a fragment.
+ *
+ * The node selection is expanded to siblings and then these are isolated such 
that they are the
+ * sole children of a parent element which can be placed anywhere.
+ *
+ * @method
+ * @returns {ve.dm.SurfaceFragment} This fragment
+ */
+ve.dm.SurfaceFragment.prototype.isolate = function () {
+   // Handle null fragment
+   if ( !this.surface ) {
+   return this;
+   }
+   var nodes, startSplitNode, endSplitNode, tx,
+   startOffset, endOffset,
+   startSplitRequired = false,
+   endSplitRequired = false,
+   startSplitNodes = [],
+   endSplitNodes = [],
+   fragment = this;
+
+   function createSplits( splitNodes, insertBefore ) {
+   var i, length,
+   startOffsetChange = 0, endOffsetChange = 0, data = [];
+   for ( i = 0, length = splitNodes.length; i < length; i++ ) {
+   data.unshift( { 'type': '/' + splitNodes[i].type } );
+   data.push( splitNodes[i].getClonedElement() );
+
+   if ( insertBefore ) {
+   startOffsetChange += 2;
+   endOffsetChange += 2;
+   }
+   }
+
+   tx = ve.dm.Transaction.newFromInsertion( fragment.document, 
insertBefore ? startOffset : endOffset, data );
+   fragment.surface.change( tx, !fragment.noAutoSelect && 
tx.translateRange( fragment.range ) );
+
+   startOffset += startOffsetChange;
+   endOffset += endOffsetChange;
+   }
+
+   nodes = this.document.selectNodes( this.range, 'siblings' );
+
+   // Find start split point, if required
+   startSplitNode = nodes[0].node;
+   startOffset = startSplitNode.getOuterRange().start;
+   while ( startSplitNode.constructor.static.parentNodeTypes !== null ) {
+   if ( startSplitNode.parent.indexOf( startSplitNode ) > 0 ) {
+   startSplitRequired = true;
+   }
+   startSplitNode = startSplitNode.parent;
+   if ( startSplitRequired ) {
+   startSplitNodes.unshift(startSplitNode);
+   } else {
+   startOffset = startSplitNode.getOuterRange().start;
+   }
+   }
+
+   // Find end split point, if required
+   endSplitNode = nodes[nodes.length - 1].node;
+   endOffset = endSplitNode.getOuterRange().end;
+   while ( endSplitNode.constructor.static.parentNodeTypes !== null ) {
+   if ( endSplitNode.parent.indexOf( endSplitNode ) < 
endSplitNode.parent.getChildren().length - 1 ) {
+   endSplitRequired = true;
+   }
+   endSplitNode = endSplitNode.parent;
+   if ( endSplitRequired ) {
+   endSplitNodes.unshift(endSplitNode);
+   } else {
+   endOffset = endSplitNode.getOuterRange().end;
+   }
+   }
+
+   if ( startSplitRequired ) {
+   createSplits( startSplitNodes, true );
+   }
+
+   if ( endSplitRequired ) {
+   createSplits( endSplitNodes, false );
+   }
+
+   return this;
+};
diff --git a/modules/ve/test/dm/ve.dm.SurfaceFragment.test.js 
b/modules/ve/test/dm/ve.dm.SurfaceFragment.test.js
index a685386..88c2a5b 100644
--- a/modules/ve/test/dm/ve.dm.SurfaceFragment.test.js
+++ b/modules/ve/test/dm/ve.dm.SurfaceFragment.test.js
@@ -7,7 +7,7 @@
 
 QUnit.module( 've.dm.SurfaceFragment' );
 
-// Tests
+/* Tests */
 
 QUnit.test( 'constructor', 8, function ( ass

[MediaWiki-commits] [Gerrit] corrected bug if no DMid is associated to a iso639 code - change (mediawiki...WikiLexicalData)

2013-02-22 Thread Kipcool (Code Review)
Kipcool has uploaded a new change for review.

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


Change subject: corrected bug if no DMid is associated to a iso639 code
..

corrected bug if no DMid is associated to a iso639 code

Change-Id: I7e014e835deaa0325f7b0aaa1cbd0150dd95855b
---
M OmegaWiki/SpecialSuggest.php
1 file changed, 7 insertions(+), 1 deletion(-)


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

diff --git a/OmegaWiki/SpecialSuggest.php b/OmegaWiki/SpecialSuggest.php
index d12886d..322df36 100644
--- a/OmegaWiki/SpecialSuggest.php
+++ b/OmegaWiki/SpecialSuggest.php
@@ -277,7 +277,13 @@
' AND ' . getLatestTransactionRestriction( 
"{$dc}_collection_contents" ) .
' LIMIT 1 ' ;
$lang_res = $dbr->query( $sql );
-   $language_dm_id = $dbr->fetchObject( $lang_res 
)->member_mid;
+   $result = $dbr->fetchObject( $lang_res );
+   if ( $result ) {
+   $language_dm_id = $result->member_mid;
+   } else {
+   // this language does not have an associated dm
+   $language_dm_id = 0;
+   }
 
$classMids = array_merge ( $wgDefaultClassMids , 
array($language_dm_id) ) ;
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7e014e835deaa0325f7b0aaa1cbd0150dd95855b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikiLexicalData
Gerrit-Branch: master
Gerrit-Owner: Kipcool 

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


[MediaWiki-commits] [Gerrit] jquery-ification of suggest dropdown comboboxes. - change (mediawiki...WikiLexicalData)

2013-02-22 Thread Kipcool (Code Review)
Kipcool has uploaded a new change for review.

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


Change subject: jquery-ification of suggest dropdown comboboxes.
..

jquery-ification of suggest dropdown comboboxes.

Change-Id: Ide21c3ef2c979acb61a1fb598222ac7ba1acddbd
---
M OmegaWiki/OmegaWikiEditors.php
M OmegaWiki/forms.php
M OmegaWiki/resources/suggest.css
M OmegaWiki/resources/suggest.js
4 files changed, 319 insertions(+), 326 deletions(-)


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

diff --git a/OmegaWiki/OmegaWikiEditors.php b/OmegaWiki/OmegaWikiEditors.php
index 6990d30..a5f1ae9 100644
--- a/OmegaWiki/OmegaWikiEditors.php
+++ b/OmegaWiki/OmegaWikiEditors.php
@@ -983,10 +983,7 @@
$result = createTableViewer( $attribute );
$result->setHideEmptyColumns( false );
$result->setRowHTMLAttributes( array(
-   "class" => "suggestion-row",
-   "onclick" => "suggestRowClicked(event, this)",
-   "onmouseover" => "mouseOverRow(this)",
-   "onmouseout" => "mouseOutRow(this)"
+   "class" => "suggestion-row"
) );

return $result;
diff --git a/OmegaWiki/forms.php b/OmegaWiki/forms.php
index ac0a41c..0f28a03 100644
--- a/OmegaWiki/forms.php
+++ b/OmegaWiki/forms.php
@@ -46,7 +46,7 @@
}
 }
 
-function getCheckBoxWithOnClick( $name, $isChecked, $onClick, $disabled = 
false ) {
+function getCheckBoxWithClass( $name, $isChecked, $class, $disabled = false ) {
if ( $disabled ) {
if ( $isChecked ) {
return '';
@@ -54,7 +54,7 @@
return '';
}
} else {
-   return '';
+   return '';
}
 }
 
@@ -65,7 +65,7 @@
// do not print the checkbox
return '';
} else {
-   return getCheckBoxWithOnClick( $name, false, 
"removeClicked(this);" );
+   return getCheckBoxWithClass( $name, false, "remove-checkbox" );
}
 }
 
@@ -138,45 +138,30 @@
'';
 
$result .=
-   '' . $label . '' .
+   '' . $label . '' .
'';

-   if ( $wgLang->isRTL() ) {
-   $result .=
-   '' .
-   '' .
-   '' .
-   '' .
-   '' . wfMsg( 'ow_suggest_clear' ) . '' .
-   ' ' . wfMsg( 'ow_suggest_previous' 
) . '' .
-   '' . wfMsg( 
'ow_suggest_next' ) . ' ' .
-   '[X]' .
-   '' .
-   '' .
-   '' .
-   '';
-   } else {
-   $result .=
-   '' .
-   '' .
-   '' .
-   '' .
-   '' . wfMsg( 'ow_suggest_clear' ) . '' .
-   ' ' . wfMsg( 'ow_suggest_previous' 
) . '' .
-   '' . wfMsg( 
'ow_suggest_next' ) . ' ' .
-   '[X]' .
-   '' .
-   '' .
-   '' .
-   '';
-   }
+   $result .=
+   '' .
+   '' .
+   '' .
+   '' .
+   '' . wfMsg( 'ow_suggest_clear' ) . '' .
+   ' ' . wfMsg( 'ow_suggest_previous' ) . '' .
+   '' . wfMsg( 'ow_suggest_next' ) . ' ' .
+   '[X]' .
+   '' .
+   '' .
+   '' .
+   '';
+
return $result;
 }
 
 function getStaticSuggest( $name, $suggestions, $idColumns = 1, $value = 0, 
$label = '', $displayLabelColumns = array( 0 ) ) {
-   if ( $label == "" )
+   if ( $label == "" ) {
$label = 
'';
-
+   }
$result =
'' .
 // '' .
@@ -187,17 +172,16 @@
$result .= '';
 
$result .=
-   '' . $label . '' .
+   '' . $label . 
'' .
'' .
-'' .
-   '' .
-// '' .
-   '' . wfMsg( 
'ow_suggest_clear' ) . '[X]' .
-   '' . $suggestions .
-   // 
-   '' .
-

[MediaWiki-commits] [Gerrit] corrected bug if no DMid is associated to a iso639 code - change (mediawiki...WikiLexicalData)

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

Change subject: corrected bug if no DMid is associated to a iso639 code
..


corrected bug if no DMid is associated to a iso639 code

Change-Id: I7e014e835deaa0325f7b0aaa1cbd0150dd95855b
---
M OmegaWiki/SpecialSuggest.php
1 file changed, 7 insertions(+), 1 deletion(-)

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



diff --git a/OmegaWiki/SpecialSuggest.php b/OmegaWiki/SpecialSuggest.php
index d12886d..322df36 100644
--- a/OmegaWiki/SpecialSuggest.php
+++ b/OmegaWiki/SpecialSuggest.php
@@ -277,7 +277,13 @@
' AND ' . getLatestTransactionRestriction( 
"{$dc}_collection_contents" ) .
' LIMIT 1 ' ;
$lang_res = $dbr->query( $sql );
-   $language_dm_id = $dbr->fetchObject( $lang_res 
)->member_mid;
+   $result = $dbr->fetchObject( $lang_res );
+   if ( $result ) {
+   $language_dm_id = $result->member_mid;
+   } else {
+   // this language does not have an associated dm
+   $language_dm_id = 0;
+   }
 
$classMids = array_merge ( $wgDefaultClassMids , 
array($language_dm_id) ) ;
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7e014e835deaa0325f7b0aaa1cbd0150dd95855b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikiLexicalData
Gerrit-Branch: master
Gerrit-Owner: Kipcool 
Gerrit-Reviewer: Kipcool 

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


[MediaWiki-commits] [Gerrit] jquery-ification of suggest dropdown comboboxes. - change (mediawiki...WikiLexicalData)

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

Change subject: jquery-ification of suggest dropdown comboboxes.
..


jquery-ification of suggest dropdown comboboxes.

Change-Id: Ide21c3ef2c979acb61a1fb598222ac7ba1acddbd
---
M OmegaWiki/OmegaWikiEditors.php
M OmegaWiki/forms.php
M OmegaWiki/resources/suggest.css
M OmegaWiki/resources/suggest.js
4 files changed, 319 insertions(+), 326 deletions(-)

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



diff --git a/OmegaWiki/OmegaWikiEditors.php b/OmegaWiki/OmegaWikiEditors.php
index 6990d30..a5f1ae9 100644
--- a/OmegaWiki/OmegaWikiEditors.php
+++ b/OmegaWiki/OmegaWikiEditors.php
@@ -983,10 +983,7 @@
$result = createTableViewer( $attribute );
$result->setHideEmptyColumns( false );
$result->setRowHTMLAttributes( array(
-   "class" => "suggestion-row",
-   "onclick" => "suggestRowClicked(event, this)",
-   "onmouseover" => "mouseOverRow(this)",
-   "onmouseout" => "mouseOutRow(this)"
+   "class" => "suggestion-row"
) );

return $result;
diff --git a/OmegaWiki/forms.php b/OmegaWiki/forms.php
index ac0a41c..0f28a03 100644
--- a/OmegaWiki/forms.php
+++ b/OmegaWiki/forms.php
@@ -46,7 +46,7 @@
}
 }
 
-function getCheckBoxWithOnClick( $name, $isChecked, $onClick, $disabled = 
false ) {
+function getCheckBoxWithClass( $name, $isChecked, $class, $disabled = false ) {
if ( $disabled ) {
if ( $isChecked ) {
return '';
@@ -54,7 +54,7 @@
return '';
}
} else {
-   return '';
+   return '';
}
 }
 
@@ -65,7 +65,7 @@
// do not print the checkbox
return '';
} else {
-   return getCheckBoxWithOnClick( $name, false, 
"removeClicked(this);" );
+   return getCheckBoxWithClass( $name, false, "remove-checkbox" );
}
 }
 
@@ -138,45 +138,30 @@
'';
 
$result .=
-   '' . $label . '' .
+   '' . $label . '' .
'';

-   if ( $wgLang->isRTL() ) {
-   $result .=
-   '' .
-   '' .
-   '' .
-   '' .
-   '' . wfMsg( 'ow_suggest_clear' ) . '' .
-   ' ' . wfMsg( 'ow_suggest_previous' 
) . '' .
-   '' . wfMsg( 
'ow_suggest_next' ) . ' ' .
-   '[X]' .
-   '' .
-   '' .
-   '' .
-   '';
-   } else {
-   $result .=
-   '' .
-   '' .
-   '' .
-   '' .
-   '' . wfMsg( 'ow_suggest_clear' ) . '' .
-   ' ' . wfMsg( 'ow_suggest_previous' 
) . '' .
-   '' . wfMsg( 
'ow_suggest_next' ) . ' ' .
-   '[X]' .
-   '' .
-   '' .
-   '' .
-   '';
-   }
+   $result .=
+   '' .
+   '' .
+   '' .
+   '' .
+   '' . wfMsg( 'ow_suggest_clear' ) . '' .
+   ' ' . wfMsg( 'ow_suggest_previous' ) . '' .
+   '' . wfMsg( 'ow_suggest_next' ) . ' ' .
+   '[X]' .
+   '' .
+   '' .
+   '' .
+   '';
+
return $result;
 }
 
 function getStaticSuggest( $name, $suggestions, $idColumns = 1, $value = 0, 
$label = '', $displayLabelColumns = array( 0 ) ) {
-   if ( $label == "" )
+   if ( $label == "" ) {
$label = 
'';
-
+   }
$result =
'' .
 // '' .
@@ -187,17 +172,16 @@
$result .= '';
 
$result .=
-   '' . $label . '' .
+   '' . $label . 
'' .
'' .
-'' .
-   '' .
-// '' .
-   '' . wfMsg( 
'ow_suggest_clear' ) . '[X]' .
-   '' . $suggestions .
-   // 
-   '' .
-'';
-   
+   '' .
+   '' .
+

[MediaWiki-commits] [Gerrit] Implement SurfaceFragment.unwrapAllNodes and fix wrapAllNodes. - change (mediawiki...VisualEditor)

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

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


Change subject: Implement SurfaceFragment.unwrapAllNodes and fix wrapAllNodes.
..

Implement SurfaceFragment.unwrapAllNodes and fix wrapAllNodes.

wrapAllNodes was calulating the new selection incorrectly. This has
been fixed and a test added.

unwrapAllNodes takes a depth as its argument and unwraps that many
elements from inside the selection.

Tests for wrap/unwrap apply also now check that applying a wrap
and then its inverse as an unwrap result in the document reverting
to its original state.

Change-Id: I7dcacdfb5894be59ffad69b369d7b32933a25b61
---
M modules/ve/dm/ve.dm.SurfaceFragment.js
M modules/ve/test/dm/ve.dm.SurfaceFragment.test.js
2 files changed, 63 insertions(+), 11 deletions(-)


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

diff --git a/modules/ve/dm/ve.dm.SurfaceFragment.js 
b/modules/ve/dm/ve.dm.SurfaceFragment.js
index c208099..2bd23db 100644
--- a/modules/ve/dm/ve.dm.SurfaceFragment.js
+++ b/modules/ve/dm/ve.dm.SurfaceFragment.js
@@ -642,30 +642,53 @@
if ( !this.surface ) {
return this;
}
+
+   var tx, newRange;
+
if ( !ve.isArray( wrapper ) ) {
wrapper = [wrapper];
}
-   var tx = ve.dm.Transaction.newFromWrap( this.document, this.range, [], 
wrapper, [], [] );
-   this.range = tx.translateRange( this.range );
-   this.surface.change( tx, !this.noAutoSelect && this.range );
+
+   newRange = new ve.Range( this.range.start, this.range.end + ( 
wrapper.length * 2 ) );
+
+   tx = ve.dm.Transaction.newFromWrap( this.document, this.range, [], 
wrapper, [], [] );
+   this.surface.change( tx, !this.noAutoSelect && newRange );
+
+   this.range = newRange;
+
return this;
 };
 
 /**
  * Unwrap nodes in the fragment out of one or more elements.
  *
- * TODO: Figure out what the arguments for this function should be
- *
  * @method
- * @param {string|string[]} type Node types to unwrap, or array of node types 
to unwrap
+ * @param {number} depth Number of nodes to unwrap
  * @returns {ve.dm.SurfaceFragment} This fragment
  */
-ve.dm.SurfaceFragment.prototype.unwrapAllNodes = function () {
+ve.dm.SurfaceFragment.prototype.unwrapAllNodes = function ( depth ) {
// Handle null fragment
if ( !this.surface ) {
return this;
}
-   // TODO: Implement
+   var i, tx, newRange, wrapper = [],
+   innerRange = new ve.Range( this.range.start + depth, 
this.range.end - depth);
+
+   if ( this.range.end - this.range.start < depth * 2 ) {
+   throw new Error( 'cannot unwrap by greater depth than maximum 
theoretical depth of selection' );
+   }
+
+   for ( i = 0; i < depth; i++ ) {
+   wrapper.push( this.surface.getDocument().data[this.range.start 
+ i] );
+   }
+
+   newRange = new ve.Range( this.range.start, this.range.end - ( depth * 2 
) );
+
+   tx = ve.dm.Transaction.newFromWrap( this.document, innerRange, wrapper, 
[], [], [] );
+   this.surface.change( tx, !this.noAutoSelect && newRange );
+
+   this.range = newRange;
+
return this;
 };
 
diff --git a/modules/ve/test/dm/ve.dm.SurfaceFragment.test.js 
b/modules/ve/test/dm/ve.dm.SurfaceFragment.test.js
index 88c2a5b..2e124f5 100644
--- a/modules/ve/test/dm/ve.dm.SurfaceFragment.test.js
+++ b/modules/ve/test/dm/ve.dm.SurfaceFragment.test.js
@@ -174,10 +174,12 @@
);
 } );
 
-QUnit.test( 'wrapAllNodes', 2, function ( assert ) {
+QUnit.test( 'wrapAllNodes/unwrapAllNodes', 10, function ( assert ) {
var doc = new ve.dm.Document( ve.copyArray( ve.dm.example.data ) ),
surface = new ve.dm.Surface( doc ),
-   fragment = new ve.dm.SurfaceFragment( surface, new ve.Range( 
55, 61 ) );
+   fragment = new ve.dm.SurfaceFragment( surface, new ve.Range( 
55, 61 ) ),
+   expectedData;
+
// Make 2 paragraphs into 1 lists of 1 item with 2 paragraphs
fragment.wrapAllNodes(
[{ 'type': 'list', 'attributes': { 'style': 'bullet' } }, { 
'type': 'listItem' }]
@@ -202,6 +204,12 @@
],
'wrapping nodes can add multiple levels of wrapping to multiple 
elements'
);
+   assert.deepEqual( fragment.getRange(), new ve.Range( 55, 65 ), 'new 
range contains wrapping elements' );
+
+   fragment.unwrapAllNodes( 2 );
+   assert.deepEqual( doc.getData(), ve.dm.example.data, 'unwrapping 2 
levels restores document to original state' );
+   assert.deepEqual( fragment.getRange(), new ve.Range( 55, 61 ), 'range 
after unwrapping is same as original range' );
+
// Make a 1 paragraph into 1 list with 1 item
fragment = new ve.dm.SurfaceFragment( surface, new ve.Range( 9, 12 ) );
fragment.wrapAllNo

[MediaWiki-commits] [Gerrit] (mingle #405) Make login/acct create header different from w... - change (mediawiki...MobileFrontend)

2013-02-22 Thread awjrichards (Code Review)
awjrichards has uploaded a new change for review.

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


Change subject: (mingle #405) Make login/acct create header different from 
watchlist cta
..

(mingle #405) Make login/acct create header different from watchlist cta

* In beta/alpha only
* Sets header to 'You must be logged in to watch pages.'
* Updates text for header when coming from uploads dashboard to 'You
must be logged in to see your uploads.'

Change-Id: I07b1be58ae227d973d4981819da6a8dd38e77142
---
M MobileFrontend.i18n.php
M includes/skins/SkinMobile.php
2 files changed, 8 insertions(+), 5 deletions(-)


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

diff --git a/MobileFrontend.i18n.php b/MobileFrontend.i18n.php
index d6f88c1..85f3317 100644
--- a/MobileFrontend.i18n.php
+++ b/MobileFrontend.i18n.php
@@ -169,7 +169,7 @@
'mobile-frontend-nearby-error' => 'An unexpected error occurred whilst 
trying to find pages nearby',
 
// image donation
-   'mobile-frontend-donate-image-login' => 'Sign in to view your uploads',
+   'mobile-frontend-donate-image-login' => 'You must be logged in to see 
your uploads.',
'mobile-frontend-photo-upload-generic' => 'Donate an image',
'mobile-frontend-donate-image-title' => 'Donate an image',
'mobile-frontend-donate-image-summary' => 'Photos bring pages on 
{{SITENAME}} to life.
@@ -190,6 +190,7 @@
'mobile-frontend-watchlist-cta' => 'Please login or sign up to watch 
this page.',
'mobile-frontend-watchlist-cta-button-login' => 'Login',
'mobile-frontend-watchlist-cta-button-signup' => 'Sign up',
+   'mobile-frontend-watch-login' => 'You must be logged in to watch 
pages.',
 
'mobile-frontend-watchlist-a-z' => 'All',
'mobile-frontend-watchlist-feed' => 'Modified',
diff --git a/includes/skins/SkinMobile.php b/includes/skins/SkinMobile.php
index 958f619..361ae60 100644
--- a/includes/skins/SkinMobile.php
+++ b/includes/skins/SkinMobile.php
@@ -264,11 +264,13 @@
} else {
$returnto = '';
}
-
-   if ( $req->getVal( 'type' ) == 'signup' ) {
-   $key = 'mobile-frontend-sign-up-heading';
-   } else if ( $returnto == 'DonateImage' ) {
+   $returntoQuery = $req->getVal( 'returntoquery' );
+   if ( $returnto == 'DonateImage' ) {
$key = 'mobile-frontend-donate-image-login';
+   } elseif ( strstr( $returntoQuery, 'article_action=watch' ) ) {
+   $key = 'mobile-frontend-watch-login';
+   } elseif ( $req->getVal( 'type' ) == 'signup' ) {
+   $key = 'mobile-frontend-sign-up-heading';
} else {
$key = 'mobile-frontend-sign-in-heading';
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I07b1be58ae227d973d4981819da6a8dd38e77142
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: awjrichards 

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


[MediaWiki-commits] [Gerrit] harmon and copper as internal hosts - change (operations/puppet)

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

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


Change subject: harmon and copper as internal hosts
..

harmon and copper as internal hosts

Change-Id: I09a864a62f9c0325c0566237e3fd43a5d709ab3f
---
M files/autoinstall/netboot.cfg
M files/dhcpd/linux-host-entries.ttyS1-115200
2 files changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/31/50431/1

diff --git a/files/autoinstall/netboot.cfg b/files/autoinstall/netboot.cfg
index dffb406..9c16fcd 100644
--- a/files/autoinstall/netboot.cfg
+++ b/files/autoinstall/netboot.cfg
@@ -60,7 +60,7 @@
searchidx*) echo partman/searchidx.cfg ;; \
search[0-9]*) echo partman/search.cfg ;; \
snapshot[1-4]|snapshot1002) echo partman/snapshot.cfg ;; \
-   ssl[1-3]0[0-9][0-9]|ssl[0-9]|neon|zirconium) echo 
partman/raid1-lvm.cfg ;; \
+   copper|neon|harmon|ssl[1-3]0[0-9][0-9]|ssl[0-9]|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 ;; \
diff --git a/files/dhcpd/linux-host-entries.ttyS1-115200 
b/files/dhcpd/linux-host-entries.ttyS1-115200
index 9dd9290..811178a 100644
--- a/files/dhcpd/linux-host-entries.ttyS1-115200
+++ b/files/dhcpd/linux-host-entries.ttyS1-115200
@@ -196,7 +196,7 @@
 
 host copper {
hardware ethernet 78:2b:cb:09:0e:9d;
-   fixed-address copper.wikimedia.org;
+   fixed-address copper.eqiad.wmnet;
 }
 
 host cp1001 {
@@ -1148,7 +1148,7 @@
 
 host harmon {
hardware ethernet 84:2b:2b:06:36:4f;
-   fixed-address harmon.wikimedia.org;
+   fixed-address harmon.pmtpa.wmnet;
 }
 
 host helium {

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

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

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


[MediaWiki-commits] [Gerrit] First milkshake test example for language team - change (qa/browsertests)

2013-02-22 Thread Cmcmahon (Code Review)
Cmcmahon has uploaded a new change for review.

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


Change subject: First milkshake test example for language team
..

First milkshake test example for language team

Change-Id: I362d37129b42d4766b7a3f5718d719d52340f502
---
A features/milkshake.feature
A features/step_definitions/milkshake_steps.rb
A features/support/pages/translate_page.rb
3 files changed, 34 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/qa/browsertests 
refs/changes/32/50432/1

diff --git a/features/milkshake.feature b/features/milkshake.feature
new file mode 100644
index 000..1a5e783
--- /dev/null
+++ b/features/milkshake.feature
@@ -0,0 +1,7 @@
+Feature: Milkshake translation
+
+  Scenario: Translate Page
+Given I am not logged in
+When I go to translate page
+Then translate page should open
+  And proofread link should exist
diff --git a/features/step_definitions/milkshake_steps.rb 
b/features/step_definitions/milkshake_steps.rb
new file mode 100644
index 000..674f3bc
--- /dev/null
+++ b/features/step_definitions/milkshake_steps.rb
@@ -0,0 +1,14 @@
+Given /^I am not logged in$/ do
+end
+
+When /^I go to translate page$/ do
+  visit(TranslatePage)
+end
+
+Then /^translate page should open$/ do
+  @browser.url.should == on(TranslatePage).class.url
+end
+
+Then /^proofread link should exist$/ do
+  on(TranslatePage).proofread_element.should exist
+end
diff --git a/features/support/pages/translate_page.rb 
b/features/support/pages/translate_page.rb
new file mode 100644
index 000..e488775
--- /dev/null
+++ b/features/support/pages/translate_page.rb
@@ -0,0 +1,13 @@
+class TranslatePage
+  include PageObject
+  include URLModule
+
+  def self.url
+'https://translatewiki.net/wiki/Special:Translate'
+  end
+  page_url url
+
+  a(:proofread, text: 'Proofread')
+  
+end
+

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I362d37129b42d4766b7a3f5718d719d52340f502
Gerrit-PatchSet: 1
Gerrit-Project: qa/browsertests
Gerrit-Branch: master
Gerrit-Owner: Cmcmahon 

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


[MediaWiki-commits] [Gerrit] First milkshake test example for language team - change (qa/browsertests)

2013-02-22 Thread Zfilipin (Code Review)
Zfilipin has submitted this change and it was merged.

Change subject: First milkshake test example for language team
..


First milkshake test example for language team

Change-Id: I362d37129b42d4766b7a3f5718d719d52340f502
---
A features/milkshake.feature
A features/step_definitions/milkshake_steps.rb
A features/support/pages/translate_page.rb
3 files changed, 34 insertions(+), 0 deletions(-)

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



diff --git a/features/milkshake.feature b/features/milkshake.feature
new file mode 100644
index 000..1a5e783
--- /dev/null
+++ b/features/milkshake.feature
@@ -0,0 +1,7 @@
+Feature: Milkshake translation
+
+  Scenario: Translate Page
+Given I am not logged in
+When I go to translate page
+Then translate page should open
+  And proofread link should exist
diff --git a/features/step_definitions/milkshake_steps.rb 
b/features/step_definitions/milkshake_steps.rb
new file mode 100644
index 000..674f3bc
--- /dev/null
+++ b/features/step_definitions/milkshake_steps.rb
@@ -0,0 +1,14 @@
+Given /^I am not logged in$/ do
+end
+
+When /^I go to translate page$/ do
+  visit(TranslatePage)
+end
+
+Then /^translate page should open$/ do
+  @browser.url.should == on(TranslatePage).class.url
+end
+
+Then /^proofread link should exist$/ do
+  on(TranslatePage).proofread_element.should exist
+end
diff --git a/features/support/pages/translate_page.rb 
b/features/support/pages/translate_page.rb
new file mode 100644
index 000..e488775
--- /dev/null
+++ b/features/support/pages/translate_page.rb
@@ -0,0 +1,13 @@
+class TranslatePage
+  include PageObject
+  include URLModule
+
+  def self.url
+'https://translatewiki.net/wiki/Special:Translate'
+  end
+  page_url url
+
+  a(:proofread, text: 'Proofread')
+  
+end
+

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I362d37129b42d4766b7a3f5718d719d52340f502
Gerrit-PatchSet: 1
Gerrit-Project: qa/browsertests
Gerrit-Branch: master
Gerrit-Owner: Cmcmahon 
Gerrit-Reviewer: Arrbee 
Gerrit-Reviewer: Siebrand 
Gerrit-Reviewer: Zfilipin 

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


[MediaWiki-commits] [Gerrit] Clear killlist on resets - change (mediawiki...GeoData)

2013-02-22 Thread awjrichards (Code Review)
awjrichards has submitted this change and it was merged.

Change subject: Clear killlist on resets
..


Clear killlist on resets

Change-Id: I60df31bcbe64bd78eaf0d810a270b64712d8f62b
---
M solrupdate.php
1 file changed, 7 insertions(+), 3 deletions(-)

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



diff --git a/solrupdate.php b/solrupdate.php
index a167f88..92997d6 100644
--- a/solrupdate.php
+++ b/solrupdate.php
@@ -50,7 +50,14 @@
if ( $this->hasOption( 'reset' ) ) {
$this->output( "Resetting update tracking...\n" );
$dbw->delete( 'geo_updates', array( 'gu_wiki' => 
$wikiId ), __METHOD__ );
+   $this->output( "Truncating killlist...\n" );
+   $table = $dbw->tableName( 'geo_killlist' );
+   $dbw->query( "TRUNCATE TABLE $table", __METHOD__ );
+   $cutoffKilllist = false;
+   } else {
+   $cutoffKilllist = $dbr->selectField( 'geo_killlist', 
'MAX( gk_killed_id )', '', __METHOD__ );
}
+   $cutoffTags = $dbr->selectField( 'geo_tags', 'MAX( gt_id )', 
'', __METHOD__ );
 
if ( $this->hasOption( 'clear-killlist' ) ) {
$days = intval( $this->getOption( 'clear-killlist' ) );
@@ -88,9 +95,6 @@
$lastTag = $row->gu_last_tag;
$lastKill = $row->gu_last_kill;
}
-
-   $cutoffTags = $dbr->selectField( 'geo_tags', 'MAX( gt_id )', 
'', __METHOD__ );
-   $cutoffKilllist = $dbr->selectField( 'geo_killlist', 'MAX( 
gk_killed_id )', '', __METHOD__ );
 
$solr = SolrGeoData::newClient( 'master' );
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I60df31bcbe64bd78eaf0d810a270b64712d8f62b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/GeoData
Gerrit-Branch: master
Gerrit-Owner: MaxSem 
Gerrit-Reviewer: awjrichards 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] harmon and copper as internal hosts - change (operations/puppet)

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

Change subject: harmon and copper as internal hosts
..


harmon and copper as internal hosts

Change-Id: I09a864a62f9c0325c0566237e3fd43a5d709ab3f
---
M files/autoinstall/netboot.cfg
M files/dhcpd/linux-host-entries.ttyS1-115200
2 files changed, 3 insertions(+), 3 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 dffb406..9c16fcd 100644
--- a/files/autoinstall/netboot.cfg
+++ b/files/autoinstall/netboot.cfg
@@ -60,7 +60,7 @@
searchidx*) echo partman/searchidx.cfg ;; \
search[0-9]*) echo partman/search.cfg ;; \
snapshot[1-4]|snapshot1002) echo partman/snapshot.cfg ;; \
-   ssl[1-3]0[0-9][0-9]|ssl[0-9]|neon|zirconium) echo 
partman/raid1-lvm.cfg ;; \
+   copper|neon|harmon|ssl[1-3]0[0-9][0-9]|ssl[0-9]|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 ;; \
diff --git a/files/dhcpd/linux-host-entries.ttyS1-115200 
b/files/dhcpd/linux-host-entries.ttyS1-115200
index 9dd9290..811178a 100644
--- a/files/dhcpd/linux-host-entries.ttyS1-115200
+++ b/files/dhcpd/linux-host-entries.ttyS1-115200
@@ -196,7 +196,7 @@
 
 host copper {
hardware ethernet 78:2b:cb:09:0e:9d;
-   fixed-address copper.wikimedia.org;
+   fixed-address copper.eqiad.wmnet;
 }
 
 host cp1001 {
@@ -1148,7 +1148,7 @@
 
 host harmon {
hardware ethernet 84:2b:2b:06:36:4f;
-   fixed-address harmon.wikimedia.org;
+   fixed-address harmon.pmtpa.wmnet;
 }
 
 host helium {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I09a864a62f9c0325c0566237e3fd43a5d709ab3f
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: RobH 
Gerrit-Reviewer: RobH 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] copper migration - change (operations/puppet)

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

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


Change subject: copper migration
..

copper migration

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


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/33/50433/1

diff --git a/manifests/decommissioning.pp b/manifests/decommissioning.pp
index 08362ed..7f3ddf7 100644
--- a/manifests/decommissioning.pp
+++ b/manifests/decommissioning.pp
@@ -7,6 +7,7 @@
 "bayes",
 "br1-knams",
 "controller",
+"copper", #moved from external to internal ip, will come back out once spence 
updates
 "cp3001",
 "cp3002",
 "db1",

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

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

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


[MediaWiki-commits] [Gerrit] copper migration - change (operations/puppet)

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

Change subject: copper migration
..


copper migration

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

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



diff --git a/manifests/decommissioning.pp b/manifests/decommissioning.pp
index 08362ed..7f3ddf7 100644
--- a/manifests/decommissioning.pp
+++ b/manifests/decommissioning.pp
@@ -7,6 +7,7 @@
 "bayes",
 "br1-knams",
 "controller",
+"copper", #moved from external to internal ip, will come back out once spence 
updates
 "cp3001",
 "cp3002",
 "db1",

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I708985b2db56f9f3d0d5afe5afc188867b311c96
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: RobH 
Gerrit-Reviewer: RobH 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] (bug 43461) Hide Phantoms - change (mediawiki...VisualEditor)

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

Change subject: (bug 43461) Hide Phantoms
..


(bug 43461) Hide Phantoms

This fixes a problem that phantoms would remain visible if moving the mouse 
quickly. Now binding to mousemove and also mouseout.

Change-Id: I4f5e3319038828f83b108e9f5a45f54ebfeb7027
---
M modules/ve/ce/nodes/ve.ce.AlienNode.js
1 file changed, 29 insertions(+), 5 deletions(-)

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



diff --git a/modules/ve/ce/nodes/ve.ce.AlienNode.js 
b/modules/ve/ce/nodes/ve.ce.AlienNode.js
index 363a6a0..cb4399c 100644
--- a/modules/ve/ce/nodes/ve.ce.AlienNode.js
+++ b/modules/ve/ce/nodes/ve.ce.AlienNode.js
@@ -61,7 +61,10 @@
);
} );
surface.replacePhantoms( $phantoms );
-   surface.$.on( 'mousemove.phantoms', ve.bind( this.onSurfaceMouseMove, 
this ) );
+   surface.$.on({
+   'mousemove.phantoms': ve.bind( this.onSurfaceMouseMove, this ),
+   'mouseout.phantoms': ve.bind( this.onSurfaceMouseOut, this )
+   });
 };
 
 /**
@@ -103,17 +106,38 @@
  * @param {jQuery.Event} e
  */
 ve.ce.AlienNode.prototype.onSurfaceMouseMove = function ( e ) {
-   var surface, $target = $( e.target );
+   var $target = $( e.target );
if (
!$target.hasClass( 've-ce-surface-phantom' ) &&
$target.closest( '.ve-ce-alienNode' ).length === 0
) {
-   surface = this.root.getSurface();
-   surface.replacePhantoms( null );
-   surface.$.unbind( 'mousemove.phantoms' );
+   this.clearPhantoms();
}
 };
 
+/**
+ * Handle surface mouse out events.
+ *
+ * @method
+ * @param {jQuery.Event} e
+ */
+ve.ce.AlienNode.prototype.onSurfaceMouseOut = function ( e ) {
+   if ( e.toElement === null) {
+   this.clearPhantoms();
+   }
+};
+
+/**
+ * Clears all phantoms and unbinds .phantoms namespace event handlers
+ *
+ * @method
+ */
+ve.ce.AlienNode.prototype.clearPhantoms = function() {
+   var surface = this.root.getSurface();
+   surface.replacePhantoms( null );
+   surface.$.unbind( '.phantoms' );
+};
+
 /* Registration */
 
 ve.ce.nodeFactory.register( 'alien', ve.ce.AlienNode );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4f5e3319038828f83b108e9f5a45f54ebfeb7027
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Christian 
Gerrit-Reviewer: Trevor Parscal 
Gerrit-Reviewer: jenkins-bot

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


  1   2   >