[MediaWiki-commits] [Gerrit] Wikitech - disable SSL3 - change (operations/puppet)

2014-10-17 Thread Chmarkine (Code Review)
Chmarkine has uploaded a new change for review.

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

Change subject: Wikitech - disable SSL3
..

Wikitech - disable SSL3

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


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/69/167169/1

diff --git a/manifests/role/nova.pp b/manifests/role/nova.pp
index df6fbaa..d167c75 100644
--- a/manifests/role/nova.pp
+++ b/manifests/role/nova.pp
@@ -194,7 +194,7 @@
 ca = $ca
 }
 
-$ssl_settings = ssl_ciphersuite('apache-2.2', 'compat', '365')
+$ssl_settings = ssl_ciphersuite('apache-2.2', 'compatnossl', '365')
 
 class { 'openstack::openstack-manager':
 openstack_version = $openstack_version,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2a968d75cffacacc0d5ca14cfbb0f837e1b41745
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Chmarkine chmark...@hotmail.com

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


[MediaWiki-commits] [Gerrit] MW 1.25wmf4 API deprecated paraminfo querymodules - change (pywikibot/core)

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

Change subject: MW 1.25wmf4 API deprecated paraminfo querymodules
..


MW 1.25wmf4 API deprecated paraminfo querymodules

The API action=paraminfo parameter querymodules has been deprecated
with parameter modules as the alternative, with query+value as the
replacement.

QueryGenerator updated to support both old and new syntax, depending
on the site version.

Bug: 72169
Change-Id: Ic02dfba4fd94d8c69b7f28037330cd6467f30234
---
M pywikibot/data/api.py
1 file changed, 14 insertions(+), 7 deletions(-)

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



diff --git a/pywikibot/data/api.py b/pywikibot/data/api.py
index 95f6b91..5357cc5 100644
--- a/pywikibot/data/api.py
+++ b/pywikibot/data/api.py
@@ -908,22 +908,29 @@
 
 @property
 def _modules(self):
-Query api on self.site for paraminfo on querymodule=self.module.
-if not set(self.module.split('|')) = set(self.__modules.keys()):
+Query api on self.site for paraminfo on self.module.
+modules = self.module.split('|')
+if not set(modules) = set(self.__modules.keys()):
+if LV(self.site.version())  LV('1.25wmf4'):
+key = 'querymodules'
+value = self.module
+else:
+key = 'modules'
+value = ['query+' + module for module in modules]
 paramreq = CachedRequest(expiry=config.API_config_expiry,
  site=self.site, action=paraminfo,
- querymodules=self.module)
+ **{key: value})
 data = paramreq.submit()
 assert paraminfo in data
-assert querymodules in data[paraminfo]
-assert len(data[paraminfo][querymodules]) == 1 + 
self.module.count(|)
-for paraminfo in data[paraminfo][querymodules]:
+assert key in data[paraminfo]
+assert len(data[paraminfo][key]) == len(modules)
+for paraminfo in data[paraminfo][key]:
 assert paraminfo[name] in self.module
 if missing in paraminfo:
 raise Error(Invalid query module name '%s'. % 
self.module)
 self.__modules[paraminfo[name]] = paraminfo
 _modules = {}
-for m in self.module.split('|'):
+for m in modules:
 _modules[m] = self.__modules[m]
 return _modules
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic02dfba4fd94d8c69b7f28037330cd6467f30234
Gerrit-PatchSet: 2
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: John Vandenberg jay...@gmail.com
Gerrit-Reviewer: Ladsgroup ladsgr...@gmail.com
Gerrit-Reviewer: Legoktm legoktm.wikipe...@gmail.com
Gerrit-Reviewer: Merlijn van Deen valhall...@arctus.nl
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] OTRS - disable SSL3 - change (operations/puppet)

2014-10-17 Thread Chmarkine (Code Review)
Chmarkine has uploaded a new change for review.

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

Change subject: OTRS - disable SSL3
..

OTRS - disable SSL3

Disable SSLv3 on https://ticket.wikimedia.org

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


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/70/167170/1

diff --git a/manifests/role/nova.pp b/manifests/role/nova.pp
index df6fbaa..d167c75 100644
--- a/manifests/role/nova.pp
+++ b/manifests/role/nova.pp
@@ -194,7 +194,7 @@
 ca = $ca
 }
 
-$ssl_settings = ssl_ciphersuite('apache-2.2', 'compat', '365')
+$ssl_settings = ssl_ciphersuite('apache-2.2', 'compatnossl', '365')
 
 class { 'openstack::openstack-manager':
 openstack_version = $openstack_version,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1f0e8703bb8c092521b7a0e50fe5c90f9b99e5f7
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Chmarkine chmark...@hotmail.com

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


[MediaWiki-commits] [Gerrit] RT - Disable SSL3 - change (operations/puppet)

2014-10-17 Thread Chmarkine (Code Review)
Chmarkine has uploaded a new change for review.

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

Change subject: RT - Disable SSL3
..

RT - Disable SSL3

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


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/71/167171/1

diff --git a/manifests/role/rt.pp b/manifests/role/rt.pp
index 5bfd387..3031484 100644
--- a/manifests/role/rt.pp
+++ b/manifests/role/rt.pp
@@ -6,7 +6,7 @@
 
 install_certificate { 'rt.wikimedia.org': }
 
-$ssl_settings = ssl_ciphersuite('apache-2.2', 'compat')
+$ssl_settings = ssl_ciphersuite('apache-2.2', 'compatnossl')
 
 class { 'misc::rt':
 site   = 'rt.wikimedia.org',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I52a0b68276cb5adeb68f72b002e0c7434a3bb19d
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Chmarkine chmark...@hotmail.com

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


[MediaWiki-commits] [Gerrit] Remove legacy jshintignore file and fix hidden jshint errors - change (mediawiki...Wikibase)

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

Change subject: Remove legacy jshintignore file and fix hidden jshint errors
..


Remove legacy jshintignore file and fix hidden jshint errors

Change-Id: I7f7e9fbbb2e694a41cee32b55faf914529739e69
---
D .jshintignore
M lib/tests/qunit/templates.tests.js
M lib/tests/qunit/wikibase.RepoApi/wikibase.RepoApi.tests.js
3 files changed, 1 insertion(+), 21 deletions(-)

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



diff --git a/.jshintignore b/.jshintignore
deleted file mode 100644
index c64fa25..000
--- a/.jshintignore
+++ /dev/null
@@ -1,13 +0,0 @@
-./lib/tests/qunit/templates.tests.js
-./lib/tests/qunit/wikibase.Site.tests.js
-./lib/tests/qunit/wikibase.tests.js
-./lib/tests/qunit/data/testrunner.js
-./lib/tests/qunit/parsers/EntityIdParser.tests.js
-./lib/tests/qunit/wikibase.RepoApi/wikibase.RepoApiError.tests.js
-./lib/tests/qunit/wikibase.RepoApi/wikibase.RepoApi.tests.js
-./lib/tests/qunit/wikibase.utilities/wikibase.utilities.ClaimGuidGenerator.tests.js
-./lib/tests/qunit/wikibase.utilities/wikibase.utilities.GuidGenerator.tests.js
-./lib/tests/qunit/wikibase.utilities/wikibase.utilities.jQuery.NativeEventHandler.tests.js
-./lib/tests/qunit/wikibase.utilities/wikibase.utilities.jQuery.NativeEventHandler.testsOnObject.js
-./lib/tests/qunit/wikibase.utilities/wikibase.utilities.jQuery.NativeEventHandler.testsOnWidget.js
-./tests/browser/vendor/
diff --git a/lib/tests/qunit/templates.tests.js 
b/lib/tests/qunit/templates.tests.js
index 6079df0..cb9c7d5 100644
--- a/lib/tests/qunit/templates.tests.js
+++ b/lib/tests/qunit/templates.tests.js
@@ -201,7 +201,7 @@
 
if ( expected === '' ) {
assert.throws(
-   function() { $( 'div/' ).append( 
mw.template( key, params ) ).html() },
+   function() { $( 'div/' ).append( 
mw.template( key, params ) ).html(); },
'Triggered error when trying to create 
invalid HTML filling single param template ' + template + ' with ' + 
paramMessage + ''
);
} else {
diff --git a/lib/tests/qunit/wikibase.RepoApi/wikibase.RepoApi.tests.js 
b/lib/tests/qunit/wikibase.RepoApi/wikibase.RepoApi.tests.js
index 6c459f6..d2a69b8 100644
--- a/lib/tests/qunit/wikibase.RepoApi/wikibase.RepoApi.tests.js
+++ b/lib/tests/qunit/wikibase.RepoApi/wikibase.RepoApi.tests.js
@@ -16,13 +16,6 @@
var api = new wb.RepoApi();
 
/**
-* wb.AbstractedRepoApi object
-* @var {Object}
-*/
-   // @FIXME: Don't mix the plain RepoApi with the abstracted one
-   var abstractedApi = new wb.AbstractedRepoApi( api );
-
-   /**
 * Queue used run asynchronous tests synchronously.
 * @var {jQuery}
 */

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7f7e9fbbb2e694a41cee32b55faf914529739e69
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Adrian Lang adrian.l...@wikimedia.de
Gerrit-Reviewer: Henning Snater henning.sna...@wikimedia.de
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] tendril - Disable SSL3 - change (operations/puppet)

2014-10-17 Thread Chmarkine (Code Review)
Chmarkine has uploaded a new change for review.

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

Change subject: tendril - Disable SSL3
..

tendril - Disable SSL3

This site works only in browsers with SNI support.

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


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

diff --git a/manifests/role/tendril.pp b/manifests/role/tendril.pp
index 51572c6..53b5c27 100644
--- a/manifests/role/tendril.pp
+++ b/manifests/role/tendril.pp
@@ -6,7 +6,7 @@
 system::role { 'role::tendril': description = 'tendril server' }
 
 install_certificate{ 'tendril.wikimedia.org': }
-$ssl_settings = ssl_ciphersuite('apache-2.2', 'compat')
+$ssl_settings = ssl_ciphersuite('apache-2.2', 'compatnossl')
 
 class { '::tendril':
 site_name = 'tendril.wikimedia.org',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id6f5df022ab4ece8748af2fff92b8ff88b8f3344
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Chmarkine chmark...@hotmail.com

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


[MediaWiki-commits] [Gerrit] Make sure list item prototypes have a value method - change (mediawiki...Wikibase)

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

Change subject: Make sure list item prototypes have a value method
..


Make sure list item prototypes have a value method

Change-Id: I92cda5e43f1c49deecee21169d732a307dfc3e93
---
M lib/resources/jquery.wikibase/jquery.wikibase.listview.ListItemAdapter.js
1 file changed, 3 insertions(+), 0 deletions(-)

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



diff --git 
a/lib/resources/jquery.wikibase/jquery.wikibase.listview.ListItemAdapter.js 
b/lib/resources/jquery.wikibase/jquery.wikibase.listview.ListItemAdapter.js
index 39f5a2f..7489e8e 100644
--- a/lib/resources/jquery.wikibase/jquery.wikibase.listview.ListItemAdapter.js
+++ b/lib/resources/jquery.wikibase/jquery.wikibase.listview.ListItemAdapter.js
@@ -41,6 +41,9 @@
if( !$.isFunction( this._liWidget ) || 
!this._liWidget.prototype.widgetName ) {
throw new Error( 'For a new ListItemAdapter, a jQuery 
Widget constructor is required' );
}
+   if( !$.isFunction( this._liWidget.prototype.value ) ) {
+   throw new Error( 'For a new ListItemAdapter, the list 
item prototype needs a value method' );
+   }
if( !$.isFunction( options.newItemOptionsFn ) ) {
throw new Error( 'For a new ListItemAdapter, the 
\'newItemOptionsFn\' option is required' );
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I92cda5e43f1c49deecee21169d732a307dfc3e93
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Adrian Lang adrian.l...@wikimedia.de
Gerrit-Reviewer: Henning Snater henning.sna...@wikimedia.de
Gerrit-Reviewer: Thiemo Mättig (WMDE) thiemo.maet...@wikimedia.de
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Simplify background CSS - change (mediawiki...Wikibase)

2014-10-17 Thread WMDE
Thiemo Mättig (WMDE) has uploaded a new change for review.

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

Change subject: Simplify background CSS
..

Simplify background CSS

PHPUnit's static code analysis complained about this, that's why
I'm touching it. The shortcut property does the exact same. It resets
the background image to none.

Change-Id: I4a7bb046ecc2d3b1df8346c619b274edeec0076d
---
M lib/resources/jquery.wikibase/themes/default/jquery.wikibase.wbtooltip.css
1 file changed, 3 insertions(+), 5 deletions(-)


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

diff --git 
a/lib/resources/jquery.wikibase/themes/default/jquery.wikibase.wbtooltip.css 
b/lib/resources/jquery.wikibase/themes/default/jquery.wikibase.wbtooltip.css
index 8281194..429aef1 100644
--- a/lib/resources/jquery.wikibase/themes/default/jquery.wikibase.wbtooltip.css
+++ b/lib/resources/jquery.wikibase/themes/default/jquery.wikibase.wbtooltip.css
@@ -26,12 +26,10 @@
 }
 
 .wikibase-wbtooltip-tip.wb-error .tipsy-inner {
-   background-color: #FFDFC9;
/* on some host-client combinations the background image is propagated 
to the inner tooltip
-   container creating a background pattern; this broken behavior is 
suppressed by explicitly
-   setting the background image to none; this, however, has to be done in 
a separate definition
-   after setting the background colour */
-   background-image: none;
+   container creating a background pattern; this broken behavior is 
suppressed by implicitly
+   resetting the background image. */
+   background: #FFDFC9;
border-color: #B27631;
 }
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4a7bb046ecc2d3b1df8346c619b274edeec0076d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Thiemo Mättig (WMDE) thiemo.maet...@wikimedia.de

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


[MediaWiki-commits] [Gerrit] Added initial Debian packaging - change (operations...apertium)

2014-10-17 Thread Alexandros Kosiaris (Code Review)
Alexandros Kosiaris has submitted this change and it was merged.

Change subject: Added initial Debian packaging
..


Added initial Debian packaging

Change-Id: I076b6dc5d57018fa930a977dca7c4b4299a3ed6e
---
A debian/apertium.install
A debian/changelog
A debian/compat
A debian/control
A debian/copyright
A debian/docs
A debian/libapertium3-3.3-0.install
A debian/libapertium3-3.3-0.postinst
A debian/libapertium3-3.3-dev.install
A debian/libapertium3-3.3-dev.links
A debian/rules
A debian/source/format
A debian/watch
13 files changed, 349 insertions(+), 0 deletions(-)

Approvals:
  Filippo Giunchedi: Looks good to me, but someone else must approve
  Alexandros Kosiaris: Verified; Looks good to me, approved



diff --git a/debian/apertium.install b/debian/apertium.install
new file mode 100644
index 000..a833141
--- /dev/null
+++ b/debian/apertium.install
@@ -0,0 +1,2 @@
+debian/tmp/usr/bin
+debian/tmp/usr/share
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 000..c63f959
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,182 @@
+apertium (3.3.0.56825-1) trusty; urgency=low
+
+  [ Tino Didriksen ]
+  * New upstream release
+  * Standards-Version updated to version 3.9.5
+  * Using upstream release from svn, to avoid pre-generated automake files
+  * Re-done packaging to take advantage of debhelper 9
+  * Added multiarch support
+  * Builds with clang (Closes: #748976)
+  * 3.3 includes all of 3.2 (Closes: #753459)
+
+  [ Kartik Mistry ]
+  * Added myself as uploader.
+  * wrap-and-sort control and install files.
+  * Updated VCS-* fields.
+  * Added debian/watch file.
+
+ -- Kartik Mistry kar...@debian.org  Wed, 24 Sep 2014 10:23:13 +0530
+
+apertium (3.1.0-2) unstable; urgency=low
+
+  * Team upload
+  * Package migrated to Debian Science
+  * Standards-Version updated to version 3.9.3
+
+ -- Sylvestre Ledru sylves...@debian.org  Tue, 05 Jun 2012 21:50:34 +0200
+
+apertium (3.1.0-1.4) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Fix FTBFS (Closes: #660715)
+- depend on dh-autoreconf and set compat to 7
+- add dh_autoreconf{,-clean} to debian/rules
+
+ -- Jonathan Wiltshire j...@debian.org  Sat, 03 Mar 2012 11:59:00 +
+
+apertium (3.1.0-1.3) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Don't ship .la files (Closes: #621304).
+
+ -- Luk Claes l...@debian.org  Sat, 18 Jun 2011 15:58:21 +0200
+
+apertium (3.1.0-1.2) unstable; urgency=high
+
+  * Non-maintainer upload.
+  * High-urgency upload for RC bugfix.
+  * Fix bashisms in various shell scripts in this package, since /bin/sh will
+not be bash by default in squeeze.  Thanks to Andres Mejia for the initial
+version of this patch.  Closes: #464491.
+  * Set source format 3.0 (quilt) since we're patching the upstream source.
+  * Drop versioned build-dep on libpcre3-dev ( 7.9) which prevents us from
+rebuilding the package.  Closes: #581334.
+  * Drop versioned dep on libpcre3 ( 7.9) as well.  The versioned dependency
+actually exists between libpcre3 and the individual dictionary packages
+containing the compiled regexps, apertium itself is entirely agnostic
+regarding libpcre3 versions and should not have this hard-coded.
+  * Lintian fixes:
+- add missing ${misc:Depends} to libapertium3-3.1-0-dev.
+- bump standards-version to 3.8.4 (no changes required).
+
+ -- Steve Langasek vor...@debian.org  Sun, 20 Jun 2010 21:56:56 +
+
+apertium (3.1.0-1.1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Changed Provides: apertium-pcre1 - apertium-pcr2  (Closes: #503861)
+  * Closes security in unstable that was in t-p-u. (Closes: #496395)
+
+ -- Miguel Gea Milvaques xera...@debian.org  Fri, 20 Feb 2009 00:00:27 +0100
+
+apertium (3.1.0-1) unstable; urgency=low
+
+  * New upstream release
+
+ -- Francis Tyers fty...@prompsit.com  Tue, 03 Feb 2009 20:14:08 +
+
+apertium (3.0.7+1-2~lenny2) testing-proposed-updates; urgency=low
+
+  * Fix PCRE dependency nightmare. (Closes: #503861)
+  * Fix mktemp security symlink thing. (Closes: #496395)
+
+ -- Francis Tyers fty...@prompsit.com  Wed, 3 Nov 2008 22:47:00 +
+
+apertium (3.0.7+1-2) unstable; urgency=medium
+
+  * Fix syntax error in previous upload. Patch thanks to Xavi
+Drudis Ferran. (Closes: #498618)
+
+ -- Francis Tyers fty...@prompsit.com  Sat, 13 Sep 2008 11:10:07 +0100
+
+apertium (3.0.7+1-1.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Replace pid-based, hardcoded and $RANDOM-based temporary file names
+to prevent against symlink attacks. Based mostly on a patch by Moritz
+Muehlenhoff j...@inutil.org. (Closes: #496395)
+
+ -- Chris Lamb ch...@chris-lamb.co.uk  Sat, 06 Sep 2008 22:36:07 +0100
+
+apertium (3.0.7+1-1) unstable; urgency=low
+
+  * Fix FTBFS gcc-4.3.  Closes: #417083
+
+ -- Francis Tyers fty...@prompsit.com  Wed, 26 Mar 2008 21:42:14 +
+
+apertium (3.0.5-1) unstable; urgency=low
+
+  * 

[MediaWiki-commits] [Gerrit] Merge browsertest-website and browsertest-website-version bu... - change (integration/config)

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

Change subject: Merge browsertest-website and browsertest-website-version 
builders
..


Merge browsertest-website and browsertest-website-version builders

Minor updates to jobs:

browsertests-MultimediaViewer-en.wikipedia.beta.wmflabs.org-windows_7-internet_explorer-8-sauce
browsertests-MultimediaViewer-en.wikipedia.beta.wmflabs.org-windows_7-internet_explorer-9-sauce
browsertests-MultimediaViewer-en.wikipedia.beta.wmflabs.org-windows_8.1-internet_explorer-11-sauce
browsertests-VisualEditor-en.wikipedia.beta.wmflabs.org-windows_8.1-internet_explorer-11-sauce

Paired-With: Tobi Gritschacher
Bug: T669
Change-Id: I09c7819eb19fe64b865163ac85a601f9c8683a8c
---
M jjb/job-templates-browsertests.yaml
M jjb/macro-browsertests.yaml
2 files changed, 3 insertions(+), 128 deletions(-)

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



diff --git a/jjb/job-templates-browsertests.yaml 
b/jjb/job-templates-browsertests.yaml
index f2a7ae0..3cc08e4 100644
--- a/jjb/job-templates-browsertests.yaml
+++ b/jjb/job-templates-browsertests.yaml
@@ -25,20 +25,6 @@
 name: 
'browsertests-{name}-{mediawiki_url}-{platform}-{browser}-{version}-sauce'
 defaults: browsertests
 
-builders:
-  - shell: mkdir -p $WORKSPACE/log/junit
-  - browsertest-website-version:
-  browser: '{browser}'
-  browser_timeout: '{browser_timeout}'
-  cucumber_tags: '{cucumber_tags}'
-  headless: '{headless}'
-  folder: '{folder}'
-  mediawiki_password_variable: '{mediawiki_password_variable}'
-  mediawiki_url: '{mediawiki_url}'
-  mediawiki_user: '{mediawiki_user}'
-  platform: '{platform}'
-  version: '{version}'
-
 triggers:
   - timed: 'H 3,18 * * *'
 
@@ -82,6 +68,7 @@
 browser_timeout: ''
 repository_host: 'gerrit.wikimedia.org/r'
 cucumber_tags: ''
+version: '10'
 
 properties:
  - throttle:
@@ -116,6 +103,7 @@
   mediawiki_url: '{mediawiki_url}'
   mediawiki_user: '{mediawiki_user}'
   platform: '{platform}'
+  version: '{version}'
 
 publishers:
   - junit:
diff --git a/jjb/macro-browsertests.yaml b/jjb/macro-browsertests.yaml
index 720bf67..62315e8 100644
--- a/jjb/macro-browsertests.yaml
+++ b/jjb/macro-browsertests.yaml
@@ -31,7 +31,7 @@
 export VERSION=32
 ;;
 'internet_explorer')
-export VERSION=10
+export VERSION={version}
 ;;
 'phantomjs')
 export VERSION=''
@@ -100,119 +100,6 @@
   # provide config.yml
   if [ -e $WORKSPACE/tests/browser/config/config_ci.yml ]  [ ! -e 
$WORKSPACE/tests/browser/config/config.yml ]; then
   cp $WORKSPACE/tests/browser/config/config_ci.yml 
$WORKSPACE/tests/browser/config/config.yml
-  fi
-
-  # run tests
-  $WORKSPACE/vendor/bin/bundle exec cucumber \
---backtrace \
---color \
---verbose \
---format pretty \
---format Cucumber::Formatter::Sauce \
---out $WORKSPACE/log/junit \
---tags $CUCUMBER_PARAMETER \
---tags @$BROWSER_TAG \
-|| (echo -e \nJob has failed (exit code: $?).; false)
-
-  if [[ ! -z $LANGUAGE_SCREENSHOT_CODE ]]; then
-$WORKSPACE/vendor/bin/bundle exec ruby1.9.1 upload.rb
-  fi
-
-- builder:
-name: browsertest-website-version
-builders:
-  - shell: |
-  # set up environment variables
-  export BROWSER={browser}
-  export BROWSER_TIMEOUT={browser_timeout}
-  export CUCUMBER_TAGS={cucumber_tags}
-  export HEADLESS={headless}
-  export MEDIAWIKI_API_URL=http://{mediawiki_url}/w/api.php
-  export MEDIAWIKI_PASSWORD_VARIABLE={mediawiki_password_variable}
-  export MEDIAWIKI_URL=http://{mediawiki_url}/wiki/
-  export MEDIAWIKI_USER={mediawiki_user}
-  export PLATFORM='{platform}'
-  # Replace PLATFORM underscores (Jenkins) to spaces (SauceLabs)
-  export PLATFORM=${{PLATFORM//_/ }}
-  export SCREENSHOT_FAILURES=true
-  export SCREENSHOT_FAILURES_PATH=$WORKSPACE/log
-
-  # We only care about one version of our browser and do not need a job
-  # per version.  Thus the versions to use are hardcoded there.
-  #
-  # VERSION is used for SauceLabs
-  #
-  case $BROWSER in
-'chrome')
-# Until upstream problem of bug 69399 is resolved we have to 
use 28
-export VERSION=28
-;;
-'firefox')
-export VERSION=27
-;;
-'internet_explorer')
-

[MediaWiki-commits] [Gerrit] Add myself to trusted users list - change (integration/config)

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

Change subject: Add myself to trusted users list
..


Add myself to trusted users list

Daniel suggested I be added to avoid the annoying
having to manually V+2 on operations patches I make.

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

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



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

[MediaWiki-commits] [Gerrit] Add missing HTML element slashes to jQuery calls - change (mediawiki...Wikibase)

2014-10-17 Thread WMDE
Thiemo Mättig (WMDE) has uploaded a new change for review.

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

Change subject: Add missing HTML element slashes to jQuery calls
..

Add missing HTML element slashes to jQuery calls

Not sure about the space. I love to have it for the sake of readability.
I find that much easier to read. Our code base currently uses both, a
lot without space but also a lot with space. Can we agree on the space?
Otherwise I will remove it everywhere.

Change-Id: I87d0c5361305d883d8a37e2dd6f1ec8f691b7104
---
M lib/resources/jquery.ui/jquery.ui.tagadata.js
M lib/resources/jquery.wikibase/jquery.wikibase.descriptionview.js
M lib/resources/jquery.wikibase/jquery.wikibase.labelview.js
M lib/resources/jquery.wikibase/jquery.wikibase.sitelinkview.js
M lib/resources/jquery.wikibase/snakview/snakview.js
M lib/tests/qunit/jquery.wikibase/jquery.wikibase.entityselector.tests.js
M lib/tests/qunit/jquery.wikibase/jquery.wikibase.pagesuggester.tests.js
M lib/tests/qunit/jquery.wikibase/jquery.wikibase.siteselector.tests.js
8 files changed, 9 insertions(+), 9 deletions(-)


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

diff --git a/lib/resources/jquery.ui/jquery.ui.tagadata.js 
b/lib/resources/jquery.ui/jquery.ui.tagadata.js
index 084f579..95c9dca 100644
--- a/lib/resources/jquery.ui/jquery.ui.tagadata.js
+++ b/lib/resources/jquery.ui/jquery.ui.tagadata.js
@@ -307,7 +307,7 @@
}
 
var $label = $( 'span/' ).addClass( 'tagadata-label' ),
-   $input = $( 'input' ).attr( 'name', 
this.options.itemName + '[]' );
+   $input = $( 'input /' ).attr( 'name', 
this.options.itemName + '[]' );
 
$tag = this._createTagNode().addClass( additionalClasses || '' 
).append( $label );
 
diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.descriptionview.js 
b/lib/resources/jquery.wikibase/jquery.wikibase.descriptionview.js
index 79cef38..23a9a5f 100644
--- a/lib/resources/jquery.wikibase/jquery.wikibase.descriptionview.js
+++ b/lib/resources/jquery.wikibase/jquery.wikibase.descriptionview.js
@@ -130,7 +130,7 @@
$.uls.data.getDir( this.options.value.language ) :
$( 'html' ).prop( 'dir' );
 
-   var $input = $( 'input', {
+   var $input = $( 'input /', {
// TODO: Inject correct placeholder via options
placeholder: mw.msg(

'wikibase-description-edit-placeholder-language-aware',
diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.labelview.js 
b/lib/resources/jquery.wikibase/jquery.wikibase.labelview.js
index 24f69f8..ff93134 100644
--- a/lib/resources/jquery.wikibase/jquery.wikibase.labelview.js
+++ b/lib/resources/jquery.wikibase/jquery.wikibase.labelview.js
@@ -142,7 +142,7 @@
$.uls.data.getDir( this.options.value.language ) :
$( 'html' ).prop( 'dir' );
 
-   var $input = $( 'input', {
+   var $input = $( 'input /', {
// TODO: Inject correct placeholder via options
placeholder: mw.msg(

'wikibase-label-edit-placeholder-language-aware',
diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.sitelinkview.js 
b/lib/resources/jquery.wikibase/jquery.wikibase.sitelinkview.js
index f3016f7..fdf0033 100644
--- a/lib/resources/jquery.wikibase/jquery.wikibase.sitelinkview.js
+++ b/lib/resources/jquery.wikibase/jquery.wikibase.sitelinkview.js
@@ -202,7 +202,7 @@
};
}
 
-   var $pageNameInput = $( 'input/' )
+   var $pageNameInput = $( 'input /' )
.attr( 'placeholder', mw.msg( 
'wikibase-sitelink-page-edit-placeholder' ) )
.pagesuggester( pageNameInputOptions );
 
@@ -221,7 +221,7 @@
return;
}
 
-   var $siteIdInput = $( 'input/' )
+   var $siteIdInput = $( 'input /' )
.attr( 'placeholder', mw.msg( 
'wikibase-sitelink-site-edit-placeholder' ) )
.siteselector( {
source: $.map( this.option( 'getAllowedSiteIds' 
)(), function( siteId ) {
diff --git a/lib/resources/jquery.wikibase/snakview/snakview.js 
b/lib/resources/jquery.wikibase/snakview/snakview.js
index f387a9f..bb7450d 100644
--- a/lib/resources/jquery.wikibase/snakview/snakview.js
+++ b/lib/resources/jquery.wikibase/snakview/snakview.js
@@ -216,7 +216,7 @@
repoConfig = mw.config.get( 'wbRepo' ),
repoApiUrl = repoConfig.url + repoConfig.scriptPath + 
'/api.php';
 
-   return $( 'input/' ).entityselector( {
+   return $( 'input /' 

[MediaWiki-commits] [Gerrit] Remove slashes from HTML elements that aren't allowed to be ... - change (mediawiki...Wikibase)

2014-10-17 Thread WMDE
Thiemo Mättig (WMDE) has uploaded a new change for review.

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

Change subject: Remove slashes from HTML elements that aren't allowed to be 
empty
..

Remove slashes from HTML elements that aren't allowed to be empty

I tried, but after looking at these for almost a year now I still
find these counter-intuitive, confusing and just unnecesarry.

1. Look at the jQuery code. All it does is just ignoring these
   slashes. They don't do anything.

2. These elements are not allowed to be empty. Linters/hinters like
   PHPStorm keep complaining about this, decreasing the value of
   these tools.

3. Even our own code base is not consistent. A lot of instances
   don't use slashes, even for empty elements like br or input
   (which I fixed in I87d0c53).

Change-Id: I0bec09777289beb2bd9c05315fb26b19f09009a9
---
M lib/resources/jquery.ui/jquery.ui.tagadata.js
M lib/resources/jquery.wikibase/jquery.wikibase.aliasesview.js
M lib/resources/jquery.wikibase/jquery.wikibase.badgeselector.js
M lib/resources/jquery.wikibase/jquery.wikibase.claimgrouplistview.js
M lib/resources/jquery.wikibase/jquery.wikibase.claimlistview.js
M lib/resources/jquery.wikibase/jquery.wikibase.claimview.js
M lib/resources/jquery.wikibase/jquery.wikibase.descriptionview.js
M lib/resources/jquery.wikibase/jquery.wikibase.entityselector.js
M lib/resources/jquery.wikibase/jquery.wikibase.entityview.js
M lib/resources/jquery.wikibase/jquery.wikibase.fingerprintgroupview.js
M lib/resources/jquery.wikibase/jquery.wikibase.fingerprintview.js
M lib/resources/jquery.wikibase/jquery.wikibase.labelview.js
M lib/resources/jquery.wikibase/jquery.wikibase.listview.js
M lib/resources/jquery.wikibase/jquery.wikibase.referenceview.js
M lib/resources/jquery.wikibase/jquery.wikibase.sitelinkgrouplistview.js
M lib/resources/jquery.wikibase/jquery.wikibase.sitelinkgroupview.js
M lib/resources/jquery.wikibase/jquery.wikibase.statementview.RankSelector.js
M lib/resources/jquery.wikibase/jquery.wikibase.statementview.js
M lib/resources/jquery.wikibase/jquery.wikibase.wbtooltip.js
M lib/resources/jquery.wikibase/snakview/snakview.SnakTypeSelector.js
M lib/resources/jquery.wikibase/snakview/snakview.js
M lib/resources/jquery.wikibase/snakview/snakview.variations.Value.js
M lib/resources/jquery.wikibase/toolbar/jquery.wikibase.addtoolbar.js
M lib/resources/jquery.wikibase/toolbar/jquery.wikibase.edittoolbar.js
M lib/resources/jquery.wikibase/toolbar/jquery.wikibase.movetoolbar.js
M lib/resources/jquery.wikibase/toolbar/jquery.wikibase.removetoolbar.js
M lib/resources/templates.js
M lib/resources/wikibase.Site.js
M lib/resources/wikibase.utilities/wikibase.utilities.ui.js
M lib/tests/qunit/jquery.ui/jquery.ui.tagadata.tests.js
M lib/tests/qunit/jquery.wikibase/jquery.wikibase.aliasesview.tests.js
M lib/tests/qunit/jquery.wikibase/jquery.wikibase.badgeselector.tests.js
M lib/tests/qunit/jquery.wikibase/jquery.wikibase.claimgrouplabelscroll.tests.js
M lib/tests/qunit/jquery.wikibase/jquery.wikibase.claimview.tests.js
M lib/tests/qunit/jquery.wikibase/jquery.wikibase.descriptionview.tests.js
M lib/tests/qunit/jquery.wikibase/jquery.wikibase.fingerprintgroupview.tests.js
M lib/tests/qunit/jquery.wikibase/jquery.wikibase.fingerprintlistview.tests.js
M lib/tests/qunit/jquery.wikibase/jquery.wikibase.fingerprintview.tests.js
M lib/tests/qunit/jquery.wikibase/jquery.wikibase.labelview.tests.js
M lib/tests/qunit/jquery.wikibase/jquery.wikibase.listview.tests.js
M lib/tests/qunit/jquery.wikibase/jquery.wikibase.referenceview.tests.js
M lib/tests/qunit/jquery.wikibase/jquery.wikibase.sitelinkgrouplistview.tests.js
M lib/tests/qunit/jquery.wikibase/jquery.wikibase.sitelinkgroupview.tests.js
M lib/tests/qunit/jquery.wikibase/jquery.wikibase.sitelinklistview.tests.js
M lib/tests/qunit/jquery.wikibase/jquery.wikibase.sitelinkview.tests.js
M lib/tests/qunit/jquery.wikibase/jquery.wikibase.snaklistview.tests.js
M 
lib/tests/qunit/jquery.wikibase/jquery.wikibase.statementview.RankSelector.tests.js
M lib/tests/qunit/jquery.wikibase/jquery.wikibase.wbtooltip.tests.js
M lib/tests/qunit/jquery.wikibase/toolbar/jquery.wikibase.addtoolbar.tests.js
M lib/tests/qunit/jquery.wikibase/toolbar/jquery.wikibase.edittoolbar.tests.js
M lib/tests/qunit/jquery.wikibase/toolbar/jquery.wikibase.movetoolbar.tests.js
M lib/tests/qunit/jquery.wikibase/toolbar/jquery.wikibase.removetoolbar.tests.js
M lib/tests/qunit/jquery.wikibase/toolbar/jquery.wikibase.toolbar.tests.js
M lib/tests/qunit/jquery.wikibase/toolbar/jquery.wikibase.toolbarbutton.tests.js
M lib/tests/qunit/jquery.wikibase/toolbar/jquery.wikibase.toolbaritem.tests.js
M lib/tests/qunit/jquery/jquery.removeClassByRegex.tests.js
M lib/tests/qunit/templates.tests.js
M repo/resources/wikibase.ui.entityViewInit.js
M repo/resources/wikibase.ui.entitysearch.js
59 files changed, 126 insertions(+), 126 deletions(-)


  git pull 

[MediaWiki-commits] [Gerrit] Add ImageMetrics to the -multimedia channel - change (labs...pywikibugs)

2014-10-17 Thread Yuvipanda (Code Review)
Yuvipanda has submitted this change and it was merged.

Change subject: Add ImageMetrics to the -multimedia channel
..


Add ImageMetrics to the -multimedia channel

Change-Id: Ibf56febfa7ab3150124d434323cfc1a32f4b
---
M channels.py
1 file changed, 2 insertions(+), 1 deletion(-)

Approvals:
  Yuvipanda: Verified; Looks good to me, approved
  Gergő Tisza: Looks good to me, but someone else must approve



diff --git a/channels.py b/channels.py
index ce1ccab..ce449ca 100644
--- a/channels.py
+++ b/channels.py
@@ -43,7 +43,8 @@
 x.get(X-Bugzilla-Product, None) in [MediaWiki extensions] 
and
 x.get(X-Bugzilla-Component, None) in
 [UploadWizard, TimedMediaHandler, VipsScaler, 
GlobalUsage, MultimediaViewer, GWToolset,
- Score, PagedTiffHandler, PdfHandler, ImageMap, 
CommonsMetadata, OggHandler]
+ Score, PagedTiffHandler, PdfHandler, ImageMap, 
CommonsMetadata, OggHandler,
+ ImageMetrics]
 ) or \
 (
 x.get(X-Bugzilla-Product, None) in [MediaWiki] and

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibf56febfa7ab3150124d434323cfc1a32f4b
Gerrit-PatchSet: 1
Gerrit-Project: labs/tools/pywikibugs
Gerrit-Branch: master
Gerrit-Owner: Gilles gdu...@wikimedia.org
Gerrit-Reviewer: Gergő Tisza gti...@wikimedia.org
Gerrit-Reviewer: Gilles gdu...@wikimedia.org
Gerrit-Reviewer: MarkTraceur mtrac...@member.fsf.org
Gerrit-Reviewer: Yuvipanda yuvipa...@gmail.com

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


[MediaWiki-commits] [Gerrit] Travis / Adapt mediawiki GitHub download - change (mediawiki...chameleon)

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

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

Change subject: Travis / Adapt mediawiki GitHub download
..

Travis / Adapt mediawiki GitHub download

Change-Id: I2f725efda29e88f399e896019ea6230971569b15
---
M build/travis/script.sh
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/chameleon 
refs/changes/76/167176/1

diff --git a/build/travis/script.sh b/build/travis/script.sh
index 0d36e51..e63d109 100644
--- a/build/travis/script.sh
+++ b/build/travis/script.sh
@@ -31,9 +31,9 @@
 function installMediaWiki {
cd ..
 
-   wget https://github.com/wikimedia/mediawiki-core/archive/$MW.tar.gz
+   wget https://github.com/wikimedia/mediawiki/archive/$MW.tar.gz
tar -zxf $MW.tar.gz
-   mv mediawiki-core-$MW phase3
+   mv mediawiki-$MW phase3
 
cd phase3
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2f725efda29e88f399e896019ea6230971569b15
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/chameleon
Gerrit-Branch: master
Gerrit-Owner: Foxtrott s7ep...@gmail.com

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


[MediaWiki-commits] [Gerrit] Travis / Adapt mediawiki GitHub download - change (mediawiki...chameleon)

2014-10-17 Thread Foxtrott (Code Review)
Foxtrott has submitted this change and it was merged.

Change subject: Travis / Adapt mediawiki GitHub download
..


Travis / Adapt mediawiki GitHub download

Change-Id: I2f725efda29e88f399e896019ea6230971569b15
---
M build/travis/script.sh
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/build/travis/script.sh b/build/travis/script.sh
index 0d36e51..e63d109 100644
--- a/build/travis/script.sh
+++ b/build/travis/script.sh
@@ -31,9 +31,9 @@
 function installMediaWiki {
cd ..
 
-   wget https://github.com/wikimedia/mediawiki-core/archive/$MW.tar.gz
+   wget https://github.com/wikimedia/mediawiki/archive/$MW.tar.gz
tar -zxf $MW.tar.gz
-   mv mediawiki-core-$MW phase3
+   mv mediawiki-$MW phase3
 
cd phase3
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2f725efda29e88f399e896019ea6230971569b15
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/chameleon
Gerrit-Branch: master
Gerrit-Owner: Foxtrott s7ep...@gmail.com
Gerrit-Reviewer: Foxtrott s7ep...@gmail.com
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Don't show dead edit links in diff/old revisions - change (mediawiki...Wikibase)

2014-10-17 Thread WMDE
Thiemo Mättig (WMDE) has uploaded a new change for review.

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

Change subject: Don't show dead edit links in diff/old revisions
..

Don't show dead edit links in diff/old revisions

Bug: 72177
Change-Id: I2cd252c4c9b2c6ccabf911ab08d3af46da42bf23
---
M repo/includes/View/SectionEditLinkGenerator.php
1 file changed, 9 insertions(+), 13 deletions(-)


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

diff --git a/repo/includes/View/SectionEditLinkGenerator.php 
b/repo/includes/View/SectionEditLinkGenerator.php
index 6a14275..17fbaef 100644
--- a/repo/includes/View/SectionEditLinkGenerator.php
+++ b/repo/includes/View/SectionEditLinkGenerator.php
@@ -47,9 +47,7 @@
$html = wfTemplate( 'wikibase-toolbar-container',
wfTemplate( 'wikibase-toolbar',
'',
-   wfTemplate( 'wikibase-toolbar-bracketed',
-   $toolbarButton
-   )
+   $toolbarButton
)
);
 
@@ -87,18 +85,16 @@
 */
private function getToolbarButton( $cssClassSuffix, $buttonLabel, 
$editUrl = null ) {
if ( $editUrl !== null ) {
-   return wfTemplate( 'wikibase-toolbar-button',
-   'wikibase-toolbar-button-' . $cssClassSuffix,
-   $editUrl,
-   $buttonLabel
-   );
-   } else {
-   return wfTemplate( 'wikibase-toolbar-button',
-   'wikibase-toolbar-button-' . $cssClassSuffix . 
' ui-state-disabled',
-   '#',
-   $buttonLabel
+   return wfTemplate( 'wikibase-toolbar-bracketed',
+   wfTemplate( 'wikibase-toolbar-button',
+   'wikibase-toolbar-button-' . 
$cssClassSuffix,
+   $editUrl,
+   $buttonLabel
+   )
);
}
+
+   return '';
}
 
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2cd252c4c9b2c6ccabf911ab08d3af46da42bf23
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Thiemo Mättig (WMDE) thiemo.maet...@wikimedia.de

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


[MediaWiki-commits] [Gerrit] Use strict .jshintrc, fix typo, readd empty .jshintignore - change (mediawiki...Wikibase)

2014-10-17 Thread Adrian Lang (Code Review)
Adrian Lang has uploaded a new change for review.

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

Change subject: Use strict .jshintrc, fix typo, readd empty .jshintignore
..

Use strict .jshintrc, fix typo, readd empty .jshintignore

We need to have an empty jshintignore, otherwise MediaWiki's is used which
ignores everything in extensions/.

Change-Id: I243fb843a752624195b1ee18f14402bfaf67d27f
---
A .jshintignore
M .jshintrc
M lib/resources/jquery.wikibase/jquery.wikibase.listview.js
M lib/resources/jquery.wikibase/jquery.wikibase.referenceview.js
4 files changed, 116 insertions(+), 34 deletions(-)


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

diff --git a/.jshintignore b/.jshintignore
new file mode 100644
index 000..e69de29
--- /dev/null
+++ b/.jshintignore
diff --git a/.jshintrc b/.jshintrc
index 21a9e61..1c0ca0d 100644
--- a/.jshintrc
+++ b/.jshintrc
@@ -1,33 +1,116 @@
 {
-   camelcase: true,
-   curly: true,
-   eqeqeq: true,
-   immed: true,
-   latedef: true,
-   newcap: true,
-   supernew: true,
-   shadow: true,
-   noarg: true,
-   noempty: true,
-   nonew: true,
-   quotmark: false, // sometimes double quotes make sense, e.g. foo's 
is better readable than 'foo\'s'
-   trailing: true,
-   undef: true,
-   unused: vars, // we want to allow unused function parameters
-   laxbreak: true,
-   laxcomma: false,
-   onevar: false,
-   bitwise: false,
-   forin: false,
-   regexp: false,
-   strict: true,
-   scripturl: true,
+   // 
+   // JSHint Configuration, Strict Edition
+   // 
+   //
+   // This is a options template for [JSHint][1], using [JSHint example][2]
+   // and [Ory Band's example][3] as basis and setting config values to
+   // be most strict:
+   //
+   // * set all enforcing options to true
+   // * set all relaxing options to false
+   // * set all environment options to false, except the browser value
+   // * set all JSLint legacy options to false
+   //
+   // [1]: http://www.jshint.com/
+   // [2]: 
https://github.com/jshint/node-jshint/blob/master/example/config.json
+   // [3]: https://github.com/oryband/dotfiles/blob/master/jshintrc
+   //
+   // @author http://michael.haschke.biz/
+   // @license http://unlicense.org/
 
-   // Environment
-   browser: true,
+   // == Enforcing Options ===
+   //
+   // These options tell JSHint to be more strict towards your code. Use
+   // them if you want to allow only a safe subset of JavaScript, very
+   // useful when your codebase is shared with a big number of developers
+   // with different skill levels.
 
-   // Globals
-   predef: [
+   bitwise : true, // Prohibit bitwise operators (, |, ^, etc.).
+   curly : true, // Require {} for every new block or scope.
+   eqeqeq : true, // Require triple equals i.e. `===`.
+   forin : false, // Tolerate `for in` loops without `hasOwnPrototype`.
+   immed : true, // Require immediate invocations to be wrapped in 
parens e.g. `( function(){}() );`
+   latedef : true, // Prohibit variable use before definition.
+   newcap : true, // Require capitalization of all constructor functions 
e.g. `new F()`.
+   noarg : true, // Prohibit use of `arguments.caller` and 
`arguments.callee`.
+   noempty : true, // Prohibit use of empty blocks.
+   nonew : true, // Prohibit use of constructors for side-effects.
+   plusplus : false, // Prohibit use of `++`  `--`.
+   quotmark: single,
+   regexp : true, // Prohibit `.` and `[^...]` in regular expressions.
+   undef : true, // Require all non-global variables be declared before 
they are used.
+   strict : true, // Require `use strict` pragma in every file.
+   trailing : true, // Prohibit trailing whitespaces.
+   camelcase : true,
+
+   // == Relaxing Options 
+   //
+   // These options allow you to suppress certain types of warnings. Use
+   // them only if you are absolutely positive that you know what you are
+   // doing.
+   asi : false, // Tolerate Automatic Semicolon Insertion (no 
semicolons).
+   boss : false, // Tolerate assignments inside if, for  while. Usually 
conditions  loops are for comparison, not assignments.
+   debug : false, // Allow debugger statements e.g. browser breakpoints.
+   eqnull : false, // Tolerate use of `== null`.
+   es5 : false, // Allow EcmaScript 5 syntax.
+   esnext : false, // Allow ES.next specific features such as `const` 
and `let`.
+   evil : 

[MediaWiki-commits] [Gerrit] Correct some global references in JavaScript - change (mediawiki...Wikibase)

2014-10-17 Thread Adrian Lang (Code Review)
Adrian Lang has uploaded a new change for review.

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

Change subject: Correct some global references in JavaScript
..

Correct some global references in JavaScript

Change-Id: I0bf464f9014e07fe4fb6045feee33c1732e3f3be
---
M lib/resources/jquery.wikibase/jquery.wikibase.pagesuggester.js
M lib/resources/jquery.wikibase/toolbar/jquery.wikibase.toolbar.js
M lib/resources/jquery.wikibase/toolbar/jquery.wikibase.toolbaritem.js
M lib/resources/wikibase.utilities/wikibase.utilities.js
M lib/tests/qunit/experts/EntityIdInput.tests.js
M lib/tests/qunit/jquery.wikibase/jquery.wikibase.aliasesview.tests.js
M lib/tests/qunit/jquery.wikibase/jquery.wikibase.descriptionview.tests.js
M lib/tests/qunit/jquery.wikibase/jquery.wikibase.fingerprintview.tests.js
M lib/tests/qunit/jquery.wikibase/jquery.wikibase.labelview.tests.js
M lib/tests/qunit/wikibase.RepoApi/wikibase.RepoApiError.tests.js
M lib/tests/qunit/wikibase.ValueViewBuilder.tests.js
M lib/tests/qunit/wikibase.tests.js
12 files changed, 24 insertions(+), 24 deletions(-)


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

diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.pagesuggester.js 
b/lib/resources/jquery.wikibase/jquery.wikibase.pagesuggester.js
index 7d23e4c..bc7258b 100644
--- a/lib/resources/jquery.wikibase/jquery.wikibase.pagesuggester.js
+++ b/lib/resources/jquery.wikibase/jquery.wikibase.pagesuggester.js
@@ -2,7 +2,7 @@
  * @licence GNU GPL v2+
  * @author H. Snater  mediaw...@snater.com 
  */
-( function( $, mw, wb ) {
+( function( $, wb ) {
'use strict';
 
 /**
@@ -113,4 +113,4 @@
}
 
 } );
-}( jQuery, mediaWiki, wikibase ) );
+}( jQuery, wikibase ) );
diff --git a/lib/resources/jquery.wikibase/toolbar/jquery.wikibase.toolbar.js 
b/lib/resources/jquery.wikibase/toolbar/jquery.wikibase.toolbar.js
index 98be0c6..9443254 100644
--- a/lib/resources/jquery.wikibase/toolbar/jquery.wikibase.toolbar.js
+++ b/lib/resources/jquery.wikibase/toolbar/jquery.wikibase.toolbar.js
@@ -2,7 +2,7 @@
  * @licence GNU GPL v2+
  * @author H. Snater  mediaw...@snater.com 
  */
-( function( wb, $, mw ) {
+( function( $, mw ) {
 'use strict';
 
 var PARENT = $.wikibase.toolbaritem;
@@ -169,4 +169,4 @@
 
 } );
 
-} )( wikibase, jQuery, mediaWiki );
+} )( jQuery, mediaWiki );
diff --git 
a/lib/resources/jquery.wikibase/toolbar/jquery.wikibase.toolbaritem.js 
b/lib/resources/jquery.wikibase/toolbar/jquery.wikibase.toolbaritem.js
index 8e84079..17d8dac 100644
--- a/lib/resources/jquery.wikibase/toolbar/jquery.wikibase.toolbaritem.js
+++ b/lib/resources/jquery.wikibase/toolbar/jquery.wikibase.toolbaritem.js
@@ -2,7 +2,7 @@
  * @licence GNU GPL v2+
  * @author H. Snater  mediaw...@snater.com 
  */
-( function( wb, $ ) {
+( function( $ ) {
 'use strict';
 
 var PARENT = $.TemplatedWidget;
@@ -46,4 +46,4 @@
}
 } );
 
-}( wikibase, jQuery ) );
+}( jQuery ) );
diff --git a/lib/resources/wikibase.utilities/wikibase.utilities.js 
b/lib/resources/wikibase.utilities/wikibase.utilities.js
index 5141d87..8aa1e7f 100644
--- a/lib/resources/wikibase.utilities/wikibase.utilities.js
+++ b/lib/resources/wikibase.utilities/wikibase.utilities.js
@@ -2,7 +2,7 @@
  * @licence GNU GPL v2+
  * @author Daniel Werner
  */
-( function( mw, wb ) {
+( function( wb ) {
'use strict';
 
/**
@@ -11,4 +11,4 @@
 */
wb.utilities = wb.utilities || {};
 
-}( mediaWiki, wikibase ) );
+}( wikibase ) );
diff --git a/lib/tests/qunit/experts/EntityIdInput.tests.js 
b/lib/tests/qunit/experts/EntityIdInput.tests.js
index 3b649a1..dab9e06 100644
--- a/lib/tests/qunit/experts/EntityIdInput.tests.js
+++ b/lib/tests/qunit/experts/EntityIdInput.tests.js
@@ -2,7 +2,7 @@
  * @licence GNU GPL v2+
  * @author H. Snater  mediaw...@snater.com 
  */
-( function( $, QUnit, valueview, wb ) {
+( function( QUnit, valueview, wb ) {
'use strict';
 
var testExpert = valueview.tests.testExpert;
@@ -13,4 +13,4 @@
expertConstructor: wb.experts.EntityIdInput
} );
 
-}( jQuery, QUnit, jQuery.valueview, wikibase ) );
+}( QUnit, jQuery.valueview, wikibase ) );
diff --git 
a/lib/tests/qunit/jquery.wikibase/jquery.wikibase.aliasesview.tests.js 
b/lib/tests/qunit/jquery.wikibase/jquery.wikibase.aliasesview.tests.js
index 0bbe4db..9645d41 100644
--- a/lib/tests/qunit/jquery.wikibase/jquery.wikibase.aliasesview.tests.js
+++ b/lib/tests/qunit/jquery.wikibase/jquery.wikibase.aliasesview.tests.js
@@ -3,7 +3,7 @@
  * @author H. Snater  mediaw...@snater.com 
  */
 
-( function( $, jQuery, QUnit ) {
+( function( $, QUnit ) {
 'use strict';
 
 /**
@@ -187,4 +187,4 @@
);
 } );
 
-}( jQuery, wikibase, QUnit ) );
+}( jQuery, QUnit ) );
diff --git 
a/lib/tests/qunit/jquery.wikibase/jquery.wikibase.descriptionview.tests.js 
b/lib/tests/qunit/jquery.wikibase/jquery.wikibase.descriptionview.tests.js

[MediaWiki-commits] [Gerrit] Re-add .jshintignore - change (mediawiki...Wikibase)

2014-10-17 Thread Adrian Lang (Code Review)
Adrian Lang has uploaded a new change for review.

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

Change subject: Re-add .jshintignore
..

Re-add .jshintignore

We need to have an empty .jshintignore, otherwise MediaWiki's is used which
ignores everything in extensions/.

Change-Id: I828dae1d24ef6c047d68bfcf1752f528bb73bac6
---
A .jshintignore
1 file changed, 0 insertions(+), 0 deletions(-)


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

diff --git a/.jshintignore b/.jshintignore
new file mode 100644
index 000..e69de29
--- /dev/null
+++ b/.jshintignore

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I828dae1d24ef6c047d68bfcf1752f528bb73bac6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Adrian Lang adrian.l...@wikimedia.de

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


[MediaWiki-commits] [Gerrit] Fix conditional - change (mediawiki...Wikibase)

2014-10-17 Thread Adrian Lang (Code Review)
Adrian Lang has uploaded a new change for review.

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

Change subject: Fix conditional
..

Fix conditional

Change-Id: Ie14e1a7bbc7b3dd203e3f5505bebf00f963c64e0
---
M lib/resources/jquery.wikibase/jquery.wikibase.referenceview.js
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.referenceview.js 
b/lib/resources/jquery.wikibase/jquery.wikibase.referenceview.js
index 2457bd9..39359ea 100644
--- a/lib/resources/jquery.wikibase/jquery.wikibase.referenceview.js
+++ b/lib/resources/jquery.wikibase/jquery.wikibase.referenceview.js
@@ -122,7 +122,7 @@
 */
_create: function() {
if(
-   !this.options.statementGuid | !this.options.entityStore
+   !this.options.statementGuid || !this.options.entityStore
|| !this.options.valueViewBuilder || !this.options.api
) {
throw new Error( 'Required option(s) missing' );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie14e1a7bbc7b3dd203e3f5505bebf00f963c64e0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Adrian Lang adrian.l...@wikimedia.de

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


[MediaWiki-commits] [Gerrit] Do not start any JavaScript in diffs/old revisions - change (mediawiki...Wikibase)

2014-10-17 Thread WMDE
Thiemo Mättig (WMDE) has uploaded a new change for review.

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

Change subject: Do not start any JavaScript in diffs/old revisions
..

Do not start any JavaScript in diffs/old revisions

Change-Id: I429f44af2db749263cd4cd26365ac39fddcb498d
---
M repo/includes/EntityParserOutputGenerator.php
M repo/includes/EntityView.php
M repo/resources/wikibase.ui.entityViewInit.js
3 files changed, 15 insertions(+), 15 deletions(-)


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

diff --git a/repo/includes/EntityParserOutputGenerator.php 
b/repo/includes/EntityParserOutputGenerator.php
index dfd03d6..2cecb92 100644
--- a/repo/includes/EntityParserOutputGenerator.php
+++ b/repo/includes/EntityParserOutputGenerator.php
@@ -94,7 +94,7 @@
//@todo: record sitelinks as iwlinks
//@todo: record CommonsMedia values as imagelinks
 
-   $this-addModules( $pout );
+   $this-addModules( $pout, $editable );
 
//FIXME: some places, like Special:NewItem, don't want to 
override the page title.
//   But we still want to use OutputPage::addParserOutput 
to apply the modules etc from the ParserOutput.
@@ -151,7 +151,7 @@
$pout-setExtensionData( 'wikibase-view-chunks', 
$this-entityView-getPlaceholders() );
}
 
-   private function addModules( ParserOutput $pout ) {
+   private function addModules( ParserOutput $pout, $editable ) {
// make css available for JavaScript-less browsers
$pout-addModuleStyles( array(
'wikibase.common',
@@ -161,8 +161,10 @@
'jquery.wikibase.toolbar',
) );
 
-   // make sure required client sided resources will be loaded:
-   $pout-addModules( 'wikibase.ui.entityViewInit' );
+   if ( $editable ) {
+   // make sure required client sided resources will be 
loaded:
+   $pout-addModules( 'wikibase.ui.entityViewInit' );
+   }
}
 
 }
diff --git a/repo/includes/EntityView.php b/repo/includes/EntityView.php
index 80cd94f..1a6738e 100644
--- a/repo/includes/EntityView.php
+++ b/repo/includes/EntityView.php
@@ -11,7 +11,6 @@
 use Wikibase\Repo\View\ClaimsView;
 use Wikibase\Repo\View\FingerprintView;
 use Wikibase\Repo\View\TextInjector;
-use Wikibase\Repo\View\EntityViewPlaceholderExpander;
 
 /**
  * Base class for creating views for all different kinds of Wikibase\Entity.
@@ -118,13 +117,21 @@
$this-getInnerHtml( $entityRevision, $editable )
);
 
+   if ( $editable ) {
+   $html .= $this-getLoadingSpinnerInlineScript();
+   }
+
+   return $html;
+   }
+
+   private function getLoadingSpinnerInlineScript() {
// Show loading spinner as long as JavaScript is initialising.
// The fastest way to show it is placing the script right after 
the corresponding HTML.
// Remove it after a while in any case (e.g. some resources 
might not have been loaded
// silently, so JavaScript is not initialising).
// Additionally attaching to window.error would only make sense 
before any other
// JavaScript is parsed.
-   $html .= Html::inlineScript( '
+   return Html::inlineScript( '
 if ( $ ) {
$( .wikibase-entityview ).addClass( loading ).after( function() {
var $div = $( div/ ).addClass( wb-entity-spinner 
mw-small-spinner );
@@ -141,7 +148,6 @@
}, 7000 );
 }
 ' );
-   return $html;
}
 
/**
diff --git a/repo/resources/wikibase.ui.entityViewInit.js 
b/repo/resources/wikibase.ui.entityViewInit.js
index 6ef2b4c..8f03ffc 100644
--- a/repo/resources/wikibase.ui.entityViewInit.js
+++ b/repo/resources/wikibase.ui.entityViewInit.js
@@ -296,14 +296,6 @@
} else if( !mw.config.get( 'wbUserCanEdit' ) ) {
restrict( 'restrictionedit' );
}
-
-   if( !mw.config.get( 'wbIsEditView' ) ) {
-   // no need to implement a 'disableEntityPageActions' 
since hiding all the toolbars
-   // directly like this is not really worse than hacking 
the Toolbar prototype to achieve
-   // this:
-   $( ':wikibase-toolbar' ).hide();
-   $( 'body' ).addClass( 'wb-editing-disabled' );
-   }
}
 
/**

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I429f44af2db749263cd4cd26365ac39fddcb498d
Gerrit-PatchSet: 1
Gerrit-Project: 

[MediaWiki-commits] [Gerrit] Make extraction more tolerant of HTML changes - change (wikimedia...jouncebot)

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

Change subject: Make extraction more tolerant of HTML changes
..


Make extraction more tolerant of HTML changes

Change the xpath queries that were using child selectors to instead use
descendant selectors where appropriate. There can be interstitial
paragraph and/or list tags in the HTML markup depending on the wikitext markup
used when describing a particular deploy.

Change-Id: I1cbed75c555ef9483721f4ef4609db6dfe2ca12f
---
M deploypage.py
1 file changed, 3 insertions(+), 3 deletions(-)

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



diff --git a/deploypage.py b/deploypage.py
index b72829f..76624e1 100644
--- a/deploypage.py
+++ b/deploypage.py
@@ -66,15 +66,15 @@
 tree = etree.fromstring(self._get_page_html(), etree.HTMLParser())
 for item in tree.xpath('//tr[@class=deploycal-item]'):
 id = item.get('id')
-times = item.xpath('td/span[@class=deploycal-time-utc]/time')
+times = item.xpath('td//span[@class=deploycal-time-utc]/time')
 start_time = dateutil.parser.parse(times[0].get('datetime'))
 end_time = dateutil.parser.parse(times[1].get('datetime'))
-window = 
stringify_children(item.xpath('td/span[@class=deploycal-window]')[0]) \
+window = 
stringify_children(item.xpath('td//span[@class=deploycal-window]')[0]) \
 .replace(\n,  ) \
 .strip()
 owners = map(
 lambda x: x.text,
-
item.xpath('td/span[@class=ircnick-container]/span[@class=ircnick]')
+
item.xpath('td//span[@class=ircnick-container]/span[@class=ircnick]')
 )
 
 item_obj = DeployItem(id, '%s#%s' % (self.page_url, id), 
start_time, end_time, window, owners)

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1cbed75c555ef9483721f4ef4609db6dfe2ca12f
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/bots/jouncebot
Gerrit-Branch: master
Gerrit-Owner: BryanDavis bda...@wikimedia.org
Gerrit-Reviewer: Anomie bjor...@wikimedia.org
Gerrit-Reviewer: Greg Grossmeier g...@wikimedia.org
Gerrit-Reviewer: Mwalker mwal...@khaosdev.com
Gerrit-Reviewer: Reedy re...@wikimedia.org
Gerrit-Reviewer: Yuvipanda yuvipa...@gmail.com
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] sudo: create module, remove old files - change (operations/puppet)

2014-10-17 Thread Giuseppe Lavagetto (Code Review)
Giuseppe Lavagetto has uploaded a new change for review.

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

Change subject: sudo: create module, remove old files
..

sudo: create module, remove old files

For the sake of structuring our puppet classes/manifests according to
the standard structure expected by puppet.

Change-Id: Ic7e883f85b81b516b424168be2a3380dcc5f3121
Signed-off-by: Giuseppe Lavagetto glavage...@wikimedia.org
---
M manifests/misc/fundraising.pp
M manifests/openstack.pp
M manifests/role/cxserver.pp
M manifests/role/deployment.pp
M manifests/role/parsoid.pp
M manifests/site.pp
D manifests/sudo.pp
M modules/authdns/manifests/account.pp
M modules/base/manifests/monitoring/host.pp
M modules/beta/manifests/mwdeploy_sudo.pp
M modules/labs_vagrant/manifests/init.pp
M modules/mediawiki/manifests/users.pp
R modules/sudo/files/sudoers.appserver
R modules/sudo/files/sudoers.labs
A modules/sudo/manifests/appserver.pp
A modules/sudo/manifests/group.pp
A modules/sudo/manifests/init.pp
A modules/sudo/manifests/labs_project.pp
A modules/sudo/manifests/user.pp
R modules/sudo/templates/sudoers.erb
20 files changed, 70 insertions(+), 74 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/83/167183/1

diff --git a/manifests/misc/fundraising.pp b/manifests/misc/fundraising.pp
index 253ae0d..e8f254d 100644
--- a/manifests/misc/fundraising.pp
+++ b/manifests/misc/fundraising.pp
@@ -2,7 +2,7 @@
 
 include role::logging::systemusers
 
-sudo_user { 'file_mover':
+sudo::user { 'file_mover':
 privileges = ['ALL = NOPASSWD: /usr/bin/killall -HUP udp2log'] }
 
 file { '/usr/local/bin/rotate_fundraising_logs':
diff --git a/manifests/openstack.pp b/manifests/openstack.pp
index af8ccf9..e1338a0 100644
--- a/manifests/openstack.pp
+++ b/manifests/openstack.pp
@@ -148,7 +148,7 @@
 $sudo_privs = [ 'ALL = NOPASSWD: /bin/mkdir -p /srv/*',
 'ALL = NOPASSWD: /bin/rmdir /srv/*',
 'ALL = NOPASSWD: /usr/local/sbin/sync-exports' ]
-sudo_user { [ nfsmanager ]: privileges = $sudo_privs, require = 
User[nfsmanager] }
+sudo::user { [ nfsmanager ]: privileges = $sudo_privs, require = 
User[nfsmanager] }
 
 group { 'nfsmanager':
 ensure = present,
diff --git a/manifests/role/cxserver.pp b/manifests/role/cxserver.pp
index 2771c1d..87dbf67 100644
--- a/manifests/role/cxserver.pp
+++ b/manifests/role/cxserver.pp
@@ -25,7 +25,7 @@
 }
 
 # Need to allow jenkins-deploy to reload cxserver
-sudo_user { 'jenkins-deploy': privileges = [
+sudo::user { 'jenkins-deploy': privileges = [
 # Since the root user is local, we cant add the sudo policy in
 # OpenStack manager interface at wikitech
 'ALL = (root)  NOPASSWD:/usr/sbin/service cxserver restart',
diff --git a/manifests/role/deployment.pp b/manifests/role/deployment.pp
index 6d545d3..fd6b1ab 100644
--- a/manifests/role/deployment.pp
+++ b/manifests/role/deployment.pp
@@ -197,7 +197,7 @@
   package { 'percona-toolkit':
 ensure = latest,
   }
-  sudo_group { 'wikidev_deployment_server':
+  sudo::group { 'wikidev_deployment_server':
 privileges = [
   'ALL = (root) NOPASSWD: /usr/bin/salt-call -l quiet --out=json 
pillar.data',
   'ALL = (root) NOPASSWD: /usr/bin/salt-call -l quiet publish.runner 
deploy.fetch *',
@@ -261,7 +261,7 @@
 maxmemory = '500Mb',
 monitor   = false,
   }
-  sudo_group { project_${::instanceproject}_deployment_server:
+  sudo::group { project_${::instanceproject}_deployment_server:
 privileges = [
   'ALL = (root) NOPASSWD: /usr/bin/salt-call -l quiet --out=json 
pillar.data',
   'ALL = (root) NOPASSWD: /usr/bin/salt-call -l quiet publish.runner 
deploy.fetch *',
diff --git a/manifests/role/parsoid.pp b/manifests/role/parsoid.pp
index 648d366..23aeb6a 100644
--- a/manifests/role/parsoid.pp
+++ b/manifests/role/parsoid.pp
@@ -134,7 +134,7 @@
 
 include role::parsoid::common
 
-sudo_user { 'jenkins-deploy': privileges = [
+sudo::user { 'jenkins-deploy': privileges = [
 # Need to allow jenkins-deploy to reload parsoid
 # Since the root user is local, we cant add the sudo policy in
 # OpenStack manager interface at wikitech
diff --git a/manifests/site.pp b/manifests/site.pp
index 988d267..8322ba7 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -18,7 +18,6 @@
 import 'role/*.pp'
 import 'role/analytics/*.pp'
 import 'search.pp'
-import 'sudo.pp'
 import 'swift.pp'
 import 'webserver.pp'
 
@@ -1222,7 +1221,7 @@
 class { 'admin': groups = ['contint-users', 'contint-admins', 
'contint-roots'] }
 
 # Bug 49846, let us sync VisualEditor in mediawiki/extensions.git
-sudo_user { 'jenkins-slave':
+sudo::user { 'jenkins-slave':
 privileges = [
 'ALL = (jenkins) NOPASSWD: 
/srv/deployment/integration/slave-scripts/bin/gerrit-sync-ve-push.sh',
 ]
diff --git 

[MediaWiki-commits] [Gerrit] Add overview diagram for Oozie jobs - change (analytics/refinery)

2014-10-17 Thread QChris (Code Review)
QChris has uploaded a new change for review.

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

Change subject: Add overview diagram for Oozie jobs
..

Add overview diagram for Oozie jobs

Change-Id: I2167bc36c32133568c567c130cff690e6ea3d0ae
---
A diagrams/.gitignore
A diagrams/Makefile
A diagrams/oozie-overview.dia
3 files changed, 20 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/analytics/refinery 
refs/changes/84/167184/1

diff --git a/diagrams/.gitignore b/diagrams/.gitignore
new file mode 100644
index 000..e33609d
--- /dev/null
+++ b/diagrams/.gitignore
@@ -0,0 +1 @@
+*.png
diff --git a/diagrams/Makefile b/diagrams/Makefile
new file mode 100644
index 000..f98039f
--- /dev/null
+++ b/diagrams/Makefile
@@ -0,0 +1,19 @@
+# Builds refinery diagrams
+#
+# Requires:
+#   dia
+#
+
+DIA_FILES=oozie-overview.dia
+
+DIA_PNG_TARGET_FILES=$(DIA_FILES:%.dia=%.png)
+
+ALL_TARGET_FILES=$(DIA_PNG_TARGET_FILES)
+
+all: $(ALL_TARGET_FILES)
+
+clean:
+   $(RM) $(ALL_TARGET_FILES)
+
+%.png: %.dia
+   dia --export=$@ $
\ No newline at end of file
diff --git a/diagrams/oozie-overview.dia b/diagrams/oozie-overview.dia
new file mode 100644
index 000..b83b8cd
--- /dev/null
+++ b/diagrams/oozie-overview.dia
Binary files differ

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2167bc36c32133568c567c130cff690e6ea3d0ae
Gerrit-PatchSet: 1
Gerrit-Project: analytics/refinery
Gerrit-Branch: master
Gerrit-Owner: QChris christ...@quelltextlich.at

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


[MediaWiki-commits] [Gerrit] Add overview diagram for Oozie jobs - change (analytics/refinery)

2014-10-17 Thread QChris (Code Review)
QChris has uploaded a new change for review.

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

Change subject: Add overview diagram for Oozie jobs
..

Add overview diagram for Oozie jobs

Bug: 71994
Change-Id: I892072f833d60785ca7019e639a6ce6139120c63
---
A diagrams/.gitignore
A diagrams/Makefile
A diagrams/oozie-overview.dia
3 files changed, 20 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/analytics/refinery 
refs/changes/85/167185/1

diff --git a/diagrams/.gitignore b/diagrams/.gitignore
new file mode 100644
index 000..e33609d
--- /dev/null
+++ b/diagrams/.gitignore
@@ -0,0 +1 @@
+*.png
diff --git a/diagrams/Makefile b/diagrams/Makefile
new file mode 100644
index 000..f98039f
--- /dev/null
+++ b/diagrams/Makefile
@@ -0,0 +1,19 @@
+# Builds refinery diagrams
+#
+# Requires:
+#   dia
+#
+
+DIA_FILES=oozie-overview.dia
+
+DIA_PNG_TARGET_FILES=$(DIA_FILES:%.dia=%.png)
+
+ALL_TARGET_FILES=$(DIA_PNG_TARGET_FILES)
+
+all: $(ALL_TARGET_FILES)
+
+clean:
+   $(RM) $(ALL_TARGET_FILES)
+
+%.png: %.dia
+   dia --export=$@ $
\ No newline at end of file
diff --git a/diagrams/oozie-overview.dia b/diagrams/oozie-overview.dia
new file mode 100644
index 000..b83b8cd
--- /dev/null
+++ b/diagrams/oozie-overview.dia
Binary files differ

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I892072f833d60785ca7019e639a6ce6139120c63
Gerrit-PatchSet: 1
Gerrit-Project: analytics/refinery
Gerrit-Branch: master
Gerrit-Owner: QChris christ...@quelltextlich.at

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


[MediaWiki-commits] [Gerrit] Display full year if precision is to high - change (mediawiki...Wikibase)

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

Change subject: Display full year if precision is to high
..


Display full year if precision is to high

The original idea was to show the full ISO timestamp to be sure no
information is lost. This may happen now, e.g. 0001-12-31 with precision
set to century just outputs 1. Month, day and time may get lost. At the
moment I don't think this will be a problem.

Bug: 67604
Bug: 71289
Bug: 71956
Change-Id: I905f283a545d1d9b4cd55294c545a0a4d50d2b5c
---
M lib/includes/formatters/MwTimeIsoFormatter.php
M lib/tests/phpunit/formatters/MwTimeIsoFormatterTest.php
2 files changed, 56 insertions(+), 4 deletions(-)

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



diff --git a/lib/includes/formatters/MwTimeIsoFormatter.php 
b/lib/includes/formatters/MwTimeIsoFormatter.php
index 354d298..7f55adb 100644
--- a/lib/includes/formatters/MwTimeIsoFormatter.php
+++ b/lib/includes/formatters/MwTimeIsoFormatter.php
@@ -282,16 +282,18 @@
$number = round( round( $year / $shift ) * 
$unshift );
}
 
-   $formattedNumber = $this-language-formatNum( $number, true );
-
+   // Year to small for precision, fall back to year
if ( empty( $number )
 ( $precision  TimeValue::PRECISION_YEAR
|| ( $isBCE  $precision === 
TimeValue::PRECISION_YEAR )
)
) {
-   throw new InvalidArgumentException( 'Year to small for 
precision.' );
+   $number = $year;
+   $msg = null;
}
 
+   $formattedNumber = $this-language-formatNum( $number, true );
+
if ( empty( $msg ) ) {
// TODO: This needs a message.
return $formattedNumber . ( $isBCE ? ' BCE' : '' );
diff --git a/lib/tests/phpunit/formatters/MwTimeIsoFormatterTest.php 
b/lib/tests/phpunit/formatters/MwTimeIsoFormatterTest.php
index cce31e8..e09df38 100644
--- a/lib/tests/phpunit/formatters/MwTimeIsoFormatterTest.php
+++ b/lib/tests/phpunit/formatters/MwTimeIsoFormatterTest.php
@@ -398,37 +398,87 @@
'',
),
 
-   // Stuff we do not want to format so must return it :
+   // Precision to low, falling back to year
+   array(
+   '-1-00-00T00:00:00Z', TimeValue::PRECISION_Ga,
+   '1 BCE',
+   ),
+   array(
+   '-1-00-00T00:00:00Z', 
TimeValue::PRECISION_100Ma,
+   '1 BCE',
+   ),
+   array(
+   '-1-00-00T00:00:00Z', TimeValue::PRECISION_10Ma,
+   '1 BCE',
+   ),
+   array(
+   '-1-00-00T00:00:00Z', TimeValue::PRECISION_Ma,
+   '1 BCE',
+   ),
+   array(
+   '-1-00-00T00:00:00Z', 
TimeValue::PRECISION_100ka,
+   '1 BCE',
+   ),
+   array(
+   '-1-00-00T00:00:00Z', TimeValue::PRECISION_10ka,
+   '1 BCE',
+   ),
+   array(
+   '-1-00-00T00:00:00Z', TimeValue::PRECISION_ka,
+   '1. millennium BCE',
+   ),
+   array(
+   '-1-00-00T00:00:00Z', TimeValue::PRECISION_100a,
+   '1. century BCE',
+   ),
+   array(
+   '-1-00-00T00:00:00Z', TimeValue::PRECISION_10a,
+   '1 BCE',
+   ),
+
+   // Better than the raw ISO string
array(
'-000-01-01T01:01:01Z', 
TimeValue::PRECISION_Ga,
+   '0 BCE',
),
array(
'-0-01-01T01:01:01Z', TimeValue::PRECISION_Ga,
+   '0 BCE',
),
array(
'+1-00-00T00:00:00Z', 
TimeValue::PRECISION_Ga,
+   '1',
),
array(
'+1000-00-00T00:00:01Z', 
TimeValue::PRECISION_100Ma,
+   '1000',

[MediaWiki-commits] [Gerrit] Include ganglia in standard only for production - change (operations/puppet)

2014-10-17 Thread Giuseppe Lavagetto (Code Review)
Giuseppe Lavagetto has submitted this change and it was merged.

Change subject: Include ganglia in standard only for production
..


Include ganglia in standard only for production

There's no ganglia server for labs, and it seems unlikely
we will have one anytime soon. It seems to be taking up
RAM and CPU on all current labs instances for not much use.

After this gets merged, they can be stopped manually if
desired

Change-Id: Ic658ca9ee5b77d72b46c9384b78aa81740c719c6
---
M manifests/site.pp
1 file changed, 3 insertions(+), 1 deletion(-)

Approvals:
  Yuvipanda: Looks good to me, but someone else must approve
  Giuseppe Lavagetto: Verified; Looks good to me, approved
  jenkins-bot: Verified



diff --git a/manifests/site.pp b/manifests/site.pp
index 988d267..3a1436b 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -32,10 +32,12 @@
 # Class for *most* servers, standard includes
 class standard {
 include base
-include ganglia
 include role::ntp
 include role::mail::sender
 include role::diamond
+if $::realm == 'production' {
+include ganglia # No ganglia in labs
+}
 }
 
 class standard-noexim {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic658ca9ee5b77d72b46c9384b78aa81740c719c6
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Yuvipanda yuvipa...@gmail.com
Gerrit-Reviewer: Andrew Bogott abog...@wikimedia.org
Gerrit-Reviewer: Giuseppe Lavagetto glavage...@wikimedia.org
Gerrit-Reviewer: Krinkle krinklem...@gmail.com
Gerrit-Reviewer: Ottomata o...@wikimedia.org
Gerrit-Reviewer: Yuvipanda yuvipa...@gmail.com
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Remove duplicate getContentForRequest call in ViewEntityAction - change (mediawiki...Wikibase)

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

Change subject: Remove duplicate getContentForRequest call in ViewEntityAction
..


Remove duplicate getContentForRequest call in ViewEntityAction

There is no good reason to call it again in the isPlainView method,
just to check if it is instanceof EntityContent, since
ContentRetreiver::getContentForRequest is already called previously
in the show() method.  There, it is checked if null, then displays
missing entity, else is passed to displayEntityContent(),
with type hint. Then, isPlainView is called in displayEntityContent,
and at athat point we already know we have EntityContent. No need
to check again.

ViewEntityAction::isPlainView is called nowhere else in Wikibase
or in core, so also can be made private, and also give it a more
appropriate name, isEditable().

Bug: 72158
Change-Id: I7453e1f72f12d6dbf14d029451a4a9a8d360a4e0
---
M repo/includes/actions/ViewEntityAction.php
1 file changed, 7 insertions(+), 19 deletions(-)

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



diff --git a/repo/includes/actions/ViewEntityAction.php 
b/repo/includes/actions/ViewEntityAction.php
index 1e177c1..2939929 100644
--- a/repo/includes/actions/ViewEntityAction.php
+++ b/repo/includes/actions/ViewEntityAction.php
@@ -131,27 +131,17 @@
 * Returns true if this view action is performing a plain view (not a 
diff, etc)
 * of the page's current revision.
 */
-   public function isPlainView() {
-   if ( !$this-getArticle()-getPage()-exists() ) {
+   private function isEditable() {
+   $article = $this-getArticle();
+
+   if ( !$article-getPage()-exists() ) {
// showing non-existing entity
return false;
}
 
-   if ( $this-getArticle()-getOldID()  0
- ( $this-getArticle()-getOldID() !== 
$this-getArticle()-getPage()-getLatest() ) ) {
+   if ( $article-getOldID()  0
+ ( $article-getOldID() !== 
$article-getPage()-getLatest() ) ) {
// showing old content
-   return false;
-   }
-
-   $contentRetriever = new ContentRetriever();
-   $content = $contentRetriever-getContentForRequest(
-   $this-getRequest(),
-   $this-getArticle()
-   );
-
-   if ( !( $content instanceof EntityContent ) ) {
-   //XXX: HACK against evil tricks in 
Article::getContentObject
-   // showing strange content
return false;
}
 
@@ -172,9 +162,7 @@
 */
protected function displayEntityContent( EntityContent $content ) {
$out = $this-getOutput();
-
-   // can edit?
-   $editable = $this-isPlainView();
+   $editable = $this-isEditable();
 
// NOTE: page-wide property, independent of user permissions
$out-addJsConfigVars( 'wbIsEditView', $editable );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7453e1f72f12d6dbf14d029451a4a9a8d360a4e0
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Aude aude.w...@gmail.com
Gerrit-Reviewer: Aude aude.w...@gmail.com
Gerrit-Reviewer: Daniel Kinzler daniel.kinz...@wikimedia.de
Gerrit-Reviewer: Jeroen De Dauw jeroended...@gmail.com
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Deferred edittoolbar tooltip init to when switching to edit ... - change (mediawiki...Wikibase)

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

Change subject: Deferred edittoolbar tooltip init to when switching to edit mode
..


Deferred edittoolbar tooltip init to when switching to edit mode

Change-Id: I46772ea8cbb9457654070b2405c2b30428e37c53
---
M lib/resources/jquery.wikibase/toolbar/jquery.wikibase.edittoolbar.js
1 file changed, 53 insertions(+), 37 deletions(-)

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



diff --git 
a/lib/resources/jquery.wikibase/toolbar/jquery.wikibase.edittoolbar.js 
b/lib/resources/jquery.wikibase/toolbar/jquery.wikibase.edittoolbar.js
index 9a09df2..279ef59 100644
--- a/lib/resources/jquery.wikibase/toolbar/jquery.wikibase.edittoolbar.js
+++ b/lib/resources/jquery.wikibase/toolbar/jquery.wikibase.edittoolbar.js
@@ -74,8 +74,8 @@
_buttons: null,
 
/**
-* Node holding the tooltips image with the tooltip itself attached.
-* @type {jQuery}
+* Node holding the tooltip image with the tooltip itself attached.
+* @type {null|jQuery}
 */
_$tooltipAnchor: null,
 
@@ -111,13 +111,15 @@
 
this.options.interactionWidget.element.off( '.' + 
this.widgetName );
 
-   var $wbtooltip = this._$tooltipAnchor.find( 
':wikibase-wbtooltip' ),
-   wbtooltip = $wbtooltip.data( 'wbtooltip' );
-   if( wbtooltip ) {
-   wbtooltip.destroy();
-   }
+   if( this._$tooltipAnchor ) {
+   var $wbtooltip = this._$tooltipAnchor.find( 
':wikibase-wbtooltip' ),
+   wbtooltip = $wbtooltip.data( 'wbtooltip' );
+   if( wbtooltip ) {
+   wbtooltip.destroy();
+   }
 
-   this._$tooltipAnchor.data( 'wikibase-toolbaritem' ).destroy();
+   this._$tooltipAnchor.data( 'wikibase-toolbaritem' 
).destroy();
+   }
 
this._getContainer().off( '.' + this.widgetName );
 
@@ -151,8 +153,7 @@
},
 
_initToolbar: function() {
-   var self = this,
-   $container = this._getContainer(),
+   var $container = this._getContainer(),
$toolbar = $container.children( '.wikibase-toolbar' );
 
if( !$toolbar.length ) {
@@ -162,31 +163,6 @@
$toolbar.toolbar( {
renderItemSeparators: true
} );
-
-   this._$tooltipAnchor = $( 'span/', {
-   'class': 'mw-help-field-hint',
-   style: 
'display:inline-block;text-decoration:none;width:8px;', // TODO: Get rid of 
inline styles.
-   html: 'nbsp;' // TODO find nicer way to hack Webkit 
browsers to display tooltip image (see also css)
-   } ).toolbaritem();
-
-   // Support promises instead of strings, too, since 
$.wikibase.claimview does not know
-   // immediately after creation which help message to show.
-   // TODO: This should be replaced by a dynamic getter so that 
views can arbitrarily
-   // change their help messages anywhere in their lifecycle.
-   function addTooltip( helpMessage ) {
-   if( self._$tooltipAnchor ) {
-   self._$tooltipAnchor.wbtooltip( {
-   content: helpMessage
-   } );
-   }
-   }
-
-   var helpMessage = this.options.interactionWidget.option( 
'helpMessage' );
-   if( helpMessage.done  typeof helpMessage !== 'string' ) {
-   helpMessage.done( addTooltip );
-   } else {
-   addTooltip( helpMessage );
-   }
 
this._attachEventHandlers();
 
@@ -297,7 +273,7 @@
editGroup.option( '$content', $buttons );
 
this._getContainer()
-   .append( this._$tooltipAnchor )
+   .append( this._getTooltipAnchor() )
.addClass( this.widgetBaseClass + '-ineditmode' );
},
 
@@ -317,7 +293,9 @@
return;
}
 
-   this._$tooltipAnchor.detach();
+   if( this._$tooltipAnchor ) {
+   this._$tooltipAnchor.detach();
+   }
 
var $editGroup = this._getContainer().children( 
':wikibase-toolbar' ),
editGroup = $editGroup.data( 'toolbar' );
@@ -343,6 +321,44 @@
},
 
/**
+* @return {jQuery}
+*/
+   _getTooltipAnchor: function() {
+   var self = this;
+
+   if( this._$tooltipAnchor ) {
+   return this._$tooltipAnchor;
+  

[MediaWiki-commits] [Gerrit] Avoid some TypeErrors in strict mode - change (mediawiki...Wikibase)

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

Change subject: Avoid some TypeErrors in strict mode
..


Avoid some TypeErrors in strict mode

Change-Id: I8ebe7d486c2b43d8c96ce58116e5c38cf769fa79
---
M lib/resources/jquery.ui/jquery.ui.tagadata.js
M lib/resources/jquery.wikibase/jquery.wikibase.claimview.js
M lib/resources/jquery.wikibase/jquery.wikibase.fingerprintlistview.js
M lib/resources/jquery.wikibase/jquery.wikibase.referenceview.js
M lib/resources/jquery.wikibase/jquery.wikibase.sitelinkgroupview.js
M lib/resources/jquery.wikibase/jquery.wikibase.sitelinklistview.js
M lib/resources/jquery.wikibase/jquery.wikibase.snaklistview.js
M lib/resources/jquery.wikibase/jquery.wikibase.statementview.RankSelector.js
8 files changed, 21 insertions(+), 28 deletions(-)

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



diff --git a/lib/resources/jquery.ui/jquery.ui.tagadata.js 
b/lib/resources/jquery.ui/jquery.ui.tagadata.js
index 084f579..c8d1f07 100644
--- a/lib/resources/jquery.ui/jquery.ui.tagadata.js
+++ b/lib/resources/jquery.ui/jquery.ui.tagadata.js
@@ -215,8 +215,9 @@
var $tag = $( this );
if( self._formatLabel( label ) === self._formatLabel( 
self.getTagLabel( $tag ) ) ) {
result = $tag;
-   return false;
}
+
+   return result === null;
} );
return result;
},
@@ -585,8 +586,9 @@
 
if( self._getTags( label ).length  1 ) {
hasConflict = true;
-   return false;
}
+
+   return hasConflict === false;
} );
 
return hasConflict;
diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.claimview.js 
b/lib/resources/jquery.wikibase/jquery.wikibase.claimview.js
index a535865..65542bd 100644
--- a/lib/resources/jquery.wikibase/jquery.wikibase.claimview.js
+++ b/lib/resources/jquery.wikibase/jquery.wikibase.claimview.js
@@ -937,7 +937,7 @@
 
// Item might be about to be 
removed not being a list item instance.
if( !snakview || !removeToolbar 
) {
-   return true;
+   return;
}
 
$snakview.data( 'removetoolbar' 
).toolbar[parentView.option( 'disabled' )
diff --git 
a/lib/resources/jquery.wikibase/jquery.wikibase.fingerprintlistview.js 
b/lib/resources/jquery.wikibase/jquery.wikibase.fingerprintlistview.js
index b754d0c..e227271 100644
--- a/lib/resources/jquery.wikibase/jquery.wikibase.fingerprintlistview.js
+++ b/lib/resources/jquery.wikibase/jquery.wikibase.fingerprintlistview.js
@@ -149,11 +149,8 @@
isValid = true;
 
listview.items().each( function() {
-   var fingerprintview = lia.liInstance( $( this ) );
-   if( !fingerprintview.isValid() ) {
-   isValid = false;
-   return false;
-   }
+   isValid = lia.liInstance( $( this ) ).isValid();
+   return isValid === true;
} );
 
return isValid;
diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.referenceview.js 
b/lib/resources/jquery.wikibase/jquery.wikibase.referenceview.js
index 2cdd71e..97d9a3c 100644
--- a/lib/resources/jquery.wikibase/jquery.wikibase.referenceview.js
+++ b/lib/resources/jquery.wikibase/jquery.wikibase.referenceview.js
@@ -919,7 +919,7 @@
if( !toolbar ) {
// 
Continue if the movetoolbar is not present (the snakview is
// 
pending).
-   return 
true;
+   return;
}
 
var 
isOverallFirst = ( i === 0  j === 0 ),
diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.sitelinkgroupview.js 
b/lib/resources/jquery.wikibase/jquery.wikibase.sitelinkgroupview.js
index 5ae6b8a..3723dba 100644
--- a/lib/resources/jquery.wikibase/jquery.wikibase.sitelinkgroupview.js
+++ b/lib/resources/jquery.wikibase/jquery.wikibase.sitelinkgroupview.js
@@ -537,7 +537,7 @@
var $sitelinkview = $( 

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

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

Change subject: Implemented singlebuttontoolbar
..


Implemented singlebuttontoolbar

Change-Id: I491e216a459276837f6ce095bec17e051a17326b
---
M lib/resources/jquery.wikibase/toolbar/jquery.wikibase.addtoolbar.js
M lib/resources/jquery.wikibase/toolbar/jquery.wikibase.removetoolbar.js
A lib/resources/jquery.wikibase/toolbar/jquery.wikibase.singlebuttontoolbar.js
M lib/resources/jquery.wikibase/toolbar/resources.php
A 
lib/tests/qunit/jquery.wikibase/toolbar/jquery.wikibase.singlebuttontoolbar.tests.js
M lib/tests/qunit/jquery.wikibase/toolbar/resources.php
6 files changed, 170 insertions(+), 100 deletions(-)

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



diff --git 
a/lib/resources/jquery.wikibase/toolbar/jquery.wikibase.addtoolbar.js 
b/lib/resources/jquery.wikibase/toolbar/jquery.wikibase.addtoolbar.js
index 23d0766..438e68b 100644
--- a/lib/resources/jquery.wikibase/toolbar/jquery.wikibase.addtoolbar.js
+++ b/lib/resources/jquery.wikibase/toolbar/jquery.wikibase.addtoolbar.js
@@ -2,67 +2,30 @@
  * @licence GNU GPL v2+
  * @author H. Snater  mediaw...@snater.com 
  */
-// TODO: Merge with removetoolbar.
 ( function( mw, $ ) {
'use strict';
 
-var PARENT = $.wikibase.toolbar;
+var PARENT = $.wikibase.singlebuttontoolbar;
 
 /**
- * Add toolbar widget.
- * @extends jQuery.wikibase.toolbar
+ * Add toolbar widget by default offering an add button.
+ * @extends jQuery.wikibase.singlebuttontoolbar
  * @since 0.4
  *
- * This widget, by default, offers an add button.
+ * @option {string} [label]
+ * Default: mw.msg( 'wikibase-add' )
  *
- * @option {boolean} [renderItemSeparators]
- * Default: true
- *
- * @event add
- *Triggered when the default add button is hit.
- *- {jQuery.Event}
+ * @option {string} [eventName]
+ * Default: 'add'
  */
 $.widget( 'wikibase.addtoolbar', PARENT, {
/**
-* @see jQuery.wikibase.toolbar.options
+* @see jQuery.wikibase.singlebuttontoolbar.options
 */
options: {
-   renderItemSeparators: true,
-   label: mw.msg( 'wikibase-add' )
-   },
-
-   /**
-* @see jQuery.wikibase.toolbar._create
-*/
-   _create: function() {
-   PARENT.prototype._create.call( this );
-
-   if( !this.options.$content.length ) {
-   this.options.$content = 
this._createDefaultButton().appendTo( this._getContainer() );
-   this.draw();
-   }
-   },
-
-   /**
-* @return {jQuery}
-*/
-   _createDefaultButton: function() {
-   var self = this;
-
-   return $( 'span/' ).toolbarbutton( {
-   $label: this.options.label,
-   cssClassSuffix: 'add'
-   } )
-   .on( 'toolbarbuttonaction.' + this.widgetName, function( event 
) {
-   self._trigger( 'add' );
-   } );
-   },
-
-   focus: function() {
-   var button = this.options.$content.first().data( 
'toolbarbutton' );
-   if( button ) {
-   button.focus();
-   }
+   label: mw.msg( 'wikibase-add' ),
+   eventName: 'add',
+   buttonCssClassSuffix: 'add'
}
 } );
 
diff --git 
a/lib/resources/jquery.wikibase/toolbar/jquery.wikibase.removetoolbar.js 
b/lib/resources/jquery.wikibase/toolbar/jquery.wikibase.removetoolbar.js
index 16a16e8..c287ad6 100644
--- a/lib/resources/jquery.wikibase/toolbar/jquery.wikibase.removetoolbar.js
+++ b/lib/resources/jquery.wikibase/toolbar/jquery.wikibase.removetoolbar.js
@@ -2,67 +2,30 @@
  * @licence GNU GPL v2+
  * @author H. Snater  mediaw...@snater.com 
  */
-// TODO: Merge with addtoolbar.
 ( function( mw, $ ) {
'use strict';
 
-var PARENT = $.wikibase.toolbar;
+var PARENT = $.wikibase.singlebuttontoolbar;
 
 /**
- * Remove toolbar widget.
+ * Remove toolbar widget by default offering a remove button.
  * @since 0.4
- * @extends jQuery.wikibase.toolbar
+ * @extends jQuery.wikibase.singlebuttontoolbar
  *
- * This widget, by default, offers an remove button.
+ * @option {string} [label]
+ * Default: mw.msg( 'wikibase-remove' )
  *
- * @option {boolean} [renderItemSeparators]
- * Default: true
- *
- * @event remove
- *Triggered when the default remove button is hit.
- *- {jQuery.Event}
+ * @option {string} [eventName]
+ * Default: 'remove'
  */
 $.widget( 'wikibase.removetoolbar', PARENT, {
/**
-* @see jQuery.wikibase.toolbar.options
+* @see jQuery.wikibase.singlebuttontoolbar.options
 */
options: {
-   renderItemSeparators: true,
-   label: mw.msg( 'wikibase-remove' )
-   },
-
-   /**
-* @see 

[MediaWiki-commits] [Gerrit] Hygiene: Introduce Icon.js abstraction - change (mediawiki...MobileFrontend)

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

Change subject: Hygiene: Introduce Icon.js abstraction
..


Hygiene: Introduce Icon.js abstraction

This allows easy creation of icons using a standard markup.

Change-Id: Ie82924357d76fe0072c2255bc530c20063537462
---
M includes/Resources.php
M javascripts/CtaDrawer.js
A javascripts/Icon.js
M javascripts/Overlay.js
M javascripts/modules/editor/EditorOverlayBase.js
M javascripts/modules/issues/issues.js
M javascripts/modules/references/references.js
M javascripts/modules/search/SearchOverlay.js
M javascripts/modules/toc/toc.js
M javascripts/modules/uploads/UploadTutorial.js
M templates/Overlay.hogan
D templates/backButton.hogan
D templates/cancelButton.hogan
M templates/ctaDrawer.hogan
A templates/icon.hogan
M templates/modules/editor/EditorOverlayBase.hogan
M templates/modules/editor/EditorOverlayHeader.hogan
M templates/modules/editor/VisualEditorOverlayHeader.hogan
M templates/modules/editor/switcher.hogan
M templates/modules/mediaViewer/ImageOverlay.hogan
M templates/modules/references/ReferencesDrawer.hogan
M templates/modules/search/SearchOverlay.hogan
M templates/modules/talk/talkSectionAddHeader.hogan
M templates/modules/talk/talkSectionHeader.hogan
M templates/modules/toc/toc.hogan
M templates/modules/uploads/PhotoUploadProgress.hogan
M templates/modules/uploads/UploadTutorial.hogan
27 files changed, 105 insertions(+), 30 deletions(-)

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



diff --git a/includes/Resources.php b/includes/Resources.php
index 34c146c..516cad5 100644
--- a/includes/Resources.php
+++ b/includes/Resources.php
@@ -171,12 +171,16 @@
'messages' = array(
'mobile-frontend-language-article-heading',
),
+   'templates' = array(
+   'icon.hogan',
+   ),
'scripts' = array(
'javascripts/Router.js',
'javascripts/OverlayManager.js',
// FIXME: Remove api code to mobile.ajax
'javascripts/api.js',
'javascripts/PageApi.js',
+   'javascripts/Icon.js',
'javascripts/Panel.js',
'javascripts/Section.js',
'javascripts/Page.js',
@@ -578,8 +582,6 @@
'mobile-frontend-overlay-continue',
),
'templates' = array(
-   'backButton.hogan',
-   'cancelButton.hogan',
'Overlay.hogan',
'LoadingOverlay.hogan',
),
diff --git a/javascripts/CtaDrawer.js b/javascripts/CtaDrawer.js
index ce1c37f..7ae4916 100644
--- a/javascripts/CtaDrawer.js
+++ b/javascripts/CtaDrawer.js
@@ -1,5 +1,6 @@
 ( function( M, $ ) {
 var Drawer = M.require( 'Drawer' ),
+   Icon = M.require( 'Icon' ),
CtaDrawer;
 
/**
@@ -11,6 +12,7 @@
 */
CtaDrawer = Drawer.extend( {
defaults: {
+   collapseButton: new Icon( { name: 'arrow-down', 
additionalClassNames: 'cancel' } ).toHtmlString(),
loginCaption: mw.msg( 
'mobile-frontend-watchlist-cta-button-login' ),
signupCaption: mw.msg( 
'mobile-frontend-watchlist-cta-button-signup' )
},
diff --git a/javascripts/Icon.js b/javascripts/Icon.js
new file mode 100644
index 000..b971e83
--- /dev/null
+++ b/javascripts/Icon.js
@@ -0,0 +1,33 @@
+( function( M ) {
+
+   var View = M.require( 'View' ),
+   Icon;
+
+   /**
+* A {@link View} that pops up from the bottom of the screen.
+* @class Drawer
+* @extends Panel
+*/
+   Icon = View.extend( {
+   defaults: {
+   hasText: false,
+   tagName: 'div',
+   base: 'icon',
+   name: '',
+   modifier: ''
+   },
+   initialize: function( options ) {
+   if ( options.hasText ) {
+   options.modifier = 'icon-text';
+   }
+   View.prototype.initialize.call( this, options );
+   },
+   toHtmlString: function() {
+   return this.$el.html();
+   },
+   template: M.template.get( 'icon.hogan' )
+   } );
+
+   M.define( 'Icon', Icon );
+
+}( mw.mobileFrontend ) );
diff --git a/javascripts/Overlay.js b/javascripts/Overlay.js
index 539b005..057d437 100644
--- a/javascripts/Overlay.js
+++ b/javascripts/Overlay.js
@@ -3,6 +3,7 @@
 
var
View = M.require( 'View' ),
+   Icon = M.require( 'Icon' ),
$window = $( window ),
  

[MediaWiki-commits] [Gerrit] New Wikidata Build - 17/10/2014 - change (mediawiki...Wikidata)

2014-10-17 Thread Tobias Gritschacher (Code Review)
Tobias Gritschacher has uploaded a new change for review.

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

Change subject: New Wikidata Build - 17/10/2014
..

New Wikidata Build - 17/10/2014

Change-Id: I5a7e9da1b26efe4c566180fceb02b4167027b058
---
M WikibaseClient.settings.php
M WikibaseRepo.settings.php
M composer.lock
M extensions/PropertySuggester/PropertySuggester.php
M extensions/PropertySuggester/README.md
M extensions/PropertySuggester/build/travis/before_script.sh
M 
extensions/PropertySuggester/tests/phpunit/PropertySuggester/GetSuggestionsTest.php
M 
extensions/PropertySuggester/tests/phpunit/PropertySuggester/Suggesters/SimpleSuggesterTest.php
M 
extensions/PropertySuggester/tests/phpunit/PropertySuggester/SuggestionGeneratorTest.php
D extensions/Wikibase/.jshintignore
M extensions/Wikibase/build/travis/install.sh
M extensions/Wikibase/client/i18n/lb.json
M extensions/Wikibase/client/i18n/qqq.json
M extensions/Wikibase/client/includes/ChangeHandler.php
M 
extensions/Wikibase/client/includes/scribunto/Scribunto_LuaWikibaseEntityLibrary.php
M extensions/Wikibase/client/includes/scribunto/Scribunto_LuaWikibaseLibrary.php
M extensions/Wikibase/client/includes/scribunto/WikibaseLuaBindings.php
M extensions/Wikibase/client/includes/scribunto/WikibaseLuaEntityBindings.php
M 
extensions/Wikibase/client/tests/phpunit/includes/recentchanges/RecentChangesFilterOptionsTest.php
M extensions/Wikibase/composer.json
M extensions/Wikibase/lib/i18n/lb.json
M extensions/Wikibase/lib/includes/EntityFactory.php
M extensions/Wikibase/lib/includes/ReferencedEntitiesFinder.php
M extensions/Wikibase/lib/includes/SnakFactory.php
M extensions/Wikibase/lib/includes/ValuesFinder.php
M extensions/Wikibase/lib/includes/WikibaseDiffOpFactory.php
M extensions/Wikibase/lib/includes/changes/EntityChange.php
M extensions/Wikibase/lib/includes/changes/ItemChange.php
M extensions/Wikibase/lib/includes/formatters/MwTimeIsoFormatter.php
M extensions/Wikibase/lib/includes/store/EntityRevision.php
M extensions/Wikibase/lib/includes/store/ItemUsageIndex.php
M extensions/Wikibase/lib/includes/store/TermCombinationMatchFinder.php
M extensions/Wikibase/lib/includes/store/TermIndex.php
M extensions/Wikibase/lib/includes/store/TermPropertyLabelResolver.php
M extensions/Wikibase/lib/includes/store/sql/TermSqlIndex.php
M extensions/Wikibase/lib/resources/Resources.php
M extensions/Wikibase/lib/resources/jquery.ui/jquery.ui.TemplatedWidget.js
M extensions/Wikibase/lib/resources/jquery.ui/jquery.ui.tagadata.js
M 
extensions/Wikibase/lib/resources/jquery.wikibase/jquery.wikibase.aliasesview.js
M 
extensions/Wikibase/lib/resources/jquery.wikibase/jquery.wikibase.claimgrouplabelscroll.js
M 
extensions/Wikibase/lib/resources/jquery.wikibase/jquery.wikibase.claimgrouplistview.js
M 
extensions/Wikibase/lib/resources/jquery.wikibase/jquery.wikibase.claimlistview.js
M extensions/Wikibase/lib/resources/jquery.wikibase/jquery.wikibase.claimview.js
M 
extensions/Wikibase/lib/resources/jquery.wikibase/jquery.wikibase.descriptionview.js
M 
extensions/Wikibase/lib/resources/jquery.wikibase/jquery.wikibase.fingerprintgroupview.js
M 
extensions/Wikibase/lib/resources/jquery.wikibase/jquery.wikibase.fingerprintlistview.js
M extensions/Wikibase/lib/resources/jquery.wikibase/jquery.wikibase.labelview.js
M 
extensions/Wikibase/lib/resources/jquery.wikibase/jquery.wikibase.listview.ListItemAdapter.js
M 
extensions/Wikibase/lib/resources/jquery.wikibase/jquery.wikibase.referenceview.js
M 
extensions/Wikibase/lib/resources/jquery.wikibase/jquery.wikibase.sitelinkgroupview.js
M 
extensions/Wikibase/lib/resources/jquery.wikibase/jquery.wikibase.sitelinklistview.js
M 
extensions/Wikibase/lib/resources/jquery.wikibase/jquery.wikibase.snaklistview.js
M 
extensions/Wikibase/lib/resources/jquery.wikibase/jquery.wikibase.statementview.RankSelector.js
M 
extensions/Wikibase/lib/resources/jquery.wikibase/jquery.wikibase.statementview.js
M 
extensions/Wikibase/lib/resources/jquery.wikibase/themes/default/jquery.wikibase.descriptionview.css
M 
extensions/Wikibase/lib/resources/jquery.wikibase/themes/default/jquery.wikibase.fingerprintgroupview.css
M 
extensions/Wikibase/lib/resources/jquery.wikibase/themes/default/jquery.wikibase.fingerprintview.css
M 
extensions/Wikibase/lib/resources/jquery.wikibase/themes/default/jquery.wikibase.labelview.css
M 
extensions/Wikibase/lib/resources/jquery.wikibase/themes/default/jquery.wikibase.sitelinkgroupview.css
M 
extensions/Wikibase/lib/resources/jquery.wikibase/themes/default/jquery.wikibase.sitelinklistview.css
D extensions/Wikibase/lib/resources/jquery.wikibase/toolbar/addtoolbar.js
D extensions/Wikibase/lib/resources/jquery.wikibase/toolbar/edittoolbar.js
A 
extensions/Wikibase/lib/resources/jquery.wikibase/toolbar/jquery.wikibase.addtoolbar.js
A 
extensions/Wikibase/lib/resources/jquery.wikibase/toolbar/jquery.wikibase.edittoolbar.js
A 

[MediaWiki-commits] [Gerrit] Refactor RepoHooks::onOutputPageBodyAttributes - change (mediawiki...Wikibase)

2014-10-17 Thread WMDE
Thiemo Mättig (WMDE) has uploaded a new change for review.

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

Change subject: Refactor RepoHooks::onOutputPageBodyAttributes
..

Refactor RepoHooks::onOutputPageBodyAttributes

Change-Id: Id32c100c60ca661d1286c5f57533487f697c
---
M repo/Wikibase.hooks.php
1 file changed, 41 insertions(+), 27 deletions(-)


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

diff --git a/repo/Wikibase.hooks.php b/repo/Wikibase.hooks.php
index 302a300..478760a 100644
--- a/repo/Wikibase.hooks.php
+++ b/repo/Wikibase.hooks.php
@@ -30,6 +30,7 @@
 use SplFileInfo;
 use Title;
 use User;
+use Wikibase\DataModel\Entity\EntityId;
 use Wikibase\DataModel\Entity\EntityIdParsingException;
 use Wikibase\Hook\MakeGlobalVariablesScriptHandler;
 use Wikibase\Hook\OutputPageJsConfigHookHandler;
@@ -637,44 +638,57 @@
 * @return bool
 */
public static function onOutputPageBodyAttributes( OutputPage $out, 
Skin $sk, array $bodyAttrs ) {
-   wfProfileIn( __METHOD__ );
+   $entityId = self::getEntityIdFromContext( $out );
 
+   if ( $entityId === null ) {
+   return true;
+   }
+
+   // TODO: preg_replace kind of ridiculous here, should probably 
change the ENTITY_TYPE constants instead
+   $entityType = preg_replace( '/^wikibase-/i', '', 
$entityId-getEntityType() );
+
+   // add class to body so it's clear this is a wb item:
+   $bodyAttrs['class'] .= ' wb-entitypage wb-' . $entityType . 
'page';
+   // add another class with the ID of the item:
+   $bodyAttrs['class'] .= ' wb-' . $entityType . 'page-' . 
$entityId-getSerialization();
+
+   if ( $sk-getRequest()-getCheck( 'diff' ) ) {
+   $bodyAttrs['class'] .= ' wb-diffpage';
+   }
+
+   if ( $out-getRevisionId() !== 
$out-getTitle()-getLatestRevID() ) {
+   $bodyAttrs['class'] .= ' wb-oldrevpage';
+   }
+
+   return true;
+   }
+
+   /**
+* @param OutputPage $out
+*
+* @return EntityId|null
+*/
+   private static function getEntityIdFromContext( OutputPage $out ) {
$wikibaseRepo = WikibaseRepo::getDefaultInstance();
$entityContentFactory = 
$wikibaseRepo-getEntityContentFactory();
 
-   if ( $entityContentFactory-isEntityContentModel( 
$out-getTitle()-getContentModel() ) ) {
-   $configVars = $out-getJsConfigVars();
-   $entityIdParser = $wikibaseRepo-getEntityIdParser();
+   if ( !$entityContentFactory-isEntityContentModel( 
$out-getTitle()-getContentModel() ) ) {
+   return null;
+   }
 
-   if ( !isset( $configVars['wbEntityId'] ) ) {
-   return true;
-   }
+   $jsConfigVars = $out-getJsConfigVars();
+
+   if ( array_key_exists( 'wbEntityId', $jsConfigVars ) ) {
+   $idString = $jsConfigVars['wbEntityId'];
 
try {
-   $entityId = $entityIdParser-parse( 
$configVars['wbEntityId'] );
-
-   // TODO: preg_replace kind of ridiculous here, 
should probably change the ENTITY_TYPE constants instead
-   $entityType = preg_replace( '/^wikibase-/i', 
'', $entityId-getEntityType() );
-
-   // add class to body so it's clear this is a wb 
item:
-   $bodyAttrs['class'] .= ' wb-entitypage wb-' . 
$entityType . 'page';
-   // add another class with the ID of the item:
-   $bodyAttrs['class'] .= ' wb-' . $entityType . 
'page-' . $entityId-getSerialization();
-
-   if ( $sk-getRequest()-getCheck( 'diff' ) ) {
-   $bodyAttrs['class'] .= ' wb-diffpage';
-   }
-
-   if ( $out-getRevisionId() !== 
$out-getTitle()-getLatestRevID() ) {
-   $bodyAttrs['class'] .= ' wb-oldrevpage';
-   }
+   return 
$wikibaseRepo-getEntityIdParser()-parse( $idString );
} catch ( EntityIdParsingException $ex ) {
-   wfLogWarning( 'Failed to parse EntityId config 
var: ' . $configVars['wbEntityId'] );
+   wfLogWarning( 'Failed to parse EntityId config 
var: ' . $idString );
}
}
 
-   wfProfileOut( __METHOD__ );
-   return true;
+   return null;
}
 
   

[MediaWiki-commits] [Gerrit] Fix shift-click select on links in Chrome - change (VisualEditor/VisualEditor)

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

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

Change subject: Fix shift-click select on links in Chrome
..

Fix shift-click select on links in Chrome

Chrome tries to collapse the selection when you shift-click on them
because it forgets they're contentEditable. Detect this and fix it.

Change-Id: Ic52af6d14413bffdddb895c82512f7eb56b87dd9
---
M src/ce/ve.ce.Surface.js
1 file changed, 57 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor 
refs/changes/88/167188/1

diff --git a/src/ce/ve.ce.Surface.js b/src/ce/ve.ce.Surface.js
index 3331a51..127040f 100644
--- a/src/ce/ve.ce.Surface.js
+++ b/src/ce/ve.ce.Surface.js
@@ -674,8 +674,6 @@
return;
}
 
-   var view = this;
-
// Remember the mouse is down
this.dragging = true;
 
@@ -683,11 +681,9 @@
this.$document.on( 'mouseup', this.onDocumentMouseUpHandler );
 
this.surfaceObserver.stopTimerLoop();
-   setTimeout( function () {
-   // Selection change can happens after mousedown
-   // TODO: guard with incRenderLock?
-   view.surfaceObserver.pollOnce();
-   } );
+   // In some browsers the selection doesn't change until after the event
+   // so poll in the 'after' function
+   setTimeout( this.afterDocumentMouseDown.bind( this, e, 
this.getModel().getSelection() ) );
 
// Handle triple click
// HACK: do not do triple click handling in IE, because their click 
counting is broken
@@ -696,6 +692,20 @@
e.preventDefault();
 
this.getModel().getFragment().expandLinearSelection( 'closest', 
ve.dm.BranchNode ).adjustLinearSelection( 1, -1 ).select();
+   }
+};
+
+/**
+ * Deferred until after document mouse down
+ *
+ * @param {jQuery.Event} e Mouse down event
+ * @param {ve.dm.Selection} selectionBefore Selection before the mouse event
+ */
+ve.ce.Surface.prototype.afterDocumentMouseDown = function ( e, selectionBefore 
) {
+   // TODO: guard with incRenderLock?
+   this.surfaceObserver.pollOnce();
+   if ( e.shiftKey ) {
+   this.fixShiftClickSelect( selectionBefore );
}
 };
 
@@ -709,13 +719,51 @@
 ve.ce.Surface.prototype.onDocumentMouseUp = function ( e ) {
this.$document.off( 'mouseup', this.onDocumentMouseUpHandler );
this.surfaceObserver.startTimerLoop();
+   // In some browsers the selection doesn't change until after the event
+   // so poll in the 'after' function
+   setTimeout( this.afterDocumentMouseUp.bind( this, e, 
this.getModel().getSelection() ) );
+};
+
+/**
+ * Deferred until after document mouse up
+ *
+ * @param {jQuery.Event} e Mouse up event
+ * @param {ve.dm.Selection} selectionBefore Selection before the mouse event
+ */
+ve.ce.Surface.prototype.afterDocumentMouseUp = function ( e, selectionBefore ) 
{
// TODO: guard with incRenderLock?
this.surfaceObserver.pollOnce();
+   if ( e.shiftKey ) {
+   this.fixShiftClickSelect( selectionBefore );
+   }
if ( !e.shiftKey  this.selecting ) {
this.emit( 'selectionEnd' );
this.selecting = false;
}
this.dragging = false;
+};
+
+/**
+ * Fix shift-click selection
+ *
+ * When shift-click on links Chrome tries to collapse the selection
+ * so check for this and fix manually.
+ *
+ * This can occur on mousedown or, if the existing selection covers the
+ * link, on mouseup.
+ *
+ * https://code.google.com/p/chromium/issues/detail?id=345745
+ *
+ * @param {ve.dm.Selection} selectionBefore Selection before the mouse event
+ */
+ve.ce.Surface.prototype.fixShiftClickSelect = function ( selectionBefore ) {
+   if ( !( selectionBefore instanceof ve.dm.LinearSelection ) ) {
+   return;
+   }
+   var newSelection = this.getModel().getSelection();
+   if ( newSelection.isCollapsed()  !newSelection.equals( 
selectionBefore ) ) {
+   this.getModel().setLinearSelection( new ve.Range( 
selectionBefore.getRange().from, newSelection.getRange().to ) );
+   }
 };
 
 /**
@@ -1011,6 +1059,8 @@
 };
 
 /**
+ * Deferred until after document key down event
+ *
  * @param {jQuery.Event} e keydown event
  */
 ve.ce.Surface.prototype.afterDocumentKeyDown = function ( e ) {

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

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

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


[MediaWiki-commits] [Gerrit] New Wikidata Build - 17/10/2014 - change (mediawiki...Wikidata)

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

Change subject: New Wikidata Build - 17/10/2014
..


New Wikidata Build - 17/10/2014

Change-Id: I5a7e9da1b26efe4c566180fceb02b4167027b058
---
M WikibaseClient.settings.php
M WikibaseRepo.settings.php
M composer.lock
M extensions/PropertySuggester/PropertySuggester.php
M extensions/PropertySuggester/README.md
M extensions/PropertySuggester/build/travis/before_script.sh
M 
extensions/PropertySuggester/tests/phpunit/PropertySuggester/GetSuggestionsTest.php
M 
extensions/PropertySuggester/tests/phpunit/PropertySuggester/Suggesters/SimpleSuggesterTest.php
M 
extensions/PropertySuggester/tests/phpunit/PropertySuggester/SuggestionGeneratorTest.php
D extensions/Wikibase/.jshintignore
M extensions/Wikibase/build/travis/install.sh
M extensions/Wikibase/client/i18n/lb.json
M extensions/Wikibase/client/i18n/qqq.json
M extensions/Wikibase/client/includes/ChangeHandler.php
M 
extensions/Wikibase/client/includes/scribunto/Scribunto_LuaWikibaseEntityLibrary.php
M extensions/Wikibase/client/includes/scribunto/Scribunto_LuaWikibaseLibrary.php
M extensions/Wikibase/client/includes/scribunto/WikibaseLuaBindings.php
M extensions/Wikibase/client/includes/scribunto/WikibaseLuaEntityBindings.php
M 
extensions/Wikibase/client/tests/phpunit/includes/recentchanges/RecentChangesFilterOptionsTest.php
M extensions/Wikibase/composer.json
M extensions/Wikibase/lib/i18n/lb.json
M extensions/Wikibase/lib/includes/EntityFactory.php
M extensions/Wikibase/lib/includes/ReferencedEntitiesFinder.php
M extensions/Wikibase/lib/includes/SnakFactory.php
M extensions/Wikibase/lib/includes/ValuesFinder.php
M extensions/Wikibase/lib/includes/WikibaseDiffOpFactory.php
M extensions/Wikibase/lib/includes/changes/EntityChange.php
M extensions/Wikibase/lib/includes/changes/ItemChange.php
M extensions/Wikibase/lib/includes/formatters/MwTimeIsoFormatter.php
M extensions/Wikibase/lib/includes/store/EntityRevision.php
M extensions/Wikibase/lib/includes/store/ItemUsageIndex.php
M extensions/Wikibase/lib/includes/store/TermCombinationMatchFinder.php
M extensions/Wikibase/lib/includes/store/TermIndex.php
M extensions/Wikibase/lib/includes/store/TermPropertyLabelResolver.php
M extensions/Wikibase/lib/includes/store/sql/TermSqlIndex.php
M extensions/Wikibase/lib/resources/Resources.php
M extensions/Wikibase/lib/resources/jquery.ui/jquery.ui.TemplatedWidget.js
M extensions/Wikibase/lib/resources/jquery.ui/jquery.ui.tagadata.js
M 
extensions/Wikibase/lib/resources/jquery.wikibase/jquery.wikibase.aliasesview.js
M 
extensions/Wikibase/lib/resources/jquery.wikibase/jquery.wikibase.claimgrouplabelscroll.js
M 
extensions/Wikibase/lib/resources/jquery.wikibase/jquery.wikibase.claimgrouplistview.js
M 
extensions/Wikibase/lib/resources/jquery.wikibase/jquery.wikibase.claimlistview.js
M extensions/Wikibase/lib/resources/jquery.wikibase/jquery.wikibase.claimview.js
M 
extensions/Wikibase/lib/resources/jquery.wikibase/jquery.wikibase.descriptionview.js
M 
extensions/Wikibase/lib/resources/jquery.wikibase/jquery.wikibase.fingerprintgroupview.js
M 
extensions/Wikibase/lib/resources/jquery.wikibase/jquery.wikibase.fingerprintlistview.js
M extensions/Wikibase/lib/resources/jquery.wikibase/jquery.wikibase.labelview.js
M 
extensions/Wikibase/lib/resources/jquery.wikibase/jquery.wikibase.listview.ListItemAdapter.js
M 
extensions/Wikibase/lib/resources/jquery.wikibase/jquery.wikibase.referenceview.js
M 
extensions/Wikibase/lib/resources/jquery.wikibase/jquery.wikibase.sitelinkgroupview.js
M 
extensions/Wikibase/lib/resources/jquery.wikibase/jquery.wikibase.sitelinklistview.js
M 
extensions/Wikibase/lib/resources/jquery.wikibase/jquery.wikibase.snaklistview.js
M 
extensions/Wikibase/lib/resources/jquery.wikibase/jquery.wikibase.statementview.RankSelector.js
M 
extensions/Wikibase/lib/resources/jquery.wikibase/jquery.wikibase.statementview.js
M 
extensions/Wikibase/lib/resources/jquery.wikibase/themes/default/jquery.wikibase.descriptionview.css
M 
extensions/Wikibase/lib/resources/jquery.wikibase/themes/default/jquery.wikibase.fingerprintgroupview.css
M 
extensions/Wikibase/lib/resources/jquery.wikibase/themes/default/jquery.wikibase.fingerprintview.css
M 
extensions/Wikibase/lib/resources/jquery.wikibase/themes/default/jquery.wikibase.labelview.css
M 
extensions/Wikibase/lib/resources/jquery.wikibase/themes/default/jquery.wikibase.sitelinkgroupview.css
M 
extensions/Wikibase/lib/resources/jquery.wikibase/themes/default/jquery.wikibase.sitelinklistview.css
D extensions/Wikibase/lib/resources/jquery.wikibase/toolbar/addtoolbar.js
D extensions/Wikibase/lib/resources/jquery.wikibase/toolbar/edittoolbar.js
A 
extensions/Wikibase/lib/resources/jquery.wikibase/toolbar/jquery.wikibase.addtoolbar.js
A 
extensions/Wikibase/lib/resources/jquery.wikibase/toolbar/jquery.wikibase.edittoolbar.js
A 

[MediaWiki-commits] [Gerrit] Don't getContent in OutputPageBodyAttributes handler - change (mediawiki...Wikibase)

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

Change subject: Don't getContent in OutputPageBodyAttributes handler
..


Don't getContent in OutputPageBodyAttributes handler

EntityId is available as an OutputPage property, passed
via ParserOutput, as a js config variable.

We should be using what is available in parser output /
output page instead of fetching content which is time
and memory intensive.

Bug: 72158
Change-Id: If811e782e796800d36e8199013b813eb9b101937
---
M repo/Wikibase.hooks.php
1 file changed, 16 insertions(+), 9 deletions(-)

Approvals:
  Hoo man: Looks good to me, but someone else must approve
  Daniel Kinzler: Looks good to me, but someone else must approve
  Thiemo Mättig (WMDE): Looks good to me, approved
  jenkins-bot: Verified



diff --git a/repo/Wikibase.hooks.php b/repo/Wikibase.hooks.php
index a1140ce..302a300 100644
--- a/repo/Wikibase.hooks.php
+++ b/repo/Wikibase.hooks.php
@@ -30,6 +30,7 @@
 use SplFileInfo;
 use Title;
 use User;
+use Wikibase\DataModel\Entity\EntityIdParsingException;
 use Wikibase\Hook\MakeGlobalVariablesScriptHandler;
 use Wikibase\Hook\OutputPageJsConfigHookHandler;
 use Wikibase\Repo\Content\EntityHandler;
@@ -638,23 +639,27 @@
public static function onOutputPageBodyAttributes( OutputPage $out, 
Skin $sk, array $bodyAttrs ) {
wfProfileIn( __METHOD__ );
 
-   $entityContentFactory = 
WikibaseRepo::getDefaultInstance()-getEntityContentFactory();
+   $wikibaseRepo = WikibaseRepo::getDefaultInstance();
+   $entityContentFactory = 
$wikibaseRepo-getEntityContentFactory();
 
if ( $entityContentFactory-isEntityContentModel( 
$out-getTitle()-getContentModel() ) ) {
-   // We only add the classes, if there is an actual item 
and not just an empty Page in the right namespace.
-   // XXX: Let's hope the page isn't re-loaded from the 
database.
-   $entityPage = new WikiPage( $out-getTitle() );
-   /** @var EntityContent $entityContent */
-   $entityContent = $entityPage-getContent();
+   $configVars = $out-getJsConfigVars();
+   $entityIdParser = $wikibaseRepo-getEntityIdParser();
 
-   if ( $entityContent !== null  
!$entityContent-isRedirect() ) {
+   if ( !isset( $configVars['wbEntityId'] ) ) {
+   return true;
+   }
+
+   try {
+   $entityId = $entityIdParser-parse( 
$configVars['wbEntityId'] );
+
// TODO: preg_replace kind of ridiculous here, 
should probably change the ENTITY_TYPE constants instead
-   $entityType = preg_replace( '/^wikibase-/i', 
'', $entityContent-getEntity()-getType() );
+   $entityType = preg_replace( '/^wikibase-/i', 
'', $entityId-getEntityType() );
 
// add class to body so it's clear this is a wb 
item:
$bodyAttrs['class'] .= ' wb-entitypage wb-' . 
$entityType . 'page';
// add another class with the ID of the item:
-   $bodyAttrs['class'] .= ' wb-' . $entityType . 
'page-' . $entityContent-getEntityId()-getSerialization();
+   $bodyAttrs['class'] .= ' wb-' . $entityType . 
'page-' . $entityId-getSerialization();
 
if ( $sk-getRequest()-getCheck( 'diff' ) ) {
$bodyAttrs['class'] .= ' wb-diffpage';
@@ -663,6 +668,8 @@
if ( $out-getRevisionId() !== 
$out-getTitle()-getLatestRevID() ) {
$bodyAttrs['class'] .= ' wb-oldrevpage';
}
+   } catch ( EntityIdParsingException $ex ) {
+   wfLogWarning( 'Failed to parse EntityId config 
var: ' . $configVars['wbEntityId'] );
}
}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If811e782e796800d36e8199013b813eb9b101937
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Aude aude.w...@gmail.com
Gerrit-Reviewer: Daniel Kinzler daniel.kinz...@wikimedia.de
Gerrit-Reviewer: Hoo man h...@online.de
Gerrit-Reviewer: Jeroen De Dauw jeroended...@gmail.com
Gerrit-Reviewer: Thiemo Mättig (WMDE) thiemo.maet...@wikimedia.de
Gerrit-Reviewer: jenkins-bot 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org

[MediaWiki-commits] [Gerrit] Don't try to fetch non-existing extension data from ParserOu... - change (mediawiki...Wikibase)

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

Change subject: Don't try to fetch non-existing extension data from ParserOutput
..


Don't try to fetch non-existing extension data from ParserOutput

wikibase-configvars is not used and nothing saved there,
since we instead add this stuff to the JS config vars directly.

Change-Id: I2f1fc63118dab4cc1d5a8124785658d21bacbd02
---
M repo/Wikibase.hooks.php
1 file changed, 0 insertions(+), 3 deletions(-)

Approvals:
  Thiemo Mättig (WMDE): Looks good to me, approved
  Jeroen De Dauw: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/repo/Wikibase.hooks.php b/repo/Wikibase.hooks.php
index a1140ce..16d9b06 100644
--- a/repo/Wikibase.hooks.php
+++ b/repo/Wikibase.hooks.php
@@ -1053,9 +1053,6 @@
$out-setProperty( 'wikibase-view-chunks', 
$placeholders );
}
 
-   $configVars = $parserOutput-getExtensionData( 
'wikibase-configvars' );
-   $out-setProperty( 'wikibase-configvars', $configVars );
-
return true;
}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2f1fc63118dab4cc1d5a8124785658d21bacbd02
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Aude aude.w...@gmail.com
Gerrit-Reviewer: Jeroen De Dauw jeroended...@gmail.com
Gerrit-Reviewer: Thiemo Mättig (WMDE) thiemo.maet...@wikimedia.de
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Files and message for table editing - change (mediawiki...VisualEditor)

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

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

Change subject: Files and message for table editing
..

Files and message for table editing

Change-Id: I6e6c33b96d3089049a0fd5385191caa83df5756b
---
M VisualEditor.php
1 file changed, 14 insertions(+), 0 deletions(-)


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

diff --git a/VisualEditor.php b/VisualEditor.php
index 631ba9e..9d5c87d 100644
--- a/VisualEditor.php
+++ b/VisualEditor.php
@@ -345,11 +345,13 @@
'lib/ve/src/dm/ve.dm.InternalList.js',
'lib/ve/src/dm/ve.dm.MetaItem.js',
'lib/ve/src/dm/ve.dm.MetaList.js',
+   'lib/ve/src/dm/ve.dm.TableMatrix.js',
'lib/ve/src/dm/ve.dm.TransactionProcessor.js',
'lib/ve/src/dm/ve.dm.Transaction.js',
'lib/ve/src/dm/ve.dm.Selection.js',
'lib/ve/src/dm/ve.dm.LinearSelection.js',
'lib/ve/src/dm/ve.dm.NullSelection.js',
+   'lib/ve/src/dm/ve.dm.TableSelection.js',
'lib/ve/src/dm/ve.dm.Surface.js',
'lib/ve/src/dm/ve.dm.SurfaceFragment.js',
'lib/ve/src/dm/ve.dm.DataString.js',
@@ -486,6 +488,7 @@
'lib/ve/src/ui/ve.ui.Overlay.js',
'lib/ve/src/ui/ve.ui.Surface.js',
'lib/ve/src/ui/ve.ui.Context.js',
+   'lib/ve/src/ui/ve.ui.TableContext.js',
'lib/ve/src/ui/ve.ui.Tool.js',
'lib/ve/src/ui/ve.ui.Toolbar.js',
'lib/ve/src/ui/ve.ui.TargetToolbar.js',
@@ -504,6 +507,7 @@
'lib/ve/src/ui/actions/ve.ui.HistoryAction.js',
'lib/ve/src/ui/actions/ve.ui.IndentationAction.js',
'lib/ve/src/ui/actions/ve.ui.ListAction.js',
+   'lib/ve/src/ui/actions/ve.ui.TableAction.js',
'lib/ve/src/ui/actions/ve.ui.WindowAction.js',
 
'lib/ve/src/ui/dialogs/ve.ui.CommandHelpDialog.js',
@@ -526,6 +530,7 @@
'lib/ve/src/ui/tools/ve.ui.IndentationTool.js',
'lib/ve/src/ui/tools/ve.ui.InspectorTool.js',
'lib/ve/src/ui/tools/ve.ui.ListTool.js',
+   'lib/ve/src/ui/tools/ve.ui.TableTool.js',
 
'lib/ve/src/ui/inspectors/ve.ui.FragmentInspector.js',
'lib/ve/src/ui/inspectors/ve.ui.AnnotationInspector.js',
@@ -569,6 +574,7 @@
'lib/ve/src/ui/styles/ve.ui.Overlay.css',
'lib/ve/src/ui/styles/ve.ui.Surface.css',
'lib/ve/src/ui/styles/ve.ui.Toolbar.css',
+   'lib/ve/src/ui/styles/ve.ui.TableContext.css',
 
// TODO: add debugStyles to ResourceLoader
'lib/ve/src/ui/styles/ve.ui.DebugBar.css',
@@ -647,6 +653,14 @@
'visualeditor-specialcharacter-button-tooltip',
'visualeditor-specialcharacterinspector-title',

'visualeditor-specialcharinspector-characterlist-insert',
+   'visualeditor-table-delete-col',
+   'visualeditor-table-delete-row',
+   'visualeditor-table-delete-table',
+   'visualeditor-table-insert-col-after',
+   'visualeditor-table-insert-col-before',
+   'visualeditor-table-insert-row-after',
+   'visualeditor-table-insert-row-before',
+   'visualeditor-table-insert-table',
'visualeditor-version-label',
),
'targets' = array( 'desktop', 'mobile' ),

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

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

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


[MediaWiki-commits] [Gerrit] Fix class name is browser test - change (mediawiki...VisualEditor)

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

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

Change subject: Fix class name is browser test
..

Fix class name is browser test

Change-Id: Ia189ee285b5614ada69844b06545847caf21fd77
---
M modules/ve-mw/tests/browser/features/support/pages/visual_editor_page.rb
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git 
a/modules/ve-mw/tests/browser/features/support/pages/visual_editor_page.rb 
b/modules/ve-mw/tests/browser/features/support/pages/visual_editor_page.rb
index e758940..c5348ba 100644
--- a/modules/ve-mw/tests/browser/features/support/pages/visual_editor_page.rb
+++ b/modules/ve-mw/tests/browser/features/support/pages/visual_editor_page.rb
@@ -85,7 +85,7 @@
   unordered_list(:link_list, class: 'oo-ui-widget oo-ui-widget-enabled 
oo-ui-selectWidget oo-ui-selectWidget-depressed 
oo-ui-clippableElement-clippable oo-ui-menuWidget oo-ui-textInputMenuWidget 
oo-ui-lookupWidget-menu ve-ui-mwLinkTargetInputWidget-menu')
   a(:new_link, class: ve-ce-linkAnnotation ve-ce-mwInternalLinkAnnotation 
new)
   a(:internal_link, class: ve-ce-linkAnnotation 
ve-ce-mwInternalLinkAnnotation)
-  unordered_list(:popup_icon, class: ve-ui-context-menu)
+  unordered_list(:popup_icon, class: ve-ui-contextMenuWidget)
   span(:basic_reference, class: oo-ui-iconElement-icon oo-ui-icon-reference)
   div(:toolbar_actions, class: oo-ui-toolbar-actions)
   span(:media_insert_menu, class: oo-ui-tool-name-media)

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

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

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


[MediaWiki-commits] [Gerrit] Correct some global references in JavaScript - change (mediawiki...Wikibase)

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

Change subject: Correct some global references in JavaScript
..


Correct some global references in JavaScript

Change-Id: I0bf464f9014e07fe4fb6045feee33c1732e3f3be
---
M lib/resources/jquery.wikibase/jquery.wikibase.pagesuggester.js
M lib/resources/jquery.wikibase/toolbar/jquery.wikibase.toolbar.js
M lib/resources/jquery.wikibase/toolbar/jquery.wikibase.toolbaritem.js
M lib/resources/wikibase.utilities/wikibase.utilities.js
M lib/tests/qunit/experts/EntityIdInput.tests.js
M lib/tests/qunit/jquery.wikibase/jquery.wikibase.aliasesview.tests.js
M lib/tests/qunit/jquery.wikibase/jquery.wikibase.descriptionview.tests.js
M lib/tests/qunit/jquery.wikibase/jquery.wikibase.fingerprintview.tests.js
M lib/tests/qunit/jquery.wikibase/jquery.wikibase.labelview.tests.js
M lib/tests/qunit/wikibase.RepoApi/wikibase.RepoApiError.tests.js
M lib/tests/qunit/wikibase.ValueViewBuilder.tests.js
M lib/tests/qunit/wikibase.tests.js
12 files changed, 24 insertions(+), 24 deletions(-)

Approvals:
  Thiemo Mättig (WMDE): Looks good to me, approved
  jenkins-bot: Verified



diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.pagesuggester.js 
b/lib/resources/jquery.wikibase/jquery.wikibase.pagesuggester.js
index 7d23e4c..bc7258b 100644
--- a/lib/resources/jquery.wikibase/jquery.wikibase.pagesuggester.js
+++ b/lib/resources/jquery.wikibase/jquery.wikibase.pagesuggester.js
@@ -2,7 +2,7 @@
  * @licence GNU GPL v2+
  * @author H. Snater  mediaw...@snater.com 
  */
-( function( $, mw, wb ) {
+( function( $, wb ) {
'use strict';
 
 /**
@@ -113,4 +113,4 @@
}
 
 } );
-}( jQuery, mediaWiki, wikibase ) );
+}( jQuery, wikibase ) );
diff --git a/lib/resources/jquery.wikibase/toolbar/jquery.wikibase.toolbar.js 
b/lib/resources/jquery.wikibase/toolbar/jquery.wikibase.toolbar.js
index 98be0c6..9443254 100644
--- a/lib/resources/jquery.wikibase/toolbar/jquery.wikibase.toolbar.js
+++ b/lib/resources/jquery.wikibase/toolbar/jquery.wikibase.toolbar.js
@@ -2,7 +2,7 @@
  * @licence GNU GPL v2+
  * @author H. Snater  mediaw...@snater.com 
  */
-( function( wb, $, mw ) {
+( function( $, mw ) {
 'use strict';
 
 var PARENT = $.wikibase.toolbaritem;
@@ -169,4 +169,4 @@
 
 } );
 
-} )( wikibase, jQuery, mediaWiki );
+} )( jQuery, mediaWiki );
diff --git 
a/lib/resources/jquery.wikibase/toolbar/jquery.wikibase.toolbaritem.js 
b/lib/resources/jquery.wikibase/toolbar/jquery.wikibase.toolbaritem.js
index 8e84079..17d8dac 100644
--- a/lib/resources/jquery.wikibase/toolbar/jquery.wikibase.toolbaritem.js
+++ b/lib/resources/jquery.wikibase/toolbar/jquery.wikibase.toolbaritem.js
@@ -2,7 +2,7 @@
  * @licence GNU GPL v2+
  * @author H. Snater  mediaw...@snater.com 
  */
-( function( wb, $ ) {
+( function( $ ) {
 'use strict';
 
 var PARENT = $.TemplatedWidget;
@@ -46,4 +46,4 @@
}
 } );
 
-}( wikibase, jQuery ) );
+}( jQuery ) );
diff --git a/lib/resources/wikibase.utilities/wikibase.utilities.js 
b/lib/resources/wikibase.utilities/wikibase.utilities.js
index 5141d87..8aa1e7f 100644
--- a/lib/resources/wikibase.utilities/wikibase.utilities.js
+++ b/lib/resources/wikibase.utilities/wikibase.utilities.js
@@ -2,7 +2,7 @@
  * @licence GNU GPL v2+
  * @author Daniel Werner
  */
-( function( mw, wb ) {
+( function( wb ) {
'use strict';
 
/**
@@ -11,4 +11,4 @@
 */
wb.utilities = wb.utilities || {};
 
-}( mediaWiki, wikibase ) );
+}( wikibase ) );
diff --git a/lib/tests/qunit/experts/EntityIdInput.tests.js 
b/lib/tests/qunit/experts/EntityIdInput.tests.js
index 3b649a1..dab9e06 100644
--- a/lib/tests/qunit/experts/EntityIdInput.tests.js
+++ b/lib/tests/qunit/experts/EntityIdInput.tests.js
@@ -2,7 +2,7 @@
  * @licence GNU GPL v2+
  * @author H. Snater  mediaw...@snater.com 
  */
-( function( $, QUnit, valueview, wb ) {
+( function( QUnit, valueview, wb ) {
'use strict';
 
var testExpert = valueview.tests.testExpert;
@@ -13,4 +13,4 @@
expertConstructor: wb.experts.EntityIdInput
} );
 
-}( jQuery, QUnit, jQuery.valueview, wikibase ) );
+}( QUnit, jQuery.valueview, wikibase ) );
diff --git 
a/lib/tests/qunit/jquery.wikibase/jquery.wikibase.aliasesview.tests.js 
b/lib/tests/qunit/jquery.wikibase/jquery.wikibase.aliasesview.tests.js
index 0bbe4db..9645d41 100644
--- a/lib/tests/qunit/jquery.wikibase/jquery.wikibase.aliasesview.tests.js
+++ b/lib/tests/qunit/jquery.wikibase/jquery.wikibase.aliasesview.tests.js
@@ -3,7 +3,7 @@
  * @author H. Snater  mediaw...@snater.com 
  */
 
-( function( $, jQuery, QUnit ) {
+( function( $, QUnit ) {
 'use strict';
 
 /**
@@ -187,4 +187,4 @@
);
 } );
 
-}( jQuery, wikibase, QUnit ) );
+}( jQuery, QUnit ) );
diff --git 
a/lib/tests/qunit/jquery.wikibase/jquery.wikibase.descriptionview.tests.js 
b/lib/tests/qunit/jquery.wikibase/jquery.wikibase.descriptionview.tests.js
index dd1bfcb..33441db 100644
--- 

[MediaWiki-commits] [Gerrit] Restore basic styling to toolbar in core target (only) - change (VisualEditor/VisualEditor)

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

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

Change subject: Restore basic styling to toolbar in core target (only)
..

Restore basic styling to toolbar in core target (only)

Most document editors expose B/I/U in the toolbar. Hiding
B/I/U was a MediaWiki-specific feature request (or even WMF
sepcific) and the MW target file already specifies that behaviour.

Change-Id: I697b3f47cac225142346c8a31c50c7dd5e8b2609
---
M src/init/ve.init.Target.js
1 file changed, 6 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor 
refs/changes/91/167191/1

diff --git a/src/init/ve.init.Target.js b/src/init/ve.init.Target.js
index 9915874..cea6350 100644
--- a/src/init/ve.init.Target.js
+++ b/src/init/ve.init.Target.js
@@ -89,6 +89,12 @@
promote: [ 'paragraph' ],
demote: [ 'preformatted' ]
},
+   // Basic style
+   {
+   header: OO.ui.deferMsg( 'visualeditor-toolbar-text-style' ),
+   title: OO.ui.deferMsg( 'visualeditor-toolbar-style-tooltip' ),
+   include: [ 'bold', 'italic', 'underline' ]
+   },
// Style
{
header: OO.ui.deferMsg( 'visualeditor-toolbar-text-style' ),
@@ -97,7 +103,6 @@
icon: 'text-style',
title: OO.ui.deferMsg( 'visualeditor-toolbar-style-tooltip' ),
include: [ { group: 'textStyle' }, 'language', 'clear' ],
-   promote: [ 'bold', 'italic' ],
demote: [ 'strikethrough', 'code', 'underline', 'language', 
'clear' ]
},
// Link

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

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

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


[MediaWiki-commits] [Gerrit] Fix conditional - change (mediawiki...Wikibase)

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

Change subject: Fix conditional
..


Fix conditional

Change-Id: Ie14e1a7bbc7b3dd203e3f5505bebf00f963c64e0
---
M lib/resources/jquery.wikibase/jquery.wikibase.referenceview.js
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Thiemo Mättig (WMDE): Looks good to me, approved
  jenkins-bot: Verified



diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.referenceview.js 
b/lib/resources/jquery.wikibase/jquery.wikibase.referenceview.js
index 2457bd9..39359ea 100644
--- a/lib/resources/jquery.wikibase/jquery.wikibase.referenceview.js
+++ b/lib/resources/jquery.wikibase/jquery.wikibase.referenceview.js
@@ -122,7 +122,7 @@
 */
_create: function() {
if(
-   !this.options.statementGuid | !this.options.entityStore
+   !this.options.statementGuid || !this.options.entityStore
|| !this.options.valueViewBuilder || !this.options.api
) {
throw new Error( 'Required option(s) missing' );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie14e1a7bbc7b3dd203e3f5505bebf00f963c64e0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Adrian Lang adrian.l...@wikimedia.de
Gerrit-Reviewer: Thiemo Mättig (WMDE) thiemo.maet...@wikimedia.de
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Use stricter .jshintrc - change (mediawiki...Wikibase)

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

Change subject: Use stricter .jshintrc
..


Use stricter .jshintrc

Change-Id: I243fb843a752624195b1ee18f14402bfaf67d27f
---
M .jshintrc
1 file changed, 4 insertions(+), 6 deletions(-)

Approvals:
  Thiemo Mättig (WMDE): Looks good to me, approved
  jenkins-bot: Verified



diff --git a/.jshintrc b/.jshintrc
index 21a9e61..e7e9ce3 100644
--- a/.jshintrc
+++ b/.jshintrc
@@ -6,7 +6,7 @@
latedef: true,
newcap: true,
supernew: true,
-   shadow: true,
+   shadow: false,
noarg: true,
noempty: true,
nonew: true,
@@ -17,9 +17,9 @@
laxbreak: true,
laxcomma: false,
onevar: false,
-   bitwise: false,
+   bitwise: true,
forin: false,
-   regexp: false,
+   regexp: true,
strict: true,
scripturl: true,
 
@@ -37,8 +37,6 @@
sinon,
util,
valueFormatters,
-   valueParsers,
-   globeCoordinate,
-   time
+   valueParsers
]
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I243fb843a752624195b1ee18f14402bfaf67d27f
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Adrian Lang adrian.l...@wikimedia.de
Gerrit-Reviewer: Thiemo Mättig (WMDE) thiemo.maet...@wikimedia.de
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] PEP257 tests/*.py - change (pywikibot/core)

2014-10-17 Thread John Vandenberg (Code Review)
John Vandenberg has uploaded a new change for review.

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

Change subject: PEP257 tests/*.py
..

PEP257 tests/*.py

Change-Id: I8a3254fc48090b50f68c89a81a7d35f29edb4d25
---
M tests/__init__.py
M tests/data_ingestion_tests.py
M tests/date_tests.py
M tests/file_tests.py
M tests/http_tests.py
M tests/i18n_tests.py
M tests/interwiki_link_tests.py
M tests/ipregex_tests.py
M tests/link_tests.py
M tests/page_tests.py
M tests/pagegenerators_tests.py
M tests/pwb_tests.py
M tests/site_tests.py
M tests/textlib_tests.py
M tests/timestripper_tests.py
M tests/ui_tests.py
M tests/weblib_tests.py
M tests/wikibase_tests.py
M tests/wikidataquery_tests.py
M tests/xmlreader_tests.py
M tox.ini
21 files changed, 166 insertions(+), 36 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/92/167192/1

diff --git a/tests/__init__.py b/tests/__init__.py
index e2bdd7a..b903565 100644
--- a/tests/__init__.py
+++ b/tests/__init__.py
@@ -1,4 +1,5 @@
 # -*- coding: utf-8  -*-
+Package tests.
 #
 # (C) Pywikibot team, 2007-2014
 #
@@ -17,16 +18,16 @@
 # - ordereddict is only needed as a fallback for python 2.6
 # - mwparserfromhell is optional, so is only imported in textlib_tests
 try:
-import httplib2
+import httplib2  # noqa
 except ImportError as e:
 print(ImportError: %s % e)
 sys.exit(1)
 
 try:
-from collections import OrderedDict
+from collections import OrderedDict  # noqa
 except ImportError:
 try:
-from ordereddict import OrderedDict
+from ordereddict import OrderedDict  # noqa
 except ImportError as e:
 print(ImportError: %s % e)
 if sys.version_info[0] == 2 and sys.version_info[1] == 6:
@@ -191,6 +192,7 @@
 Add caching to every Request except logins.
 
 def __init__(self, *args, **kwargs):
+Constructor.
 super(TestRequest, self).__init__(0, *args, **kwargs)
 
 def _expired(self, dt):
@@ -225,6 +227,7 @@
 
 
 def patch_request():
+Patch Request classes with TestRequest.
 global original_expired
 pywikibot.data.api.Request = TestRequest
 original_expired = pywikibot.data.api.CachedRequest._expired
@@ -232,5 +235,6 @@
 
 
 def unpatch_request():
+Un-patch Request classes with TestRequest.
 pywikibot.data.api.Request = _original_Request
 pywikibot.data.api.CachedRequest._expired = original_expired
diff --git a/tests/data_ingestion_tests.py b/tests/data_ingestion_tests.py
index 7586528..deec8a1 100644
--- a/tests/data_ingestion_tests.py
+++ b/tests/data_ingestion_tests.py
@@ -1,7 +1,7 @@
 #!/usr/bin/python
 # -*- coding: utf-8  -*-
 
-Unit tests for data_ingestion.py
+Unit tests for data_ingestion.py script.
 __version__ = '$Id$'
 
 import os
@@ -11,6 +11,8 @@
 
 
 class TestPhoto(TestCase):
+
+Test Photo class.
 
 net = True
 
@@ -50,6 +52,8 @@
 
 class TestCSVReader(TestCase):
 
+Test CSVReader class.
+
 net = False
 
 def setUp(self):
diff --git a/tests/date_tests.py b/tests/date_tests.py
index 5d26688..8c236f3 100644
--- a/tests/date_tests.py
+++ b/tests/date_tests.py
@@ -1,4 +1,5 @@
 # -*- coding: utf-8  -*-
+Tests for the date module.
 #
 # (C) Pywikibot team, 2014
 #
@@ -12,10 +13,10 @@
 
 class TestDateMeta(MetaTestCaseClass):
 
-Test meta class
+Date test meta class.
 
 def __new__(cls, name, bases, dct):
-Create the new class
+Create the new class.
 def test_method(formatname):
 
 def testMapEntry(self):
diff --git a/tests/file_tests.py b/tests/file_tests.py
index 8f204bd..f8a7c14 100644
--- a/tests/file_tests.py
+++ b/tests/file_tests.py
@@ -1,4 +1,5 @@
 # -*- coding: utf-8  -*-
+FilePage tests.
 #
 # (C) Pywikibot team, 2014
 #
@@ -13,6 +14,8 @@
 
 class TestShareFiles(TestCase):
 
+Test methods fileIsShared, exists and fileUrl with shared files.
+
 sites = {
 'enwiki': {
 'family': 'wikipedia',
diff --git a/tests/http_tests.py b/tests/http_tests.py
index 395c95f..6dbfa9e 100644
--- a/tests/http_tests.py
+++ b/tests/http_tests.py
@@ -16,6 +16,8 @@
 
 class HttpTestCase(TestCase):
 
+HTTP get tests.
+
 net = True
 
 def test_get(self):
@@ -78,6 +80,8 @@
 
 class DefaultUserAgentTestCase(TestCase):
 
+HTTP user-agent tests.
+
 net = False
 
 def setUp(self):
diff --git a/tests/i18n_tests.py b/tests/i18n_tests.py
index 39c9ef2..63b18dc 100644
--- a/tests/i18n_tests.py
+++ b/tests/i18n_tests.py
@@ -1,4 +1,5 @@
 # -*- coding: utf-8  -*-
+Test i18n module.
 #
 # (C) Pywikibot team, 2007-2014
 #
@@ -12,6 +13,8 @@
 
 
 class TestTranslate(TestCase):
+
+Test translate method.
 
 net = False
 
@@ -75,6 +78,8 @@
 
 class TestTWN(TestCase):
 
+Base class for TranslateWiki tests.
+
 net = False
 
 def setUp(self):
@@ -88,6 +93,8 @@
 
 
 class TestTWTranslate(TestTWN):
+
+Test twtranslate method.
 
 def testLocalized(self):

[MediaWiki-commits] [Gerrit] Implemented jquery.sticknode plugin - change (mediawiki...Wikibase)

2014-10-17 Thread Henning Snater (Code Review)
Henning Snater has uploaded a new change for review.

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

Change subject: Implemented jquery.sticknode plugin
..

Implemented jquery.sticknode plugin

Applied to the sitelinkgroupview edit toolbar container and the 
sitelinklistview table header,
both will be sticked when scrolling while their corresponding sitelinklistview 
is still visible.

Change-Id: I7c5c70e506b9d4a52bad2261486df9e0313c933f
---
M lib/resources/Resources.php
M lib/resources/jquery.wikibase/jquery.wikibase.fingerprintgroupview.js
M lib/resources/jquery.wikibase/jquery.wikibase.sitelinkgroupview.js
M lib/resources/jquery.wikibase/jquery.wikibase.sitelinklistview.js
M lib/resources/jquery.wikibase/resources.php
M 
lib/resources/jquery.wikibase/themes/default/jquery.wikibase.sitelinkgroupview.css
A lib/resources/jquery/jquery.sticknode.js
M lib/tests/qunit/jquery/jquery.removeClassByRegex.tests.js
A lib/tests/qunit/jquery/jquery.sticknode.tests.js
M lib/tests/qunit/resources.php
10 files changed, 379 insertions(+), 2 deletions(-)


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

diff --git a/lib/resources/Resources.php b/lib/resources/Resources.php
index 8a0b162..c935218 100644
--- a/lib/resources/Resources.php
+++ b/lib/resources/Resources.php
@@ -120,6 +120,15 @@
),
),
 
+   'jquery.sticknode' = $moduleTemplate + array(
+   'scripts' = array(
+   'jquery/jquery.sticknode.js',
+   ),
+   'dependencies' = array(
+   'jquery.throttle-debounce',
+   ),
+   ),
+
'jquery.ui.tagadata' = $moduleTemplate + array(
'scripts' = array(
'jquery.ui/jquery.ui.tagadata.js',
diff --git 
a/lib/resources/jquery.wikibase/jquery.wikibase.fingerprintgroupview.js 
b/lib/resources/jquery.wikibase/jquery.wikibase.fingerprintgroupview.js
index e51fc85..0bfc6c5 100644
--- a/lib/resources/jquery.wikibase/jquery.wikibase.fingerprintgroupview.js
+++ b/lib/resources/jquery.wikibase/jquery.wikibase.fingerprintgroupview.js
@@ -18,7 +18,7 @@
  *   { language: {string], label: {string|null}, description: 
{string|null} } [, ...]
  * ]
  *
- * @options {string} entityId
+ * @option {string} entityId
  *
  * @option {wikibase.RepoApi} api
  *
diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.sitelinkgroupview.js 
b/lib/resources/jquery.wikibase/jquery.wikibase.sitelinkgroupview.js
index 3d1e49e..40c85dd 100644
--- a/lib/resources/jquery.wikibase/jquery.wikibase.sitelinkgroupview.js
+++ b/lib/resources/jquery.wikibase/jquery.wikibase.sitelinkgroupview.js
@@ -380,6 +380,10 @@
sitelinkgroupview.stopEditing( false );
}
} );
+
+   $container.sticknode( {
+   $container: 
sitelinkgroupview.$sitelinklistview.data( 'sitelinklistview' ).$thead
+   } );
},
'sitelinkgroupviewchange sitelinkgroupviewafterstartediting': 
function( event ) {
var $sitelinkgroupview = $( event.target ),
diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.sitelinklistview.js 
b/lib/resources/jquery.wikibase/jquery.wikibase.sitelinklistview.js
index 7244a31..0e7933d 100644
--- a/lib/resources/jquery.wikibase/jquery.wikibase.sitelinklistview.js
+++ b/lib/resources/jquery.wikibase/jquery.wikibase.sitelinklistview.js
@@ -99,12 +99,19 @@
}
 
this._refreshCounter();
+
+   this.$thead.sticknode( {
+   $container: this.element
+   } );
+
+   this._applyStickiness();
},
 
/**
 * @see jQuery.ui.TemplatedWidget.destroy
 */
destroy: function() {
+   this.$thead.data( 'sticknode' ).destroy();
this.$listview.data( 'listview' ).destroy();
this.$listview.off( '.' + this.widgetName );
this.element.removeData( 'tablesorter' );
@@ -198,6 +205,48 @@
);
},
 
+   _applyStickiness: function() {
+   var self = this,
+   stickyNode = this.$thead.data( 'sticknode' );
+
+   this.$thead.on( 'sticknodeupdate', function() {
+   if( stickyNode.isFixed() ) {
+   var $firstBodyTrTds = self.$listview.find( 
'tr:first td' );
+
+   if( !$firstBodyTrTds.length ) {
+   return;
+   }
+
+   self.$thead.find( 'th' ).each( function( i ) {
+ 

[MediaWiki-commits] [Gerrit] Update build script for Gradle - change (labs...wikipedia-android-builds)

2014-10-17 Thread Yuvipanda (Code Review)
Yuvipanda has submitted this change and it was merged.

Change subject: Update build script for Gradle
..


Update build script for Gradle

Change-Id: I7010fcfe5247f55907def3dc0fd1e0fe4382fea2
---
M src/build.py
1 file changed, 8 insertions(+), 15 deletions(-)

Approvals:
  BearND: Looks good to me, approved
  Yuvipanda: Verified



diff --git a/src/build.py b/src/build.py
index f411085..b0fca0c 100755
--- a/src/build.py
+++ b/src/build.py
@@ -4,12 +4,11 @@
 import json
 from datetime import datetime
 
-# Environment variables required for mvn to build app
+# Environment variables required for Gradle to build app
 env = {
-'M2_HOME': os.path.expanduser('~/mvn'),
-'M2': os.path.expanduser('~/mvn'),
 'ANDROID_HOME': os.path.expanduser('~/adk'),
-'ANDROID_BUILD_TOOLS': os.path.expanduser('~/adk/build-tools/20.0.0')
+'ANDROID_BUILD_TOOLS': os.path.expanduser('~/adk/build-tools/20.0.0'),
+'TERM': 'xterm-256color'
 }
 
 REPO_PATH = os.path.expanduser('~/wikipedia')
@@ -41,20 +40,14 @@
 # Clean out previous alpha folder
 sh.rm('-rf', '~/wikipedia/wikipedia/src/main/java/org/wikipedia/alpha')
 
-# Change the package name to .alpha
-prepare_release = 
sh.Command(os.path.expanduser('~/wikipedia/scripts/prepare-release.py'))
-prepare_release('--alpha')
-
 print 'Starting build for %s, with %s new commits' % (commit_hash, 
commit_count)
-# Run in side the app folder, since we can't run
-# instrumentation tests
-sh.cd(os.path.join(REPO_PATH, 'wikipedia'))
-mvn = sh.Command(os.path.expanduser('~/mvn/bin/mvn'))
-mvn('clean', 'install', _env=env)
+sh.cd(REPO_PATH)
+gradle = sh.Command('./gradlew')
+gradle('-q', 'clean', 'assembleAlphaDebug', _env=env)
+
+sh.cp('wikipedia/build/outputs/apk/wikipedia-2.0-alpha-*.apk', run_path)
 
 print 'Finished build, output at %s' % run_path
-
-sh.cp('target/wikipedia.apk', run_path)
 
 meta['completed_on'] = datetime.now().isoformat()
 json.dump(meta, open(os.path.join(run_path, 'meta.json'), 'w'))

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7010fcfe5247f55907def3dc0fd1e0fe4382fea2
Gerrit-PatchSet: 2
Gerrit-Project: labs/tools/wikipedia-android-builds
Gerrit-Branch: master
Gerrit-Owner: BearND bsitzm...@wikimedia.org
Gerrit-Reviewer: BearND bsitzm...@wikimedia.org
Gerrit-Reviewer: Yuvipanda yuvipa...@gmail.com

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


[MediaWiki-commits] [Gerrit] Expand wildcards when copying apk - change (labs...wikipedia-android-builds)

2014-10-17 Thread Yuvipanda (Code Review)
Yuvipanda has submitted this change and it was merged.

Change subject: Expand wildcards when copying apk
..


Expand wildcards when copying apk

Change-Id: I90ebb616cf6b798e2034a60c45835ed75ccbfa23
---
M src/build.py
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  BearND: Looks good to me, approved
  Yuvipanda: Verified



diff --git a/src/build.py b/src/build.py
index 144b146..d0de362 100755
--- a/src/build.py
+++ b/src/build.py
@@ -46,7 +46,7 @@
 gradle = sh.Command('./gradlew')
 gradle('-q', 'clean', 'assembleAlphaDebug', _env=env)
 
-sh.cp('wikipedia/build/outputs/apk/wikipedia-2.0-alpha-*.apk', run_path)
+sh.cp(sh.glob('wikipedia/build/outputs/apk/wikipedia-2.0-alpha-*.apk'), 
run_path)
 
 print 'Finished build, output at %s' % run_path
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I90ebb616cf6b798e2034a60c45835ed75ccbfa23
Gerrit-PatchSet: 2
Gerrit-Project: labs/tools/wikipedia-android-builds
Gerrit-Branch: master
Gerrit-Owner: BearND bsitzm...@wikimedia.org
Gerrit-Reviewer: BearND bsitzm...@wikimedia.org
Gerrit-Reviewer: Yuvipanda yuvipa...@gmail.com

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


[MediaWiki-commits] [Gerrit] Need JAVA_HOME for Gradle - change (labs...wikipedia-android-builds)

2014-10-17 Thread Yuvipanda (Code Review)
Yuvipanda has submitted this change and it was merged.

Change subject: Need JAVA_HOME for Gradle
..


Need JAVA_HOME for Gradle

Change-Id: Id878d7f222b61a3c7f38690541356287ca374c8d
---
M src/build.py
1 file changed, 1 insertion(+), 0 deletions(-)

Approvals:
  BearND: Looks good to me, approved
  Yuvipanda: Verified



diff --git a/src/build.py b/src/build.py
index b0fca0c..144b146 100755
--- a/src/build.py
+++ b/src/build.py
@@ -8,6 +8,7 @@
 env = {
 'ANDROID_HOME': os.path.expanduser('~/adk'),
 'ANDROID_BUILD_TOOLS': os.path.expanduser('~/adk/build-tools/20.0.0'),
+'JAVA_HOME': '/usr/lib/jvm/java-7-openjdk-amd64',
 'TERM': 'xterm-256color'
 }
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id878d7f222b61a3c7f38690541356287ca374c8d
Gerrit-PatchSet: 2
Gerrit-Project: labs/tools/wikipedia-android-builds
Gerrit-Branch: master
Gerrit-Owner: BearND bsitzm...@wikimedia.org
Gerrit-Reviewer: BearND bsitzm...@wikimedia.org
Gerrit-Reviewer: Yuvipanda yuvipa...@gmail.com

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


[MediaWiki-commits] [Gerrit] Output the current time stamp to stdout and stderr - change (labs...wikipedia-android-builds)

2014-10-17 Thread Yuvipanda (Code Review)
Yuvipanda has submitted this change and it was merged.

Change subject: Output the current time stamp to stdout and stderr
..


Output the current time stamp to stdout and stderr

Switched to print from future package
for a good way to print to stderr.

Change-Id: I14f47139c692c95defda99f9c4d22c4b88d55ccb
---
M src/build.py
1 file changed, 9 insertions(+), 5 deletions(-)

Approvals:
  BearND: Looks good to me, approved
  Yuvipanda: Verified



diff --git a/src/build.py b/src/build.py
index d0de362..ade1202 100755
--- a/src/build.py
+++ b/src/build.py
@@ -1,7 +1,9 @@
 #!/data/project/wikipedia-android-builds/bin/python
+from __future__ import print_function
 import os
 import sh
 import json
+import sys
 from datetime import datetime
 
 # Environment variables required for Gradle to build app
@@ -13,6 +15,10 @@
 }
 
 REPO_PATH = os.path.expanduser('~/wikipedia')
+
+start = '== %s ==' % datetime.now().isoformat()
+print(start, file=sys.stdout)
+print(start, file=sys.stderr)
 
 sh.cd(REPO_PATH)
 sh.git('fetch')
@@ -38,17 +44,15 @@
 
 meta['commit_hash'] = commit_hash
 
-# Clean out previous alpha folder
-sh.rm('-rf', '~/wikipedia/wikipedia/src/main/java/org/wikipedia/alpha')
+print('Starting build for %s, with %s new commits' % (commit_hash, 
commit_count), file=sys.stdout)
 
-print 'Starting build for %s, with %s new commits' % (commit_hash, 
commit_count)
 sh.cd(REPO_PATH)
 gradle = sh.Command('./gradlew')
 gradle('-q', 'clean', 'assembleAlphaDebug', _env=env)
 
 sh.cp(sh.glob('wikipedia/build/outputs/apk/wikipedia-2.0-alpha-*.apk'), 
run_path)
 
-print 'Finished build, output at %s' % run_path
+print('Finished build, output at %s' % run_path, file=sys.stdout)
 
 meta['completed_on'] = datetime.now().isoformat()
 json.dump(meta, open(os.path.join(run_path, 'meta.json'), 'w'))
@@ -57,4 +61,4 @@
 sh.rm('-f', latest_path)
 sh.ln('-s', run_path, latest_path)
 else:
-print 'No new commits'
+print('No new commits', file=sys.stdout)

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I14f47139c692c95defda99f9c4d22c4b88d55ccb
Gerrit-PatchSet: 2
Gerrit-Project: labs/tools/wikipedia-android-builds
Gerrit-Branch: master
Gerrit-Owner: BearND bsitzm...@wikimedia.org
Gerrit-Reviewer: BearND bsitzm...@wikimedia.org
Gerrit-Reviewer: Yuvipanda yuvipa...@gmail.com

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


[MediaWiki-commits] [Gerrit] Categories: Change message when no categories - change (mediawiki...ContentTranslation)

2014-10-17 Thread Jsahleen (Code Review)
Jsahleen has uploaded a new change for review.

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

Change subject: Categories: Change message when no categories
..

Categories: Change message when no categories

* When there are no source categories, no widgets are displayed
  in either the source or the translation column.
* When there are source categories but no categories can be adapted,
  the message No categories is displayed in both the counter and
  listing widgets in the translation column.

Bug: 6
Change-Id: Ie848eb79463841b9f3161bba1ae00b7ab3b1a9ed
---
M i18n/en.json
M modules/tools/ext.cx.tools.categories.js
M modules/tools/styles/ext.cx.tools.categories.less
3 files changed, 51 insertions(+), 18 deletions(-)


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

diff --git a/i18n/en.json b/i18n/en.json
index 0f83e65..5e8e0d2 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -61,7 +61,7 @@
cx-tools-mt-provider-title: From $1,
cx-tools-mt-not-available: Not available for $1,
cx-tools-mt-dont-use: Don't use machine translation,
-   cx-tools-categories-count-message: {{PLURAL:$1|$1 category|$1 
categories}},
+   cx-tools-categories-count-message: {{PLURAL:$1|$1 category|$1 
categories|0=No categories}},
cx-stats-title: Content translation statistics,
cx-stats-page-title: Page,
cx-stats-from: Source language,
diff --git a/modules/tools/ext.cx.tools.categories.js 
b/modules/tools/ext.cx.tools.categories.js
index e68baf2..6ccff4d 100644
--- a/modules/tools/ext.cx.tools.categories.js
+++ b/modules/tools/ext.cx.tools.categories.js
@@ -126,15 +126,27 @@
this.$view = this.getView();
 
if ( this.language === mw.cx.sourceLanguage 
-   this.categoryTool.categories.source !== null 
-   Object.keys( this.categoryTool.categories.source 
).length  0
+   this.categoryTool.categories.source !== null
) {
-   this.addCategories( this.categoryTool.categories.source 
);
+   if ( Object.keys( this.categoryTool.categories.source 
).length  0 ) {
+   this.addCategories( 
this.categoryTool.categories.source );
+   this.$view.find( '.cx-category-categorylist' 
).show();
+   this.$view.find( '.cx-category-nocategories' 
).hide();
+   } else {
+   this.$view.find( '.cx-category-categorylist' 
).hide();
+   this.$view.find( '.cx-category-nocategories' 
).show();
+   }
} else if ( this.language === mw.cx.targetLanguage 
-   this.categoryTool.categories.target !== null 
-   Object.keys( this.categoryTool.categories.target 
).length  0
+   this.categoryTool.categories.target !== null
) {
-   this.addCategories( this.categoryTool.categories.target 
);
+   if ( Object.keys( this.categoryTool.categories.target 
).length  0 ) {
+   this.addCategories( 
this.categoryTool.categories.target );
+   this.$view.find( '.cx-category-categorylist' 
).show();
+   this.$view.find( '.cx-category-nocategories' 
).hide();
+   } else {
+   this.$view.find( '.cx-category-categorylist' 
).hide();
+   this.$view.find( '.cx-category-nocategories' 
).show();
+   }
}
};
 
@@ -162,6 +174,8 @@
$( '.cx-category--translation[cx-category-id=' + 
categoryId + ']' )
.addClass( 'cx-category-highlight' );
categoryTool.widgets.target.counter.update( count );
+   categoryTool.widgets.target.listing.$view.find( 
'.cx-category-categorylist' ).show();
+   categoryTool.widgets.target.listing.$view.find( 
'.cx-category-nocategories' ).hide();
}
}
 
@@ -185,6 +199,10 @@
$( '.cx-category--source[cx-category-id=' + categoryId + ']' )
.removeClass( 'cx-category-highlight' );
categoryTool.widgets.target.counter.update( count );
+   if ( count === 0 ) {
+   categoryTool.widgets.target.listing.$view.find( 
'.cx-category-categorylist' ).hide();
+   categoryTool.widgets.target.listing.$view.find( 
'.cx-category-nocategories' ).show();
+   }
}
 
/**
@@ -226,7 +244,7 @@
 * @return {jQuery}
 */
CXCategoryListing.prototype.getView = function () {
-

[MediaWiki-commits] [Gerrit] Force overwriting of images - change (mediawiki...BlueSpiceExtensions)

2014-10-17 Thread Smuggli (Code Review)
Smuggli has uploaded a new change for review.

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

Change subject: Force overwriting of images
..

Force overwriting of images

In MW 1.24 somehow 4 of those buttons had not the correct BS image, so
force it

Change-Id: I9c631079f8171d10047c77ae10ee610211774097
---
M ExtendedEditBar/resources/bluespice.extendedEditBar.css
1 file changed, 9 insertions(+), 9 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceExtensions 
refs/changes/95/167195/1

diff --git a/ExtendedEditBar/resources/bluespice.extendedEditBar.css 
b/ExtendedEditBar/resources/bluespice.extendedEditBar.css
index e0abb4b..08a7461 100644
--- a/ExtendedEditBar/resources/bluespice.extendedEditBar.css
+++ b/ExtendedEditBar/resources/bluespice.extendedEditBar.css
@@ -32,47 +32,47 @@
 
 #mw-editbutton-bold {
/*@embed*/
-   background-image: url(images/button_format-bold.png);
+   background-image: url(images/button_format-bold.png) !important;
 }
 
 #mw-editbutton-italic {
/*@embed*/
-   background-image: url(images/button_format-italic.png);
+   background-image: url(images/button_format-italic.png) !important;
 }
 
 #mw-editbutton-headline {
/*@embed*/
-   background-image: url(images/button_format-h2.png);
+   background-image: url(images/button_format-h2.png) !important;
 }
 
 #mw-editbutton-link {
/*@embed*/
-   background-image: url(images/button_internal-link.png);
+   background-image: url(images/button_internal-link.png) !important;
 }
 
 #mw-editbutton-extlink {
/*@embed*/
-   background-image: url(images/button_external-link.png);
+   background-image: url(images/button_external-link.png) !important;
 }
 
 #mw-editbutton-strike {
/*@embed*/
-   background-image: url(images/button_format-struck.png);
+   background-image: url(images/button_format-struck.png) !important;
 }
 
 #mw-editbutton-image {
/*@embed*/
-   background-image: url(images/button_filelink.png);
+   background-image: url(images/button_filelink.png) !important;
 }
 
 #mw-editbutton-media {
/*@embed*/
-   background-image: url(images/button_medialink.png);
+   background-image: url(images/button_medialink.png) !important;
 }
 
 #mw-editbutton-signature {
/*@embed*/
-   background-image: url(images/button_signatur.png);
+   background-image: url(images/button_signatur.png) !important;
 }
 
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9c631079f8171d10047c77ae10ee610211774097
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions
Gerrit-Branch: master
Gerrit-Owner: Smuggli mug...@hallowelt.biz

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


[MediaWiki-commits] [Gerrit] [FIX] Site tests: Actually execute test - change (pywikibot/core)

2014-10-17 Thread XZise (Code Review)
XZise has uploaded a new change for review.

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

Change subject: [FIX] Site tests: Actually execute test
..

[FIX] Site tests: Actually execute test

The tests were hidden and never executed. Introduced with
I1655f6c9e6894fc053af9ee33b255287bbeb6b28.

Change-Id: I11fd255da6eb4fc7816d99b8408e331d9b8fe618
---
M tests/site_tests.py
1 file changed, 3 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/96/167196/1

diff --git a/tests/site_tests.py b/tests/site_tests.py
index 90d4f9f..9765017 100644
--- a/tests/site_tests.py
+++ b/tests/site_tests.py
@@ -96,12 +96,10 @@
 
 cached = True
 
-def testProperties(self):
+def test_properties(self, key):
 Test cases for BaseSite properties.
-# Test doc_subpage property.
-def test_properties(self, key):
-mysite = self.get_site(key)
-self.assertEqual(mysite.doc_subpage, self.sites[key]['result'])
+mysite = self.get_site(key)
+self.assertEqual(mysite.doc_subpage, self.sites[key]['result'])
 
 
 class TestSiteObject(DefaultSiteTestCase):

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I11fd255da6eb4fc7816d99b8408e331d9b8fe618
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: XZise commodorefabia...@gmx.de

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


[MediaWiki-commits] [Gerrit] Rephrase the error_network_error string - change (apps...wikipedia)

2014-10-17 Thread Amire80 (Code Review)
Amire80 has uploaded a new change for review.

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

Change subject: Rephrase the error_network_error string
..

Rephrase the error_network_error string

This string appears when there is no networ connection.
There is not reason to show it in the past tense,
because the problem is current.

Change-Id: I37bd86faf5f532c671715747aa821b61579aae4c
---
M wikipedia/res/values/strings.xml
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/wikipedia/res/values/strings.xml b/wikipedia/res/values/strings.xml
index 99805ef..77a75d5 100644
--- a/wikipedia/res/values/strings.xml
+++ b/wikipedia/res/values/strings.xml
@@ -14,7 +14,7 @@
 string name=search_hintSearch Wikipedia/string
 string name=history_activity_titleHistory/string
 string name=nav_item_historyHistory/string
-string name=error_network_errorCould not reach the network :(/string
+string name=error_network_errorThere is no network connection 
:(/string
 string name=search_network_errorNetwork error. Tap to try 
again./string
 string name=page_error_retryRetry/string
 string name=menu_clear_all_historyClear history/string

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I37bd86faf5f532c671715747aa821b61579aae4c
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Amire80 amir.ahar...@mail.huji.ac.il

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


[MediaWiki-commits] [Gerrit] androidsdk: Add class to set up wikipedia app build - change (operations/puppet)

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

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

Change subject: androidsdk: Add class to set up wikipedia app build
..

androidsdk: Add class to set up wikipedia app build

Change-Id: I670800315ad49e6458917c3d168b3ecc201fb73f
---
A modules/androidsdk/files/nginx.conf
A modules/androidsdk/manifests/init.pp
2 files changed, 47 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/98/167198/1

diff --git a/modules/androidsdk/files/nginx.conf 
b/modules/androidsdk/files/nginx.conf
new file mode 100644
index 000..d3f6bb9
--- /dev/null
+++ b/modules/androidsdk/files/nginx.conf
@@ -0,0 +1,7 @@
+server {
+listen 80;
+
+location / {
+alias /srv/build/public_html;
+}
+}
diff --git a/modules/androidsdk/manifests/init.pp 
b/modules/androidsdk/manifests/init.pp
new file mode 100644
index 000..63e18aa
--- /dev/null
+++ b/modules/androidsdk/manifests/init.pp
@@ -0,0 +1,40 @@
+# = Class androidsdk::build::wikipedia
+#
+# Sets up requirements for building the wikipedia android
+# app.
+class androidsdk::build::wikipedia {
+
+include ::role::labs::lvm::srv
+
+user { 'android-build':
+ensure = present,
+shell  = '/bin/false',
+}
+
+git::clone { 'apps/android/wikipedia':
+directory = '/srv/wikipedia',
+ensure= present,
+owner = 'android-build',
+require   = User['android-build'],
+}
+
+git::clone { 'labs/tools/wikipedia-android-builds':
+directory = '/srv/builds',
+ensure= present,
+owner = 'android-build',
+require   = User['android-build'],
+}
+   
+nginx::site { 'wikipedia-android-build':
+ensure = present,
+source = 'puppet:///modules/androidsdk/nginx.conf'
+}
+
+cron { 'wikipedia-android-build':
+ensure  = present,
+command = '/srv/builds/src/build.py',
+minute  = [0, 30],
+user= 'android-build',
+require = User['android-build'],
+}
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I670800315ad49e6458917c3d168b3ecc201fb73f
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Yuvipanda yuvipa...@gmail.com

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


[MediaWiki-commits] [Gerrit] Add Ukranian translantions for EP namespaces - change (mediawiki...EducationProgram)

2014-10-17 Thread AndyRussG (Code Review)
AndyRussG has uploaded a new change for review.

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

Change subject: Add Ukranian translantions for EP namespaces
..

Add Ukranian translantions for EP namespaces

Change-Id: I64197e6cc3666ab4be87729bdf592fea53f60a87
Bug: 71953
---
M EducationProgram.i18n.ns.php
1 file changed, 5 insertions(+), 0 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/EducationProgram 
refs/changes/99/167199/1

diff --git a/EducationProgram.i18n.ns.php b/EducationProgram.i18n.ns.php
index 39871dc..ec3ae26 100644
--- a/EducationProgram.i18n.ns.php
+++ b/EducationProgram.i18n.ns.php
@@ -67,3 +67,8 @@
EP_NS = 'Utbildningsprogram',
EP_NS_TALK = 'Utbildningsprogramsdiskussion',
 );
+
+$namespaceNames['uk'] = array(
+   EP_NS = 'Освітня програма',
+   EP_NS_TALK = 'Обговорення освітньої програми',
+);
\ No newline at end of file

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I64197e6cc3666ab4be87729bdf592fea53f60a87
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/EducationProgram
Gerrit-Branch: master
Gerrit-Owner: AndyRussG andrew.green...@gmail.com

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


[MediaWiki-commits] [Gerrit] Labs: clean exec resources in gridengine class - change (operations/puppet)

2014-10-17 Thread coren (Code Review)
coren has uploaded a new change for review.

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

Change subject: Labs: clean exec resources in gridengine class
..

Labs: clean exec resources in gridengine class

Rather than attempt overcomplicated command = invocations,
move them to cleaner script files and invoke those instead.

Change-Id: Ibc76809bc84879938593ce79f7fa12842ca5d6d9
---
A modules/gridengine/files/mergeconf
A modules/gridengine/files/runpurge
A modules/gridengine/files/trackpurge
M modules/gridengine/manifests/master.pp
M modules/gridengine/manifests/resource.pp
M modules/gridengine/manifests/resourcedir.pp
6 files changed, 99 insertions(+), 25 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/00/167200/1

diff --git a/modules/gridengine/files/mergeconf 
b/modules/gridengine/files/mergeconf
new file mode 100755
index 000..3824d22
--- /dev/null
+++ b/modules/gridengine/files/mergeconf
@@ -0,0 +1,32 @@
+#! /bin/bash
+#
+# mergconf outfile [infile...]
+#
+# This does a line-by-line merge of the configuration files
+# specified by infile into outfile, keeping only the first
+# of each line that start with the same whitespace-separated
+# keyword, into the outfile iff it differs from any existing
+# outfile.
+#
+# It will try to glob the infile arguments as guard against
+# puppet overquoting globs if they are not readable files.
+#
+# returns true if there is a new outfile in place
+
+conf=$1  shift
+
+shopt -s nullglob
+
+if [ $# -gt 0 ]; then
+  (for f in $@; do
+ if [ -r $f ]; then /bin/cat $f; else /bin/cat $f 2/dev/null; fi
+  done) | /usr/bin/sort -ufst ' ' -k 1,1 $conf~
+  if [ -r $conf~ ]; then
+if ! diff -qbBZN $conf~ $conf /dev/null; then
+  mv $conf~ $conf  exit 0
+fi
+rm -f $conf~
+  fi
+fi
+exit 1
+
diff --git a/modules/gridengine/files/runpurge 
b/modules/gridengine/files/runpurge
new file mode 100755
index 000..4f375c7
--- /dev/null
+++ b/modules/gridengine/files/runpurge
@@ -0,0 +1,20 @@
+#! /bin/bash
+#
+# runpurge tracker dir
+#
+# For every file in tracker that does not have a corresponding
+# file (of the same name) in dir, run the content of the file
+# then remove it if succesful.
+#
+# This allows running a command when a configured resource no
+# longer exists, something that puppet does not otherwise allow.
+
+test $# -eq 2 || exit 1
+cd $1 || exit 1
+
+for f in *; do
+  if [ ! -f $2/$f ]; then
+/bin/bash $f  /bin/rm $f
+  fi
+done
+
diff --git a/modules/gridengine/files/trackpurge 
b/modules/gridengine/files/trackpurge
new file mode 100755
index 000..fc6a14e
--- /dev/null
+++ b/modules/gridengine/files/trackpurge
@@ -0,0 +1,14 @@
+#! /bin/bash
+#
+# trackpurge tracker delcmd addcmd [args...]
+#
+
+test $# -gt 2 || exit 1
+tracker=$1
+delcmd=$2
+addcmd=$3
+shift 3
+
+if $addcmd $@; then
+  echo $delcmd $tracker
+fi
diff --git a/modules/gridengine/manifests/master.pp 
b/modules/gridengine/manifests/master.pp
index 0088874..47d7818 100644
--- a/modules/gridengine/manifests/master.pp
+++ b/modules/gridengine/manifests/master.pp
@@ -26,13 +26,26 @@
 
 file { $etcdir/.tracker:
 ensure  = directory,
-require = Package['gridengine-master'],
 force   = true,
 owner   = 'sgeadmin',
 group   = 'sgeadmin',
 mode= '0775',
 recurse = false,
 purge   = true,
+}
+
+file { $etcdir/bin:
+ensure   = directory,
+force= true,
+owner= 'root',
+group= 'root',
+mode = '0755',
+recurse  = true,
+purge= true,
+sourceselect = all,
+source   = [ 'puppet:///modules/gridengine/mergeconf',
+  'puppet:///modules/gridengine/trackpurge',
+  'puppet:///modules/gridengine/runpurge' ],
 }
 
 gridengine::resourcedir { 'queues': }
@@ -57,14 +70,13 @@
 owner   = 'sgeadmin',
 group   = 'sgeadmin',
 mode= '0664',
-source  = 'puppet:///modules/gridengine/99-default';
+source  = 'puppet:///modules/gridengine/99-default',
 }
 
-exec { create-complex-conf:
-cwd = $etcdir,
-path= 
'/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin',
-command = bash -c '/usr/bin/sort -ufst \ \ -k 1,1 complex/* 
complex.conf  echo /usr/bin/qconf -Mc complex.conf',
-require = File[$etcdir/complex/99-default],
+exec { update-complex-conf:
+onlyif  = $etcdir/bin/mergeconf $etcdir/complex.conf 
$etcdir/complex/*,
+command = /bin/echo /usr/bin/qconf -Mc $etcdir/complex.conf',
+require = File[$etcdir/bin, $etcdir/complex/99-default],
 }
 
 file { $etcdir/config:
@@ -82,14 +94,13 @@
 owner   = 'sgeadmin',
 group   = 'sgeadmin',
 mode= '0664',
-source  = 

[MediaWiki-commits] [Gerrit] Add missing HTML element slashes to jQuery calls - change (mediawiki...Wikibase)

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

Change subject: Add missing HTML element slashes to jQuery calls
..


Add missing HTML element slashes to jQuery calls

Not sure about the space. I love to have it for the sake of readability.
I find that much easier to read. Our code base currently uses both, a
lot without space but also a lot with space. Can we agree on the space?
Otherwise I will remove it everywhere.

Change-Id: I87d0c5361305d883d8a37e2dd6f1ec8f691b7104
---
M lib/resources/jquery.ui/jquery.ui.tagadata.js
M lib/resources/jquery.wikibase/jquery.wikibase.descriptionview.js
M lib/resources/jquery.wikibase/jquery.wikibase.labelview.js
M lib/resources/jquery.wikibase/jquery.wikibase.sitelinkview.js
M lib/resources/jquery.wikibase/snakview/snakview.js
M lib/tests/qunit/jquery.wikibase/jquery.wikibase.entityselector.tests.js
M lib/tests/qunit/jquery.wikibase/jquery.wikibase.pagesuggester.tests.js
M lib/tests/qunit/jquery.wikibase/jquery.wikibase.siteselector.tests.js
8 files changed, 9 insertions(+), 9 deletions(-)

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



diff --git a/lib/resources/jquery.ui/jquery.ui.tagadata.js 
b/lib/resources/jquery.ui/jquery.ui.tagadata.js
index 084f579..95c9dca 100644
--- a/lib/resources/jquery.ui/jquery.ui.tagadata.js
+++ b/lib/resources/jquery.ui/jquery.ui.tagadata.js
@@ -307,7 +307,7 @@
}
 
var $label = $( 'span/' ).addClass( 'tagadata-label' ),
-   $input = $( 'input' ).attr( 'name', 
this.options.itemName + '[]' );
+   $input = $( 'input /' ).attr( 'name', 
this.options.itemName + '[]' );
 
$tag = this._createTagNode().addClass( additionalClasses || '' 
).append( $label );
 
diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.descriptionview.js 
b/lib/resources/jquery.wikibase/jquery.wikibase.descriptionview.js
index 79cef38..23a9a5f 100644
--- a/lib/resources/jquery.wikibase/jquery.wikibase.descriptionview.js
+++ b/lib/resources/jquery.wikibase/jquery.wikibase.descriptionview.js
@@ -130,7 +130,7 @@
$.uls.data.getDir( this.options.value.language ) :
$( 'html' ).prop( 'dir' );
 
-   var $input = $( 'input', {
+   var $input = $( 'input /', {
// TODO: Inject correct placeholder via options
placeholder: mw.msg(

'wikibase-description-edit-placeholder-language-aware',
diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.labelview.js 
b/lib/resources/jquery.wikibase/jquery.wikibase.labelview.js
index 24f69f8..ff93134 100644
--- a/lib/resources/jquery.wikibase/jquery.wikibase.labelview.js
+++ b/lib/resources/jquery.wikibase/jquery.wikibase.labelview.js
@@ -142,7 +142,7 @@
$.uls.data.getDir( this.options.value.language ) :
$( 'html' ).prop( 'dir' );
 
-   var $input = $( 'input', {
+   var $input = $( 'input /', {
// TODO: Inject correct placeholder via options
placeholder: mw.msg(

'wikibase-label-edit-placeholder-language-aware',
diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.sitelinkview.js 
b/lib/resources/jquery.wikibase/jquery.wikibase.sitelinkview.js
index f3016f7..fdf0033 100644
--- a/lib/resources/jquery.wikibase/jquery.wikibase.sitelinkview.js
+++ b/lib/resources/jquery.wikibase/jquery.wikibase.sitelinkview.js
@@ -202,7 +202,7 @@
};
}
 
-   var $pageNameInput = $( 'input/' )
+   var $pageNameInput = $( 'input /' )
.attr( 'placeholder', mw.msg( 
'wikibase-sitelink-page-edit-placeholder' ) )
.pagesuggester( pageNameInputOptions );
 
@@ -221,7 +221,7 @@
return;
}
 
-   var $siteIdInput = $( 'input/' )
+   var $siteIdInput = $( 'input /' )
.attr( 'placeholder', mw.msg( 
'wikibase-sitelink-site-edit-placeholder' ) )
.siteselector( {
source: $.map( this.option( 'getAllowedSiteIds' 
)(), function( siteId ) {
diff --git a/lib/resources/jquery.wikibase/snakview/snakview.js 
b/lib/resources/jquery.wikibase/snakview/snakview.js
index f387a9f..bb7450d 100644
--- a/lib/resources/jquery.wikibase/snakview/snakview.js
+++ b/lib/resources/jquery.wikibase/snakview/snakview.js
@@ -216,7 +216,7 @@
repoConfig = mw.config.get( 'wbRepo' ),
repoApiUrl = repoConfig.url + repoConfig.scriptPath + 
'/api.php';
 
-   return $( 'input/' ).entityselector( {
+   return $( 'input /' ).entityselector( {
url: repoApiUrl,
 

[MediaWiki-commits] [Gerrit] Update prefix search query to be consistent with Mobile Web. - change (apps...wikipedia)

2014-10-17 Thread Dbrant (Code Review)
Dbrant has uploaded a new change for review.

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

Change subject: Update prefix search query to be consistent with Mobile Web.
..

Update prefix search query to be consistent with Mobile Web.

Ensures that the prefix results appear in the correct order.

Change-Id: I448fa0991edd1dab40942a8cbba8b3af1340615c
---
M wikipedia/src/main/java/org/wikipedia/search/SearchArticlesTask.java
1 file changed, 25 insertions(+), 22 deletions(-)


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

diff --git 
a/wikipedia/src/main/java/org/wikipedia/search/SearchArticlesTask.java 
b/wikipedia/src/main/java/org/wikipedia/search/SearchArticlesTask.java
index b643c86..b81ec9f 100644
--- a/wikipedia/src/main/java/org/wikipedia/search/SearchArticlesTask.java
+++ b/wikipedia/src/main/java/org/wikipedia/search/SearchArticlesTask.java
@@ -8,25 +8,23 @@
 import org.mediawiki.api.json.ApiException;
 import org.mediawiki.api.json.ApiResult;
 import org.mediawiki.api.json.RequestBuilder;
+import org.json.JSONArray;
 import org.json.JSONException;
 import org.json.JSONObject;
 import android.content.Context;
 import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.Iterator;
 import java.util.List;
 
 public class SearchArticlesTask extends ApiTaskListPageTitle {
 private final String prefix;
 private final Site site;
-private final WikipediaApp app;
+
+private static final int NUM_RESULTS_PER_QUERY = 12;
 
 public SearchArticlesTask(Context context, Api api, Site site, String 
prefix) {
 super(HIGH_CONCURRENCY, api);
 this.prefix = prefix;
 this.site = site;
-this.app = (WikipediaApp)context.getApplicationContext();
 }
 
 @Override
@@ -35,17 +33,20 @@
 .param(generator, prefixsearch)
 .param(gpssearch, prefix)
 .param(gpsnamespace, 0)
-.param(gpslimit, 12)
+.param(gpslimit, Integer.toString(NUM_RESULTS_PER_QUERY))
 .param(prop, pageimages)
 .param(piprop, thumbnail)
 .param(pithumbsize, 
Integer.toString(WikipediaApp.PREFERRED_THUMB_SIZE_SEARCH))
-.param(pilimit, 12);
+.param(pilimit, Integer.toString(NUM_RESULTS_PER_QUERY))
+.param(list, prefixsearch)
+.param(pssearch, prefix)
+.param(pslimit, Integer.toString(NUM_RESULTS_PER_QUERY));
 }
 
 @Override
 public ListPageTitle processResult(final ApiResult result) throws 
Throwable {
 ArrayListPageTitle pageTitles = new ArrayListPageTitle();
-JSONObject data = null;
+JSONObject data;
 try {
 data = result.asObject();
 } catch (ApiException e) {
@@ -56,26 +57,28 @@
 throw new RuntimeException(e);
 }
 }
+
+/*
+So here's what we're doing here:
+We're requesting two sets of results with our API query. They both 
contain the same titles,
+but in different orders.  The results given by list=prefixsearch 
give us the results in the
+correct order, but with no thumbnails.  The results given by 
generator=prefixsearch give the
+results in the wrong order, but with thumbnails!  So, all we have to 
do is use the first list,
+and correlate the pageids with the second list to extract the 
thumbnails.
+*/
 JSONObject query = data.optJSONObject(query);
 JSONObject pages = query.getJSONObject(pages);
+JSONArray prefixsearch = query.getJSONArray(prefixsearch);
 
-IteratorString keys = pages.keys();
-while (keys.hasNext()) {
-String key = keys.next();
-JSONObject page = pages.getJSONObject(key);
+for (int i = 0; i  prefixsearch.length(); i++) {
 String thumbUrl = null;
-if (page.has(thumbnail)) {
-thumbUrl = page.getJSONObject(thumbnail).getString(source);
+JSONObject item = prefixsearch.getJSONObject(i);
+String pageid = item.getString(pageid);
+if (pages.has(pageid)  
pages.getJSONObject(pageid).has(thumbnail)) {
+thumbUrl = 
pages.getJSONObject(pageid).getJSONObject(thumbnail).getString(source);
 }
-pageTitles.add(new PageTitle(page.getString(title), site, 
thumbUrl));
+pageTitles.add(new PageTitle(item.getString(title), site, 
thumbUrl));
 }
-
-Collections.sort(pageTitles, new ComparatorPageTitle() {
-@Override
-public int compare(PageTitle pageTitle, PageTitle pageTitle2) {
-return 
pageTitle.getDisplayText().compareTo(pageTitle2.getDisplayText());
-}
-});
 
 return pageTitles;
 }

-- 
To view, visit 

[MediaWiki-commits] [Gerrit] Add .gitreview - change (operations...apertium)

2014-10-17 Thread Alexandros Kosiaris (Code Review)
Alexandros Kosiaris has submitted this change and it was merged.

Change subject: Add .gitreview
..


Add .gitreview

Change-Id: Ie14e4ee47cc1e8dd3f25766ce59633a384eaff7b
---
A .gitreview
1 file changed, 6 insertions(+), 0 deletions(-)

Approvals:
  Alexandros Kosiaris: Verified; Looks good to me, approved
  Dzahn: Looks good to me, approved



diff --git a/.gitreview b/.gitreview
new file mode 100644
index 000..745c405
--- /dev/null
+++ b/.gitreview
@@ -0,0 +1,6 @@
+[gerrit]
+host=gerrit.wikimedia.org
+port=29418
+project=operations/debs/contenttranslation/apertium.git
+defaultbranch=master
+defaultrebase=0

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie14e4ee47cc1e8dd3f25766ce59633a384eaff7b
Gerrit-PatchSet: 2
Gerrit-Project: operations/debs/contenttranslation/apertium
Gerrit-Branch: master
Gerrit-Owner: KartikMistry kartik.mis...@gmail.com
Gerrit-Reviewer: Alexandros Kosiaris akosia...@wikimedia.org
Gerrit-Reviewer: Dzahn dz...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Beta: Add missing link to init with upstart-job - change (operations/puppet)

2014-10-17 Thread Alexandros Kosiaris (Code Review)
Alexandros Kosiaris has submitted this change and it was merged.

Change subject: Beta: Add missing link to init with upstart-job
..


Beta: Add missing link to init with upstart-job

Add missing link with cxserver init to upstart-job in Beta.

Change-Id: I2e56148e8c7f0285c0ba299260796b53e652a891
---
M modules/cxserver/manifests/init.pp
1 file changed, 10 insertions(+), 1 deletion(-)

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



diff --git a/modules/cxserver/manifests/init.pp 
b/modules/cxserver/manifests/init.pp
index cdd7264..09a51a5 100644
--- a/modules/cxserver/manifests/init.pp
+++ b/modules/cxserver/manifests/init.pp
@@ -77,12 +77,21 @@
 content = template('cxserver/logrotate.erb'),
 }
 
+# Link with upstart-job
+file { '/etc/init.d/cxserver':
+ensure = 'link',
+target = '/lib/init/upstart-job',
+}
+
 service { 'cxserver':
 ensure = running,
 hasstatus  = true,
 hasrestart = true,
 provider   = 'upstart',
-require= File[$log_dir],
+require= [
+File[$log_dir],
+File['/etc/init.d/cxserver']
+],
 subscribe  = File['/etc/init/cxserver.conf'],
 }
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2e56148e8c7f0285c0ba299260796b53e652a891
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: KartikMistry kartik.mis...@gmail.com
Gerrit-Reviewer: Alexandros Kosiaris akosia...@wikimedia.org
Gerrit-Reviewer: Hashar has...@free.fr
Gerrit-Reviewer: KartikMistry kartik.mis...@gmail.com
Gerrit-Reviewer: Nikerabbit niklas.laxst...@gmail.com
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] JS and CSS clean up based on static code analysis - change (mediawiki...Wikibase)

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

Change subject: JS and CSS clean up based on static code analysis
..


JS and CSS clean up based on static code analysis

Thanks to PHPStorm. I actually found a few bugs, but most stuff is
just unused parameters and such.

Change-Id: Ie6e9fc6dc8e0b63d47b3695ec75dcd68f065e06d
---
M client/resources/wikibase.client.getMwApiForRepo.js
M client/resources/wikibase.client.linkitem.init.js
M lib/resources/jquery.wikibase/jquery.wikibase.badgeselector.js
M lib/resources/jquery.wikibase/jquery.wikibase.claimgrouplabelscroll.js
M lib/resources/jquery.wikibase/jquery.wikibase.referenceview.js
M lib/resources/jquery.wikibase/jquery.wikibase.statementview.js
M 
lib/resources/jquery.wikibase/themes/default/jquery.wikibase.statementview.RankSelector.css
M lib/resources/wikibase.RepoApi/wikibase.RepoApi.js
M lib/resources/wikibase.sites.js
M lib/resources/wikibase.utilities/wikibase.utilities.ui.js
10 files changed, 20 insertions(+), 19 deletions(-)

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



diff --git a/client/resources/wikibase.client.getMwApiForRepo.js 
b/client/resources/wikibase.client.getMwApiForRepo.js
index e8238c4..6b5b9e0 100644
--- a/client/resources/wikibase.client.getMwApiForRepo.js
+++ b/client/resources/wikibase.client.getMwApiForRepo.js
@@ -12,8 +12,8 @@
 */
MODULE.getMwApiForRepo = function() {
var repoConfig = mw.config.get( 'wbRepo' ),
-   repoApiEndpoint = repoConfig.url + 
repoConfig.scriptPath + '/api.php',
-   mwApiForRepo = wikibase.api.getLocationAgnosticMwApi( 
repoApiEndpoint );
-   return mwApiForRepo;
+   repoApiEndpoint = repoConfig.url + 
repoConfig.scriptPath + '/api.php';
+
+   return wikibase.api.getLocationAgnosticMwApi( repoApiEndpoint );
};
 }( mediaWiki, wikibase ) );
diff --git a/client/resources/wikibase.client.linkitem.init.js 
b/client/resources/wikibase.client.linkitem.init.js
index a99922f..e24ef4b 100644
--- a/client/resources/wikibase.client.linkitem.init.js
+++ b/client/resources/wikibase.client.linkitem.init.js
@@ -21,7 +21,7 @@
'jquery.wikibase.linkitem',
'mediawiki.Title',
'mw.config.values.wbRepo',
-   'wikibase.client.getMwApiForRepo',
+   'wikibase.client.getMwApiForRepo'
],
function() {
$spinner.remove();
diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.badgeselector.js 
b/lib/resources/jquery.wikibase/jquery.wikibase.badgeselector.js
index 31db028..2bf9675 100644
--- a/lib/resources/jquery.wikibase/jquery.wikibase.badgeselector.js
+++ b/lib/resources/jquery.wikibase/jquery.wikibase.badgeselector.js
@@ -352,7 +352,7 @@
 * (De-)Activates a badge.
 *
 * @param {string} badgeId
-* @param {bool} targetState
+* @param {boolean} targetState
 */
_toggleBadge: function( badgeId, targetState ) {
if( targetState ) {
diff --git 
a/lib/resources/jquery.wikibase/jquery.wikibase.claimgrouplabelscroll.js 
b/lib/resources/jquery.wikibase/jquery.wikibase.claimgrouplabelscroll.js
index 39f5697..22b7e91 100644
--- a/lib/resources/jquery.wikibase/jquery.wikibase.claimgrouplabelscroll.js
+++ b/lib/resources/jquery.wikibase/jquery.wikibase.claimgrouplabelscroll.js
@@ -243,7 +243,7 @@
 *
 * @param {jQuery} $element
 * @param {jQuery} $target
-* @return {false|string} false if the position requires no update, 
otherwise the string of
+* @return {boolean|string} false if the position requires no update, 
otherwise the string of
 *  the top css style after the animation will be complete.
 */
function positionElementInOneLineWithAnother( $element, $target ) {
diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.referenceview.js 
b/lib/resources/jquery.wikibase/jquery.wikibase.referenceview.js
index 2457bd9..ea4b240 100644
--- a/lib/resources/jquery.wikibase/jquery.wikibase.referenceview.js
+++ b/lib/resources/jquery.wikibase/jquery.wikibase.referenceview.js
@@ -273,7 +273,7 @@
this.element.removeClassByRegex( /wb-reference-.+/ );
this.element.addClass( 'wb-reference-' + refHash );
 
-   this.element.removeClassByRegex( new RegExp( 
this.widgetBaseClass ) + '-.+' );
+   this.element.removeClassByRegex( new RegExp( 
this.widgetBaseClass + '-.+' ) );
this.element.addClass( this.widgetBaseClass + '-' + refHash );
},
 
diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.statementview.js 
b/lib/resources/jquery.wikibase/jquery.wikibase.statementview.js

[MediaWiki-commits] [Gerrit] /fully/qualify/path to mwscript - change (operations/puppet)

2014-10-17 Thread Andrew Bogott (Code Review)
Andrew Bogott has uploaded a new change for review.

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

Change subject: /fully/qualify/path to mwscript
..

/fully/qualify/path to mwscript

Change-Id: I1ff40d3cec16e78aef289f5f0ba80aa537ee4cab
---
M files/openstack/mw-xml.sh
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/02/167202/1

diff --git a/files/openstack/mw-xml.sh b/files/openstack/mw-xml.sh
index 22a7fa0..7bac8d3 100644
--- a/files/openstack/mw-xml.sh
+++ b/files/openstack/mw-xml.sh
@@ -1,5 +1,5 @@
 #!/bin/bash
 
 cd /srv/mediawiki/php
-mwscript maintenance/dumpBackup.php labswiki --full --uploads | nice -n 19 
gzip -9  /a/backup/public/labswiki-$(date '+%Y%m%d').xml.gz
+/usr/local/bin/mwscript maintenance/dumpBackup.php labswiki --full --uploads | 
nice -n 19 gzip -9  /a/backup/public/labswiki-$(date '+%Y%m%d').xml.gz
 cd -

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1ff40d3cec16e78aef289f5f0ba80aa537ee4cab
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Andrew Bogott abog...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Simplify background CSS - change (mediawiki...Wikibase)

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

Change subject: Simplify background CSS
..


Simplify background CSS

PHPUnit's static code analysis complained about this, that's why
I'm touching it. The shortcut property does the exact same. It resets
the background image to none.

Change-Id: I4a7bb046ecc2d3b1df8346c619b274edeec0076d
---
M lib/resources/jquery.wikibase/themes/default/jquery.wikibase.wbtooltip.css
1 file changed, 3 insertions(+), 5 deletions(-)

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



diff --git 
a/lib/resources/jquery.wikibase/themes/default/jquery.wikibase.wbtooltip.css 
b/lib/resources/jquery.wikibase/themes/default/jquery.wikibase.wbtooltip.css
index 8281194..429aef1 100644
--- a/lib/resources/jquery.wikibase/themes/default/jquery.wikibase.wbtooltip.css
+++ b/lib/resources/jquery.wikibase/themes/default/jquery.wikibase.wbtooltip.css
@@ -26,12 +26,10 @@
 }
 
 .wikibase-wbtooltip-tip.wb-error .tipsy-inner {
-   background-color: #FFDFC9;
/* on some host-client combinations the background image is propagated 
to the inner tooltip
-   container creating a background pattern; this broken behavior is 
suppressed by explicitly
-   setting the background image to none; this, however, has to be done in 
a separate definition
-   after setting the background colour */
-   background-image: none;
+   container creating a background pattern; this broken behavior is 
suppressed by implicitly
+   resetting the background image. */
+   background: #FFDFC9;
border-color: #B27631;
 }
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4a7bb046ecc2d3b1df8346c619b274edeec0076d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Thiemo Mättig (WMDE) thiemo.maet...@wikimedia.de
Gerrit-Reviewer: Hoo man h...@online.de
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Fix broken jobs when BROWSER_TIMEOUT is not set - change (integration/config)

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

Change subject: Fix broken jobs when BROWSER_TIMEOUT is not set
..


Fix broken jobs when BROWSER_TIMEOUT is not set

Updates at browsertests-* jobs.

Change-Id: Iafbe563c72a4cb9cda85d8d69962280fa59bbb7d
---
M jjb/macro-browsertests.yaml
M jjb/macro.yaml
2 files changed, 4 insertions(+), 2 deletions(-)

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



diff --git a/jjb/macro-browsertests.yaml b/jjb/macro-browsertests.yaml
index 62315e8..7ffe8b1 100644
--- a/jjb/macro-browsertests.yaml
+++ b/jjb/macro-browsertests.yaml
@@ -4,7 +4,10 @@
   - shell: |
   # set up environment variables
   export BROWSER={browser}
-  export BROWSER_TIMEOUT={browser_timeout}
+  if [ -n {browser_timeout} ]
+  then
+export BROWSER_TIMEOUT={browser_timeout}
+  fi
   export CUCUMBER_TAGS={cucumber_tags}
   export HEADLESS={headless}
   export MEDIAWIKI_API_URL=http://{mediawiki_url}/w/api.php
diff --git a/jjb/macro.yaml b/jjb/macro.yaml
index 68a48fc..f900b2c 100644
--- a/jjb/macro.yaml
+++ b/jjb/macro.yaml
@@ -652,4 +652,3 @@
 publishers:
  - archive:
 artifacts: 'log/*'
-

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iafbe563c72a4cb9cda85d8d69962280fa59bbb7d
Gerrit-PatchSet: 4
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Zfilipin zfili...@wikimedia.org
Gerrit-Reviewer: Cmcmahon cmcma...@wikimedia.org
Gerrit-Reviewer: Dduvall dduv...@wikimedia.org
Gerrit-Reviewer: Hashar has...@free.fr
Gerrit-Reviewer: Manybubbles never...@wikimedia.org
Gerrit-Reviewer: Tobias Gritschacher tobias.gritschac...@wikimedia.de
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] [FIX] Site tests: Actually execute test - change (pywikibot/core)

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

Change subject: [FIX] Site tests: Actually execute test
..


[FIX] Site tests: Actually execute test

The tests were hidden and never executed. Introduced with
I1655f6c9e6894fc053af9ee33b255287bbeb6b28.

Change-Id: I11fd255da6eb4fc7816d99b8408e331d9b8fe618
---
M tests/site_tests.py
1 file changed, 3 insertions(+), 5 deletions(-)

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



diff --git a/tests/site_tests.py b/tests/site_tests.py
index 90d4f9f..9765017 100644
--- a/tests/site_tests.py
+++ b/tests/site_tests.py
@@ -96,12 +96,10 @@
 
 cached = True
 
-def testProperties(self):
+def test_properties(self, key):
 Test cases for BaseSite properties.
-# Test doc_subpage property.
-def test_properties(self, key):
-mysite = self.get_site(key)
-self.assertEqual(mysite.doc_subpage, self.sites[key]['result'])
+mysite = self.get_site(key)
+self.assertEqual(mysite.doc_subpage, self.sites[key]['result'])
 
 
 class TestSiteObject(DefaultSiteTestCase):

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I11fd255da6eb4fc7816d99b8408e331d9b8fe618
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: XZise commodorefabia...@gmx.de
Gerrit-Reviewer: John Vandenberg jay...@gmail.com
Gerrit-Reviewer: Ladsgroup ladsgr...@gmail.com
Gerrit-Reviewer: Merlijn van Deen valhall...@arctus.nl
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] /fully/qualify/path to mwscript - change (operations/puppet)

2014-10-17 Thread coren (Code Review)
coren has submitted this change and it was merged.

Change subject: /fully/qualify/path to mwscript
..


/fully/qualify/path to mwscript

Change-Id: I1ff40d3cec16e78aef289f5f0ba80aa537ee4cab
---
M files/openstack/mw-xml.sh
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/files/openstack/mw-xml.sh b/files/openstack/mw-xml.sh
index 22a7fa0..7bac8d3 100644
--- a/files/openstack/mw-xml.sh
+++ b/files/openstack/mw-xml.sh
@@ -1,5 +1,5 @@
 #!/bin/bash
 
 cd /srv/mediawiki/php
-mwscript maintenance/dumpBackup.php labswiki --full --uploads | nice -n 19 
gzip -9  /a/backup/public/labswiki-$(date '+%Y%m%d').xml.gz
+/usr/local/bin/mwscript maintenance/dumpBackup.php labswiki --full --uploads | 
nice -n 19 gzip -9  /a/backup/public/labswiki-$(date '+%Y%m%d').xml.gz
 cd -

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1ff40d3cec16e78aef289f5f0ba80aa537ee4cab
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Andrew Bogott abog...@wikimedia.org
Gerrit-Reviewer: coren mpellet...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Labs: clean exec resources in gridengine class - change (operations/puppet)

2014-10-17 Thread coren (Code Review)
coren has submitted this change and it was merged.

Change subject: Labs: clean exec resources in gridengine class
..


Labs: clean exec resources in gridengine class

Rather than attempt overcomplicated command = invocations,
move them to cleaner script files and invoke those instead.

Change-Id: Ibc76809bc84879938593ce79f7fa12842ca5d6d9
---
A modules/gridengine/files/mergeconf
A modules/gridengine/files/runpurge
A modules/gridengine/files/trackpurge
M modules/gridengine/manifests/master.pp
M modules/gridengine/manifests/resource.pp
M modules/gridengine/manifests/resourcedir.pp
6 files changed, 99 insertions(+), 25 deletions(-)

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



diff --git a/modules/gridengine/files/mergeconf 
b/modules/gridengine/files/mergeconf
new file mode 100755
index 000..3824d22
--- /dev/null
+++ b/modules/gridengine/files/mergeconf
@@ -0,0 +1,32 @@
+#! /bin/bash
+#
+# mergconf outfile [infile...]
+#
+# This does a line-by-line merge of the configuration files
+# specified by infile into outfile, keeping only the first
+# of each line that start with the same whitespace-separated
+# keyword, into the outfile iff it differs from any existing
+# outfile.
+#
+# It will try to glob the infile arguments as guard against
+# puppet overquoting globs if they are not readable files.
+#
+# returns true if there is a new outfile in place
+
+conf=$1  shift
+
+shopt -s nullglob
+
+if [ $# -gt 0 ]; then
+  (for f in $@; do
+ if [ -r $f ]; then /bin/cat $f; else /bin/cat $f 2/dev/null; fi
+  done) | /usr/bin/sort -ufst ' ' -k 1,1 $conf~
+  if [ -r $conf~ ]; then
+if ! diff -qbBZN $conf~ $conf /dev/null; then
+  mv $conf~ $conf  exit 0
+fi
+rm -f $conf~
+  fi
+fi
+exit 1
+
diff --git a/modules/gridengine/files/runpurge 
b/modules/gridengine/files/runpurge
new file mode 100755
index 000..4f375c7
--- /dev/null
+++ b/modules/gridengine/files/runpurge
@@ -0,0 +1,20 @@
+#! /bin/bash
+#
+# runpurge tracker dir
+#
+# For every file in tracker that does not have a corresponding
+# file (of the same name) in dir, run the content of the file
+# then remove it if succesful.
+#
+# This allows running a command when a configured resource no
+# longer exists, something that puppet does not otherwise allow.
+
+test $# -eq 2 || exit 1
+cd $1 || exit 1
+
+for f in *; do
+  if [ ! -f $2/$f ]; then
+/bin/bash $f  /bin/rm $f
+  fi
+done
+
diff --git a/modules/gridengine/files/trackpurge 
b/modules/gridengine/files/trackpurge
new file mode 100755
index 000..fc6a14e
--- /dev/null
+++ b/modules/gridengine/files/trackpurge
@@ -0,0 +1,14 @@
+#! /bin/bash
+#
+# trackpurge tracker delcmd addcmd [args...]
+#
+
+test $# -gt 2 || exit 1
+tracker=$1
+delcmd=$2
+addcmd=$3
+shift 3
+
+if $addcmd $@; then
+  echo $delcmd $tracker
+fi
diff --git a/modules/gridengine/manifests/master.pp 
b/modules/gridengine/manifests/master.pp
index 0088874..101bc5e 100644
--- a/modules/gridengine/manifests/master.pp
+++ b/modules/gridengine/manifests/master.pp
@@ -26,13 +26,26 @@
 
 file { $etcdir/.tracker:
 ensure  = directory,
-require = Package['gridengine-master'],
 force   = true,
 owner   = 'sgeadmin',
 group   = 'sgeadmin',
 mode= '0775',
 recurse = false,
 purge   = true,
+}
+
+file { $etcdir/bin:
+ensure   = directory,
+force= true,
+owner= 'root',
+group= 'root',
+mode = '0755',
+recurse  = true,
+purge= true,
+sourceselect = all,
+source   = [ 'puppet:///modules/gridengine/mergeconf',
+  'puppet:///modules/gridengine/trackpurge',
+  'puppet:///modules/gridengine/runpurge' ],
 }
 
 gridengine::resourcedir { 'queues': }
@@ -57,14 +70,13 @@
 owner   = 'sgeadmin',
 group   = 'sgeadmin',
 mode= '0664',
-source  = 'puppet:///modules/gridengine/99-default';
+source  = 'puppet:///modules/gridengine/99-default',
 }
 
-exec { create-complex-conf:
-cwd = $etcdir,
-path= 
'/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin',
-command = bash -c '/usr/bin/sort -ufst \ \ -k 1,1 complex/* 
complex.conf  echo /usr/bin/qconf -Mc complex.conf',
-require = File[$etcdir/complex/99-default],
+exec { update-complex-conf:
+onlyif  = $etcdir/bin/mergeconf $etcdir/complex.conf 
$etcdir/complex/*,
+command = /bin/echo /usr/bin/qconf -Mc $etcdir/complex.conf',
+require = File[ $etcdir/bin, $etcdir/complex/99-default ],
 }
 
 file { $etcdir/config:
@@ -82,14 +94,13 @@
 owner   = 'sgeadmin',
 group   = 'sgeadmin',
 mode= '0664',
-source  = 'puppet:///modules/gridengine/config-99-default';
+source  = 

[MediaWiki-commits] [Gerrit] Add sh.py into the repository to avoid dependency issues - change (labs...wikipedia-android-builds)

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

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

Change subject: Add sh.py into the repository to avoid dependency issues
..

Add sh.py into the repository to avoid dependency issues

Change-Id: Ieeac5a409f3a6cc71ef48c320166e9fd8ad5f87e
---
A src/sh.py
1 file changed, 1,770 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/tools/wikipedia-android-builds 
refs/changes/05/167205/1

diff --git a/src/sh.py b/src/sh.py
new file mode 100644
index 000..5bf2e68
--- /dev/null
+++ b/src/sh.py
@@ -0,0 +1,1770 @@
+#===
+# Copyright (C) 2011-2012 by Andrew Moffat
+#
+# 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.
+#===
+
+
+__version__ = 1.09
+__project_url__ = https://github.com/amoffat/sh;
+
+
+
+import platform
+
+if windows in platform.system().lower():
+raise ImportError(sh %s is currently only supported on linux and osx. \
+please install pbs 0.110 (http://pypi.python.org/pypi/pbs) for windows \
+support. % __version__)
+
+
+
+import sys
+IS_PY3 = sys.version_info[0] == 3
+
+import traceback
+import os
+import re
+from glob import glob as original_glob
+from types import ModuleType
+from functools import partial
+import inspect
+import time as _time
+
+from locale import getpreferredencoding
+DEFAULT_ENCODING = getpreferredencoding() or utf-8
+
+
+if IS_PY3:
+from io import StringIO
+from io import BytesIO as cStringIO
+from queue import Queue, Empty
+else:
+from StringIO import StringIO
+from cStringIO import OutputType as cStringIO
+from Queue import Queue, Empty
+
+IS_OSX = platform.system() == Darwin
+THIS_DIR = os.path.dirname(os.path.realpath(__file__))
+
+
+import errno
+import warnings
+
+import pty
+import termios
+import signal
+import gc
+import select
+import atexit
+import threading
+import tty
+import fcntl
+import struct
+import resource
+from collections import deque
+import logging
+import weakref
+
+
+logging_enabled = False
+
+
+if IS_PY3:
+raw_input = input
+unicode = str
+basestring = str
+
+
+def encode_to_py3bytes_or_py2str(s):
+ takes anything and attempts to return a py2 string or py3 bytes.  this
+is typically used when creating command + arguments to be executed via
+os.exec* 
+
+fallback_encoding = utf8
+
+if IS_PY3:
+s = str(s)
+try:
+s = bytes(s, DEFAULT_ENCODING)
+except UnicodeEncodeError:
+s = bytes(s, fallback_encoding)
+else:
+# attempt to convert the thing to unicode from the system's encoding
+try:
+s = unicode(s, DEFAULT_ENCODING)
+# if the thing is already unicode, or it's a number, it can't be
+# coerced to unicode with an encoding argument, but if we leave out
+# the encoding argument, it will convert it to a string, then to 
unicode
+except TypeError:
+s = unicode(s)
+
+# now that we have guaranteed unicode, encode to our system encoding,
+# but attempt to fall back to something
+try:
+s = s.encode(DEFAULT_ENCODING)
+except:
+s = s.encode(fallback_encoding)
+return s
+
+
+class ErrorReturnCode(Exception):
+truncate_cap = 750
+
+def __init__(self, full_cmd, stdout, stderr):
+self.full_cmd = full_cmd
+self.stdout = stdout
+self.stderr = stderr
+
+
+if self.stdout is None: exc_stdout = redirected
+else:
+exc_stdout = self.stdout[:self.truncate_cap]
+out_delta = len(self.stdout) - len(exc_stdout)
+if out_delta:
+exc_stdout += (... (%d more, please see e.stdout) % 
out_delta).encode()
+
+if self.stderr is None: exc_stderr = redirected
+ 

[MediaWiki-commits] [Gerrit] Introduce basic test for entityview, fix wrong template usage - change (mediawiki...Wikibase)

2014-10-17 Thread Adrian Lang (Code Review)
Adrian Lang has uploaded a new change for review.

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

Change subject: Introduce basic test for entityview, fix wrong template usage
..

Introduce basic test for entityview, fix wrong template usage

Change-Id: I69845b66cc8a670d85d470bc8cc6b88263628a46
---
M lib/resources/jquery.wikibase/jquery.wikibase.entityview.js
A lib/tests/qunit/jquery.wikibase/jquery.wikibase.entityview.tests.js
M lib/tests/qunit/jquery.wikibase/resources.php
3 files changed, 93 insertions(+), 4 deletions(-)


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

diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.entityview.js 
b/lib/resources/jquery.wikibase/jquery.wikibase.entityview.js
index 1272bd6..bd96848 100644
--- a/lib/resources/jquery.wikibase/jquery.wikibase.entityview.js
+++ b/lib/resources/jquery.wikibase/jquery.wikibase.entityview.js
@@ -112,10 +112,11 @@
// TODO: Allow initializing entitview on empty DOM
this.$label = $( '.wb-firstHeading .wikibase-labelview', 
this.element ).first();
if( !this.$label.length ) {
-   this.$label = mw.template( 'wikibase-h1',
-   this.options.value.getId(),
-   $( 'div/' )
-   ).appendTo( this.element );
+   this.$label = $( 'div/' );
+   mw.template( 'wikibase-firstHeading',
+   this.options.value.getId(),
+   this.$label
+   ).appendTo( this.element );
}
 
this.$label.labelview( {
diff --git 
a/lib/tests/qunit/jquery.wikibase/jquery.wikibase.entityview.tests.js 
b/lib/tests/qunit/jquery.wikibase/jquery.wikibase.entityview.tests.js
new file mode 100644
index 000..2de4a59
--- /dev/null
+++ b/lib/tests/qunit/jquery.wikibase/jquery.wikibase.entityview.tests.js
@@ -0,0 +1,78 @@
+/**
+ * @licence GNU GPL v2+
+ * @author Adrian Lang adrian.l...@wikimedia.de
+ */
+
+( function( $, wb, QUnit ) {
+'use strict';
+
+/**
+ * @param {Object} [options]
+ * @param {jQuery} [$node]
+ * @return {jQuery}
+ */
+var createEntityview = function( options, $node ) {
+   options = $.extend( {
+   entityStore: 'i am an entity store',
+   api: 'i am an api',
+   valueViewBuilder: 'i am a valueview builder',
+   value: new wb.datamodel.Item( 'Q1' ) // FIXME: value is 
optional according to doc
+   }, options || {} );
+
+   $node = $node || $( 'div/' ).appendTo( 'body' );
+
+   var $entityview = $node
+   .addClass( 'test_entityview' )
+   .entityview( options );
+
+   $entityview.data( 'entityview' )._save = function() {
+   return $.Deferred().resolve( {
+   entity: {
+   lastrevid: 'i am a revision id'
+   }
+   } ).promise();
+   };
+
+   return $entityview;
+};
+
+QUnit.module( 'jquery.wikibase.entityview', QUnit.newMwEnvironment( {
+   teardown: function() {
+   $( '.test_entityview' ).each( function() {
+   var $entityview = $( this ),
+   entityview = $entityview.data( 'entityview' );
+
+   if( entityview ) {
+   entityview.destroy();
+   }
+
+   $entityview.remove();
+   } );
+   }
+} ) );
+
+QUnit.test( 'Create  destroy', function( assert ) {
+   assert.throws(
+   function() {
+   createEntityview( { value: null } );
+   },
+   'Throwing error when trying to initialize widget without a 
value.'
+   );
+
+   var $entityview = createEntityview(),
+   entityview = $entityview.data( 'entityview' );
+
+   assert.ok(
+   entityview !== 'undefined',
+   'Created widget.'
+   );
+
+   entityview.destroy();
+
+   assert.ok(
+   $entityview.data( 'entityview' ) === undefined,
+   'Destroyed widget.'
+   );
+} );
+
+}( jQuery, wikibase, QUnit ) );
diff --git a/lib/tests/qunit/jquery.wikibase/resources.php 
b/lib/tests/qunit/jquery.wikibase/resources.php
index 44b5247..2117cc8 100644
--- a/lib/tests/qunit/jquery.wikibase/resources.php
+++ b/lib/tests/qunit/jquery.wikibase/resources.php
@@ -75,6 +75,16 @@
),
),
 
+   'jquery.wikibase.entityview.tests' = $moduleBase + array(
+   'scripts' = array(
+   'jquery.wikibase.entityview.tests.js',
+   ),
+   'dependencies' = array(
+   

[MediaWiki-commits] [Gerrit] Labs: more fixes to gridengine puppetization - change (operations/puppet)

2014-10-17 Thread coren (Code Review)
coren has submitted this change and it was merged.

Change subject: Labs: more fixes to gridengine puppetization
..


Labs: more fixes to gridengine puppetization

Change-Id: I7268858ca266f747a2e53155178b7247faf538e9
---
M modules/gridengine/manifests/master.pp
A modules/toollabs/files/gethgrp
M modules/toollabs/manifests/hostgroup.pp
M modules/toollabs/manifests/hostgroup/collector.pp
M modules/toollabs/manifests/master.pp
5 files changed, 29 insertions(+), 5 deletions(-)

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



diff --git a/modules/gridengine/manifests/master.pp 
b/modules/gridengine/manifests/master.pp
index 101bc5e..db84341 100644
--- a/modules/gridengine/manifests/master.pp
+++ b/modules/gridengine/manifests/master.pp
@@ -34,7 +34,7 @@
 purge   = true,
 }
 
-file { $etcdir/bin:
+file { $etcdir/bin/:
 ensure   = directory,
 force= true,
 owner= 'root',
diff --git a/modules/toollabs/files/gethgrp b/modules/toollabs/files/gethgrp
new file mode 100755
index 000..c186b9c
--- /dev/null
+++ b/modules/toollabs/files/gethgrp
@@ -0,0 +1,16 @@
+#! /bin/bash
+#
+# gethgrp group dest dir
+#
+
+group=$1
+dest=$2
+cd $3 || exit 1
+
+(
+  echo group_name $group
+  if [ $# -gt 0 ]; then
+echo hostlist  $(egrep -l ^$group\$ *)
+  fi
+) $dest
+
diff --git a/modules/toollabs/manifests/hostgroup.pp 
b/modules/toollabs/manifests/hostgroup.pp
index fdb0bcf..c7bdc27 100644
--- a/modules/toollabs/manifests/hostgroup.pp
+++ b/modules/toollabs/manifests/hostgroup.pp
@@ -25,7 +25,7 @@
 owner   = 'root',
 group   = 'root',
 mode= '0444',
-content = inline_template('%= @groups.each {|g| #{g}\n } -%'),
+content = inline_template('% @groups.each {|g| print #{g}\n } 
-%'),
 }
 }
 
diff --git a/modules/toollabs/manifests/hostgroup/collector.pp 
b/modules/toollabs/manifests/hostgroup/collector.pp
index ddd3e0b..50f469c 100644
--- a/modules/toollabs/manifests/hostgroup/collector.pp
+++ b/modules/toollabs/manifests/hostgroup/collector.pp
@@ -7,9 +7,8 @@
 $hgrpfile  = /etc/gridengine/local/${hgname}.hosts
 
 exec { make-${hgname}-hosts:
-cwd = $toollabs::hostgroup::hgstore,
-path= 
'/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin',
-command = (echo group_name @{$hgname};echo hostlist \$(/bin/egrep -l 
'^${hgname}' *)) '${hgrpfile}',
+command = /etc/gridengine/local/bin/gethgrp ${hgname} ${hgrpfile} 
${toollabs::hostgroup::hgstore},
+require = File['/etc/gridengine/local/bin/gethgrp'],
 }
 
 gridengine::hostgroup { @${hgname}:
diff --git a/modules/toollabs/manifests/master.pp 
b/modules/toollabs/manifests/master.pp
index 66b3bd5..51e827a 100644
--- a/modules/toollabs/manifests/master.pp
+++ b/modules/toollabs/manifests/master.pp
@@ -19,6 +19,15 @@
 toollabs::queue::task,
 toollabs::queue::continuous
 
+file { '/etc/gridengine/local/bin/gethgrp':
+ensure   = file,
+force= true,
+owner= 'root',
+group= 'root',
+mode = '0755',
+source   = 'puppet:///modules/gridengine/gethgrp',
+}
+
 toollabs::hostgroup::collector { 'general': }
 toollabs::hostgroup::collector { 'webgrid': }
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7268858ca266f747a2e53155178b7247faf538e9
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: coren mpellet...@wikimedia.org
Gerrit-Reviewer: coren mpellet...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Adapt to new JavaScript datamodel and serialization - change (mediawiki...Wikibase)

2014-10-17 Thread Adrian Lang (Code Review)
Adrian Lang has uploaded a new change for review.

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

Change subject: Adapt to new JavaScript datamodel and serialization
..

Adapt to new JavaScript datamodel and serialization

Needs
* https://github.com/wmde/WikibaseDataModelJavascript/pull/16
* https://github.com/wmde/WikibaseSerializationJavaScript/pull/6

Change-Id: Iafc2ed96df9f4a36b87ea9217eddc653fd3c4b9c
---
M composer.json
M lib/resources/jquery.wikibase/jquery.wikibase.entityview.js
M lib/resources/jquery.wikibase/jquery.wikibase.referenceview.js
M lib/resources/jquery.wikibase/jquery.wikibase.snaklistview.js
M lib/resources/jquery.wikibase/snakview/resources.php
M lib/resources/jquery.wikibase/snakview/snakview.js
M lib/resources/jquery.wikibase/snakview/snakview.variations.Value.js
M lib/resources/wikibase.store/resources.php
M lib/resources/wikibase.store/store.FetchedContentUnserializer.js
M lib/resources/wikibase.utilities/wikibase.utilities.ui.js
M lib/tests/qunit/jquery.wikibase/jquery.wikibase.badgeselector.tests.js
M lib/tests/qunit/jquery.wikibase/jquery.wikibase.claimview.tests.js
M lib/tests/qunit/jquery.wikibase/jquery.wikibase.referenceview.tests.js
M lib/tests/qunit/jquery.wikibase/jquery.wikibase.snaklistview.tests.js
M repo/resources/Resources.php
M repo/resources/wikibase.EntityInitializer.js
M repo/resources/wikibase.ui.entityViewInit.js
17 files changed, 98 insertions(+), 95 deletions(-)


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

diff --git a/composer.json b/composer.json
index 76f3ed2..738eeda 100644
--- a/composer.json
+++ b/composer.json
@@ -36,10 +36,10 @@
data-values/value-view: ~0.7.0,
 
wikibase/data-model: ~2.0,
-   wikibase/data-model-javascript: ~0.3.0,
+   wikibase/data-model-javascript: ~1.0.0,
wikibase/data-model-serialization: ~1.2,
wikibase/internal-serialization: ~1.3,
-   wikibase/serialization-javascript: ~1.1.1,
+   wikibase/serialization-javascript: ~2.0.0,
 
diff/diff: ~1.0,
wikibase/easyrdf_lite: ~0.8.1
diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.entityview.js 
b/lib/resources/jquery.wikibase/jquery.wikibase.entityview.js
index 1272bd6..307c8f7 100644
--- a/lib/resources/jquery.wikibase/jquery.wikibase.entityview.js
+++ b/lib/resources/jquery.wikibase/jquery.wikibase.entityview.js
@@ -124,7 +124,7 @@
label: this.$label.hasClass( 'wb-empty' )
? null
// FIXME: entity object should not 
contain fallback strings
-   : this.options.value.getLabel( 
mw.config.get( 'wgUserLanguage' ) )
+   : 
this.options.value.getFingerprint().getLabelFor( mw.config.get( 
'wgUserLanguage' ) )
},
helpMessage: mw.msg(
'wikibase-description-input-help-message',
@@ -148,7 +148,7 @@
description: this.$description.hasClass( 
'wb-empty' )
? null
// FIXME: entity object should not 
contain fallback strings
-   : this.options.value.getDescription( 
mw.config.get( 'wgUserLanguage' ) )
+   : 
this.options.value.getFingerprint().getDescriptionFor( mw.config.get( 
'wgUserLanguage' ) )
},
helpMessage: mw.msg(
'wikibase-description-input-help-message',
@@ -168,7 +168,7 @@
this.$aliases.aliasesview( {
value: {
language:  mw.config.get( 'wgUserLanguage' ),
-   aliases: this.options.value.getAliases( 
mw.config.get( 'wgUserLanguage' ) )
+   aliases: 
this.options.value.getFingerprint().getAliasesFor( mw.config.get( 
'wgUserLanguage' ) )
},
entityId: this.options.value.getId(),
api: this.options.api
@@ -224,7 +224,7 @@
 
this.$claims
.claimgrouplistview( {
-   value: this.options.value.getClaims(),
+   value: this.options.value.getStatements(),
entityType: this.options.value.getType(),
entityStore: this.options.entityStore,
valueViewBuilder: this.options.valueViewBuilder,
diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.referenceview.js 
b/lib/resources/jquery.wikibase/jquery.wikibase.referenceview.js
index f0af262..39a9812 100644
--- 

[MediaWiki-commits] [Gerrit] Labs: more fixes to gridengine puppetization - change (operations/puppet)

2014-10-17 Thread coren (Code Review)
coren has uploaded a new change for review.

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

Change subject: Labs: more fixes to gridengine puppetization
..

Labs: more fixes to gridengine puppetization

Change-Id: I7268858ca266f747a2e53155178b7247faf538e9
---
M modules/gridengine/manifests/master.pp
A modules/toollabs/files/gethgrp
M modules/toollabs/manifests/hostgroup.pp
M modules/toollabs/manifests/hostgroup/collector.pp
M modules/toollabs/manifests/master.pp
5 files changed, 29 insertions(+), 5 deletions(-)


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

diff --git a/modules/gridengine/manifests/master.pp 
b/modules/gridengine/manifests/master.pp
index 101bc5e..db84341 100644
--- a/modules/gridengine/manifests/master.pp
+++ b/modules/gridengine/manifests/master.pp
@@ -34,7 +34,7 @@
 purge   = true,
 }
 
-file { $etcdir/bin:
+file { $etcdir/bin/:
 ensure   = directory,
 force= true,
 owner= 'root',
diff --git a/modules/toollabs/files/gethgrp b/modules/toollabs/files/gethgrp
new file mode 100755
index 000..c186b9c
--- /dev/null
+++ b/modules/toollabs/files/gethgrp
@@ -0,0 +1,16 @@
+#! /bin/bash
+#
+# gethgrp group dest dir
+#
+
+group=$1
+dest=$2
+cd $3 || exit 1
+
+(
+  echo group_name $group
+  if [ $# -gt 0 ]; then
+echo hostlist  $(egrep -l ^$group\$ *)
+  fi
+) $dest
+
diff --git a/modules/toollabs/manifests/hostgroup.pp 
b/modules/toollabs/manifests/hostgroup.pp
index fdb0bcf..c7bdc27 100644
--- a/modules/toollabs/manifests/hostgroup.pp
+++ b/modules/toollabs/manifests/hostgroup.pp
@@ -25,7 +25,7 @@
 owner   = 'root',
 group   = 'root',
 mode= '0444',
-content = inline_template('%= @groups.each {|g| #{g}\n } -%'),
+content = inline_template('% @groups.each {|g| print #{g}\n } 
-%'),
 }
 }
 
diff --git a/modules/toollabs/manifests/hostgroup/collector.pp 
b/modules/toollabs/manifests/hostgroup/collector.pp
index ddd3e0b..50f469c 100644
--- a/modules/toollabs/manifests/hostgroup/collector.pp
+++ b/modules/toollabs/manifests/hostgroup/collector.pp
@@ -7,9 +7,8 @@
 $hgrpfile  = /etc/gridengine/local/${hgname}.hosts
 
 exec { make-${hgname}-hosts:
-cwd = $toollabs::hostgroup::hgstore,
-path= 
'/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin',
-command = (echo group_name @{$hgname};echo hostlist \$(/bin/egrep -l 
'^${hgname}' *)) '${hgrpfile}',
+command = /etc/gridengine/local/bin/gethgrp ${hgname} ${hgrpfile} 
${toollabs::hostgroup::hgstore},
+require = File['/etc/gridengine/local/bin/gethgrp'],
 }
 
 gridengine::hostgroup { @${hgname}:
diff --git a/modules/toollabs/manifests/master.pp 
b/modules/toollabs/manifests/master.pp
index 66b3bd5..51e827a 100644
--- a/modules/toollabs/manifests/master.pp
+++ b/modules/toollabs/manifests/master.pp
@@ -19,6 +19,15 @@
 toollabs::queue::task,
 toollabs::queue::continuous
 
+file { '/etc/gridengine/local/bin/gethgrp':
+ensure   = file,
+force= true,
+owner= 'root',
+group= 'root',
+mode = '0755',
+source   = 'puppet:///modules/gridengine/gethgrp',
+}
+
 toollabs::hostgroup::collector { 'general': }
 toollabs::hostgroup::collector { 'webgrid': }
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7268858ca266f747a2e53155178b7247faf538e9
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: coren mpellet...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Fix/improve Bridge uninitialization. - change (apps...wikipedia)

2014-10-17 Thread Dbrant (Code Review)
Dbrant has uploaded a new change for review.

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

Change subject: Fix/improve Bridge uninitialization.
..

Fix/improve Bridge uninitialization.

It looks like removeJavascriptInterface and setWebChromeClient(null) were
not necessary, and were actually causing some strange behavior.

Change-Id: I5d0e14eb2bf552bfdc306c04985a9d6dc8740912
---
M wikipedia/src/main/java/org/wikipedia/bridge/CommunicationBridge.java
1 file changed, 2 insertions(+), 6 deletions(-)


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

diff --git 
a/wikipedia/src/main/java/org/wikipedia/bridge/CommunicationBridge.java 
b/wikipedia/src/main/java/org/wikipedia/bridge/CommunicationBridge.java
index d302eba..b9b53eb 100644
--- a/wikipedia/src/main/java/org/wikipedia/bridge/CommunicationBridge.java
+++ b/wikipedia/src/main/java/org/wikipedia/bridge/CommunicationBridge.java
@@ -1,6 +1,5 @@
 package org.wikipedia.bridge;
 
-import android.os.Build;
 import android.os.Handler;
 import android.os.Looper;
 import android.os.Message;
@@ -59,10 +58,6 @@
 }
 
 public void cleanup() {
-if (Build.VERSION.SDK_INT = Build.VERSION_CODES.HONEYCOMB) {
-webView.removeJavascriptInterface(marshaller);
-}
-webView.setWebChromeClient(null);
 eventListeners.clear();
 incomingMessageHandler.removeCallbacksAndMessages(null);
 }
@@ -108,7 +103,8 @@
 JSONObject messagePack = (JSONObject) msg.obj;
 String type = messagePack.optString(type);
 if (!eventListeners.containsKey(type)) {
-throw new RuntimeException(No such message type registered:  
+ type);
+Log.w(CommunicationBridge, No such message type registered: 
 + type);
+return false;
 }
 ArrayListJSEventListener listeners = eventListeners.get(type);
 for (JSEventListener listener : listeners) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5d0e14eb2bf552bfdc306c04985a9d6dc8740912
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Dbrant dbr...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Add sh.py into the repository to avoid dependency issues - change (labs...wikipedia-android-builds)

2014-10-17 Thread Yuvipanda (Code Review)
Yuvipanda has submitted this change and it was merged.

Change subject: Add sh.py into the repository to avoid dependency issues
..


Add sh.py into the repository to avoid dependency issues

Change-Id: Ieeac5a409f3a6cc71ef48c320166e9fd8ad5f87e
---
A src/sh.py
1 file changed, 1,770 insertions(+), 0 deletions(-)

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



diff --git a/src/sh.py b/src/sh.py
new file mode 100644
index 000..5bf2e68
--- /dev/null
+++ b/src/sh.py
@@ -0,0 +1,1770 @@
+#===
+# Copyright (C) 2011-2012 by Andrew Moffat
+#
+# 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.
+#===
+
+
+__version__ = 1.09
+__project_url__ = https://github.com/amoffat/sh;
+
+
+
+import platform
+
+if windows in platform.system().lower():
+raise ImportError(sh %s is currently only supported on linux and osx. \
+please install pbs 0.110 (http://pypi.python.org/pypi/pbs) for windows \
+support. % __version__)
+
+
+
+import sys
+IS_PY3 = sys.version_info[0] == 3
+
+import traceback
+import os
+import re
+from glob import glob as original_glob
+from types import ModuleType
+from functools import partial
+import inspect
+import time as _time
+
+from locale import getpreferredencoding
+DEFAULT_ENCODING = getpreferredencoding() or utf-8
+
+
+if IS_PY3:
+from io import StringIO
+from io import BytesIO as cStringIO
+from queue import Queue, Empty
+else:
+from StringIO import StringIO
+from cStringIO import OutputType as cStringIO
+from Queue import Queue, Empty
+
+IS_OSX = platform.system() == Darwin
+THIS_DIR = os.path.dirname(os.path.realpath(__file__))
+
+
+import errno
+import warnings
+
+import pty
+import termios
+import signal
+import gc
+import select
+import atexit
+import threading
+import tty
+import fcntl
+import struct
+import resource
+from collections import deque
+import logging
+import weakref
+
+
+logging_enabled = False
+
+
+if IS_PY3:
+raw_input = input
+unicode = str
+basestring = str
+
+
+def encode_to_py3bytes_or_py2str(s):
+ takes anything and attempts to return a py2 string or py3 bytes.  this
+is typically used when creating command + arguments to be executed via
+os.exec* 
+
+fallback_encoding = utf8
+
+if IS_PY3:
+s = str(s)
+try:
+s = bytes(s, DEFAULT_ENCODING)
+except UnicodeEncodeError:
+s = bytes(s, fallback_encoding)
+else:
+# attempt to convert the thing to unicode from the system's encoding
+try:
+s = unicode(s, DEFAULT_ENCODING)
+# if the thing is already unicode, or it's a number, it can't be
+# coerced to unicode with an encoding argument, but if we leave out
+# the encoding argument, it will convert it to a string, then to 
unicode
+except TypeError:
+s = unicode(s)
+
+# now that we have guaranteed unicode, encode to our system encoding,
+# but attempt to fall back to something
+try:
+s = s.encode(DEFAULT_ENCODING)
+except:
+s = s.encode(fallback_encoding)
+return s
+
+
+class ErrorReturnCode(Exception):
+truncate_cap = 750
+
+def __init__(self, full_cmd, stdout, stderr):
+self.full_cmd = full_cmd
+self.stdout = stdout
+self.stderr = stderr
+
+
+if self.stdout is None: exc_stdout = redirected
+else:
+exc_stdout = self.stdout[:self.truncate_cap]
+out_delta = len(self.stdout) - len(exc_stdout)
+if out_delta:
+exc_stdout += (... (%d more, please see e.stdout) % 
out_delta).encode()
+
+if self.stderr is None: exc_stderr = redirected
+else:
+exc_stderr = self.stderr[:self.truncate_cap]
+ 

[MediaWiki-commits] [Gerrit] Move everything to be based off /srv - change (labs...wikipedia-android-builds)

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

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

Change subject: Move everything to be based off /srv
..

Move everything to be based off /srv

Change-Id: I4020af5e05e9b15ca22b2fe25bf6bf3b65c306fd
---
M src/build.py
1 file changed, 7 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/tools/wikipedia-android-builds 
refs/changes/12/167212/1

diff --git a/src/build.py b/src/build.py
index ade1202..0ea2ada 100755
--- a/src/build.py
+++ b/src/build.py
@@ -8,13 +8,13 @@
 
 # Environment variables required for Gradle to build app
 env = {
-'ANDROID_HOME': os.path.expanduser('~/adk'),
-'ANDROID_BUILD_TOOLS': os.path.expanduser('~/adk/build-tools/20.0.0'),
+'ANDROID_HOME': os.path.expanduser('/srv/adk'),
+'ANDROID_BUILD_TOOLS': os.path.expanduser('/srv/adk/build-tools/20.0.0'),
 'JAVA_HOME': '/usr/lib/jvm/java-7-openjdk-amd64',
 'TERM': 'xterm-256color'
 }
 
-REPO_PATH = os.path.expanduser('~/wikipedia')
+REPO_PATH = '/srv/wikipedia'
 
 start = '== %s ==' % datetime.now().isoformat()
 print(start, file=sys.stdout)
@@ -33,7 +33,7 @@
 
 # Create the output directory
 run_slug = 'master-%s' % datetime.now().isoformat()
-run_path = os.path.expanduser('~/public_html/runs/%s' % run_slug)
+run_path = '/srv/builds/public_html/runs/%s' % run_slug
 sh.mkdir('-p', run_path)
 
 meta['commits'] = str(sh.git('rev-list', 'HEAD..origin/master', 
'--oneline')).split('\n')
@@ -50,14 +50,15 @@
 gradle = sh.Command('./gradlew')
 gradle('-q', 'clean', 'assembleAlphaDebug', _env=env)
 
-sh.cp(sh.glob('wikipedia/build/outputs/apk/wikipedia-2.0-alpha-*.apk'), 
run_path)
+
sh.cp(sh.glob('/srv/wikipedia/build/outputs/apk/wikipedia-alpha-debug.apk'),
+  os.path.join(run_path, 'wikipedia.apk'))
 
 print('Finished build, output at %s' % run_path, file=sys.stdout)
 
 meta['completed_on'] = datetime.now().isoformat()
 json.dump(meta, open(os.path.join(run_path, 'meta.json'), 'w'))
 
-latest_path = os.path.expanduser('~/public_html/runs/latest')
+latest_path = '/srv/builds/public_html/runs/latest'
 sh.rm('-f', latest_path)
 sh.ln('-s', run_path, latest_path)
 else:

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4020af5e05e9b15ca22b2fe25bf6bf3b65c306fd
Gerrit-PatchSet: 1
Gerrit-Project: labs/tools/wikipedia-android-builds
Gerrit-Branch: master
Gerrit-Owner: Yuvipanda yuvipa...@gmail.com

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


[MediaWiki-commits] [Gerrit] Labs: more tweaks to gridengine puppetization - change (operations/puppet)

2014-10-17 Thread coren (Code Review)
coren has uploaded a new change for review.

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

Change subject: Labs: more tweaks to gridengine puppetization
..

Labs: more tweaks to gridengine puppetization

Change-Id: I919a9289653e60df6714a20fe7bbce9003341df6
---
M modules/gridengine/files/runpurge
M modules/toollabs/manifests/hostgroup.pp
M modules/toollabs/manifests/master.pp
3 files changed, 3 insertions(+), 3 deletions(-)


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

diff --git a/modules/gridengine/files/runpurge 
b/modules/gridengine/files/runpurge
index 4f375c7..be0db9a 100755
--- a/modules/gridengine/files/runpurge
+++ b/modules/gridengine/files/runpurge
@@ -13,7 +13,7 @@
 cd $1 || exit 1
 
 for f in *; do
-  if [ ! -f $2/$f ]; then
+  if [ -f $f -a ! -f $2/$f ]; then
 /bin/bash $f  /bin/rm $f
   fi
 done
diff --git a/modules/toollabs/manifests/hostgroup.pp 
b/modules/toollabs/manifests/hostgroup.pp
index 61fef9a..9b6498c 100644
--- a/modules/toollabs/manifests/hostgroup.pp
+++ b/modules/toollabs/manifests/hostgroup.pp
@@ -25,7 +25,7 @@
 owner   = 'root',
 group   = 'root',
 mode= '0444',
-content = inline_template('% @groups.each do |g| -%%= g %% 
end -%'),
+content = inline_template(% @groups.each do |g| -%%= g %\n% 
end -%),
 }
 }
 
diff --git a/modules/toollabs/manifests/master.pp 
b/modules/toollabs/manifests/master.pp
index 51e827a..75d7fac 100644
--- a/modules/toollabs/manifests/master.pp
+++ b/modules/toollabs/manifests/master.pp
@@ -25,7 +25,7 @@
 owner= 'root',
 group= 'root',
 mode = '0755',
-source   = 'puppet:///modules/gridengine/gethgrp',
+source   = 'puppet:///modules/toollabs/gethgrp',
 }
 
 toollabs::hostgroup::collector { 'general': }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I919a9289653e60df6714a20fe7bbce9003341df6
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: coren mpellet...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Labs: more tweaks to the gridengine class - change (operations/puppet)

2014-10-17 Thread coren (Code Review)
coren has uploaded a new change for review.

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

Change subject: Labs: more tweaks to the gridengine class
..

Labs: more tweaks to the gridengine class

sourceselect = all keeps getting confused.  Be more verbose, but
more explicit.

Change-Id: I181357b3fd446038c40330f26c44a2995783d0d7
---
M modules/gridengine/manifests/master.pp
M modules/toollabs/manifests/hostgroup.pp
2 files changed, 33 insertions(+), 13 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/09/167209/1

diff --git a/modules/gridengine/manifests/master.pp 
b/modules/gridengine/manifests/master.pp
index db84341..c464f30 100644
--- a/modules/gridengine/manifests/master.pp
+++ b/modules/gridengine/manifests/master.pp
@@ -34,18 +34,38 @@
 purge   = true,
 }
 
-file { $etcdir/bin/:
-ensure   = directory,
-force= true,
-owner= 'root',
-group= 'root',
-mode = '0755',
-recurse  = true,
-purge= true,
-sourceselect = all,
-source   = [ 'puppet:///modules/gridengine/mergeconf',
-  'puppet:///modules/gridengine/trackpurge',
-  'puppet:///modules/gridengine/runpurge' ],
+file { $etcdir/bin:
+ensure  = directory,
+force   = true,
+owner   = 'root',
+group   = 'root',
+mode= '0755',
+recurse = true,
+purge   = true,
+}
+
+file { $etcdir/bin/mergeconf:
+ensure  = file,
+owner   = 'root',
+group   = 'root',
+mode= '0555',
+source  = 'puppet:///modules/gridengine/mergeconf',
+}
+
+file { $etcdir/bin/trackpurge:
+ensure  = file,
+owner   = 'root',
+group   = 'root',
+mode= '0555',
+source  = 'puppet:///modules/gridengine/trackpurge',
+}
+
+file { $etcdir/bin/runpurge:
+ensure  = file,
+owner   = 'root',
+group   = 'root',
+mode= '0555',
+source  = 'puppet:///modules/gridengine/runpurge',
 }
 
 gridengine::resourcedir { 'queues': }
diff --git a/modules/toollabs/manifests/hostgroup.pp 
b/modules/toollabs/manifests/hostgroup.pp
index c7bdc27..61fef9a 100644
--- a/modules/toollabs/manifests/hostgroup.pp
+++ b/modules/toollabs/manifests/hostgroup.pp
@@ -25,7 +25,7 @@
 owner   = 'root',
 group   = 'root',
 mode= '0444',
-content = inline_template('% @groups.each {|g| print #{g}\n } 
-%'),
+content = inline_template('% @groups.each do |g| -%%= g %% 
end -%'),
 }
 }
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I181357b3fd446038c40330f26c44a2995783d0d7
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: coren mpellet...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Enable mobile redirect for old Wikisource (http://wikisource... - change (operations/puppet)

2014-10-17 Thread Faidon Liambotis (Code Review)
Faidon Liambotis has submitted this change and it was merged.

Change subject: Enable mobile redirect for old Wikisource 
(http://wikisource.org)
..


Enable mobile redirect for old Wikisource (http://wikisource.org)

Bug: 69765
Change-Id: I0e75d871af87313e2970a8a955d98efbc0551076
---
M templates/varnish/mobile-frontend.inc.vcl.erb
M templates/varnish/text-frontend.inc.vcl.erb
2 files changed, 5 insertions(+), 4 deletions(-)

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



diff --git a/templates/varnish/mobile-frontend.inc.vcl.erb 
b/templates/varnish/mobile-frontend.inc.vcl.erb
index 9c58309..ee81201 100644
--- a/templates/varnish/mobile-frontend.inc.vcl.erb
+++ b/templates/varnish/mobile-frontend.inc.vcl.erb
@@ -50,7 +50,7 @@
} else {
set req.http.X-Subdomain = M;
}
-   
+
if (req.http.host ~ ^([a-zA-Z0-9-]+\.)?(m|zero)\.wikipedia\.) 
{
call tag_carrier;
}
@@ -61,6 +61,8 @@
set req.http.host = www.mediawiki.org;
} else if (req.http.host == m.wikimediafoundation.org) {
set req.http.host = wikimediafoundation.org;
+   } else if (req.http.host == m.wikisource.org) {
+   set req.http.host = wikisource.org;
} else {
 
/* Replace language.(m|zero).project.org by 
language.project.org */
@@ -201,4 +203,3 @@
 }
 % end -%
 }
-
diff --git a/templates/varnish/text-frontend.inc.vcl.erb 
b/templates/varnish/text-frontend.inc.vcl.erb
index 5d65343..ff75690 100644
--- a/templates/varnish/text-frontend.inc.vcl.erb
+++ b/templates/varnish/text-frontend.inc.vcl.erb
@@ -63,9 +63,9 @@
# if host ~/regsub matches for efficiency. Be careful to not
# write overlapping/chaining regexps.
set req.http.MobileHost = req.http.Host;
-   set req.http.MobileHost = regsub(req.http.MobileHost, 
^(www\.)?(mediawiki|wikimediafoundation)\., m.\2.);
+   set req.http.MobileHost = regsub(req.http.MobileHost, 
^(www\.)?(mediawiki|wikimediafoundation|wikisource)\., m.\2.);
set req.http.MobileHost = regsub(req.http.MobileHost, 
^(commons|incubator|legalteam|meta|office|outreach|pl|species|strategy|wikimania201[2-5])\.(wikimedia)\.,
 \1.m.\2.);
-   set req.http.MobileHost = regsub(req.http.MobileHost, 
^((?!commons|meta|nostalgia|quote|quality|sep11|sources|species|textbook)\w+)\.(wikipedia|wiktionary|wikinews|wikisource|wikiquote|wikibooks|wikiversity|wikivoyage)\.,
 \1.m.\2.);
+   set req.http.MobileHost = regsub(req.http.MobileHost, 
^((?!commons|meta|nostalgia|quote|quality|sep11|sources|species|textbook|m)\w+)\.(wikipedia|wiktionary|wikinews|wikisource|wikiquote|wikibooks|wikiversity|wikivoyage)\.,
 \1.m.\2.);
 
if (req.http.Host != req.http.MobileHost) {
if (req.http.X-Forwarded-Proto) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0e75d871af87313e2970a8a955d98efbc0551076
Gerrit-PatchSet: 6
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: MaxSem maxsem.w...@gmail.com
Gerrit-Reviewer: BBlack bbl...@wikimedia.org
Gerrit-Reviewer: Faidon Liambotis fai...@wikimedia.org
Gerrit-Reviewer: Mark Bergsma m...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Labs: more tweaks to gridengine puppetization - change (operations/puppet)

2014-10-17 Thread coren (Code Review)
coren has submitted this change and it was merged.

Change subject: Labs: more tweaks to gridengine puppetization
..


Labs: more tweaks to gridengine puppetization

Change-Id: I919a9289653e60df6714a20fe7bbce9003341df6
---
M modules/gridengine/files/runpurge
M modules/toollabs/manifests/hostgroup.pp
M modules/toollabs/manifests/master.pp
3 files changed, 3 insertions(+), 3 deletions(-)

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



diff --git a/modules/gridengine/files/runpurge 
b/modules/gridengine/files/runpurge
index 4f375c7..be0db9a 100755
--- a/modules/gridengine/files/runpurge
+++ b/modules/gridengine/files/runpurge
@@ -13,7 +13,7 @@
 cd $1 || exit 1
 
 for f in *; do
-  if [ ! -f $2/$f ]; then
+  if [ -f $f -a ! -f $2/$f ]; then
 /bin/bash $f  /bin/rm $f
   fi
 done
diff --git a/modules/toollabs/manifests/hostgroup.pp 
b/modules/toollabs/manifests/hostgroup.pp
index 61fef9a..9b6498c 100644
--- a/modules/toollabs/manifests/hostgroup.pp
+++ b/modules/toollabs/manifests/hostgroup.pp
@@ -25,7 +25,7 @@
 owner   = 'root',
 group   = 'root',
 mode= '0444',
-content = inline_template('% @groups.each do |g| -%%= g %% 
end -%'),
+content = inline_template(% @groups.each do |g| -%%= g %\n% 
end -%),
 }
 }
 
diff --git a/modules/toollabs/manifests/master.pp 
b/modules/toollabs/manifests/master.pp
index 51e827a..75d7fac 100644
--- a/modules/toollabs/manifests/master.pp
+++ b/modules/toollabs/manifests/master.pp
@@ -25,7 +25,7 @@
 owner= 'root',
 group= 'root',
 mode = '0755',
-source   = 'puppet:///modules/gridengine/gethgrp',
+source   = 'puppet:///modules/toollabs/gethgrp',
 }
 
 toollabs::hostgroup::collector { 'general': }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I919a9289653e60df6714a20fe7bbce9003341df6
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: coren mpellet...@wikimedia.org
Gerrit-Reviewer: coren mpellet...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Labs: more tweaks to the gridengine class - change (operations/puppet)

2014-10-17 Thread coren (Code Review)
coren has submitted this change and it was merged.

Change subject: Labs: more tweaks to the gridengine class
..


Labs: more tweaks to the gridengine class

sourceselect = all keeps getting confused.  Be more verbose, but
more explicit.

Change-Id: I181357b3fd446038c40330f26c44a2995783d0d7
---
M modules/gridengine/manifests/master.pp
M modules/toollabs/manifests/hostgroup.pp
2 files changed, 33 insertions(+), 13 deletions(-)

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



diff --git a/modules/gridengine/manifests/master.pp 
b/modules/gridengine/manifests/master.pp
index db84341..c464f30 100644
--- a/modules/gridengine/manifests/master.pp
+++ b/modules/gridengine/manifests/master.pp
@@ -34,18 +34,38 @@
 purge   = true,
 }
 
-file { $etcdir/bin/:
-ensure   = directory,
-force= true,
-owner= 'root',
-group= 'root',
-mode = '0755',
-recurse  = true,
-purge= true,
-sourceselect = all,
-source   = [ 'puppet:///modules/gridengine/mergeconf',
-  'puppet:///modules/gridengine/trackpurge',
-  'puppet:///modules/gridengine/runpurge' ],
+file { $etcdir/bin:
+ensure  = directory,
+force   = true,
+owner   = 'root',
+group   = 'root',
+mode= '0755',
+recurse = true,
+purge   = true,
+}
+
+file { $etcdir/bin/mergeconf:
+ensure  = file,
+owner   = 'root',
+group   = 'root',
+mode= '0555',
+source  = 'puppet:///modules/gridengine/mergeconf',
+}
+
+file { $etcdir/bin/trackpurge:
+ensure  = file,
+owner   = 'root',
+group   = 'root',
+mode= '0555',
+source  = 'puppet:///modules/gridengine/trackpurge',
+}
+
+file { $etcdir/bin/runpurge:
+ensure  = file,
+owner   = 'root',
+group   = 'root',
+mode= '0555',
+source  = 'puppet:///modules/gridengine/runpurge',
 }
 
 gridengine::resourcedir { 'queues': }
diff --git a/modules/toollabs/manifests/hostgroup.pp 
b/modules/toollabs/manifests/hostgroup.pp
index c7bdc27..61fef9a 100644
--- a/modules/toollabs/manifests/hostgroup.pp
+++ b/modules/toollabs/manifests/hostgroup.pp
@@ -25,7 +25,7 @@
 owner   = 'root',
 group   = 'root',
 mode= '0444',
-content = inline_template('% @groups.each {|g| print #{g}\n } 
-%'),
+content = inline_template('% @groups.each do |g| -%%= g %% 
end -%'),
 }
 }
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I181357b3fd446038c40330f26c44a2995783d0d7
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: coren mpellet...@wikimedia.org
Gerrit-Reviewer: coren mpellet...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] WIP testing rubocop - change (mediawiki...api)

2014-10-17 Thread Zfilipin (Code Review)
Zfilipin has uploaded a new change for review.

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

Change subject: WIP testing rubocop
..

WIP testing rubocop

Change-Id: I28cbac10e10259600af8ee294e6052ac48ab1206
---
M lib/mediawiki_api.rb
1 file changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/ruby/api 
refs/changes/10/167210/1

diff --git a/lib/mediawiki_api.rb b/lib/mediawiki_api.rb
index 8d53053..ea08d90 100644
--- a/lib/mediawiki_api.rb
+++ b/lib/mediawiki_api.rb
@@ -1 +1,3 @@
 require mediawiki_api/client
+# testing rubocop
+

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I28cbac10e10259600af8ee294e6052ac48ab1206
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/ruby/api
Gerrit-Branch: master
Gerrit-Owner: Zfilipin zfili...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] WIP: RESTBase puppet module - change (operations/puppet)

2014-10-17 Thread GWicke (Code Review)
GWicke has uploaded a new change for review.

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

Change subject: WIP: RESTBase puppet module
..

WIP: RESTBase puppet module

Change-Id: I2b83590ee432871078a861425e0d0b1fed0440d1
---
A modules/restbase/manifests/init.pp
A modules/restbase/templates/config.yaml.erb
A modules/restbase/templates/restbase.default.erb
A modules/restbase/templates/restbase.init
A modules/restbase/tests/Makefile
A modules/restbase/tests/citoid.pp
6 files changed, 302 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/13/167213/1

diff --git a/modules/restbase/manifests/init.pp 
b/modules/restbase/manifests/init.pp
new file mode 100644
index 000..6be53b3
--- /dev/null
+++ b/modules/restbase/manifests/init.pp
@@ -0,0 +1,83 @@
+# == Class: restbase
+#
+# restbase is a REST API  storage service
+#
+# === Parameters
+#
+# [*port*]
+#   Port where to run the restbase service. Defaults to 7231.
+#
+class restbase( $port = 7231 ) {
+ensure_packages( ['nodejs', 'npm'] )
+
+package { 'restbase/deploy':
+provider = 'trebuchet',
+}
+
+group { 'restbase':
+ensure = present,
+name   = 'restbase',
+system = true,
+}
+
+user { 'restbase':
+gid= 'restbase',
+home   = '/nonexistent',
+shell  = '/bin/false',
+system = true,
+before = Service['restbase'],
+}
+
+file { '/var/log/restbase':
+ensure = directory,
+owner  = 'restbase',
+group  = 'restbase',
+mode   = '0775',
+before = Service['restbase'],
+}
+
+file { '/etc/default/restbase':
+content = template('restbase/restbase.default.erb'),
+owner   = 'root',
+group   = 'root',
+mode= '0444',
+notify  = Service['restbase'],
+}
+
+file { '/etc/init.d/restbase':
+content = template('restbase/restbase.init'),
+owner   = 'root',
+group   = 'root',
+mode= '0444',
+notify  = Service['restbase'],
+}
+
+file { '/etc/restbase':
+ensure = directory,
+owner  = 'restbase',
+group  = 'restbase',
+mode   = '0775',
+before = Service['restbase'],
+}
+
+file { '/etc/restbase/config.yaml':
+content = template('restbase/config.yaml.erb'),
+owner   = 'root',
+group   = 'root',
+mode= '0444',
+notify  = Service['restbase'],
+}
+
+file { '/usr/lib/parsoid':
+ensure = link,
+target = '/srv/deployment/restbase',
+before  = Service['restbase'],
+}
+
+service { 'restbase':
+ensure = running,
+hasstatus  = true,
+hasrestart = true,
+provider   = 'init',
+}
+}
diff --git a/modules/restbase/templates/config.yaml.erb 
b/modules/restbase/templates/config.yaml.erb
new file mode 100644
index 000..d75bf23
--- /dev/null
+++ b/modules/restbase/templates/config.yaml.erb
@@ -0,0 +1,10 @@
+# RESTBase config
+
+logging:
+- name: main
+  streams:
+  # XXX: Use gelf-stream - logstash
+  - type: rotating-file
+path: /var/log/restbase/main.log
+period: 1d  # daily rotation
+count: 7# back copies
diff --git a/modules/restbase/templates/restbase.default.erb 
b/modules/restbase/templates/restbase.default.erb
new file mode 100644
index 000..d5e29f7
--- /dev/null
+++ b/modules/restbase/templates/restbase.default.erb
@@ -0,0 +1,10 @@
+# Defaults for restbase initscript
+
+SETTINGS_FILE=/etc/restbase/config.yaml
+
+PORT=%= @port %
+
+# Default is to listen on all interfaces
+#INTERFACE=0.0.0.0
+
+DAEMON_ARGS=-c $SETTINGS_FILE
diff --git a/modules/restbase/templates/restbase.init 
b/modules/restbase/templates/restbase.init
new file mode 100644
index 000..b81bb03
--- /dev/null
+++ b/modules/restbase/templates/restbase.init
@@ -0,0 +1,183 @@
+#!/bin/sh
+### BEGIN INIT INFO
+# Provides:  restbase
+# Required-Start:$local_fs $network $remote_fs $syslog
+# Required-Stop: $local_fs $network $remote_fs $syslog
+# Default-Start: 2 3 4 5
+# Default-Stop:  0 1 6
+# Short-Description: REST storage API and backend orchestration layer
+# Description:   Distributed storage service with REST API  backend
+#service orchestration layer.
+### END INIT INFO
+
+# Author: Gabriel Wicke gwi...@wikimedia.org
+
+# Do NOT set -e
+
+# PATH should only include /usr/* if it runs after the mountnfs.sh script
+PATH=/sbin:/usr/sbin:/bin:/usr/bin
+DESC=RESTBase HTTP service
+NAME=restbase
+SCRIPT_PATH=/usr/lib/restbase/server.js
+DAEMON=/usr/bin/nodejs $SCRIPT_PATH
+DAEMON_ARGS=
+PIDFILE=/var/run/$NAME.pid
+SCRIPTNAME=/etc/init.d/$NAME
+
+# Exit if the package is not installed
+[ -e $SCRIPT_PATH ] || exit 0
+
+# Read configuration variable file if it is present
+[ -r /etc/default/$NAME ]  . /etc/default/$NAME
+
+# 

[MediaWiki-commits] [Gerrit] ZeroPortal has browser tests - change (mediawiki/selenium)

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

Change subject: ZeroPortal has browser tests
..


ZeroPortal has browser tests

Change-Id: I154d613aec1435238889adb33859c4e6500f4db3
---
M README.md
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/README.md b/README.md
index 9fa6732..ae36610 100644
--- a/README.md
+++ b/README.md
@@ -162,6 +162,7 @@
 1. WikidataBrowserTests: 
[GitHub](https://github.com/wmde/WikidataBrowserTests), [Code 
Climate](https://codeclimate.com/github/wmde/WikidataBrowserTests), 
[Jenkins](http://wdjenkins.wmflabs.org/ci/)
 1. WikiLove: 
[Gerrit](https://gerrit.wikimedia.org/r/#/admin/projects/mediawiki/extensions/WikiLove),
 [GitHub](https://github.com/wikimedia/mediawiki-extensions-WikiLove), [Code 
Climate](https://codeclimate.com/github/wikimedia/mediawiki-extensions-WikiLove)
 1. ZeroBanner: 
[Gerrit](https://gerrit.wikimedia.org/r/#/admin/projects/mediawiki/extensions/ZeroBanner),
 [GitHub](https://github.com/wikimedia/mediawiki-extensions-ZeroBanner), [Code 
Climate](https://codeclimate.com/github/wikimedia/mediawiki-extensions-ZeroBanner)
+1. ZeroPortal: 
[Gerrit](https://gerrit.wikimedia.org/r/#/admin/projects/mediawiki/extensions/ZeroPortal),
 [GitHub](https://github.com/wikimedia/mediawiki-extensions-ZeroPortal), [Code 
Climate](https://codeclimate.com/github/wikimedia/mediawiki-extensions-ZeroPortal)
 
 ### Alumni
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I154d613aec1435238889adb33859c4e6500f4db3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/selenium
Gerrit-Branch: master
Gerrit-Owner: Zfilipin zfili...@wikimedia.org
Gerrit-Reviewer: Cmcmahon cmcma...@wikimedia.org
Gerrit-Reviewer: Dduvall dduv...@wikimedia.org
Gerrit-Reviewer: Dr0ptp4kt ab...@wikimedia.org
Gerrit-Reviewer: Hashar has...@free.fr
Gerrit-Reviewer: Manybubbles never...@wikimedia.org
Gerrit-Reviewer: Zfilipin zfili...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Disable SSLv3 completely - change (operations/puppet)

2014-10-17 Thread BBlack (Code Review)
BBlack has submitted this change and it was merged.

Change subject: Disable SSLv3 completely
..


Disable SSLv3 completely

This removes the recently-added compatnossl and upgrades
compat to that standard for all sites.  (this includes
switching gerrit + bugzilla back from compatnossl).

Change-Id: I17d41e7208051cf8501b354a0f254f1669c0059a
---
M manifests/gerrit.pp
M modules/bugzilla/manifests/apache.pp
M modules/wmflib/lib/puppet/parser/functions/ssl_ciphersuite.rb
3 files changed, 2 insertions(+), 8 deletions(-)

Approvals:
  JanZerebecki: Looks good to me, but someone else must approve
  BBlack: Verified; Looks good to me, approved



diff --git a/manifests/gerrit.pp b/manifests/gerrit.pp
index f5d536d..58e2ce3 100644
--- a/manifests/gerrit.pp
+++ b/manifests/gerrit.pp
@@ -26,7 +26,7 @@
 $dbuser = $db_user
 $dbpass = $passwords::gerrit::gerrit_db_pass
 $bzpass = $passwords::gerrit::gerrit_bz_pass
-$ssl_settings = ssl_ciphersuite('apache-2.2', 'compatnossl', '365')
+$ssl_settings = ssl_ciphersuite('apache-2.2', 'compat', '365')
 
 # Setup LDAP
 include ldap::role::config::labs
diff --git a/modules/bugzilla/manifests/apache.pp 
b/modules/bugzilla/manifests/apache.pp
index c77c0a8..0da900d 100644
--- a/modules/bugzilla/manifests/apache.pp
+++ b/modules/bugzilla/manifests/apache.pp
@@ -11,7 +11,7 @@
 install_certificate{ $svc_name: }
 install_certificate{ $attach_svc_name: }
 
-$ssl_settings = ssl_ciphersuite('apache-2.2', 'compatnossl', '365')
+$ssl_settings = ssl_ciphersuite('apache-2.2', 'compat', '365')
 
 # this includes them both, 80 and 443
 apache::site { 'bugzilla.wikimedia.org':
diff --git a/modules/wmflib/lib/puppet/parser/functions/ssl_ciphersuite.rb 
b/modules/wmflib/lib/puppet/parser/functions/ssl_ciphersuite.rb
index a3c0df7..26d0bf7 100644
--- a/modules/wmflib/lib/puppet/parser/functions/ssl_ciphersuite.rb
+++ b/modules/wmflib/lib/puppet/parser/functions/ssl_ciphersuite.rb
@@ -48,7 +48,6 @@
 module Puppet::Parser::Functions
   ciphersuites = {
 'compat' = 
'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:ECDHE-RSA-RC4-SHA:ECDHE-ECDSA-RC4-SHA:AES128:AES256:RC4-SHA:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!3DES:!MD5:!PSK:!DH',
-'compatnossl' = 
'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:ECDHE-RSA-RC4-SHA:ECDHE-ECDSA-RC4-SHA:AES128:AES256:RC4-SHA:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!3DES:!MD5:!PSK:!DH',
 'strong' = 
'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!3DES:!MD5:!PSK:!DH'
   }
   newfunction(
@@ -66,7 +65,6 @@
 
ssl_ciphersuite('apache-2.4', 'compat') # Compatible config for apache 2.4
ssl_ciphersuite('nginx', 'strong', '365') # PFS-only, use HSTS for 365 days
-   ssl_ciphersuite('apache-2.2', 'compatnossl') # Compatible config for apache 
2.2 but don't allow SSL3
 END
   ) do |args|
 
@@ -113,8 +111,6 @@
   when 'strong' then
 output.push('SSLProtocol all -SSLv2 -SSLv3 -TLSv1')
   when 'compat' then
-output.push('SSLProtocol all -SSLv2')
-  when 'compatnossl' then
 output.push('SSLProtocol all -SSLv2 -SSLv3')
   end
   output.push(SSLCipherSuite #{cipherlist})
@@ -129,8 +125,6 @@
   when 'strong' then
 output.push('ssl_protocols TLSv1.1 TLSv1.2;')
   when 'compat' then
-output.push('ssl_protocols SSLv3 TLSv1 TLSv1.1 TLSv1.2;')
-  when 'compatnossl' then
 output.push('ssl_protocols TLSv1 TLSv1.1 TLSv1.2;')
   end
   output.push(ssl_ciphers #{cipherlist};)

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I17d41e7208051cf8501b354a0f254f1669c0059a
Gerrit-PatchSet: 4
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: BBlack bbl...@wikimedia.org
Gerrit-Reviewer: BBlack bbl...@wikimedia.org
Gerrit-Reviewer: Dzahn dz...@wikimedia.org
Gerrit-Reviewer: Faidon Liambotis fai...@wikimedia.org
Gerrit-Reviewer: JanZerebecki jan.wikime...@zerebecki.de
Gerrit-Reviewer: Mark 

[MediaWiki-commits] [Gerrit] Default to all namespaces for edits and pages - change (analytics/wikimetrics)

2014-10-17 Thread Milimetric (Code Review)
Milimetric has uploaded a new change for review.

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

Change subject: Default to all namespaces for edits and pages
..

Default to all namespaces for edits and pages

Changes the default metric parameters for PagesCreated and
NamespaceEdits to look at all namespaces.  Deployment of this will be
combined with a thorough announcement to the wikimetrics list, as the
change will cause most numbers to increase unless people manually enter
the previous default, of only looking at namespace zero.

Change-Id: Ia7192f8c6cbafb2196084281bbc8dd863c16eecd
---
M wikimetrics/metrics/namespace_edits.py
M wikimetrics/metrics/pages_created.py
2 files changed, 0 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/analytics/wikimetrics 
refs/changes/14/167214/1

diff --git a/wikimetrics/metrics/namespace_edits.py 
b/wikimetrics/metrics/namespace_edits.py
index 58651a4..04c268e 100644
--- a/wikimetrics/metrics/namespace_edits.py
+++ b/wikimetrics/metrics/namespace_edits.py
@@ -57,7 +57,6 @@
 )
 namespaces = CommaSeparatedIntegerListField(
 None,
-default='0',
 description='0, 2, 4, etc. (leave blank for *all*)',
 )
 
diff --git a/wikimetrics/metrics/pages_created.py 
b/wikimetrics/metrics/pages_created.py
index c417157..1f93f39 100644
--- a/wikimetrics/metrics/pages_created.py
+++ b/wikimetrics/metrics/pages_created.py
@@ -43,7 +43,6 @@
 )
 namespaces = CommaSeparatedIntegerListField(
 None,
-default='0',
 description='0, 2, 4, etc. (leave blank for *all*)',
 )
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia7192f8c6cbafb2196084281bbc8dd863c16eecd
Gerrit-PatchSet: 1
Gerrit-Project: analytics/wikimetrics
Gerrit-Branch: master
Gerrit-Owner: Milimetric dandree...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Re-add .jshintignore - change (mediawiki...Wikibase)

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

Change subject: Re-add .jshintignore
..


Re-add .jshintignore

We need to have an empty .jshintignore, otherwise MediaWiki's is used which
ignores everything in extensions/.

Change-Id: I828dae1d24ef6c047d68bfcf1752f528bb73bac6
---
A .jshintignore
1 file changed, 0 insertions(+), 0 deletions(-)

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



diff --git a/.jshintignore b/.jshintignore
new file mode 100644
index 000..e69de29
--- /dev/null
+++ b/.jshintignore

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I828dae1d24ef6c047d68bfcf1752f528bb73bac6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Adrian Lang adrian.l...@wikimedia.de
Gerrit-Reviewer: Henning Snater henning.sna...@wikimedia.de
Gerrit-Reviewer: JanZerebecki jan.wikime...@zerebecki.de
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Categories: Refactor for sorting - change (mediawiki...ContentTranslation)

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

Change subject: Categories: Refactor for sorting
..


Categories: Refactor for sorting

* Simplifies and abstracts out generation of category ids.
  Pads ids for proper sorting.
  Ids now have the more compact format of ###.
  Id generation logic put in separate function.

* Puts sorting of adapted categories into deferred.then callback

Bug: 6
Change-Id: I5f42305d85bd5c8e4bdf4d5b2c67b215a6c145ff
---
M modules/tools/ext.cx.tools.categories.js
1 file changed, 76 insertions(+), 49 deletions(-)

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



diff --git a/modules/tools/ext.cx.tools.categories.js 
b/modules/tools/ext.cx.tools.categories.js
index 226a5cf..e68baf2 100644
--- a/modules/tools/ext.cx.tools.categories.js
+++ b/modules/tools/ext.cx.tools.categories.js
@@ -14,7 +14,7 @@
/**
 * Handles the jump between category counter and listing
 *
-* @param {Event} e the click event
+* @param {Event} e The click event
 * @return {boolean} false
 */
function jump( e ) {
@@ -29,8 +29,8 @@
/**
 * CXCategoryCounter Class
 * @class
-* @param {string} language the language for the counter
-* @param {CXCategoryTool} categoryTool the CXCategoryTool
+* @param {string} language The language for the counter
+* @param {CXCategoryTool} categoryTool The CXCategoryTool
 */
function CXCategoryCounter( language, categoryTool ) {
this.language = language;
@@ -97,7 +97,7 @@
/**
 * Updates the count shown in the category counter
 *
-* @param {integer} count the category count
+* @param {integer} count The category count
 */
CXCategoryCounter.prototype.update = function ( count ) {
var text;
@@ -109,8 +109,8 @@
/**
 * CXCategoryListing Class
 * @class
-* @param {string} language the language for the counter
-* @param {CXCategoryTool} categoryTool the CXCategoryTool
+* @param {string} language The language for the counter
+* @param {CXCategoryTool} categoryTool The CXCategoryTool
 */
function CXCategoryListing( language, categoryTool ) {
this.language = language;
@@ -141,7 +141,7 @@
/**
 * Handles click events on source list items
 *
-* @param {Event} e the click event
+* @param {Event} e The click event
 */
function sourceClickHandler( e ) {
var $listItem, categoryId, categoryTool, title, count;
@@ -168,7 +168,7 @@
/**
 * Handles click events on the remove span inside target list items
 *
-* @param {Event} e the click event
+* @param {Event} e The click event
 */
function targetClickHandler( e ) {
var $remove, $listItem, categoryId, categoryTool, count;
@@ -259,8 +259,8 @@
/**
 * Adds categories to the category listing
 *
-* @param {object} categories key value object with ids and titles
-* @param {boolean} clear flag to clear existing categories
+* @param {object} categories A key value object with ids and titles
+* @param {boolean} clear A flag to clear existing categories
 */
CXCategoryListing.prototype.addCategories = function ( categories, 
clear ) {
var category, $categoryList;
@@ -284,8 +284,8 @@
/**
 * Creates a source category list item
 *
-* @param {string} id the category id
-* @param {string} title the category title
+* @param {string} id The category id
+* @param {string} title The category title
 * @return {jQuery}
 */
function createSourceCategoryListItem( id, title ) {
@@ -303,8 +303,8 @@
/**
 * Creates a target category list item
 *
-* @param {string} id the category id
-* @param {string} title the category title
+* @param {string} id The category id
+* @param {string} title The category title
 * @return {jQuery}
 */
function createTargetCategoryListItem( id, title ) {
@@ -327,8 +327,8 @@
/**
 * Ads a category to the category list
 *
-* @param {string} id the category id
-* @param {string} title the category title
+* @param {string} id The category id
+* @param {string} title The category title
 */
CXCategoryListing.prototype.addCategory = function ( id, title ) {
var $categoryList, $categoryListItem;
@@ -363,14 +363,33 @@
}
 
/**
+* Creates id of specified width from number using the padding character
+  

[MediaWiki-commits] [Gerrit] Categories: Change message when no categories - change (mediawiki...ContentTranslation)

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

Change subject: Categories: Change message when no categories
..


Categories: Change message when no categories

* When there are no source categories, no widgets are displayed
  in either the source or the translation column.
* When there are source categories but no categories can be adapted,
  the message No categories is displayed in both the counter and
  listing widgets in the translation column.
* Small css change to make disabled source categories more visible

Bug: 6
Change-Id: Ie848eb79463841b9f3161bba1ae00b7ab3b1a9ed
---
M i18n/en.json
M modules/tools/ext.cx.tools.categories.js
M modules/tools/styles/ext.cx.tools.categories.less
3 files changed, 82 insertions(+), 19 deletions(-)

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



diff --git a/i18n/en.json b/i18n/en.json
index 0f83e65..5e8e0d2 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -61,7 +61,7 @@
cx-tools-mt-provider-title: From $1,
cx-tools-mt-not-available: Not available for $1,
cx-tools-mt-dont-use: Don't use machine translation,
-   cx-tools-categories-count-message: {{PLURAL:$1|$1 category|$1 
categories}},
+   cx-tools-categories-count-message: {{PLURAL:$1|$1 category|$1 
categories|0=No categories}},
cx-stats-title: Content translation statistics,
cx-stats-page-title: Page,
cx-stats-from: Source language,
diff --git a/modules/tools/ext.cx.tools.categories.js 
b/modules/tools/ext.cx.tools.categories.js
index e68baf2..778c031 100644
--- a/modules/tools/ext.cx.tools.categories.js
+++ b/modules/tools/ext.cx.tools.categories.js
@@ -126,15 +126,47 @@
this.$view = this.getView();
 
if ( this.language === mw.cx.sourceLanguage 
-   this.categoryTool.categories.source !== null 
-   Object.keys( this.categoryTool.categories.source 
).length  0
+   this.categoryTool.categories.source !== null
) {
-   this.addCategories( this.categoryTool.categories.source 
);
+   if ( Object.keys( this.categoryTool.categories.source 
).length  0 ) {
+   this.addCategories( 
this.categoryTool.categories.source );
+   this.$view
+   .find( '.cx-category-categorylist' )
+   .show()
+   .end()
+   .find( '.cx-category-nocategories' )
+   .hide()
+   .end();
+   } else {
+   this.$view
+   .find( '.cx-category-categorylist' )
+   .hide()
+   .end()
+   .find( '.cx-category-nocategories' )
+   .show()
+   .end();
+   }
} else if ( this.language === mw.cx.targetLanguage 
-   this.categoryTool.categories.target !== null 
-   Object.keys( this.categoryTool.categories.target 
).length  0
+   this.categoryTool.categories.target !== null
) {
-   this.addCategories( this.categoryTool.categories.target 
);
+   if ( Object.keys( this.categoryTool.categories.target 
).length  0 ) {
+   this.addCategories( 
this.categoryTool.categories.target );
+   this.$view
+   .find( '.cx-category-categorylist' )
+   .show()
+   .end()
+   .find( '.cx-category-nocategories' )
+   .hide()
+   .end();
+   } else {
+   this.$view
+   .find( '.cx-category-categorylist' )
+   .hide()
+   .end()
+   .find( '.cx-category-nocategories' )
+   .show()
+   .end();
+   }
}
};
 
@@ -162,6 +194,13 @@
$( '.cx-category--translation[cx-category-id=' + 
categoryId + ']' )
.addClass( 'cx-category-highlight' );
categoryTool.widgets.target.counter.update( count );
+   categoryTool.widgets.target.listing.$view
+   

[MediaWiki-commits] [Gerrit] Fix contextChange events from annotations - change (VisualEditor/VisualEditor)

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

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

Change subject: Fix contextChange events from annotations
..

Fix contextChange events from annotations

contextChange should be emitted whenever the covered annotations
change, not just insertion annotations.

Bug: 72152

Change-Id: I6b680a7e6e2992764b59bfdce53ae99c3b5deb1d
---
M src/dm/ve.dm.Surface.js
M src/ui/ve.ui.DesktopContext.js
2 files changed, 10 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor 
refs/changes/17/167217/1

diff --git a/src/dm/ve.dm.Surface.js b/src/dm/ve.dm.Surface.js
index 3cb65c2..9a31ef7 100644
--- a/src/dm/ve.dm.Surface.js
+++ b/src/dm/ve.dm.Surface.js
@@ -31,6 +31,7 @@
this.undoIndex = 0;
this.historyTrackingInterval = null;
this.insertionAnnotations = new ve.dm.AnnotationSet( 
this.getDocument().getStore() );
+   this.coveredAnnotations = new ve.dm.AnnotationSet( 
this.getDocument().getStore() );
this.enabled = true;
this.transacting = false;
this.queueingContextChanges = false;
@@ -572,7 +573,7 @@
  */
 ve.dm.Surface.prototype.setSelection = function ( selection ) {
var left, right, leftAnnotations, rightAnnotations, 
insertionAnnotations,
-   startNode, selectedNode, range,
+   startNode, selectedNode, range, coveredAnnotations,
branchNodes = {},
oldSelection = this.selection,
oldBranchNodes = this.branchNodes,
@@ -603,6 +604,8 @@
branchNodes.start = this.getDocument().getBranchNodeFromOffset( 
range.start );
if ( !range.isCollapsed() ) {
branchNodes.end = 
this.getDocument().getBranchNodeFromOffset( range.end );
+   } else {
+   branchNodes.end = branchNodes.start;
}
// Update selected node
if ( !range.isCollapsed() ) {
@@ -623,10 +626,12 @@
if ( !linearData.isContentOffset( right ) ) {
right = -1;
}
+   coveredAnnotations = 
linearData.getAnnotationsFromOffset( range.start );
} else {
// Get annotations from the first character of the range
left = linearData.getNearestContentOffset( range.start 
);
right = linearData.getNearestContentOffset( range.end );
+   coveredAnnotations = 
linearData.getAnnotationsFromRange( range );
}
if ( left === -1 ) {
// No content offset to our left, use empty set
@@ -647,11 +652,11 @@
}
 
// Only emit an annotations change event if there's a 
meaningful difference
-   if (
-   !insertionAnnotations.containsAllOf( 
this.insertionAnnotations ) ||
-   !this.insertionAnnotations.containsAllOf( 
insertionAnnotations )
-   ) {
+   if ( !insertionAnnotations.compareTo( this.insertionAnnotations 
) ) {
this.setInsertionAnnotations( insertionAnnotations );
+   }
+   if ( !coveredAnnotations.compareTo( this.coveredAnnotations ) ) 
{
+   this.coveredAnnotations = coveredAnnotations;
contextChange = true;
}
}
diff --git a/src/ui/ve.ui.DesktopContext.js b/src/ui/ve.ui.DesktopContext.js
index b79e180..7cdef35 100644
--- a/src/ui/ve.ui.DesktopContext.js
+++ b/src/ui/ve.ui.DesktopContext.js
@@ -27,8 +27,6 @@
 
// Events
this.surface.getView().connect( this, {
-   selectionStart: 'onSuppress',
-   selectionEnd: 'onUnsuppress',
relocationStart: 'onSuppress',
relocationEnd: 'onUnsuppress',
blur: 'onSuppress',

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

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

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


[MediaWiki-commits] [Gerrit] Add lang and dir to category counters and lists - change (mediawiki...ContentTranslation)

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

Change subject: Add lang and dir to category counters and lists
..


Add lang and dir to category counters and lists

Change-Id: I7b7586ab9f8f58035fdc16bf308dfa14109c3055
---
M modules/tools/ext.cx.tools.categories.js
1 file changed, 14 insertions(+), 2 deletions(-)

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



diff --git a/modules/tools/ext.cx.tools.categories.js 
b/modules/tools/ext.cx.tools.categories.js
index 778c031..aee10ff 100644
--- a/modules/tools/ext.cx.tools.categories.js
+++ b/modules/tools/ext.cx.tools.categories.js
@@ -26,6 +26,13 @@
return false;
}
 
+   function languageProps( code ) {
+   return {
+   lang: code,
+   dir: $.uls.data.getDir( code )
+   };
+   }
+
/**
 * CXCategoryCounter Class
 * @class
@@ -68,6 +75,7 @@
var $view, $button, $icon, $count;
 
$view = $( 'div' )
+   .prop( languageProps( $( 'html' ).prop( 'lang' ) ) )
.addClass( 'cx-category-widget cx-category-counter' );
$button = $( 'button' )
.addClass( 'cx-category-counterbutton mw-ui-button 
mw-ui-quiet' );
@@ -278,9 +286,13 @@
 
categoryTool = this.categoryTool;
 
-   $view = $( 'div' ).addClass( 'cx-category-widget 
cx-category-listing' );
+   $view = $( 'div' )
+   .prop( languageProps( $( 'html' ).prop( 'lang' ) ) )
+   .addClass( 'cx-category-widget cx-category-listing' );
$icon = $( 'span' ).addClass( 'cx-category-icon' );
-   $categoryList = $( 'ul' ).addClass( 
'cx-category-categorylist' );
+   $categoryList = $( 'ul' )
+   .prop( languageProps( this.language ) )
+   .addClass( 'cx-category-categorylist' );
$anchor = $( 'a' );
 
if ( this.language === mw.cx.sourceLanguage ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7b7586ab9f8f58035fdc16bf308dfa14109c3055
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/ContentTranslation
Gerrit-Branch: master
Gerrit-Owner: Amire80 amir.ahar...@mail.huji.ac.il
Gerrit-Reviewer: Jsahleen jsahl...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] gerrit: move to module - change (operations/puppet)

2014-10-17 Thread Giuseppe Lavagetto (Code Review)
Giuseppe Lavagetto has uploaded a new change for review.

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

Change subject: gerrit: move to module
..

gerrit: move to module

Change-Id: I7976a20686b1fc5244cbefb8bb04a2ad96e44fca
Signed-off-by: Giuseppe Lavagetto glavage...@wikimedia.org
---
D files/misc/robots-txt-disallow
D manifests/gerrit.pp
M manifests/site.pp
R modules/gerrit/files/gerrit
R modules/gerrit/files/its/action.config
R modules/gerrit/files/its/templates/DraftPublished.vm
R modules/gerrit/files/mail/ChangeSubject.vm
A modules/gerrit/files/robots-txt-disallow
R modules/gerrit/files/skin/GerritSite.css
R modules/gerrit/files/skin/GerritSiteHeader.html
R modules/gerrit/files/skin/page-bkg.jpg
R modules/gerrit/files/skin/wikimedia-codereview-logo.png
A modules/gerrit/manifests/crons.pp
A modules/gerrit/manifests/instance.pp
A modules/gerrit/manifests/jetty.pp
A modules/gerrit/manifests/proxy.pp
A modules/gerrit/manifests/replicationdest.pp
R modules/gerrit/templates/gerrit.config.erb
R modules/gerrit/templates/gerrit.wikimedia.org
R modules/gerrit/templates/replication.config.erb
R modules/gerrit/templates/secure.config.erb
21 files changed, 378 insertions(+), 383 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/15/167215/1

diff --git a/files/misc/robots-txt-disallow b/files/misc/robots-txt-disallow
deleted file mode 100644
index 6ba092a..000
--- a/files/misc/robots-txt-disallow
+++ /dev/null
@@ -1,6 +0,0 @@
-# THIS FILE IS MANAGED BY PUPPET
-#
-# puppet:///files/misc/robots-txt-disallow
-#
-User-agent: *
-Disallow: /
diff --git a/manifests/gerrit.pp b/manifests/gerrit.pp
deleted file mode 100644
index 58e2ce3..000
--- a/manifests/gerrit.pp
+++ /dev/null
@@ -1,376 +0,0 @@
-# manifests/gerrit.pp
-# Manifest to setup a Gerrit instance
-
-class gerrit::instance($apache_ssl  = false,
-$slave   = false,
-$ssh_port= '29418',
-$db_host = '',
-$db_name = 'reviewdb',
-$host= '',
-$db_user = 'gerrit',
-$ssh_key = '',
-$ssl_cert= 'ssl-cert-snakeoil',
-$ssl_cert_key= 'ssl-cert-snakeoil',
-$replication = '',
-$smtp_host   = '') {
-
-include standard,
-ldap::role::config::labs
-
-# Main config
-include passwords::gerrit
-$email_key = $passwords::gerrit::gerrit_email_key
-$sshport = $ssh_port
-$dbhost = $db_host
-$dbname = $db_name
-$dbuser = $db_user
-$dbpass = $passwords::gerrit::gerrit_db_pass
-$bzpass = $passwords::gerrit::gerrit_bz_pass
-$ssl_settings = ssl_ciphersuite('apache-2.2', 'compat', '365')
-
-# Setup LDAP
-include ldap::role::config::labs
-$ldapconfig = $ldap::role::config::labs::ldapconfig
-
-$ldap_hosts = $ldapconfig['servernames']
-$ldap_base_dn = $ldapconfig['basedn']
-$ldap_proxyagent = $ldapconfig['proxyagent']
-$ldap_proxyagent_pass = $ldapconfig['proxypass']
-
-# Configure the base URL
-$url = https://${host}/r;
-
-class { 'gerrit::proxy':
-ssl_cert = $ssl_cert,
-ssl_cert_key = $ssl_cert_key,
-host = $host
-}
-
-class { 'gerrit::jetty':
-ldap_hosts   = $ldap_hosts,
-ldap_base_dn = $ldap_base_dn,
-url  = $url,
-dbhost   = $dbhost,
-dbname   = $dbname,
-dbuser   = $dbuser,
-hostname = $host,
-ldap_proxyagent  = $ldap_proxyagent,
-ldap_proxyagent_pass = $ldap_proxyagent_pass,
-sshport  = $sshport,
-replication  = $replication,
-smtp_host= $smtp_host,
-ssh_key  = $ssh_key,
-}
-}
-
-class gerrit::jetty ($ldap_hosts,
-$ldap_base_dn,
-$url,
-$dbhost,
-$dbname,
-$dbuser,
-$hostname,
-$sshport,
-$ldap_proxyagent,
-$ldap_proxyagent_pass,
-$replication,
-$smtp_host,
-$ssh_key) {
-
-include gerrit::crons
-include nrpe
-
-package { 'openjdk-7-jre':
-ensure = latest,
-}
-
-package { 'python-paramiko':
-ensure = latest,
-}
-
-package { 'gerrit':
-ensure = present,
-}
-
-# TODO: Make this go away -- need to stop using gerrit2 for hook actions
-ssh_authorized_key { $name:
-ensure  = present,
-key = $ssh_key,
-type= 'ssh-rsa',
-user= 'gerrit2',
-require = Package['gerrit'],
-}
-
-file { '/etc/default/gerritcodereview':
-source = 'puppet:///files/gerrit/gerrit',
-owner  = 'root',
-group  = 'root',
-mode   = '0444',
-}
-
-file { '/var/lib/gerrit2/':
-ensure  = directory,
-mode= '0755',
-owner   = 'gerrit2',
-require = Package['gerrit'],
-}
-
-file { '/var/lib/gerrit2/.ssh':
-ensure  = directory,

[MediaWiki-commits] [Gerrit] Labs: final fix of gridengine class - change (operations/puppet)

2014-10-17 Thread coren (Code Review)
coren has uploaded a new change for review.

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

Change subject: Labs: final fix of gridengine class
..

Labs: final fix of gridengine class

For this batch of changes; fixes one file source to point
at the correct spot.

Change-Id: Ia977995ac7ca3c737cca0188d90525a76d48d8d0
---
M modules/gridengine/manifests/master.pp
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/16/167216/1

diff --git a/modules/gridengine/manifests/master.pp 
b/modules/gridengine/manifests/master.pp
index c464f30..9a6f722 100644
--- a/modules/gridengine/manifests/master.pp
+++ b/modules/gridengine/manifests/master.pp
@@ -90,7 +90,7 @@
 owner   = 'sgeadmin',
 group   = 'sgeadmin',
 mode= '0664',
-source  = 'puppet:///modules/gridengine/99-default',
+source  = 'puppet:///modules/gridengine/complex-99-default',
 }
 
 exec { update-complex-conf:

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia977995ac7ca3c737cca0188d90525a76d48d8d0
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: coren mpellet...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Labs: final fix of gridengine class - change (operations/puppet)

2014-10-17 Thread coren (Code Review)
coren has submitted this change and it was merged.

Change subject: Labs: final fix of gridengine class
..


Labs: final fix of gridengine class

For this batch of changes; fixes one file source to point
at the correct spot.

Change-Id: Ia977995ac7ca3c737cca0188d90525a76d48d8d0
---
M modules/gridengine/manifests/master.pp
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/modules/gridengine/manifests/master.pp 
b/modules/gridengine/manifests/master.pp
index c464f30..9a6f722 100644
--- a/modules/gridengine/manifests/master.pp
+++ b/modules/gridengine/manifests/master.pp
@@ -90,7 +90,7 @@
 owner   = 'sgeadmin',
 group   = 'sgeadmin',
 mode= '0664',
-source  = 'puppet:///modules/gridengine/99-default',
+source  = 'puppet:///modules/gridengine/complex-99-default',
 }
 
 exec { update-complex-conf:

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia977995ac7ca3c737cca0188d90525a76d48d8d0
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: coren mpellet...@wikimedia.org
Gerrit-Reviewer: coren mpellet...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Improved caching - change (mediawiki...BlueSpiceFoundation)

2014-10-17 Thread Smuggli (Code Review)
Smuggli has submitted this change and it was merged.

Change subject: Improved caching
..


Improved caching

 * Invalidate settings cache directly after insertion not kinda additional in a 
hook

Change-Id: Ie3cb9508ebd0614a74e5ef136584d27f6be3405e
---
M BlueSpice.hooks.php
M includes/Config.class.php
M includes/utility/CacheHelper.class.php
3 files changed, 11 insertions(+), 19 deletions(-)

Approvals:
  Mglaser: Checked; Looks good to me, but someone else must approve
  Smuggli: Verified; Looks good to me, approved



diff --git a/BlueSpice.hooks.php b/BlueSpice.hooks.php
index d3f9342..6d6a654 100644
--- a/BlueSpice.hooks.php
+++ b/BlueSpice.hooks.php
@@ -15,7 +15,6 @@
 
 // START cache invalidation hooks
 $wgHooks['PageContentSaveComplete'][] = 
'BsCacheHelper::onPageContentSaveComplete';
-$wgHooks['BsSettingsAfterSaveSettings'][] = 
'BsCacheHelper::onBsSettingsAfterSaveSettings';
 // END cache invalidation hooks
 
 if ( !isset( $wgHooks['EditPage::showEditForm:initial'] ) ) {
diff --git a/includes/Config.class.php b/includes/Config.class.php
index d5916d7..da5a355 100644
--- a/includes/Config.class.php
+++ b/includes/Config.class.php
@@ -271,10 +271,10 @@
 * loads all settings from the database and saves the instances for 
every variable internal.
 */
public static function loadSettings() {
-   $sKey = BsCacheHelper::getCacheKey( 'BlueSpice', 'BsConfig', 
'loadSettings' );
+   $sKey = BsCacheHelper::getCacheKey( 'BlueSpice', 'BsConfig', 
'settings' );
$aData = BsCacheHelper::get( $sKey );
 
-   if( $aData !== false ) {
+   if ( $aData !== false ) {
wfDebugLog( 'BsMemcached' , __CLASS__.': Fetching 
settings from cache' );
$aRows = $aData;
} else {
@@ -323,7 +323,7 @@
# if the setting is a boolean type then make sure, it
# gets saved as boolean type
if ( $setting-getOptions ()  self::TYPE_BOOL ) {
-   $value = ( bool ) $setting-getValue ();
+   $value = (bool) $setting-getValue ();
} else {
$value = $setting-getValue ();
}
@@ -334,10 +334,17 @@
);
}
 
-   # write the settings array to the database
wfRunHooks( 'BsSettingsBeforeSaveSettings', array( $aSettings 
) );
+
+   # write the settings array to the database
$bReturn = $dbw-insert('bs_settings', $aSettings);
+
wfRunHooks( 'BsSettingsAfterSaveSettings', array( $aSettings ) 
);
+
+   BsCacheHelper::invalidateCache(
+   BsCacheHelper::getCacheKey( 'BlueSpice', 'BsConfig', 
'settings' )
+   );
+
return $bReturn;
}
 
diff --git a/includes/utility/CacheHelper.class.php 
b/includes/utility/CacheHelper.class.php
index 14f41d3..770c379 100644
--- a/includes/utility/CacheHelper.class.php
+++ b/includes/utility/CacheHelper.class.php
@@ -116,18 +116,4 @@
return true;
}
 
-   /**
-* Invalidates bs settings cache
-* @param type $aSettings
-*/
-   public static function onBsSettingsAfterSaveSettings( $aSettings ) {
-   $aKeys = array(
-   BsCacheHelper::getCacheKey( 'BlueSpice', 'BsConfig', 
'loadSettings' )
-   );
-
-   BsCacheHelper::invalidateCache( $aKeys );
-
-   return true;
-   }
-
 }
\ No newline at end of file

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie3cb9508ebd0614a74e5ef136584d27f6be3405e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceFoundation
Gerrit-Branch: master
Gerrit-Owner: Smuggli mug...@hallowelt.biz
Gerrit-Reviewer: Mglaser gla...@hallowelt.biz
Gerrit-Reviewer: Pigpen reym...@hallowelt.biz
Gerrit-Reviewer: Robert Vogel vo...@hallowelt.biz
Gerrit-Reviewer: Smuggli mug...@hallowelt.biz
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Cleanup ext.cx.tools.categories.js according to coding conve... - change (mediawiki...ContentTranslation)

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

Change subject: Cleanup ext.cx.tools.categories.js according to coding 
conventions
..


Cleanup ext.cx.tools.categories.js according to coding conventions

Change-Id: I66f691fe588f7063eae8b159dee14946d6812ced
---
M modules/tools/ext.cx.tools.categories.js
1 file changed, 24 insertions(+), 11 deletions(-)

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



diff --git a/modules/tools/ext.cx.tools.categories.js 
b/modules/tools/ext.cx.tools.categories.js
index aee10ff..506340f 100644
--- a/modules/tools/ext.cx.tools.categories.js
+++ b/modules/tools/ext.cx.tools.categories.js
@@ -18,8 +18,9 @@
 * @return {boolean} false
 */
function jump( e ) {
-   var id, url = location.href;
-   id = e.data.id;
+   var id = e.data.id,
+   url = location.href;
+
location.href = '#' + id;
history.replaceState( null, null, url );
 
@@ -77,8 +78,10 @@
$view = $( 'div' )
.prop( languageProps( $( 'html' ).prop( 'lang' ) ) )
.addClass( 'cx-category-widget cx-category-counter' );
+
$button = $( 'button' )
.addClass( 'cx-category-counterbutton mw-ui-button 
mw-ui-quiet' );
+
if ( this.language === mw.cx.sourceLanguage ) {
$button.on( 'click', {
id: 'cx-category-listing-anchor--source'
@@ -96,7 +99,8 @@
.addClass( 'cx-category-count' );
 
$button.append( $icon, $count );
-   $view.append( $button )
+   $view
+   .append( $button )
.hide();
 
return $view;
@@ -109,8 +113,9 @@
 */
CXCategoryCounter.prototype.update = function ( count ) {
var text;
+
count = mw.language.convertNumber( count );
-   text = mw.message( 'cx-tools-categories-count-message', count 
).text();
+   text = mw.msg( 'cx-tools-categories-count-message', count );
this.$view.find( 'span.cx-category-count' ).text( text );
};
 
@@ -194,13 +199,14 @@
if ( categoryTool.categories.adapted.hasOwnProperty( categoryId 
) 
!categoryTool.categories.target.hasOwnProperty( 
categoryId )
) {
-
title = categoryTool.categories.adapted[ categoryId ];
categoryTool.categories.target[ categoryId ] = title;
count = Object.keys( categoryTool.categories.target 
).length;
categoryTool.widgets.target.listing.addCategory( 
categoryId, title );
+
$( '.cx-category--translation[cx-category-id=' + 
categoryId + ']' )
.addClass( 'cx-category-highlight' );
+
categoryTool.widgets.target.counter.update( count );
categoryTool.widgets.target.listing.$view
.find( '.cx-category-categorylist' )
@@ -229,8 +235,10 @@
$listItem.remove();
delete categoryTool.categories.target[ categoryId ];
count = Object.keys( categoryTool.categories.target ).length;
+
$( '.cx-category--source[cx-category-id=' + categoryId + ']' )
.removeClass( 'cx-category-highlight' );
+
categoryTool.widgets.target.counter.update( count );
if ( count === 0 ) {
categoryTool.widgets.target.listing.$view
@@ -248,7 +256,8 @@
 */
function highlightCategory() {
/*jshint validthis:true */
-   var categoryId, $category = $( this );
+   var categoryId,
+   $category = $( this );
 
if ( $category.hasClass( 'cx-category-disabled' ) ) {
return;
@@ -265,11 +274,13 @@
 */
function removeCategoryHighlight() {
/*jshint validthis:true */
-   var categoryId, $category = $( this );
+   var categoryId,
+   $category = $( this );
 
if ( $category.hasClass( 'cx-category-disabled' ) ) {
return;
}
+
categoryId = $category.attr( 'cx-category-id' );
 
$( '[cx-category-id=' + categoryId + ']' )
@@ -307,7 +318,8 @@
}, targetClickHandler );
}
 
-   $categoryList.on( 'mouseover', '.cx-category', 
highlightCategory )
+   $categoryList
+   .on( 'mouseover', '.cx-category', highlightCategory )
.on( 'mouseout', 

[MediaWiki-commits] [Gerrit] Remove no longer relevant @todo - change (mediawiki...Flow)

2014-10-17 Thread Matthias Mullie (Code Review)
Matthias Mullie has uploaded a new change for review.

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

Change subject: Remove no longer relevant @todo
..

Remove no longer relevant @todo

Change-Id: I60c9a3283429044f3b37029821367e322864baba
---
M Hooks.php
1 file changed, 0 insertions(+), 1 deletion(-)


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

diff --git a/Hooks.php b/Hooks.php
index 7fad1c6..cf405a5 100644
--- a/Hooks.php
+++ b/Hooks.php
@@ -275,7 +275,6 @@
 
$isWatchlist = is_array( $classes ) ? 
$query-isWatchlist( $classes ) : $isWatchlist;
 
-   // @todo: create hook to allow batch-loading this data
$row = $query-getResult( $changesList, $rc, 
$isWatchlist );
if ( $row === false ) {
return false;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I60c9a3283429044f3b37029821367e322864baba
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Matthias Mullie mmul...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Make watchlist topic title link to topic with with unread po... - change (mediawiki...Flow)

2014-10-17 Thread Matthias Mullie (Code Review)
Matthias Mullie has uploaded a new change for review.

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

Change subject: Make watchlist topic title link to topic with with unread posts 
highlighted
..

Make watchlist topic title link to topic with with unread posts highlighted

Change-Id: Icbd1f38196f9fbcb72f17cfc28752b3cf5783137
---
M includes/Formatter/RecentChanges.php
M includes/Formatter/RecentChangesQuery.php
2 files changed, 124 insertions(+), 0 deletions(-)


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

diff --git a/includes/Formatter/RecentChanges.php 
b/includes/Formatter/RecentChanges.php
index 65dde9b..aca3a55 100644
--- a/includes/Formatter/RecentChanges.php
+++ b/includes/Formatter/RecentChanges.php
@@ -2,7 +2,9 @@
 
 namespace Flow\Formatter;
 
+use Flow\Model\Anchor;
 use Flow\Model\PostRevision;
+use Flow\Model\UUID;
 use Flow\Parsoid\Utils;
 use ChangesList;
 use IContextSource;
@@ -62,4 +64,104 @@
) .
( Utils::htmlToPlaintext( $description ) ? $separator . 
$description : '' );
}
+
+   /**
+* This overrides the default title link to include highlights for the 
posts
+* that have not yet been seen.
+*
+* @param array $data
+* @param FormatterRow $row
+* @param IContextSource $ctx
+* @return string
+*/
+   protected function getTitleLink( array $data, FormatterRow $row, 
IContextSource $ctx ) {
+   if ( !$row instanceof RecentChangesRow ) {
+   // actually, this should be typehint, but can't because 
this needs
+   // to match the parent's more generic typehint
+   return parent::getTitleLink( $data, $row, $ctx );
+   }
+
+   $watched = $row-recentChange-watched;
+   if ( is_bool( $watched ) ) {
+   // RC  watchlist share most code; the latter is 
unaware of when
+   // something was watched though, so we'll ignore that 
here
+   return parent::getTitleLink( $data, $row, $ctx );
+   }
+
+   if ( $watched === null ) {
+   // there is no data for unread posts - they've all been 
seen
+   return parent::getTitleLink( $data, $row, $ctx );
+   }
+
+   // filter down the changeData array to only the first unread 
post
+   $unread = $this-firstUnreadPost( $row-changeData, $watched );
+   if ( !$unread ) {
+   // there are no unread posts
+   return parent::getTitleLink( $data, $row, $ctx );
+   }
+
+   // get data from existing link to topic so we can build a new 
anchor
+   $topic = $data['links']['topic'];
+   $title = $topic-resolveTitle();
+   $topic = $topic-toArray();
+
+   // figure out if the entry is a post or topic, for highlight 
fragment
+   $type = $unread['workflow'] == $unread['post'] ? 'topic' : 
'post';
+
+   // finally, build that new link already!
+   $data['links']['topic'] = new Anchor(
+   $topic['title'],
+   $title,
+   array( 'fromnotif' = '1' ),
+   '#flow-' . $type . '-' . $unread['post']
+   );
+
+   // now pass it on to parent with the new, updated, link ;)
+   return parent::getTitleLink( $data, $row, $ctx );
+   }
+
+   /**
+* This method will accept an array of multiple $changeData and return 
only
+* the oldest one, that is still more recent that $watched (or null, if
+* there is no such entry)
+*
+* @param array $changeData Array of multiple changeData stored for RC
+* @param string $watched Timestamp in any format accepted by 
wfTimestamp
+* @return array|null
+*/
+   protected function firstUnreadPost( $changeData, $watched ) {
+   $watched = wfTimestamp( TS_MW, $watched );
+
+   $filterUnread = function ( $carry, $changeData ) use ( $watched 
) {
+   // we can only highlight posts, so ignore all others
+   if ( !isset( $changeData['post'] ) ) {
+   return $carry;
+   }
+
+   // ignore posts older than last watch time
+   $postUuid = UUID::create( $changeData['post'] );
+   $postTimestamp = $postUuid-getTimestamp();
+   if ( $postTimestamp = $watched ) {
+   return $carry;
+   }
+
+   // if this is the first unread we encounter, save that 
one
+   

[MediaWiki-commits] [Gerrit] Don't hardcode timestamp format in UUID helper method - change (mediawiki...Flow)

2014-10-17 Thread Matthias Mullie (Code Review)
Matthias Mullie has uploaded a new change for review.

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

Change subject: Don't hardcode timestamp format in UUID helper method
..

Don't hardcode timestamp format in UUID helper method

Change-Id: I1531e519f5d40e5dba11ecbbdb0a697e2f2b23e3
---
M includes/Model/UUID.php
1 file changed, 6 insertions(+), 3 deletions(-)


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

diff --git a/includes/Model/UUID.php b/includes/Model/UUID.php
index c4b612c..55704de 100644
--- a/includes/Model/UUID.php
+++ b/includes/Model/UUID.php
@@ -277,11 +277,14 @@
}
 
/**
-* @return string Timestamp in TS_MW format
+* Returns the timestamp in the desired format (defaults to TS_MW)
+*
+* @param string $format Desired format
+* @return string
 */
-   public function getTimestamp() {
+   public function getTimestamp( $format = TS_MW ) {
$ts = $this-getTimestampObj();
-   return $ts-getTimestamp( TS_MW );
+   return $ts-getTimestamp( $format );
}
 
/**

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1531e519f5d40e5dba11ecbbdb0a697e2f2b23e3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Matthias Mullie mmul...@wikimedia.org

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


  1   2   3   >