[MediaWiki-commits] [Gerrit] mediawiki...ArticleFeedbackv5[master]: Reword autohide i18n messages for spelling and grammar

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

Change subject: Reword autohide i18n messages for spelling and grammar
..


Reword autohide i18n messages for spelling and grammar

- 'Hidden' to 'Auto-hidden'
- 'autohidden' to 'auto-hidden'
- 'hid' to 'autohid'

Bug: T60495
Change-Id: I828c212c01be559dc7fba0b748f691f5d0a22e2d
---
M i18n/en.json
1 file changed, 3 insertions(+), 3 deletions(-)

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



diff --git a/i18n/en.json b/i18n/en.json
index 73d89bd..05bba2a 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -217,7 +217,7 @@
"articlefeedbackv5-status-unarchive": "This post was un-archived by $1 
on $2 at $3",
"articlefeedbackv5-new-marker": "New",
"articlefeedbackv5-oversight-marker": "Oversighted",
-   "articlefeedbackv5-autohide-marker": "Hidden",
+   "articlefeedbackv5-autohide-marker": "Auto-hidden",
"articlefeedbackv5-hide-marker": "Hidden",
"articlefeedbackv5-feature-marker": "Useful",
"articlefeedbackv5-resolve-marker": "Resolved",
@@ -320,7 +320,7 @@
"articlefeedbackv5-viewactivity": "View activity",
"articlefeedbackv5-mask-view-contents": "View contents",
"articlefeedbackv5-mask-text-inappropriate": "This post #$1 
{{GENDER:$2|was marked as inappropriate by $2}} $3.",
-   "articlefeedbackv5-mask-text-autohide": "This post #$1 {{GENDER:$2|was 
autohidden by $2}} $3.",
+   "articlefeedbackv5-mask-text-autohide": "This post #$1 {{GENDER:$2|was 
auto-hidden by $2}} $3.",
"articlefeedbackv5-mask-text-hide": "This post #$1 {{GENDER:$2|was 
hidden by $2}} $3.",
"articlefeedbackv5-mask-text-oversight": "This post #$1 {{GENDER:$2|was 
oversighted by $2}} $3.",
"articlefeedbackv5-special-goback": "View feedback page",
@@ -626,7 +626,7 @@
"articlefeedbackv5-activity-item-uninappropriate": "$1 
{{GENDER:$6|un-marked}} this post as inappropriate on $4 at $5 $2",
"articlefeedbackv5-activity-item-hide": "$1 {{GENDER:$6|hid}} this post 
on $4 at $5 $2",
"articlefeedbackv5-activity-item-unhide": "$1 {{GENDER:$6|un-hid}} this 
post on $4 at $5 $2",
-   "articlefeedbackv5-activity-item-autohide": "$1 {{GENDER:$6|hid}} this 
post on $4 at $5 $2",
+   "articlefeedbackv5-activity-item-autohide": "$1 {{GENDER:$6|auto-hid}} 
this post on $4 at $5 $2",
"articlefeedbackv5-activity-item-archive": "$1 {{GENDER:$6|archived}} 
this post on $4 at $5 $2",
"articlefeedbackv5-activity-item-unarchive": "$1 
{{GENDER:$6|un-archived}} this post on $4 at $5 $2",
"articlefeedbackv5-activity-item-helpful": "$1 {{GENDER:$6|marked}} 
this post as helpful on $4 at $5 $2",

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I828c212c01be559dc7fba0b748f691f5d0a22e2d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ArticleFeedbackv5
Gerrit-Branch: master
Gerrit-Owner: SamanthaNguyen 
Gerrit-Reviewer: SamanthaNguyen 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...ArticleFeedbackv5[master]: Reword autohide i18n messages for spelling and grammar

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

Change subject: Reword autohide i18n messages for spelling and grammar
..

Reword autohide i18n messages for spelling and grammar

- 'Hidden' to 'Auto-hidden'
- 'autohidden' to 'auto-hidden'
- 'hid' to 'autohid'

Bug: T60495
Change-Id: I828c212c01be559dc7fba0b748f691f5d0a22e2d
---
M i18n/en.json
1 file changed, 3 insertions(+), 3 deletions(-)


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

diff --git a/i18n/en.json b/i18n/en.json
index 73d89bd..05bba2a 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -217,7 +217,7 @@
"articlefeedbackv5-status-unarchive": "This post was un-archived by $1 
on $2 at $3",
"articlefeedbackv5-new-marker": "New",
"articlefeedbackv5-oversight-marker": "Oversighted",
-   "articlefeedbackv5-autohide-marker": "Hidden",
+   "articlefeedbackv5-autohide-marker": "Auto-hidden",
"articlefeedbackv5-hide-marker": "Hidden",
"articlefeedbackv5-feature-marker": "Useful",
"articlefeedbackv5-resolve-marker": "Resolved",
@@ -320,7 +320,7 @@
"articlefeedbackv5-viewactivity": "View activity",
"articlefeedbackv5-mask-view-contents": "View contents",
"articlefeedbackv5-mask-text-inappropriate": "This post #$1 
{{GENDER:$2|was marked as inappropriate by $2}} $3.",
-   "articlefeedbackv5-mask-text-autohide": "This post #$1 {{GENDER:$2|was 
autohidden by $2}} $3.",
+   "articlefeedbackv5-mask-text-autohide": "This post #$1 {{GENDER:$2|was 
auto-hidden by $2}} $3.",
"articlefeedbackv5-mask-text-hide": "This post #$1 {{GENDER:$2|was 
hidden by $2}} $3.",
"articlefeedbackv5-mask-text-oversight": "This post #$1 {{GENDER:$2|was 
oversighted by $2}} $3.",
"articlefeedbackv5-special-goback": "View feedback page",
@@ -626,7 +626,7 @@
"articlefeedbackv5-activity-item-uninappropriate": "$1 
{{GENDER:$6|un-marked}} this post as inappropriate on $4 at $5 $2",
"articlefeedbackv5-activity-item-hide": "$1 {{GENDER:$6|hid}} this post 
on $4 at $5 $2",
"articlefeedbackv5-activity-item-unhide": "$1 {{GENDER:$6|un-hid}} this 
post on $4 at $5 $2",
-   "articlefeedbackv5-activity-item-autohide": "$1 {{GENDER:$6|hid}} this 
post on $4 at $5 $2",
+   "articlefeedbackv5-activity-item-autohide": "$1 {{GENDER:$6|auto-hid}} 
this post on $4 at $5 $2",
"articlefeedbackv5-activity-item-archive": "$1 {{GENDER:$6|archived}} 
this post on $4 at $5 $2",
"articlefeedbackv5-activity-item-unarchive": "$1 
{{GENDER:$6|un-archived}} this post on $4 at $5 $2",
"articlefeedbackv5-activity-item-helpful": "$1 {{GENDER:$6|marked}} 
this post as helpful on $4 at $5 $2",

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...ArticleFeedbackv5[master]: Remove unused and unnecessary propiertary file 'images.psd'

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

Change subject: Remove unused and unnecessary propiertary file 'images.psd'
..


Remove unused and unnecessary propiertary file 'images.psd'

The '.psd' format stands for Photoshop Document file, which is a
propietary file format and used specifically for Adobe Photoshop,
which is also propiertary software. The file can only be accessed for
those who have Adobe Photoshop installed, which costs.

Change-Id: Id6d6f486d41f5f01a6f9378ce861873db45fead1
---
M extension.json
D modules/jquery.articleFeedbackv5/images.psd
2 files changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/extension.json b/extension.json
index 7873b88..643e379 100644
--- a/extension.json
+++ b/extension.json
@@ -1,6 +1,6 @@
 {
"name": "Article Feedback",
-   "version": "5.2.1",
+   "version": "5.2.2",
"author": [
"Greg Chiasson",
"Reha Sterbin",
diff --git a/modules/jquery.articleFeedbackv5/images.psd 
b/modules/jquery.articleFeedbackv5/images.psd
deleted file mode 100644
index cb0e04f..000
--- a/modules/jquery.articleFeedbackv5/images.psd
+++ /dev/null
Binary files differ

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id6d6f486d41f5f01a6f9378ce861873db45fead1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ArticleFeedbackv5
Gerrit-Branch: master
Gerrit-Owner: SamanthaNguyen 
Gerrit-Reviewer: SamanthaNguyen 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...ArticleFeedbackv5[master]: Remove unused and unnecessary propiertary file 'images.psd'

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

Change subject: Remove unused and unnecessary propiertary file 'images.psd'
..

Remove unused and unnecessary propiertary file 'images.psd'

The '.psd' format stands for Photoshop Document file, which is a
propietary file format and used specifically for Adobe Photoshop,
which is also propiertary software. The file can only be accessed for
those who have Adobe Photoshop installed, which costs.

Change-Id: Id6d6f486d41f5f01a6f9378ce861873db45fead1
---
M extension.json
D modules/jquery.articleFeedbackv5/images.psd
2 files changed, 1 insertion(+), 1 deletion(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ArticleFeedbackv5 
refs/changes/22/339922/1

diff --git a/extension.json b/extension.json
index 7873b88..643e379 100644
--- a/extension.json
+++ b/extension.json
@@ -1,6 +1,6 @@
 {
"name": "Article Feedback",
-   "version": "5.2.1",
+   "version": "5.2.2",
"author": [
"Greg Chiasson",
"Reha Sterbin",
diff --git a/modules/jquery.articleFeedbackv5/images.psd 
b/modules/jquery.articleFeedbackv5/images.psd
deleted file mode 100644
index cb0e04f..000
--- a/modules/jquery.articleFeedbackv5/images.psd
+++ /dev/null
Binary files differ

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Tools: Require gridengine-master for gridengine_resource

2017-02-25 Thread Tim Landscheidt (Code Review)
Hello Chasemp, Merlijn van Deen,

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

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

to review the following change.


Change subject: Tools: Require gridengine-master for gridengine_resource
..

Tools: Require gridengine-master for gridengine_resource

Bug: T127388
Change-Id: Ief54f613b2cdcb912215b22300f9a3494fdfd565
---
M modules/toollabs/manifests/master.pp
1 file changed, 3 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/21/339921/1

diff --git a/modules/toollabs/manifests/master.pp 
b/modules/toollabs/manifests/master.pp
index ea8e58d..d21091c 100644
--- a/modules/toollabs/manifests/master.pp
+++ b/modules/toollabs/manifests/master.pp
@@ -11,6 +11,7 @@
 ensure  => present,
 requestable => 'FORCED',
 consumable  => 'YES',
+require => Service['gridengine-master'],
 }
 
 gridengine_resource { 'release':
@@ -22,6 +23,7 @@
 consumable  => 'NO',
 default => 'NONE',
 urgency => '0',
+require => Service['gridengine-master'],
 }
 
 gridengine_resource { 'user_slot':
@@ -33,6 +35,7 @@
 consumable  => 'YES',
 default => '0',
 urgency => '0',
+require => Service['gridengine-master'],
 }
 
 file { "${toollabs::collectors}/hostgroups":

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ief54f613b2cdcb912215b22300f9a3494fdfd565
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Landscheidt 
Gerrit-Reviewer: Chasemp 
Gerrit-Reviewer: Merlijn van Deen 

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


[MediaWiki-commits] [Gerrit] labs/toollabs[master]: Package jmail

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

Change subject: Package jmail
..

Package jmail

Bug: T158722
Change-Id: I2a2a86ecf1f0129374733f9222decf241d13e708
---
M configure.ac
M debian/changelog
M debian/copyright
M debian/jobutils.install
M debian/jobutils.manpages
M jobutils/bin/Makefile.am
A jobutils/bin/jmail
M jobutils/man/Makefile.am
A jobutils/man/jmail.1.in
9 files changed, 103 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/toollabs 
refs/changes/20/339920/1

diff --git a/configure.ac b/configure.ac
index 1cc660e..0f72408 100644
--- a/configure.ac
+++ b/configure.ac
@@ -28,6 +28,7 @@
  jobutils/Makefile
  jobutils/bin/Makefile
  jobutils/man/Makefile
+ jobutils/man/jmail.1
  jobutils/man/job.1
  jobutils/man/jstop.1
  jobutils/man/jsub.1
diff --git a/debian/changelog b/debian/changelog
index 8ed41f5..0bc809e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,8 +4,9 @@
   * Do not hardcore database hosts in list-user-databases
   * State dependency on python
   * Set target distribution to Ubuntu Trusty
+  * Package jmail
 
- -- Tim Landscheidt   Sun, 26 Feb 2017 01:38:04 +
+ -- Tim Landscheidt   Sun, 26 Feb 2017 05:42:05 +
 
 toollabs (1.18) unstable; urgency=medium
 
diff --git a/debian/copyright b/debian/copyright
index f3d9372..f545288 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -5,6 +5,10 @@
 Copyright: 2013 Marc-André Pelletier 
 License: ISC
 
+Files: jobutils/bin/jmail jobutils/man/jmail.1.in
+Copyright: Copyright 2017 Tim Landscheidt 
+License: GPL-3.0+
+
 Files: debian/*
 Copyright: 2013 Carl Fürstenberg 
 License: GPL-3.0+
diff --git a/debian/jobutils.install b/debian/jobutils.install
index 3b8bf2f..956f91f 100644
--- a/debian/jobutils.install
+++ b/debian/jobutils.install
@@ -1,3 +1,4 @@
+usr/bin/jmail
 usr/bin/job
 usr/bin/jstart
 usr/bin/jstop
diff --git a/debian/jobutils.manpages b/debian/jobutils.manpages
index 92a5a84..c6a457c 100644
--- a/debian/jobutils.manpages
+++ b/debian/jobutils.manpages
@@ -1,3 +1,4 @@
+debian/tmp/usr/share/man/man1/jmail.1
 debian/tmp/usr/share/man/man1/job.1
 debian/tmp/usr/share/man/man1/jstop.1
 debian/tmp/usr/share/man/man1/jsub.1
diff --git a/jobutils/bin/Makefile.am b/jobutils/bin/Makefile.am
index 764fc98..7312c92 100644
--- a/jobutils/bin/Makefile.am
+++ b/jobutils/bin/Makefile.am
@@ -1,4 +1,4 @@
-bin_SCRIPTS = job jstop jsub
+bin_SCRIPTS = jmail job jstop jsub
 
 install-exec-hook:
cd $(DESTDIR)$(bindir) && \
diff --git a/jobutils/bin/jmail b/jobutils/bin/jmail
new file mode 100755
index 000..3c2793d
--- /dev/null
+++ b/jobutils/bin/jmail
@@ -0,0 +1,54 @@
+#!/usr/bin/python3
+#
+# Copyright (C) 2017  Tim Landscheidt
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see .
+
+import os
+import pwd
+import shutil
+import subprocess
+import sys
+import tempfile
+
+# Both temporary files need to be created in the tool's home directory
+# on NFS so they can be accessed from any grid host.
+home_directory = pwd.getpwuid(os.getuid()).pw_dir
+with tempfile.NamedTemporaryFile(mode='w+', suffix='.in', prefix='jmail-', 
dir=home_directory) as input, tempfile.NamedTemporaryFile(mode='w+', 
suffix='.out', prefix='jmail-', dir=home_directory) as output:
+# Determine the full path of the program to execute.
+program = shutil.which(sys.argv[1])
+if program is None:
+sys.exit('Processing program unavailable')
+
+# Copy the incoming message from stdin to the temporary file.
+shutil.copyfileobj(sys.stdin, input)
+input.flush()
+
+# Execute the given program synchronously on the grid.
+rv = subprocess.call(['/usr/bin/qsub',
+  '-N', 'mail.' + pwd.getpwuid(os.getuid()).pw_name,
+  '-sync', 'y',
+  '-b', 'y',
+  '-m', 'n',
+  '-o', output.name,
+  '-j', 'y',
+  '-i', input.name,
+  '-q', 'mailq',
+  '-l', 

[MediaWiki-commits] [Gerrit] mediawiki...Material[master]: Add doxygen-style documentation to PHP functions

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

Change subject: Add doxygen-style documentation to PHP functions
..


Add doxygen-style documentation to PHP functions

Change-Id: I00910d26c0a43d1b2b0d54a6cf88ab4dc2927f5c
---
M Material.skin.php
1 file changed, 12 insertions(+), 2 deletions(-)

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



diff --git a/Material.skin.php b/Material.skin.php
index 5c7abdd..9d002c8 100644
--- a/Material.skin.php
+++ b/Material.skin.php
@@ -15,12 +15,22 @@
$stylename = 'Material',
$template = 'MaterialTemplate',
$useHeadElement = true;
-   // Add JS via ResourceLoader
+
+   /**
+* Load JS modules via ResourceLoader
+*
+* @param OutputPage $out
+*/
public function initPage( OutputPage $out ) {
parent::initPage( $out );
$out->addModules( 'skins.material.js' );
}
-   // Add CSS via ResourceLoader
+
+   /**
+* Load CSS modules via ResourceLoader
+*
+* @param OutputPage $out
+*/
function setupSkinUserCss( OutputPage $out ) {
parent::setupSkinUserCss( $out );
$out->addModuleStyles( array(

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I00910d26c0a43d1b2b0d54a6cf88ab4dc2927f5c
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/skins/Material
Gerrit-Branch: master
Gerrit-Owner: SamanthaNguyen 
Gerrit-Reviewer: SamanthaNguyen 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...Material[master]: Add doxygen-style documentation to PHP functions

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

Change subject: Add doxygen-style documentation to PHP functions
..

Add doxygen-style documentation to PHP functions

Change-Id: I00910d26c0a43d1b2b0d54a6cf88ab4dc2927f5c
---
M Material.skin.php
1 file changed, 10 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/Material 
refs/changes/19/339919/1

diff --git a/Material.skin.php b/Material.skin.php
index 5c7abdd..32ca4b5 100644
--- a/Material.skin.php
+++ b/Material.skin.php
@@ -15,12 +15,20 @@
$stylename = 'Material',
$template = 'MaterialTemplate',
$useHeadElement = true;
-   // Add JS via ResourceLoader
+
+   /**
+* Load JS modules via ResourceLoader
+* @param OutputPage $out
+*/
public function initPage( OutputPage $out ) {
parent::initPage( $out );
$out->addModules( 'skins.material.js' );
}
-   // Add CSS via ResourceLoader
+
+   /**
+* Load CSS modules via ResourceLoader
+* @param OutputPage $out
+*/
function setupSkinUserCss( OutputPage $out ) {
parent::setupSkinUserCss( $out );
$out->addModuleStyles( array(

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I00910d26c0a43d1b2b0d54a6cf88ab4dc2927f5c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/Material
Gerrit-Branch: master
Gerrit-Owner: SamanthaNguyen 

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


[MediaWiki-commits] [Gerrit] mediawiki...Material[master]: Remove README.md and CONTRIBUTING.md files

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

Change subject: Remove README.md and CONTRIBUTING.md files
..


Remove README.md and CONTRIBUTING.md files

- README.md has been removed in favor of MediaWiki documentation
available at mediawiki.org
- CONTRIBUTING.md has been removed in favor of
  
https://www.mediawiki.org/wiki/Special:MyLanguage/Phabricator/Help#Creating_a_task

Change-Id: Ib934d151cf5cb1b8f361578e05e58cf25ce0f758
---
D CONTRIBUTING.md
D README.md
2 files changed, 0 insertions(+), 49 deletions(-)

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



diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
deleted file mode 100644
index 213c96f..000
--- a/CONTRIBUTING.md
+++ /dev/null
@@ -1,13 +0,0 @@
-#How to contribute
-
-As an open-source project, contributions are not only allowed but encouraged 
:D! If you'd like to learn how to help improve this MediaWiki skin, here are 
some things on what you could do, and some tips on how to do it:
-
- - File an issue / ticket
-   - If you need to find where the issues are, they're located at 
[mediawiki-skins-Material/issues](https://github.com/SamanthaNguyen/mediawiki-skins-Material/issues).
-   - The issue you submit can revolve around a new feature, optimizing 
performance, more efficient code, whatever! As long as its relevant to the 
project scope, issues are welcomed.
-   - Keep in mind to provide constructive feedback and be polite :)
-   - Include a screenshot or perhaps a .gif, visual information helps a 
lot!
-   - Tell us what web browser you're using, what version, and what kind of 
device (laptop, tablet, or phone?).
-   - For users with write access - Add a label to the issue accordingly so 
everything is organized and can be easily found.
- - Submit a pull request
-   - Make sure you add a description and a title summary on what you're 
intending to do so other users can understand.
diff --git a/README.md b/README.md
deleted file mode 100644
index 41c1bee..000
--- a/README.md
+++ /dev/null
@@ -1,36 +0,0 @@
-# Demo
-* http://social-tools.wmflabs.org/wiki/Special:RecentChanges?useskin=material
-
-# What is 'Material'? 
-> The Material Design language created by Google, captured in MediaWiki 
software
-
-This is a project in **early alpha phase** that aims to combine Material 
Design with MediaWiki to create a new skin. In the visual environment, 
everything is interactive, showing movement to support the idea that the user 
is in control. Elements inside it aren't just about the aesthetics, but also 
about structure and meaning. The interface has colors that convey emotion, 
typefaces to encourage readability, pictures that are worth a thousand words, 
and more. 
-
-As it's continuously being developed, we keep in mind seven important factors 
listed below to always create a harmonious experience for the user to engage 
in. 
-- **Accessibility**  
-- **Cross-browser support**
-- **Cross-device support**
-- **Performance**
-- **Security**
-- **Navigation**
-- **Internationalization** (i18n)
-
-# Documentation
-https://www.mediawiki.org/wiki/Skin:Material
-
-# How to install
-1. Download the files into 
[$IP](https://www.mediawiki.org/wiki/Manual:$IP)/skins/Material
-2. In the file named LocalSettings.php, add the following line: 
```wfLoadSkin( 'Material' );```
-3. You can now verify that the skin is installed by checking Special:Version!
-
-**Note**: This skin only supports MediaWiki 1.26.x and above as MediaWiki 
1.25.x is currently deprecated.
-
-# Custom JS and CSS on the Wiki
-This is a list for the pages so you can use custom CSS and/or JS for your site.
-* Personal CSS is located at ```Special:Mypage/material.css``` / 
```User:/material.css```
-* Personal JS is located at ```Special:Mypage/material.js``` / 
```User:/material.js```
-* Wiki CSS is located at ```MediaWiki:Material.css```
-* Wiki JS is located at ```MediaWiki:Material.js```
-
-
-

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib934d151cf5cb1b8f361578e05e58cf25ce0f758
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/Material
Gerrit-Branch: master
Gerrit-Owner: SamanthaNguyen 
Gerrit-Reviewer: SamanthaNguyen 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...Material[master]: Remove README.md and CONTRIBUTING.md files

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

Change subject: Remove README.md and CONTRIBUTING.md files
..

Remove README.md and CONTRIBUTING.md files

- README.md has been removed in favor of MediaWiki documentation
available at mediawiki.org
- CONTRIBUTING.md has been removed in favor of
  
https://www.mediawiki.org/wiki/Special:MyLanguage/Phabricator/Help#Creating_a_task

Change-Id: Ib934d151cf5cb1b8f361578e05e58cf25ce0f758
---
D CONTRIBUTING.md
D README.md
2 files changed, 0 insertions(+), 49 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/Material 
refs/changes/18/339918/1

diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
deleted file mode 100644
index 213c96f..000
--- a/CONTRIBUTING.md
+++ /dev/null
@@ -1,13 +0,0 @@
-#How to contribute
-
-As an open-source project, contributions are not only allowed but encouraged 
:D! If you'd like to learn how to help improve this MediaWiki skin, here are 
some things on what you could do, and some tips on how to do it:
-
- - File an issue / ticket
-   - If you need to find where the issues are, they're located at 
[mediawiki-skins-Material/issues](https://github.com/SamanthaNguyen/mediawiki-skins-Material/issues).
-   - The issue you submit can revolve around a new feature, optimizing 
performance, more efficient code, whatever! As long as its relevant to the 
project scope, issues are welcomed.
-   - Keep in mind to provide constructive feedback and be polite :)
-   - Include a screenshot or perhaps a .gif, visual information helps a 
lot!
-   - Tell us what web browser you're using, what version, and what kind of 
device (laptop, tablet, or phone?).
-   - For users with write access - Add a label to the issue accordingly so 
everything is organized and can be easily found.
- - Submit a pull request
-   - Make sure you add a description and a title summary on what you're 
intending to do so other users can understand.
diff --git a/README.md b/README.md
deleted file mode 100644
index 41c1bee..000
--- a/README.md
+++ /dev/null
@@ -1,36 +0,0 @@
-# Demo
-* http://social-tools.wmflabs.org/wiki/Special:RecentChanges?useskin=material
-
-# What is 'Material'? 
-> The Material Design language created by Google, captured in MediaWiki 
software
-
-This is a project in **early alpha phase** that aims to combine Material 
Design with MediaWiki to create a new skin. In the visual environment, 
everything is interactive, showing movement to support the idea that the user 
is in control. Elements inside it aren't just about the aesthetics, but also 
about structure and meaning. The interface has colors that convey emotion, 
typefaces to encourage readability, pictures that are worth a thousand words, 
and more. 
-
-As it's continuously being developed, we keep in mind seven important factors 
listed below to always create a harmonious experience for the user to engage 
in. 
-- **Accessibility**  
-- **Cross-browser support**
-- **Cross-device support**
-- **Performance**
-- **Security**
-- **Navigation**
-- **Internationalization** (i18n)
-
-# Documentation
-https://www.mediawiki.org/wiki/Skin:Material
-
-# How to install
-1. Download the files into 
[$IP](https://www.mediawiki.org/wiki/Manual:$IP)/skins/Material
-2. In the file named LocalSettings.php, add the following line: 
```wfLoadSkin( 'Material' );```
-3. You can now verify that the skin is installed by checking Special:Version!
-
-**Note**: This skin only supports MediaWiki 1.26.x and above as MediaWiki 
1.25.x is currently deprecated.
-
-# Custom JS and CSS on the Wiki
-This is a list for the pages so you can use custom CSS and/or JS for your site.
-* Personal CSS is located at ```Special:Mypage/material.css``` / 
```User:/material.css```
-* Personal JS is located at ```Special:Mypage/material.js``` / 
```User:/material.js```
-* Wiki CSS is located at ```MediaWiki:Material.css```
-* Wiki JS is located at ```MediaWiki:Material.js```
-
-
-

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib934d151cf5cb1b8f361578e05e58cf25ce0f758
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/Material
Gerrit-Branch: master
Gerrit-Owner: SamanthaNguyen 

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


[MediaWiki-commits] [Gerrit] labs/toollabs[ubuntu/precise]: Set target distribution for branch ubuntu/precise to Ubuntu ...

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

Change subject: Set target distribution for branch ubuntu/precise to Ubuntu 
Precise
..


Set target distribution for branch ubuntu/precise to Ubuntu Precise

Bug: T156886
Change-Id: I68582bc68f6745de6eb59f899309f44095f2c932
---
M .gitreview
M debian/changelog
2 files changed, 4 insertions(+), 3 deletions(-)

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



diff --git a/.gitreview b/.gitreview
index fb155a2..7ab5ba8 100644
--- a/.gitreview
+++ b/.gitreview
@@ -2,5 +2,5 @@
 host=gerrit.wikimedia.org
 port=29418
 project=labs/toollabs.git
-defaultbranch=master
+defaultbranch=ubuntu/precise
 defaultrebase=0
diff --git a/debian/changelog b/debian/changelog
index 8ed41f5..379ff65 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,11 +1,12 @@
-toollabs (1.19~dev) trusty; urgency=medium
+toollabs (1.19~dev) precise; urgency=medium
 
   * Remove toolwatcher
   * Do not hardcore database hosts in list-user-databases
   * State dependency on python
   * Set target distribution to Ubuntu Trusty
+  * Set target distribution for branch ubuntu/precise to Ubuntu Precise
 
- -- Tim Landscheidt   Sun, 26 Feb 2017 01:38:04 +
+ -- Tim Landscheidt   Sun, 26 Feb 2017 02:49:21 +
 
 toollabs (1.18) unstable; urgency=medium
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I68582bc68f6745de6eb59f899309f44095f2c932
Gerrit-PatchSet: 1
Gerrit-Project: labs/toollabs
Gerrit-Branch: ubuntu/precise
Gerrit-Owner: Tim Landscheidt 
Gerrit-Reviewer: Coren 
Gerrit-Reviewer: Merlijn van Deen 
Gerrit-Reviewer: Tim Landscheidt 
Gerrit-Reviewer: Yuvipanda 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] labs/toollabs[ubuntu/precise]: Set target distribution for branch ubuntu/precise to Ubuntu ...

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

Change subject: Set target distribution for branch ubuntu/precise to Ubuntu 
Precise
..

Set target distribution for branch ubuntu/precise to Ubuntu Precise

Bug: T156886
Change-Id: I68582bc68f6745de6eb59f899309f44095f2c932
---
M .gitreview
M debian/changelog
2 files changed, 4 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/toollabs 
refs/changes/17/339917/1

diff --git a/.gitreview b/.gitreview
index fb155a2..7ab5ba8 100644
--- a/.gitreview
+++ b/.gitreview
@@ -2,5 +2,5 @@
 host=gerrit.wikimedia.org
 port=29418
 project=labs/toollabs.git
-defaultbranch=master
+defaultbranch=ubuntu/precise
 defaultrebase=0
diff --git a/debian/changelog b/debian/changelog
index 8ed41f5..379ff65 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,11 +1,12 @@
-toollabs (1.19~dev) trusty; urgency=medium
+toollabs (1.19~dev) precise; urgency=medium
 
   * Remove toolwatcher
   * Do not hardcore database hosts in list-user-databases
   * State dependency on python
   * Set target distribution to Ubuntu Trusty
+  * Set target distribution for branch ubuntu/precise to Ubuntu Precise
 
- -- Tim Landscheidt   Sun, 26 Feb 2017 01:38:04 +
+ -- Tim Landscheidt   Sun, 26 Feb 2017 02:49:21 +
 
 toollabs (1.18) unstable; urgency=medium
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I68582bc68f6745de6eb59f899309f44095f2c932
Gerrit-PatchSet: 1
Gerrit-Project: labs/toollabs
Gerrit-Branch: ubuntu/precise
Gerrit-Owner: Tim Landscheidt 

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


[MediaWiki-commits] [Gerrit] mediawiki...Echo[master]: Fix method name in LoadExtensionSchemaUpdates

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

Change subject: Fix method name in LoadExtensionSchemaUpdates
..


Fix method name in LoadExtensionSchemaUpdates

Bug: T157651
Change-Id: Ib901dd95ddd77f6a1fc700499f9f3815c0ae01d0
---
M Hooks.php
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Catrope: Looks good to me, approved
  WMDE-Fisch: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/Hooks.php b/Hooks.php
index 975985f..29de2c5 100644
--- a/Hooks.php
+++ b/Hooks.php
@@ -201,7 +201,7 @@
if ( $updater->getDB()->indexExists( 'echo_event', 'type_page', 
__METHOD__ ) ) {
$updater->addExtensionIndex( 'echo_event', 
'event_type', "$dir/db_patches/patch-alter-type_page-index.sql" );
}
-   $updater->dropTable( 'echo_subscription' );
+   $updater->dropExtensionTable( 'echo_subscription' );
$updater->dropExtensionField( 'echo_event', 'event_timestamp', 
"$dir/db_patches/patch-drop-echo_event-event_timestamp.sql" );
$updater->addExtensionField( 'echo_email_batch', 
'eeb_event_hash',
"$dir/db_patches/patch-email_batch-new-field.sql" );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib901dd95ddd77f6a1fc700499f9f3815c0ae01d0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: Gergő Tisza 
Gerrit-Reviewer: Anomie 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: WMDE-Fisch 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...RandomFeaturedUser[master]: Convert spaces to tabs per MediaWiki coding conventions

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

Change subject: Convert spaces to tabs per MediaWiki coding conventions
..


Convert spaces to tabs per MediaWiki coding conventions

Change-Id: I03fad1928030d5202d41c3890a7964c456846534
---
M i18n/fi.json
M i18n/fr.json
M i18n/nl.json
3 files changed, 24 insertions(+), 24 deletions(-)

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



diff --git a/i18n/fi.json b/i18n/fi.json
index 3427725..6a408ac 100644
--- a/i18n/fi.json
+++ b/i18n/fi.json
@@ -1,10 +1,10 @@
 {
-"@metadata": {
-"authors": [
-"Jack Phoenix "
-]
-},
-"random-user-points-weekly": "{{PLURAL:$1|yksi piste|$1 pistettä}} tällä 
viikolla",
-"random-user-points-monthly": "{{PLURAL:$1|yksi piste|$1 pistettä}} tässä 
kuussa",
-"random-user-about-me": "Tietoja minusta"
+   "@metadata": {
+   "authors": [
+   "Jack Phoenix "
+   ]
+   },
+   "random-user-points-weekly": "{{PLURAL:$1|yksi piste|$1 pistettä}} 
tällä viikolla",
+   "random-user-points-monthly": "{{PLURAL:$1|yksi piste|$1 pistettä}} 
tässä kuussa",
+   "random-user-about-me": "Tietoja minusta"
 }
diff --git a/i18n/fr.json b/i18n/fr.json
index fd3e7d0..eda9305 100644
--- a/i18n/fr.json
+++ b/i18n/fr.json
@@ -1,10 +1,10 @@
 {
-"@metadata": {
-"authors": [
-"Jack Phoenix "
-]
-},
-"random-user-points-weekly": "{{PLURAL:$1|un point|$1 points}} cette 
semaine",
-"random-user-points-monthly": "{{PLURAL:$1|un point|$1 points}} points ce 
mois-ci",
-"random-user-about-me": "À propos de moi"
+   "@metadata": {
+   "authors": [
+   "Jack Phoenix "
+   ]
+   },
+   "random-user-points-weekly": "{{PLURAL:$1|un point|$1 points}} cette 
semaine",
+   "random-user-points-monthly": "{{PLURAL:$1|un point|$1 points}} points 
ce mois-ci",
+   "random-user-about-me": "À propos de moi"
 }
diff --git a/i18n/nl.json b/i18n/nl.json
index 8dca6f5..7aa0f65 100644
--- a/i18n/nl.json
+++ b/i18n/nl.json
@@ -1,10 +1,10 @@
 {
-"@metadata": {
-"authors": [
-"Mitchel Corstjens"
-]
-},
-"random-user-points-weekly": "{{PLURAL:$1|een punt|$1 punten}} deze week",
-"random-user-points-monthly": "{{PLURAL:$1|een punt|$1 punten}} deze 
month",
-"random-user-about-me": "Over mij"
+   "@metadata": {
+   "authors": [
+   "Mitchel Corstjens"
+   ]
+   },
+   "random-user-points-weekly": "{{PLURAL:$1|een punt|$1 punten}} deze 
week",
+   "random-user-points-monthly": "{{PLURAL:$1|een punt|$1 punten}} deze 
month",
+   "random-user-about-me": "Over mij"
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I03fad1928030d5202d41c3890a7964c456846534
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/RandomFeaturedUser
Gerrit-Branch: master
Gerrit-Owner: SamanthaNguyen 
Gerrit-Reviewer: Jack Phoenix 
Gerrit-Reviewer: SamanthaNguyen 
Gerrit-Reviewer: Siebrand 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...RandomFeaturedUser[master]: Convert spaces to tabs per MediaWiki coding conventions

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

Change subject: Convert spaces to tabs per MediaWiki coding conventions
..

Convert spaces to tabs per MediaWiki coding conventions

Change-Id: I03fad1928030d5202d41c3890a7964c456846534
---
M i18n/fi.json
M i18n/fr.json
M i18n/nl.json
3 files changed, 24 insertions(+), 24 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/RandomFeaturedUser 
refs/changes/15/339915/1

diff --git a/i18n/fi.json b/i18n/fi.json
index 3427725..6a408ac 100644
--- a/i18n/fi.json
+++ b/i18n/fi.json
@@ -1,10 +1,10 @@
 {
-"@metadata": {
-"authors": [
-"Jack Phoenix "
-]
-},
-"random-user-points-weekly": "{{PLURAL:$1|yksi piste|$1 pistettä}} tällä 
viikolla",
-"random-user-points-monthly": "{{PLURAL:$1|yksi piste|$1 pistettä}} tässä 
kuussa",
-"random-user-about-me": "Tietoja minusta"
+   "@metadata": {
+   "authors": [
+   "Jack Phoenix "
+   ]
+   },
+   "random-user-points-weekly": "{{PLURAL:$1|yksi piste|$1 pistettä}} 
tällä viikolla",
+   "random-user-points-monthly": "{{PLURAL:$1|yksi piste|$1 pistettä}} 
tässä kuussa",
+   "random-user-about-me": "Tietoja minusta"
 }
diff --git a/i18n/fr.json b/i18n/fr.json
index fd3e7d0..eda9305 100644
--- a/i18n/fr.json
+++ b/i18n/fr.json
@@ -1,10 +1,10 @@
 {
-"@metadata": {
-"authors": [
-"Jack Phoenix "
-]
-},
-"random-user-points-weekly": "{{PLURAL:$1|un point|$1 points}} cette 
semaine",
-"random-user-points-monthly": "{{PLURAL:$1|un point|$1 points}} points ce 
mois-ci",
-"random-user-about-me": "À propos de moi"
+   "@metadata": {
+   "authors": [
+   "Jack Phoenix "
+   ]
+   },
+   "random-user-points-weekly": "{{PLURAL:$1|un point|$1 points}} cette 
semaine",
+   "random-user-points-monthly": "{{PLURAL:$1|un point|$1 points}} points 
ce mois-ci",
+   "random-user-about-me": "À propos de moi"
 }
diff --git a/i18n/nl.json b/i18n/nl.json
index 8dca6f5..7aa0f65 100644
--- a/i18n/nl.json
+++ b/i18n/nl.json
@@ -1,10 +1,10 @@
 {
-"@metadata": {
-"authors": [
-"Mitchel Corstjens"
-]
-},
-"random-user-points-weekly": "{{PLURAL:$1|een punt|$1 punten}} deze week",
-"random-user-points-monthly": "{{PLURAL:$1|een punt|$1 punten}} deze 
month",
-"random-user-about-me": "Over mij"
+   "@metadata": {
+   "authors": [
+   "Mitchel Corstjens"
+   ]
+   },
+   "random-user-points-weekly": "{{PLURAL:$1|een punt|$1 punten}} deze 
week",
+   "random-user-points-monthly": "{{PLURAL:$1|een punt|$1 punten}} deze 
month",
+   "random-user-about-me": "Over mij"
 }

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

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

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


[MediaWiki-commits] [Gerrit] integration/config[master]: labs/toollabs: Make debian-glue voting

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

Change subject: labs/toollabs: Make debian-glue voting
..

labs/toollabs: Make debian-glue voting

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


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/14/339914/1

diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index c048171..f9f28ac 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -1629,10 +1629,11 @@
   - name: labs/toollabs
 test:
  - tox-jessie
- - debian-glue-non-voting
+ - debian-glue
  - php53lint
 gate-and-submit:
  - tox-jessie
+ - debian-glue
  - php53lint
 
   - name: labs/tools/crosswatch

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibc723c9cf0f14197a4583f25aff8b4dfbbe24405
Gerrit-PatchSet: 1
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Tim Landscheidt 

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


[MediaWiki-commits] [Gerrit] labs/toollabs[master]: Set primary target distribution to Ubuntu Trusty

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

Change subject: Set primary target distribution to Ubuntu Trusty
..


Set primary target distribution to Ubuntu Trusty

Bug: T156886
Bug: T157413
Change-Id: I1e95c4ad3e78e2807f37be0e921a7eaee5d4a183
---
M debian/changelog
1 file changed, 3 insertions(+), 2 deletions(-)

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



diff --git a/debian/changelog b/debian/changelog
index be48185..8ed41f5 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,10 +1,11 @@
-toollabs (1.19~dev) unstable; urgency=medium
+toollabs (1.19~dev) trusty; urgency=medium
 
   * Remove toolwatcher
   * Do not hardcore database hosts in list-user-databases
   * State dependency on python
+  * Set target distribution to Ubuntu Trusty
 
- -- Tim Landscheidt   Sun, 26 Feb 2017 00:34:51 +
+ -- Tim Landscheidt   Sun, 26 Feb 2017 01:38:04 +
 
 toollabs (1.18) unstable; urgency=medium
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1e95c4ad3e78e2807f37be0e921a7eaee5d4a183
Gerrit-PatchSet: 2
Gerrit-Project: labs/toollabs
Gerrit-Branch: master
Gerrit-Owner: Tim Landscheidt 
Gerrit-Reviewer: Coren 
Gerrit-Reviewer: Merlijn van Deen 
Gerrit-Reviewer: Tim Landscheidt 
Gerrit-Reviewer: Yuvipanda 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] labs/toollabs[master]: Set primary target distribution to Ubuntu Trusty

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

Change subject: Set primary target distribution to Ubuntu Trusty
..

Set primary target distribution to Ubuntu Trusty

Bug: T156886
Change-Id: I1e95c4ad3e78e2807f37be0e921a7eaee5d4a183
---
M debian/changelog
1 file changed, 3 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/toollabs 
refs/changes/13/339913/1

diff --git a/debian/changelog b/debian/changelog
index be48185..8ed41f5 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,10 +1,11 @@
-toollabs (1.19~dev) unstable; urgency=medium
+toollabs (1.19~dev) trusty; urgency=medium
 
   * Remove toolwatcher
   * Do not hardcore database hosts in list-user-databases
   * State dependency on python
+  * Set target distribution to Ubuntu Trusty
 
- -- Tim Landscheidt   Sun, 26 Feb 2017 00:34:51 +
+ -- Tim Landscheidt   Sun, 26 Feb 2017 01:38:04 +
 
 toollabs (1.18) unstable; urgency=medium
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1e95c4ad3e78e2807f37be0e921a7eaee5d4a183
Gerrit-PatchSet: 1
Gerrit-Project: labs/toollabs
Gerrit-Branch: master
Gerrit-Owner: Tim Landscheidt 

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


[MediaWiki-commits] [Gerrit] mediawiki...WikibaseLexeme[master]: Remove Fingerprint from the backend

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

Change subject: Remove Fingerprint from the backend
..

Remove Fingerprint from the backend

Bug: T149945
Bug: T134735
Change-Id: I8f670f8dc19f3856290e7d184d83a17e83b7e4f7
---
M src/DataModel/Lexeme.php
M tests/phpunit/composer/DataModel/LexemeTest.php
2 files changed, 2 insertions(+), 38 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikibaseLexeme 
refs/changes/12/339912/1

diff --git a/src/DataModel/Lexeme.php b/src/DataModel/Lexeme.php
index 2f266df..094dbb8 100644
--- a/src/DataModel/Lexeme.php
+++ b/src/DataModel/Lexeme.php
@@ -9,8 +9,6 @@
 use Wikibase\DataModel\Statement\StatementList;
 use Wikibase\DataModel\Statement\StatementListProvider;
 use Wikibase\DataModel\Term\DescriptionsProvider;
-use Wikibase\DataModel\Term\Fingerprint;
-use Wikibase\DataModel\Term\FingerprintProvider;
 use Wikibase\DataModel\Term\LabelsProvider;
 use Wikibase\DataModel\Term\TermList;
 use Wikibase\Lexeme\DataModel\Providers\LanguageProvider;
@@ -20,8 +18,8 @@
 /**
  * @license GPL-2.0+
  */
-class Lexeme implements EntityDocument, StatementListProvider, 
FingerprintProvider,
-   LabelsProvider, DescriptionsProvider, LemmasProvider, 
LexicalCategoryProvider,
+class Lexeme implements EntityDocument, StatementListProvider, LabelsProvider,
+   DescriptionsProvider, LemmasProvider, LexicalCategoryProvider,
LanguageProvider {
 
const ENTITY_TYPE = 'lexeme';
@@ -35,11 +33,6 @@
 * @var StatementList
 */
private $statements;
-
-   /**
-* @var Fingerprint
-*/
-   private $fingerprint;
 
/**
 * @var TermList
@@ -75,8 +68,6 @@
$this->lexicalCategory = $lexicalCategory;
$this->language = $language;
$this->statements = $statements ?: new StatementList();
-   // TODO: Remove this once Wikibase can work without fingerprint
-   $this->fingerprint = new Fingerprint();
}
 
/**
@@ -98,20 +89,6 @@
 */
public function getStatements() {
return $this->statements;
-   }
-
-   /**
-* @return Fingerprint
-*/
-   public function getFingerprint() {
-   return $this->fingerprint;
-   }
-
-   /**
-* @param Fingerprint $fingerprint
-*/
-   public function setFingerprint( Fingerprint $fingerprint ) {
-   $this->fingerprint = $fingerprint;
}
 
/**
diff --git a/tests/phpunit/composer/DataModel/LexemeTest.php 
b/tests/phpunit/composer/DataModel/LexemeTest.php
index 87ada3c..5eab334 100644
--- a/tests/phpunit/composer/DataModel/LexemeTest.php
+++ b/tests/phpunit/composer/DataModel/LexemeTest.php
@@ -8,7 +8,6 @@
 use Wikibase\DataModel\Snak\PropertyNoValueSnak;
 use Wikibase\DataModel\Statement\Statement;
 use Wikibase\DataModel\Statement\StatementList;
-use Wikibase\DataModel\Term\Fingerprint;
 use Wikibase\DataModel\Term\Term;
 use Wikibase\DataModel\Term\TermList;
 use Wikibase\Lexeme\DataModel\Lexeme;
@@ -287,18 +286,6 @@
Statement::RANK_NORMAL,
$lexeme->getStatements()->getFirstStatementWithGuid( 
null )->getRank()
);
-   }
-
-   public function testGetFingerprintSetFingerprint() {
-   $lexeme = new Lexeme( new LexemeId( 'L1' ) );
-
-   $fingerprint = new Fingerprint( new TermList( [ new Term( 'en', 
'English label' ) ] ) );
-
-   $this->assertTrue( $lexeme->getFingerprint()->isEmpty() );
-
-   $lexeme->setFingerprint( $fingerprint );
-
-   $this->assertSame( $fingerprint, $lexeme->getFingerprint() );
}
 
public function testSetLemmas() {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8f670f8dc19f3856290e7d184d83a17e83b7e4f7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikibaseLexeme
Gerrit-Branch: master
Gerrit-Owner: Ladsgroup 

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


[MediaWiki-commits] [Gerrit] labs/toollabs[master]: Expand description of misctools

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

Change subject: Expand description of misctools
..

Expand description of misctools

Bug: T157413
Change-Id: I02ab6285c39907841dfb22fc6a17864f793eec93
---
M debian/changelog
M debian/control
2 files changed, 4 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/toollabs 
refs/changes/11/339911/1

diff --git a/debian/changelog b/debian/changelog
index be48185..2c931d1 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,8 +3,9 @@
   * Remove toolwatcher
   * Do not hardcore database hosts in list-user-databases
   * State dependency on python
+  * Expand description of misctools
 
- -- Tim Landscheidt   Sun, 26 Feb 2017 00:34:51 +
+ -- Tim Landscheidt   Sun, 26 Feb 2017 00:40:59 +
 
 toollabs (1.18) unstable; urgency=medium
 
diff --git a/debian/control b/debian/control
index ee2e5c8..0ad4c50 100644
--- a/debian/control
+++ b/debian/control
@@ -17,7 +17,8 @@
 Depends: ${misc:Depends}, ${shlibs:Depends}, ${python:Depends},
  python, python-mysql.connector
 Description: Miscellaneous Labs-specific tools
- Miscellaneous Labs-specific Tools used on Tool Labs
+ This package contains four tools for use in Tool Labs: become,
+ list-user-databases, setup-tomcat and take.
 
 Package: jobutils
 Architecture: all

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I02ab6285c39907841dfb22fc6a17864f793eec93
Gerrit-PatchSet: 1
Gerrit-Project: labs/toollabs
Gerrit-Branch: master
Gerrit-Owner: Tim Landscheidt 

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


[MediaWiki-commits] [Gerrit] labs/toollabs[master]: State dependency on python

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

Change subject: State dependency on python
..


State dependency on python

Bug: T157413
Change-Id: I67cfe7341eecb29ee8c1141dd260ef5a29e98114
---
M debian/changelog
M debian/control
M jobutils/bin/jsub
3 files changed, 7 insertions(+), 4 deletions(-)

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



diff --git a/debian/changelog b/debian/changelog
index b43d6cf..be48185 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,8 +2,9 @@
 
   * Remove toolwatcher
   * Do not hardcore database hosts in list-user-databases
+  * State dependency on python
 
- -- Tim Landscheidt   Sun, 26 Feb 2017 00:15:16 +
+ -- Tim Landscheidt   Sun, 26 Feb 2017 00:34:51 +
 
 toollabs (1.18) unstable; urgency=medium
 
diff --git a/debian/control b/debian/control
index 633b88a..ee2e5c8 100644
--- a/debian/control
+++ b/debian/control
@@ -14,13 +14,15 @@
 
 Package: misctools
 Architecture: any
-Depends: ${misc:Depends}, ${shlibs:Depends}, ${python:Depends}, 
python-mysql.connector
+Depends: ${misc:Depends}, ${shlibs:Depends}, ${python:Depends},
+ python, python-mysql.connector
 Description: Miscellaneous Labs-specific tools
  Miscellaneous Labs-specific Tools used on Tool Labs
 
 Package: jobutils
 Architecture: all
-Depends: ${misc:Depends}, ${perl:Depends}, ${python:Depends}, 
gridengine-client, libipc-run-perl, libstring-shellquote-perl
+Depends: ${misc:Depends}, ${perl:Depends}, ${python:Depends},
+ gridengine-client, libipc-run-perl, libstring-shellquote-perl, python
 Description: Set of utilities to use on wikimedia bots and tools cluster
  This package will install jstart (jsub) and jstop, the Tool Labs (more)
  user-friendly wrappers to submit jobs to the gridengine
diff --git a/jobutils/bin/jsub b/jobutils/bin/jsub
index 4668fc2..26c46d7 100755
--- a/jobutils/bin/jsub
+++ b/jobutils/bin/jsub
@@ -1,4 +1,4 @@
-#!/usr/bin/python2 -Es
+#!/usr/bin/python -Es
 # -*- coding: utf-8 -*-
 #
 # Submit a job to the job grid.

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I67cfe7341eecb29ee8c1141dd260ef5a29e98114
Gerrit-PatchSet: 2
Gerrit-Project: labs/toollabs
Gerrit-Branch: master
Gerrit-Owner: Tim Landscheidt 
Gerrit-Reviewer: Coren 
Gerrit-Reviewer: Merlijn van Deen 
Gerrit-Reviewer: Tim Landscheidt 
Gerrit-Reviewer: Yuvipanda 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] labs/toollabs[master]: State dependency on python

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

Change subject: State dependency on python
..

State dependency on python

Change-Id: I67cfe7341eecb29ee8c1141dd260ef5a29e98114
---
M debian/changelog
M debian/control
M jobutils/bin/jsub
3 files changed, 7 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/toollabs 
refs/changes/10/339910/1

diff --git a/debian/changelog b/debian/changelog
index b43d6cf..be48185 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,8 +2,9 @@
 
   * Remove toolwatcher
   * Do not hardcore database hosts in list-user-databases
+  * State dependency on python
 
- -- Tim Landscheidt   Sun, 26 Feb 2017 00:15:16 +
+ -- Tim Landscheidt   Sun, 26 Feb 2017 00:34:51 +
 
 toollabs (1.18) unstable; urgency=medium
 
diff --git a/debian/control b/debian/control
index 633b88a..ee2e5c8 100644
--- a/debian/control
+++ b/debian/control
@@ -14,13 +14,15 @@
 
 Package: misctools
 Architecture: any
-Depends: ${misc:Depends}, ${shlibs:Depends}, ${python:Depends}, 
python-mysql.connector
+Depends: ${misc:Depends}, ${shlibs:Depends}, ${python:Depends},
+ python, python-mysql.connector
 Description: Miscellaneous Labs-specific tools
  Miscellaneous Labs-specific Tools used on Tool Labs
 
 Package: jobutils
 Architecture: all
-Depends: ${misc:Depends}, ${perl:Depends}, ${python:Depends}, 
gridengine-client, libipc-run-perl, libstring-shellquote-perl
+Depends: ${misc:Depends}, ${perl:Depends}, ${python:Depends},
+ gridengine-client, libipc-run-perl, libstring-shellquote-perl, python
 Description: Set of utilities to use on wikimedia bots and tools cluster
  This package will install jstart (jsub) and jstop, the Tool Labs (more)
  user-friendly wrappers to submit jobs to the gridengine
diff --git a/jobutils/bin/jsub b/jobutils/bin/jsub
index 4668fc2..26c46d7 100755
--- a/jobutils/bin/jsub
+++ b/jobutils/bin/jsub
@@ -1,4 +1,4 @@
-#!/usr/bin/python2 -Es
+#!/usr/bin/python -Es
 # -*- coding: utf-8 -*-
 #
 # Submit a job to the job grid.

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I67cfe7341eecb29ee8c1141dd260ef5a29e98114
Gerrit-PatchSet: 1
Gerrit-Project: labs/toollabs
Gerrit-Branch: master
Gerrit-Owner: Tim Landscheidt 

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


[MediaWiki-commits] [Gerrit] mediawiki...Comments[master]: Remove HTML4 'name' attribute locally deprecated for anchor ...

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

Change subject: Remove HTML4 'name' attribute locally deprecated for anchor 
element
..

Remove HTML4 'name' attribute locally deprecated for anchor element

The 'name' attribute is HTML4 only and has been marked as obsolete
since HTML5, and replaced by the global attribute 'id'.

References:
- https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#Obsolete
- http://w3c.github.io/html-reference/a.html#a-constraints

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


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

diff --git a/CommentsHooks.php b/CommentsHooks.php
index 7a57d28..497c055 100644
--- a/CommentsHooks.php
+++ b/CommentsHooks.php
@@ -85,7 +85,7 @@
$output = '';
 
if ( $wgCommentsSortDescending ) { // form before comments
-   $output .= '';
+   $output .= '';
if ( !wfReadOnly() ) {
$output .= $commentsPage->displayForm();
} else {
@@ -105,7 +105,7 @@
} else {
$output .= wfMessage( 'comments-db-locked' 
)->parse();
}
-   $output .= '';
+   $output .= '';
}
 
$output .= ''; // div.comments-body

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

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

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


[MediaWiki-commits] [Gerrit] labs/toollabs[master]: Do not hardcore database hosts in list-user-databases

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

Change subject: Do not hardcore database hosts in list-user-databases
..


Do not hardcore database hosts in list-user-databases

The database host that served c2.labsdb was decommissioned and is no
longer accessible.  This causes list-user-databases to fail because
c2.labsdb is in the hardcoded list of database servers to check for a
user's databases.

There is no easy authoritative source for a list of active database
servers; role::labs::db::maintain_dbusers lists all database servers,
but does not differentiate between hosts that are accessible from the
Labs network and hosts that are firewalled.  Therefore this change
removes the hardcoded list completely and instead requires that
list-user-databases is called with an explicit list of database
servers to check for a user's database.

For the active database servers current at the time of this change,
list-user-databases would be invoked as:

| $ list-user-databases -H labsdb1001.eqiad.wmnet \
|   -H labsdb1003.eqiad.wmnet \
|   -H labsdb1005.eqiad.wmnet \
|   /path/to/replica.my.cnf

Change-Id: I861375502a04a839db69fa1b92e4acfecf6470e1
---
M debian/changelog
M misctools/list-user-databases
M misctools/list-user-databases.1.in
3 files changed, 23 insertions(+), 10 deletions(-)

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



diff --git a/debian/changelog b/debian/changelog
index c6f5d53..b43d6cf 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,8 +1,9 @@
 toollabs (1.19~dev) unstable; urgency=medium
 
   * Remove toolwatcher
+  * Do not hardcore database hosts in list-user-databases
 
- -- Tim Landscheidt   Tue, 07 Feb 2017 15:57:45 +
+ -- Tim Landscheidt   Sun, 26 Feb 2017 00:15:16 +
 
 toollabs (1.18) unstable; urgency=medium
 
diff --git a/misctools/list-user-databases b/misctools/list-user-databases
index cc9f374..5dc81eb 100755
--- a/misctools/list-user-databases
+++ b/misctools/list-user-databases
@@ -7,12 +7,13 @@
 
 import mysql.connector
 
-# Servers to search databases on.
-DATABASE_SERVERS = ('c1.labsdb', 'c2.labsdb', 'c3.labsdb', 'tools.labsdb')
-
 if __name__ == '__main__':
 # Get list of defaults files to extract user information from.
 parser = argparse.ArgumentParser(description='List databases owned by 
users, given by the credentials files.')
+parser.add_argument('-H', '--host',
+action='append',
+required=True,
+help='database hosts to check')
 parser.add_argument('mycnffilenames',
 metavar='MYCNFFILENAME',
 nargs='+',
@@ -25,7 +26,7 @@
 username = c.get('client', 'user').strip("'")
 password = c.get('client', 'password').strip("'")
 databases_found = []
-for server in DATABASE_SERVERS:
+for server in args.host:
 conn = mysql.connector.connect(user=username,
password=password,
host=server,
diff --git a/misctools/list-user-databases.1.in 
b/misctools/list-user-databases.1.in
index d32ec71..0af7574 100644
--- a/misctools/list-user-databases.1.in
+++ b/misctools/list-user-databases.1.in
@@ -2,16 +2,27 @@
 .SH NAME
 list-user-databases \- list databases a MySQL account has access to
 .SH SYNOPSIS
-.B list-user-databases
+.B list-user-databases -H
+.I host
+.RB [ -H
+.I host
+\[char46]..]
 .I filename
-.RI [filename ...]
+.RI [ filename
+\[char46]..]
 .SH DESCRIPTION
 .B list-user-databases
-lists all databases on the replica servers and
-.I tools.labsdb
-that the user has access to whose
+lists all databases on the given database servers that the user has
+access to whose
 .I replica.my.cnf
 file has been given as a command line argument.
+
+A list of potential database servers to check against can be gathered
+from
+.IR operation/puppet 's
+.IR modules/role/manifests/labs/db/maintain_dbusers.pp .
+Note that some of the database servers listed there are not accessible
+from Labs and connection attempts will time out.
 .SH EXIT STATUS
 In case of success,
 .B list-user-databases

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I861375502a04a839db69fa1b92e4acfecf6470e1
Gerrit-PatchSet: 2
Gerrit-Project: labs/toollabs
Gerrit-Branch: master
Gerrit-Owner: Tim Landscheidt 
Gerrit-Reviewer: Coren 
Gerrit-Reviewer: Merlijn van Deen 
Gerrit-Reviewer: Tim Landscheidt 
Gerrit-Reviewer: Yuvipanda 
Gerrit-Reviewer: 

[MediaWiki-commits] [Gerrit] oojs/ui[master]: demos: Extract remaining widgets from widgets.js

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

Change subject: demos: Extract remaining widgets from widgets.js
..


demos: Extract remaining widgets from widgets.js

Just copy-paste and move into the Demo namespace.

Bug: T158592
Change-Id: I76b876e6a28583cb2a282824f064de2e8a8adc7e
---
A demos/classes/DraggableGroupWidget.js
A demos/classes/DraggableHandledItemWidget.js
A demos/classes/DraggableItemWidget.js
A demos/classes/NumberLookupTextInputWidget.js
A demos/classes/UnsupportedSelectFileWidget.js
M demos/index.html
M demos/pages/widgets.js
7 files changed, 145 insertions(+), 145 deletions(-)

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



diff --git a/demos/classes/DraggableGroupWidget.js 
b/demos/classes/DraggableGroupWidget.js
new file mode 100644
index 000..aa13875
--- /dev/null
+++ b/demos/classes/DraggableGroupWidget.js
@@ -0,0 +1,19 @@
+/**
+ * Draggable group widget containing drag/drop items
+ *
+ * @param {Object} [config] Configuration options
+ */
+Demo.DraggableGroupWidget = function DemoDraggableGroupWidget( config ) {
+   // Configuration initialization
+   config = config || {};
+
+   // Parent constructor
+   Demo.DraggableGroupWidget.parent.call( this, config );
+
+   // Mixin constructors
+   OO.ui.mixin.DraggableGroupElement.call( this, $.extend( {}, config, { 
$group: this.$element } ) );
+};
+
+/* Setup */
+OO.inheritClass( Demo.DraggableGroupWidget, OO.ui.Widget );
+OO.mixinClass( Demo.DraggableGroupWidget, OO.ui.mixin.DraggableGroupElement );
diff --git a/demos/classes/DraggableHandledItemWidget.js 
b/demos/classes/DraggableHandledItemWidget.js
new file mode 100644
index 000..8efffc9
--- /dev/null
+++ b/demos/classes/DraggableHandledItemWidget.js
@@ -0,0 +1,19 @@
+/**
+ * Drag/drop items with custom handle
+ *
+ * @param {Object} [config] Configuration options
+ */
+Demo.DraggableHandledItemWidget = function DemoDraggableHandledItemWidget( 
config ) {
+   // Configuration initialization
+   config = config || {};
+
+   // Parent constructor
+   Demo.DraggableHandledItemWidget.parent.call( this, config );
+
+   // Mixin constructors
+   OO.ui.mixin.DraggableElement.call( this, $.extend( { $handle: 
this.$icon }, config ) );
+};
+
+/* Setup */
+OO.inheritClass( Demo.DraggableHandledItemWidget, OO.ui.DecoratedOptionWidget 
);
+OO.mixinClass( Demo.DraggableHandledItemWidget, OO.ui.mixin.DraggableElement );
diff --git a/demos/classes/DraggableItemWidget.js 
b/demos/classes/DraggableItemWidget.js
new file mode 100644
index 000..bc86360
--- /dev/null
+++ b/demos/classes/DraggableItemWidget.js
@@ -0,0 +1,19 @@
+/**
+ * Drag/drop items
+ *
+ * @param {Object} [config] Configuration options
+ */
+Demo.DraggableItemWidget = function DemoDraggableItemWidget( config ) {
+   // Configuration initialization
+   config = config || {};
+
+   // Parent constructor
+   Demo.DraggableItemWidget.parent.call( this, config );
+
+   // Mixin constructors
+   OO.ui.mixin.DraggableElement.call( this, config );
+};
+
+/* Setup */
+OO.inheritClass( Demo.DraggableItemWidget, OO.ui.DecoratedOptionWidget );
+OO.mixinClass( Demo.DraggableItemWidget, OO.ui.mixin.DraggableElement );
diff --git a/demos/classes/NumberLookupTextInputWidget.js 
b/demos/classes/NumberLookupTextInputWidget.js
new file mode 100644
index 000..4bca4b7
--- /dev/null
+++ b/demos/classes/NumberLookupTextInputWidget.js
@@ -0,0 +1,65 @@
+/**
+ * Demo for LookupElement.
+ *
+ * @class
+ * @extends OO.ui.TextInputWidget
+ * @mixins OO.ui.mixin.LookupElement
+ *
+ * @constructor
+ * @param {Object} config Configuration options
+ */
+Demo.NumberLookupTextInputWidget = function DemoNumberLookupTextInputWidget( 
config ) {
+   // Parent constructor
+   OO.ui.TextInputWidget.call( this, { validate: 'integer' } );
+   // Mixin constructors
+   OO.ui.mixin.LookupElement.call( this, config );
+};
+OO.inheritClass( Demo.NumberLookupTextInputWidget, OO.ui.TextInputWidget );
+OO.mixinClass( Demo.NumberLookupTextInputWidget, OO.ui.mixin.LookupElement );
+
+/**
+ * @inheritdoc
+ */
+Demo.NumberLookupTextInputWidget.prototype.getLookupRequest = function () {
+   var
+   value = this.getValue(),
+   deferred = $.Deferred(),
+   delay = 500 + Math.floor( Math.random() * 500 );
+
+   this.getValidity().then( function () {
+   // Resolve with results after a faked delay
+   setTimeout( function () {
+   deferred.resolve( [ value * 1, value * 2, value * 3, 
value * 4, value * 5 ] );
+   }, delay );
+   }, function () {
+   // No results when the input contains invalid content
+   deferred.resolve( [] );
+   } );
+
+   return deferred.promise( { abort: function () {} } );
+};

[MediaWiki-commits] [Gerrit] pywikibot/core[master]: Add Šteins as a valid globe due to usage on Wikidata

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

Change subject: Add Šteins as a valid globe due to usage on Wikidata
..

Add Šteins as a valid globe due to usage on Wikidata

See https://www.wikidata.org/wiki/Special:WhatLinksHere/Q150249 for usage.

Change-Id: I90c06637769d62f2538bda6c29fa0c71a6c937be
---
M pywikibot/families/wikidata_family.py
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/08/339908/1

diff --git a/pywikibot/families/wikidata_family.py 
b/pywikibot/families/wikidata_family.py
index b2f8d44..f695a20 100644
--- a/pywikibot/families/wikidata_family.py
+++ b/pywikibot/families/wikidata_family.py
@@ -79,6 +79,7 @@
 'phoebe': 'http://www.wikidata.org/entity/Q17975',
 'pluto': 'http://www.wikidata.org/entity/Q339',
 'rhea': 'http://www.wikidata.org/entity/Q15050',
+'steins': 'http://www.wikidata.org/entity/Q150249',
 'tethys': 'http://www.wikidata.org/entity/Q15047',
 'titan': 'http://www.wikidata.org/entity/Q2565',
 'titania': 'http://www.wikidata.org/entity/Q3322',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I90c06637769d62f2538bda6c29fa0c71a6c937be
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Smalyshev 

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


[MediaWiki-commits] [Gerrit] oojs/ui[master]: demos: Extract CapsuleNumberPopupMultiselectWidget from the ...

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

Change subject: demos: Extract CapsuleNumberPopupMultiselectWidget from the 
demo code
..


demos: Extract CapsuleNumberPopupMultiselectWidget from the demo code

Bug: T158592
Change-Id: If6a2229ca9ffa1b67a9b705c2b08562f6afad281
---
A demos/classes/CapsuleNumberPopupMultiselectWidget.js
M demos/index.html
M demos/pages/widgets.js
3 files changed, 26 insertions(+), 19 deletions(-)

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



diff --git a/demos/classes/CapsuleNumberPopupMultiselectWidget.js 
b/demos/classes/CapsuleNumberPopupMultiselectWidget.js
new file mode 100644
index 000..ca8a533
--- /dev/null
+++ b/demos/classes/CapsuleNumberPopupMultiselectWidget.js
@@ -0,0 +1,24 @@
+Demo.CapsuleNumberPopupMultiselectWidget = function 
DemoCapsuleNumberPopupMultiselectWidget( config ) {
+   // Properties
+   this.capsulePopupWidget = new OO.ui.NumberInputWidget( {
+   isInteger: true
+   } );
+
+   // Parent constructor
+   Demo.CapsuleNumberPopupMultiselectWidget.parent.call( this, $.extend( 
{}, config, {
+   allowArbitrary: true,
+   popup: { $content: this.capsulePopupWidget.$element }
+   } ) );
+
+   // Events
+   this.capsulePopupWidget.connect( this, { enter: 'onPopupEnter' } );
+};
+
+OO.inheritClass( Demo.CapsuleNumberPopupMultiselectWidget, 
OO.ui.CapsuleMultiselectWidget );
+
+Demo.CapsuleNumberPopupMultiselectWidget.prototype.onPopupEnter = function () {
+   if ( !isNaN( this.capsulePopupWidget.getNumericValue() ) ) {
+   this.addItemsFromData( [ 
this.capsulePopupWidget.getNumericValue() ] );
+   this.capsulePopupWidget.setValue( '' );
+   }
+};
diff --git a/demos/index.html b/demos/index.html
index 567f606..f5bd319 100644
--- a/demos/index.html
+++ b/demos/index.html
@@ -16,6 +16,7 @@



+   



diff --git a/demos/pages/widgets.js b/demos/pages/widgets.js
index 56ebbdf..2ecec45 100644
--- a/demos/pages/widgets.js
+++ b/demos/pages/widgets.js
@@ -2,7 +2,6 @@
var i, fieldsets,
loremIpsum = 'Lorem ipsum dolor sit amet, consectetur 
adipisicing elit, ' +
'sed do eiusmod tempor incididunt ut labore et dolore 
magna aliqua.\u200E',
-   capsuleWithPopup, capsulePopupWidget,
textInputForLabel, labelForTextInput,
horizontalDragItems = [],
verticalDragItems = [],
@@ -169,23 +168,6 @@
UnsupportedSelectFileWidget.static.isSupported = function () {
return false;
};
-
-   capsulePopupWidget = new OO.ui.NumberInputWidget( {
-   isInteger: true
-   } );
-   capsulePopupWidget.connect( capsulePopupWidget, {
-   enter: function () {
-   if ( !isNaN( this.getNumericValue() ) ) {
-   capsuleWithPopup.addItemsFromData( [ 
this.getNumericValue() ] );
-   this.setValue( '' );
-   }
-   return false;
-   }
-   } );
-   capsuleWithPopup = new OO.ui.CapsuleMultiselectWidget( {
-   allowArbitrary: true,
-   popup: { $content: capsulePopupWidget.$element }
-   } );
 
textInputForLabel = new OO.ui.TextInputWidget( { value: 'Input for 
label above' } );
labelForTextInput = new OO.ui.LabelWidget( {
@@ -1527,7 +1509,7 @@
}
),
new OO.ui.FieldLayout(
-   capsuleWithPopup,
+   new 
Demo.CapsuleNumberPopupMultiselectWidget(),
{
label: 
'CapsuleMultiselectWidget with NumberInputWidget popup\u200E',
align: 'top'

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If6a2229ca9ffa1b67a9b705c2b08562f6afad281
Gerrit-PatchSet: 1
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] oojs/ui[master]: styles: Improve vertical alignment of elements' & widgets' i...

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

Change subject: styles: Improve vertical alignment of elements' & widgets' icons
..


styles: Improve vertical alignment of elements' & widgets' icons

For better flexibility in layout, independent of fonts or base
`font-size` used, we're replacing our current `em` sized positioning
with a full-height positioning across widgets and same treatment for
ButtonElement icons in MediaWiki theme. Also cleaning-up inheritance,
putting basic logic into widgets across instead of each theme
separately and cleaning up CSS/Less code.

Bug: T158486
Change-Id: Ie3598034b484e9ecf1fe42abbbc547c4b80a4e0d
---
M src/styles/elements/ButtonElement.less
M src/styles/widgets/CapsuleMultiselectWidget.less
M src/styles/widgets/DropdownWidget.less
M src/styles/widgets/SelectFileWidget.less
M src/themes/apex/elements.less
M src/themes/apex/widgets.less
M src/themes/mediawiki/common.less
M src/themes/mediawiki/elements.less
M src/themes/mediawiki/widgets.less
9 files changed, 54 insertions(+), 66 deletions(-)

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



diff --git a/src/styles/elements/ButtonElement.less 
b/src/styles/elements/ButtonElement.less
index 60903d2..11a6d52 100644
--- a/src/styles/elements/ButtonElement.less
+++ b/src/styles/elements/ButtonElement.less
@@ -26,9 +26,10 @@
}
 
&.oo-ui-indicatorElement > .oo-ui-buttonElement-button > 
.oo-ui-indicatorElement-indicator,
-   &.oo-ui-iconElement > .oo-ui-buttonElement-button > 
.oo-ui-iconElement-icon,
-   &.oo-ui-labelElement > .oo-ui-buttonElement-button > 
.oo-ui-labelElement-label {
-   display: inline-block; // For vertical alignment
+   &.oo-ui-labelElement > .oo-ui-buttonElement-button > 
.oo-ui-labelElement-label,
+   &-frameless.oo-ui-iconElement > .oo-ui-buttonElement-button > 
.oo-ui-iconElement-icon {
+   // Vertical align text
+   display: inline-block;
vertical-align: middle;
}
 
diff --git a/src/styles/widgets/CapsuleMultiselectWidget.less 
b/src/styles/widgets/CapsuleMultiselectWidget.less
index 0fd88af..93edfa3 100644
--- a/src/styles/widgets/CapsuleMultiselectWidget.less
+++ b/src/styles/widgets/CapsuleMultiselectWidget.less
@@ -8,6 +8,13 @@
width: 100%;
display: block;
position: relative;
+
+   > .oo-ui-iconElement-icon,
+   > .oo-ui-indicatorElement-indicator {
+   position: absolute;
+   top: 0;
+   height: 100%;
+   }
}
 
&-content {
diff --git a/src/styles/widgets/DropdownWidget.less 
b/src/styles/widgets/DropdownWidget.less
index 7c29693..36311cb 100644
--- a/src/styles/widgets/DropdownWidget.less
+++ b/src/styles/widgets/DropdownWidget.less
@@ -14,9 +14,11 @@
.oo-ui-unselectable();
.oo-ui-box-sizing( border-box );
 
-   .oo-ui-indicatorElement-indicator,
-   .oo-ui-iconElement-icon {
+   .oo-ui-iconElement-icon,
+   .oo-ui-indicatorElement-indicator {
position: absolute;
+   top: 0;
+   height: 100%;
}
}
 
diff --git a/src/styles/widgets/SelectFileWidget.less 
b/src/styles/widgets/SelectFileWidget.less
index ea89d8f..a7dcb73 100644
--- a/src/styles/widgets/SelectFileWidget.less
+++ b/src/styles/widgets/SelectFileWidget.less
@@ -46,6 +46,8 @@
> .oo-ui-indicatorElement-indicator,
> .oo-ui-iconElement-icon {
position: absolute;
+   top: 0;
+   height: 100%;
}
 
.oo-ui-widget-disabled & {
diff --git a/src/themes/apex/elements.less b/src/themes/apex/elements.less
index 78900ca..d0dbda3 100644
--- a/src/themes/apex/elements.less
+++ b/src/themes/apex/elements.less
@@ -122,6 +122,9 @@
> .oo-ui-buttonElement-button > .oo-ui-iconElement-icon 
{
margin-left: -0.5em;
margin-right: -0.5em;
+   // Vertical align text
+   display: inline-block;
+   vertical-align: middle;
}
 
&.oo-ui-labelElement > .oo-ui-buttonElement-button > 
.oo-ui-iconElement-icon {
diff --git a/src/themes/apex/widgets.less b/src/themes/apex/widgets.less
index b4b1576..e55e627 100644
--- a/src/themes/apex/widgets.less
+++ b/src/themes/apex/widgets.less
@@ -111,21 +111,19 @@
border-color: rgba( 0, 0, 0, 0.2 );
}
 
-   .oo-ui-indicatorElement-indicator {
-   top: 0;
-

[MediaWiki-commits] [Gerrit] labs/toollabs[master]: Remove toolwatcher

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

Change subject: Remove toolwatcher
..


Remove toolwatcher

toolwatcher has been replaced by operation/puppet's
modules/role/files/labs/db/maintain-dbusers.py and
modules/toollabs/files/maintain-kubeusers.  The directories cgi-bin
and public_html are no longer created by default.

Change-Id: I644bc5cd8d2d2cc0d94d3a8884ff8b33e11dd135
---
M configure.ac
M debian/changelog
M debian/misctools.install
M debian/misctools.manpages
M misctools/.gitignore
M misctools/Makefile.am
D misctools/toolwatcher
D misctools/toolwatcher.8.in
8 files changed, 7 insertions(+), 63 deletions(-)

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



diff --git a/configure.ac b/configure.ac
index 5041f1f..1cc660e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -34,7 +34,6 @@
  misctools/Makefile
  misctools/become.1
  misctools/list-user-databases.1
- misctools/toolwatcher.8
  src/Makefile
  src/take.1
  tests/Makefile])
diff --git a/debian/changelog b/debian/changelog
index b17cf44..c6f5d53 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+toollabs (1.19~dev) unstable; urgency=medium
+
+  * Remove toolwatcher
+
+ -- Tim Landscheidt   Tue, 07 Feb 2017 15:57:45 +
+
 toollabs (1.18) unstable; urgency=medium
 
   * jsub: Change IOError string substitution conversion from '%e'
diff --git a/debian/misctools.install b/debian/misctools.install
index 7493d64..8480b2b 100644
--- a/debian/misctools.install
+++ b/debian/misctools.install
@@ -2,4 +2,3 @@
 usr/bin/list-user-databases
 usr/bin/take
 usr/bin/setup-tomcat
-usr/sbin/toolwatcher
diff --git a/debian/misctools.manpages b/debian/misctools.manpages
index e198cda..52c8ebc 100644
--- a/debian/misctools.manpages
+++ b/debian/misctools.manpages
@@ -1,4 +1,3 @@
 debian/tmp/usr/share/man/man1/become.1
 debian/tmp/usr/share/man/man1/list-user-databases.1
 debian/tmp/usr/share/man/man1/take.1
-debian/tmp/usr/share/man/man8/toolwatcher.8
diff --git a/misctools/.gitignore b/misctools/.gitignore
index c4d5659..5b26402 100644
--- a/misctools/.gitignore
+++ b/misctools/.gitignore
@@ -2,4 +2,3 @@
 /Makefile.in
 /become.1
 /list-user-databases.1
-/toolwatcher.8
diff --git a/misctools/Makefile.am b/misctools/Makefile.am
index c8e19e7..4d2ee2b 100644
--- a/misctools/Makefile.am
+++ b/misctools/Makefile.am
@@ -1,3 +1,2 @@
-man_MANS = become.1 list-user-databases.1 toolwatcher.8
+man_MANS = become.1 list-user-databases.1
 bin_SCRIPTS = become list-user-databases setup-tomcat
-sbin_SCRIPTS = toolwatcher
diff --git a/misctools/toolwatcher b/misctools/toolwatcher
deleted file mode 100755
index 35d0d50..000
--- a/misctools/toolwatcher
+++ /dev/null
@@ -1,38 +0,0 @@
-#!/bin/bash
-#
-# Copyright © 2013 Marc-André Pelletier 
-#
-# Permission to use, copy, modify, and/or distribute this software for any
-# purpose with or without fee is hereby granted, provided that the above
-# copyright notice and this permission notice appear in all copies.
-#
-# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
-cd /data/project
-export HOME=/root
-PREFIX=$(cat /etc/wmflabs-project)
-
-while true; do
-# Iterate over all service groups of this project.
-getent passwd | sed -ne "s/^$PREFIX\\.\([^:]\+\):.*\$/\\1/p;" | while read 
TOOL; do
-# If the service group's home directory doesn't exist already,
-# create it with a basic structure and especially set setgid
-# on the directories so that files created are owned by the
-# service group's group.
-if [ ! -d "$TOOL" ]; then
-logger -t toolwatcher "Creating tool $TOOL"
-
-mkdir -m u=rwx,g=rwsx,o=rx "$TOOL" "$TOOL/public_html"
-chown -R "$PREFIX.$TOOL:$PREFIX.$TOOL" "$TOOL"
-fi
-done
-
-# Sleep for two minutes.
-sleep 120
-done
diff --git a/misctools/toolwatcher.8.in b/misctools/toolwatcher.8.in
deleted file mode 100644
index db072cb..000
--- a/misctools/toolwatcher.8.in
+++ /dev/null
@@ -1,19 +0,0 @@
-.TH TOOLWATCHER 8 @TOOLLABS_RELEASEDATE@ @PACKAGE_VERSION@ "Wikimedia Labs 
Tools misctools"
-.SH NAME
-toolwatcher \- create home directories for tool accounts
-.SH SYNOPSIS
-.B toolwatcher
-.SH DESCRIPTION
-.B toolwatcher
-is a daemon that 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Database: Remove weird commented-out block

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

Change subject: Database: Remove weird commented-out block
..


Database: Remove weird commented-out block

Commented out in 033b6b9646da6b71c5bb9dd6803a662bcf510a99 (r20329).
After ten years, I think it's safe to bet this won't ever be getting
un-commented.

Change-Id: Ibb1f3e2969b2d81f6f2a17fff57e9b05cc17d58b
---
M includes/libs/rdbms/database/Database.php
M includes/libs/rdbms/database/DatabasePostgres.php
2 files changed, 2 insertions(+), 14 deletions(-)

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



diff --git a/includes/libs/rdbms/database/Database.php 
b/includes/libs/rdbms/database/Database.php
index 1c5c77e..a7952a6 100644
--- a/includes/libs/rdbms/database/Database.php
+++ b/includes/libs/rdbms/database/Database.php
@@ -1141,12 +1141,6 @@
 
$preLimitTail .= $this->makeOrderBy( $options );
 
-   // if (isset($options['LIMIT'])) {
-   //  $tailOpts .= $this->limitResult('', $options['LIMIT'],
-   //  isset($options['OFFSET']) ? $options['OFFSET']
-   //  : false);
-   // }
-
if ( isset( $noKeyOptions['FOR UPDATE'] ) ) {
$postLimitTail .= ' FOR UPDATE';
}
diff --git a/includes/libs/rdbms/database/DatabasePostgres.php 
b/includes/libs/rdbms/database/DatabasePostgres.php
index 109f848..c62fec1 100644
--- a/includes/libs/rdbms/database/DatabasePostgres.php
+++ b/includes/libs/rdbms/database/DatabasePostgres.php
@@ -1079,8 +1079,8 @@
$q = <makeGroupByWithHaving( $options );
 
$preLimitTail .= $this->makeOrderBy( $options );
-
-   // if ( isset( $options['LIMIT'] ) ) {
-   //  $tailOpts .= $this->limitResult( '', $options['LIMIT'],
-   //  isset( $options['OFFSET'] ) ? $options['OFFSET']
-   //  : false );
-   // }
 
if ( isset( $options['FOR UPDATE'] ) ) {
$postLimitTail .= ' FOR UPDATE OF ' .

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibb1f3e2969b2d81f6f2a17fff57e9b05cc17d58b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: FeedUtils: Remove weird commented-out block

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

Change subject: FeedUtils: Remove weird commented-out block
..


FeedUtils: Remove weird commented-out block

This has been added in 58f7bb30a04d6c1f137cc1659b8998c5349bf13e (r36376),
already commented-out, and was moved and amended several times until
it became completely out of place.

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

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



diff --git a/includes/FeedUtils.php b/includes/FeedUtils.php
index 071a3db..e143a4c 100644
--- a/includes/FeedUtils.php
+++ b/includes/FeedUtils.php
@@ -129,13 +129,6 @@
}
 
if ( $oldid ) {
-
-   # $diffText = $de->getDiff( wfMessage( 'revisionasof',
-   #   $wgLang->timeanddate( $timestamp ),
-   #   $wgLang->date( $timestamp ),
-   #   $wgLang->time( $timestamp ) )->text(),
-   #   wfMessage( 'currentrev' )->text() );
-
$diffText = '';
// Don't bother generating the diff if we won't be able 
to show it
if ( $wgFeedDiffCutoff > 0 ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I11b6e3e2fbb2d0a325a6723bf5874133a7f53851
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Have toolbar append toolbarDialogs container

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

Change subject: Have toolbar append toolbarDialogs container
..


Have toolbar append toolbarDialogs container

Append/prepend depending on toolbar position.

Change-Id: I4ae51ec44c53344bda5db4240109cac383b8013f
---
M src/init/ve.init.Target.js
M src/ui/styles/dialogs/ve.ui.ToolbarDialog.css
M src/ui/ve.ui.PositionedTargetToolbar.js
3 files changed, 21 insertions(+), 7 deletions(-)

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



diff --git a/src/init/ve.init.Target.js b/src/init/ve.init.Target.js
index 8571a98..970a69d 100644
--- a/src/init/ve.init.Target.js
+++ b/src/init/ve.init.Target.js
@@ -519,7 +519,6 @@
toolbar.setup( this.constructor.static.toolbarGroups, surface );
actions.setup( this.constructor.static.actionGroups, surface );
this.attachToolbar();
-   toolbar.$bar.append( surface.getToolbarDialogs().$element );
toolbar.$actions.append( actions.$element );
rAF( this.onContainerScrollHandler );
 };
diff --git a/src/ui/styles/dialogs/ve.ui.ToolbarDialog.css 
b/src/ui/styles/dialogs/ve.ui.ToolbarDialog.css
index 3e81c78..77befac 100644
--- a/src/ui/styles/dialogs/ve.ui.ToolbarDialog.css
+++ b/src/ui/styles/dialogs/ve.ui.ToolbarDialog.css
@@ -11,7 +11,6 @@
 .ve-ui-toolbarDialog-position-above {
overflow-y: hidden;
max-height: 0;
-   border-top: 1px solid #ddd;
/* stylelint-disable no-unsupported-browser-features */
-webkit-transition: max-height 250ms;
-moz-transition: max-height 250ms;
@@ -19,6 +18,14 @@
/* stylelint-enable no-unsupported-browser-features */
 }
 
+.oo-ui-toolbar-position-top .ve-ui-toolbarDialog-position-above {
+   border-top: 1px solid #ddd;
+}
+
+.oo-ui-toolbar-position-bottom .ve-ui-toolbarDialog-position-above {
+   border-bottom: 1px solid #ddd;
+}
+
 .ve-ui-toolbarDialog-position-above.oo-ui-window-ready {
/* approximate max height for transition */
max-height: 150px;
diff --git a/src/ui/ve.ui.PositionedTargetToolbar.js 
b/src/ui/ve.ui.PositionedTargetToolbar.js
index 99faf5c..3ecf5f8 100644
--- a/src/ui/ve.ui.PositionedTargetToolbar.js
+++ b/src/ui/ve.ui.PositionedTargetToolbar.js
@@ -41,11 +41,18 @@
 /**
  * @inheritdoc
  */
-ve.ui.PositionedTargetToolbar.prototype.setup = function () {
+ve.ui.PositionedTargetToolbar.prototype.setup = function ( groups, surface ) {
+   var toolbarDialogs = surface.getToolbarDialogs();
+
// Parent method
ve.ui.PositionedTargetToolbar.super.prototype.setup.apply( this, 
arguments );
 
-   this.getSurface().getToolbarDialogs().connect( this, {
+   if ( this.position === 'bottom' ) {
+   this.$bar.prepend( toolbarDialogs.$element );
+   } else {
+   this.$bar.append( toolbarDialogs.$element );
+   }
+   toolbarDialogs.connect( this, {
opening: 'onToolbarDialogsOpeningOrClosing',
closing: 'onToolbarDialogsOpeningOrClosing'
} );
@@ -235,18 +242,19 @@
  */
 ve.ui.PositionedTargetToolbar.prototype.onViewportResize = function () {
var win, viewportDimensions,
-   surface = this.getSurface();
+   surface = this.getSurface(),
+   toolbarDialogs = surface.getToolbarDialogs();
 
if ( !surface ) {
return;
}
 
-   win = surface.getToolbarDialogs().getCurrentWindow();
+   win = toolbarDialogs.getCurrentWindow();
 
if ( win && win.constructor.static.position === 'side' ) {
viewportDimensions = surface.getViewportDimensions();
if ( viewportDimensions ) {
-   
surface.getToolbarDialogs().getCurrentWindow().$frame.css(
+   toolbarDialogs.getCurrentWindow().$frame.css(
'height', Math.min( 
surface.getBoundingClientRect().height, viewportDimensions.height )
);
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4ae51ec44c53344bda5db4240109cac383b8013f
Gerrit-PatchSet: 2
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Esanders 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...SocialProfile[master]: Basic clean up of CSS to MediaWiki CSS coding conventions

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

Change subject: Basic clean up of CSS to MediaWiki CSS coding conventions
..

Basic clean up of CSS to MediaWiki CSS coding conventions

- 0px to 0
- shorthanded values, e.g 0 0 0 0 -> 0 or #ff to #fff
- lowercased color values, #DCDCDC -> #dcdcdc
- name color values to hex color values, e.g white to #fff
- organized properties (not part of MW CSS CC, but organization is
  important)

Change-Id: I9e09683ca0bfe7b73eedf2e37c33da6c261d70e7
---
M SystemGifts/SystemGift.css
M UserActivity/UserActivity.css
M UserBoard/BoardBlast.css
M UserBoard/UserBoard.css
M UserBoard/i18n/en.json
M UserGifts/UserGifts.css
M UserProfile/UserProfile.css
M UserRelationship/UserRelationship.css
M UserStats/TopList.css
M UserWelcome/UserWelcome.css
10 files changed, 387 insertions(+), 389 deletions(-)


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

diff --git a/SystemGifts/SystemGift.css b/SystemGifts/SystemGift.css
index dbb8ff0..f2f1123 100644
--- a/SystemGifts/SystemGift.css
+++ b/SystemGifts/SystemGift.css
@@ -1,28 +1,28 @@
-.back-links {
-   margin: 0px 0px 10px 0px;
+700.back-links {
+   margin: 0 0 10px 0;
 }
 
 .back-links a {
+   font-weight: 700;
text-decoration: none;
-   font-weight: bold;
 }
 
 .ga-count {
-   margin: 0px 0px 15px 0px;
+   margin: 0 0 15px 0;
 }
 
 .ga-item {
-   border: 1px solid #D7DEE8;
+   border: 1px solid #d7dee8;
padding: 7px;
float: left;
-   margin: 0px 15px 15px 0px;
+   margin: 0 15px 15px 0;
width: 350px;
 }
 
 .ga-item a {
-   text-decoration: none;
-   font-weight: bold;
font-size: 14px;
+   font-weight: 700;
+   text-decoration: none;
 }
 
 .ga-item img {
@@ -31,51 +31,51 @@
padding: 3px;
display: block;
float: left;
-   margin: 0px 10px 0px 0px;
+   margin: 0 10px 0 0;
 }
 
 .page-nav a {
-   font-weight: bold;
+   font-weight: 700;
 }
 
 .ga-new {
background-color: #FFFB9B;
border: 1px solid #FDC745;
-   font-weight: bold;
-   padding: 0px 5px;
+   font-weight:  700;
+   padding: 0 5px;
 }
 
 .ga-name {
font-size: 16px;
-   font-weight: bold;
-   margin: 0px 0px 2px;
+   font-weight: 700;
+   margin: 0 0 2px;
 }
 
 .ga-timestamp {
font-size: 9px;
color: #999;
-   margin: 0px 0px 5px 0px;
+   margin: 0 0 5px 0;
 }
 
 .ga-description-message {
-   margin: 0px 0px 5px 0px;
+   margin: 0 0 5px 0;
color: #666;
-   font-weight: bold;
+   font-weight: 700;
 }
 
 .ga-gift-count {
font-size: 9px;
-   margin: 0px 0px 10px 0px;
+   margin: 0 0 10px 0;
 }
 
 .ga-description-container {
width: 480px;
-   margin: 20px 0px;
+   margin: 20px 0;
 }
 
 .ga-recent {
-   border-top: 1px solid #EFEFEF;
-   padding: 10px 0px 0px 0px;
+   border-top: 1px solid #efefef;
+   padding: 10px 0 0 0;
 }
 
 .ga-recent img {
@@ -83,7 +83,7 @@
padding: 3px;
background-color: #fff;
border: 1px solid #dcdcdc;
-   margin: 0px 10px 0px 0px;
+   margin: 0 10px 0 0;
 }
 
 .ga-recent a {
@@ -94,17 +94,17 @@
 
 .ga-recent-title {
font-size: 14px;
-   font-weight: bold;
+   font-weight: 700;
color: #777;
-   margin: 0px 0px 2px 0px;
+   margin: 0 0 2px 0;
 }
 
 .ga-recent-item {
-   margin: 0px 0px 5px 0px;
+   margin: 0 0 5px 0;
 }
 
 .ga-description {
-   padding: 0px 0px 15px 0px;
+   padding: 0 0 15px 0;
 }
 
 .ga-description img {
@@ -113,7 +113,7 @@
padding: 3px;
display: block;
float: left;
-   margin: 0px 10px 0px 0px;
+   margin: 0 10px 0 0;
 }
 
 /* Special:SystemGiftManager */
@@ -129,9 +129,9 @@
 }
 
 .view-form {
-   font-weight: 800;
+   color: #666;
font-size: 12px;
-   color: #66;
+   font-weight: 800;
width: 200px;
 }
 
@@ -140,16 +140,16 @@
 }
 
 .view-status {
-   font-weight: 800;
+   background-color: #fffb9b;
+   color: #666;
font-size: 12px;
-   background-color: #FFFB9B;
-   color: #66;
+   font-weight: 800;
padding: 5px;
margin-bottom: 5px;
 }
 
 a.ga-remove-link {
-   color: red;
+   color: #ff0;
font-size: 10px;
 }
 
@@ -160,7 +160,7 @@
 }
 
 table td.title-cell {
-   color: #66;
+   color: #666;
font-weight: 800;
padding: 5px;
 }
@@ -178,73 +178,73 @@
 
 .top-awards-navigation {
float: right;
-   margin: 15px 0px 0px 0px;
+   margin: 15px 0 0 0;
width: 20%;
 }
 
 .top-awards-navigation p {
-   margin: 0px 0px 3px 0px;
+   margin: 0 0 3px 0;
 }
 
 .top-awards-navigation a {
-   font-weight: bold;
+   font-weight: 

[MediaWiki-commits] [Gerrit] pywikibot/core[master]: djvu.py: added features and refactored

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

Change subject: djvu.py: added features and refactored
..

djvu.py: added features and refactored

Added:
- cache control decorator
- page number check decorator
- retrieval of page info from djvu file

Refactored:
- tiny wrapper of subprocess Popen() to reduce code repetition
- unicode support of filenames

Added tests.

Change-Id: Idf465abe0f9aab3d7c213098ae02335269740ecf
---
A djvu_ext.py
M pywikibot/tools/djvu.py
R tests/data/djvu/myfilé.djvu
M tests/djvu_tests.py
4 files changed, 309 insertions(+), 45 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/06/339906/1

diff --git a/djvu_ext.py b/djvu_ext.py
new file mode 100644
index 000..abe5e89
--- /dev/null
+++ b/djvu_ext.py
@@ -0,0 +1,95 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+"""Wrapper around djvulibre to access djvu files properties and content."""
+from __future__ import absolute_import, unicode_literals
+
+import collections
+import os
+import re
+
+import pywikibot
+import pywikibot.bot
+import pywikibot.logging
+
+from pywikibot.tools.djvu import DjVuFile, call_cmd
+
+_logger = 'djvu_ext'
+pywikibot.bot.init_handlers()
+
+
+class MyDjVuFile(DjVuFile):
+
+"""Extend class DjVuFile(object)."""
+
+def __init__(self, *args, **kwargs):
+"""Constructor."""
+super(MyDjVuFile, self).__init__(*args, **kwargs)
+
+# tmp files for creation/insertion of a white page.
+self._white_ppm = os.path.join(self.dirname, 'white_page.ppm')
+self._white_djvu = os.path.join(self.dirname, 'white_page.djvu')
+
+def replace_first_page(self):
+"""Replace first page of djvu file with blank page."""
+size, dpi = self.get_most_common_info()
+
+# Generate white_page.
+res, data = call_cmd(['convert', '-size', size, 'xc:white', 
self._white_ppm],
+ lib='ImageMagik')
+if not res:
+return False
+
+# Convert white_page to djvu.
+res, data = call_cmd(['c44', self._white_ppm, '-dpi', dpi])
+os.unlink(self._white_ppm)  # rm white_page.ppm before retuning.
+if not res:
+return False
+
+# Delete first page.
+# Get ids of first two pages for later checks.
+n = self.number_of_images()
+id1, _ = self.page_info(1)
+info_p2 = self.page_info(2)
+res, data = call_cmd(['djvm', '-d', self.file, '1'])
+if not res:
+return False
+
+# insert new first page
+res, data = call_cmd(['djvm', '-i', self.file, self._white_djvu, '1'])
+os.unlink(self._white_djvu)  # rm white_page.djvu before returning.
+if not res:
+return False
+
+# Check if page processing is as expected.
+expected_id = '{%s}' % os.path.basename(self._white_djvu)
+assert self.number_of_images(force=True) == n
+assert self.page_info(1) == (expected_id, (size, dpi))  # white page 
id.
+assert self.page_info(2) == info_p2  # original 2nd page info.
+
+return True
+
+
+file = u'Fréud_-_Reflections_on_war_and_death.djvu'
+
+args = ['djvudump', file]
+call_cmd(['djvudump', file], lib='djvulibre')
+
+args = ['djvudump', file + '0']
+call_cmd(args, lib='djvulibre')
+
+djvuf = MyDjVuFile(file)
+res = djvuf.page_info(3)
+print(res)
+
+try:
+res = djvuf.page_info(-1)
+except ValueError as e:
+pywikibot.output(e)
+else:
+print(res)
+
+sd = djvuf.get_most_common_info()
+print(sd)
+djvuf.replace_first_page()
+cnt = collections.Counter(s_d for _, s_d in djvuf._get_page_info().values())
+print(cnt)
\ No newline at end of file
diff --git a/pywikibot/tools/djvu.py b/pywikibot/tools/djvu.py
index da7c595..8756fec 100644
--- a/pywikibot/tools/djvu.py
+++ b/pywikibot/tools/djvu.py
@@ -2,7 +2,7 @@
 # -*- coding: utf-8 -*-
 """Wrapper around djvulibre to access djvu files properties and content."""
 #
-# (C) Pywikibot team, 2015-2016
+# (C) Pywikibot team, 2015-2017
 #
 # Distributed under the terms of the MIT license.
 #
@@ -10,10 +10,55 @@
 
 __version__ = '$Id$'
 
-import os.path
+import collections
+import os
+import re
 import subprocess
+import sys
 
-from pywikibot.logging import error
+import pywikibot
+
+if sys.version_info[0] > 2:
+basestring = (str,)
+unicode = str
+
+
+def call_cmd(args, lib='djvulibre'):
+"""
+Tiny wrapper around subprocess.Popen().
+
+@param args: same as Popen()
+@type args: sequence or string
+
+@param library: library to be logged in logging messages
+@type library: string
+
+@param log: log process output; errors are always logged.
+@type library: bool
+
+
+@return: returns a tuple (res, stdoutdata), where
+res is True if dp.returncode != 0 else False
+"""
+if not isinstance(args, basestring):
+# upcast if any param 

[MediaWiki-commits] [Gerrit] mediawiki...SocialProfile[master]: Remove unused action-message, 'action-userboard-delete'

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

Change subject: Remove unused action-message, 'action-userboard-delete'
..


Remove unused action-message, 'action-userboard-delete'

This is a partial revert of Id9611c51b56187cccb74e1cceec854399ad0dd9a.

Change-Id: I898435d7ab5acd22955ae2d0a95fb5de7bf35aea
---
M UserBoard/i18n/en.json
1 file changed, 0 insertions(+), 1 deletion(-)

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



diff --git a/UserBoard/i18n/en.json b/UserBoard/i18n/en.json
index 76ef97e..25a9a0e 100644
--- a/UserBoard/i18n/en.json
+++ b/UserBoard/i18n/en.json
@@ -47,7 +47,6 @@
"userboard_loggedout": "You must be [[Special:UserLogin|logged in]] to 
post messages to other users.",
"userboard_showingmessages": "Showing {{PLURAL:$4|message $3|messages 
$2-$3}} of {{PLURAL:$1|$1 message|$1 messages}}.",
"right-userboard-delete": "Delete others' board messages",
-   "action-userboard-delete": "delete others' board messages",
"userboard-time-days": "{{PLURAL:$1|one day|$1 days}}",
"userboard-time-hours": "{{PLURAL:$1|one hour|$1 hours}}",
"userboard-time-minutes": "{{PLURAL:$1|one minute|$1 minutes}}",

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I898435d7ab5acd22955ae2d0a95fb5de7bf35aea
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SocialProfile
Gerrit-Branch: master
Gerrit-Owner: SamanthaNguyen 
Gerrit-Reviewer: Jack Phoenix 
Gerrit-Reviewer: Lewis Cawte 
Gerrit-Reviewer: Siebrand 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] pywikibot/core[master]: wikisourcetext.py: remove misleading option -force

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

Change subject: wikisourcetext.py: remove misleading option -force
..

wikisourcetext.py: remove misleading option -force

Remove -force.
It is not possible to preload text if a page is already existing.
The latest text is loaded anyhow, so when trying to override, nothing
will happen.

Change-Id: Ia93c945a57c11bf7a0e99284629461d357b99c66
---
M scripts/wikisourcetext.py
1 file changed, 2 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/05/339905/1

diff --git a/scripts/wikisourcetext.py b/scripts/wikisourcetext.py
index 2dd0e45..ef85a45 100644
--- a/scripts/wikisourcetext.py
+++ b/scripts/wikisourcetext.py
@@ -27,14 +27,11 @@
 -summary:  custom edit summary.
Use quotes if edit summary contains spaces.
 
--force overwrites existing text
-   optional, default False
-
 -alwaysdon't bother asking to confirm any of the changes.
 
 """
 #
-# (C) Pywikibot team, 2016
+# (C) Pywikibot team, 2017
 #
 # Distributed under the terms of the MIT license.
 #
@@ -71,7 +68,6 @@
 @type generator: generator
 """
 self.availableOptions.update({
-'force': False,
 'showdiff': False,
 'summary': 'Uploading text'
 })
@@ -90,7 +86,7 @@
 new_text = page.text
 
 summary = self.getOption('summary')
-if page.exists() and not self.getOption('force'):
+if page.exists():
 pywikibot.output('Page %s already exists, not adding!' % page)
 else:
 self.userPut(page, old_text, new_text,
@@ -123,8 +119,6 @@
 options['showdiff'] = True
 elif arg == '-summary':
 options['summary'] = value
-elif arg == '-force':
-options['force'] = True
 elif arg == '-always':
 options['always'] = True
 else:

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia93c945a57c11bf7a0e99284629461d357b99c66
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Mpaa 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Miscellaneous indentation tweaks

2017-02-25 Thread Code Review
Bartosz Dziewoński has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/339904 )

Change subject: Miscellaneous indentation tweaks
..

Miscellaneous indentation tweaks

I was bored. What? Don't look at me that way.

I mostly targetted mixed tabs and spaces, but others were not spared.
Note that some of the whitespace changes are inside HTML output,
extended regexps or SQL snippets.

Change-Id: Ie206cc946459f6befcfc2d520e35ad3ea3c0f1e0
---
M docs/uidesign/child-selector-emu.html
M includes/Block.php
M includes/DefaultSettings.php
M includes/EditPage.php
M includes/GlobalFunctions.php
M includes/MagicWord.php
M includes/PHPVersionCheck.php
M includes/Sanitizer.php
M includes/Title.php
M includes/api/ApiLogin.php
M includes/api/ApiQueryRecentChanges.php
M includes/content/ContentHandler.php
M includes/content/FileContentHandler.php
M includes/content/TextContentHandler.php
M includes/content/WikiTextStructure.php
M includes/content/WikitextContentHandler.php
M includes/debug/MWDebug.php
M includes/debug/logger/monolog/KafkaHandler.php
M includes/diff/WordAccumulator.php
M includes/exception/UserNotLoggedIn.php
M includes/export/WikiExporter.php
M includes/htmlform/HTMLForm.php
M includes/http/Http.php
M includes/installer/PostgresUpdater.php
M includes/installer/SqliteInstaller.php
M includes/installer/WebInstallerOutput.php
M includes/jobqueue/JobQueueRedis.php
M includes/jobqueue/jobs/RefreshLinksJob.php
M includes/jobqueue/utils/BacklinkJobUtils.php
M includes/libs/CSSMin.php
M includes/libs/CryptHKDF.php
M includes/libs/StatusValue.php
M includes/libs/mime/mime.info
M includes/libs/objectcache/RESTBagOStuff.php
M includes/libs/objectcache/WinCacheBagOStuff.php
M includes/libs/xmp/XMP.php
M includes/mail/UserMailer.php
M includes/media/DjVuImage.php
M includes/media/Jpeg.php
M includes/parser/DateFormatter.php
M includes/parser/Parser.php
M includes/registration/Processor.php
M includes/registration/VersionChecker.php
M includes/search/SearchIndexFieldDefinition.php
M includes/session/SessionManagerInterface.php
M includes/session/SessionProvider.php
M includes/skins/BaseTemplate.php
M includes/specialpage/LoginSignupSpecialPage.php
M includes/specials/SpecialRecentchanges.php
M includes/specials/SpecialStatistics.php
M includes/tidy/Balancer.php
M includes/user/User.php
M includes/utils/BatchRowIterator.php
M includes/utils/MWCryptHKDF.php
M languages/Language.php
M languages/LanguageConverter.php
M languages/classes/LanguageKsh.php
M languages/classes/LanguageLa.php
M languages/classes/LanguageOs.php
M languages/messages/MessagesEn.php
M maintenance/hhvm/makeRepo.php
M maintenance/importImages.php
M maintenance/oracle/archives/patch-ar_sha1_field.sql
M maintenance/oracle/archives/patch-rev_sha1_field.sql
M maintenance/oracle/archives/patch-us_chunk_inx_field.sql
M maintenance/postgres/archives/patch-uploadstash.sql
M maintenance/userDupes.inc
M resources/src/mediawiki.action/mediawiki.action.view.redirectPage.css
M resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.FiltersViewModel.js
M resources/src/mediawiki.skinning/content.parsoid.less
M resources/src/mediawiki/mediawiki.storage.js
M resources/src/mediawiki/page/gallery-slideshow.js
M tests/phpunit/autoload.ide.php
M tests/phpunit/includes/MWNamespaceTest.php
M tests/phpunit/includes/MessageTest.php
M tests/phpunit/includes/content/ContentHandlerTest.php
M tests/phpunit/includes/db/LBFactoryTest.php
M tests/phpunit/includes/objectcache/RESTBagOStuffTest.php
M tests/phpunit/includes/search/SearchIndexFieldTest.php
M tests/phpunit/includes/utils/UIDGeneratorTest.php
M tests/phpunit/suite.xml
81 files changed, 341 insertions(+), 312 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/04/339904/1

diff --git a/docs/uidesign/child-selector-emu.html 
b/docs/uidesign/child-selector-emu.html
index dedb3a6..9db4c54 100644
--- a/docs/uidesign/child-selector-emu.html
+++ b/docs/uidesign/child-selector-emu.html
@@ -26,7 +26,7 @@
 
/** second table. Try to emulate child selector */
table.childemu th,
-   table.childemu td {
+   table.childemu td {
border: 1px red solid;
background-color:white;
padding:1em;
diff --git a/includes/Block.php b/includes/Block.php
index 66b9ff0..2b6d8ee 100644
--- a/includes/Block.php
+++ b/includes/Block.php
@@ -1142,7 +1142,7 @@
 * Get all blocks that match any IP from an array of IP addresses
 *
 * @param array $ipChain List of IPs (strings), usually retrieved from 
the
-* X-Forwarded-For header of the request
+* X-Forwarded-For header of the request
 * @param bool $isAnon Exclude anonymous-only blocks if false
 * @param bool $fromMaster Whether 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Database: Remove weird commented-out block

2017-02-25 Thread Code Review
Bartosz Dziewoński has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/339903 )

Change subject: Database: Remove weird commented-out block
..

Database: Remove weird commented-out block

Commented out in 033b6b9646da6b71c5bb9dd6803a662bcf510a99 (r20329).
After ten years, I think it's safe to bet this won't ever be getting
un-commented.

Change-Id: Ibb1f3e2969b2d81f6f2a17fff57e9b05cc17d58b
---
M includes/libs/rdbms/database/Database.php
M includes/libs/rdbms/database/DatabasePostgres.php
2 files changed, 2 insertions(+), 14 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/03/339903/1

diff --git a/includes/libs/rdbms/database/Database.php 
b/includes/libs/rdbms/database/Database.php
index 1c5c77e..a7952a6 100644
--- a/includes/libs/rdbms/database/Database.php
+++ b/includes/libs/rdbms/database/Database.php
@@ -1141,12 +1141,6 @@
 
$preLimitTail .= $this->makeOrderBy( $options );
 
-   // if (isset($options['LIMIT'])) {
-   //  $tailOpts .= $this->limitResult('', $options['LIMIT'],
-   //  isset($options['OFFSET']) ? $options['OFFSET']
-   //  : false);
-   // }
-
if ( isset( $noKeyOptions['FOR UPDATE'] ) ) {
$postLimitTail .= ' FOR UPDATE';
}
diff --git a/includes/libs/rdbms/database/DatabasePostgres.php 
b/includes/libs/rdbms/database/DatabasePostgres.php
index 109f848..c62fec1 100644
--- a/includes/libs/rdbms/database/DatabasePostgres.php
+++ b/includes/libs/rdbms/database/DatabasePostgres.php
@@ -1079,8 +1079,8 @@
$q = <makeGroupByWithHaving( $options );
 
$preLimitTail .= $this->makeOrderBy( $options );
-
-   // if ( isset( $options['LIMIT'] ) ) {
-   //  $tailOpts .= $this->limitResult( '', $options['LIMIT'],
-   //  isset( $options['OFFSET'] ) ? $options['OFFSET']
-   //  : false );
-   // }
 
if ( isset( $options['FOR UPDATE'] ) ) {
$postLimitTail .= ' FOR UPDATE OF ' .

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibb1f3e2969b2d81f6f2a17fff57e9b05cc17d58b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: FeedUtils: Remove weird commented-out block

2017-02-25 Thread Code Review
Bartosz Dziewoński has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/339902 )

Change subject: FeedUtils: Remove weird commented-out block
..

FeedUtils: Remove weird commented-out block

This has been added in 58f7bb30a04d6c1f137cc1659b8998c5349bf13e (r36376),
already commented-out, and was moved and amended several times until
it became completely out of place.

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


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/02/339902/1

diff --git a/includes/FeedUtils.php b/includes/FeedUtils.php
index 071a3db..e143a4c 100644
--- a/includes/FeedUtils.php
+++ b/includes/FeedUtils.php
@@ -129,13 +129,6 @@
}
 
if ( $oldid ) {
-
-   # $diffText = $de->getDiff( wfMessage( 'revisionasof',
-   #   $wgLang->timeanddate( $timestamp ),
-   #   $wgLang->date( $timestamp ),
-   #   $wgLang->time( $timestamp ) )->text(),
-   #   wfMessage( 'currentrev' )->text() );
-
$diffText = '';
// Don't bother generating the diff if we won't be able 
to show it
if ( $wgFeedDiffCutoff > 0 ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I11b6e3e2fbb2d0a325a6723bf5874133a7f53851
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński 

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


[MediaWiki-commits] [Gerrit] mediawiki...SocialProfile[master]: Remove unused action-message, 'action-userboard-delete'

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

Change subject: Remove unused action-message, 'action-userboard-delete'
..

Remove unused action-message, 'action-userboard-delete'

This is a partial revert of Id9611c51b56187cccb74e1cceec854399ad0dd9a.

Change-Id: I898435d7ab5acd22955ae2d0a95fb5de7bf35aea
---
M UserBoard/i18n/en.json
1 file changed, 0 insertions(+), 1 deletion(-)


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

diff --git a/UserBoard/i18n/en.json b/UserBoard/i18n/en.json
index 76ef97e..25a9a0e 100644
--- a/UserBoard/i18n/en.json
+++ b/UserBoard/i18n/en.json
@@ -47,7 +47,6 @@
"userboard_loggedout": "You must be [[Special:UserLogin|logged in]] to 
post messages to other users.",
"userboard_showingmessages": "Showing {{PLURAL:$4|message $3|messages 
$2-$3}} of {{PLURAL:$1|$1 message|$1 messages}}.",
"right-userboard-delete": "Delete others' board messages",
-   "action-userboard-delete": "delete others' board messages",
"userboard-time-days": "{{PLURAL:$1|one day|$1 days}}",
"userboard-time-hours": "{{PLURAL:$1|one hour|$1 hours}}",
"userboard-time-minutes": "{{PLURAL:$1|one minute|$1 minutes}}",

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...CollaborationKit[master]: Remove JS functionality for logged-out users for join button.

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

Change subject: Remove JS functionality for logged-out users for join button.
..


Remove JS functionality for logged-out users for join button.

The project join button assumes the existence of a user account. Logged
out users lack this, so this removes the "join" button from the member
list itself. The button is still technically there on the hub page, but
the JavaScript functionality is removed, so logged out users can still
technically join projects (to the extent they're already allowed to join
WikiProjects).

Change-Id: Iadc48eca8f9ed65d32578148b0cd54903c5d4e7f
---
M modules/ext.CollaborationKit.list.members.js
1 file changed, 5 insertions(+), 2 deletions(-)

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



diff --git a/modules/ext.CollaborationKit.list.members.js 
b/modules/ext.CollaborationKit.list.members.js
index c873679..bb72d2c 100644
--- a/modules/ext.CollaborationKit.list.members.js
+++ b/modules/ext.CollaborationKit.list.members.js
@@ -88,7 +88,10 @@
};
 
$( function () {
-   if ( mw.config.get( 'wgCollaborationKitAssociatedMemberList' ) 
) {
+   // Workflow assumes existence of username, so we filter against 
it
+   // However, since !curUserIsInList, the button will still 
render. It will just use no-JS
+   // behavior instead.
+   if ( mw.config.get( 'wgCollaborationKitAssociatedMemberList' ) 
&& !mw.user.isAnon() ) {
memberListPage = mw.config.get( 
'wgCollaborationKitAssociatedMemberList' );
curUserIsInList( memberListPage ); // removes Join 
button if user already is member
new mw.Api().get( {
@@ -108,7 +111,7 @@
}
 
if ( mw.config.get( 'wgCollaborationKitIsMemberList' ) &&
-   !curUserIsInList()
+   !curUserIsInList() && !mw.user.isAnon()  // Workflow 
assumes existence of username
) {
$list = $( '.mw-ck-list' );
$list.before(

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iadc48eca8f9ed65d32578148b0cd54903c5d4e7f
Gerrit-PatchSet: 5
Gerrit-Project: mediawiki/extensions/CollaborationKit
Gerrit-Branch: master
Gerrit-Owner: Harej 
Gerrit-Reviewer: Harej 
Gerrit-Reviewer: Isarra 
Gerrit-Reviewer: Jack Phoenix 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] oojs/ui[master]: MediaWiki theme: Fix TextInputWidget inline label misalignment

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

Change subject: MediaWiki theme: Fix TextInputWidget inline label misalignment
..

MediaWiki theme: Fix TextInputWidget inline label misalignment

Fixing vertical misalignment of TextInputWidget inline labels
by mirroring input attributes.

Change-Id: I27a8c100057aa3d53b9bcc2ac66b07bfe3a46601
---
M src/themes/mediawiki/widgets.less
1 file changed, 3 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/40/339840/1

diff --git a/src/themes/mediawiki/widgets.less 
b/src/themes/mediawiki/widgets.less
index 910d5a2..96d6c65 100644
--- a/src/themes/mediawiki/widgets.less
+++ b/src/themes/mediawiki/widgets.less
@@ -854,8 +854,9 @@
 
> .oo-ui-labelElement-label {
color: @color-subtle;
-   padding: 0.4em;
-   line-height: 1.5;
+   margin-top: 1px; // making up for `border` on `input`
+   padding: @padding-top-input-text @padding-widget-default 
@padding-widget-default; // same as `input` above
+   line-height: 1.172em;
}
 
&-labelPosition-after {

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...CollaborationKit[master]: Resolve redirects on Collaboration Hub

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

Change subject: Resolve redirects on Collaboration Hub
..


Resolve redirects on Collaboration Hub

If an embedded page is a redirect, CollaborationHubContent will
resolve the redirect through a new method called redirectProof.

Change-Id: I5a251c426c3664c07e2dedea95b010836d070920
---
M includes/content/CollaborationHubContent.php
1 file changed, 22 insertions(+), 4 deletions(-)

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



diff --git a/includes/content/CollaborationHubContent.php 
b/includes/content/CollaborationHubContent.php
index e0c649d..1f0410a 100644
--- a/includes/content/CollaborationHubContent.php
+++ b/includes/content/CollaborationHubContent.php
@@ -155,6 +155,24 @@
}
 
/**
+* Resolves the redirect of a Title if it is in fact a redirect.
+*
+* Consistent with general MediaWiki behavior, this function does
+* not resolve double redirects.
+*
+* @param Title $title Title which may or may not be a redirect
+* @return Title
+*/
+   public function redirectProof( Title $title ) {
+   if ( $title->isRedirect() ) {
+   $articleID = $title->getArticleID();
+   $wikipage = WikiPage::newFromID( $articleID );
+   return $wikipage->getRedirectTarget();
+   }
+   return $title;
+   }
+
+   /**
 * @return string
 */
public function getIntroduction() {
@@ -351,7 +369,7 @@
}
 
$membersPageName = $title->getFullText() . '/' . wfMessage( 
'collaborationkit-hub-pagetitle-members' )->inContentLanguage()->text();
-   $membersTitle = Title::newFromText( $membersPageName );
+   $membersTitle = $this->redirectProof( Title::newFromText( 
$membersPageName ) );
if ( ( $membersTitle->exists() && 
$membersTitle->getContentModel() == 'CollaborationListContent' ) || 
$membersContent !== null ) {
$membersPageID = $membersTitle->getArticleID();
$output->addJsConfigVars( 
'wgCollaborationKitAssociatedMemberList', $membersPageID );
@@ -425,7 +443,7 @@
 */
protected function getParsedAnnouncements( Title $title, ParserOptions 
$options, $announcementsText = null ) {
$announcementsSubpageName = wfMessage( 
'collaborationkit-hub-pagetitle-announcements' )->inContentLanguage()->text();
-   $announcementsTitle = Title::newFromText( $title->getFullText() 
. '/' . $announcementsSubpageName );
+   $announcementsTitle = $this->redirectProof( Title::newFromText( 
$title->getFullText() . '/' . $announcementsSubpageName ) );
 
if ( $announcementsTitle->exists() || $announcementsText !== 
null ) {
if ( $announcementsText === null ) {
@@ -515,7 +533,7 @@
if ( !isset( $item['title'] ) || $item['title'] == '' ) 
{
continue;
}
-   $spTitle = Title::newFromText( $item['title'] );
+   $spTitle = $this->redirectProof( Title::newFromText( 
$item['title'] ) );
$spRev = Revision::newFromTitle( $spTitle );
 
// open element and do header
@@ -607,7 +625,7 @@
static $tocLinks = []; // All used ids for the sections for the 
toc
$linkRenderer = $wgParser->getLinkRenderer();
 
-   $spTitle = Title::newFromText( $contentItem['title'] );
+   $spTitle = $this->redirectProof( Title::newFromText( 
$contentItem['title'] ) );
$spRev = Revision::newFromTitle( $spTitle );
 
// Get display name

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5a251c426c3664c07e2dedea95b010836d070920
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/CollaborationKit
Gerrit-Branch: master
Gerrit-Owner: Harej 
Gerrit-Reviewer: Harej 
Gerrit-Reviewer: Isarra 
Gerrit-Reviewer: Jack Phoenix 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...ContentTranslation[master]: DON'T MERGE: UI: message for API error when publishing: inva...

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

Change subject: DON'T MERGE: UI: message for API error when publishing: 
invalidtitle
..

DON'T MERGE: UI: message for API error when publishing: invalidtitle

Hello, it's my first commit to this extension :)
This commit fix bad error message that is printed when user whant to
publish to a bad page title (code === 'invalidtitle').
I've used the existing mediawiki core message 'title-invalid-characters',
but I did not understand how "register" this message. So in this form
client haven't it and it's printed hard-coded :(
Can you help me ? Thanks !

Bug: T159054
Change-Id: If82b2d625bb9a61f12c302397d82058daa61cbae
---
M modules/publish/ext.cx.publish.js
1 file changed, 3 insertions(+), 1 deletion(-)


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

diff --git a/modules/publish/ext.cx.publish.js 
b/modules/publish/ext.cx.publish.js
index 47da28d..397b376 100644
--- a/modules/publish/ext.cx.publish.js
+++ b/modules/publish/ext.cx.publish.js
@@ -289,7 +289,9 @@
} else {
// Try providing useful error information. "Unknown" by 
default.
error = mw.msg( 'unknown-error' );
-   if ( details.error && details.error.info ) {
+   if (code === 'invalidtitle') {
+   error = mw.message( 'title-invalid-characters', 
this.targetTitle ).text())
+   } else if ( details.error && details.error.info ) {
// 
{"servedby":"mw","error":{"code":"blocked","info":"You have been blocked 
from editing",
// "*":"See ...
error = details.error.info;

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...CollaborationKit[master]: Support for redirects upon page move

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

Change subject: Support for redirects upon page move
..


Support for redirects upon page move

Change-Id: I46c09d35ab532afc7d96b77531ebc348efbf52aa
---
M includes/content/CollaborationHubContent.php
M includes/content/CollaborationHubContentHandler.php
M includes/content/CollaborationListContentHandler.php
3 files changed, 52 insertions(+), 1 deletion(-)

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



diff --git a/includes/content/CollaborationHubContent.php 
b/includes/content/CollaborationHubContent.php
index dfb0d33..e0c649d 100644
--- a/includes/content/CollaborationHubContent.php
+++ b/includes/content/CollaborationHubContent.php
@@ -352,7 +352,7 @@
 
$membersPageName = $title->getFullText() . '/' . wfMessage( 
'collaborationkit-hub-pagetitle-members' )->inContentLanguage()->text();
$membersTitle = Title::newFromText( $membersPageName );
-   if ( $membersTitle->exists() || $membersContent !== null ) {
+   if ( ( $membersTitle->exists() && 
$membersTitle->getContentModel() == 'CollaborationListContent' ) || 
$membersContent !== null ) {
$membersPageID = $membersTitle->getArticleID();
$output->addJsConfigVars( 
'wgCollaborationKitAssociatedMemberList', $membersPageID );
 
diff --git a/includes/content/CollaborationHubContentHandler.php 
b/includes/content/CollaborationHubContentHandler.php
index 0df3534..6d7c704 100644
--- a/includes/content/CollaborationHubContentHandler.php
+++ b/includes/content/CollaborationHubContentHandler.php
@@ -105,6 +105,29 @@
}
 
/**
+* @return bool
+*/
+   public function supportsRedirects() {
+   return true;
+   }
+
+   /**
+* Turns CollaborationHubContent page into redirect
+*
+* Note that wikitext redirects are created, as generally, this content 
model
+* is used in namespaces that support wikitext, and wikitext redirects 
are
+* expected.
+*
+* @param Title $destination The page to redirect to
+* @param string $text Text to include in the redirect.
+* @return Content
+*/
+   public function makeRedirectContent( Title $destination, $text = '' ) {
+   $handler = new WikitextContentHandler();
+   return $handler->makeRedirectContent( $destination, $text );
+   }
+
+   /**
 * Edit a Collaboration Hub via the edit API
 * @param Title $title
 * @param string $displayName
diff --git a/includes/content/CollaborationListContentHandler.php 
b/includes/content/CollaborationListContentHandler.php
index d8f11c3..b443d04 100644
--- a/includes/content/CollaborationListContentHandler.php
+++ b/includes/content/CollaborationListContentHandler.php
@@ -129,9 +129,37 @@
return false;
}
 */
+
+   /**
+* @return bool
+*/
public function supportsDirectApiEditing() {
return true;
}
+
+   /**
+* @return bool
+*/
+   public function supportsRedirects() {
+   return true;
+   }
+
+   /**
+* Turns CollaborationListContent page into redirect
+*
+* Note that wikitext redirects are created, as generally, this content 
model
+* is used in namespaces that support wikitext, and wikitext redirects 
are
+* expected.
+*
+* @param Title $destination The page to redirect to
+* @param string $text Text to include in the redirect.
+* @return Content
+*/
+   public function makeRedirectContent( Title $destination, $text = '' ) {
+   $handler = new WikitextContentHandler();
+   return $handler->makeRedirectContent( $destination, $text );
+   }
+
/**
 * Posts the newly created "members" list on-wiki.
 *

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I46c09d35ab532afc7d96b77531ebc348efbf52aa
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CollaborationKit
Gerrit-Branch: master
Gerrit-Owner: Harej 
Gerrit-Reviewer: Brian Wolff 
Gerrit-Reviewer: Daniel Kinzler 
Gerrit-Reviewer: Isarra 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...CollaborationKit[master]: Fix CollaborationKitToC section link behavior

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

Change subject: Fix CollaborationKitToC section link behavior
..


Fix CollaborationKitToC section link behavior

The internal name for a feature's display name is "displayTitle"
not "display_title".

Change-Id: I83fca73e2367ed93360597cc82c05fcf792c5405
---
M includes/content/CollaborationHubTOC.php
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/includes/content/CollaborationHubTOC.php 
b/includes/content/CollaborationHubTOC.php
index d3ef18e..8196a4f 100644
--- a/includes/content/CollaborationHubTOC.php
+++ b/includes/content/CollaborationHubTOC.php
@@ -56,8 +56,8 @@
continue;
}
$title = Title::newFromText( $item['title'] );
-   if ( isset( $item['display_title'] ) ) {
-   $displayTitle = $item['display_title'];
+   if ( isset( $item['displayTitle'] ) ) {
+   $displayTitle = $item['displayTitle'];
} else {
$displayTitle = $title->getSubpageText();
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I83fca73e2367ed93360597cc82c05fcf792c5405
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CollaborationKit
Gerrit-Branch: master
Gerrit-Owner: Harej 
Gerrit-Reviewer: Isarra 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...CollaborationKit[master]: Fixing member list-related bug

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

Change subject: Fixing member list-related bug
..


Fixing member list-related bug

If you tried to delete a member in the "inactive" column of a member
list it led to an error caused by column 1 being a pseudcolumn. This
patch fixes that.

Change-Id: If89c9990d427d61f44517afb4db2df14afa9fe32
---
M modules/ext.CollaborationKit.list.edit.js
1 file changed, 5 insertions(+), 0 deletions(-)

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



diff --git a/modules/ext.CollaborationKit.list.edit.js 
b/modules/ext.CollaborationKit.list.edit.js
index a768ce5..c90269a 100644
--- a/modules/ext.CollaborationKit.list.edit.js
+++ b/modules/ext.CollaborationKit.list.edit.js
@@ -29,6 +29,11 @@
title = $item.data( 'collabkit-item-title' ),
colId = getColId( $item );
 
+   if ( mw.config.get( 'wgCollaborationKitIsMemberList' ) ) {
+   // Member lists' Column 1 is a pseudocolumn
+   colId = 0;
+   }
+
$spinner = $.createSpinner( {
size: 'small',
type: 'inline'

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If89c9990d427d61f44517afb4db2df14afa9fe32
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/CollaborationKit
Gerrit-Branch: master
Gerrit-Owner: Harej 
Gerrit-Reviewer: Harej 
Gerrit-Reviewer: Isarra 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations...cumin[master]: Make docstring pep257 compliant

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

Change subject: Make docstring pep257 compliant
..


Make docstring pep257 compliant

Bug: T158967
Change-Id: Ia0ae7dd9ffa08e7bf3ed7b40b75176400249a959
---
M cumin/__init__.py
M cumin/backends/__init__.py
M cumin/backends/direct.py
M cumin/backends/puppetdb.py
M cumin/cli.py
M cumin/grammar.py
M cumin/query.py
M cumin/tests/__init__.py
M cumin/tests/unit/__init__.py
M cumin/tests/unit/backends/__init__.py
M cumin/tests/unit/backends/test_direct.py
M cumin/tests/unit/backends/test_puppetdb.py
M cumin/tests/unit/test_backends.py
M cumin/tests/unit/test_cli.py
M cumin/tests/unit/test_grammar.py
M cumin/tests/unit/test_query.py
M cumin/tests/unit/test_transport.py
M cumin/tests/unit/test_transports.py
M cumin/tests/unit/transports/__init__.py
M cumin/tests/unit/transports/test_clustershell.py
M cumin/transport.py
M cumin/transports/__init__.py
M cumin/transports/clustershell.py
M setup.py
24 files changed, 396 insertions(+), 391 deletions(-)

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



diff --git a/cumin/__init__.py b/cumin/__init__.py
index e69de29..3d71781 100644
--- a/cumin/__init__.py
+++ b/cumin/__init__.py
@@ -0,0 +1 @@
+"""Automation and orchestration framework written in Python."""
diff --git a/cumin/backends/__init__.py b/cumin/backends/__init__.py
index ee5dc97..bbf14db 100644
--- a/cumin/backends/__init__.py
+++ b/cumin/backends/__init__.py
@@ -1,4 +1,4 @@
-"""Abstract backend"""
+"""Abstract backend."""
 
 import logging
 
@@ -6,61 +6,61 @@
 
 
 class InvalidQueryError(Exception):
-"""Custom exception class for invalid queries"""
+"""Custom exception class for invalid queries."""
 
 
 class BaseQuery(object):
-"""Query Builder interface"""
+"""Query Builder interface."""
 
 __metaclass__ = ABCMeta
 
 def __init__(self, config, logger=None):
-""" Query Builder constructor
+"""Query Builder constructor.
 
-Arguments:
-config -- a dictionary with the parsed configuration file
-logger -- an optional logger instance [optional, default: None]
+Arguments:
+config -- a dictionary with the parsed configuration file
+logger -- an optional logger instance [optional, default: None]
 """
 self.config = config
 self.logger = logger or logging.getLogger(__name__)
 
 @abstractmethod
 def add_category(self, category, key, value=None, operator='=', neg=False):
-""" Add a category token to the query: F:key = value
+"""Add a category token to the query 'F:key = value'.
 
-Arguments:
-category -- the category of the token, one of 
cumin.grammar.categories
-key  -- the key for this category
-value-- the value to match, if not specified the key itself 
will be matched [optional, default: None]
-operator -- the comparison operator to use, one of 
cumin.grammar.operators [optional: default: =]
-neg  -- whether the token must be negated [optional, default: 
False]
+Arguments:
+category -- the category of the token, one of cumin.grammar.categories
+key  -- the key for this category
+value-- the value to match, if not specified the key itself will 
be matched [optional, default: None]
+operator -- the comparison operator to use, one of 
cumin.grammar.operators [optional: default: =]
+neg  -- whether the token must be negated [optional, default: 
False]
 """
 
 @abstractmethod
 def add_hosts(self, hosts, neg=False):
-""" Add a list of hosts to the query
+"""Add a list of hosts to the query.
 
-Arguments:
-hosts -- a list of hosts to match
-neg   -- whether the token must be negated [optional, default: 
False]
+Arguments:
+hosts -- a list of hosts to match
+neg   -- whether the token must be negated [optional, default: False]
 """
 
 @abstractmethod
 def open_subgroup(self):
-"""Open a subgroup in the query"""
+"""Open a subgroup in the query."""
 
 @abstractmethod
 def close_subgroup(self):
-"""Close a subgroup in the query"""
+"""Close a subgroup in the query."""
 
 @abstractmethod
 def add_and(self):
-"""Add an AND query block to the query"""
+"""Add an AND query block to the query."""
 
 @abstractmethod
 def add_or(self):
-"""Add an OR query block to the query"""
+"""Add an OR query block to the query."""
 
 @abstractmethod
 def execute(self):
-"""Execute the query and return the list of FQDN hostnames that 
matches"""
+"""Execute the query and return the list of FQDN hostnames that 
matches."""
diff --git 

[MediaWiki-commits] [Gerrit] operations...cumin[master]: Fix additional minor issues reported by codacy

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

Change subject: Fix additional minor issues reported by codacy
..


Fix additional minor issues reported by codacy

- add module docstrings
- define instance variables only in __init__()
- improve ignored parameters on callbacks

Bug: T158967
Change-Id: I65f85838fb2c0772006e9a0a6e16e02d55ae966c
---
M cumin/backends/__init__.py
M cumin/backends/direct.py
M cumin/backends/puppetdb.py
M cumin/cli.py
M cumin/grammar.py
M cumin/query.py
M cumin/tests/__init__.py
M cumin/tests/unit/backends/test_direct.py
M cumin/tests/unit/backends/test_puppetdb.py
M cumin/tests/unit/test_backends.py
M cumin/tests/unit/test_cli.py
M cumin/tests/unit/test_grammar.py
M cumin/tests/unit/test_query.py
M cumin/tests/unit/test_transport.py
M cumin/tests/unit/test_transports.py
M cumin/tests/unit/transports/test_clustershell.py
M cumin/transport.py
M cumin/transports/__init__.py
M cumin/transports/clustershell.py
19 files changed, 46 insertions(+), 9 deletions(-)

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



diff --git a/cumin/backends/__init__.py b/cumin/backends/__init__.py
index 158c124..ee5dc97 100644
--- a/cumin/backends/__init__.py
+++ b/cumin/backends/__init__.py
@@ -1,3 +1,5 @@
+"""Abstract backend"""
+
 import logging
 
 from abc import ABCMeta, abstractmethod
diff --git a/cumin/backends/direct.py b/cumin/backends/direct.py
index 9dfb543..62e6c59 100644
--- a/cumin/backends/direct.py
+++ b/cumin/backends/direct.py
@@ -1,3 +1,5 @@
+"""Direct backend"""
+
 from ClusterShell.NodeSet import NodeSet
 
 from cumin.backends import BaseQuery, InvalidQueryError
diff --git a/cumin/backends/puppetdb.py b/cumin/backends/puppetdb.py
index 6751c83..9a8e4d2 100644
--- a/cumin/backends/puppetdb.py
+++ b/cumin/backends/puppetdb.py
@@ -1,3 +1,5 @@
+"""PuppetDB backend"""
+
 import requests
 
 from requests.packages import urllib3
diff --git a/cumin/cli.py b/cumin/cli.py
index d8a0fca..3d7a33b 100644
--- a/cumin/cli.py
+++ b/cumin/cli.py
@@ -147,7 +147,7 @@
 return config
 
 
-def sigint_handler(signum, frame):
+def sigint_handler(*args):
 """ Signal handler for Ctrl+c / SIGINT, raises KeyboardInterruptError
 
 Arguments (as defined in 
https://docs.python.org/2/library/signal.html):
diff --git a/cumin/grammar.py b/cumin/grammar.py
index 2aa36f1..8cebf45 100644
--- a/cumin/grammar.py
+++ b/cumin/grammar.py
@@ -1,3 +1,5 @@
+"""Query grammar definition"""
+
 import pyparsing as pp
 
 # Available categories
diff --git a/cumin/query.py b/cumin/query.py
index 5449b30..08c0ee9 100644
--- a/cumin/query.py
+++ b/cumin/query.py
@@ -1,3 +1,5 @@
+"""Query handling: factory and builder"""
+
 import importlib
 import logging
 
diff --git a/cumin/tests/__init__.py b/cumin/tests/__init__.py
index ca045c7..93310cd 100644
--- a/cumin/tests/__init__.py
+++ b/cumin/tests/__init__.py
@@ -1,3 +1,5 @@
+"""Tests utils"""
+
 import logging
 import os
 
diff --git a/cumin/tests/unit/backends/test_direct.py 
b/cumin/tests/unit/backends/test_direct.py
index ffafba2..a217569 100644
--- a/cumin/tests/unit/backends/test_direct.py
+++ b/cumin/tests/unit/backends/test_direct.py
@@ -1,3 +1,4 @@
+"""Direct backend tests"""
 import unittest
 
 from ClusterShell.NodeSet import NodeSet
diff --git a/cumin/tests/unit/backends/test_puppetdb.py 
b/cumin/tests/unit/backends/test_puppetdb.py
index 3b3e595..37195dd 100644
--- a/cumin/tests/unit/backends/test_puppetdb.py
+++ b/cumin/tests/unit/backends/test_puppetdb.py
@@ -1,3 +1,4 @@
+"""PuppetDB backend tests"""
 import unittest
 
 import requests_mock
diff --git a/cumin/tests/unit/test_backends.py 
b/cumin/tests/unit/test_backends.py
index f3b1294..5e050e5 100644
--- a/cumin/tests/unit/test_backends.py
+++ b/cumin/tests/unit/test_backends.py
@@ -1,3 +1,4 @@
+"""Abstract query tests"""
 import unittest
 
 from cumin.backends import BaseQuery
diff --git a/cumin/tests/unit/test_cli.py b/cumin/tests/unit/test_cli.py
index f768f4f..87c1349 100644
--- a/cumin/tests/unit/test_cli.py
+++ b/cumin/tests/unit/test_cli.py
@@ -1,3 +1,4 @@
+"""CLI tests"""
 import unittest
 
 from logging import DEBUG, INFO
diff --git a/cumin/tests/unit/test_grammar.py b/cumin/tests/unit/test_grammar.py
index 7a53782..7ddea30 100644
--- a/cumin/tests/unit/test_grammar.py
+++ b/cumin/tests/unit/test_grammar.py
@@ -1,3 +1,4 @@
+"""Grammar tests"""
 import unittest
 
 from cumin.grammar import grammar
diff --git a/cumin/tests/unit/test_query.py b/cumin/tests/unit/test_query.py
index 013da03..4667a77 100644
--- a/cumin/tests/unit/test_query.py
+++ b/cumin/tests/unit/test_query.py
@@ -1,3 +1,4 @@
+"""Query handling tests"""
 import os
 import pkgutil
 import unittest
@@ -17,6 +18,8 @@
 @staticmethod
 def new(config, logger=None):
 """Return an instance of the mocked query class"""
+if not isinstance(config, dict):
+raise 

[MediaWiki-commits] [Gerrit] operations...cumin[master]: Fix additional minor issues reported by codacy

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

Change subject: Fix additional minor issues reported by codacy
..

Fix additional minor issues reported by codacy

- add module docstrings
- define instance variables only in __init__()
- improve ignored parameters on callbacks

Bug: T158967
Change-Id: I65f85838fb2c0772006e9a0a6e16e02d55ae966c
---
M cumin/backends/__init__.py
M cumin/backends/direct.py
M cumin/backends/puppetdb.py
M cumin/cli.py
M cumin/grammar.py
M cumin/query.py
M cumin/tests/__init__.py
M cumin/tests/unit/backends/test_direct.py
M cumin/tests/unit/backends/test_puppetdb.py
M cumin/tests/unit/test_backends.py
M cumin/tests/unit/test_cli.py
M cumin/tests/unit/test_grammar.py
M cumin/tests/unit/test_query.py
M cumin/tests/unit/test_transport.py
M cumin/tests/unit/test_transports.py
M cumin/tests/unit/transports/test_clustershell.py
M cumin/transport.py
M cumin/transports/__init__.py
M cumin/transports/clustershell.py
19 files changed, 47 insertions(+), 10 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/software/cumin 
refs/changes/33/339833/1

diff --git a/cumin/backends/__init__.py b/cumin/backends/__init__.py
index 158c124..ee5dc97 100644
--- a/cumin/backends/__init__.py
+++ b/cumin/backends/__init__.py
@@ -1,3 +1,5 @@
+"""Abstract backend"""
+
 import logging
 
 from abc import ABCMeta, abstractmethod
diff --git a/cumin/backends/direct.py b/cumin/backends/direct.py
index 9dfb543..62e6c59 100644
--- a/cumin/backends/direct.py
+++ b/cumin/backends/direct.py
@@ -1,3 +1,5 @@
+"""Direct backend"""
+
 from ClusterShell.NodeSet import NodeSet
 
 from cumin.backends import BaseQuery, InvalidQueryError
diff --git a/cumin/backends/puppetdb.py b/cumin/backends/puppetdb.py
index 6751c83..9a8e4d2 100644
--- a/cumin/backends/puppetdb.py
+++ b/cumin/backends/puppetdb.py
@@ -1,3 +1,5 @@
+"""PuppetDB backend"""
+
 import requests
 
 from requests.packages import urllib3
diff --git a/cumin/cli.py b/cumin/cli.py
index d8a0fca..3d7a33b 100644
--- a/cumin/cli.py
+++ b/cumin/cli.py
@@ -147,7 +147,7 @@
 return config
 
 
-def sigint_handler(signum, frame):
+def sigint_handler(*args):
 """ Signal handler for Ctrl+c / SIGINT, raises KeyboardInterruptError
 
 Arguments (as defined in 
https://docs.python.org/2/library/signal.html):
diff --git a/cumin/grammar.py b/cumin/grammar.py
index 2aa36f1..8cebf45 100644
--- a/cumin/grammar.py
+++ b/cumin/grammar.py
@@ -1,3 +1,5 @@
+"""Query grammar definition"""
+
 import pyparsing as pp
 
 # Available categories
diff --git a/cumin/query.py b/cumin/query.py
index 5449b30..08c0ee9 100644
--- a/cumin/query.py
+++ b/cumin/query.py
@@ -1,3 +1,5 @@
+"""Query handling: factory and builder"""
+
 import importlib
 import logging
 
diff --git a/cumin/tests/__init__.py b/cumin/tests/__init__.py
index ca045c7..93310cd 100644
--- a/cumin/tests/__init__.py
+++ b/cumin/tests/__init__.py
@@ -1,3 +1,5 @@
+"""Tests utils"""
+
 import logging
 import os
 
diff --git a/cumin/tests/unit/backends/test_direct.py 
b/cumin/tests/unit/backends/test_direct.py
index ffafba2..a217569 100644
--- a/cumin/tests/unit/backends/test_direct.py
+++ b/cumin/tests/unit/backends/test_direct.py
@@ -1,3 +1,4 @@
+"""Direct backend tests"""
 import unittest
 
 from ClusterShell.NodeSet import NodeSet
diff --git a/cumin/tests/unit/backends/test_puppetdb.py 
b/cumin/tests/unit/backends/test_puppetdb.py
index 3b3e595..37195dd 100644
--- a/cumin/tests/unit/backends/test_puppetdb.py
+++ b/cumin/tests/unit/backends/test_puppetdb.py
@@ -1,3 +1,4 @@
+"""PuppetDB backend tests"""
 import unittest
 
 import requests_mock
diff --git a/cumin/tests/unit/test_backends.py 
b/cumin/tests/unit/test_backends.py
index f3b1294..5e050e5 100644
--- a/cumin/tests/unit/test_backends.py
+++ b/cumin/tests/unit/test_backends.py
@@ -1,3 +1,4 @@
+"""Abstract query tests"""
 import unittest
 
 from cumin.backends import BaseQuery
diff --git a/cumin/tests/unit/test_cli.py b/cumin/tests/unit/test_cli.py
index f768f4f..87c1349 100644
--- a/cumin/tests/unit/test_cli.py
+++ b/cumin/tests/unit/test_cli.py
@@ -1,3 +1,4 @@
+"""CLI tests"""
 import unittest
 
 from logging import DEBUG, INFO
diff --git a/cumin/tests/unit/test_grammar.py b/cumin/tests/unit/test_grammar.py
index 7a53782..7ddea30 100644
--- a/cumin/tests/unit/test_grammar.py
+++ b/cumin/tests/unit/test_grammar.py
@@ -1,3 +1,4 @@
+"""Grammar tests"""
 import unittest
 
 from cumin.grammar import grammar
diff --git a/cumin/tests/unit/test_query.py b/cumin/tests/unit/test_query.py
index 013da03..4667a77 100644
--- a/cumin/tests/unit/test_query.py
+++ b/cumin/tests/unit/test_query.py
@@ -1,3 +1,4 @@
+"""Query handling tests"""
 import os
 import pkgutil
 import unittest
@@ -17,6 +18,8 @@
 @staticmethod
 def new(config, logger=None):
 """Return an instance of the mocked query class"""
+if not isinstance(config, dict):
+  

[MediaWiki-commits] [Gerrit] operations...cumin[master]: Make docstring pep257 compliant

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

Change subject: Make docstring pep257 compliant
..

Make docstring pep257 compliant

Bug: T158967
Change-Id: Ia0ae7dd9ffa08e7bf3ed7b40b75176400249a959
---
M cumin/__init__.py
M cumin/backends/__init__.py
M cumin/backends/direct.py
M cumin/backends/puppetdb.py
M cumin/cli.py
M cumin/grammar.py
M cumin/query.py
M cumin/tests/__init__.py
M cumin/tests/unit/__init__.py
M cumin/tests/unit/backends/__init__.py
M cumin/tests/unit/backends/test_direct.py
M cumin/tests/unit/backends/test_puppetdb.py
M cumin/tests/unit/test_backends.py
M cumin/tests/unit/test_cli.py
M cumin/tests/unit/test_grammar.py
M cumin/tests/unit/test_query.py
M cumin/tests/unit/test_transport.py
M cumin/tests/unit/test_transports.py
M cumin/tests/unit/transports/__init__.py
M cumin/tests/unit/transports/test_clustershell.py
M cumin/transport.py
M cumin/transports/__init__.py
M cumin/transports/clustershell.py
23 files changed, 388 insertions(+), 391 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/software/cumin 
refs/changes/34/339834/1

diff --git a/cumin/__init__.py b/cumin/__init__.py
index e69de29..3d71781 100644
--- a/cumin/__init__.py
+++ b/cumin/__init__.py
@@ -0,0 +1 @@
+"""Automation and orchestration framework written in Python."""
diff --git a/cumin/backends/__init__.py b/cumin/backends/__init__.py
index ee5dc97..bbf14db 100644
--- a/cumin/backends/__init__.py
+++ b/cumin/backends/__init__.py
@@ -1,4 +1,4 @@
-"""Abstract backend"""
+"""Abstract backend."""
 
 import logging
 
@@ -6,61 +6,61 @@
 
 
 class InvalidQueryError(Exception):
-"""Custom exception class for invalid queries"""
+"""Custom exception class for invalid queries."""
 
 
 class BaseQuery(object):
-"""Query Builder interface"""
+"""Query Builder interface."""
 
 __metaclass__ = ABCMeta
 
 def __init__(self, config, logger=None):
-""" Query Builder constructor
+"""Query Builder constructor.
 
-Arguments:
-config -- a dictionary with the parsed configuration file
-logger -- an optional logger instance [optional, default: None]
+Arguments:
+config -- a dictionary with the parsed configuration file
+logger -- an optional logger instance [optional, default: None]
 """
 self.config = config
 self.logger = logger or logging.getLogger(__name__)
 
 @abstractmethod
 def add_category(self, category, key, value=None, operator='=', neg=False):
-""" Add a category token to the query: F:key = value
+"""Add a category token to the query 'F:key = value'.
 
-Arguments:
-category -- the category of the token, one of 
cumin.grammar.categories
-key  -- the key for this category
-value-- the value to match, if not specified the key itself 
will be matched [optional, default: None]
-operator -- the comparison operator to use, one of 
cumin.grammar.operators [optional: default: =]
-neg  -- whether the token must be negated [optional, default: 
False]
+Arguments:
+category -- the category of the token, one of cumin.grammar.categories
+key  -- the key for this category
+value-- the value to match, if not specified the key itself will 
be matched [optional, default: None]
+operator -- the comparison operator to use, one of 
cumin.grammar.operators [optional: default: =]
+neg  -- whether the token must be negated [optional, default: 
False]
 """
 
 @abstractmethod
 def add_hosts(self, hosts, neg=False):
-""" Add a list of hosts to the query
+"""Add a list of hosts to the query.
 
-Arguments:
-hosts -- a list of hosts to match
-neg   -- whether the token must be negated [optional, default: 
False]
+Arguments:
+hosts -- a list of hosts to match
+neg   -- whether the token must be negated [optional, default: False]
 """
 
 @abstractmethod
 def open_subgroup(self):
-"""Open a subgroup in the query"""
+"""Open a subgroup in the query."""
 
 @abstractmethod
 def close_subgroup(self):
-"""Close a subgroup in the query"""
+"""Close a subgroup in the query."""
 
 @abstractmethod
 def add_and(self):
-"""Add an AND query block to the query"""
+"""Add an AND query block to the query."""
 
 @abstractmethod
 def add_or(self):
-"""Add an OR query block to the query"""
+"""Add an OR query block to the query."""
 
 @abstractmethod
 def execute(self):
-"""Execute the query and return the list of FQDN hostnames that 
matches"""
+"""Execute the query and return the list of FQDN hostnames that 
matches."""
diff --git 

[MediaWiki-commits] [Gerrit] mediawiki...Tabber[master]: Coding style tweaks

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

Change subject: Coding style tweaks
..


Coding style tweaks

* spaces -> tabs for indentation
* static {public,private} function -> {public,private} static function
* renamed ResourceLoader module from ext.Tabber to ext.tabber
* cleaned up the usage of temporary variables in the PHP entry point
* documentation tweaks
* lowercased CSS color values

Change-Id: Ic08bc6ac770332f094895e23dc2a10e4a4ded4b7
---
M Tabber.hooks.php
M Tabber.php
M css/tabber.css
M extension.json
M js/tabber.js
5 files changed, 98 insertions(+), 97 deletions(-)

Approvals:
  Brian Wolff: Looks good to me, approved
  SamanthaNguyen: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/Tabber.hooks.php b/Tabber.hooks.php
index c997a82..848710e 100644
--- a/Tabber.hooks.php
+++ b/Tabber.hooks.php
@@ -7,60 +7,58 @@
  * @licenseGPL
  * @packageTabber
  * @link   https://www.mediawiki.org/wiki/Extension:Tabber
- *
-**/
+ */
 class TabberHooks {
/**
 * Sets up this extension's parser functions.
 *
-* @access  public
-* @param   object  Parser object passed as a reference.
-* @return  boolean true
+* @param Parser $parser Parser object passed as a reference.
+* @return bool
 */
-   static public function onParserFirstCallInit(Parser &$parser) {
-   $parser->setHook("tabber", "TabberHooks::renderTabber");
+   public static function onParserFirstCallInit( Parser &$parser ) {
+   $parser->setHook( 'tabber', 'TabberHooks::renderTabber' );
return true;
}
+
/**
 * Renders the necessary HTML for a  tag.
 *
-* @access  public
-* @param   string  The input URL between the beginning and ending 
tags.
-* @param   array   Array of attribute arguments on that beginning 
tag.
-* @param   object  Mediawiki Parser Object
-* @param   object  Mediawiki PPFrame Object
-* @return  string  HTML
+* @param string $input The input URL between the beginning and ending 
tags.
+* @param array $args Array of attribute arguments on that beginning 
tag.
+* @param Parser $parser
+* @param PPFrame $frame
+* @return string HTML
 */
-   static public function renderTabber($input, array $args, Parser 
$parser, PPFrame $frame) {
-   $parser->getOutput()->addModules('ext.Tabber');
-   $key = md5($input);
-   $arr = explode("|-|", $input);
+   public static function renderTabber( $input, array $args, Parser 
$parser, PPFrame $frame ) {
+   $parser->getOutput()->addModules( 'ext.tabber' );
+   $key = md5( $input );
+   $arr = explode( '|-|', $input );
$htmlTabs = '';
-   foreach ($arr as $tab) {
-   $htmlTabs .= self::buildTab($tab, $parser, $frame);
+   foreach ( $arr as $tab ) {
+   $htmlTabs .= self::buildTab( $tab, $parser, $frame );
}
-   $HTML = ''.$htmlTabs."";
+   $HTML = '' . 
$htmlTabs . '';
return $HTML;
}
+
/**
 * Build individual tab.
 *
-* @access  private
-* @param   string  Tab information
-* @param   object  Mediawiki Parser Object
-* @param   object  Mediawiki PPFrame Object
-* @return  string  HTML
+* @param string Tab information
+* @param Parser $parser
+* @param PPFrame $frame
+* @return string HTML
 */
-   static private function buildTab($tab = '', Parser $parser, PPFrame 
$frame) {
-   $tab = trim($tab);
-   if (empty($tab)) {
+   private static function buildTab( $tab = '', Parser $parser, PPFrame 
$frame ) {
+   $tab = trim( $tab );
+   if ( empty( $tab ) ) {
return $tab;
}
-   list($tabName, $tabBody) = explode('=', $tab, 2);
-   $tabBody = $parser->recursiveTagParse($tabBody, $frame);
+   list( $tabName, $tabBody ) = explode( '=', $tab, 2 );
+   $tabBody = $parser->recursiveTagParse( $tabBody, $frame );
$tab = '
-   
-   '.$tabBody.'
+   
+   ' . $tabBody . '
';
return $tab;
}
diff --git a/Tabber.php b/Tabber.php
index fc7872d..abd3504 100644
--- a/Tabber.php
+++ b/Tabber.php
@@ -7,12 +7,11 @@
  * @licenseGPL
  * @packageTabber
  * @link   

[MediaWiki-commits] [Gerrit] mediawiki...Tabber[master]: jQuery 3 readiness

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

Change subject: jQuery 3 readiness
..


jQuery 3 readiness

In jQuery 3 $(document).ready(...) is deprecated.
https://jquery.com/upgrade-guide/3.0/#deprecated-document-ready-handlers-other-than-jquery-function

Change-Id: I7c8e936dac4efd78202422c9794ef68cba5dfa59
---
M js/tabber.js
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/js/tabber.js b/js/tabber.js
index 64f3d0e..161d856 100644
--- a/js/tabber.js
+++ b/js/tabber.js
@@ -44,6 +44,6 @@
};
 })(jQuery);
 
-$(document).ready(function() {
+$(function() {
$('.tabber').tabber();
 });

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7c8e936dac4efd78202422c9794ef68cba5dfa59
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Tabber
Gerrit-Branch: master
Gerrit-Owner: Jack Phoenix 
Gerrit-Reviewer: Brian Wolff 
Gerrit-Reviewer: SamanthaNguyen 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...OpenStackManager[master]: Do not create sudo policies for chown ("-chmod")

2017-02-25 Thread Tim Landscheidt (Code Review)
Hello Andrew Bogott, Alex Monk, Madhuvishy, Chasemp, Yuvipanda,

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

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

to review the following change.


Change subject: Do not create sudo policies for chown ("-chmod")
..

Do not create sudo policies for chown ("-chmod")

Initially on Tool Labs users were supposed to fix ownership issues in
the home directories of their tools by executing:

| sudo /bin/chown -R tools.$TOOL:tools.$TOOL /data/project/$TOOL

This usage was never promoted and so did not catch on, but was
replaced by the utility take(1) which allows tool accounts to assume
ownership of files in their home directories if they share a group
with the files.

This change thus removes the creation of the unpromoted and unused
sudo policies.  After merging, existing sudo policies
"tools.$TOOL-chmod" can be removed manually.

Change-Id: Ie13f33765e7c3995b001e754ed2c8e81eb1eea3a
---
M nova/OpenStackNovaServiceGroup.php
1 file changed, 0 insertions(+), 14 deletions(-)


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

diff --git a/nova/OpenStackNovaServiceGroup.php 
b/nova/OpenStackNovaServiceGroup.php
index d1d18dc..f8404de 100644
--- a/nova/OpenStackNovaServiceGroup.php
+++ b/nova/OpenStackNovaServiceGroup.php
@@ -353,20 +353,6 @@
return null;
}
 
-   # Create Sudo policy so that the service user can chown files 
in its homedir
-   if ( OpenStackNovaSudoer::createSudoer( $groupName . '-chmod',
-   $project->getProjectName(),
-   array( $groupName ),
-   array(),
-   array( '/bin/chown -R ' . $groupName . '\:' . 
$groupName . ' ' . $homeDir ),
-   array( '!authenticate' ) ) ) {
-   $ldap->printDebug( "Successfully created chmod sudo 
policy for $groupName",
-   NONSENSITIVE );
-   } else {
-   $ldap->printDebug( "Failed to  creat chmod sudo policy 
for $groupName",
-   NONSENSITIVE );
-   }
-
# Create Sudo policy so that members of the group can sudo as 
the service user
if ( OpenStackNovaSudoer::createSudoer( 'runas-' . $groupName,
$project->getProjectName(),

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie13f33765e7c3995b001e754ed2c8e81eb1eea3a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/OpenStackManager
Gerrit-Branch: master
Gerrit-Owner: Tim Landscheidt 
Gerrit-Reviewer: Alex Monk 
Gerrit-Reviewer: Andrew Bogott 
Gerrit-Reviewer: Chasemp 
Gerrit-Reviewer: Madhuvishy 
Gerrit-Reviewer: Yuvipanda 

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


[MediaWiki-commits] [Gerrit] labs...quarrybot-enwiki[master]: dding pywikibot-core so the bot development can offically st...

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

Change subject: dding pywikibot-core so the bot development can offically start.
..

dding pywikibot-core so the bot development can offically start.

Change-Id: I706ab7b269aa0b940e899afff0a0f6e4560da801
---
A pywikibot-core
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/tools/quarrybot-enwiki 
refs/changes/29/339829/1

diff --git a/pywikibot-core b/pywikibot-core
new file mode 16
index 000..52d02fb
--- /dev/null
+++ b/pywikibot-core
@@ -0,0 +1 @@
+Subproject commit 52d02fbc0e7bb0f7b48c3873fd89132f800af2be

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I706ab7b269aa0b940e899afff0a0f6e4560da801
Gerrit-PatchSet: 1
Gerrit-Project: labs/tools/quarrybot-enwiki
Gerrit-Branch: master
Gerrit-Owner: Zppix 

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


[MediaWiki-commits] [Gerrit] mediawiki...Quiz[master]: Start implementing Quiz generation using TemplateParser

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

Change subject: Start implementing Quiz generation using TemplateParser
..

Start implementing Quiz generation using TemplateParser

As noted in T152293 TemplateParser should be used instead of raw HTML.
This first commit will start using TemplateParser for a part of the Quiz
element. It is still needed to transform into templates the Questions and
the Setting element. As a result of this initial conversion I was able to drop
the use of an addittional CSS class (hideCorrection).

Change-Id: I7d1ae881d6d2c5b583509d5fa2e7f758715b13d5
---
M Quiz.class.php
M modules/ext.quiz.css
A templates/Quiz.mustache
3 files changed, 46 insertions(+), 33 deletions(-)


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

diff --git a/Quiz.class.php b/Quiz.class.php
index a04e8a0..8a9fe21 100755
--- a/Quiz.class.php
+++ b/Quiz.class.php
@@ -112,6 +112,7 @@
 * @return string
 */
function parseQuiz( $input ) {
+
// Ouput the style and the script to the header once for all.
if ( $this->mQuizId == 0 ) {
global $wgOut;
@@ -122,10 +123,8 @@
$input = $this->parseQuestions( $this->parseIncludes( $input ) 
);
 
// Generates the output.
-   // TODO: Use TemplateParser instead of HTML tags in code to 
improve code readability in the future
-   $classHide = ( $this->mBeingCorrected ) ? '' : ' 
class="hideCorrection"';
-   $output  = '' . "\n";
-   $output .= '' . "\n";
+   
+   $templateParser = new TemplateParser(  __DIR__ . '/templates' );
 
// Determine the content of the settings table.
$settings = array_fill( 0, 4, '' );
@@ -173,33 +172,27 @@
}
}
 
-   if ( !empty( $settingsTable ) ) {
-   $output .= '' . "\n";
-   $output .= $settingsTable . "\n";
-   $output .= '' . "\n";
-   }
-   $output .= '' . "\n";
+   $quiz_score = wfMessage( 'quiz_score' )->rawParams(
+   '' . 
$this->mScore . '',
+   '' . 
$this->mTotal . '')->escaped();
 
-   $output .= '' . "\n";
-   $output .= $input . "\n";
-   $output .= '' . "\n";
+   return $templateParser->processTemplate(
+   'Quiz',
+   array(
+   'quiz' => array(
+   'id' => $this->mQuizId,
+   'beingCorrected' => 
$this->mBeingCorrected,
+   'questions' => $input
+   ),
+   'settingsTable' => $settingsTable,
+   'wfMessage' => array(
+   'quiz_correction' => wfMessage( 
'quiz_correction' )->escaped(),
+   'quiz_reset' => wfMessage( 'quiz_reset' 
)->escaped(),
+   'quiz_score' => $quiz_score
+   )
+   )
+   );
 
-   $output .= '';
-   if ( $this->mBeingCorrected ) {
-   $output .= '';
-   }
-   $output .= '' . "\n";
-
-   $output .= '';
-   $output .= wfMessage( 'quiz_score' )->rawParams(
-   '' . $this->mScore . '',
-   '' . $this->mTotal . ''
-   )->escaped();
-   $output .= '' . "\n";
-
-   $output .= '' . "\n";
-   $output .= '' . "\n";
return $output;
}
 
diff --git a/modules/ext.quiz.css b/modules/ext.quiz.css
index c03834c..2060bcb 100644
--- a/modules/ext.quiz.css
+++ b/modules/ext.quiz.css
@@ -10,10 +10,6 @@
background-color: transparent;
 }
 
-.quiz .hideCorrection .correction {
-   display: none;
-}
-
 .quiz .settings td {
padding: 0.1em 0.4em 0.1em 0.4em;
 }
diff --git a/templates/Quiz.mustache b/templates/Quiz.mustache
new file mode 100644
index 000..a9be0e4
--- /dev/null
+++ b/templates/Quiz.mustache
@@ -0,0 +1,24 @@
+
+   
+   {{#settingsTable}}
+   
+   {{{ . }}}
+   
+   {{/settingsTable}}
+   
+   
+   {{{ quiz.questions }}}
+   
+   
+   
+   {{#if quiz.beingCorrected != 0}}
+   
+   {{/if}}
+   

[MediaWiki-commits] [Gerrit] mediawiki...Quiz[master]: Generalize quiz selector in JS

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

Change subject: Generalize quiz selector in JS
..

Generalize quiz selector in JS

Instead of using the ID "bodyContent" to get the div that is
used to search the quiz instance, it is preferred to use "mw-content-text"
which is skin-indipendent ("bodyContent" is not present in all skins).

Change-Id: I075bfe6801fd2ba9fa5e301818d2b528661fbb3d
---
M modules/ext.quiz.js
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/modules/ext.quiz.js b/modules/ext.quiz.js
index 54aef43..40165a2 100755
--- a/modules/ext.quiz.js
+++ b/modules/ext.quiz.js
@@ -67,7 +67,7 @@
 
// Prepare the quiz for "javascriptable" browsers
function prepareQuiz() {
-   var bodyContentDiv = document.getElementById( 'bodyContent' 
).getElementsByTagName( 'div' );
+   var bodyContentDiv = document.getElementById( 'mw-content-text' 
).getElementsByTagName( 'div' );
for( var i = 0; i < bodyContentDiv.length; ++i ) {
if( bodyContentDiv[i].className === 'quiz' ) {
var input = 
bodyContentDiv[i].getElementsByTagName( 'input' );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I075bfe6801fd2ba9fa5e301818d2b528661fbb3d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Quiz
Gerrit-Branch: master
Gerrit-Owner: Crisbal 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Do not output invalid links for deleted names on Special:Con...

2017-02-25 Thread Code Review
Matěj Suchánek has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/339823 )

Change subject: Do not output invalid links for deleted names on 
Special:Contributions
..

Do not output invalid links for deleted names on Special:Contributions

Steps to reproduce:
- have advanced user rights and go to Special:Contributions
- choose "Show contributions of new accounts only" and "Deleted only"
- examine rows with deleted user names, marked with
  "[username or IP address removed - edit hidden from contributions]"

All these rows have a red "(talk)" link which links to "User talk:"
(that's all). More detailed examination reveals an empty  element
which is supposed to link to the user page.

As these rows have the mentioned marker, we can just skip generating
user link if the user name is hidden.

Change-Id: I4fc7fb7ad2836834e9436ca2acb6b12484c15172
---
M includes/specials/pagers/ContribsPager.php
1 file changed, 4 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/23/339823/2

diff --git a/includes/specials/pagers/ContribsPager.php 
b/includes/specials/pagers/ContribsPager.php
index 47a2aed..a4740a4 100644
--- a/includes/specials/pagers/ContribsPager.php
+++ b/includes/specials/pagers/ContribsPager.php
@@ -458,14 +458,13 @@
}
 
# Show user names for /newbies as there may be 
different users.
-   # Note that we already excluded rows with hidden user 
names.
-   if ( $this->contribs == 'newbie' ) {
+   # Note that only unprivileged users have rows with 
hidden user names excluded.
+   $userlink = '';
+   if ( $this->contribs == 'newbie' && !$rev->isDeleted( 
Revision::DELETED_USER ) ) {
$userlink = ' . . ' . $lang->getDirMark()
. Linker::userLink( $rev->getUser(), 
$rev->getUserText() );
$userlink .= ' ' . $this->msg( 'parentheses' 
)->rawParams(
-   Linker::userTalkLink( 
$rev->getUser(), $rev->getUserText() ) )->escaped() . ' ';
-   } else {
-   $userlink = '';
+   Linker::userTalkLink( $rev->getUser(), 
$rev->getUserText() ) )->escaped() . ' ';
}
 
$flags = [];

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4fc7fb7ad2836834e9436ca2acb6b12484c15172
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Matěj Suchánek 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...TemplateSandbox[master]: Remove global variable 'mw' from .eslintrc.json

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

Change subject: Remove global variable 'mw' from .eslintrc.json
..

Remove global variable 'mw' from .eslintrc.json

A global variable 'mw' is not used.

Change-Id: Ice7dbd5a04ae8efa9383bcc1f0046ed776648adf
---
M .eslintrc.json
1 file changed, 0 insertions(+), 3 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TemplateSandbox 
refs/changes/24/339824/1

diff --git a/.eslintrc.json b/.eslintrc.json
index d3d79a4..9fad52a 100644
--- a/.eslintrc.json
+++ b/.eslintrc.json
@@ -3,8 +3,5 @@
"env": {
"browser": true,
"jquery": true
-   },
-   "globals": {
-   "mw": false
}
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ice7dbd5a04ae8efa9383bcc1f0046ed776648adf
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/TemplateSandbox
Gerrit-Branch: master
Gerrit-Owner: Fomafix 

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


[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Language filter should not permit multiline input

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

Change subject: Language filter should not permit multiline input
..

Language filter should not permit multiline input

Bug: T158940
Change-Id: Ibfacd823daede1c5b84757e4058eff93ec40365d
---
M app/src/main/java/org/wikipedia/settings/LanguagePreferenceDialog.java
1 file changed, 1 insertion(+), 0 deletions(-)


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

diff --git 
a/app/src/main/java/org/wikipedia/settings/LanguagePreferenceDialog.java 
b/app/src/main/java/org/wikipedia/settings/LanguagePreferenceDialog.java
index 10ab8c7..32c9889 100644
--- a/app/src/main/java/org/wikipedia/settings/LanguagePreferenceDialog.java
+++ b/app/src/main/java/org/wikipedia/settings/LanguagePreferenceDialog.java
@@ -62,6 +62,7 @@
 
 languagesList = (ListView) 
findViewById(R.id.preference_languages_list);
 EditText languagesFilter = (EditText) 
findViewById(R.id.preference_languages_filter);
+languagesFilter.setSingleLine(true);
 
 languagesList.setOnItemClickListener(new 
AdapterView.OnItemClickListener() {
 @Override

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibfacd823daede1c5b84757e4058eff93ec40365d
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Codrut94 

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


[MediaWiki-commits] [Gerrit] mediawiki...FlaggedRevs[master]: Don't add empty review notice to page subtitle (contentSub)

2017-02-25 Thread Code Review
Bartosz Dziewoński has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/339821 )

Change subject: Don't add empty review notice to page subtitle (contentSub)
..

Don't add empty review notice to page subtitle (contentSub)

Bug: T159037
Change-Id: I7bc53a9dc14a7661bb789e5a376bae4d2e49eef5
---
M frontend/FlaggablePageView.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/FlaggedRevs 
refs/changes/21/339821/1

diff --git a/frontend/FlaggablePageView.php b/frontend/FlaggablePageView.php
index 610fcaa..b1eb800 100644
--- a/frontend/FlaggablePageView.php
+++ b/frontend/FlaggablePageView.php
@@ -238,7 +238,7 @@
public function displayTag() {
$this->load();
// Sanity check that this is a reviewable page
-   if ( $this->article->isReviewable() ) {
+   if ( $this->article->isReviewable() && $this->reviewNotice ) {
$this->out->addSubtitle( $this->reviewNotice );
}
return true;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7bc53a9dc14a7661bb789e5a376bae4d2e49eef5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/FlaggedRevs
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński 

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


[MediaWiki-commits] [Gerrit] mediawiki...CollaborationKit[master]: Support for redirects upon page move

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

Change subject: Support for redirects upon page move
..

Support for redirects upon page move

Change-Id: I46c09d35ab532afc7d96b77531ebc348efbf52aa
---
M includes/content/CollaborationHubContent.php
M includes/content/CollaborationHubContentHandler.php
M includes/content/CollaborationListContentHandler.php
3 files changed, 52 insertions(+), 1 deletion(-)


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

diff --git a/includes/content/CollaborationHubContent.php 
b/includes/content/CollaborationHubContent.php
index dfb0d33..e0c649d 100644
--- a/includes/content/CollaborationHubContent.php
+++ b/includes/content/CollaborationHubContent.php
@@ -352,7 +352,7 @@
 
$membersPageName = $title->getFullText() . '/' . wfMessage( 
'collaborationkit-hub-pagetitle-members' )->inContentLanguage()->text();
$membersTitle = Title::newFromText( $membersPageName );
-   if ( $membersTitle->exists() || $membersContent !== null ) {
+   if ( ( $membersTitle->exists() && 
$membersTitle->getContentModel() == 'CollaborationListContent' ) || 
$membersContent !== null ) {
$membersPageID = $membersTitle->getArticleID();
$output->addJsConfigVars( 
'wgCollaborationKitAssociatedMemberList', $membersPageID );
 
diff --git a/includes/content/CollaborationHubContentHandler.php 
b/includes/content/CollaborationHubContentHandler.php
index 0df3534..6d7c704 100644
--- a/includes/content/CollaborationHubContentHandler.php
+++ b/includes/content/CollaborationHubContentHandler.php
@@ -105,6 +105,29 @@
}
 
/**
+* @return bool
+*/
+   public function supportsRedirects() {
+   return true;
+   }
+
+   /**
+* Turns CollaborationHubContent page into redirect
+*
+* Note that wikitext redirects are created, as generally, this content 
model
+* is used in namespaces that support wikitext, and wikitext redirects 
are
+* expected.
+*
+* @param Title $destination The page to redirect to
+* @param string $text Text to include in the redirect.
+* @return Content
+*/
+   public function makeRedirectContent( Title $destination, $text = '' ) {
+   $handler = new WikitextContentHandler();
+   return $handler->makeRedirectContent( $destination, $text );
+   }
+
+   /**
 * Edit a Collaboration Hub via the edit API
 * @param Title $title
 * @param string $displayName
diff --git a/includes/content/CollaborationListContentHandler.php 
b/includes/content/CollaborationListContentHandler.php
index d8f11c3..b443d04 100644
--- a/includes/content/CollaborationListContentHandler.php
+++ b/includes/content/CollaborationListContentHandler.php
@@ -129,9 +129,37 @@
return false;
}
 */
+
+   /**
+* @return bool
+*/
public function supportsDirectApiEditing() {
return true;
}
+
+   /**
+* @return bool
+*/
+   public function supportsRedirects() {
+   return true;
+   }
+
+   /**
+* Turns CollaborationListContent page into redirect
+*
+* Note that wikitext redirects are created, as generally, this content 
model
+* is used in namespaces that support wikitext, and wikitext redirects 
are
+* expected.
+*
+* @param Title $destination The page to redirect to
+* @param string $text Text to include in the redirect.
+* @return Content
+*/
+   public function makeRedirectContent( Title $destination, $text = '' ) {
+   $handler = new WikitextContentHandler();
+   return $handler->makeRedirectContent( $destination, $text );
+   }
+
/**
 * Posts the newly created "members" list on-wiki.
 *

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I46c09d35ab532afc7d96b77531ebc348efbf52aa
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CollaborationKit
Gerrit-Branch: master
Gerrit-Owner: Harej 

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


[MediaWiki-commits] [Gerrit] pywikibot/core[master]: [WIP] Updating global bot wikis, closed wikis and deleted wikis

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

Change subject: [WIP] Updating global bot wikis, closed wikis and deleted wikis
..

[WIP] Updating global bot wikis, closed wikis and deleted wikis

Change-Id: I2fc4fafed73482a31f87b9c809f78770f2973ea4
---
M pywikibot/families/wikiquote_family.py
M pywikibot/families/wikisource_family.py
M pywikibot/families/wikiversity_family.py
M pywikibot/families/wikivoyage_family.py
M pywikibot/families/wiktionary_family.py
5 files changed, 34 insertions(+), 18 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/19/339819/1

diff --git a/pywikibot/families/wikiquote_family.py 
b/pywikibot/families/wikiquote_family.py
index ff4aa2f..a568f20 100644
--- a/pywikibot/families/wikiquote_family.py
+++ b/pywikibot/families/wikiquote_family.py
@@ -22,6 +22,8 @@
 closed_wikis = [
 # 
https://meta.wikimedia.org/wiki/Proposals_for_closing_projects/Closure_of_Alemannic_Wikiquote
 'als',
+# 
https://meta.wikimedia.org/wiki/Proposals_for_closing_projects/Closure_of_Amharic_Wikiquote_2
+'am'
 # 
https://meta.wikimedia.org/wiki/Proposals_for_closing_projects/Closure_of_Old_English_Wikiquote
 'ang',
 # 
https://meta.wikimedia.org/wiki/Proposals_for_closing_projects/Closure_of_Asturianu_Wikiquote
@@ -62,6 +64,8 @@
 'vo',
 # 
https://meta.wikimedia.org/wiki/Proposals_for_closing_projects/Closure_of_Zhuang_Wikiquote
 'za',
+# 
https://meta.wikimedia.org/wiki/Proposals_for_closing_projects/Closure_of_Min_Nan_Wikiquote_(2)
+'zh_min_nan',
 ]
 
 removed_wikis = [
@@ -84,13 +88,13 @@
 
 # Global bot allowed languages on
 # 
https://meta.wikimedia.org/wiki/Bot_policy/Implementation#Current_implementation
+# & https://meta.wikimedia.org/wiki/Special:WikiSets/2
 self.cross_allowed = [
-'af', 'am', 'ar', 'az', 'be', 'bg', 'br', 'bs', 'ca', 'cs', 'da',
-'el', 'eo', 'es', 'et', 'eu', 'fa', 'fi', 'fr', 'gl', 'he', 'hi',
-'hu', 'hy', 'id', 'is', 'it', 'ja', 'ka', 'kn', 'ku', 'ky', 'la',
-'li', 'lt', 'ml', 'mr', 'nl', 'nn', 'no', 'pt', 'ro', 'ru', 'sk',
-'sl', 'sq', 'sr', 'su', 'sv', 'ta', 'te', 'tr', 'uk', 'uz', 'vi',
-'wo', 'zh',
+'af', 'ar', 'az', 'be', 'bg', 'br', 'bs', 'ca', 'cs', 'cy', 'da', 
'el',
+'eo', 'es', 'et', 'eu', 'fa', 'fi', 'fr', 'gl', 'gu', 'he', 'hi', 
'hu',
+'hy', 'id', 'is', 'it', 'ja', 'ka', 'kn', 'ko', 'ku', 'ky', 'la', 
'li',
+'lt', 'ml', 'mr', 'nl', 'nn', 'no', 'pt', 'ro', 'ru', 'sk', 'sl', 
'sq',
+'sr', 'su', 'sv', 'ta', 'te', 'tr', 'uk', 'ur', 'uz', 'vi', 'wo', 
'zh',
 ]
 
 # Subpages for documentation.
diff --git a/pywikibot/families/wikisource_family.py 
b/pywikibot/families/wikisource_family.py
index 519be59..c386b1f 100644
--- a/pywikibot/families/wikisource_family.py
+++ b/pywikibot/families/wikisource_family.py
@@ -25,6 +25,9 @@
 # 
https://meta.wikimedia.org/wiki/Proposals_for_closing_projects/Closure_of_Haitian_Creole_Wikisource
 'ht',
 ]
+removed_wikis = [
+'tokipona',
+]
 
 def __init__(self):
 """Constructor."""
diff --git a/pywikibot/families/wikiversity_family.py 
b/pywikibot/families/wikiversity_family.py
index 9ebc0d5..a85d3cd 100644
--- a/pywikibot/families/wikiversity_family.py
+++ b/pywikibot/families/wikiversity_family.py
@@ -30,4 +30,5 @@
 
 # Global bot allowed languages on
 # 
https://meta.wikimedia.org/wiki/Bot_policy/Implementation#Current_implementation
-self.cross_allowed = ['ja', ]
+# & https://meta.wikimedia.org/wiki/Special:WikiSets/2
+self.cross_allowed = ['ja', 'ko', ]
diff --git a/pywikibot/families/wikivoyage_family.py 
b/pywikibot/families/wikivoyage_family.py
index eb0947e..babae9c 100644
--- a/pywikibot/families/wikivoyage_family.py
+++ b/pywikibot/families/wikivoyage_family.py
@@ -30,4 +30,7 @@
 
 # Global bot allowed languages on
 # 
https://meta.wikimedia.org/wiki/Bot_policy/Implementation#Current_implementation
-self.cross_allowed = ['es', 'ru', ]
+# & https://meta.wikimedia.org/wiki/Special:WikiSets/2
+self.cross_allowed = [
+'el', 'en', 'es', 'fa', 'ru',
+]
diff --git a/pywikibot/families/wiktionary_family.py 
b/pywikibot/families/wiktionary_family.py
index 31d5c83..e5a8c88 100644
--- a/pywikibot/families/wiktionary_family.py
+++ b/pywikibot/families/wiktionary_family.py
@@ -66,8 +66,6 @@
 'sn',
 # 
https://meta.wikimedia.org/wiki/Proposals_for_closing_projects/Closure_of_Tongan_Wiktionary
 'to',
-# 
https://meta.wikimedia.org/wiki/Proposals_for_closing_projects/Closure_of_Klingon_Wiktionary
-'tlh',
 # 

[MediaWiki-commits] [Gerrit] mediawiki...Nuke[master]: Replace Linker::link() with LinkRenderer

2017-02-25 Thread Code Review
Matěj Suchánek has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/339818 )

Change subject: Replace Linker::link() with LinkRenderer
..

Replace Linker::link() with LinkRenderer

This updates the hook handler in order to not rely on global state.

This also raises MediaWiki version requirement to 1.28.0 and bumps the
version number to 1.3.0.

Bug: T149346
Change-Id: I9b1d877046c4cb6548bd8f40306ff7905b766f14
---
M Nuke.hooks.php
M Nuke_body.php
M extension.json
3 files changed, 17 insertions(+), 18 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Nuke 
refs/changes/18/339818/2

diff --git a/Nuke.hooks.php b/Nuke.hooks.php
index 3c36475..ed29ebe 100644
--- a/Nuke.hooks.php
+++ b/Nuke.hooks.php
@@ -5,24 +5,19 @@
/**
 * Shows link to Special:Nuke on Special:Contributions/username if 
applicable
 *
-* @param $userId Integer
-* @param $userPageTitle Title
-* @param $toolLinks Array
-*
-* @return true
+* @param int $userId
+* @param Title $userPageTitle
+* @param string[] $toolLinks
+* @param SpecialPage $sp
 */
-   public static function nukeContributionsLinks( $userId, $userPageTitle, 
&$toolLinks ) {
-   global $wgUser;
-
-   if ( $wgUser->isAllowed( 'nuke' ) ) {
-   $toolLinks[] = Linker::link(
+   public static function nukeContributionsLinks( $userId, $userPageTitle, 
&$toolLinks, SpecialPage $sp ) {
+   if ( $sp->getUser()->isAllowed( 'nuke' ) ) {
+   $toolLinks['nuke'] = 
$sp->getLinkRenderer()->makeKnownLink(
SpecialPage::getTitleFor( 'Nuke' ),
-   wfMessage( 'nuke-linkoncontribs' )->escaped(),
-   [ 'title' => wfMessage( 
'nuke-linkoncontribs-text' )->text() ],
+   $sp->msg( 'nuke-linkoncontribs' )->text(),
+   [ 'title' => $sp->msg( 
'nuke-linkoncontribs-text' )->text() ],
[ 'target' => $userPageTitle->getText() ]
);
}
-
-   return true;
}
 }
diff --git a/Nuke_body.php b/Nuke_body.php
index 6633a69..1887be9 100644
--- a/Nuke_body.php
+++ b/Nuke_body.php
@@ -201,6 +201,7 @@
$wordSeparator = $this->msg( 'word-separator' )->escaped();
$commaSeparator = $this->msg( 'comma-separator' )->escaped();
 
+   $linkRenderer = $this->getLinkRenderer();
foreach ( $pages as $info ) {
/**
 * @var $title Title
@@ -215,9 +216,9 @@
$userNameText = $userName ?
$this->msg( 'nuke-editby', $userName )->parse() 
. $commaSeparator :
'';
-   $changesLink = Linker::linkKnown(
+   $changesLink = $linkRenderer->makeKnownLink(
$title,
-   $this->msg( 'nuke-viewchanges' )->escaped(),
+   $this->msg( 'nuke-viewchanges' )->text(),
[],
[ 'action' => 'history' ]
);
@@ -228,7 +229,7 @@
[ 'value' => $title->getPrefixedDBkey() 
]
) . '' .
( $thumb ? $thumb->toHtml( [ 'desc-link' => 
true ] ) : '' ) .
-   Linker::linkKnown( $title ) . $wordSeparator .
+   $linkRenderer->makeKnownLink( $title ) . 
$wordSeparator .
$this->msg( 'parentheses' )->rawParams( 
$userNameText . $changesLink )->escaped() .
"\n" );
}
diff --git a/extension.json b/extension.json
index c897547..39ac575 100644
--- a/extension.json
+++ b/extension.json
@@ -1,6 +1,6 @@
 {
"name": "Nuke",
-   "version": "1.2.0",
+   "version": "1.3.0",
"author": [
"Brion Vibber",
"Jeroen De Dauw"
@@ -8,6 +8,9 @@
"url": "https://www.mediawiki.org/wiki/Extension:Nuke;,
"descriptionmsg": "nuke-desc",
"license-name": "GPL-2.0+",
+   "requires": {
+   "MediaWiki": ">= 1.28.0"
+   },
"type": "specialpage",
"ExtensionMessagesFiles": {
"NukeAlias": "Nuke.alias.php"

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9b1d877046c4cb6548bd8f40306ff7905b766f14
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Nuke
Gerrit-Branch: master
Gerrit-Owner: Matěj Suchánek 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Move wpSummary from shared.css to mediawiki.action.edit.styl...

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

Change subject: Move wpSummary from shared.css to 
mediawiki.action.edit.styles.css
..


Move wpSummary from shared.css to mediawiki.action.edit.styles.css

Change-Id: I06ca700ffda9013a59b58b09ad56ada8694944a5
---
M resources/src/mediawiki.action/mediawiki.action.edit.styles.css
M resources/src/mediawiki.legacy/shared.css
2 files changed, 21 insertions(+), 25 deletions(-)

Approvals:
  Bartosz Dziewoński: Looks good to me, approved
  jenkins-bot: Verified
  VolkerE: Looks good to me, but someone else must approve



diff --git a/resources/src/mediawiki.action/mediawiki.action.edit.styles.css 
b/resources/src/mediawiki.action/mediawiki.action.edit.styles.css
index 0ee4058..2b467d5 100644
--- a/resources/src/mediawiki.action/mediawiki.action.edit.styles.css
+++ b/resources/src/mediawiki.action/mediawiki.action.edit.styles.css
@@ -25,10 +25,29 @@
font-size: 0.9em;
 }
 
-#wpSummary {
+input#wpSummary {
display: block;
+   background-color: #fff;
+   color: #000;
+   width: 80%;
margin-top: 0;
-   margin-bottom: 0.5em;
+   margin-bottom: 1em;
+   padding: 0.625em 0.546875em 0.546875em;
+   border: 1px solid #a2a9b1;
+   border-radius: 2px;
+   box-shadow: inset 0 0 0 1px #fff;
+   font-family: inherit;
+   font-size: inherit;
+   -webkit-transition: border-color 200ms cubic-bezier( 0.39, 0.575, 
0.565, 1 ), box-shadow 200ms cubic-bezier( 0.39, 0.575, 0.565, 1 );
+   -moz-transition: border-color 200ms cubic-bezier( 0.39, 0.575, 0.565, 1 
), box-shadow 200ms cubic-bezier( 0.39, 0.575, 0.565, 1 );
+   transition: border-color 200ms cubic-bezier( 0.39, 0.575, 0.565, 1 ), 
box-shadow 200ms cubic-bezier( 0.39, 0.575, 0.565, 1 );
+}
+
+input#wpSummary:focus,
+input#wpSummary:active {
+   outline: 0;
+   border-color: #36c;
+   box-shadow: inset 0 0 0 1px #36c;
 }
 
 .editButtons input:first-child {
diff --git a/resources/src/mediawiki.legacy/shared.css 
b/resources/src/mediawiki.legacy/shared.css
index 7919dc4..f761aa0 100644
--- a/resources/src/mediawiki.legacy/shared.css
+++ b/resources/src/mediawiki.legacy/shared.css
@@ -184,29 +184,6 @@
white-space: nowrap;
 }
 
-input#wpSummary {
-   background-color: #fff;
-   color: #000;
-   width: 80%;
-   margin-bottom: 1em;
-   padding: 0.625em 0.546875em 0.546875em;
-   border: 1px solid #a2a9b1;
-   border-radius: 2px;
-   box-shadow: inset 0 0 0 1px #fff;
-   font-family: inherit;
-   font-size: inherit;
-   -webkit-transition: border-color 200ms cubic-bezier( 0.39, 0.575, 
0.565, 1 ), box-shadow 200ms cubic-bezier( 0.39, 0.575, 0.565, 1 );
-   -moz-transition: border-color 200ms cubic-bezier( 0.39, 0.575, 0.565, 1 
), box-shadow 200ms cubic-bezier( 0.39, 0.575, 0.565, 1 );
-   transition: border-color 200ms cubic-bezier( 0.39, 0.575, 0.565, 1 ), 
box-shadow 200ms cubic-bezier( 0.39, 0.575, 0.565, 1 );
-}
-
-input#wpSummary:focus,
-input#wpSummary:active {
-   outline: 0;
-   border-color: #36c;
-   box-shadow: inset 0 0 0 1px #36c;
-}
-
 .mw-input-with-label {
white-space: nowrap;
display: inline-block;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I06ca700ffda9013a59b58b09ad56ada8694944a5
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Ladsgroup 
Gerrit-Reviewer: Bartosz Dziewoński 
Gerrit-Reviewer: Fomafix 
Gerrit-Reviewer: Jack Phoenix 
Gerrit-Reviewer: Ladsgroup 
Gerrit-Reviewer: Prtksxna 
Gerrit-Reviewer: TheDJ 
Gerrit-Reviewer: VolkerE 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...CollaborationKit[master]: Fix CollaborationKitToC section link behavior

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

Change subject: Fix CollaborationKitToC section link behavior
..

Fix CollaborationKitToC section link behavior

The internal name for a feature's display name is "displayTitle"
not "display_title".

Change-Id: I83fca73e2367ed93360597cc82c05fcf792c5405
---
M includes/content/CollaborationHubTOC.php
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CollaborationKit 
refs/changes/17/339817/1

diff --git a/includes/content/CollaborationHubTOC.php 
b/includes/content/CollaborationHubTOC.php
index d3ef18e..8196a4f 100644
--- a/includes/content/CollaborationHubTOC.php
+++ b/includes/content/CollaborationHubTOC.php
@@ -56,8 +56,8 @@
continue;
}
$title = Title::newFromText( $item['title'] );
-   if ( isset( $item['display_title'] ) ) {
-   $displayTitle = $item['display_title'];
+   if ( isset( $item['displayTitle'] ) ) {
+   $displayTitle = $item['displayTitle'];
} else {
$displayTitle = $title->getSubpageText();
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I83fca73e2367ed93360597cc82c05fcf792c5405
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CollaborationKit
Gerrit-Branch: master
Gerrit-Owner: Harej 

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


[MediaWiki-commits] [Gerrit] mediawiki...Wikidata[master]: New Wikidata Build - 2017-02-25T10:00:01+0000

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

Change subject: New Wikidata Build - 2017-02-25T10:00:01+
..

New Wikidata Build - 2017-02-25T10:00:01+

Change-Id: I4b936f45ba046a93ba5858f2c86828409bcef851
---
M composer.json
M composer.lock
A extensions/ExternalValidation/i18n/br.json
A extensions/MediaInfo/i18n/br.json
M extensions/Wikibase/client/WikibaseClient.datatypes.php
M extensions/Wikibase/client/i18n/br.json
M extensions/Wikibase/client/i18n/ca.json
M extensions/Wikibase/client/i18n/hr.json
M extensions/Wikibase/client/i18n/ko.json
M extensions/Wikibase/client/resources/images/wb-otherprojects-beta-ltr.svg
M extensions/Wikibase/client/resources/images/wb-otherprojects-beta-rtl.svg
M 
extensions/Wikibase/client/tests/phpunit/includes/DataAccess/Scribunto/EntityAccessorTest.php
M extensions/Wikibase/lib/WikibaseLib.datatypes.php
M extensions/Wikibase/lib/i18n/ar.json
M extensions/Wikibase/lib/i18n/bn.json
M extensions/Wikibase/lib/i18n/br.json
M extensions/Wikibase/lib/i18n/de.json
M extensions/Wikibase/lib/i18n/en.json
M extensions/Wikibase/lib/i18n/fr.json
M extensions/Wikibase/lib/i18n/he.json
M extensions/Wikibase/lib/i18n/mg.json
M extensions/Wikibase/lib/i18n/qqq.json
M extensions/Wikibase/lib/i18n/zh-hans.json
M extensions/Wikibase/repo/Wikibase.php
M extensions/Wikibase/repo/WikibaseRepo.datatypes.php
M extensions/Wikibase/repo/i18n/ar.json
M extensions/Wikibase/repo/i18n/br.json
M extensions/Wikibase/repo/i18n/de.json
M extensions/Wikibase/repo/i18n/en.json
M extensions/Wikibase/repo/i18n/fr.json
M extensions/Wikibase/repo/i18n/gl.json
M extensions/Wikibase/repo/i18n/he.json
M extensions/Wikibase/repo/i18n/ka.json
M extensions/Wikibase/repo/i18n/nl.json
M extensions/Wikibase/repo/i18n/or.json
M extensions/Wikibase/repo/i18n/qqq.json
M extensions/Wikibase/repo/i18n/zh-hans.json
M extensions/Wikibase/repo/includes/Api/EditEntity.php
M extensions/Wikibase/repo/includes/Api/RemoveReferences.php
A 
extensions/Wikibase/repo/includes/ChangeOp/Deserialization/ClaimsChangeOpDeserializer.php
M extensions/Wikibase/repo/includes/Hooks/LinkBeginHookHandler.php
M extensions/Wikibase/repo/includes/Specials/SpecialModifyEntity.php
M extensions/Wikibase/repo/includes/Specials/SpecialModifyTerm.php
M 
extensions/Wikibase/repo/includes/Specials/SpecialSetLabelDescriptionAliases.php
M extensions/Wikibase/repo/includes/Specials/SpecialSetSiteLink.php
M extensions/Wikibase/repo/includes/Store/Sql/SqlStore.php
M extensions/Wikibase/repo/includes/ValidatorBuilders.php
M extensions/Wikibase/repo/includes/WikibaseRepo.php
M extensions/Wikibase/repo/resources/experts/getStore.js
M extensions/Wikibase/repo/resources/experts/resources.php
M extensions/Wikibase/repo/resources/parsers/getStore.js
D extensions/Wikibase/repo/tests/browser
A extensions/Wikibase/repo/tests/browser
M extensions/Wikibase/repo/tests/phpunit/includes/Api/EditEntityTest.php
A 
extensions/Wikibase/repo/tests/phpunit/includes/ChangeOp/Deserialization/ClaimsChangeOpDeserializerTest.php
M 
extensions/Wikibase/repo/tests/phpunit/includes/Hooks/LinkBeginHookHandlerTest.php
M 
extensions/Wikibase/repo/tests/phpunit/includes/Specials/SpecialSetSiteLinkTest.php
M extensions/Wikibase/repo/tests/phpunit/includes/ValidatorBuildersTest.php
M 
extensions/Wikibase/tests/browser/features/support/modules/special_modify_entity_module.rb
M 
extensions/Wikibase/tests/browser/features/support/modules/special_modify_term_module.rb
M 
extensions/Wikibase/tests/browser/features/support/pages/special_set_label_page.rb
A extensions/Wikidata.org/i18n/br.json
M vendor/composer/LICENSE
M vendor/composer/autoload_classmap.php
M vendor/composer/autoload_files.php
M vendor/composer/autoload_psr4.php
M vendor/composer/autoload_real.php
M vendor/composer/installed.json
D vendor/hamcrest/hamcrest-php/.coveralls.yml
D vendor/hamcrest/hamcrest-php/.gitignore
D vendor/hamcrest/hamcrest-php/.gush.yml
D vendor/hamcrest/hamcrest-php/.travis.yml
D vendor/hamcrest/hamcrest-php/CHANGES.txt
D vendor/hamcrest/hamcrest-php/LICENSE.txt
D vendor/hamcrest/hamcrest-php/README.md
D vendor/hamcrest/hamcrest-php/TODO.txt
D vendor/hamcrest/hamcrest-php/composer.json
D vendor/hamcrest/hamcrest-php/generator/FactoryCall.php
D vendor/hamcrest/hamcrest-php/generator/FactoryClass.php
D vendor/hamcrest/hamcrest-php/generator/FactoryFile.php
D vendor/hamcrest/hamcrest-php/generator/FactoryGenerator.php
D vendor/hamcrest/hamcrest-php/generator/FactoryMethod.php
D vendor/hamcrest/hamcrest-php/generator/FactoryParameter.php
D vendor/hamcrest/hamcrest-php/generator/GlobalFunctionFile.php
D vendor/hamcrest/hamcrest-php/generator/StaticMethodFile.php
D vendor/hamcrest/hamcrest-php/generator/parts/file_header.txt
D vendor/hamcrest/hamcrest-php/generator/parts/functions_footer.txt
D vendor/hamcrest/hamcrest-php/generator/parts/functions_header.txt
D 

[MediaWiki-commits] [Gerrit] mediawiki...GlobalUsage[master]: Replace Linker::link() with LinkRenderer

2017-02-25 Thread Code Review
Matěj Suchánek has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/339815 )

Change subject: Replace Linker::link() with LinkRenderer
..

Replace Linker::link() with LinkRenderer

This raises MediaWiki version requirement to 1.28.0.

Bug: T149346
Change-Id: I1d65a319d11f41c933b1348c6a52b91ec4935025
---
M SpecialGlobalUsage.php
M SpecialGloballyWantedFiles.php
M extension.json
3 files changed, 16 insertions(+), 11 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/GlobalUsage 
refs/changes/15/339815/2

diff --git a/SpecialGlobalUsage.php b/SpecialGlobalUsage.php
index abfbc9d..8c23783 100644
--- a/SpecialGlobalUsage.php
+++ b/SpecialGlobalUsage.php
@@ -228,14 +228,15 @@
}
 
# Get prev/next link display text
-   $prev = $this->msg( 'prevn' )->numParams( $limit )->escaped();
-   $next = $this->msg( 'nextn' )->numParams( $limit )->escaped();
+   $prevMsg = $this->msg( 'prevn' )->numParams( $limit );
+   $nextMsg = $this->msg( 'nextn' )->numParams( $limit );
# Get prev/next link title text
$pTitle = $this->msg( 'prevn-title' )->numParams( $limit 
)->escaped();
$nTitle = $this->msg( 'nextn-title' )->numParams( $limit 
)->escaped();
 
# Fetch the title object
$title = $this->getPageTitle();
+   $linkRenderer = $this->getLinkRenderer();
 
# Make 'previous' link
if ( $to ) {
@@ -244,9 +245,9 @@
if ( $this->filterLocal ) {
$q['filterlocal'] = '1';
}
-   $plink = Linker::link( $title, $prev, $attr, $q );
+   $plink = $linkRenderer->makeLink( $title, 
$prevMsg->text(), $attr, $q );
} else {
-   $plink = $prev;
+   $plink = $prevMsg->escaped();
}
 
# Make 'next' link
@@ -256,9 +257,9 @@
if ( $this->filterLocal ) {
$q['filterlocal'] = '1';
}
-   $nlink = Linker::link( $title, $next, $attr, $q );
+   $nlink = $linkRenderer->makeLink( $title, 
$nextMsg->text(), $attr, $q );
} else {
-   $nlink = $next;
+   $nlink = $nextMsg->escaped();
}
 
# Make links to set number of items per page
@@ -274,7 +275,7 @@
$lTitle = $this->msg( 'shown-title' )->numParams( $num 
)->escaped();
$attr = array( 'title' => $lTitle, 'class' => 
'mw-numlink' );
 
-   $numLinks[] = Linker::link( $title, $fmtLimit, $attr, 
$q );
+   $numLinks[] = $linkRenderer->makeLink( $title, 
$fmtLimit, $attr, $q );
}
$nums = $lang->pipeList( $numLinks );
 
diff --git a/SpecialGloballyWantedFiles.php b/SpecialGloballyWantedFiles.php
index 3471c96..56479ec 100644
--- a/SpecialGloballyWantedFiles.php
+++ b/SpecialGloballyWantedFiles.php
@@ -87,18 +87,19 @@
$title = Title::makeTitle( $result->namespace, $result->title );
$safeTitle = Title::makeTitleSafe( $result->namespace, 
$result->title );
if ( $title instanceof Title && $safeTitle instanceof Title ) {
-   $pageLink = Linker::link( $title );
+   $linkRenderer = $this->getLinkRenderer();
+   $pageLink = $linkRenderer->makeLink( $title );
if ( $safeTitle->isKnown() && wfFindFile( $safeTitle ) 
) {
// If the title exists and is a file, than 
strike.
-   // The wfFindFile() call should already be 
cached from Linker::link call
+   // The wfFindFile() call should already be 
cached from LinkRenderer::makeLink call
// so it shouldn't be too expensive. However a 
future @todo would be
// to do preload existence checks for files all 
at once via RepoGroup::findFiles.
$pageLink = Html::rawElement( 'del', array(), 
$pageLink );
}
 
$gu = SpecialPage::getTitleFor( 'GlobalUsage', 
$title->getDBKey() );
-   $label = $this->msg( 'nlinks' )->numParams( 
$result->value )->escaped();
-   $usages = Linker::link( $gu, $label );
+   $label = $this->msg( 'nlinks' )->numParams( 
$result->value )->text();
+   $usages = $linkRenderer->makeLink( $gu, $label );
 
return $this->getLanguage()->specialList( $pageLink, 
$usages );

[MediaWiki-commits] [Gerrit] mediawiki...CollaborationKit[master]: Resolve redirects on Collaboration Hub

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

Change subject: Resolve redirects on Collaboration Hub
..

Resolve redirects on Collaboration Hub

If an embedded page is a redirect, CollaborationHubContent will
resolve the redirect through a new method called redirectProof.

Change-Id: I5a251c426c3664c07e2dedea95b010836d070920
---
M includes/content/CollaborationHubContent.php
1 file changed, 22 insertions(+), 4 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CollaborationKit 
refs/changes/14/339814/1

diff --git a/includes/content/CollaborationHubContent.php 
b/includes/content/CollaborationHubContent.php
index dfb0d33..0f84631 100644
--- a/includes/content/CollaborationHubContent.php
+++ b/includes/content/CollaborationHubContent.php
@@ -155,6 +155,24 @@
}
 
/**
+* Resolves the redirect of a Title if it is in fact a redirect.
+*
+* Consistent with general MediaWiki behavior, this function does
+* not resolve double redirects.
+*
+* @param Title $title Title which may or may not be a redirect
+* @return Title
+*/
+   public function redirectProof( Title $title ) {
+   if ( $title->isRedirect() ) {
+   $articleID = $title->getArticleID();
+   $wikipage = WikiPage::newFromID( $articleID );
+   return $wikipage->getRedirectTarget();
+   }
+   return $title;
+   }
+
+   /**
 * @return string
 */
public function getIntroduction() {
@@ -351,7 +369,7 @@
}
 
$membersPageName = $title->getFullText() . '/' . wfMessage( 
'collaborationkit-hub-pagetitle-members' )->inContentLanguage()->text();
-   $membersTitle = Title::newFromText( $membersPageName );
+   $membersTitle = $this->redirectProof( Title::newFromText( 
$membersPageName ) );
if ( $membersTitle->exists() || $membersContent !== null ) {
$membersPageID = $membersTitle->getArticleID();
$output->addJsConfigVars( 
'wgCollaborationKitAssociatedMemberList', $membersPageID );
@@ -425,7 +443,7 @@
 */
protected function getParsedAnnouncements( Title $title, ParserOptions 
$options, $announcementsText = null ) {
$announcementsSubpageName = wfMessage( 
'collaborationkit-hub-pagetitle-announcements' )->inContentLanguage()->text();
-   $announcementsTitle = Title::newFromText( $title->getFullText() 
. '/' . $announcementsSubpageName );
+   $announcementsTitle = $this->redirectProof( Title::newFromText( 
$title->getFullText() . '/' . $announcementsSubpageName ) );
 
if ( $announcementsTitle->exists() || $announcementsText !== 
null ) {
if ( $announcementsText === null ) {
@@ -515,7 +533,7 @@
if ( !isset( $item['title'] ) || $item['title'] == '' ) 
{
continue;
}
-   $spTitle = Title::newFromText( $item['title'] );
+   $spTitle = $this->redirectProof( Title::newFromText( 
$item['title'] ) );
$spRev = Revision::newFromTitle( $spTitle );
 
// open element and do header
@@ -607,7 +625,7 @@
static $tocLinks = []; // All used ids for the sections for the 
toc
$linkRenderer = $wgParser->getLinkRenderer();
 
-   $spTitle = Title::newFromText( $contentItem['title'] );
+   $spTitle = $this->redirectProof( Title::newFromText( 
$contentItem['title'] ) );
$spRev = Revision::newFromTitle( $spTitle );
 
// Get display name

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5a251c426c3664c07e2dedea95b010836d070920
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CollaborationKit
Gerrit-Branch: master
Gerrit-Owner: Harej 

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


[MediaWiki-commits] [Gerrit] mediawiki...CollaborationKit[master]: Adding hub section main bodies to their own container and se...

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

Change subject: Adding hub section main bodies to their own container and 
setting padding
..

Adding hub section main bodies to their own container and setting padding

I think having the buttons become in-line with the H2 headers broke
padding. This fixes that by having everything after the top being
in a container div, with padding-top set to 0.25 em.

Change-Id: Id4fc1f85a23993d1ad1955c655dcef9e25195365
---
M includes/content/CollaborationHubContent.php
M modules/ext.CollaborationKit.hub.styles.less
2 files changed, 5 insertions(+), 2 deletions(-)


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

diff --git a/includes/content/CollaborationHubContent.php 
b/includes/content/CollaborationHubContent.php
index dfb0d33..dbad498 100644
--- a/includes/content/CollaborationHubContent.php
+++ b/includes/content/CollaborationHubContent.php
@@ -568,7 +568,7 @@
$text = $contentOutput->getRawText();
}
 
-   $html .= $text;
+   $html .= Html::rawElement( 'div', [ 'class' => 
'mw-ck-hub-section-main' ], $text );
 
// register as template for stuff
$output->addTemplate( $spTitle, 
$spTitle->getArticleId(), $spRev->getId() );
diff --git a/modules/ext.CollaborationKit.hub.styles.less 
b/modules/ext.CollaborationKit.hub.styles.less
index b5bcb8b..c664627 100644
--- a/modules/ext.CollaborationKit.hub.styles.less
+++ b/modules/ext.CollaborationKit.hub.styles.less
@@ -62,12 +62,15 @@
h2 {
display: inline;
margin: 0;
-   padding: 0 0 .25em;
border-bottom-style: none;
border-top-style: none;
border-left-style: none;
border-right-style: none;
}
+
+   .mw-ck-hub-section-main {
+   padding-top: .25em;
+   }
}
.mw-ck-hub-section-buttons {
display: inline;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id4fc1f85a23993d1ad1955c655dcef9e25195365
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CollaborationKit
Gerrit-Branch: master
Gerrit-Owner: Harej 

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


[MediaWiki-commits] [Gerrit] mediawiki...CollaborationKit[master]: Remove JS functionality for logged-out users for join button.

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

Change subject: Remove JS functionality for logged-out users for join button.
..

Remove JS functionality for logged-out users for join button.

The project join button assumes the existence of a user account. Logged
out users lack this, so this removes the "join" button from the member
list itself. The button is still technically there on the hub page, but
the JavaScript functionality is removed, so logged out users can still
technically join projects (to the extent they're already allowed to join
WikiProjects).

Change-Id: Iadc48eca8f9ed65d32578148b0cd54903c5d4e7f
---
M modules/ext.CollaborationKit.list.members.js
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CollaborationKit 
refs/changes/12/339812/1

diff --git a/modules/ext.CollaborationKit.list.members.js 
b/modules/ext.CollaborationKit.list.members.js
index c873679..e4f353c 100644
--- a/modules/ext.CollaborationKit.list.members.js
+++ b/modules/ext.CollaborationKit.list.members.js
@@ -88,7 +88,7 @@
};
 
$( function () {
-   if ( mw.config.get( 'wgCollaborationKitAssociatedMemberList' ) 
) {
+   if ( mw.config.get( 'wgCollaborationKitAssociatedMemberList' ) 
&& mw.user.getId() != 0 ) {
memberListPage = mw.config.get( 
'wgCollaborationKitAssociatedMemberList' );
curUserIsInList( memberListPage ); // removes Join 
button if user already is member
new mw.Api().get( {
@@ -108,7 +108,7 @@
}
 
if ( mw.config.get( 'wgCollaborationKitIsMemberList' ) &&
-   !curUserIsInList()
+   !curUserIsInList() && mw.user.getId() != 0
) {
$list = $( '.mw-ck-list' );
$list.before(

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iadc48eca8f9ed65d32578148b0cd54903c5d4e7f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CollaborationKit
Gerrit-Branch: master
Gerrit-Owner: Harej 

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