[MediaWiki-commits] [Gerrit] Only use protocol-relative URL for $wgServer if https role i... - change (mediawiki/vagrant)

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

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

Change subject: Only use protocol-relative URL for $wgServer if https role is 
enabled
..

Only use protocol-relative URL for $wgServer if https role is enabled

Follow-up to I4a2d7d to prevent wfExpandUrl($wgServer,PROTO_HTTPS)
returning an URL that does not actually work.

Bug: T126378
Change-Id: Iad31a00af0ccd8f81a24541499114dc50dbd51c4
---
M puppet/modules/mediawiki/templates/multiwiki/CommonSettings.php.erb
M puppet/modules/role/manifests/https.pp
2 files changed, 14 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant 
refs/changes/73/275273/1

diff --git 
a/puppet/modules/mediawiki/templates/multiwiki/CommonSettings.php.erb 
b/puppet/modules/mediawiki/templates/multiwiki/CommonSettings.php.erb
index 2d76286..00934a3 100644
--- a/puppet/modules/mediawiki/templates/multiwiki/CommonSettings.php.erb
+++ b/puppet/modules/mediawiki/templates/multiwiki/CommonSettings.php.erb
@@ -66,4 +66,9 @@
# T68399: set wgServer from inbound request
# Strip protocol (e.g. http:) to create protocol-relative URL
$wgServer = preg_replace( '#^[^\/]+#', '', WebRequest::detectServer() );
+   if ( empty( $mwvSupportsHttps ) ) {
+   # the https role is not enabled; do not use protocol-relative
+   # $wgServer as that might result in a HTTPS URL
+   $wgServer = 'http:' . $wgServer;
+   }
 }
diff --git a/puppet/modules/role/manifests/https.pp 
b/puppet/modules/role/manifests/https.pp
index 9340677..2e83bc0 100644
--- a/puppet/modules/role/manifests/https.pp
+++ b/puppet/modules/role/manifests/https.pp
@@ -23,6 +23,15 @@
 }
 }
 
+# horrible hack to tell CommonSettings.php that it is safe to use
+# a protocol-relative URL for wgServer
+mediawiki::settings { 'Vagrant HTTPS support flag':
+values   => {
+'mwvSupportsHttps' => true,
+},
+priority => 1,
+}
+
 # Fix wgServer in wgConf to take
 # wgAssumeProxiesUseDefaultProtocolPorts and preserving the port
 # when referencing other wikis into account.

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iad31a00af0ccd8f81a24541499114dc50dbd51c4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: master
Gerrit-Owner: Gergő Tisza 

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


[MediaWiki-commits] [Gerrit] listpages.py: Fix help docstring - change (pywikibot/core)

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

Change subject: listpages.py: Fix help docstring
..


listpages.py: Fix help docstring

Replace -dir with -save in docstring.

Change-Id: Ic17d6255a532c3959ac0924314fe2f01f4d53ea6
(cherry picked from commit 08af9606decaf405a034f4f5a9275c7eb56a4b32)
---
M scripts/listpages.py
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/scripts/listpages.py b/scripts/listpages.py
index c89be5a..30d71ca 100755
--- a/scripts/listpages.py
+++ b/scripts/listpages.py
@@ -43,7 +43,7 @@
 -get Page content is printed.
 
 -saveSave Page content to a file named as page.title(as_filename=True).
- Directory can be set with -dir:dir_name
+ Directory can be set with -save:dir_name
  If no dir is specified, current direcory will be used.
 
 -encode  File encoding can be specified with '-encode:name' (name must be a

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic17d6255a532c3959ac0924314fe2f01f4d53ea6
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: 2.0
Gerrit-Owner: John Vandenberg 
Gerrit-Reviewer: Mpaa 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] [bugfix] Fix parameters for issue_deprecation_warning - change (pywikibot/core)

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

Change subject: [bugfix] Fix parameters for issue_deprecation_warning
..


[bugfix] Fix parameters for issue_deprecation_warning

Bug: T109208
Change-Id: I73c13c30b7ec4e6b5def857b2095060e757e5089
---
M pywikibot/pagegenerators.py
1 file changed, 2 insertions(+), 1 deletion(-)

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



diff --git a/pywikibot/pagegenerators.py b/pywikibot/pagegenerators.py
index 4633b5c..bc95374 100644
--- a/pywikibot/pagegenerators.py
+++ b/pywikibot/pagegenerators.py
@@ -656,7 +656,8 @@
 return True
 elif arg == '-step':
 issue_deprecation_warning(
-'The usage of "{0}"'.format(arg), 2, 
ArgumentDeprecationWarning)
+'The usage of "{0}"'.format(arg), None, 2,
+ArgumentDeprecationWarning)
 return False
 elif arg == '-limit':
 if not value:

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I73c13c30b7ec4e6b5def857b2095060e757e5089
Gerrit-PatchSet: 4
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Xqt 
Gerrit-Reviewer: John Vandenberg 
Gerrit-Reviewer: Xqt 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Monkeypatch Horizon to simplify the instance-creation panel. - change (operations/puppet)

2016-03-05 Thread Andrew Bogott (Code Review)
Andrew Bogott has submitted this change and it was merged.

Change subject: Monkeypatch Horizon to simplify the instance-creation panel.
..


Monkeypatch Horizon to simplify the instance-creation panel.

This uses a built in Horizon facility, 'customization_module'.

Change-Id: I12ca1bbf25546f89465aba4425d2dd2847f9dd1a
---
A modules/openstack/files/liberty/horizon/.pep8
A modules/openstack/files/liberty/horizon/overrides.py
M modules/openstack/manifests/horizon/service.pp
M modules/openstack/templates/liberty/horizon/local_settings.py.erb
4 files changed, 24 insertions(+), 0 deletions(-)

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



diff --git a/modules/openstack/files/liberty/horizon/.pep8 
b/modules/openstack/files/liberty/horizon/.pep8
new file mode 100644
index 000..1829933
--- /dev/null
+++ b/modules/openstack/files/liberty/horizon/.pep8
@@ -0,0 +1,3 @@
+[pep8]
+# This is a third-party file, so I'm just turning off everything...
+ignore = E501
diff --git a/modules/openstack/files/liberty/horizon/overrides.py 
b/modules/openstack/files/liberty/horizon/overrides.py
new file mode 100644
index 000..251f607
--- /dev/null
+++ b/modules/openstack/files/liberty/horizon/overrides.py
@@ -0,0 +1,11 @@
+#  --  Tidy up the instance creation panel  --
+
+from openstack_dashboard.dashboards.project.instances.workflows import 
create_instance
+#  Remove a couple of unwanted tabs from the instance creation panel:
+#   PostCreationStep just provides confusing competition with puppet.
+#   SetAdvanced provides broken features like configdrive and partitioning.
+
+create_instance.LaunchInstance.default_steps = 
(create_instance.SelectProjectUser,
+
create_instance.SetInstanceDetails,
+
create_instance.SetAccessControls,
+create_instance.SetNetwork)
diff --git a/modules/openstack/manifests/horizon/service.pp 
b/modules/openstack/manifests/horizon/service.pp
index bd1ddd2..be215da 100644
--- a/modules/openstack/manifests/horizon/service.pp
+++ b/modules/openstack/manifests/horizon/service.pp
@@ -136,6 +136,15 @@
 mode=> '0644',
 }
 
+# Monkeypatches for Horizon customization
+file { '/usr/lib/python2.7/dist-packages/horizon/overrides.py':
+source  => 
"puppet:///modules/openstack/${openstack_version}/horizon/overrides.py",
+owner   => 'root',
+group   => 'root',
+require => Package['python-openstack-auth'],
+mode=> '0644',
+}
+
 apache::site { $webserver_hostname:
 content => 
template("openstack/${$openstack_version}/horizon/${webserver_hostname}.erb"),
 require => File['/etc/openstack-dashboard/local_settings.py'],
diff --git a/modules/openstack/templates/liberty/horizon/local_settings.py.erb 
b/modules/openstack/templates/liberty/horizon/local_settings.py.erb
index cc9cb7e..c5b0f5f 100644
--- a/modules/openstack/templates/liberty/horizon/local_settings.py.erb
+++ b/modules/openstack/templates/liberty/horizon/local_settings.py.erb
@@ -74,6 +74,7 @@
 'exceptions': {'recoverable': exceptions.RECOVERABLE,
'not_found': exceptions.NOT_FOUND,
'unauthorized': exceptions.UNAUTHORIZED},
+'customization_module': 'horizon.overrides',
 }
 
 # Specify a regular expression to validate user passwords.

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I12ca1bbf25546f89465aba4425d2dd2847f9dd1a
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Andrew Bogott 
Gerrit-Reviewer: Andrew Bogott 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Fix -cat pagegenerator - change (pywikibot/core)

2016-03-05 Thread John Vandenberg (Code Review)
John Vandenberg has uploaded a new change for review.

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

Change subject: Fix -cat pagegenerator
..

Fix -cat pagegenerator

-cat without an argument was broken in 343b875
This broken unit test test_pagegen_i18n_input

Also properly deprecated the old 'arg' argument for
public GeneratorFactory.getCategory and .getCategoryGen
which was also a breaking change in 343b875.

Change-Id: Ifca4c65737e1f67f14576f540bdafcd0b82daf4c
---
M pywikibot/pagegenerators.py
1 file changed, 4 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/72/275272/1

diff --git a/pywikibot/pagegenerators.py b/pywikibot/pagegenerators.py
index 2f80a3b..7c9854e 100644
--- a/pywikibot/pagegenerators.py
+++ b/pywikibot/pagegenerators.py
@@ -475,6 +475,7 @@
 
 return dupfiltergen
 
+@deprecated_args(arg='category')
 def getCategory(self, category):
 """
 Return Category and start as defined by category.
@@ -483,7 +484,7 @@
 @type category: str
 @rtype: tuple
 """
-if category.startswith('-'):  # old arg parameter
+if category and category.startswith('-'):
 categoryname = category.partition(':')[2]
 issue_deprecation_warning(
 'The usage of "{0}" as actual parameter of '
@@ -491,6 +492,7 @@
 categoryname, 2, ArgumentDeprecationWarning)
 else:
 categoryname = category
+
 if not categoryname:
 categoryname = i18n.input(
 'pywikibot-enter-category-name',
@@ -512,6 +514,7 @@
 defaultNamespace=14))
 return cat, startfrom
 
+@deprecated_args(arg='category')
 def getCategoryGen(self, category, recurse=False, content=False,
gen_func=None):
 """

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifca4c65737e1f67f14576f540bdafcd0b82daf4c
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: John Vandenberg 

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


[MediaWiki-commits] [Gerrit] Define config.db_port as local port for mysql server - change (pywikibot/core)

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

Change subject: Define config.db_port as local port for mysql server
..


Define config.db_port as local port for mysql server

Define config.db_port to specify local port for a mysql server.

This allows to run SQL queries on Tool Labs Database from local
computer setting up a SSH tunnel.
(note: SSH tunnel shall be open separately; it is not open by
pywikibot.)

Change-Id: I451a8ed338445b38806b20d3eaed63afc3b5de09
---
M pywikibot/config2.py
M pywikibot/pagegenerators.py
2 files changed, 13 insertions(+), 4 deletions(-)

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



diff --git a/pywikibot/config2.py b/pywikibot/config2.py
index 7fc9d7a..4d065a8 100644
--- a/pywikibot/config2.py
+++ b/pywikibot/config2.py
@@ -658,6 +658,9 @@
 db_password = ''
 db_name_format = '{0}'
 db_connect_file = user_home_path('.my.cnf')
+# local port for mysql server
+# ssh -L 4711:enwiki.labsdb:3306 u...@tools-login.wmflabs.org
+db_port = 3306
 
 # # SEARCH ENGINE SETTINGS ##
 
diff --git a/pywikibot/pagegenerators.py b/pywikibot/pagegenerators.py
index 2f80a3b..4633b5c 100644
--- a/pywikibot/pagegenerators.py
+++ b/pywikibot/pagegenerators.py
@@ -2408,12 +2408,18 @@
 import MySQLdb as mysqldb
 if site is None:
 site = pywikibot.Site()
+
 if config.db_connect_file is None:
-conn = mysqldb.connect(config.db_hostname, 
db=config.db_name_format.format(site.dbName()),
-   user=config.db_username, 
passwd=config.db_password)
+conn = mysqldb.connect(config.db_hostname,
+   db=config.db_name_format.format(site.dbName()),
+   user=config.db_username,
+   passwd=config.db_password,
+   port=config.db_port)
 else:
-conn = mysqldb.connect(config.db_hostname, 
db=config.db_name_format.format(site.dbName()),
-   read_default_file=config.db_connect_file)
+conn = mysqldb.connect(config.db_hostname,
+   db=config.db_name_format.format(site.dbName()),
+   read_default_file=config.db_connect_file,
+   port=config.db_port)
 
 cursor = conn.cursor()
 pywikibot.output(u'Executing query:\n%s' % query)

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I451a8ed338445b38806b20d3eaed63afc3b5de09
Gerrit-PatchSet: 3
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Mpaa 
Gerrit-Reviewer: John Vandenberg 
Gerrit-Reviewer: Mpaa 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] [WIP/EXPERIMENTAL] Version 1.5.3 -- use HTML5 instead of Fla... - change (mediawiki...Video)

2016-03-05 Thread Jack Phoenix (Code Review)
Jack Phoenix has uploaded a new change for review.

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

Change subject: [WIP/EXPERIMENTAL] Version 1.5.3 -- use HTML5 instead of Flash 
for YouTube videos
..

[WIP/EXPERIMENTAL] Version 1.5.3 -- use HTML5 instead of Flash for YouTube 
videos

Also improved YouTube embedding support so that it *theoretically*
supports YouTube's short "youtu.be" share URLs.

Code sorta copypasted from the YouTube extension, but then again I also
played a part in getting that code there in the first place.

Change-Id: I0f051bcfe9fb9d4d33b2e60c416a127681a5e18d
---
M Video.php
M extension.json
M providers/YouTubeVideo.php
3 files changed, 29 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Video 
refs/changes/71/275271/1

diff --git a/Video.php b/Video.php
index 768d8b2..c6b04e6 100644
--- a/Video.php
+++ b/Video.php
@@ -15,7 +15,7 @@
 // Extension credits that show up on Special:Version
 $wgExtensionCredits['other'][] = array(
'name' => 'Video',
-   'version' => '1.5.3',
+   'version' => '1.5.4',
'author' => array( 'David Pean', 'Jack Phoenix', 'John Du Hart' ),
'description' => 'Allows new Video namespace for embeddable media on 
supported sites',
'url' => 'https://www.mediawiki.org/wiki/Extension:Video',
diff --git a/extension.json b/extension.json
index 4692c93..fc83163 100644
--- a/extension.json
+++ b/extension.json
@@ -1,6 +1,6 @@
 {
"name": "Video",
-   "version": "1.5.3",
+   "version": "1.5.4",
"author": [
"David Pean",
"Jack Phoenix",
diff --git a/providers/YouTubeVideo.php b/providers/YouTubeVideo.php
index c77f2fe..e544511 100644
--- a/providers/YouTubeVideo.php
+++ b/providers/YouTubeVideo.php
@@ -2,16 +2,40 @@
 
 class YouTubeVideoProvider extends BaseVideoProvider {
 
-   protected $videoIdRegex = '/.*v=([A-Za-z0-9-_]+).*/';
+   // @see 
http://linuxpanda.wordpress.com/2013/07/24/ultimate-best-regex-pattern-to-get-grab-parse-youtube-video-id-from-any-youtube-link-url/
+   protected $videoIdRegex = 
'~(?:http|https|)(?::\/\/|)(?:www.|)(?:youtu\.be\/|youtube\.com(?:\/embed\/|\/v\/|\/watch\?v=|\/ytscreeningroom\?v=|\/feeds\/api\/videos\/|\/user\S*[^\w\-\s]|\S*[^\w\-\s]))([\w\-]{11})[a-z0-9;:@?&%=+\/\$_.-]*~i';
 
-   protected $embedTemplate = 'http://www.youtube.com/v/$video_id&fs=1";>http://www.youtube.com/v/$video_id&fs=1"; 
type="application/x-shockwave-flash" wmode="transparent" allowFullScreen="true" 
width="$width" height="$height">';
+   protected $embedTemplate = 'https://www.youtube.com/embed/$video_id"; frameborder="0" 
allowfullscreen>';
 
protected function getRatio() {
-   return 425 / 355;
+   return 560 / 315;
+   }
+
+   /**
+* Function to extract the video ID
+*
+* @param string $url Video URL
+* @return string Video ID
+*/
+   protected function extractVideoId( $url ) {
+   $matches = array();
+
+   if ( preg_match( $this->videoIdRegex, $url, $matches ) ) {
+   $this->videoId = $matches[1];
+   } elseif ( preg_match( '/([0-9A-Za-z_-]+)/', $url, $matches ) ) 
{
+   $this->videoId = $matches[1];
+   }
+
+   if ( isset( $this->videoId ) && $this->videoID !== null ) {
+   return $this->videoId;
+   } else {
+   return null;
+   }
}
 
public static function getDomains() {
return array(
+   'youtu.be',
'youtube.com',
// YouTube's "enhanced privacy mode", in which "YouTube 
won’t
// store information about visitors on your web page 
unless they

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0f051bcfe9fb9d4d33b2e60c416a127681a5e18d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Video
Gerrit-Branch: master
Gerrit-Owner: Jack Phoenix 

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


[MediaWiki-commits] [Gerrit] Set VisualEditorSingleEditTabSwitchTime to correct dates - change (operations/mediawiki-config)

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

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

Change subject: Set VisualEditorSingleEditTabSwitchTime to correct dates
..

Set VisualEditorSingleEditTabSwitchTime to correct dates

Change-Id: I4f1a0554d4b338629d1af2e019ebf0746ce6ad35
---
M wmf-config/CommonSettings.php
M wmf-config/InitialiseSettings.php
2 files changed, 12 insertions(+), 0 deletions(-)


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

diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index 9c80d8e..c610364 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -2007,6 +2007,7 @@
// Tab configuration
if ( $wmgVisualEditorUseSingleEditTab ) {
$wgVisualEditorUseSingleEditTab = true;
+   $wgVisualEditorSingleEditTabSwitchTime = 
$wmgVisualEditorSingleEditTabSwitchTime;
if ( $wmgVisualEditorSingleEditTabSecondaryEditor ) {
$wgDefaultUserOptions['visualeditor-editor'] = 
'wikitext';
} else {
diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 4f54353..e7ed64b 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -13189,6 +13189,17 @@
'officewiki' => true,   # Per legoktm's orders, 2016-03-03
 ),
 
+// Time that above variable was switched on, used to determine whether we 
should prompt user about
+// preference on first load
+'wmgVisualEditorSingleEditTabSwitchTime' => array(
+   'default' => 2016010100,
+   'mediawikiwiki' => 2016020300,
+   'testwiki' => 2016020300,
+   'test2wiki' => 2015121500,
+   'huwiki' => 2016022300,
+   'officewiki' => 2016030300,
+),
+
 // Whether the wikitext editor should be the default (first-open) editor on 
SET wikis
 'wmgVisualEditorSingleEditTabSecondaryEditor' => array(
'default' => false,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4f1a0554d4b338629d1af2e019ebf0746ce6ad35
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Alex Monk 

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


[MediaWiki-commits] [Gerrit] Simplify showtabdialog logic a little bit - change (mediawiki...VisualEditor)

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

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

Change subject: Simplify showtabdialog logic a little bit
..

Simplify showtabdialog logic a little bit

Don't unnecessarily nest if statements, don't check tabs preference twice

Change-Id: I788d978b2e13030104be7ea295137a09abc032a8
---
M VisualEditor.hooks.php
1 file changed, 19 insertions(+), 23 deletions(-)


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

diff --git a/VisualEditor.hooks.php b/VisualEditor.hooks.php
index 94bbf67..77466e2 100644
--- a/VisualEditor.hooks.php
+++ b/VisualEditor.hooks.php
@@ -234,32 +234,28 @@
return true;
}
 
+   $dbr = wfGetDB( DB_SLAVE );
if (
$config->get( 'VisualEditorUseSingleEditTab' ) &&
-   $user->getOption( 'visualeditor-tabs' ) !== 'multi-tab'
+   !$user->isAnon() &&
+   !$user->getOption( 'visualeditor-autodisable' ) &&
+   !$user->getOption( 'visualeditor-betatempdisable' ) &&
+   !$user->getOption( 'visualeditor-hidetabdialog' ) &&
+   $user->getOption( 'visualeditor-tabs' ) === 
'remember-last' &&
+   $dbr->select(
+   'revision',
+   '1',
+   [
+   'rev_user' => $user->getId(),
+   'rev_timestamp < ' . $dbr->addQuotes(
+   $config->get( 
'VisualEditorSingleEditTabSwitchTime' )
+   )
+   ],
+   __METHOD__,
+   [ 'LIMIT' => 1 ]
+   )->numRows() === 1
) {
-   $dbr = wfGetDB( DB_SLAVE );
-   if (
-   !$user->isAnon() &&
-   !$user->getOption( 'visualeditor-autodisable' ) 
&&
-   !$user->getOption( 
'visualeditor-betatempdisable' ) &&
-   !$user->getOption( 'visualeditor-hidetabdialog' 
) &&
-   $user->getOption( 'visualeditor-tabs' ) === 
'remember-last' &&
-   $dbr->select(
-   'revision',
-   '1',
-   [
-   'rev_user' => $user->getId(),
-   'rev_timestamp < ' . 
$dbr->addQuotes(
-   $config->get( 
'VisualEditorSingleEditTabSwitchTime' )
-   )
-   ],
-   __METHOD__,
-   [ 'LIMIT' => 1 ]
-   )->numRows() === 1
-   ) {
-   $links['views']['edit']['class'] .= ' 
visualeditor-showtabdialog';
-   }
+   $links['views']['edit']['class'] .= ' 
visualeditor-showtabdialog';
}
 
// Exit if the user doesn't have VE enabled

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I788d978b2e13030104be7ea295137a09abc032a8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Alex Monk 

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


[MediaWiki-commits] [Gerrit] Allow users with deleterevision but not deletedhistory to de... - change (mediawiki/core)

2016-03-05 Thread LFaraone (Code Review)
LFaraone has uploaded a new change for review.

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

Change subject: Allow users with deleterevision but not deletedhistory to 
delete revisions
..

Allow users with deleterevision but not deletedhistory to delete revisions

Previously, Special:RevisionDelete required that the accessor had
deletedhistory to access it. Instead, we check for `deleterevision`, but
suppress output of the deletion log if the user lacks `deletedhistory`.

This has the side-effect of locking out users who have `deletedhistory` but not
`deleterevision` from accessing this special page, but that information is
available in other logs.

Bug: T128914
Change-Id: I2e194dae84a29c5ace254f55eda63cfe7f86c3ca
---
M includes/specials/SpecialRevisiondelete.php
1 file changed, 14 insertions(+), 12 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/68/275268/1

diff --git a/includes/specials/SpecialRevisiondelete.php 
b/includes/specials/SpecialRevisiondelete.php
index fcd4ab5..dcaff4d 100644
--- a/includes/specials/SpecialRevisiondelete.php
+++ b/includes/specials/SpecialRevisiondelete.php
@@ -106,7 +106,7 @@
];
 
public function __construct() {
-   parent::__construct( 'Revisiondelete', 'deletedhistory' );
+   parent::__construct( 'Revisiondelete', 'deleterevision' );
}
 
public function doesWrites() {
@@ -210,17 +210,19 @@
$this->showForm();
}
 
-   $qc = $this->getLogQueryCond();
-   # Show relevant lines from the deletion log
-   $deleteLogPage = new LogPage( 'delete' );
-   $output->addHTML( "" . $deleteLogPage->getName()->escaped() 
. "\n" );
-   LogEventsList::showLogExtract(
-   $output,
-   'delete',
-   $this->targetObj,
-   '', /* user */
-   [ 'lim' => 25, 'conds' => $qc, 'useMaster' => 
$this->wasSaved ]
-   );
+   if ( $user->isAllowed( 'deletedhistory' ) ) {
+   $qc = $this->getLogQueryCond();
+   # Show relevant lines from the deletion log
+   $deleteLogPage = new LogPage( 'delete' );
+   $output->addHTML( "" . 
$deleteLogPage->getName()->escaped() . "\n" );
+   LogEventsList::showLogExtract(
+   $output,
+   'delete',
+   $this->targetObj,
+   '', /* user */
+   [ 'lim' => 25, 'conds' => $qc, 'useMaster' => 
$this->wasSaved ]
+   );
+   }
# Show relevant lines from the suppression log
if ( $user->isAllowed( 'suppressionlog' ) ) {
$suppressLogPage = new LogPage( 'suppress' );

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

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

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


[MediaWiki-commits] [Gerrit] listpages.py: Fix help docstring - change (pywikibot/core)

2016-03-05 Thread John Vandenberg (Code Review)
John Vandenberg has uploaded a new change for review.

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

Change subject: listpages.py: Fix help docstring
..

listpages.py: Fix help docstring

Replace -dir with -save in docstring.

Change-Id: Ic17d6255a532c3959ac0924314fe2f01f4d53ea6
(cherry picked from commit 08af9606decaf405a034f4f5a9275c7eb56a4b32)
---
M scripts/listpages.py
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/67/275267/1

diff --git a/scripts/listpages.py b/scripts/listpages.py
index c89be5a..30d71ca 100755
--- a/scripts/listpages.py
+++ b/scripts/listpages.py
@@ -43,7 +43,7 @@
 -get Page content is printed.
 
 -saveSave Page content to a file named as page.title(as_filename=True).
- Directory can be set with -dir:dir_name
+ Directory can be set with -save:dir_name
  If no dir is specified, current direcory will be used.
 
 -encode  File encoding can be specified with '-encode:name' (name must be a

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic17d6255a532c3959ac0924314fe2f01f4d53ea6
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: 2.0
Gerrit-Owner: John Vandenberg 
Gerrit-Reviewer: Mpaa 

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


[MediaWiki-commits] [Gerrit] Add grunt-jscs and make pass - change (mediawiki...CharInsert)

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

Change subject: Add grunt-jscs and make pass
..


Add grunt-jscs and make pass

Change-Id: I419e6d23bad60e8b6c5b3028afcd5f73080f469c
---
A .jscsrc
M Gruntfile.js
M modules/ext.charinsert.js
M package.json
4 files changed, 19 insertions(+), 7 deletions(-)

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



diff --git a/.jscsrc b/.jscsrc
new file mode 100644
index 000..9d22e3f
--- /dev/null
+++ b/.jscsrc
@@ -0,0 +1,3 @@
+{
+   "preset": "wikimedia"
+}
diff --git a/Gruntfile.js b/Gruntfile.js
index 087b2c0..90e007b 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -6,12 +6,20 @@
 
 /*jshint node:true */
 module.exports = function ( grunt ) {
+   var conf = grunt.file.readJSON( 'extension.json' );
+
grunt.loadNpmTasks( 'grunt-banana-checker' );
+   grunt.loadNpmTasks( 'grunt-jscs' );
grunt.loadNpmTasks( 'grunt-jsonlint' );
 
-   var conf = grunt.file.readJSON( 'extension.json' );
grunt.initConfig( {
banana: conf.MessagesDirs,
+   jscs: {
+   all: [
+   '**/*.js',
+   '!node_modules/**'
+   ]
+   },
jsonlint: {
all: [
'**/*.json',
@@ -20,6 +28,6 @@
}
} );
 
-   grunt.registerTask( 'test', [ 'jsonlint', 'banana' ] );
+   grunt.registerTask( 'test', [ 'jscs', 'jsonlint', 'banana' ] );
grunt.registerTask( 'default', 'test' );
 };
diff --git a/modules/ext.charinsert.js b/modules/ext.charinsert.js
index 65807ff..de0b4c8 100644
--- a/modules/ext.charinsert.js
+++ b/modules/ext.charinsert.js
@@ -1,10 +1,10 @@
-( function( $, mw ) {
-   var addClickHandlers = function( $content ) {
-   $content.find( 'a.mw-charinsert-item-todo' ).each( function() {
+( function ( $, mw ) {
+   var addClickHandlers = function ( $content ) {
+   $content.find( 'a.mw-charinsert-item-todo' ).each( function () {
var $elm = $( this ),
start = $elm.data( 'mw-charinsert-start' ),
end = $elm.data( 'mw-charinsert-end' );
-   $elm.click( function( e ) {
+   $elm.click( function ( e ) {
e.preventDefault();
mw.toolbar.insertTags( start, end, '' );
} ).removeClass( 'mw-charinsert-item-todo' );
@@ -13,7 +13,7 @@
// Normally  appears outside of content area.
// However, we also want to catch things like live preview,
// so we use both the onready hook and wikipage.content.
-   $( function() {
+   $( function () {
addClickHandlers( $( document ) );
} );
mw.hook( 'wikipage.content' ).add( addClickHandlers );
diff --git a/package.json b/package.json
index eaea2e7..284ae06 100644
--- a/package.json
+++ b/package.json
@@ -10,6 +10,7 @@
 "grunt": "0.4.5",
 "grunt-cli": "0.1.13",
 "grunt-banana-checker": "0.4.0",
+"grunt-jscs": "2.8.0",
 "grunt-jsonlint": "1.0.7"
   }
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I419e6d23bad60e8b6c5b3028afcd5f73080f469c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CharInsert
Gerrit-Branch: master
Gerrit-Owner: Ricordisamoa 
Gerrit-Reviewer: Brian Wolff 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Thiemo Mättig (WMDE) 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Remove PHP4-isms in type casting - change (mediawiki...cldr)

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

Change subject: Remove PHP4-isms in type casting
..


Remove PHP4-isms in type casting

Change-Id: I3688ab2ab6fee4ffe1ceee082d478d8d9905e142
---
M TimeUnits.body.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/TimeUnits.body.php b/TimeUnits.body.php
index 955819b..0eb2125 100644
--- a/TimeUnits.body.php
+++ b/TimeUnits.body.php
@@ -125,7 +125,7 @@
$unit = null;
foreach ( $units as $code => $testUnit ) {
$testNumber = $timeDifference->format( '%' . $code );
-   if ( intval( $testNumber ) > 0 ) {
+   if ( (int)$testNumber > 0 ) {
$unit = $testUnit;
$number = $testNumber;
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3688ab2ab6fee4ffe1ceee082d478d8d9905e142
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/cldr
Gerrit-Branch: master
Gerrit-Owner: Siebrand 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Set extension type to wikibase - change (mediawiki...WikibaseMediaInfo)

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

Change subject: Set extension type to wikibase
..


Set extension type to wikibase

Change-Id: I6ab3d895e9b437cebb360b4368d0f96f68fc17af
---
M extension.json
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/extension.json b/extension.json
index 42e3c37..ac5ce0d 100644
--- a/extension.json
+++ b/extension.json
@@ -7,7 +7,7 @@
"url": "https://www.mediawiki.org/wiki/Extension:WikibaseMediaInfo";,
"descriptionmsg": "wikibase-media-info-desc",
"license-name": "GPL-2.0+",
-   "type": "other",
+   "type": "wikibase",
"AutoloadClasses": {
},
"config": {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6ab3d895e9b437cebb360b4368d0f96f68fc17af
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikibaseMediaInfo
Gerrit-Branch: master
Gerrit-Owner: JanZerebecki 
Gerrit-Reviewer: Aude 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Small optimisations - change (mediawiki...cldr)

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

Change subject: Small optimisations
..


Small optimisations

* check identical instead of equal where possible
* use cheaper checks
* use single quotes where possible
* ignore a missing break in static code analysis

Change-Id: I1c4edda785eaac25ef9c5292d86f9380a9c28d76
---
M CldrCurrencies.php
M CldrNames.php
M LanguageNames.body.php
M rebuild.php
4 files changed, 10 insertions(+), 9 deletions(-)

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



diff --git a/CldrCurrencies.php b/CldrCurrencies.php
index a649298..2068a81 100644
--- a/CldrCurrencies.php
+++ b/CldrCurrencies.php
@@ -67,7 +67,7 @@
if ( array_key_exists( strtoupper( $currency_code ), 
self::$cache['symbols'] ) ) {
$currency_code = strtoupper( $currency_code );
$language_code = strtolower( $language_code );
-   if ( !is_null( $country_code ) ) {
+   if ( $country_code !== null ) {
$country_code = strtoupper( $country_code );
if ( $country_code === 'UK' ) {
$country_code = 'GB'; // dang iso 
overlap...
@@ -85,7 +85,7 @@
if ( is_array( 
self::$cache['symbols'][$currency_code][$language_code] ) ) {
 
// did we specify a country? If not: 
Default.
-   if ( !is_null( $country_code ) &&
+   if ( $country_code !== null &&
array_key_exists(
$country_code,

self::$cache['symbols'][$currency_code][$language_code]
diff --git a/CldrNames.php b/CldrNames.php
index 2e051cc..50eed49 100644
--- a/CldrNames.php
+++ b/CldrNames.php
@@ -16,7 +16,7 @@
 * @return string
 */
public static function getFileName( $code ) {
-   return Language::getFileName( "CldrNames", $code, '.php' );
+   return Language::getFileName( 'CldrNames', $code, '.php' );
}
 
/**
@@ -25,6 +25,6 @@
 * @return string
 */
public static function getOverrideFileName( $code ) {
-   return Language::getFileName( "LocalNames", $code, '.php' );
+   return Language::getFileName( 'LocalNames', $code, '.php' );
}
 }
diff --git a/LanguageNames.body.php b/LanguageNames.body.php
index aa2d0f0..e7ab136 100644
--- a/LanguageNames.body.php
+++ b/LanguageNames.body.php
@@ -62,6 +62,7 @@
 
switch ( $list ) {
case self::LIST_MW:
+   /** @noinspection PhpMissingBreakStatementInspection */
case self::LIST_MW_SUPPORTED:
/* Remove entries that are not in fb */
$names = array_intersect_key( $names, $native );
diff --git a/rebuild.php b/rebuild.php
index efea907..fb91075 100644
--- a/rebuild.php
+++ b/rebuild.php
@@ -62,16 +62,16 @@
if ( count( $codeParts ) > 1 ) {
 
// ISO 15924 alpha-4 script code
-   if ( strlen( $codeParts[1] ) == 4 ) {
+   if ( strlen( $codeParts[1] ) === 4 ) {
$codeParts[1] = ucfirst( $codeParts[1] 
);
}
 
// ISO 3166-1 alpha-2 country code
-   if ( strlen( $codeParts[1] ) == 2 ) {
+   if ( strlen( $codeParts[1] ) === 2 ) {
$codeParts[2] = $codeParts[1];
unset( $codeParts[1] );
}
-   if ( isset( $codeParts[2] ) && strlen( 
$codeParts[2] ) == 2 ) {
+   if ( isset( $codeParts[2] ) && strlen( 
$codeParts[2] ) === 2 ) {
$codeParts[2] = strtoupper( 
$codeParts[2] );
}
$codeCLDR = implode( '_', $codeParts );
@@ -82,7 +82,7 @@
 
// If the file exists, parse it, otherwise display an 
error
if ( file_exists( $input ) ) {
-   $outputFileName = Language::getFileName( 
"CldrNames", getRealCode( $code ), '.php' );
+   $outputFileName = Language::getFileName( 
'CldrNames', getRealCode( $code ), '.php' );
$p = new CLDRParser();
$p->parse( $input, 
"$OUTPUT/CldrNames/$outputFileName" );

[MediaWiki-commits] [Gerrit] Declare functions with access modifiers - change (mediawiki...cldr)

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

Change subject: Declare functions with access modifiers
..


Declare functions with access modifiers

Change-Id: I02ca9ffd786e1aa81d313edc5cdc4cd29e41fd3c
---
M rebuild.php
M tests/TimeUnitsTest.php
2 files changed, 6 insertions(+), 7 deletions(-)

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



diff --git a/rebuild.php b/rebuild.php
index 3372139..efea907 100644
--- a/rebuild.php
+++ b/rebuild.php
@@ -111,12 +111,11 @@
 }
 
 class CLDRParser {
-
/**
 * @param string $inputFile filename
 * @param string $outputFile filename
 */
-   function parse( $inputFile, $outputFile ) {
+   public function parse( $inputFile, $outputFile ) {
// Open the input file for reading
 
$contents = file_get_contents( $inputFile );
@@ -205,7 +204,7 @@
 * @param string $inputFile
 * @param string $outputFile
 */
-   function parse_supplemental( $inputFile, $outputFile ) {
+   public function parse_supplemental( $inputFile, $outputFile ) {
// Open the input file for reading
 
$contents = file_get_contents( $inputFile );
@@ -258,7 +257,7 @@
 * @param string $inputDir - the directory, in which we will parse 
everything.
 * @param string $outputFile
 */
-   function parse_currency_symbols( $inputDir, $outputFile ) {
+   public function parse_currency_symbols( $inputDir, $outputFile ) {
if ( !file_exists( $inputDir ) ) {
return;
}
@@ -346,7 +345,7 @@
 * @param array $data The variable names and values we want defined in 
the php output
 * @param string $location File location to write
 */
-   function savephp( $data, $location ) {
+   protected function savephp( $data, $location ) {
$hasData = false;
foreach ( $data as $v ) {
if ( count( $v ) ) {
@@ -404,7 +403,7 @@
 * @param int $level
 * @return string
 */
-   function makePrettyArrayOuts( $key, $value, $level = 1 ) {
+   protected function makePrettyArrayOuts( $key, $value, $level = 1 ) {
$subKeys = '';
$isAssoc = $this->isAssoc( $value );
$tabs = str_repeat( "\t", $level );
diff --git a/tests/TimeUnitsTest.php b/tests/TimeUnitsTest.php
index 0b5ab8e..8cab95d 100644
--- a/tests/TimeUnitsTest.php
+++ b/tests/TimeUnitsTest.php
@@ -8,7 +8,7 @@
 class TimeUnitsTest extends MediaWikiTestCase {
 
/** @dataProvider providerTimeUnit */
-   function testTimeUnit(
+   public function testTimeUnit(
$language,
$tsTime, // The timestamp to format
$currentTime, // The time to consider "now"

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I02ca9ffd786e1aa81d313edc5cdc4cd29e41fd3c
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/cldr
Gerrit-Branch: master
Gerrit-Owner: Siebrand 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Refactor LingoElement - change (mediawiki...Lingo)

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

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

Change subject: Refactor LingoElement
..

Refactor LingoElement

Change-Id: I5679311e9ef0e0cc813d2aa6177cab08d1cbc46d
---
M src/LingoElement.php
1 file changed, 156 insertions(+), 149 deletions(-)


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

diff --git a/src/LingoElement.php b/src/LingoElement.php
index a5bf9c6..97aa9e6 100644
--- a/src/LingoElement.php
+++ b/src/LingoElement.php
@@ -49,13 +49,11 @@
const ELEMENT_STYLE = 4;
 
const ELEMENT_FIELDCOUNT = 5;  // number of fields stored for each 
element; (last field's index) + 1
-
+   static private $mLinkTemplate = null;
private $mFullDefinition = null;
private $mDefinitions = array();
private $mTerm = null;
private $mHasBeenDisplayed = false;
-
-   static private $mLinkTemplate = null;
 
/**
 * Extensions\Lingo\LingoElement constructor.
@@ -86,31 +84,174 @@
 
global $wgexLingoDisplayOnce;
 
-   // return textnode if
if ( $wgexLingoDisplayOnce && $this->mHasBeenDisplayed ) {
return $doc->createTextNode( $this->mTerm );
}
 
+   $this->buildFullDefinition( $doc );
+   $this->mHasBeenDisplayed = true;
+
+   return $this->mFullDefinition->cloneNode( true );
+   }
+
+   /**
+* @param DOMDocument $doc
+* @return DOMDocument
+*/
+   private function buildFullDefinition( DOMDocument &$doc ) {
+
// only create if not yet created
if ( $this->mFullDefinition === null || 
$this->mFullDefinition->ownerDocument !== $doc ) {
 
-   // if there is only one link available, just insert the 
link
-   if ( count( $this->mDefinitions ) === 1
-   && !is_string( $this->mDefinitions[ 0 ][ 
self::ELEMENT_DEFINITION ] )
-   && is_string( $this->mDefinitions[ 0 ][ 
self::ELEMENT_LINK ] )
-   ) {
-
+   if ( $this->isSimpleLink() ) {
$this->mFullDefinition = 
$this->getFullDefinitionAsLink( $doc );
-
-   } else { // else insert the complete tooltip
-
+   } else {
$this->mFullDefinition = 
$this->getFullDefinitionAsTooltip( $doc );
}
+   }
+   }
 
-   $this->mHasBeenDisplayed = true;
+   /**
+* @return bool
+*/
+   private function isSimpleLink() {
+   return count( $this->mDefinitions ) === 1 &&
+   !is_string( $this->mDefinitions[ 0 ][ 
self::ELEMENT_DEFINITION ] ) &&
+   is_string( $this->mDefinitions[ 0 ][ self::ELEMENT_LINK 
] );
+   }
+
+   /**
+* @param DOMDocument $doc
+*
+* @return DOMElement
+* @throws MWException
+*/
+   protected function getFullDefinitionAsLink( DOMDocument &$doc ) {
+
+   // create Title object for target page
+   $target = Title::newFromText( $this->mDefinitions[ 0 ][ 
self::ELEMENT_LINK ] );
+
+   // create link element
+   $link = $doc->createElement( 'a', $this->mDefinitions[ 0 ][ 
self::ELEMENT_TERM ] );
+
+   // set the link target
+   $link->setAttribute( 'href', $target->getLinkUrl() );
+   $link = $this->addClassAttributeToLink( $target, $link );
+   $link = $this->addTitleAttributeToLink( $target, $link );
+
+   return $link;
+   }
+
+   /**
+* @param $target
+* @param $link
+*/
+   protected function &addClassAttributeToLink( $target, &$link ) {
+
+   // TODO: should this be more elaborate? See Linker::linkAttribs
+   // Cleanest would probably be to use Linker::link and parse it
+   // back into a DOMElement, but we are in a somewhat 
time-critical
+   // part here.
+   $classes = '';
+
+   if ( !$target->isKnown() ) {
+   $classes .= 'new ';
}
 
-   return $this->mFullDefinition->cloneNode( true );
+   if ( $target->isExternal() ) {
+   $classes .= 'extiw ';
+   }
+
+   // set style
+   $classes .= $this->mDefinitions[ 0 ][ self::ELEMENT_STYLE ];
+
+   if ( $classes !== '' ) {
+   $link->setAttribute( 'class', $classes );
+   }
+
+   return $link;
+   }
+
+   /**
+* @param $target
+* @param $link
+*/
+   protected function &addTitleAttributeToLink

[MediaWiki-commits] [Gerrit] Refactor LingoElement - change (mediawiki...Lingo)

2016-03-05 Thread Foxtrott (Code Review)
Foxtrott has submitted this change and it was merged.

Change subject: Refactor LingoElement
..


Refactor LingoElement

Change-Id: I5679311e9ef0e0cc813d2aa6177cab08d1cbc46d
---
M src/LingoElement.php
1 file changed, 156 insertions(+), 149 deletions(-)

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



diff --git a/src/LingoElement.php b/src/LingoElement.php
index a5bf9c6..97aa9e6 100644
--- a/src/LingoElement.php
+++ b/src/LingoElement.php
@@ -49,13 +49,11 @@
const ELEMENT_STYLE = 4;
 
const ELEMENT_FIELDCOUNT = 5;  // number of fields stored for each 
element; (last field's index) + 1
-
+   static private $mLinkTemplate = null;
private $mFullDefinition = null;
private $mDefinitions = array();
private $mTerm = null;
private $mHasBeenDisplayed = false;
-
-   static private $mLinkTemplate = null;
 
/**
 * Extensions\Lingo\LingoElement constructor.
@@ -86,31 +84,174 @@
 
global $wgexLingoDisplayOnce;
 
-   // return textnode if
if ( $wgexLingoDisplayOnce && $this->mHasBeenDisplayed ) {
return $doc->createTextNode( $this->mTerm );
}
 
+   $this->buildFullDefinition( $doc );
+   $this->mHasBeenDisplayed = true;
+
+   return $this->mFullDefinition->cloneNode( true );
+   }
+
+   /**
+* @param DOMDocument $doc
+* @return DOMDocument
+*/
+   private function buildFullDefinition( DOMDocument &$doc ) {
+
// only create if not yet created
if ( $this->mFullDefinition === null || 
$this->mFullDefinition->ownerDocument !== $doc ) {
 
-   // if there is only one link available, just insert the 
link
-   if ( count( $this->mDefinitions ) === 1
-   && !is_string( $this->mDefinitions[ 0 ][ 
self::ELEMENT_DEFINITION ] )
-   && is_string( $this->mDefinitions[ 0 ][ 
self::ELEMENT_LINK ] )
-   ) {
-
+   if ( $this->isSimpleLink() ) {
$this->mFullDefinition = 
$this->getFullDefinitionAsLink( $doc );
-
-   } else { // else insert the complete tooltip
-
+   } else {
$this->mFullDefinition = 
$this->getFullDefinitionAsTooltip( $doc );
}
+   }
+   }
 
-   $this->mHasBeenDisplayed = true;
+   /**
+* @return bool
+*/
+   private function isSimpleLink() {
+   return count( $this->mDefinitions ) === 1 &&
+   !is_string( $this->mDefinitions[ 0 ][ 
self::ELEMENT_DEFINITION ] ) &&
+   is_string( $this->mDefinitions[ 0 ][ self::ELEMENT_LINK 
] );
+   }
+
+   /**
+* @param DOMDocument $doc
+*
+* @return DOMElement
+* @throws MWException
+*/
+   protected function getFullDefinitionAsLink( DOMDocument &$doc ) {
+
+   // create Title object for target page
+   $target = Title::newFromText( $this->mDefinitions[ 0 ][ 
self::ELEMENT_LINK ] );
+
+   // create link element
+   $link = $doc->createElement( 'a', $this->mDefinitions[ 0 ][ 
self::ELEMENT_TERM ] );
+
+   // set the link target
+   $link->setAttribute( 'href', $target->getLinkUrl() );
+   $link = $this->addClassAttributeToLink( $target, $link );
+   $link = $this->addTitleAttributeToLink( $target, $link );
+
+   return $link;
+   }
+
+   /**
+* @param $target
+* @param $link
+*/
+   protected function &addClassAttributeToLink( $target, &$link ) {
+
+   // TODO: should this be more elaborate? See Linker::linkAttribs
+   // Cleanest would probably be to use Linker::link and parse it
+   // back into a DOMElement, but we are in a somewhat 
time-critical
+   // part here.
+   $classes = '';
+
+   if ( !$target->isKnown() ) {
+   $classes .= 'new ';
}
 
-   return $this->mFullDefinition->cloneNode( true );
+   if ( $target->isExternal() ) {
+   $classes .= 'extiw ';
+   }
+
+   // set style
+   $classes .= $this->mDefinitions[ 0 ][ self::ELEMENT_STYLE ];
+
+   if ( $classes !== '' ) {
+   $link->setAttribute( 'class', $classes );
+   }
+
+   return $link;
+   }
+
+   /**
+* @param $target
+* @param $link
+*/
+   protected function &addTitleAttributeToLink( $target, &$link ) {
+
+   if ( $

[MediaWiki-commits] [Gerrit] Instrument diff timing - change (mediawiki/core)

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

Change subject: Instrument diff timing
..


Instrument diff timing

Bug: T128697
Change-Id: I748286abac025092abc33b3b7b8a0d3dabafdd25
---
M includes/diff/DifferenceEngine.php
1 file changed, 18 insertions(+), 0 deletions(-)

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



diff --git a/includes/diff/DifferenceEngine.php 
b/includes/diff/DifferenceEngine.php
index 1fa1970..1cf3918 100644
--- a/includes/diff/DifferenceEngine.php
+++ b/includes/diff/DifferenceEngine.php
@@ -842,6 +842,24 @@
 * @return bool|string
 */
public function generateTextDiffBody( $otext, $ntext ) {
+   $time = microtime( true );
+
+   $result = $this->textDiff( $otext, $ntext );
+
+   $time = microtime( true ) - $time;
+   $this->getStats()->timing( 'diff_time', $time );
+
+   return $result;
+   }
+
+   /**
+* Generates diff, to be wrapped internally in a logging/instrumentation
+*
+* @param string $otext Old text, must be already segmented
+* @param string $ntext New text, must be already segmented
+* @return bool|string
+*/
+   protected function textDiff( $otext, $ntext ) {
global $wgExternalDiffEngine, $wgContLang;
 
$otext = str_replace( "\r\n", "\n", $otext );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I748286abac025092abc33b3b7b8a0d3dabafdd25
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: MaxSem 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Ori.livneh 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Fix minor issues - change (mediawiki...Lingo)

2016-03-05 Thread Foxtrott (Code Review)
Foxtrott has submitted this change and it was merged.

Change subject: Fix minor issues
..


Fix minor issues

Change-Id: I0bc5f513e90c0ff989aa0ac09e55f11d9a23ffc1
---
M src/LingoBasicBackend.php
M src/LingoParser.php
2 files changed, 2 insertions(+), 14 deletions(-)

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



diff --git a/src/LingoBasicBackend.php b/src/LingoBasicBackend.php
index 04395ef..69a9874 100644
--- a/src/LingoBasicBackend.php
+++ b/src/LingoBasicBackend.php
@@ -60,7 +60,7 @@
$title = Title::newFromText( $page );
if ( $title->getInterwiki() ) {
$this->getMessageLog()->addError( wfMessage( 
'lingo-terminologypagenotlocal', $page )->inContentLanguage()->text() );
-   return false;
+   return;
}
 
// FIXME: This is a hack special-casing the submitting of the 
terminology
diff --git a/src/LingoParser.php b/src/LingoParser.php
index 2e85dc9..1d4942f 100644
--- a/src/LingoParser.php
+++ b/src/LingoParser.php
@@ -64,18 +64,6 @@
}
 
/**
-* @param Parser $parser
-* @return string
-*/
-   private static function uniqPrefix( Parser &$parser ) {
-   if ( defined( "Parser::MARKER_PREFIX" ) ) {
-   return Parser::MARKER_PREFIX;
-   } else {
-   return $parser->uniqPrefix();
-   }
-   }
-
-   /**
 *
 * @param Parser $parser
 * @param string $text
@@ -88,7 +76,7 @@
 
// The RegEx to split a chunk of text into words
// Words are: placeholders for stripped items, 
sequences of letters and numbers, single characters that are neither letter nor 
number
-   self::$regex = '/' . preg_quote( self::uniqPrefix( 
$parser ), '/' ) . '.*?' . preg_quote( Parser::MARKER_SUFFIX, '/' ) . 
'|[\p{L}\p{N}]+|[^\p{L}\p{N}]/u';
+   self::$regex = '/' . preg_quote( Parser::MARKER_PREFIX, 
'/' ) . '.*?' . preg_quote( Parser::MARKER_SUFFIX, '/' ) . 
'|[\p{L}\p{N}]+|[^\p{L}\p{N}]/u';
}
 
self::$parserSingleton->realParse( $parser, $text );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0bc5f513e90c0ff989aa0ac09e55f11d9a23ffc1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Lingo
Gerrit-Branch: master
Gerrit-Owner: Foxtrott 
Gerrit-Reviewer: Foxtrott 

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


[MediaWiki-commits] [Gerrit] Fix minor issues - change (mediawiki...Lingo)

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

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

Change subject: Fix minor issues
..

Fix minor issues

Change-Id: I0bc5f513e90c0ff989aa0ac09e55f11d9a23ffc1
---
M src/LingoBasicBackend.php
M src/LingoParser.php
2 files changed, 2 insertions(+), 14 deletions(-)


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

diff --git a/src/LingoBasicBackend.php b/src/LingoBasicBackend.php
index 04395ef..69a9874 100644
--- a/src/LingoBasicBackend.php
+++ b/src/LingoBasicBackend.php
@@ -60,7 +60,7 @@
$title = Title::newFromText( $page );
if ( $title->getInterwiki() ) {
$this->getMessageLog()->addError( wfMessage( 
'lingo-terminologypagenotlocal', $page )->inContentLanguage()->text() );
-   return false;
+   return;
}
 
// FIXME: This is a hack special-casing the submitting of the 
terminology
diff --git a/src/LingoParser.php b/src/LingoParser.php
index 2e85dc9..1d4942f 100644
--- a/src/LingoParser.php
+++ b/src/LingoParser.php
@@ -64,18 +64,6 @@
}
 
/**
-* @param Parser $parser
-* @return string
-*/
-   private static function uniqPrefix( Parser &$parser ) {
-   if ( defined( "Parser::MARKER_PREFIX" ) ) {
-   return Parser::MARKER_PREFIX;
-   } else {
-   return $parser->uniqPrefix();
-   }
-   }
-
-   /**
 *
 * @param Parser $parser
 * @param string $text
@@ -88,7 +76,7 @@
 
// The RegEx to split a chunk of text into words
// Words are: placeholders for stripped items, 
sequences of letters and numbers, single characters that are neither letter nor 
number
-   self::$regex = '/' . preg_quote( self::uniqPrefix( 
$parser ), '/' ) . '.*?' . preg_quote( Parser::MARKER_SUFFIX, '/' ) . 
'|[\p{L}\p{N}]+|[^\p{L}\p{N}]/u';
+   self::$regex = '/' . preg_quote( Parser::MARKER_PREFIX, 
'/' ) . '.*?' . preg_quote( Parser::MARKER_SUFFIX, '/' ) . 
'|[\p{L}\p{N}]+|[^\p{L}\p{N}]/u';
}
 
self::$parserSingleton->realParse( $parser, $text );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0bc5f513e90c0ff989aa0ac09e55f11d9a23ffc1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Lingo
Gerrit-Branch: master
Gerrit-Owner: Foxtrott 

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


[MediaWiki-commits] [Gerrit] Call static methods statically - change (mediawiki...CleanChanges)

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

Change subject: Call static methods statically
..


Call static methods statically

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

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



diff --git a/CleanChanges_body.php b/CleanChanges_body.php
index 1781928..d3ad121 100644
--- a/CleanChanges_body.php
+++ b/CleanChanges_body.php
@@ -161,7 +161,7 @@
$this->makeLinks( $rc );
 
// Make user links
-   if ( $this->isDeleted( $rc, Revision::DELETED_USER ) ) {
+   if ( self::isDeleted( $rc, Revision::DELETED_USER ) ) {
$rc->_user = ' ' .
$this->msg( 'rev-deleted-user' )->escaped() .
'';
@@ -500,7 +500,7 @@
$action = '';
if ( $comment === '' ) {
return $action;
-   } elseif ( $this->isDeleted( $rc, LogPage::DELETED_COMMENT ) ) {
+   } elseif ( self::isDeleted( $rc, LogPage::DELETED_COMMENT ) ) {
$priviledged = $this->getUser()->isAllowed( 
'deleterevision' );
if ( $priviledged ) {
return $action . ' ' .

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I817d021d5b1148fd3311420766a5fb4853f04dc3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CleanChanges
Gerrit-Branch: master
Gerrit-Owner: Siebrand 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Pass-by-reference is not needed - change (mediawiki...CleanChanges)

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

Change subject: Pass-by-reference is not needed
..


Pass-by-reference is not needed

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

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



diff --git a/CleanChanges_body.php b/CleanChanges_body.php
index 1424459..1781928 100644
--- a/CleanChanges_body.php
+++ b/CleanChanges_body.php
@@ -7,7 +7,7 @@
/**
 * Determines which version of changes list to provide, or none.
 */
-   public static function hook( User $user, Skin &$skin, &$list ) {
+   public static function hook( User $user, Skin $skin, &$list ) {
$list = null;
 
if ( defined( 'ULS_VERSION' ) ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I708bd1f528adc395ef404c00e3535b6f8cf289ac
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CleanChanges
Gerrit-Branch: master
Gerrit-Owner: Siebrand 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Replace deprecated functions - change (mediawiki...CleanChanges)

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

Change subject: Replace deprecated functions
..


Replace deprecated functions

Change-Id: I640bf5df346946a8ddb5d33ddab0b143889cdb6c
---
M CleanChanges_body.php
M Filters.php
M extension.json
3 files changed, 3 insertions(+), 3 deletions(-)

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



diff --git a/CleanChanges_body.php b/CleanChanges_body.php
index 3f66370..1424459 100644
--- a/CleanChanges_body.php
+++ b/CleanChanges_body.php
@@ -389,7 +389,7 @@
 * @return string HTML "" tag
 */
protected function spacerArrow() {
-   return $this->arrow( '', codepointToUtf8( 0xa0 ) ); // 
non-breaking space
+   return $this->arrow( '', UtfNormal\Utils::codepointToUtf8( 0xa0 
) ); // non-breaking space
}
 
/**
diff --git a/Filters.php b/Filters.php
index 057a78d..81739ac 100644
--- a/Filters.php
+++ b/Filters.php
@@ -115,7 +115,7 @@
LanguageNames::LIST_MW
);
} else {
-   $languages = Language::getLanguageNames( false );
+   $languages = Language::fetchLanguageNames( null, 'mw' );
}
ksort( $languages );
$options = Xml::option( wfMessage( 'cleanchanges-language-na' 
)->text(), '', $default === '' );
diff --git a/extension.json b/extension.json
index a498ba6..efde82e 100644
--- a/extension.json
+++ b/extension.json
@@ -1,6 +1,6 @@
 {
"name": "Clean Changes",
-   "version": "2016-02-12",
+   "version": "2016-03-05",
"author": "Niklas Laxström",
"url": "https://www.mediawiki.org/wiki/Extension:CleanChanges";,
"descriptionmsg": "cleanchanges-desc",

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I640bf5df346946a8ddb5d33ddab0b143889cdb6c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CleanChanges
Gerrit-Branch: master
Gerrit-Owner: Siebrand 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Move assignment of $dir outside of loop - change (mediawiki...UniversalLanguageSelector)

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

Change subject: Move assignment of $dir outside of loop
..


Move assignment of $dir outside of loop

Change-Id: I24009db72d0afbb47532eb2c00329e488461066f
---
M data/fontrepo/scripts/compile.php
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/data/fontrepo/scripts/compile.php 
b/data/fontrepo/scripts/compile.php
index 98c74f4..008988f 100644
--- a/data/fontrepo/scripts/compile.php
+++ b/data/fontrepo/scripts/compile.php
@@ -16,6 +16,8 @@
$languages = array();
$version = null;
 
+   $dir = dirname( $inifile );
+
foreach ( $conf as $fontname => $font ) {
if ( isset( $font['languages'] ) ) {
$languages = explode( ',', $font['languages'] );
@@ -51,8 +53,6 @@
if ( isset( $font['fontstyle'] ) ) {
$list['fonts'][$fontname]['fontstyle'] = 
$font['fontstyle'];
}
-
-   $dir = dirname( $inifile );
 
if ( isset( $font['ttf'] ) ) {
$list['fonts'][$fontname]['ttf'] = basename( $dir ) . 
'/' . $font['ttf'];

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I24009db72d0afbb47532eb2c00329e488461066f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector
Gerrit-Branch: master
Gerrit-Owner: Siebrand 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Update newlines - change (mediawiki...UniversalLanguageSelector)

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

Change subject: Update newlines
..


Update newlines

Change-Id: I147338b76d3c9b1a34de51978dbfdebd17026bc8
---
M data/fontrepo/scripts/compile.php
1 file changed, 13 insertions(+), 1 deletion(-)

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



diff --git a/data/fontrepo/scripts/compile.php 
b/data/fontrepo/scripts/compile.php
index 1ab1726..98c74f4 100644
--- a/data/fontrepo/scripts/compile.php
+++ b/data/fontrepo/scripts/compile.php
@@ -10,20 +10,23 @@
 
 $list = array();
 $list['base'] = '../data/fontrepo/fonts/';
+
 foreach ( glob( '../fonts/*/font.ini' ) as $inifile ) {
$conf = parse_ini_file( $inifile, true );
$languages = array();
$version = null;
-   foreach ( $conf as $fontname => $font ) {
 
+   foreach ( $conf as $fontname => $font ) {
if ( isset( $font['languages'] ) ) {
$languages = explode( ',', $font['languages'] );
foreach ( $languages as $rcode ) {
$rcode = trim( $rcode );
$code = str_replace( '*', '', $rcode );
+
if ( !isset( $list['languages'][$code] ) ) {
$list['languages'][$code] = array( 
'system' );
}
+
if ( strpos( $rcode, '*' ) !== false ) {
unset( $list['languages'][$code][0] );
array_unshift( 
$list['languages'][$code], $fontname );
@@ -32,9 +35,11 @@
}
}
}
+
if ( isset( $font['version'] ) ) {
$version = $font['version'];
}
+
$list['fonts'][$fontname] = array(
'version' => $version,
);
@@ -42,6 +47,7 @@
if ( isset( $font['fontweight'] ) ) {
$list['fonts'][$fontname]['fontweight'] = 
$font['fontweight'];
}
+
if ( isset( $font['fontstyle'] ) ) {
$list['fonts'][$fontname]['fontstyle'] = 
$font['fontstyle'];
}
@@ -51,15 +57,19 @@
if ( isset( $font['ttf'] ) ) {
$list['fonts'][$fontname]['ttf'] = basename( $dir ) . 
'/' . $font['ttf'];
}
+
if ( isset( $font['svg'] ) ) {
$list['fonts'][$fontname]['svg'] = basename( $dir ) . 
'/' . $font['svg'];
}
+
if ( isset( $font['eot'] ) ) {
$list['fonts'][$fontname]['eot'] = basename( $dir ) . 
'/' . $font['eot'];
}
+
if ( isset( $font['woff'] ) ) {
$list['fonts'][$fontname]['woff'] = basename( $dir ) . 
'/' . $font['woff'];
}
+
if ( isset( $font['woff2'] ) ) {
$list['fonts'][$fontname]['woff2'] = basename( $dir ) . 
'/' . $font['woff2'];
}
@@ -76,9 +86,11 @@
if ( isset( $font['bold'] ) ) {
$list['fonts'][$fontname]['variants']['bold'] = 
$font['bold'];
}
+
if ( isset( $font['bolditalic'] ) ) {
$list['fonts'][$fontname]['variants']['bolditalic'] = 
$font['bolditalic'];
}
+
if ( isset( $font['italic'] ) ) {
$list['fonts'][$fontname]['variants']['italic'] = 
$font['italic'];
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I147338b76d3c9b1a34de51978dbfdebd17026bc8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector
Gerrit-Branch: master
Gerrit-Owner: Siebrand 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Pass-by-reference is not needed - change (mediawiki...UniversalLanguageSelector)

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

Change subject: Pass-by-reference is not needed
..


Pass-by-reference is not needed

https://secure.php.net/manual/en/language.oop5.references.php

Change-Id: I6730b8e4326abf304f102fe5c50041342e3a70a1
---
M UniversalLanguageSelector.hooks.php
1 file changed, 4 insertions(+), 4 deletions(-)

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



diff --git a/UniversalLanguageSelector.hooks.php 
b/UniversalLanguageSelector.hooks.php
index 9d0c3a4..99746b0 100644
--- a/UniversalLanguageSelector.hooks.php
+++ b/UniversalLanguageSelector.hooks.php
@@ -110,7 +110,7 @@
 * @return bool
 * Hook: ResourceLoaderTestModules
 */
-   public static function addTestModules( array &$testModules, 
ResourceLoader &$resourceLoader ) {
+   public static function addTestModules( array &$testModules, 
ResourceLoader $resourceLoader ) {
$testModules['qunit']['ext.uls.tests'] = array(
'scripts' => array( 'tests/qunit/ext.uls.tests.js' ),
'dependencies' => array( 'jquery.uls', 'ext.uls.init', 
'ext.uls.preferences' ),
@@ -357,8 +357,8 @@
 * @param QuickTemplate $template
 * @return bool
 */
-   public static function onSkinTemplateOutputPageBeforeExec( Skin &$skin,
-   QuickTemplate &$template
+   public static function onSkinTemplateOutputPageBeforeExec( Skin $skin,
+   QuickTemplate $template
) {
global $wgULSPosition;
 
@@ -403,7 +403,7 @@
 * @param ResourceLoader $resourceLoader
 * @return boolean true
 */
-   public static function onResourceLoaderRegisterModules( ResourceLoader 
&$resourceLoader ) {
+   public static function onResourceLoaderRegisterModules( ResourceLoader 
$resourceLoader ) {
global $wgResourceModules, $wgULSEventLogging;
 
if (

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6730b8e4326abf304f102fe5c50041342e3a70a1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector
Gerrit-Branch: master
Gerrit-Owner: Siebrand 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Declare functions with access modifiers - change (mediawiki...UniversalLanguageSelector)

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

Change subject: Declare functions with access modifiers
..


Declare functions with access modifiers

Change-Id: I047d3dc6642de07130a43ad4c2fd4a8106450aac
---
M UniversalLanguageSelector.hooks.php
M data/LanguageNameSearch.php
M includes/ResourceLoaderULSJsonMessageModule.php
M tests/phpunit/ResourceLoaderULSTest.php
4 files changed, 7 insertions(+), 7 deletions(-)

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



diff --git a/UniversalLanguageSelector.hooks.php 
b/UniversalLanguageSelector.hooks.php
index 8080748..9d0c3a4 100644
--- a/UniversalLanguageSelector.hooks.php
+++ b/UniversalLanguageSelector.hooks.php
@@ -125,7 +125,7 @@
 * Add some tabs for navigation for users who do not use Ajax interface.
 * Hook: PersonalUrls
 */
-   static function addPersonalBarTrigger( array &$personal_urls, &$title ) 
{
+   public static function addPersonalBarTrigger( array &$personal_urls, 
&$title ) {
global $wgULSPosition;
 
if ( $wgULSPosition !== 'personal' ) {
diff --git a/data/LanguageNameSearch.php b/data/LanguageNameSearch.php
index 3062f81..2de687f 100644
--- a/data/LanguageNameSearch.php
+++ b/data/LanguageNameSearch.php
@@ -62,7 +62,7 @@
 * @param $str string
 * @return integer Code point of first letter of string
 */
-   static function getCodepoint( $str ) {
+   public static function getCodepoint( $str ) {
$values = array();
$lookingFor = 1;
$strLen = strlen( $str );
@@ -107,7 +107,7 @@
 * @param $str2
 * @return integer
 */
-   static function levenshteinDistance( $str1, $str2 ) {
+   public static function levenshteinDistance( $str1, $str2 ) {
$length1 = mb_strlen( $str1, 'UTF-8' );
$length2 = mb_strlen( $str2, 'UTF-8' );
if ( $length1 < $length2 ) {
diff --git a/includes/ResourceLoaderULSJsonMessageModule.php 
b/includes/ResourceLoaderULSJsonMessageModule.php
index 4ce2190..cb07cf9 100644
--- a/includes/ResourceLoaderULSJsonMessageModule.php
+++ b/includes/ResourceLoaderULSJsonMessageModule.php
@@ -19,7 +19,7 @@
 * @param ResourceLoaderContext $context
 * @return string[] Module names.
 */
-   function getDependencies( ResourceLoaderContext $context = null ) {
+   public function getDependencies( ResourceLoaderContext $context = null 
) {
return array( 'ext.uls.i18n' );
}
 
@@ -29,7 +29,7 @@
 * @param ResourceLoaderContext $context
 * @return int Unix timestamp.
 */
-   function getModifiedTime( ResourceLoaderContext $context ) {
+   public function getModifiedTime( ResourceLoaderContext $context ) {
$code = $context->getLanguage();
if ( !Language::isValidCode( $code ) ) {
$code = 'en';
@@ -51,7 +51,7 @@
 * @param ResourceLoaderContext $context
 * @return string JavaScript code.
 */
-   function getScript( ResourceLoaderContext $context ) {
+   public function getScript( ResourceLoaderContext $context ) {
$code = $context->getLanguage();
if ( !Language::isValidCode( $code ) ) {
$code = 'en';
diff --git a/tests/phpunit/ResourceLoaderULSTest.php 
b/tests/phpunit/ResourceLoaderULSTest.php
index 41e6f25..cdc98be 100644
--- a/tests/phpunit/ResourceLoaderULSTest.php
+++ b/tests/phpunit/ResourceLoaderULSTest.php
@@ -17,7 +17,7 @@
 * correctly with language code.
 * @covers ResourceLoaderSchemaModule::getModifiedTime
 */
-   function testModifiedTime() {
+   public function testModifiedTime() {
$request = new WebRequest();
$module = new ResourceLoaderULSModule();
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I047d3dc6642de07130a43ad4c2fd4a8106450aac
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector
Gerrit-Branch: master
Gerrit-Owner: Siebrand 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] build: Bump various devDependencies to latest - change (VisualEditor/VisualEditor)

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

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

Change subject: build: Bump various devDependencies to latest
..

build: Bump various devDependencies to latest

* grunt-contrib-clean: 0.7.0 -> 1.0.0
* grunt-contrib-concat: 0.5.1 -> 1.0.0
* grunt-contrib-copy: 0.8.2 -> 1.0.0
* grunt-contrib-csslint: 0.5.0 -> 1.0.0
* grunt-contrib-jshint: 0.12.0 -> 1.0.0
* grunt-jscs: 2.7.0 -> 2.8.0
* karma: 0.13.19 -> 0.13.21
* karma-coverage: 0.5.3 -> 0.5.4
* qunitjs: 1.20.0 -> 1.22.0

Change-Id: I87d828df30cf039db24cd15c7ae575786a441da5
---
M package.json
1 file changed, 11 insertions(+), 11 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor 
refs/changes/64/275264/1

diff --git a/package.json b/package.json
index 100605d..f151128 100644
--- a/package.json
+++ b/package.json
@@ -24,23 +24,23 @@
 "grunt": "0.4.5",
 "grunt-cli": "0.1.13",
 "grunt-banana-checker": "0.4.0",
-"grunt-contrib-clean": "0.7.0",
-"grunt-contrib-concat": "0.5.1",
-"grunt-contrib-copy": "0.8.2",
-"grunt-contrib-csslint": "0.5.0",
-"grunt-contrib-jshint": "0.12.0",
-"grunt-jsonlint": "1.0.7",
+"grunt-contrib-clean": "1.0.0",
+"grunt-contrib-concat": "1.0.0",
+"grunt-contrib-copy": "1.0.0",
+"grunt-contrib-csslint": "1.0.0",
+"grunt-contrib-jshint": "1.0.0",
 "grunt-contrib-watch": "0.6.1",
 "grunt-css-url-embed": "1.6.1",
-"grunt-tyops": "0.1.0",
 "grunt-cssjanus": "0.2.4",
-"grunt-jscs": "2.7.0",
+"grunt-jscs": "2.8.0",
+"grunt-jsonlint": "1.0.7",
 "grunt-karma": "0.12.1",
-"karma": "0.13.19",
+"grunt-tyops": "0.1.0",
 "karma-chrome-launcher": "0.2.2",
-"karma-coverage": "0.5.3",
+"karma-coverage": "0.5.4",
 "karma-firefox-launcher": "0.1.7",
 "karma-qunit": "0.1.9",
-"qunitjs": "1.20.0"
+"karma": "0.13.21",
+"qunitjs": "1.22.0"
   }
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I87d828df30cf039db24cd15c7ae575786a441da5
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Jforrester 

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


[MediaWiki-commits] [Gerrit] Use namespaces - change (mediawiki...Lingo)

2016-03-05 Thread Foxtrott (Code Review)
Foxtrott has submitted this change and it was merged.

Change subject: Use namespaces
..


Use namespaces

Change-Id: I3b6d10401dc9319e3d87466ea6514c1904206125
---
M extension.json
M src/LingoBackend.php
M src/LingoBasicBackend.php
M src/LingoElement.php
M src/LingoHooks.php
M src/LingoMessageLog.php
M src/LingoParser.php
M src/LingoTree.php
M tests/phpunit/Unit/LingoBackendTest.php
M tests/phpunit/Unit/LingoBasicBackendTest.php
M tests/phpunit/Unit/LingoElementTest.php
M tests/phpunit/Unit/LingoMessageLogTest.php
M tests/phpunit/Unit/LingoParserTest.php
M tests/phpunit/Unit/LingoTreeTest.php
14 files changed, 89 insertions(+), 51 deletions(-)

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



diff --git a/extension.json b/extension.json
index 3f822ba..3c399ad 100644
--- a/extension.json
+++ b/extension.json
@@ -44,7 +44,7 @@
},
"config": {
"_prefix": "wgex",
-   "LingoBackend": "LingoBasicBackend",
+   "LingoBackend": "Extensions\\Lingo\\LingoBasicBackend",
"LingoPage": null,
"LingoDisplayOnce": false,
"LingoCacheType": null,
@@ -60,30 +60,30 @@
"LingoMagic": "src/Lingo.i18n.magic.php"
},
"AutoloadClasses": {
-   "LingoHooks": "/src/LingoHooks.php",
-   "LingoParser": "/src/LingoParser.php",
-   "LingoTree": "/src/LingoTree.php",
-   "LingoElement": "/src/LingoElement.php",
-   "LingoBackend": "/src/LingoBackend.php",
-   "LingoBasicBackend": "/src/LingoBasicBackend.php",
-   "LingoMessageLog": "/src/LingoMessageLog.php"
+   "Extensions\\Lingo\\LingoHooks": "/src/LingoHooks.php",
+   "Extensions\\Lingo\\LingoParser": "/src/LingoParser.php",
+   "Extensions\\Lingo\\LingoTree": "/src/LingoTree.php",
+   "Extensions\\Lingo\\LingoElement": "/src/LingoElement.php",
+   "Extensions\\Lingo\\LingoBackend": "/src/LingoBackend.php",
+   "Extensions\\Lingo\\LingoBasicBackend": 
"/src/LingoBasicBackend.php",
+   "Extensions\\Lingo\\LingoMessageLog": "/src/LingoMessageLog.php"
},
"Hooks": {
"ParserFirstCallInit": [
-   "LingoHooks::registerTags"
+   "Extensions\\Lingo\\LingoHooks::registerTags"
],
"ArticlePurge": [
-   "LingoBasicBackend::purgeCache"
+   "Extensions\\Lingo\\LingoBasicBackend::purgeCache"
],
"ArticleSave": [
-   "LingoBasicBackend::purgeCache"
+   "Extensions\\Lingo\\LingoBasicBackend::purgeCache"
],
"ParserAfterParse": [
-   "LingoHooks::parse"
+   "Extensions\\Lingo\\LingoHooks::parse"
]
},
"ExtensionFunctions": [
-   "LingoHooks::initExtension"
+   "Extensions\\Lingo\\LingoHooks::initExtension"
],
"manifest_version": 1
 }
diff --git a/src/LingoBackend.php b/src/LingoBackend.php
index 383ee69..1463f85 100644
--- a/src/LingoBackend.php
+++ b/src/LingoBackend.php
@@ -1,7 +1,7 @@
 setHook( 'noglossary', 
'LingoHooks::noglossaryTagRenderer' );
+   $parser->setHook( 'noglossary', 
'Extensions\Lingo\LingoHooks::noglossaryTagRenderer' );
return true;
}
 
diff --git a/src/LingoMessageLog.php b/src/LingoMessageLog.php
index 089169a..62a15fd 100644
--- a/src/LingoMessageLog.php
+++ b/src/LingoMessageLog.php
@@ -1,7 +1,7 @@
 mLingoTree;
}
 
+   /**
+* @return LingoTree
+*/
protected function &buildLingo() {
 
$lingoTree = new LingoTree();
diff --git a/src/LingoTree.php b/src/LingoTree.php
index 604bb48..ed410c6 100644
--- a/src/LingoTree.php
+++ b/src/LingoTree.php
@@ -1,7 +1,7 @@
 
  * @covers ::
  *
@@ -42,7 +42,7 @@
 
public function testUseCache() {
 
-   $stub = $this->getMockForAbstractClass( '\LingoBackend' );
+   $stub = $this->getMockForAbstractClass( 
'\Extensions\Lingo\LingoBackend' );
 
$this->assertFalse( $stub->useCache() );
}
diff --git a/tests/phpunit/Unit/LingoBasicBackendTest.php 
b/tests/phpunit/Unit/LingoBasicBackendTest.php
index ffe3a13..ac2137f 100644
--- a/tests/phpunit/Unit/LingoBasicBackendTest.php
+++ b/tests/phpunit/Unit/LingoBasicBackendTest.php
@@ -31,7 +31,7 @@
  * @group extensions-lingo-unit
  * @group mediawiki-databaseless
  *
- * @coversDefaultClass \LingoBasicBackend
+ * @coversDefaultClass \Extensions\Lingo\LingoBasicBackend
  * @covers ::
  * @covers ::
  *
@@ -46,8 +46,8 @@
public function testCanConstruct() {
 
$this->assertInstanceOf(
-

[MediaWiki-commits] [Gerrit] Use namespaces - change (mediawiki...Lingo)

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

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

Change subject: Use namespaces
..

Use namespaces

Change-Id: I3b6d10401dc9319e3d87466ea6514c1904206125
---
M extension.json
M src/LingoBackend.php
M src/LingoBasicBackend.php
M src/LingoElement.php
M src/LingoHooks.php
M src/LingoMessageLog.php
M src/LingoParser.php
M src/LingoTree.php
M tests/phpunit/Unit/LingoBackendTest.php
M tests/phpunit/Unit/LingoBasicBackendTest.php
M tests/phpunit/Unit/LingoElementTest.php
M tests/phpunit/Unit/LingoMessageLogTest.php
M tests/phpunit/Unit/LingoParserTest.php
M tests/phpunit/Unit/LingoTreeTest.php
14 files changed, 89 insertions(+), 51 deletions(-)


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

diff --git a/extension.json b/extension.json
index 3f822ba..3c399ad 100644
--- a/extension.json
+++ b/extension.json
@@ -44,7 +44,7 @@
},
"config": {
"_prefix": "wgex",
-   "LingoBackend": "LingoBasicBackend",
+   "LingoBackend": "Extensions\\Lingo\\LingoBasicBackend",
"LingoPage": null,
"LingoDisplayOnce": false,
"LingoCacheType": null,
@@ -60,30 +60,30 @@
"LingoMagic": "src/Lingo.i18n.magic.php"
},
"AutoloadClasses": {
-   "LingoHooks": "/src/LingoHooks.php",
-   "LingoParser": "/src/LingoParser.php",
-   "LingoTree": "/src/LingoTree.php",
-   "LingoElement": "/src/LingoElement.php",
-   "LingoBackend": "/src/LingoBackend.php",
-   "LingoBasicBackend": "/src/LingoBasicBackend.php",
-   "LingoMessageLog": "/src/LingoMessageLog.php"
+   "Extensions\\Lingo\\LingoHooks": "/src/LingoHooks.php",
+   "Extensions\\Lingo\\LingoParser": "/src/LingoParser.php",
+   "Extensions\\Lingo\\LingoTree": "/src/LingoTree.php",
+   "Extensions\\Lingo\\LingoElement": "/src/LingoElement.php",
+   "Extensions\\Lingo\\LingoBackend": "/src/LingoBackend.php",
+   "Extensions\\Lingo\\LingoBasicBackend": 
"/src/LingoBasicBackend.php",
+   "Extensions\\Lingo\\LingoMessageLog": "/src/LingoMessageLog.php"
},
"Hooks": {
"ParserFirstCallInit": [
-   "LingoHooks::registerTags"
+   "Extensions\\Lingo\\LingoHooks::registerTags"
],
"ArticlePurge": [
-   "LingoBasicBackend::purgeCache"
+   "Extensions\\Lingo\\LingoBasicBackend::purgeCache"
],
"ArticleSave": [
-   "LingoBasicBackend::purgeCache"
+   "Extensions\\Lingo\\LingoBasicBackend::purgeCache"
],
"ParserAfterParse": [
-   "LingoHooks::parse"
+   "Extensions\\Lingo\\LingoHooks::parse"
]
},
"ExtensionFunctions": [
-   "LingoHooks::initExtension"
+   "Extensions\\Lingo\\LingoHooks::initExtension"
],
"manifest_version": 1
 }
diff --git a/src/LingoBackend.php b/src/LingoBackend.php
index 383ee69..1463f85 100644
--- a/src/LingoBackend.php
+++ b/src/LingoBackend.php
@@ -1,7 +1,7 @@
 setHook( 'noglossary', 
'LingoHooks::noglossaryTagRenderer' );
+   $parser->setHook( 'noglossary', 
'Extensions\Lingo\LingoHooks::noglossaryTagRenderer' );
return true;
}
 
diff --git a/src/LingoMessageLog.php b/src/LingoMessageLog.php
index 089169a..62a15fd 100644
--- a/src/LingoMessageLog.php
+++ b/src/LingoMessageLog.php
@@ -1,7 +1,7 @@
 mLingoTree;
}
 
+   /**
+* @return LingoTree
+*/
protected function &buildLingo() {
 
$lingoTree = new LingoTree();
diff --git a/src/LingoTree.php b/src/LingoTree.php
index 604bb48..ed410c6 100644
--- a/src/LingoTree.php
+++ b/src/LingoTree.php
@@ -1,7 +1,7 @@
 
  * @covers ::
  *
@@ -42,7 +42,7 @@
 
public function testUseCache() {
 
-   $stub = $this->getMockForAbstractClass( '\LingoBackend' );
+   $stub = $this->getMockForAbstractClass( 
'\Extensions\Lingo\LingoBackend' );
 
$this->assertFalse( $stub->useCache() );
}
diff --git a/tests/phpunit/Unit/LingoBasicBackendTest.php 
b/tests/phpunit/Unit/LingoBasicBackendTest.php
index ffe3a13..ac2137f 100644
--- a/tests/phpunit/Unit/LingoBasicBackendTest.php
+++ b/tests/phpunit/Unit/LingoBasicBackendTest.php
@@ -31,7 +31,7 @@
  * @group extensions-lingo-unit
  * @group mediawiki-databaseless
  *
- * @coversDefaultClass \LingoBasicBackend
+ * @coversDefaultClass \Extensions\Lingo\LingoBasicBackend
  * @covers ::
  * @covers ::
  *
@@ -46,8 +46,8 @@
public function testCanConstruct() {
 

[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: ea11c33..bcb8aed - change (mediawiki/extensions)

2016-03-05 Thread Jenkins-mwext-sync (Code Review)
Jenkins-mwext-sync has uploaded a new change for review.

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

Change subject: Syncronize VisualEditor: ea11c33..bcb8aed
..

Syncronize VisualEditor: ea11c33..bcb8aed

Change-Id: If5c9567886a0a02f70ffc321de2814ea5d452ecb
---
M VisualEditor
1 file changed, 0 insertions(+), 0 deletions(-)


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

diff --git a/VisualEditor b/VisualEditor
index ea11c33..bcb8aed 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit ea11c33e6d7174090a431bb487c640b79449f71b
+Subproject commit bcb8aed482664b059a7a34b78961d296f66c26c3

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If5c9567886a0a02f70ffc321de2814ea5d452ecb
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions
Gerrit-Branch: master
Gerrit-Owner: Jenkins-mwext-sync 

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


[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: ea11c33..bcb8aed - change (mediawiki/extensions)

2016-03-05 Thread Jenkins-mwext-sync (Code Review)
Jenkins-mwext-sync has submitted this change and it was merged.

Change subject: Syncronize VisualEditor: ea11c33..bcb8aed
..


Syncronize VisualEditor: ea11c33..bcb8aed

Change-Id: If5c9567886a0a02f70ffc321de2814ea5d452ecb
---
M VisualEditor
1 file changed, 0 insertions(+), 0 deletions(-)

Approvals:
  Jenkins-mwext-sync: Verified; Looks good to me, approved



diff --git a/VisualEditor b/VisualEditor
index ea11c33..bcb8aed 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit ea11c33e6d7174090a431bb487c640b79449f71b
+Subproject commit bcb8aed482664b059a7a34b78961d296f66c26c3

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If5c9567886a0a02f70ffc321de2814ea5d452ecb
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions
Gerrit-Branch: master
Gerrit-Owner: Jenkins-mwext-sync 
Gerrit-Reviewer: Jenkins-mwext-sync 

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


[MediaWiki-commits] [Gerrit] License information - change (mediawiki...cldr)

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

Change subject: License information
..


License information

* Adds license label to "Special:Version"
* Makes sure that only the extension and not the data are licensed GPL-2.0+

Change-Id: I46c7e6d970c06999a60bd57441fb01932880e891
---
M COPYING
M extension.json
2 files changed, 12 insertions(+), 0 deletions(-)

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



diff --git a/COPYING b/COPYING
index d159169..9491a9e 100644
--- a/COPYING
+++ b/COPYING
@@ -1,3 +1,14 @@
+The license text below "" applies to all files within this distribution,
+other than those that are in a directory which contains files named "LICENSE"
+or "COPYING", or a subdirectory thereof. For those files, the license text
+contained in said file overrides any license information contained in
+directories of smaller depth. Alternative licenses are typically used for
+software that is provided by external parties, and merely packaged with this
+software for convenience.
+
+
+
+
 GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
 
diff --git a/extension.json b/extension.json
index 6cb62a1..014d2ad 100644
--- a/extension.json
+++ b/extension.json
@@ -9,6 +9,7 @@
],
"url": "https://www.mediawiki.org/wiki/Extension:CLDR";,
"descriptionmsg": "cldr-desc",
+   "license-name" : "GPL-2.0+",
"Hooks": {
"LanguageGetTranslatedLanguageNames": [
"LanguageNames::coreHook"

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I46c7e6d970c06999a60bd57441fb01932880e891
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/cldr
Gerrit-Branch: master
Gerrit-Owner: Kghbln 
Gerrit-Reviewer: Kghbln 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Nikerabbit 
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] Provide license label for "Special:Version" - change (mediawiki...WikiLove)

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

Change subject: Provide license label for "Special:Version"
..


Provide license label for "Special:Version"

Change-Id: Id350dbf0c8a290d25acbec355d7c72ee764e5d0f
---
M extension.json
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/extension.json b/extension.json
index 339e94f..87df4c4 100644
--- a/extension.json
+++ b/extension.json
@@ -8,6 +8,7 @@
],
"url": "https://www.mediawiki.org/wiki/Extension:WikiLove";,
"descriptionmsg": "wikilove-desc",
+   "license-name": "MIT",
"type": "other",
"APIModules": {
"wikilove": "ApiWikiLove"

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id350dbf0c8a290d25acbec355d7c72ee764e5d0f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikiLove
Gerrit-Branch: master
Gerrit-Owner: Kghbln 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Tpt 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Cleanup - change (mediawiki...Lingo)

2016-03-05 Thread Foxtrott (Code Review)
Foxtrott has submitted this change and it was merged.

Change subject: Cleanup
..


Cleanup

Change-Id: I1c50f179eafc7f45133ca5f9d77c1586a26418fa
---
M src/Lingo.i18n.magic.php
M src/LingoBackend.php
M src/LingoBasicBackend.php
M src/LingoElement.php
M src/LingoHooks.php
M src/LingoMessageLog.php
M src/LingoParser.php
M src/LingoTree.php
8 files changed, 202 insertions(+), 153 deletions(-)

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



diff --git a/src/Lingo.i18n.magic.php b/src/Lingo.i18n.magic.php
index 3a3218d..af1f283 100644
--- a/src/Lingo.i18n.magic.php
+++ b/src/Lingo.i18n.magic.php
@@ -9,81 +9,81 @@
 $magicWords = array();
 
 /** English (English) */
-$magicWords['en'] = array(
+$magicWords[ 'en' ] = array(
'noglossary' => array( 0, '__NOGLOSSARY__' ),
 );
 
 /** Arabic (العربية) */
-$magicWords['ar'] = array(
+$magicWords[ 'ar' ] = array(
'noglossary' => array( 0, '__لا_قاموس__' ),
 );
 
 /** Egyptian Arabic (مصرى) */
-$magicWords['arz'] = array(
+$magicWords[ 'arz' ] = array(
'noglossary' => array( 0, '__من_غير_قاموس__' ),
 );
 
 /** German (Deutsch) */
-$magicWords['de'] = array(
+$magicWords[ 'de' ] = array(
'noglossary' => array( 0, '__KEINGLOSSAR__', '__KEIN_GLOSSAR__' ),
 );
 
 /** Zazaki (Zazaki) */
-$magicWords['diq'] = array(
+$magicWords[ 'diq' ] = array(
'noglossary' => array( 0, 'QISEBENDÇINİYO' ),
 );
 
 /** Esperanto (Esperanto) */
-$magicWords['eo'] = array(
+$magicWords[ 'eo' ] = array(
'noglossary' => array( 0, '__NEDIFINO__' ),
 );
 
 /** French (français) */
-$magicWords['fr'] = array(
+$magicWords[ 'fr' ] = array(
'noglossary' => array( 0, '__SANSGLOSSAIRE__' ),
 );
 
 /** Italian (italiano) */
-$magicWords['it'] = array(
+$magicWords[ 'it' ] = array(
'noglossary' => array( 0, '__NOGLOSSARIO__' ),
 );
 
 /** Korean (한국어) */
-$magicWords['ko'] = array(
+$magicWords[ 'ko' ] = array(
'noglossary' => array( 0, '__용어집없음__' ),
 );
 
 /** Macedonian (македонски) */
-$magicWords['mk'] = array(
+$magicWords[ 'mk' ] = array(
'noglossary' => array( 0, '__БЕЗПОИМНИК__' ),
 );
 
 /** Malayalam (മലയാളം) */
-$magicWords['ml'] = array(
+$magicWords[ 'ml' ] = array(
'noglossary' => array( 0, '__ചുരുക്കംവേണ്ട__' ),
 );
 
 /** Low Saxon (Netherlands) (Nedersaksies) */
-$magicWords['nds-nl'] = array(
+$magicWords[ 'nds-nl' ] = array(
'noglossary' => array( 0, '__GIEN_GLOSSARIUM__' ),
 );
 
 /** Dutch (Nederlands) */
-$magicWords['nl'] = array(
+$magicWords[ 'nl' ] = array(
'noglossary' => array( 0, '___GEENWOORDENLIJST__' ),
 );
 
 /** Serbian (Latin script) (srpski (latinica)‎) */
-$magicWords['sr-el'] = array(
+$magicWords[ 'sr-el' ] = array(
'noglossary' => array( 0, '__BEZREČNIKA__', '__BEZ_REČNIKA__' ),
 );
 
 /** Turkish (Türkçe) */
-$magicWords['tr'] = array(
+$magicWords[ 'tr' ] = array(
'noglossary' => array( 0, '__SÖZLÜKYOK__' ),
 );
 
 /** Simplified Chinese (中文(简体)‎) */
-$magicWords['zh-hans'] = array(
+$magicWords[ 'zh-hans' ] = array(
'noglossary' => array( 0, '__无词汇表__' ),
-);
\ No newline at end of file
+);
diff --git a/src/LingoBackend.php b/src/LingoBackend.php
index e64741a..383ee69 100644
--- a/src/LingoBackend.php
+++ b/src/LingoBackend.php
@@ -35,6 +35,10 @@
 
protected $mMessageLog;
 
+   /**
+* LingoBackend constructor.
+* @param LingoMessageLog|null $messages
+*/
public function __construct( LingoMessageLog &$messages = null ) {
 
if ( !$messages ) {
@@ -44,6 +48,9 @@
}
}
 
+   /**
+* @return LingoMessageLog
+*/
public function getMessageLog() {
return $this->mMessageLog;
}
@@ -65,7 +72,7 @@
 * strings: Term, Definition, Link, Source. If there is no next element 
the
 * function returns null.
 *
-* @return the next element or null
+* @return LingoElement | null
 */
abstract public function next();
 }
diff --git a/src/LingoBasicBackend.php b/src/LingoBasicBackend.php
index 84d80c2..d872cd0 100644
--- a/src/LingoBasicBackend.php
+++ b/src/LingoBasicBackend.php
@@ -35,6 +35,10 @@
 
protected $mArticleLines = array();
 
+   /**
+* LingoBasicBackend constructor.
+* @param LingoMessageLog|null $messages
+*/
public function __construct( LingoMessageLog &$messages = null ) {
 
global $wgexLingoPage, $wgRequest;
@@ -46,7 +50,7 @@
// Get Terminology page
$title = Title::newFromText( $page );
if ( $title->getInterwiki() ) {
-   $this->getMessageLog()->addError( wfMessage( 
'lingo-terminologypagenotlocal' , $page )->inContentLanguage()->text() );
+   $this->getMessageLog()->addError( wfMessage( 
'lingo-terminologypageno

[MediaWiki-commits] [Gerrit] Cleanup - change (mediawiki...Lingo)

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

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

Change subject: Cleanup
..

Cleanup

Change-Id: I1c50f179eafc7f45133ca5f9d77c1586a26418fa
---
M src/Lingo.i18n.magic.php
M src/LingoBackend.php
M src/LingoBasicBackend.php
M src/LingoElement.php
M src/LingoHooks.php
M src/LingoMessageLog.php
M src/LingoParser.php
M src/LingoTree.php
8 files changed, 202 insertions(+), 153 deletions(-)


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

diff --git a/src/Lingo.i18n.magic.php b/src/Lingo.i18n.magic.php
index 3a3218d..af1f283 100644
--- a/src/Lingo.i18n.magic.php
+++ b/src/Lingo.i18n.magic.php
@@ -9,81 +9,81 @@
 $magicWords = array();
 
 /** English (English) */
-$magicWords['en'] = array(
+$magicWords[ 'en' ] = array(
'noglossary' => array( 0, '__NOGLOSSARY__' ),
 );
 
 /** Arabic (العربية) */
-$magicWords['ar'] = array(
+$magicWords[ 'ar' ] = array(
'noglossary' => array( 0, '__لا_قاموس__' ),
 );
 
 /** Egyptian Arabic (مصرى) */
-$magicWords['arz'] = array(
+$magicWords[ 'arz' ] = array(
'noglossary' => array( 0, '__من_غير_قاموس__' ),
 );
 
 /** German (Deutsch) */
-$magicWords['de'] = array(
+$magicWords[ 'de' ] = array(
'noglossary' => array( 0, '__KEINGLOSSAR__', '__KEIN_GLOSSAR__' ),
 );
 
 /** Zazaki (Zazaki) */
-$magicWords['diq'] = array(
+$magicWords[ 'diq' ] = array(
'noglossary' => array( 0, 'QISEBENDÇINİYO' ),
 );
 
 /** Esperanto (Esperanto) */
-$magicWords['eo'] = array(
+$magicWords[ 'eo' ] = array(
'noglossary' => array( 0, '__NEDIFINO__' ),
 );
 
 /** French (français) */
-$magicWords['fr'] = array(
+$magicWords[ 'fr' ] = array(
'noglossary' => array( 0, '__SANSGLOSSAIRE__' ),
 );
 
 /** Italian (italiano) */
-$magicWords['it'] = array(
+$magicWords[ 'it' ] = array(
'noglossary' => array( 0, '__NOGLOSSARIO__' ),
 );
 
 /** Korean (한국어) */
-$magicWords['ko'] = array(
+$magicWords[ 'ko' ] = array(
'noglossary' => array( 0, '__용어집없음__' ),
 );
 
 /** Macedonian (македонски) */
-$magicWords['mk'] = array(
+$magicWords[ 'mk' ] = array(
'noglossary' => array( 0, '__БЕЗПОИМНИК__' ),
 );
 
 /** Malayalam (മലയാളം) */
-$magicWords['ml'] = array(
+$magicWords[ 'ml' ] = array(
'noglossary' => array( 0, '__ചുരുക്കംവേണ്ട__' ),
 );
 
 /** Low Saxon (Netherlands) (Nedersaksies) */
-$magicWords['nds-nl'] = array(
+$magicWords[ 'nds-nl' ] = array(
'noglossary' => array( 0, '__GIEN_GLOSSARIUM__' ),
 );
 
 /** Dutch (Nederlands) */
-$magicWords['nl'] = array(
+$magicWords[ 'nl' ] = array(
'noglossary' => array( 0, '___GEENWOORDENLIJST__' ),
 );
 
 /** Serbian (Latin script) (srpski (latinica)‎) */
-$magicWords['sr-el'] = array(
+$magicWords[ 'sr-el' ] = array(
'noglossary' => array( 0, '__BEZREČNIKA__', '__BEZ_REČNIKA__' ),
 );
 
 /** Turkish (Türkçe) */
-$magicWords['tr'] = array(
+$magicWords[ 'tr' ] = array(
'noglossary' => array( 0, '__SÖZLÜKYOK__' ),
 );
 
 /** Simplified Chinese (中文(简体)‎) */
-$magicWords['zh-hans'] = array(
+$magicWords[ 'zh-hans' ] = array(
'noglossary' => array( 0, '__无词汇表__' ),
-);
\ No newline at end of file
+);
diff --git a/src/LingoBackend.php b/src/LingoBackend.php
index e64741a..383ee69 100644
--- a/src/LingoBackend.php
+++ b/src/LingoBackend.php
@@ -35,6 +35,10 @@
 
protected $mMessageLog;
 
+   /**
+* LingoBackend constructor.
+* @param LingoMessageLog|null $messages
+*/
public function __construct( LingoMessageLog &$messages = null ) {
 
if ( !$messages ) {
@@ -44,6 +48,9 @@
}
}
 
+   /**
+* @return LingoMessageLog
+*/
public function getMessageLog() {
return $this->mMessageLog;
}
@@ -65,7 +72,7 @@
 * strings: Term, Definition, Link, Source. If there is no next element 
the
 * function returns null.
 *
-* @return the next element or null
+* @return LingoElement | null
 */
abstract public function next();
 }
diff --git a/src/LingoBasicBackend.php b/src/LingoBasicBackend.php
index 84d80c2..d872cd0 100644
--- a/src/LingoBasicBackend.php
+++ b/src/LingoBasicBackend.php
@@ -35,6 +35,10 @@
 
protected $mArticleLines = array();
 
+   /**
+* LingoBasicBackend constructor.
+* @param LingoMessageLog|null $messages
+*/
public function __construct( LingoMessageLog &$messages = null ) {
 
global $wgexLingoPage, $wgRequest;
@@ -46,7 +50,7 @@
// Get Terminology page
$title = Title::newFromText( $page );
if ( $title->getInterwiki() ) {
-   $this->getMessageLog()->addError( wfMessage( 
'lingo-terminologypagenotlocal' , $page )->inContentLanguage()->text() );
+   $this->getMessageLog()->

[MediaWiki-commits] [Gerrit] Tweaking various bits and pices - change (mediawiki...RSS)

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

Change subject: Tweaking various bits and pices
..


Tweaking various bits and pices

* Provide license label for "Special:Version"
* Fixed some links to use https
* Consistently use __DIR__
* Updated RELEASE-NOTES

Change-Id: I32d8384029f2e1ce69ad0cd9c847f06bf818f337
---
M RELEASE-NOTES
M RSS.php
2 files changed, 17 insertions(+), 11 deletions(-)

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



diff --git a/RELEASE-NOTES b/RELEASE-NOTES
index 1d85971..02e40d0 100644
--- a/RELEASE-NOTES
+++ b/RELEASE-NOTES
@@ -1,8 +1,8 @@
 RELEASE NOTES of the MediaWiki extension RSS
 
-Version 2.24 20131017
+Version 2.25 2014-03-28
 
-Manual http://www.mediawiki.org/wiki/Extension:RSS
+Manual https://www.mediawiki.org/wiki/Extension:RSS
 
 Browser view
 https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/extensions/RSS.git;a=tree
@@ -27,6 +27,11 @@
   The length limitation must be HTML tag-safe, but it is not at the moment.
   Length limitation is disabled by default.
 
+=== Version 2.25 2014-03-28 ===
+* Migrated I18n to use json-files
+* Provide backwards compatible shim up to version MW 1.17+ and higher
+* Drops compatibility with MW 1.16+ and lower
+
 === Version 2.24 2013-10-17 ==
 * fix for Bug 55763 Undefined variable: txt in RSSParser.php on line 376
 
diff --git a/RSS.php b/RSS.php
index dc01f91..1f65a39 100644
--- a/RSS.php
+++ b/RSS.php
@@ -4,14 +4,14 @@
  *
  * @file
  * @ingroup Extensions
- * @version 2.24
+ * @version 2.25.0
  * @author mutante, Daniel Kinzler, Rdb, Mafs, Thomas Gries, Alxndr, Chris 
Reigrut, K001
  * @author Kellan Elliott-McCrea  -- author of MagpieRSS
  * @author Jeroen De Dauw
  * @author Jack Phoenix 
  * @copyright © Kellan Elliott-McCrea 
  * @copyright © mutante, Daniel Kinzler, Rdb, Mafs, Thomas Gries, Alxndr, 
Chris Reigrut, K001
- * @link http://www.mediawiki.org/wiki/Extension:RSS Documentation
+ * @link https://www.mediawiki.org/wiki/Extension:RSS Documentation
  */
 
 define( "EXTENSION_RSS_VERSION", "2.25.0" );
@@ -26,21 +26,22 @@
'name' => 'RSS feed',
'author' => array( 'Kellan Elliott-McCrea', 'mutante', 'Daniel Kinzler',
'Rdb', 'Mafs', 'Alxndr', 'Thomas Gries', 'Chris Reigrut',
-   'K001', 'Jack Phoenix', 'Jeroen De Dauw', 'Mark A. Hershberger'
+   'K001', 'Jack Phoenix', 'Jeroen De Dauw', 'Mark A. Hershberger',
+   '...'
),
'version' => EXTENSION_RSS_VERSION,
'url' => 'https://www.mediawiki.org/wiki/Extension:RSS',
'descriptionmsg' => 'rss-desc',
+   'license-name' => 'GPL-2.0+'
 );
 
 // Internationalization file and autoloadable classes
-$dir = __DIR__ . '/';
 $wgMessagesDirs['RSS'] = __DIR__ . '/i18n';
-$wgExtensionMessagesFiles['RSS'] = $dir . 'RSS.i18n.php';
-$wgAutoloadClasses['RSSHooks'] = $dir . 'RSSHooks.php';
-$wgAutoloadClasses['RSSParser'] = $dir . 'RSSParser.php';
-$wgAutoloadClasses['RSSUtils'] = $dir . 'RSSParser.php';
-$wgAutoloadClasses['RSSData'] = $dir . 'RSSData.php';
+$wgExtensionMessagesFiles['RSS'] = __DIR__ . '/RSS.i18n.php';
+$wgAutoloadClasses['RSSHooks'] = __DIR__ . '/RSSHooks.php';
+$wgAutoloadClasses['RSSParser'] = __DIR__ . '/RSSParser.php';
+$wgAutoloadClasses['RSSUtils'] = __DIR__ . '/RSSParser.php';
+$wgAutoloadClasses['RSSData'] = __DIR__ . '/RSSData.php';
 
 // List tracking category on Special:TrackingCategories
 $wgTrackingCategories[] = 'rss-tracking-category';

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I32d8384029f2e1ce69ad0cd9c847f06bf818f337
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/RSS
Gerrit-Branch: master
Gerrit-Owner: Kghbln 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] dumps: add wikitech dumps to the 'other' index html page for... - change (operations/puppet)

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

Change subject: dumps: add wikitech dumps to the 'other' index html page for 
downloaders
..


dumps: add wikitech dumps to the 'other' index html page for downloaders

Change-Id: Ic232f535fcfd307e4fb01d43ae25799dc2ad1382
---
M modules/dataset/files/html/other_index.html
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/modules/dataset/files/html/other_index.html 
b/modules/dataset/files/html/other_index.html
index 2ebf352..54c505c 100644
--- a/modules/dataset/files/html/other_index.html
+++ b/modules/dataset/files/html/other_index.html
@@ -130,6 +130,7 @@
Miscellaneous - Phabricator and SVN 
dumps
CirrusSearch - Search indexes 
dumped in elasticsearch bulk insert format
Per day aggregate WMF 
fundraising donation totals, amounts, and other statistics
+   Dumps of images and content of 
wikitech.wikimedia.org




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

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

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


[MediaWiki-commits] [Gerrit] dumps: add wikitech dumps to the 'other' index html page for... - change (operations/puppet)

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

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

Change subject: dumps: add wikitech dumps to the 'other' index html page for 
downloaders
..

dumps: add wikitech dumps to the 'other' index html page for downloaders

Change-Id: Ic232f535fcfd307e4fb01d43ae25799dc2ad1382
---
M modules/dataset/files/html/other_index.html
1 file changed, 1 insertion(+), 0 deletions(-)


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

diff --git a/modules/dataset/files/html/other_index.html 
b/modules/dataset/files/html/other_index.html
index 2ebf352..54c505c 100644
--- a/modules/dataset/files/html/other_index.html
+++ b/modules/dataset/files/html/other_index.html
@@ -130,6 +130,7 @@
Miscellaneous - Phabricator and SVN 
dumps
CirrusSearch - Search indexes 
dumped in elasticsearch bulk insert format
Per day aggregate WMF 
fundraising donation totals, amounts, and other statistics
+   Dumps of images and content of 
wikitech.wikimedia.org




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

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

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


[MediaWiki-commits] [Gerrit] Call static methods statically - change (mediawiki...CleanChanges)

2016-03-05 Thread Siebrand (Code Review)
Siebrand has uploaded a new change for review.

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

Change subject: Call static methods statically
..

Call static methods statically

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


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

diff --git a/CleanChanges_body.php b/CleanChanges_body.php
index 1781928..d3ad121 100644
--- a/CleanChanges_body.php
+++ b/CleanChanges_body.php
@@ -161,7 +161,7 @@
$this->makeLinks( $rc );
 
// Make user links
-   if ( $this->isDeleted( $rc, Revision::DELETED_USER ) ) {
+   if ( self::isDeleted( $rc, Revision::DELETED_USER ) ) {
$rc->_user = ' ' .
$this->msg( 'rev-deleted-user' )->escaped() .
'';
@@ -500,7 +500,7 @@
$action = '';
if ( $comment === '' ) {
return $action;
-   } elseif ( $this->isDeleted( $rc, LogPage::DELETED_COMMENT ) ) {
+   } elseif ( self::isDeleted( $rc, LogPage::DELETED_COMMENT ) ) {
$priviledged = $this->getUser()->isAllowed( 
'deleterevision' );
if ( $priviledged ) {
return $action . ' ' .

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I817d021d5b1148fd3311420766a5fb4853f04dc3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CleanChanges
Gerrit-Branch: master
Gerrit-Owner: Siebrand 

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


[MediaWiki-commits] [Gerrit] Add license text to files - change (mediawiki...Lingo)

2016-03-05 Thread Foxtrott (Code Review)
Foxtrott has submitted this change and it was merged.

Change subject: Add license text to files
..


Add license text to files

Change-Id: I0b15f674ef4b7fdede48e67ba0f031cf4c00854c
---
M README.md
M libs/Lingo.js
M src/LingoBackend.php
M src/LingoBasicBackend.php
M src/LingoElement.php
M src/LingoHooks.php
M src/LingoMessageLog.php
M src/LingoParser.php
M src/LingoTree.php
M styles/Lingo.css
10 files changed, 172 insertions(+), 4 deletions(-)

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



diff --git a/README.md b/README.md
index 2d1837f..2a6f52d 100644
--- a/README.md
+++ b/README.md
@@ -14,8 +14,8 @@
 
 ## Requirements
 
-- PHP 5.3.2 or later
-- MediaWiki 1.25 or later
+- PHP 5.3.3 or later
+- MediaWiki 1.26 or later
 
 ## Installation
 
diff --git a/libs/Lingo.js b/libs/Lingo.js
index e281509..e1db33c 100644
--- a/libs/Lingo.js
+++ b/libs/Lingo.js
@@ -1,7 +1,28 @@
 /**
  * Javascript handler for the Lingo extension
  *
+ * This file is part of the MediaWiki extension Lingo.
+ *
+ * @copyright 2011 - 2016, Stephan Gambke
+ * @license   GNU General Public License, version 2 (or any later version)
+ *
+ * The Lingo extension is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by the 
Free
+ * Software Foundation; either version 2 of the License, or (at your option) 
any
+ * later version.
+ *
+ * The Lingo extension 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 .
+ *
  * @author Stephan Gambke
+ *
+ * @file
+ * @ingroup Lingo
  */
 
 /*global jQuery, mediaWiki */
diff --git a/src/LingoBackend.php b/src/LingoBackend.php
index 4d4f2a2..e64741a 100644
--- a/src/LingoBackend.php
+++ b/src/LingoBackend.php
@@ -3,6 +3,24 @@
 /**
  * File holding the LingoBackend class
  *
+ * This file is part of the MediaWiki extension Lingo.
+ *
+ * @copyright 2011 - 2016, Stephan Gambke
+ * @license   GNU General Public License, version 2 (or any later version)
+ *
+ * The Lingo extension is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by the 
Free
+ * Software Foundation; either version 2 of the License, or (at your option) 
any
+ * later version.
+ *
+ * The Lingo extension 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 .
+ *
  * @author Stephan Gambke
  * @file
  * @ingroup Lingo
diff --git a/src/LingoBasicBackend.php b/src/LingoBasicBackend.php
index 7d0bb47..84d80c2 100644
--- a/src/LingoBasicBackend.php
+++ b/src/LingoBasicBackend.php
@@ -3,6 +3,24 @@
 /**
  * File holding the LingoBackend class
  *
+ * This file is part of the MediaWiki extension Lingo.
+ *
+ * @copyright 2011 - 2016, Stephan Gambke
+ * @license   GNU General Public License, version 2 (or any later version)
+ *
+ * The Lingo extension is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by the 
Free
+ * Software Foundation; either version 2 of the License, or (at your option) 
any
+ * later version.
+ *
+ * The Lingo extension 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 .
+ *
  * @author Stephan Gambke
  * @file
  * @ingroup Lingo
diff --git a/src/LingoElement.php b/src/LingoElement.php
index cbe7574..9614ce8 100644
--- a/src/LingoElement.php
+++ b/src/LingoElement.php
@@ -3,6 +3,24 @@
 /**
  * File holding the LingoElement class.
  *
+ * This file is part of the MediaWiki extension Lingo.
+ *
+ * @copyright 2011 - 2016, Stephan Gambke
+ * @license   GNU General Public License, version 2 (or any later version)
+ *
+ * The Lingo extension is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by the 
Free
+ * Software Foundation; either version 2 of the License, or (at your option) 
any
+ * later version.
+ *
+ * The Lingo extension is distributed in the hope that it will be u

[MediaWiki-commits] [Gerrit] Add license text to files - change (mediawiki...Lingo)

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

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

Change subject: Add license text to files
..

Add license text to files

Change-Id: I0b15f674ef4b7fdede48e67ba0f031cf4c00854c
---
M README.md
M libs/Lingo.js
M src/LingoBackend.php
M src/LingoBasicBackend.php
M src/LingoElement.php
M src/LingoHooks.php
M src/LingoMessageLog.php
M src/LingoParser.php
M src/LingoTree.php
M styles/Lingo.css
10 files changed, 172 insertions(+), 4 deletions(-)


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

diff --git a/README.md b/README.md
index 2d1837f..2a6f52d 100644
--- a/README.md
+++ b/README.md
@@ -14,8 +14,8 @@
 
 ## Requirements
 
-- PHP 5.3.2 or later
-- MediaWiki 1.25 or later
+- PHP 5.3.3 or later
+- MediaWiki 1.26 or later
 
 ## Installation
 
diff --git a/libs/Lingo.js b/libs/Lingo.js
index e281509..e1db33c 100644
--- a/libs/Lingo.js
+++ b/libs/Lingo.js
@@ -1,7 +1,28 @@
 /**
  * Javascript handler for the Lingo extension
  *
+ * This file is part of the MediaWiki extension Lingo.
+ *
+ * @copyright 2011 - 2016, Stephan Gambke
+ * @license   GNU General Public License, version 2 (or any later version)
+ *
+ * The Lingo extension is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by the 
Free
+ * Software Foundation; either version 2 of the License, or (at your option) 
any
+ * later version.
+ *
+ * The Lingo extension 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 .
+ *
  * @author Stephan Gambke
+ *
+ * @file
+ * @ingroup Lingo
  */
 
 /*global jQuery, mediaWiki */
diff --git a/src/LingoBackend.php b/src/LingoBackend.php
index 4d4f2a2..e64741a 100644
--- a/src/LingoBackend.php
+++ b/src/LingoBackend.php
@@ -3,6 +3,24 @@
 /**
  * File holding the LingoBackend class
  *
+ * This file is part of the MediaWiki extension Lingo.
+ *
+ * @copyright 2011 - 2016, Stephan Gambke
+ * @license   GNU General Public License, version 2 (or any later version)
+ *
+ * The Lingo extension is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by the 
Free
+ * Software Foundation; either version 2 of the License, or (at your option) 
any
+ * later version.
+ *
+ * The Lingo extension 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 .
+ *
  * @author Stephan Gambke
  * @file
  * @ingroup Lingo
diff --git a/src/LingoBasicBackend.php b/src/LingoBasicBackend.php
index 7d0bb47..84d80c2 100644
--- a/src/LingoBasicBackend.php
+++ b/src/LingoBasicBackend.php
@@ -3,6 +3,24 @@
 /**
  * File holding the LingoBackend class
  *
+ * This file is part of the MediaWiki extension Lingo.
+ *
+ * @copyright 2011 - 2016, Stephan Gambke
+ * @license   GNU General Public License, version 2 (or any later version)
+ *
+ * The Lingo extension is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by the 
Free
+ * Software Foundation; either version 2 of the License, or (at your option) 
any
+ * later version.
+ *
+ * The Lingo extension 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 .
+ *
  * @author Stephan Gambke
  * @file
  * @ingroup Lingo
diff --git a/src/LingoElement.php b/src/LingoElement.php
index cbe7574..9614ce8 100644
--- a/src/LingoElement.php
+++ b/src/LingoElement.php
@@ -3,6 +3,24 @@
 /**
  * File holding the LingoElement class.
  *
+ * This file is part of the MediaWiki extension Lingo.
+ *
+ * @copyright 2011 - 2016, Stephan Gambke
+ * @license   GNU General Public License, version 2 (or any later version)
+ *
+ * The Lingo extension is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by the 
Free
+ * Software Foundation; either version 2 of the License, or (at your option) 
any
+ * later version.
+ *
+ * The Lingo extensio

[MediaWiki-commits] [Gerrit] Pass-by-reference is not needed - change (mediawiki...CleanChanges)

2016-03-05 Thread Siebrand (Code Review)
Siebrand has uploaded a new change for review.

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

Change subject: Pass-by-reference is not needed
..

Pass-by-reference is not needed

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


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

diff --git a/CleanChanges_body.php b/CleanChanges_body.php
index 1424459..1781928 100644
--- a/CleanChanges_body.php
+++ b/CleanChanges_body.php
@@ -7,7 +7,7 @@
/**
 * Determines which version of changes list to provide, or none.
 */
-   public static function hook( User $user, Skin &$skin, &$list ) {
+   public static function hook( User $user, Skin $skin, &$list ) {
$list = null;
 
if ( defined( 'ULS_VERSION' ) ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I708bd1f528adc395ef404c00e3535b6f8cf289ac
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CleanChanges
Gerrit-Branch: master
Gerrit-Owner: Siebrand 

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


[MediaWiki-commits] [Gerrit] datasets: make wget quieter in cron job, clean up old wikite... - change (operations/puppet)

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

Change subject: datasets: make wget quieter in cron job, clean up old wikitech 
dumps
..


datasets: make wget quieter in cron job, clean up old wikitech dumps

Change-Id: Id9b9ea40da5be628be79a9cb328a5f56e8cccecc
---
M modules/dataset/manifests/cron/wikitech_dumps.pp
1 file changed, 4 insertions(+), 3 deletions(-)

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



diff --git a/modules/dataset/manifests/cron/wikitech_dumps.pp 
b/modules/dataset/manifests/cron/wikitech_dumps.pp
index 397e4b6..415bb51 100644
--- a/modules/dataset/manifests/cron/wikitech_dumps.pp
+++ b/modules/dataset/manifests/cron/wikitech_dumps.pp
@@ -23,15 +23,16 @@
 }
 
 $wget = '/usr/bin/wget'
-$wgetargs = "-e robots=off -k -nH --wait 30 -np -m ${url} -P 
${wikitechdir}"
+$wgetargs = "-nv -e robots=off -k -nH --wait 30 -np -m ${url} -P 
${wikitechdir}"
 
 # the index.html files we get from wikitech are icky,
 # best to toss them when done
-$cleanup = "find ${wikitechdir} -name 'index.html*' -exec rm {} \\;"
+$cleanuphtml = "find ${wikitechdir} -name 'index.html*' -exec rm {} \\;"
+$cleanupold = "find ${wikitechdir} -type f -mtime +90 -exec rm {} \\;"
 
 cron { 'wikitech-dumps-grab':
 ensure  => $ensure,
-command => "${wget} ${wgetargs}; ${cleanup}",
+command => "${wget} ${wgetargs}; ${cleanuphtml}; ${cleanupold}",
 user=> $user,
 minute  => '20',
 hour=> '3',

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

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

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


[MediaWiki-commits] [Gerrit] Replace deprecated functions - change (mediawiki...CleanChanges)

2016-03-05 Thread Siebrand (Code Review)
Siebrand has uploaded a new change for review.

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

Change subject: Replace deprecated functions
..

Replace deprecated functions

Change-Id: I640bf5df346946a8ddb5d33ddab0b143889cdb6c
---
M CleanChanges_body.php
M Filters.php
M extension.json
3 files changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CleanChanges 
refs/changes/11/275211/1

diff --git a/CleanChanges_body.php b/CleanChanges_body.php
index 3f66370..1424459 100644
--- a/CleanChanges_body.php
+++ b/CleanChanges_body.php
@@ -389,7 +389,7 @@
 * @return string HTML "" tag
 */
protected function spacerArrow() {
-   return $this->arrow( '', codepointToUtf8( 0xa0 ) ); // 
non-breaking space
+   return $this->arrow( '', UtfNormal\Utils::codepointToUtf8( 0xa0 
) ); // non-breaking space
}
 
/**
diff --git a/Filters.php b/Filters.php
index 057a78d..81739ac 100644
--- a/Filters.php
+++ b/Filters.php
@@ -115,7 +115,7 @@
LanguageNames::LIST_MW
);
} else {
-   $languages = Language::getLanguageNames( false );
+   $languages = Language::fetchLanguageNames( null, 'mw' );
}
ksort( $languages );
$options = Xml::option( wfMessage( 'cleanchanges-language-na' 
)->text(), '', $default === '' );
diff --git a/extension.json b/extension.json
index a498ba6..efde82e 100644
--- a/extension.json
+++ b/extension.json
@@ -1,6 +1,6 @@
 {
"name": "Clean Changes",
-   "version": "2016-02-12",
+   "version": "2016-03-05",
"author": "Niklas Laxström",
"url": "https://www.mediawiki.org/wiki/Extension:CleanChanges";,
"descriptionmsg": "cleanchanges-desc",

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I640bf5df346946a8ddb5d33ddab0b143889cdb6c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CleanChanges
Gerrit-Branch: master
Gerrit-Owner: Siebrand 

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


[MediaWiki-commits] [Gerrit] datasets: make wget quieter in cron job, clean up old wikite... - change (operations/puppet)

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

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

Change subject: datasets: make wget quieter in cron job, clean up old wikitech 
dumps
..

datasets: make wget quieter in cron job, clean up old wikitech dumps

Change-Id: Id9b9ea40da5be628be79a9cb328a5f56e8cccecc
---
M modules/dataset/manifests/cron/wikitech_dumps.pp
1 file changed, 4 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/10/275210/1

diff --git a/modules/dataset/manifests/cron/wikitech_dumps.pp 
b/modules/dataset/manifests/cron/wikitech_dumps.pp
index 397e4b6..415bb51 100644
--- a/modules/dataset/manifests/cron/wikitech_dumps.pp
+++ b/modules/dataset/manifests/cron/wikitech_dumps.pp
@@ -23,15 +23,16 @@
 }
 
 $wget = '/usr/bin/wget'
-$wgetargs = "-e robots=off -k -nH --wait 30 -np -m ${url} -P 
${wikitechdir}"
+$wgetargs = "-nv -e robots=off -k -nH --wait 30 -np -m ${url} -P 
${wikitechdir}"
 
 # the index.html files we get from wikitech are icky,
 # best to toss them when done
-$cleanup = "find ${wikitechdir} -name 'index.html*' -exec rm {} \\;"
+$cleanuphtml = "find ${wikitechdir} -name 'index.html*' -exec rm {} \\;"
+$cleanupold = "find ${wikitechdir} -type f -mtime +90 -exec rm {} \\;"
 
 cron { 'wikitech-dumps-grab':
 ensure  => $ensure,
-command => "${wget} ${wgetargs}; ${cleanup}",
+command => "${wget} ${wgetargs}; ${cleanuphtml}; ${cleanupold}",
 user=> $user,
 minute  => '20',
 hour=> '3',

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

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

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


[MediaWiki-commits] [Gerrit] turn off output messages in central auth dumps - change (operations/puppet)

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

Change subject: turn off output messages in central auth dumps
..


turn off output messages in central auth dumps

Change-Id: I4450b9c1dcca68c99d707a40076c12273a466ab9
---
M modules/snapshot/files/dumpcentralauth.sh
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/modules/snapshot/files/dumpcentralauth.sh 
b/modules/snapshot/files/dumpcentralauth.sh
index 7a3c822..68219bc 100755
--- a/modules/snapshot/files/dumpcentralauth.sh
+++ b/modules/snapshot/files/dumpcentralauth.sh
@@ -85,7 +85,7 @@
 echo -n "$mysqldump" -u "$wikiadmin" -p"$wikipass" -h "$host" --opt 
--quick --skip-add-locks --skip-lock-tables centralauth "$t"
 echo  "| $gzip > $outputfile"
 else
-echo "dumping $t into $outputfile"
+# echo "dumping $t into $outputfile"
 "$mysqldump" -u "$wikiadmin" -p"$wikipass" -h "$host" --opt --quick 
--skip-add-locks --skip-lock-tables centralauth "$t" | "$gzip" > "$outputfile"
 fi
 done

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

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

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


[MediaWiki-commits] [Gerrit] turn off output messages in central auth dumps - change (operations/puppet)

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

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

Change subject: turn off output messages in central auth dumps
..

turn off output messages in central auth dumps

Change-Id: I4450b9c1dcca68c99d707a40076c12273a466ab9
---
M modules/snapshot/files/dumpcentralauth.sh
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/modules/snapshot/files/dumpcentralauth.sh 
b/modules/snapshot/files/dumpcentralauth.sh
index 7a3c822..68219bc 100755
--- a/modules/snapshot/files/dumpcentralauth.sh
+++ b/modules/snapshot/files/dumpcentralauth.sh
@@ -85,7 +85,7 @@
 echo -n "$mysqldump" -u "$wikiadmin" -p"$wikipass" -h "$host" --opt 
--quick --skip-add-locks --skip-lock-tables centralauth "$t"
 echo  "| $gzip > $outputfile"
 else
-echo "dumping $t into $outputfile"
+# echo "dumping $t into $outputfile"
 "$mysqldump" -u "$wikiadmin" -p"$wikipass" -h "$host" --opt --quick 
--skip-add-locks --skip-lock-tables centralauth "$t" | "$gzip" > "$outputfile"
 fi
 done

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

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

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


[MediaWiki-commits] [Gerrit] Add class error to Warning - change (mediawiki/core)

2016-03-05 Thread Harjotsingh (Code Review)
Harjotsingh has uploaded a new change for review.

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

Change subject: Add class error to Warning
..

Add class error to Warning

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


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/08/275208/1

diff --git a/includes/EditPage.php b/includes/EditPage.php
index 1455068..223db13 100644
--- a/includes/EditPage.php
+++ b/includes/EditPage.php
@@ -3736,10 +3736,10 @@
} else {
$conflict = '';
}
-
+   $err = [ 'class' => 'error'];
$previewhead = "\n" .
'' . wfMessage( 'preview' 
)->escaped() . "" .
-   $wgOut->parse( $note, true, /* interface */true ) . 
$conflict . "\n";
+   $wgOut->parse( $note = HTML::rawElement( 'p', $err, 
$note ), true, /* interface */true ) . $conflict . "\n";
 
$pageViewLang = $this->mTitle->getPageViewLanguage();
$attribs = [ 'lang' => $pageViewLang->getHtmlCode(), 'dir' => 
$pageViewLang->getDir(),

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

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

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


[MediaWiki-commits] [Gerrit] Travis: Fix setup for postgres and sqlite - change (mediawiki...Lingo)

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

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

Change subject: Travis: Fix setup for postgres and sqlite
..

Travis: Fix setup for postgres and sqlite

Change-Id: Ibd9787a53bad3b266f9d4980130b249c9ff217a0
---
M .travis.yml
M build/travis/script.sh
2 files changed, 38 insertions(+), 3 deletions(-)


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

diff --git a/.travis.yml b/.travis.yml
index b40ba4e..f9d438f 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -29,7 +29,7 @@
   include:
 - env: DBTYPE=mysql; MW=master
   php: 5.6
-- env: DBTYPE=postgres; MW=master
+- env: DBTYPE=postgres; MW=1.26.2
   php: 5.5
 - env: DBTYPE=sqlite; MW=1.26.0
   php: 5.3
diff --git a/build/travis/script.sh b/build/travis/script.sh
index e08b10c..17d9cd7 100755
--- a/build/travis/script.sh
+++ b/build/travis/script.sh
@@ -44,8 +44,43 @@
 
composer install --prefer-source
 
-   mysql -e 'create database its_a_mw;'
-   php maintenance/install.php --dbtype $DBTYPE --dbuser root --dbname 
its_a_mw --dbpath $(pwd) --pass nyan TravisWiki admin
+   case "$DBTYPE" in
+   "mysql")
+
+   mysql -e 'create database its_a_mw;'
+   php maintenance/install.php --dbtype $DBTYPE --dbuser root 
--dbname its_a_mw --pass nyan --scriptpath /TravisWiki TravisWiki admin
+
+   ;;
+
+   "postgres")
+
+   # See 
https://github.com/SemanticMediaWiki/SemanticMediaWiki/issues/458
+   sudo /etc/init.d/postgresql stop
+
+   # Travis@support: Try adding a sleep of a few seconds between 
starting PostgreSQL
+   # and the first command that accesses PostgreSQL
+   sleep 3
+
+   sudo /etc/init.d/postgresql start
+   sleep 3
+
+   psql -c 'create database its_a_mw;' -U postgres
+   php maintenance/install.php --dbtype $DBTYPE --dbuser postgres 
--dbname its_a_mw --pass nyan --scriptpath /TravisWiki TravisWiki admin
+
+   ;;
+
+   "sqlite")
+
+   php maintenance/install.php --dbtype $DBTYPE --dbuser root  
--dbname its_a_mw --dbpath $(pwd) --pass nyan --scriptpath /TravisWiki 
TravisWiki admin
+
+   ;;
+
+   *)
+   echo "$DBTYPE is not a recognized database type."
+   exit 1
+
+   esac
+
 }
 
 function installExtensionViaComposerOnMediaWikiRoot {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibd9787a53bad3b266f9d4980130b249c9ff217a0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Lingo
Gerrit-Branch: master
Gerrit-Owner: Foxtrott 

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


[MediaWiki-commits] [Gerrit] Travis: Fix setup for postgres and sqlite - change (mediawiki...Lingo)

2016-03-05 Thread Foxtrott (Code Review)
Foxtrott has submitted this change and it was merged.

Change subject: Travis: Fix setup for postgres and sqlite
..


Travis: Fix setup for postgres and sqlite

Change-Id: Ibd9787a53bad3b266f9d4980130b249c9ff217a0
---
M .travis.yml
M build/travis/script.sh
2 files changed, 38 insertions(+), 3 deletions(-)

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



diff --git a/.travis.yml b/.travis.yml
index b40ba4e..f9d438f 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -29,7 +29,7 @@
   include:
 - env: DBTYPE=mysql; MW=master
   php: 5.6
-- env: DBTYPE=postgres; MW=master
+- env: DBTYPE=postgres; MW=1.26.2
   php: 5.5
 - env: DBTYPE=sqlite; MW=1.26.0
   php: 5.3
diff --git a/build/travis/script.sh b/build/travis/script.sh
index e08b10c..17d9cd7 100755
--- a/build/travis/script.sh
+++ b/build/travis/script.sh
@@ -44,8 +44,43 @@
 
composer install --prefer-source
 
-   mysql -e 'create database its_a_mw;'
-   php maintenance/install.php --dbtype $DBTYPE --dbuser root --dbname 
its_a_mw --dbpath $(pwd) --pass nyan TravisWiki admin
+   case "$DBTYPE" in
+   "mysql")
+
+   mysql -e 'create database its_a_mw;'
+   php maintenance/install.php --dbtype $DBTYPE --dbuser root 
--dbname its_a_mw --pass nyan --scriptpath /TravisWiki TravisWiki admin
+
+   ;;
+
+   "postgres")
+
+   # See 
https://github.com/SemanticMediaWiki/SemanticMediaWiki/issues/458
+   sudo /etc/init.d/postgresql stop
+
+   # Travis@support: Try adding a sleep of a few seconds between 
starting PostgreSQL
+   # and the first command that accesses PostgreSQL
+   sleep 3
+
+   sudo /etc/init.d/postgresql start
+   sleep 3
+
+   psql -c 'create database its_a_mw;' -U postgres
+   php maintenance/install.php --dbtype $DBTYPE --dbuser postgres 
--dbname its_a_mw --pass nyan --scriptpath /TravisWiki TravisWiki admin
+
+   ;;
+
+   "sqlite")
+
+   php maintenance/install.php --dbtype $DBTYPE --dbuser root  
--dbname its_a_mw --dbpath $(pwd) --pass nyan --scriptpath /TravisWiki 
TravisWiki admin
+
+   ;;
+
+   *)
+   echo "$DBTYPE is not a recognized database type."
+   exit 1
+
+   esac
+
 }
 
 function installExtensionViaComposerOnMediaWikiRoot {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibd9787a53bad3b266f9d4980130b249c9ff217a0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Lingo
Gerrit-Branch: master
Gerrit-Owner: Foxtrott 
Gerrit-Reviewer: Foxtrott 

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


[MediaWiki-commits] [Gerrit] Groups support, link layer fix - change (mediawiki...Kartographer)

2016-03-05 Thread Yurik (Code Review)
Yurik has uploaded a new change for review.

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

Change subject: Groups support, link layer fix
..

Groups support, link layer fix

Change-Id: I9d1060fe6b88421f640bf4ebd17770d3821ebccc
---
M includes/Tag/MapFrame.php
M includes/Tag/MapLink.php
M includes/Tag/TagHandler.php
M modules/kartographer.js
4 files changed, 43 insertions(+), 25 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Kartographer 
refs/changes/05/275205/1

diff --git a/includes/Tag/MapFrame.php b/includes/Tag/MapFrame.php
index e00727a..09da3ca 100644
--- a/includes/Tag/MapFrame.php
+++ b/includes/Tag/MapFrame.php
@@ -51,10 +51,10 @@
);
 
$dataParam = '';
-   $groups = $this->groups;
-   if ( $groups ) {
-   array_unshift( $groups, 
$this->parser->getTitle()->getPrefixedDBkey() );
-   $dataParam = '?data=' . implode( '|', 
array_map( 'rawurlencode', $groups ) );
+   $showGroups = $this->showGroups;
+   if ( $showGroups ) {
+   array_unshift( $showGroups, 
$this->parser->getTitle()->getPrefixedDBkey() );
+   $dataParam = '?data=' . implode( '|', 
array_map( 'rawurlencode', $showGroups ) );
}
$imgAttrs = array(
'src' => $statParams . '.jpeg' . 
$dataParam,
@@ -86,8 +86,8 @@
$attrs['data-zoom'] = $this->zoom;
$attrs['data-lat'] = $this->lat;
$attrs['data-lon'] = $this->lon;
-   if ( $this->groups ) {
-   $attrs['data-overlays'] = 
FormatJson::encode( $this->groups, false,
+   if ( $this->showGroups ) {
+   $attrs['data-overlays'] = 
FormatJson::encode( $this->showGroups, false,
FormatJson::ALL_OK );
}
$this->parser->getOutput()->setExtensionData( 
'kartographer_interact', true );
diff --git a/includes/Tag/MapLink.php b/includes/Tag/MapLink.php
index 834365a..d92b679 100644
--- a/includes/Tag/MapLink.php
+++ b/includes/Tag/MapLink.php
@@ -2,6 +2,7 @@
 
 namespace Kartographer\Tag;
 
+use FormatJson;
 use Html;
 
 /**
@@ -29,6 +30,10 @@
$attrs['data-zoom'] = $this->zoom;
$attrs['data-lat'] = $this->lat;
$attrs['data-lon'] = $this->lon;
+   if ( $this->showGroups ) {
+   $attrs['data-overlays'] = FormatJson::encode( 
$this->showGroups, false,
+   FormatJson::ALL_OK );
+   }
 
return Html::rawElement( 'a', $attrs, $text );
}
diff --git a/includes/Tag/TagHandler.php b/includes/Tag/TagHandler.php
index 1d2d976..2e75022 100644
--- a/includes/Tag/TagHandler.php
+++ b/includes/Tag/TagHandler.php
@@ -48,8 +48,11 @@
/** @var string */
protected $style;
 
-   /** @var string[] */
-   protected $groups;
+   /** @var string name of the group, or null for private */
+   protected $groupName;
+
+   /** @var string[] list of groups to show */
+   protected $showGroups = [];
 
/** @var string[] */
protected $defaultAttributes;
@@ -167,8 +170,21 @@
}
 
private function parseGroups() {
-   $text = $this->getText( 'group', '*', 
'/^[a-zA-Z0-9]+(\s*,\s*[a-zA-Z0-9]+)*$/' );
-   $this->groups = array_map( 'trim', explode( ',', $text ) );
+   $this->groupName = $this->getText( 'group', null, 
'/^[a-zA-Z0-9]+$/' );
+
+   $text = $this->getText( 'show', null, 
'/^[a-zA-Z0-9]+(\s*,\s*[a-zA-Z0-9]+)*$/' );
+   if ( $text !== null ) {
+   $this->showGroups = array_map( 'trim', explode( ',', 
$text ) );
+   }
+
+   // Make sure the current group is shown for this map, even if 
there is no geojson
+   // Private group will be added during the save, as it requires 
hash calculation
+   if ( $this->groupName !== null ) {
+   $this->showGroups[] = $this->groupName;
+   }
+
+   // Make sure there are no group name duplicates
+   $this->showGroups = array_unique( $this->showGroups );
}
 
protected function getInt( $name, $default = false ) {
@@ -232,9 +248,15 @@
$this->counter = $this->doCountersRecursive( $this->geometries, 
$counters );
$output->setExtensionDa

[MediaWiki-commits] [Gerrit] imageuncat: Use LogpagesPageGenerator - change (pywikibot/core)

2016-03-05 Thread AbdealiJK (Code Review)
AbdealiJK has uploaded a new change for review.

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

Change subject: imageuncat: Use LogpagesPageGenerator
..

imageuncat: Use LogpagesPageGenerator

LogeventsPageGenerator can be used for imageuncat with the -yesterday
cli arg. But it doesn't truncate based on timestamp. Nor does it
expose `reverse` from site.logevents().

This commit adds these args to LogeventsPageGenerator and then
uses it in imageuncat to reduce repetitive code.

Bug: T67192
Change-Id: I5cd14609a43bd7b7343f234c0832cc471ae0250b
---
M pywikibot/pagegenerators.py
M scripts/imageuncat.py
2 files changed, 27 insertions(+), 13 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/04/275204/1

diff --git a/pywikibot/pagegenerators.py b/pywikibot/pagegenerators.py
index 2f80a3b..cc43a14 100644
--- a/pywikibot/pagegenerators.py
+++ b/pywikibot/pagegenerators.py
@@ -919,8 +919,8 @@
 
 
 @deprecated_args(number="total", mode="logtype", repeat=None)
-def LogeventsPageGenerator(logtype=None, user=None, site=None,
-   namespace=0, total=None):
+def LogeventsPageGenerator(logtype=None, user=None, site=None, namespace=0,
+   total=None, start=None, end=None, reverse=False):
 """
 Generate Pages for specified modes of logevents.
 
@@ -934,11 +934,18 @@
 @type namespace: int
 @param total: Maximum number of pages to retrieve in total
 @type total: int
+@param start: Timestamp to start listing from
+@type start: pywikibot.Timestamp
+@param end: Timestamp to end listing at
+@type end: pywikibot.Timestamp
+@param reverse: if True, start with oldest changes (default: newest)
+@type reverse: bool
 """
 if site is None:
 site = pywikibot.Site()
-for entry in site.logevents(total=total, logtype=logtype,
-user=user, namespace=namespace):
+for entry in site.logevents(total=total, logtype=logtype, user=user,
+namespace=namespace, start=start, end=end,
+reverse=False):
 try:
 yield entry.page()
 except KeyError as e:
@@ -950,8 +957,8 @@
 
 @deprecated("LogeventsPageGenerator")
 @deprecated_args(number="total", mode="logtype", repeat=None)
-def LogpagesPageGenerator(total=500, logtype='', user=None,
-  site=None, namespace=[]):
+def LogpagesPageGenerator(total=500, logtype='', user=None, site=None,
+  namespace=[], start=None, end=None, reverse=False):
 """
 Generate Pages for specified modes of logevents.
 
@@ -968,9 +975,16 @@
 @type namespace: int
 @param total: Maximum number of pages to retrieve in total
 @type total: int
+@param start: Timestamp to start listing from
+@type start: pywikibot.Timestamp
+@param end: Timestamp to end listing at
+@type end: pywikibot.Timestamp
+@param reverse: if True, start with oldest changes (default: newest)
+@type reverse: bool
 """
 return LogeventsPageGenerator(total=total, logtype=logtype, user=user,
-  site=site, namespace=namespace)
+  site=site, namespace=namespace, start=start,
+  end=end, reverse=reverse)
 
 
 @deprecated_args(number='total', step=None, namespace='namespaces',
diff --git a/scripts/imageuncat.py b/scripts/imageuncat.py
index 7efd746..5a5db36 100755
--- a/scripts/imageuncat.py
+++ b/scripts/imageuncat.py
@@ -1254,15 +1254,15 @@
 
 def uploadedYesterday(site):
 """
-Return a pagegenerator containing all the pictures uploaded yesterday.
+Fetches the list of all images loaded in the last 24 hours.
 
-Should probably copied to somewhere else
+@return: The generator containing all the images uploaded yesterday.
+@rtype: LogeventsPageGenerator
 """
 today = pywikibot.Timestamp.utcnow()
-yesterday = today + timedelta(days=-1)
-
-for logentry in site.logevents(logtype='upload', start=yesterday, 
end=today, reverse=True):
-yield logentry.page()
+return pagegenerators.LogpagesPageGenerator(logtype='upload', reverse=True,
+start=today + 
timedelta(days=-1),
+end=today)
 
 
 def recentChanges(site=None, delay=0, block=70):

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

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

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


[MediaWiki-commits] [Gerrit] datasets: toss index.html files copied from wikitech anywher... - change (operations/puppet)

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

Change subject: datasets: toss index.html files copied from wikitech anywhere 
in tree
..


datasets: toss index.html files copied from wikitech anywhere in tree

we don't know the source url in advance so we don't know where they
will land, just toss them all

Change-Id: I13c1ea264fd19be6337c1c44298bb2e755dcc1df
---
M modules/dataset/manifests/cron/wikitech_dumps.pp
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/modules/dataset/manifests/cron/wikitech_dumps.pp 
b/modules/dataset/manifests/cron/wikitech_dumps.pp
index 84893aa..397e4b6 100644
--- a/modules/dataset/manifests/cron/wikitech_dumps.pp
+++ b/modules/dataset/manifests/cron/wikitech_dumps.pp
@@ -27,7 +27,7 @@
 
 # the index.html files we get from wikitech are icky,
 # best to toss them when done
-$cleanup = "rm ${wikitechdir}/index.html*"
+$cleanup = "find ${wikitechdir} -name 'index.html*' -exec rm {} \\;"
 
 cron { 'wikitech-dumps-grab':
 ensure  => $ensure,

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

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

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


[MediaWiki-commits] [Gerrit] datasets: toss index.html files copied from wikitech anywher... - change (operations/puppet)

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

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

Change subject: datasets: toss index.html files copied from wikitech anywhere 
in tree
..

datasets: toss index.html files copied from wikitech anywhere in tree

we don't know the source url in advance so we don't know where they
will land, just toss them all

Change-Id: I13c1ea264fd19be6337c1c44298bb2e755dcc1df
---
M modules/dataset/manifests/cron/wikitech_dumps.pp
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/modules/dataset/manifests/cron/wikitech_dumps.pp 
b/modules/dataset/manifests/cron/wikitech_dumps.pp
index 84893aa..397e4b6 100644
--- a/modules/dataset/manifests/cron/wikitech_dumps.pp
+++ b/modules/dataset/manifests/cron/wikitech_dumps.pp
@@ -27,7 +27,7 @@
 
 # the index.html files we get from wikitech are icky,
 # best to toss them when done
-$cleanup = "rm ${wikitechdir}/index.html*"
+$cleanup = "find ${wikitechdir} -name 'index.html*' -exec rm {} \\;"
 
 cron { 'wikitech-dumps-grab':
 ensure  => $ensure,

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

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

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


[MediaWiki-commits] [Gerrit] Avoid test fail when Scrutinizer is down - change (mediawiki...Lingo)

2016-03-05 Thread Foxtrott (Code Review)
Foxtrott has submitted this change and it was merged.

Change subject: Avoid test fail when Scrutinizer is down
..


Avoid test fail when Scrutinizer is down

Change-Id: I7940069f708bae5d702c00407ba46a6e11f5714e
---
M README.md
M build/travis/script.sh
2 files changed, 4 insertions(+), 2 deletions(-)

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



diff --git a/README.md b/README.md
index ea5f97a..2d1837f 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,7 @@
 # Lingo
-[![Build 
Status](https://scrutinizer-ci.com/g/wikimedia/mediawiki-extensions-Lingo/badges/build.png?b=master)](https://scrutinizer-ci.com/g/wikimedia/mediawiki-extensions-Lingo/build-status/master)
+[![Build 
Status](https://travis-ci.org/wikimedia/mediawiki-extensions-Lingo.svg?branch=master)](https://travis-ci.org/wikimedia/mediawiki-extensions-Lingo)
 [![Code 
Coverage](https://scrutinizer-ci.com/g/wikimedia/mediawiki-extensions-Lingo/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/wikimedia/mediawiki-extensions-Lingo/?branch=master)
-[![Scrutinizer Code 
Quality](https://scrutinizer-ci.com/g/wikimedia/mediawiki-extensions-Lingo/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/wikimedia/mediawiki-extensions-Lingo/?branch=master)
+[![Code 
Quality](https://scrutinizer-ci.com/g/wikimedia/mediawiki-extensions-Lingo/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/wikimedia/mediawiki-extensions-Lingo/?branch=master)
 [![Dependency 
Status](https://www.versioneye.com/php/mediawiki:lingo/badge.png)](https://www.versioneye.com/php/mediawiki:lingo)
 [![Latest Stable 
Version](https://poser.pugx.org/mediawiki/lingo/version.png)](https://packagist.org/packages/mediawiki/lingo)
 [![Packagist download 
count](https://poser.pugx.org/mediawiki/lingo/d/total.png)](https://packagist.org/packages/mediawiki/lingo)
diff --git a/build/travis/script.sh b/build/travis/script.sh
index 617264c..e08b10c 100755
--- a/build/travis/script.sh
+++ b/build/travis/script.sh
@@ -96,6 +96,8 @@
 if [ "$MW" == "master" ]
 then
php ../../tests/phpunit/phpunit.php --group extensions-lingo -c 
phpunit.xml.dist --coverage-clover=coverage.clover
+
+   set +e
uploadCoverageReport
 else
php ../../tests/phpunit/phpunit.php --group extensions-lingo -c 
phpunit.xml.dist

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7940069f708bae5d702c00407ba46a6e11f5714e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Lingo
Gerrit-Branch: master
Gerrit-Owner: Foxtrott 
Gerrit-Reviewer: Foxtrott 

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


[MediaWiki-commits] [Gerrit] Avoid test fail when Scrutinizer is down - change (mediawiki...Lingo)

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

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

Change subject: Avoid test fail when Scrutinizer is down
..

Avoid test fail when Scrutinizer is down

Change-Id: I7940069f708bae5d702c00407ba46a6e11f5714e
---
M README.md
M build/travis/script.sh
2 files changed, 4 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Lingo 
refs/changes/00/275200/1

diff --git a/README.md b/README.md
index ea5f97a..2d1837f 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,7 @@
 # Lingo
-[![Build 
Status](https://scrutinizer-ci.com/g/wikimedia/mediawiki-extensions-Lingo/badges/build.png?b=master)](https://scrutinizer-ci.com/g/wikimedia/mediawiki-extensions-Lingo/build-status/master)
+[![Build 
Status](https://travis-ci.org/wikimedia/mediawiki-extensions-Lingo.svg?branch=master)](https://travis-ci.org/wikimedia/mediawiki-extensions-Lingo)
 [![Code 
Coverage](https://scrutinizer-ci.com/g/wikimedia/mediawiki-extensions-Lingo/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/wikimedia/mediawiki-extensions-Lingo/?branch=master)
-[![Scrutinizer Code 
Quality](https://scrutinizer-ci.com/g/wikimedia/mediawiki-extensions-Lingo/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/wikimedia/mediawiki-extensions-Lingo/?branch=master)
+[![Code 
Quality](https://scrutinizer-ci.com/g/wikimedia/mediawiki-extensions-Lingo/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/wikimedia/mediawiki-extensions-Lingo/?branch=master)
 [![Dependency 
Status](https://www.versioneye.com/php/mediawiki:lingo/badge.png)](https://www.versioneye.com/php/mediawiki:lingo)
 [![Latest Stable 
Version](https://poser.pugx.org/mediawiki/lingo/version.png)](https://packagist.org/packages/mediawiki/lingo)
 [![Packagist download 
count](https://poser.pugx.org/mediawiki/lingo/d/total.png)](https://packagist.org/packages/mediawiki/lingo)
diff --git a/build/travis/script.sh b/build/travis/script.sh
index 617264c..e08b10c 100755
--- a/build/travis/script.sh
+++ b/build/travis/script.sh
@@ -96,6 +96,8 @@
 if [ "$MW" == "master" ]
 then
php ../../tests/phpunit/phpunit.php --group extensions-lingo -c 
phpunit.xml.dist --coverage-clover=coverage.clover
+
+   set +e
uploadCoverageReport
 else
php ../../tests/phpunit/phpunit.php --group extensions-lingo -c 
phpunit.xml.dist

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7940069f708bae5d702c00407ba46a6e11f5714e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Lingo
Gerrit-Branch: master
Gerrit-Owner: Foxtrott 

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


[MediaWiki-commits] [Gerrit] JSCS: use preferred value for 'requireCamelCaseOrUpperCaseId... - change (rcstream)

2016-03-05 Thread Ricordisamoa (Code Review)
Ricordisamoa has uploaded a new change for review.

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

Change subject: JSCS: use preferred value for 
'requireCamelCaseOrUpperCaseIdentifiers' rule
..

JSCS: use preferred value for 'requireCamelCaseOrUpperCaseIdentifiers' rule

As stated at http://jscs.info/rule/requireCamelCaseOrUpperCaseIdentifiers
the "ignoreProperties" value is deprecated, an object with "ignoreProperties"
as a key should be used instead.

Change-Id: I121ae6cb65a6f5f2a44589e77462089f42531ccc
---
M .jscsrc
1 file changed, 3 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/rcstream refs/changes/01/275201/1

diff --git a/.jscsrc b/.jscsrc
index dae9c42..2966034 100644
--- a/.jscsrc
+++ b/.jscsrc
@@ -1,5 +1,7 @@
 {
"preset": "node-style-guide",
 
-   "requireCamelCaseOrUpperCaseIdentifiers": "ignoreProperties"
+   "requireCamelCaseOrUpperCaseIdentifiers": {
+   "ignoreProperties": true
+   }
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I121ae6cb65a6f5f2a44589e77462089f42531ccc
Gerrit-PatchSet: 1
Gerrit-Project: rcstream
Gerrit-Branch: master
Gerrit-Owner: Ricordisamoa 

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


[MediaWiki-commits] [Gerrit] Travis setup improvements; documentation - change (mediawiki...Lingo)

2016-03-05 Thread Foxtrott (Code Review)
Foxtrott has submitted this change and it was merged.

Change subject: Travis setup improvements; documentation
..


Travis setup improvements; documentation

Change-Id: Ifab7c71fb9be47bcb31015aa72c539a699eefeb5
---
M .travis.yml
M README.md
M build/travis/script.sh
3 files changed, 10 insertions(+), 19 deletions(-)

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



diff --git a/.travis.yml b/.travis.yml
index c89d7ef..b40ba4e 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -24,16 +24,15 @@
 #
 
 language: php
-#sudo: false
 
 matrix:
   include:
 - env: DBTYPE=mysql; MW=master
   php: 5.6
-#- env: DBTYPE=postgres; MW=master
-#  php: 5.5
-#- env: DBTYPE=sqlite; MW=1.25.5
-#  php: 5.3
+- env: DBTYPE=postgres; MW=master
+  php: 5.5
+- env: DBTYPE=sqlite; MW=1.26.0
+  php: 5.3
 
 script:
 - bash ./build/travis/script.sh
diff --git a/README.md b/README.md
index 3d79669..ea5f97a 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,10 @@
 # Lingo
+[![Build 
Status](https://scrutinizer-ci.com/g/wikimedia/mediawiki-extensions-Lingo/badges/build.png?b=master)](https://scrutinizer-ci.com/g/wikimedia/mediawiki-extensions-Lingo/build-status/master)
+[![Code 
Coverage](https://scrutinizer-ci.com/g/wikimedia/mediawiki-extensions-Lingo/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/wikimedia/mediawiki-extensions-Lingo/?branch=master)
+[![Scrutinizer Code 
Quality](https://scrutinizer-ci.com/g/wikimedia/mediawiki-extensions-Lingo/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/wikimedia/mediawiki-extensions-Lingo/?branch=master)
+[![Dependency 
Status](https://www.versioneye.com/php/mediawiki:lingo/badge.png)](https://www.versioneye.com/php/mediawiki:lingo)
 [![Latest Stable 
Version](https://poser.pugx.org/mediawiki/lingo/version.png)](https://packagist.org/packages/mediawiki/lingo)
 [![Packagist download 
count](https://poser.pugx.org/mediawiki/lingo/d/total.png)](https://packagist.org/packages/mediawiki/lingo)
-[![Dependency 
Status](https://www.versioneye.com/php/mediawiki:lingo/badge.png)](https://www.versioneye.com/php/mediawiki:lingo)
 
 Lingo is a glossary extension to MediaWiki, that lets you define abbreviations
 and their definitions on a wiki page. It displays these definitions whenever an
diff --git a/build/travis/script.sh b/build/travis/script.sh
index 4612753..617264c 100755
--- a/build/travis/script.sh
+++ b/build/travis/script.sh
@@ -42,11 +42,7 @@
 
cd mw
 
-   ## MW 1.25+ installs packages using composer
-   if [ -f composer.json ]
-   then
-   composer install --prefer-source
-   fi
+   composer install --prefer-source
 
mysql -e 'create database its_a_mw;'
php maintenance/install.php --dbtype $DBTYPE --dbuser root --dbname 
its_a_mw --dbpath $(pwd) --pass nyan TravisWiki admin
@@ -54,14 +50,7 @@
 
 function installExtensionViaComposerOnMediaWikiRoot {
 
-   if [ ! -f composer.json ]
-   then
-   composer init
-   fi
-
-   composer remove --dev --update-with-dependencies 'phpunit/phpunit'
-   composer require 'composer/installers=>1.0.12'
-   composer require 'phpunit/phpunit=~4.0' 'mediawiki/lingo=@dev' 
--prefer-source
+   composer require --prefer-source --dev --update-with-dependencies 
'phpunit/phpunit=~4.0' 'mediawiki/lingo=@dev'
 
cd extensions/Lingo
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ifab7c71fb9be47bcb31015aa72c539a699eefeb5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Lingo
Gerrit-Branch: master
Gerrit-Owner: Foxtrott 
Gerrit-Reviewer: Foxtrott 

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


[MediaWiki-commits] [Gerrit] Travis setup improvements; documentation - change (mediawiki...Lingo)

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

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

Change subject: Travis setup improvements; documentation
..

Travis setup improvements; documentation

Change-Id: Ifab7c71fb9be47bcb31015aa72c539a699eefeb5
---
M .travis.yml
M README.md
M build/travis/script.sh
3 files changed, 10 insertions(+), 19 deletions(-)


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

diff --git a/.travis.yml b/.travis.yml
index c89d7ef..b40ba4e 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -24,16 +24,15 @@
 #
 
 language: php
-#sudo: false
 
 matrix:
   include:
 - env: DBTYPE=mysql; MW=master
   php: 5.6
-#- env: DBTYPE=postgres; MW=master
-#  php: 5.5
-#- env: DBTYPE=sqlite; MW=1.25.5
-#  php: 5.3
+- env: DBTYPE=postgres; MW=master
+  php: 5.5
+- env: DBTYPE=sqlite; MW=1.26.0
+  php: 5.3
 
 script:
 - bash ./build/travis/script.sh
diff --git a/README.md b/README.md
index 3d79669..ea5f97a 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,10 @@
 # Lingo
+[![Build 
Status](https://scrutinizer-ci.com/g/wikimedia/mediawiki-extensions-Lingo/badges/build.png?b=master)](https://scrutinizer-ci.com/g/wikimedia/mediawiki-extensions-Lingo/build-status/master)
+[![Code 
Coverage](https://scrutinizer-ci.com/g/wikimedia/mediawiki-extensions-Lingo/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/wikimedia/mediawiki-extensions-Lingo/?branch=master)
+[![Scrutinizer Code 
Quality](https://scrutinizer-ci.com/g/wikimedia/mediawiki-extensions-Lingo/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/wikimedia/mediawiki-extensions-Lingo/?branch=master)
+[![Dependency 
Status](https://www.versioneye.com/php/mediawiki:lingo/badge.png)](https://www.versioneye.com/php/mediawiki:lingo)
 [![Latest Stable 
Version](https://poser.pugx.org/mediawiki/lingo/version.png)](https://packagist.org/packages/mediawiki/lingo)
 [![Packagist download 
count](https://poser.pugx.org/mediawiki/lingo/d/total.png)](https://packagist.org/packages/mediawiki/lingo)
-[![Dependency 
Status](https://www.versioneye.com/php/mediawiki:lingo/badge.png)](https://www.versioneye.com/php/mediawiki:lingo)
 
 Lingo is a glossary extension to MediaWiki, that lets you define abbreviations
 and their definitions on a wiki page. It displays these definitions whenever an
diff --git a/build/travis/script.sh b/build/travis/script.sh
index 4612753..617264c 100755
--- a/build/travis/script.sh
+++ b/build/travis/script.sh
@@ -42,11 +42,7 @@
 
cd mw
 
-   ## MW 1.25+ installs packages using composer
-   if [ -f composer.json ]
-   then
-   composer install --prefer-source
-   fi
+   composer install --prefer-source
 
mysql -e 'create database its_a_mw;'
php maintenance/install.php --dbtype $DBTYPE --dbuser root --dbname 
its_a_mw --dbpath $(pwd) --pass nyan TravisWiki admin
@@ -54,14 +50,7 @@
 
 function installExtensionViaComposerOnMediaWikiRoot {
 
-   if [ ! -f composer.json ]
-   then
-   composer init
-   fi
-
-   composer remove --dev --update-with-dependencies 'phpunit/phpunit'
-   composer require 'composer/installers=>1.0.12'
-   composer require 'phpunit/phpunit=~4.0' 'mediawiki/lingo=@dev' 
--prefer-source
+   composer require --prefer-source --dev --update-with-dependencies 
'phpunit/phpunit=~4.0' 'mediawiki/lingo=@dev'
 
cd extensions/Lingo
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifab7c71fb9be47bcb31015aa72c539a699eefeb5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Lingo
Gerrit-Branch: master
Gerrit-Owner: Foxtrott 

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


[MediaWiki-commits] [Gerrit] [WIP/UNTESTED?] Version 4.2.0: comments of the day cleaned u... - change (mediawiki...Comments)

2016-03-05 Thread Jack Phoenix (Code Review)
Jack Phoenix has uploaded a new change for review.

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

Change subject: [WIP/UNTESTED?] Version 4.2.0: comments of the day cleaned up & 
unconditionally enabled
..

[WIP/UNTESTED?] Version 4.2.0: comments of the day cleaned up & unconditionally 
enabled

This should allow us to reduce the amount of code duplication in BlogPage
by calling CommentsOfTheDay::get( $skipCache = false, $cacheTime = time()
- ( 60 * 60 * 24 ), array( 'page_namespace' => NS_BLOG ) ) in 
BlogPage::getCommentsOfTheDay().
At least in theory. In practise I see that the current (broken) implementation 
in BlogPage::getCommentsOfTheDay() pulls page.page_title and 
page.page_namespace whereas CommentsOfTheDay::get() does not nor does it allow 
a caller to do so. Maybe we can change its signature to accept a $what in 
addition to $where.

Bug: T100024
Bug: T100025
Change-Id: I701f8f72e3fb718e14a7bc0ed6c5819112db42e3
---
M Comments.php
M CommentsOfTheDay.php
M extension.json
3 files changed, 112 insertions(+), 196 deletions(-)


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

diff --git a/Comments.php b/Comments.php
index 556a66c..0172217 100644
--- a/Comments.php
+++ b/Comments.php
@@ -12,112 +12,14 @@
  * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 
2.0 or later
  */
 
-/**
- * Protect against register_globals vulnerabilities.
- * This line must be present before any global variable is referenced.
- */
-if ( !defined( 'MEDIAWIKI' ) ) {
-   die( "This is not a valid entry point.\n" );
-}
-
-// Extension credits that will show up on Special:Version
-$wgExtensionCredits['parserhook'][] = array(
-   'path' => __FILE__,
-   'name' => 'Comments',
-   'version' => '4.1.1',
-   'author' => array( 'David Pean', 'Misza', 'Jack Phoenix', 'Adam 
Carter/UltrasonicNXT' ),
-   'descriptionmsg' => 'comments-desc',
-   'url' => 'https://www.mediawiki.org/wiki/Extension:Comments'
-);
-
-// ResourceLoader support for MediaWiki 1.17+
-$wgResourceModules['ext.comments.css'] = array(
-   'styles' => 'Comments.css',
-   'localBasePath' => __DIR__,
-   'remoteExtPath' => 'Comments',
-   'position' => 'top' // available since r85616
-);
-
-$wgResourceModules['ext.comments.js'] = array(
-   'scripts' => 'Comment.js',
-   'messages' => array(
-   'comments-voted-label', 'comments-loading',
-   'comments-auto-refresher-pause', 
'comments-auto-refresher-enable',
-   'comments-cancel-reply', 'comments-reply-to',
-   'comments-block-warning-anon', 'comments-block-warning-user',
-   'comments-delete-warning'
-   ),
-   'localBasePath' => __DIR__,
-   'remoteExtPath' => 'Comments'
-);
-
-# Configuration variables
-// Path to an image which will be displayed instead of an avatar if social 
tools aren't installed.
-// Should be 50x50px
-$wgCommentsDefaultAvatar = 
'http://www.shoutwiki.com/w/extensions/SocialProfile/avatars/default_ml.gif';
-$wgCommentsSortDescending = false;
-
-// New user rights
-$wgAvailableRights[] = 'comment';
-$wgAvailableRights[] = 'commentadmin';
-$wgAvailableRights[] = 'commentlinks';
-// Allows everyone, including unregistered users, to comment
-$wgGroupPermissions['*']['comment'] = true;
-// Allows users in the commentadmin group to administrate comments (incl. 
comment deletion)
-$wgGroupPermissions['commentadmin']['commentadmin'] = true;
-// Allows autoconfirmed users to use external links in comments
-$wgGroupPermissions['autoconfirmed']['commentlinks'] = true;
-
-// Set up the new special pages
-$dir = __DIR__ . '/';
-$wgMessagesDirs['Comments'] = __DIR__ . '/i18n';
-$wgExtensionMessagesFiles['CommentsMagic'] = __DIR__ . 
'/Comments.i18n.magic.php';
-$wgAutoloadClasses['Comment'] = __DIR__ . '/CommentClass.php';
-$wgAutoloadClasses['CommentsPage'] = __DIR__ . '/CommentsPage.php';
-$wgAutoloadClasses['CommentFunctions'] = __DIR__ . '/CommentFunctions.php';
-$wgAutoloadClasses['CommentIgnoreList'] = __DIR__ . 
'/SpecialCommentIgnoreList.php';
-$wgSpecialPages['CommentIgnoreList'] = 'CommentIgnoreList';
-
-$wgAutoloadClasses['CommentsLogFormatter'] = __DIR__ . 
'/CommentsLogFormatter.php';
-// Add a new log type
-$wgLogTypes[] = 'comments';
-// Default log formatter doesn't support wikilinks (?!?) so we have to have
-// our own formatter here :-(
-$wgLogActionsHandlers['comments/add'] = 'CommentsLogFormatter';
-// For the delete action, we don't need nor /want/ the fragment in the page 
link,
-// because the fragment points to the comment we just deleted! Hence we can use
-// core LogFormatter as-is instead of our custom class. Fun!
-$wgLogActionsHandlers['comments/delete'] = 'LogFormatter';
-// This hides comment log entries from Special:Log, much like how patrol stuff
-// is hidden by default, but can be enabled via a link
-$wgFilterLogT

[MediaWiki-commits] [Gerrit] [WIP/UNTESTED?] Version 4.2.0: comments of the day cleaned u... - change (mediawiki...Comments)

2016-03-05 Thread Jack Phoenix (Code Review)
Jack Phoenix has uploaded a new change for review.

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

Change subject: [WIP/UNTESTED?] Version 4.2.0: comments of the day cleaned up & 
unconditionally enabled
..

[WIP/UNTESTED?] Version 4.2.0: comments of the day cleaned up & unconditionally 
enabled

This should allow us to reduce the amount of code duplication in BlogPage
by calling CommentsOfTheDay::get( $skipCache = false, $cacheTime = time()
- ( 60 * 60 * 24 ), array( 'page_namespace' => NS_BLOG ) ) in 
BlogPage::getCommentsOfTheDay().
At least in theory. In practise I see that the current (broken)
implementation in BlogPage::getCommentsOfTheDay() pulls page.page_title
and page.page_namespace whereas CommentsOfTheDay::get() does not nor does
it allow a caller to do so. Maybe we can change its signature to accept a
$what in addition to $where.

Bug: T100024
Bug: T100025
Change-Id: Ic3329d2909b7eb36d52019e5aa35bce6e8c4a90f
---
M Comments.php
M CommentsOfTheDay.php
M extension.json
3 files changed, 105 insertions(+), 97 deletions(-)


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

diff --git a/Comments.php b/Comments.php
index 7a18ba5..cf5f65a 100644
--- a/Comments.php
+++ b/Comments.php
@@ -12,19 +12,11 @@
  * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 
2.0 or later
  */
 
-/**
- * Protect against register_globals vulnerabilities.
- * This line must be present before any global variable is referenced.
- */
-if ( !defined( 'MEDIAWIKI' ) ) {
-   die( "This is not a valid entry point.\n" );
-}
-
 // Extension credits that will show up on Special:Version
 $wgExtensionCredits['parserhook'][] = array(
'path' => __FILE__,
'name' => 'Comments',
-   'version' => '4.1.0',
+   'version' => '4.2.0',
'author' => array( 'David Pean', 'Misza', 'Jack Phoenix', 'Adam 
Carter/UltrasonicNXT' ),
'descriptionmsg' => 'comments-desc',
'url' => 'https://www.mediawiki.org/wiki/Extension:Comments'
@@ -69,11 +61,11 @@
 $wgGroupPermissions['autoconfirmed']['commentlinks'] = true;
 
 // Set up the new special pages
-$dir = __DIR__ . '/';
 $wgMessagesDirs['Comments'] = __DIR__ . '/i18n';
 $wgExtensionMessagesFiles['CommentsMagic'] = __DIR__ . 
'/Comments.i18n.magic.php';
 $wgAutoloadClasses['Comment'] = __DIR__ . '/CommentClass.php';
 $wgAutoloadClasses['CommentsPage'] = __DIR__ . '/CommentsPage.php';
+$wgAutoloadClasses['CommentsOfTheDay'] = __DIR__ . '/CommentsOfTheDay.php';
 $wgAutoloadClasses['CommentFunctions'] = __DIR__ . '/CommentFunctions.php';
 $wgAutoloadClasses['CommentIgnoreList'] = __DIR__ . 
'/SpecialCommentIgnoreList.php';
 $wgSpecialPages['CommentIgnoreList'] = 'CommentIgnoreList';
@@ -104,6 +96,8 @@
 $wgHooks['MagicWordwgVariableIDs'][] = 
'NumberOfComments::registerNumberOfCommentsMagicWord';
 $wgHooks['ParserGetVariableValueSwitch'][] = 
'NumberOfComments::getNumberOfCommentsMagic';
 
+$wgHooks['ParserFirstCallInit'][] = 'CommentsOfTheDay::registerTag';
+
 // NumberOfComments magic word setup
 $wgAutoloadClasses['NumberOfComments'] = __DIR__ . '/NumberOfComments.php';
 $wgExtensionMessagesFiles['NumberOfCommentsMagic'] = __DIR__ . 
'/Comments.i18n.magic.php';
diff --git a/CommentsOfTheDay.php b/CommentsOfTheDay.php
index ef3d9b3..1ad8440 100644
--- a/CommentsOfTheDay.php
+++ b/CommentsOfTheDay.php
@@ -5,102 +5,113 @@
  *
  * @file
  * @ingroup Extensions
- * @date 21 September 2014
+ * @date 27 November 2015
  */
-if ( !defined( 'MEDIAWIKI' ) ) {
-   die();
-}
 
-$wgHooks['ParserFirstCallInit'][] = 'wfCommentsOfTheDay';
+class CommentsOfTheDay {
 
-/**
- * Register the new  parser hook with the Parser.
- *
- * @param Parser $parser Instance of Parser
- * @return bool
- */
-function wfCommentsOfTheDay( &$parser ) {
-   $parser->setHook( 'commentsoftheday', 'getCommentsOfTheDay' );
-   return true;
-}
+   /**
+* Register the new  parser hook with the Parser.
+*
+* @param Parser $parser Instance of Parser
+* @return bool
+*/
+   public static function registerTag( &$parser ) {
+   $parser->setHook( 'commentsoftheday', array( __CLASS__, 
'getHTML' ) );
+   return true;
+   }
 
-/**
- * Get comments of the day -- five newest comments within the last 24 hours
- *
- * @return string HTML
- */
-function getCommentsOfTheDay( $input, $args, $parser ) {
-   global $wgMemc;
+   /**
+* Get comments of the day -- five newest comments within the last 24 
hours
+*
+* @return string HTML
+*/
+   public static function getHTML( $input, $args, $parser ) {
+   $comments = self::get( (bool)$args['nocache'] );
+   $commentOutput = '';
 
-   $oneDay = 60 * 60 * 24;
-
-   // Try memcached first
-   $key = wfMemcKey( 'comments-of-the-day', 'standalone-hook-new' );
-   $data = $wgM

[MediaWiki-commits] [Gerrit] Properly register the namespaces in extension.json - change (mediawiki...BlogPage)

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

Change subject: Properly register the namespaces in extension.json
..


Properly register the namespaces in extension.json

Change-Id: I9553e80a74417fe137ceb32f9dbd2bdaf65b19c6
---
M extension.json
1 file changed, 13 insertions(+), 0 deletions(-)

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



diff --git a/extension.json b/extension.json
index f6f5861..b496c23 100644
--- a/extension.json
+++ b/extension.json
@@ -8,6 +8,19 @@
"url": "https://www.mediawiki.org/wiki/Extension:BlogPage";,
"descriptionmsg": "blogpage-desc",
"type": "other",
+   "namespaces": [
+   {
+   "id": 500,
+   "constant": "NS_BLOG",
+   "name": "Blog",
+   "protection": "edit"
+   },
+   {
+   "id": 501,
+   "constant": "NS_BLOG_TALK",
+   "name": "Blog_talk"
+   }
+   ],
"config": {
"BlogPageDisplay": {
"leftcolumn": true,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9553e80a74417fe137ceb32f9dbd2bdaf65b19c6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlogPage
Gerrit-Branch: master
Gerrit-Owner: Jack Phoenix 
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] Properly register the namespaces in extension.json - change (mediawiki...BlogPage)

2016-03-05 Thread Jack Phoenix (Code Review)
Jack Phoenix has uploaded a new change for review.

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

Change subject: Properly register the namespaces in extension.json
..

Properly register the namespaces in extension.json

Change-Id: I9553e80a74417fe137ceb32f9dbd2bdaf65b19c6
---
M extension.json
1 file changed, 13 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlogPage 
refs/changes/96/275196/1

diff --git a/extension.json b/extension.json
index f6f5861..b496c23 100644
--- a/extension.json
+++ b/extension.json
@@ -8,6 +8,19 @@
"url": "https://www.mediawiki.org/wiki/Extension:BlogPage";,
"descriptionmsg": "blogpage-desc",
"type": "other",
+   "namespaces": [
+   {
+   "id": 500,
+   "constant": "NS_BLOG",
+   "name": "Blog",
+   "protection": "edit"
+   },
+   {
+   "id": 501,
+   "constant": "NS_BLOG_TALK",
+   "name": "Blog_talk"
+   }
+   ],
"config": {
"BlogPageDisplay": {
"leftcolumn": true,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9553e80a74417fe137ceb32f9dbd2bdaf65b19c6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlogPage
Gerrit-Branch: master
Gerrit-Owner: Jack Phoenix 

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


[MediaWiki-commits] [Gerrit] Version 2.4.1: AJAX stuff replaced by an API module - change (mediawiki...BlogPage)

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

Change subject: Version 2.4.1: AJAX stuff replaced by an API module
..


Version 2.4.1: AJAX stuff replaced by an API module

Because it's so much "better" to have a 50+ line wrapper around a simple
function than just calling the function directly...
A more practical reason for this is that extension.json doesn't
(intentionally) support $wgAjaxExportList, so before this change, if
anyone used wfLoadExtension( 'BlogPage' ); Special:CreateBlogPost wouldn't
have worked correctly and submitting new blog posts would've been
impossible.

Change-Id: I82f57eb04f53f0d778ff0953ef8cc705b11ac757
---
A ApiBlogPage.php
M BlogPage.php
M extension.json
M i18n/en.json
M resources/js/CreateBlogPost.js
5 files changed, 71 insertions(+), 13 deletions(-)

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



diff --git a/ApiBlogPage.php b/ApiBlogPage.php
new file mode 100644
index 000..62a3c87
--- /dev/null
+++ b/ApiBlogPage.php
@@ -0,0 +1,53 @@
+https://www.mediawiki.org/wiki/API:Extensions#ApiSampleApiExtension.php
+ */
+class ApiBlogPage extends ApiBase {
+
+   /**
+* Main entry point.
+*/
+   public function execute() {
+   // Get the request parameters
+   $params = $this->extractRequestParams();
+
+   $pageName = $params['pageName'];
+   $output = SpecialCreateBlogPost::checkTitleExistence( $pageName 
);
+
+   // Top level
+   $this->getResult()->addValue( null, $this->getModuleName(),
+   array( 'result' => $output )
+   );
+
+   return true;
+   }
+
+   /**
+* @return array
+*/
+   public function getAllowedParams() {
+   return array(
+   'pageName' => array(
+   ApiBase::PARAM_TYPE => 'string',
+   ApiBase::PARAM_REQUIRED => true
+   )
+   );
+   }
+
+   /**
+* @see ApiBase::getExamplesMessages()
+*/
+   protected function getExamplesMessages() {
+   return array(
+   
'action=blogpage&pageName=My%20Cool%20New%20Blog%20Post' => 
'apihelp-blogpage-example-1'
+   );
+   }
+}
diff --git a/BlogPage.php b/BlogPage.php
index 017d981..6a34e4e 100644
--- a/BlogPage.php
+++ b/BlogPage.php
@@ -5,7 +5,6 @@
  *
  * @file
  * @ingroup Extensions
- * @version 2.3.2
  * @author David Pean 
  * @author Jack Phoenix 
  * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 
2.0 or later
@@ -15,7 +14,7 @@
 // Extension credits that will show up on Special:Version
 $wgExtensionCredits['other'][] = array(
'name' => 'BlogPage',
-   'version' => '2.4.0',
+   'version' => '2.4.1',
'author' => array( 'David Pean', 'Jack Phoenix' ),
'descriptionmsg' => 'blogpage-desc',
'url' => 'https://www.mediawiki.org/wiki/Extension:BlogPage',
@@ -124,7 +123,9 @@
 $wgAutoloadClasses['SpecialCreateBlogPost'] = __DIR__ . 
'/SpecialCreateBlogPost.php';
 $wgSpecialPages['CreateBlogPost'] = 'SpecialCreateBlogPost';
 
-$wgAjaxExportList[] = 'SpecialCreateBlogPost::checkTitleExistence';
+// Load the API module
+$wgAutoloadClasses['ApiBlogPage'] = __DIR__ . '/ApiBlogPage.php';
+$wgAPIModules['blogpage'] = 'ApiBlogPage';
 
 // New user right, required to create new blog posts via the new special page
 $wgAvailableRights[] = 'createblogpost';
diff --git a/extension.json b/extension.json
index 697ff5b..f6f5861 100644
--- a/extension.json
+++ b/extension.json
@@ -1,6 +1,6 @@
 {
"name": "BlogPage",
-   "version": "2.4.0",
+   "version": "2.4.1",
"author": [
"David Pean",
"Jack Phoenix"
@@ -9,9 +9,6 @@
"descriptionmsg": "blogpage-desc",
"type": "other",
"config": {
-   "AjaxExportList": [
-   "SpecialCreateBlogPost::checkTitleExistence"
-   ],
"BlogPageDisplay": {
"leftcolumn": true,
"rightcolumn": true,
@@ -31,7 +28,11 @@
"articles": true
}
},
+   "APIModules": {
+   "blogpage": "ApiBlogPage"
+   },
"AutoloadClasses": {
+   "ApiBlogPage": "ApiBlogPage.php",
"BlogPage": "BlogPageClass.php",
"ArticlesHome": "SpecialArticlesHome.php",
"ArticleLists": "SpecialArticleLists.php",
diff --git a/i18n/en.json b/i18n/en.json
index fc6ce60..43aa24b 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -5,6 +5,9 @@
]
},
"blogpage-desc": "Blogging system with commenting and voting features, 
[[Special:CreateBlogPost|a special page to create blog posts]] and 
[[Special:

[MediaWiki-commits] [Gerrit] [ActiveAbstract] Enable extension, has i18n file now - change (translatewiki)

2016-03-05 Thread Raimond Spekking (Code Review)
Raimond Spekking has submitted this change and it was merged.

Change subject: [ActiveAbstract] Enable extension, has i18n file now
..


[ActiveAbstract] Enable extension, has i18n file now

https://gerrit.wikimedia.org/r/#/c/274141/

Change-Id: I014ac84e84d1e958ae588aaf3670d5cfb23605fe
---
M groups/MediaWiki/mediawiki-extensions.txt
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/groups/MediaWiki/mediawiki-extensions.txt 
b/groups/MediaWiki/mediawiki-extensions.txt
index 79b2778..ca0ab86 100644
--- a/groups/MediaWiki/mediawiki-extensions.txt
+++ b/groups/MediaWiki/mediawiki-extensions.txt
@@ -20,7 +20,7 @@
 
 Action Edit Submit
 
-# Active Abstract : No real extension. Plugin for dumpBackup.php
+Active Abstract
 
 Activity Monitor
 aliasfile = ActivityMonitor/ActivityMonitor.i18n.alias.php

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

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

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


[MediaWiki-commits] [Gerrit] [ActiveAbstract] Enable extension, has i18n file now - change (translatewiki)

2016-03-05 Thread Raimond Spekking (Code Review)
Raimond Spekking has uploaded a new change for review.

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

Change subject: [ActiveAbstract] Enable extension, has i18n file now
..

[ActiveAbstract] Enable extension, has i18n file now

https://gerrit.wikimedia.org/r/#/c/274141/

Change-Id: I014ac84e84d1e958ae588aaf3670d5cfb23605fe
---
M groups/MediaWiki/mediawiki-extensions.txt
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/translatewiki 
refs/changes/95/275195/1

diff --git a/groups/MediaWiki/mediawiki-extensions.txt 
b/groups/MediaWiki/mediawiki-extensions.txt
index 79b2778..ca0ab86 100644
--- a/groups/MediaWiki/mediawiki-extensions.txt
+++ b/groups/MediaWiki/mediawiki-extensions.txt
@@ -20,7 +20,7 @@
 
 Action Edit Submit
 
-# Active Abstract : No real extension. Plugin for dumpBackup.php
+Active Abstract
 
 Activity Monitor
 aliasfile = ActivityMonitor/ActivityMonitor.i18n.alias.php

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

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

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


[MediaWiki-commits] [Gerrit] Auto-convert pasted ref tags - change (mediawiki...Cite)

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

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

Change subject: Auto-convert pasted ref tags
..

Auto-convert pasted ref tags

Change-Id: I44fb2b8913fb9bef7d984f86b3579e82b29d0cf0
Depends-On: I7a38db45d25e86ff3f3f6199aa04425ec98f7cc4
---
M modules/ve-cite/ve.ui.MWReferenceDialogTool.js
1 file changed, 2 insertions(+), 0 deletions(-)


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

diff --git a/modules/ve-cite/ve.ui.MWReferenceDialogTool.js 
b/modules/ve-cite/ve.ui.MWReferenceDialogTool.js
index 00c8477..7b00e12 100644
--- a/modules/ve-cite/ve.ui.MWReferenceDialogTool.js
+++ b/modules/ve-cite/ve.ui.MWReferenceDialogTool.js
@@ -68,6 +68,8 @@
label: OO.ui.deferMsg( 'cite-ve-dialog-reference-title' )
 } );
 
+ve.ui.mwWikitextTransferRegistry.register( 'reference', /]+>/ );
+
 /**
  * MediaWiki UserInterface references list tool.
  *

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I44fb2b8913fb9bef7d984f86b3579e82b29d0cf0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Cite
Gerrit-Branch: master
Gerrit-Owner: Esanders 

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


[MediaWiki-commits] [Gerrit] Wikitext paste: Move MWWikitextStringTransferHandler matchRe... - change (mediawiki...VisualEditor)

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

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

Change subject: Wikitext paste: Move MWWikitextStringTransferHandler 
matchRegExp into a registry
..

Wikitext paste: Move MWWikitextStringTransferHandler matchRegExp into a registry

This allows extensions to register their own rules for detecting wikitext,
e.g. matching ''.

Bonus: Strip the autogenerated  tag which
gets inserted when converting a .

Change-Id: I7a38db45d25e86ff3f3f6199aa04425ec98f7cc4
---
M extension.json
M modules/ve-mw/ui/datatransferhandlers/ve.ui.MWWikitextStringTransferHandler.js
A modules/ve-mw/ui/ve.ui.MWWikitextTransferRegistry.js
3 files changed, 52 insertions(+), 12 deletions(-)


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

diff --git a/extension.json b/extension.json
index 118674a..b1b678a 100644
--- a/extension.json
+++ b/extension.json
@@ -1072,6 +1072,7 @@
"modules/ve-mw/ui/ve.ui.MWCommandRegistry.js",
"modules/ve-mw/ui/ve.ui.MWSequenceRegistry.js",
"modules/ve-mw/ui/ve.ui.MWExtensionWindow.js",
+   
"modules/ve-mw/ui/ve.ui.MWWikitextTransferRegistry.js",

"modules/ve-mw/ui/commands/ve.ui.MWWikitextWarningCommand.js",

"modules/ve-mw/ui/datatransferhandlers/ve.ui.MWWikitextStringTransferHandler.js",

"modules/ve-mw/ui/widgets/ve.ui.MWAceEditorWidget.js",
diff --git 
a/modules/ve-mw/ui/datatransferhandlers/ve.ui.MWWikitextStringTransferHandler.js
 
b/modules/ve-mw/ui/datatransferhandlers/ve.ui.MWWikitextStringTransferHandler.js
index 19e18f1..6b48fc0 100644
--- 
a/modules/ve-mw/ui/datatransferhandlers/ve.ui.MWWikitextStringTransferHandler.js
+++ 
b/modules/ve-mw/ui/datatransferhandlers/ve.ui.MWWikitextStringTransferHandler.js
@@ -39,17 +39,12 @@
 ve.ui.MWWikitextStringTransferHandler.static.handlesPaste = true;
 
 /**
- * Heuristic pattern which attempts to discover wikitext, without
- * incurring too many false positives.
- *
- * Currently the pattern looks for ==...==, [[...]], or {{...}}
- * which occur on a single line of max 80 characters.
+ * @inheritdoc
  */
-ve.ui.MWWikitextStringTransferHandler.static.matchRegExp =
-   /(^\s*(={2,6})[^=\r\n]{1,80}\2\s*$)|\[\[.{1,80}\]\]|\{\{.{1,80}\}\}/m;
-
 ve.ui.MWWikitextStringTransferHandler.static.matchFunction = function ( item ) 
{
-   var text = item.getAsString();
+   var i, rule,
+   text = item.getAsString(),
+   registry = ve.ui.mwWikitextTransferRegistry;
 
// If the mime type is explicitly wikitext (ie, not plain text),
// always accept.
@@ -65,8 +60,15 @@
 
// Use a heuristic regexp to find text likely to be wikitext.
// This test could be made more sophisticated in the future.
-   if ( this.matchRegExp.test( text ) ) {
-   return true;
+   for ( i in registry.registry ) {
+   rule = registry.registry[ i ];
+   if ( rule instanceof RegExp ) {
+   if ( registry.registry[ i ].test( text ) ) {
+   return true;
+   }
+   } else if ( text.indexOf( rule ) !== -1 ) {
+   return true;
+   }
}
return false;
 };
@@ -103,7 +105,13 @@
 
doc = handler.surface.getModel().getDocument().newFromHtml(
response.visualeditor.content,
-   null // No sanitization, since HTML is from Parsoid
+   {
+   external: {
+   // Blacklist reference lists as they 
were likely generated by mistake, see T101553
+   blacklist: [ 'mwReferencesList' ]
+   }
+   // No additional sanitization, since HTML is 
from Parsoid
+   }
);
 
if ( !doc.data.hasContent() ) {
diff --git a/modules/ve-mw/ui/ve.ui.MWWikitextTransferRegistry.js 
b/modules/ve-mw/ui/ve.ui.MWWikitextTransferRegistry.js
new file mode 100644
index 000..b2026eb
--- /dev/null
+++ b/modules/ve-mw/ui/ve.ui.MWWikitextTransferRegistry.js
@@ -0,0 +1,31 @@
+/*!
+ * VisualEditor MediaWiki WikitextTransferRegistry and registrations.
+ *
+ * @copyright 2011-2016 VisualEditor Team and others; see AUTHORS.txt
+ * @license The MIT License (MIT); see LICENSE.txt
+ */
+
+/**
+ * Heuristic patterns which attempts to discover wikitext, without
+ * incurring too many false positives.
+ *
+ * Rules can be regular expressions or strings
+ */
+ve.ui.mwWikitextTransferRegistry = new OO.Registry();
+
+ve.ui.mwWikitextTransferRegistry.register(
+   'heading',
+   

[MediaWiki-commits] [Gerrit] Travis - change (mediawiki...Lingo)

2016-03-05 Thread Foxtrott (Code Review)
Foxtrott has submitted this change and it was merged.

Change subject: Travis
..


Travis

Change-Id: I0f73bd3fa84f24677809f0c7af780cfc174b
---
M build/travis/script.sh
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/build/travis/script.sh b/build/travis/script.sh
index 9ef275a..4612753 100755
--- a/build/travis/script.sh
+++ b/build/travis/script.sh
@@ -94,7 +94,7 @@
 
 function uploadCoverageReport {
wget https://scrutinizer-ci.com/ocular.phar
-   php ocular.phar code-coverage:upload 
--repository='g/wikimedia/mediawiki-lingo' --format=php-clover coverage.clover
+   php ocular.phar code-coverage:upload 
--repository='g/wikimedia/mediawiki-extensions-lingo' --format=php-clover 
coverage.clover
 }
 
 composer self-update

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0f73bd3fa84f24677809f0c7af780cfc174b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Lingo
Gerrit-Branch: master
Gerrit-Owner: Foxtrott 
Gerrit-Reviewer: Foxtrott 

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


[MediaWiki-commits] [Gerrit] Travis - change (mediawiki...Lingo)

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

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

Change subject: Travis
..

Travis

Change-Id: I0f73bd3fa84f24677809f0c7af780cfc174b
---
M build/travis/script.sh
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Lingo 
refs/changes/92/275192/1

diff --git a/build/travis/script.sh b/build/travis/script.sh
index 9ef275a..4612753 100755
--- a/build/travis/script.sh
+++ b/build/travis/script.sh
@@ -94,7 +94,7 @@
 
 function uploadCoverageReport {
wget https://scrutinizer-ci.com/ocular.phar
-   php ocular.phar code-coverage:upload 
--repository='g/wikimedia/mediawiki-lingo' --format=php-clover coverage.clover
+   php ocular.phar code-coverage:upload 
--repository='g/wikimedia/mediawiki-extensions-lingo' --format=php-clover 
coverage.clover
 }
 
 composer self-update

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0f73bd3fa84f24677809f0c7af780cfc174b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Lingo
Gerrit-Branch: master
Gerrit-Owner: Foxtrott 

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


[MediaWiki-commits] [Gerrit] Travis - change (mediawiki...Lingo)

2016-03-05 Thread Foxtrott (Code Review)
Foxtrott has submitted this change and it was merged.

Change subject: Travis
..


Travis

Change-Id: I99c2832ee4eb16a69cc9507b142237763666588e
---
M build/travis/script.sh
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/build/travis/script.sh b/build/travis/script.sh
index 253314d..9ef275a 100755
--- a/build/travis/script.sh
+++ b/build/travis/script.sh
@@ -60,7 +60,7 @@
fi
 
composer remove --dev --update-with-dependencies 'phpunit/phpunit'
-   composer require 'composer/installer=>1.0.12'
+   composer require 'composer/installers=>1.0.12'
composer require 'phpunit/phpunit=~4.0' 'mediawiki/lingo=@dev' 
--prefer-source
 
cd extensions/Lingo

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I99c2832ee4eb16a69cc9507b142237763666588e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Lingo
Gerrit-Branch: master
Gerrit-Owner: Foxtrott 
Gerrit-Reviewer: Foxtrott 

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


[MediaWiki-commits] [Gerrit] Travis - change (mediawiki...Lingo)

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

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

Change subject: Travis
..

Travis

Change-Id: I99c2832ee4eb16a69cc9507b142237763666588e
---
M build/travis/script.sh
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Lingo 
refs/changes/91/275191/1

diff --git a/build/travis/script.sh b/build/travis/script.sh
index 253314d..9ef275a 100755
--- a/build/travis/script.sh
+++ b/build/travis/script.sh
@@ -60,7 +60,7 @@
fi
 
composer remove --dev --update-with-dependencies 'phpunit/phpunit'
-   composer require 'composer/installer=>1.0.12'
+   composer require 'composer/installers=>1.0.12'
composer require 'phpunit/phpunit=~4.0' 'mediawiki/lingo=@dev' 
--prefer-source
 
cd extensions/Lingo

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I99c2832ee4eb16a69cc9507b142237763666588e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Lingo
Gerrit-Branch: master
Gerrit-Owner: Foxtrott 

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


[MediaWiki-commits] [Gerrit] Continuous Integration config for labs/tools/stewardbots - change (labs...stewardbots)

2016-03-05 Thread MarcoAurelio (Code Review)
MarcoAurelio has uploaded a new change for review.

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

Change subject: Continuous Integration config for labs/tools/stewardbots
..

Continuous Integration config for labs/tools/stewardbots

Needs expert review.

Bug: T128503
Change-Id: Ibf6571ea3bed7f99bcb6dafd5f9412985ff9acb0
---
A setup.cfg
A setup.py
A tox.ini
3 files changed, 47 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/tools/stewardbots 
refs/changes/90/275190/1

diff --git a/setup.cfg b/setup.cfg
new file mode 100644
index 000..f1dca5a
--- /dev/null
+++ b/setup.cfg
@@ -0,0 +1,13 @@
+# configuration section for nose
+[nosetests]
+verbosity = 1
+detailed-errors = 1
+
+# configuration for flake8
+[flake8]
+# W293: whitespace on blank lines is ok
+ignore = W293
+# Raise the default 79 limit
+max-line-length = 90
+# Ignore some well known paths
+exclude = .venv,.tox,dist,doc,build,*.egg
\ No newline at end of file
diff --git a/setup.py b/setup.py
new file mode 100644
index 000..e7f83a9
--- /dev/null
+++ b/setup.py
@@ -0,0 +1,8 @@
+#!/usr/bin/env python
+
+from setuptools import setup
+
+setup(
+setup_requires=['pbr'],
+pbr=True,
+)
\ No newline at end of file
diff --git a/tox.ini b/tox.ini
new file mode 100644
index 000..d59fc06
--- /dev/null
+++ b/tox.ini
@@ -0,0 +1,26 @@
+# Tox configuration
+[tox]
+minversion = 1.6
+skipsdist = True
+# List the environment that will be run by default
+envlist = flake8, py26, py27, py34, py35
+
+[testenv]
+# Default configuration. py26, py27, py34, etc. will end up using this
+setenv = VIRTUAL_ENV={envdir}
+# Passed to 'pip install --pre', that will install the dependencies listed in 
those files
+deps = -r{toxinidir}/requirements.txt
+   -r{toxinidir}/test-requirements.txt
+commands =
+ nosetests
+
+# Settings specific to the flake8 environment
+[testenv:flake8]
+# The command to run:
+commands = flake8
+# We only need flake8 when linting, we do not care about the project 
dependencies
+deps = flake8
+
+[testenv:venv]
+# Let you pass additional arguments when invoking tox
+commands = {posargs}
\ No newline at end of file

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibf6571ea3bed7f99bcb6dafd5f9412985ff9acb0
Gerrit-PatchSet: 1
Gerrit-Project: labs/tools/stewardbots
Gerrit-Branch: master
Gerrit-Owner: MarcoAurelio 

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


[MediaWiki-commits] [Gerrit] Travis - change (mediawiki...Lingo)

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

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

Change subject: Travis
..

Travis

Change-Id: I8166b5e0d759caec3c6a899ad487fa15fce560df
---
M build/travis/script.sh
1 file changed, 1 insertion(+), 0 deletions(-)


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

diff --git a/build/travis/script.sh b/build/travis/script.sh
index 1ddb087..253314d 100755
--- a/build/travis/script.sh
+++ b/build/travis/script.sh
@@ -60,6 +60,7 @@
fi
 
composer remove --dev --update-with-dependencies 'phpunit/phpunit'
+   composer require 'composer/installer=>1.0.12'
composer require 'phpunit/phpunit=~4.0' 'mediawiki/lingo=@dev' 
--prefer-source
 
cd extensions/Lingo

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8166b5e0d759caec3c6a899ad487fa15fce560df
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Lingo
Gerrit-Branch: master
Gerrit-Owner: Foxtrott 

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


[MediaWiki-commits] [Gerrit] Travis - change (mediawiki...Lingo)

2016-03-05 Thread Foxtrott (Code Review)
Foxtrott has submitted this change and it was merged.

Change subject: Travis
..


Travis

Change-Id: I8166b5e0d759caec3c6a899ad487fa15fce560df
---
M build/travis/script.sh
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/build/travis/script.sh b/build/travis/script.sh
index 1ddb087..253314d 100755
--- a/build/travis/script.sh
+++ b/build/travis/script.sh
@@ -60,6 +60,7 @@
fi
 
composer remove --dev --update-with-dependencies 'phpunit/phpunit'
+   composer require 'composer/installer=>1.0.12'
composer require 'phpunit/phpunit=~4.0' 'mediawiki/lingo=@dev' 
--prefer-source
 
cd extensions/Lingo

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8166b5e0d759caec3c6a899ad487fa15fce560df
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Lingo
Gerrit-Branch: master
Gerrit-Owner: Foxtrott 
Gerrit-Reviewer: Foxtrott 

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


[MediaWiki-commits] [Gerrit] Add wfLoadExtension to test install script - change (mediawiki...Lingo)

2016-03-05 Thread Foxtrott (Code Review)
Foxtrott has submitted this change and it was merged.

Change subject: Add wfLoadExtension to test install script
..


Add wfLoadExtension to test install script

Change-Id: I5fd771b64f548a5b0c196dfcdbbaf5326c98b1d8
---
M .travis.yml
M build/travis/script.sh
M composer.json
3 files changed, 8 insertions(+), 9 deletions(-)

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



diff --git a/.travis.yml b/.travis.yml
index 6c96c31..c89d7ef 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -24,16 +24,16 @@
 #
 
 language: php
-sudo: false
+#sudo: false
 
 matrix:
   include:
 - env: DBTYPE=mysql; MW=master
   php: 5.6
-- env: DBTYPE=postgres; MW=master
-  php: 5.4
-- env: DBTYPE=sqlite; MW=1.25.5
-  php: 5.3
+#- env: DBTYPE=postgres; MW=master
+#  php: 5.5
+#- env: DBTYPE=sqlite; MW=1.25.5
+#  php: 5.3
 
 script:
 - bash ./build/travis/script.sh
diff --git a/build/travis/script.sh b/build/travis/script.sh
index 95af129..1ddb087 100755
--- a/build/travis/script.sh
+++ b/build/travis/script.sh
@@ -59,11 +59,8 @@
composer init
fi
 
-#  composer remove --dev --update-with-dependencies 'phpunit/phpunit'
+   composer remove --dev --update-with-dependencies 'phpunit/phpunit'
composer require 'phpunit/phpunit=~4.0' 'mediawiki/lingo=@dev' 
--prefer-source
-
-   pwd
-   ls -al
 
cd extensions/Lingo
 
@@ -89,6 +86,7 @@
echo '$wgShowExceptionDetails = true;' >> LocalSettings.php
echo '$wgDevelopmentWarnings = true;' >> LocalSettings.php
echo "putenv( 'MW_INSTALL_PATH=$(pwd)' );" >> LocalSettings.php
+   echo "wfLoadExtension('Lingo');" >> LocalSettings.php
 
php maintenance/update.php --quick
 }
diff --git a/composer.json b/composer.json
index 40a3388..cdc8c2a 100644
--- a/composer.json
+++ b/composer.json
@@ -28,6 +28,7 @@
"require": {
"php": ">=5.3.2",
"ext-dom": "*",
+   "composer/installers": ">1.0.12",
"justinrainbow/json-schema": "~1.0"
},
"suggest": {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5fd771b64f548a5b0c196dfcdbbaf5326c98b1d8
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Lingo
Gerrit-Branch: master
Gerrit-Owner: Foxtrott 
Gerrit-Reviewer: Foxtrott 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Use single quotes where possible - change (mediawiki...UniversalLanguageSelector)

2016-03-05 Thread Siebrand (Code Review)
Siebrand has uploaded a new change for review.

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

Change subject: Use single quotes where possible
..

Use single quotes where possible

Change-Id: I8c0098e4840d7eff16cf5818f2247b134946d77b
---
M data/LanguageNameIndexer.php
M tests/phpunit/LanguageSearchTest.php
M tests/phpunit/ResourceLoaderULSTest.php
3 files changed, 12 insertions(+), 12 deletions(-)


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

diff --git a/data/LanguageNameIndexer.php b/data/LanguageNameIndexer.php
index 0715d98..3e25879 100644
--- a/data/LanguageNameIndexer.php
+++ b/data/LanguageNameIndexer.php
@@ -49,7 +49,7 @@
$buckets[$bucket][$name] = $code;
}
}
-   $this->output( "Total buckets: " . count( $buckets ) . "\n" );
+   $this->output( 'Total buckets: ' . count( $buckets ) . "\n" );
file_put_contents( 'langnames.ser', serialize( $buckets ) );
}
 }
diff --git a/tests/phpunit/LanguageSearchTest.php 
b/tests/phpunit/LanguageSearchTest.php
index d74425f..0fe3ed2 100644
--- a/tests/phpunit/LanguageSearchTest.php
+++ b/tests/phpunit/LanguageSearchTest.php
@@ -29,23 +29,23 @@
 
public function searchDataProvider() {
return array(
-   array( "ഹിന്ദി", array(
+   array( 'ഹിന്ദി', array(
'hi' => 'ഹിന്ദി'
)
),
-   array( "മല", array(
-   'ml' => "മലയാളം",
+   array( 'മല', array(
+   'ml' => 'മലയാളം',
'mg' => 'മലഗാസി',
'ms' => 'മലെയ്',
)
),
-   array( "Φινλαν", array(
+   array( 'Φινλαν', array(
'fi' => 'Φινλανδικά',
)
),
array( 'blah', array()
),
-   array( "الفرنسية", array(
+   array( 'الفرنسية', array(
'fr' => 'الفرنسية',
'fr-ca' => 'الفرنسية الكندية',
'fr-ch' => 'الفرنسية السويسرية',
@@ -53,11 +53,11 @@
'fro' => 'الفرنسية القديمة',
)
),
-   array( "മലയളം", array(
-   'ml' => "മലയാളം",
+   array( 'മലയളം', array(
+   'ml' => 'മലയാളം',
)
),
-   array( "finish", array(
+   array( 'finish', array(
'fi' => 'finnish'
)
),
diff --git a/tests/phpunit/ResourceLoaderULSTest.php 
b/tests/phpunit/ResourceLoaderULSTest.php
index cdc98be..f567420 100644
--- a/tests/phpunit/ResourceLoaderULSTest.php
+++ b/tests/phpunit/ResourceLoaderULSTest.php
@@ -30,20 +30,20 @@
$request->setVal( 'lang', 'hi' );
$context = new ResourceLoaderContext( new ResourceLoader(), 
$request );
$mtimeHindi = $module->getModifiedTime( $context );
-   $this->assertGreaterThan( $mtimeHebrew, $mtimeHindi, "Hindi has 
recent timestamp than Hebrew" );
+   $this->assertGreaterThan( $mtimeHebrew, $mtimeHindi, 'Hindi has 
recent timestamp than Hebrew' );
 
// sleep for 1 second
sleep( 1 );
$request->setVal( 'lang', 'he' );
$context = new ResourceLoaderContext( new ResourceLoader(), 
$request );
$mtimeHebrewNew = $module->getModifiedTime( $context );
-   $this->assertEquals( $mtimeHebrewNew, $mtimeHebrew, "Hebrew 
timestamp remained same" );
+   $this->assertEquals( $mtimeHebrewNew, $mtimeHebrew, 'Hebrew 
timestamp remained same' );
 
// sleep for 1 second
sleep( 1 );
$request->setVal( 'lang', 'hi' );
$context = new ResourceLoaderContext( new ResourceLoader(), 
$request );
$mtimeHindiNew = $module->getModifiedTime( $context );
-   $this->assertEquals( $mtimeHindi, $mtimeHindiNew, "Hindi 
timestamp remained same" );
+   $this->assertEquals( $mtimeHindi, $mtimeHindiNew, 'Hindi 
timestamp remained same' );
}
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8c0098e4840d7eff16cf5818f2247b134946d77b
Gerrit-PatchSet: 

[MediaWiki-commits] [Gerrit] null change to trigger travis - change (mediawiki...Lingo)

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

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

Change subject: null change to trigger travis
..

null change to trigger travis

Change-Id: I2a72b8f25c2276c7c48413c5cf4bfed16124803b
---
M build/travis/script.sh
1 file changed, 1 insertion(+), 0 deletions(-)


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

diff --git a/build/travis/script.sh b/build/travis/script.sh
index 95af129..5297c3f 100755
--- a/build/travis/script.sh
+++ b/build/travis/script.sh
@@ -67,6 +67,7 @@
 
cd extensions/Lingo
 
+
# Pull request number, "false" if it's not a pull request
if [ "$TRAVIS_PULL_REQUEST" != "false" ]
then

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2a72b8f25c2276c7c48413c5cf4bfed16124803b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Lingo
Gerrit-Branch: master
Gerrit-Owner: Foxtrott 

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


[MediaWiki-commits] [Gerrit] Add wfLoadExtension to test install script - change (mediawiki...Lingo)

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

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

Change subject: Add wfLoadExtension to test install script
..

Add wfLoadExtension to test install script

Change-Id: I5fd771b64f548a5b0c196dfcdbbaf5326c98b1d8
---
M .travis.yml
M build/travis/script.sh
M composer.json
3 files changed, 8 insertions(+), 10 deletions(-)


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

diff --git a/.travis.yml b/.travis.yml
index 6c96c31..c89d7ef 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -24,16 +24,16 @@
 #
 
 language: php
-sudo: false
+#sudo: false
 
 matrix:
   include:
 - env: DBTYPE=mysql; MW=master
   php: 5.6
-- env: DBTYPE=postgres; MW=master
-  php: 5.4
-- env: DBTYPE=sqlite; MW=1.25.5
-  php: 5.3
+#- env: DBTYPE=postgres; MW=master
+#  php: 5.5
+#- env: DBTYPE=sqlite; MW=1.25.5
+#  php: 5.3
 
 script:
 - bash ./build/travis/script.sh
diff --git a/build/travis/script.sh b/build/travis/script.sh
index 5297c3f..1ddb087 100755
--- a/build/travis/script.sh
+++ b/build/travis/script.sh
@@ -59,14 +59,10 @@
composer init
fi
 
-#  composer remove --dev --update-with-dependencies 'phpunit/phpunit'
+   composer remove --dev --update-with-dependencies 'phpunit/phpunit'
composer require 'phpunit/phpunit=~4.0' 'mediawiki/lingo=@dev' 
--prefer-source
 
-   pwd
-   ls -al
-
cd extensions/Lingo
-
 
# Pull request number, "false" if it's not a pull request
if [ "$TRAVIS_PULL_REQUEST" != "false" ]
@@ -90,6 +86,7 @@
echo '$wgShowExceptionDetails = true;' >> LocalSettings.php
echo '$wgDevelopmentWarnings = true;' >> LocalSettings.php
echo "putenv( 'MW_INSTALL_PATH=$(pwd)' );" >> LocalSettings.php
+   echo "wfLoadExtension('Lingo');" >> LocalSettings.php
 
php maintenance/update.php --quick
 }
diff --git a/composer.json b/composer.json
index 40a3388..cdc8c2a 100644
--- a/composer.json
+++ b/composer.json
@@ -28,6 +28,7 @@
"require": {
"php": ">=5.3.2",
"ext-dom": "*",
+   "composer/installers": ">1.0.12",
"justinrainbow/json-schema": "~1.0"
},
"suggest": {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5fd771b64f548a5b0c196dfcdbbaf5326c98b1d8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Lingo
Gerrit-Branch: master
Gerrit-Owner: Foxtrott 

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


[MediaWiki-commits] [Gerrit] Fix case mismatch in method call - change (mediawiki...UniversalLanguageSelector)

2016-03-05 Thread Siebrand (Code Review)
Siebrand has uploaded a new change for review.

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

Change subject: Fix case mismatch in method call
..

Fix case mismatch in method call

Change-Id: Ie002b925afaae7c88b587570659ffde3c579574d
---
M UniversalLanguageSelector.hooks.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UniversalLanguageSelector 
refs/changes/85/275185/1

diff --git a/UniversalLanguageSelector.hooks.php 
b/UniversalLanguageSelector.hooks.php
index 072db03..fe3dacd 100644
--- a/UniversalLanguageSelector.hooks.php
+++ b/UniversalLanguageSelector.hooks.php
@@ -226,7 +226,7 @@
 
// Language change
if ( Language::isSupportedLanguage( $languageToSave ) ) {
-   $request->response()->setcookie( 'language', 
$languageToSave );
+   $request->response()->setCookie( 'language', 
$languageToSave );
$code = $languageToSave;
 
return true;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie002b925afaae7c88b587570659ffde3c579574d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector
Gerrit-Branch: master
Gerrit-Owner: Siebrand 

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


[MediaWiki-commits] [Gerrit] Add curly brackets around variable names in bash scripts - change (mediawiki...UniversalLanguageSelector)

2016-03-05 Thread Siebrand (Code Review)
Siebrand has uploaded a new change for review.

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

Change subject: Add curly brackets around variable names in bash scripts
..

Add curly brackets around variable names in bash scripts

Change-Id: I759af99e84973f1f0a255aeda2f4fa7caa91d4bd
---
M scripts/update-jquery-i18n.sh
M scripts/update-jquery-ime.sh
M scripts/update-jquery-uls.sh
M scripts/update-jquery-webfonts.sh
4 files changed, 13 insertions(+), 13 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UniversalLanguageSelector 
refs/changes/84/275184/1

diff --git a/scripts/update-jquery-i18n.sh b/scripts/update-jquery-i18n.sh
index 537164b..adb2765 100755
--- a/scripts/update-jquery-i18n.sh
+++ b/scripts/update-jquery-i18n.sh
@@ -7,11 +7,11 @@
 
 echo -e "Getting latest jquery.i18n from $UPSTREAM\n";
 
-if [ -d $CLONEDIR ]; then
+if [ -d ${CLONEDIR} ]; then
 git pull;
 else
-git clone $UPSTREAM $CLONEDIR;
+git clone ${UPSTREAM} ${CLONEDIR};
 fi
 
 cd "$HERE";
-cp -rf $CLONEDIR/src/* $DEST
+cp -rf $CLONEDIR/src/* ${DEST}
diff --git a/scripts/update-jquery-ime.sh b/scripts/update-jquery-ime.sh
index bb5e8b2..40575c4 100755
--- a/scripts/update-jquery-ime.sh
+++ b/scripts/update-jquery-ime.sh
@@ -7,14 +7,14 @@
 
 echo -e "Getting latest jquery.ime from $UPSTREAM\n";
 
-if [ -d $CLONEDIR ]; then
+if [ -d ${CLONEDIR} ]; then
 git pull;
 else
-git clone $UPSTREAM $CLONEDIR;
+git clone ${UPSTREAM} ${CLONEDIR};
 fi
 
-cd $CLONEDIR;
+cd ${CLONEDIR};
 npm install;
 grunt copy concat;
 cd "$HERE";
-cp -rf $CLONEDIR/dist/jquery.ime/{images,css,rules,jquery.ime.js} $DEST;
+cp -rf ${CLONEDIR}/dist/jquery.ime/{images,css,rules,jquery.ime.js} ${DEST};
diff --git a/scripts/update-jquery-uls.sh b/scripts/update-jquery-uls.sh
index 8797d66..35d24b3 100755
--- a/scripts/update-jquery-uls.sh
+++ b/scripts/update-jquery-uls.sh
@@ -7,11 +7,11 @@
 
 echo -e "Getting latest jquery.uls from $UPSTREAM\n";
 
-if [ -d $CLONEDIR ]; then 
+if [ -d ${CLONEDIR} ]; then
 git pull;
 else
-git clone $UPSTREAM $CLONEDIR;
+git clone ${UPSTREAM} ${CLONEDIR};
 fi
 
 cd "$HERE";
-cp -rf $CLONEDIR/{images,css,src,i18n} $DEST
+cp -rf ${CLONEDIR}/{images,css,src,i18n} ${DEST}
diff --git a/scripts/update-jquery-webfonts.sh 
b/scripts/update-jquery-webfonts.sh
index f2ff811..314afd7 100755
--- a/scripts/update-jquery-webfonts.sh
+++ b/scripts/update-jquery-webfonts.sh
@@ -7,11 +7,11 @@
 
 echo -e "Getting latest jquery.webfonts from $UPSTREAM\n";
 
-if [ -d $CLONEDIR ]; then
+if [ -d ${CLONEDIR} ]; then
 git pull;
 else
-git clone $UPSTREAM $CLONEDIR;
+git clone ${UPSTREAM} ${CLONEDIR};
 fi
 
 cd "$HERE";
-cp -rf $CLONEDIR/src/* $DEST
+cp -rf ${CLONEDIR}/src/* ${DEST}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I759af99e84973f1f0a255aeda2f4fa7caa91d4bd
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector
Gerrit-Branch: master
Gerrit-Owner: Siebrand 

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


[MediaWiki-commits] [Gerrit] Update Gruntfile.js and package.json and packages - change (mediawiki...BetaFeatures)

2016-03-05 Thread Paladox (Code Review)
Paladox has uploaded a new change for review.

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

Change subject: Update Gruntfile.js and package.json and packages
..

Update Gruntfile.js and package.json and packages

This removes duplicate jsonlint task, also update somethings todo with js.

Updates packages:

grunt-banana-checker to 0.4.0

grunt-contrib-jshint to 1.0.0

grunt-jscs to 2.8.0

Change-Id: Ifd638069d9367b356e606fa4ea557f6d05cb8883
---
M .jshintignore
M .jshintrc
M Gruntfile.js
M package.json
4 files changed, 12 insertions(+), 13 deletions(-)


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

diff --git a/.jshintignore b/.jshintignore
index e69de29..a860310 100644
--- a/.jshintignore
+++ b/.jshintignore
@@ -0,0 +1 @@
+node_modules/**
diff --git a/.jshintrc b/.jshintrc
index 4c5e00f..22a4f47 100644
--- a/.jshintrc
+++ b/.jshintrc
@@ -5,7 +5,7 @@
"bitwise": true,
"eqeqeq": true,
"freeze": true,
-   "latedef": true,
+   "latedef": "nofunc",
"noarg": true,
"nonew": true,
"undef": true,
@@ -22,8 +22,7 @@
 
/* Local */
 
-   "predef": [
-   "mediaWiki",
-   "jQuery"
-   ]
+   "globals": {
+   "mediaWiki": false
+   }
 }
diff --git a/Gruntfile.js b/Gruntfile.js
index 0ec2649..4a3de2b 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -7,12 +7,11 @@
 /*jshint node:true */
 module.exports = function ( grunt ) {
var conf = grunt.file.readJSON( 'extension.json' );
-   grunt.loadNpmTasks( 'grunt-jsonlint' );
-   grunt.loadNpmTasks( 'grunt-banana-checker' );
grunt.loadNpmTasks( 'grunt-contrib-jshint' );
+   grunt.loadNpmTasks( 'grunt-jscs' );
+   grunt.loadNpmTasks( 'grunt-banana-checker' );
grunt.loadNpmTasks( 'grunt-jsonlint' );
grunt.loadNpmTasks( 'grunt-contrib-watch' );
-   grunt.loadNpmTasks( 'grunt-jscs' );
 
grunt.initConfig( {
jshint: {
@@ -20,8 +19,8 @@
jshintrc: true
},
all: [
-   '*.js',
-   'resources/*.js'
+   '**/*.js',
+   '!node_modules/**'
]
},
jscs: {
diff --git a/package.json b/package.json
index 16b008f..548e84b 100644
--- a/package.json
+++ b/package.json
@@ -9,10 +9,10 @@
   "devDependencies": {
 "grunt": "0.4.5",
 "grunt-cli": "0.1.13",
-"grunt-banana-checker": "0.2.2",
-"grunt-contrib-jshint": "0.11.3",
+"grunt-contrib-jshint": "1.0.0",
+"grunt-banana-checker": "0.4.0",
+"grunt-jscs": "2.8.0",
 "grunt-contrib-watch": "0.6.1",
-"grunt-jscs": "2.1.0",
 "grunt-jsonlint": "1.0.7"
   }
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifd638069d9367b356e606fa4ea557f6d05cb8883
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BetaFeatures
Gerrit-Branch: master
Gerrit-Owner: Paladox 

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


[MediaWiki-commits] [Gerrit] [UserPageEditProtection] Register extension - change (translatewiki)

2016-03-05 Thread Raimond Spekking (Code Review)
Raimond Spekking has submitted this change and it was merged.

Change subject: [UserPageEditProtection] Register extension
..


[UserPageEditProtection] Register extension

Bug: T128873
Change-Id: I35ba86225662f528103077a4f7a793f3055de8c2
---
M groups/MediaWiki/mediawiki-extensions.txt
1 file changed, 2 insertions(+), 0 deletions(-)

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



diff --git a/groups/MediaWiki/mediawiki-extensions.txt 
b/groups/MediaWiki/mediawiki-extensions.txt
index 3ece9d4..79b2778 100644
--- a/groups/MediaWiki/mediawiki-extensions.txt
+++ b/groups/MediaWiki/mediawiki-extensions.txt
@@ -2483,6 +2483,8 @@
 User Option Stats
 aliasfile = UserOptionStats/UserOptionStats.alias.php
 
+User Page Edit Protection
+
 User Page View Tracker
 aliasfile = UserPageViewTracker/UserPageViewTracker.alias.php
 

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

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

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


[MediaWiki-commits] [Gerrit] [UserPageEditProtection] Register extension - change (translatewiki)

2016-03-05 Thread Raimond Spekking (Code Review)
Raimond Spekking has uploaded a new change for review.

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

Change subject: [UserPageEditProtection] Register extension
..

[UserPageEditProtection] Register extension

Bug: T128873
Change-Id: I35ba86225662f528103077a4f7a793f3055de8c2
---
M groups/MediaWiki/mediawiki-extensions.txt
1 file changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/translatewiki 
refs/changes/82/275182/1

diff --git a/groups/MediaWiki/mediawiki-extensions.txt 
b/groups/MediaWiki/mediawiki-extensions.txt
index 3ece9d4..79b2778 100644
--- a/groups/MediaWiki/mediawiki-extensions.txt
+++ b/groups/MediaWiki/mediawiki-extensions.txt
@@ -2483,6 +2483,8 @@
 User Option Stats
 aliasfile = UserOptionStats/UserOptionStats.alias.php
 
+User Page Edit Protection
+
 User Page View Tracker
 aliasfile = UserPageViewTracker/UserPageViewTracker.alias.php
 

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

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

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


[MediaWiki-commits] [Gerrit] Perform cheaper checks first - change (mediawiki...UniversalLanguageSelector)

2016-03-05 Thread Siebrand (Code Review)
Siebrand has uploaded a new change for review.

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

Change subject: Perform cheaper checks first
..

Perform cheaper checks first

Change-Id: I4f82eb6a4ebf04ce5a41562b56ce3ee3794b018d
---
M UniversalLanguageSelector.hooks.php
1 file changed, 2 insertions(+), 3 deletions(-)


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

diff --git a/UniversalLanguageSelector.hooks.php 
b/UniversalLanguageSelector.hooks.php
index 99746b0..072db03 100644
--- a/UniversalLanguageSelector.hooks.php
+++ b/UniversalLanguageSelector.hooks.php
@@ -196,7 +196,7 @@
$request = $context->getRequest();
 
$languageToSave = $request->getText( 'setlang' );
-   if ( $request->getText( 'uselang' ) && !$languageToSave ) {
+   if ( !$languageToSave && $request->getText( 'uselang' ) ) {
// uselang can be used for temporary override of 
language preference
// when setlang is not provided
return true;
@@ -407,6 +407,7 @@
global $wgResourceModules, $wgULSEventLogging;
 
if (
+   !isset( $wgResourceModules[ 'jquery.i18n' ] ) &&
(
(
is_callable( array( $resourceLoader, 
'isModuleRegistered' ) ) &&
@@ -415,8 +416,6 @@
||
$resourceLoader->getModule( 'jquery.i18n' ) === 
null
)
-   &&
-   !isset( $wgResourceModules[ 'jquery.i18n' ] )
) {
$resourceLoader->register( array(
'jquery.i18n' => array(

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4f82eb6a4ebf04ce5a41562b56ce3ee3794b018d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector
Gerrit-Branch: master
Gerrit-Owner: Siebrand 

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


[MediaWiki-commits] [Gerrit] Set up php parallel-lint - change (labs...stewardbots)

2016-03-05 Thread MarcoAurelio (Code Review)
MarcoAurelio has submitted this change and it was merged.

Change subject: Set up php parallel-lint
..


Set up php parallel-lint

PHP syntax check can now be run with "composer test" after
"composer install"

Bug: T128503
Change-Id: I03c47b996d1e635cd034b3e6d476cf71da7448b7
---
A .gitignore
A composer.json
2 files changed, 12 insertions(+), 0 deletions(-)

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



diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000..7579f74
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,2 @@
+vendor
+composer.lock
diff --git a/composer.json b/composer.json
new file mode 100644
index 000..f2883f7
--- /dev/null
+++ b/composer.json
@@ -0,0 +1,10 @@
+{
+   "require-dev": {
+   "jakub-onderka/php-parallel-lint": "0.9"
+   },
+   "scripts": {
+   "test": [
+   "parallel-lint . --exclude vendor"
+   ]
+   }
+}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I03c47b996d1e635cd034b3e6d476cf71da7448b7
Gerrit-PatchSet: 3
Gerrit-Project: labs/tools/stewardbots
Gerrit-Branch: master
Gerrit-Owner: Glaisher 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: MarcoAurelio 

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


[MediaWiki-commits] [Gerrit] Add jshint to npm - change (mediawiki...VectorBeta)

2016-03-05 Thread Paladox (Code Review)
Paladox has uploaded a new change for review.

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

Change subject: Add jshint to npm
..

Add jshint to npm

Change-Id: Icbeb3836e5aa12c3b3a9b8ea05e76c4b7a1f559c
---
A .jshintignore
M .jshintrc
M Gruntfile.js
M package.json
4 files changed, 20 insertions(+), 15 deletions(-)


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

diff --git a/.jshintignore b/.jshintignore
new file mode 100644
index 000..3c3629e
--- /dev/null
+++ b/.jshintignore
@@ -0,0 +1 @@
+node_modules
diff --git a/.jshintrc b/.jshintrc
index c4e265a..449c9d9 100644
--- a/.jshintrc
+++ b/.jshintrc
@@ -2,21 +2,17 @@
/* Common */
 
// Enforcing
-   "camelcase": true,
"curly": true,
"eqeqeq": true,
+   "freeze": true,
"immed": true,
-   "latedef": true,
-   "newcap": true,
+   "latedef": "nofunc",
"noarg": true,
"noempty": true,
"nonew": true,
-   "quotmark": "single",
"trailing": true,
"undef": true,
"unused": true,
-   // Legacy
-   "onevar": true,
 
/* Local */
 
@@ -31,12 +27,9 @@
"multistr": true,
// Environment
"browser": true,
-   // Legacy
-   "nomen": true,
 
-   "predef": [
-   "mediaWiki",
-   "jQuery",
-   "QUnit"
-   ]
+   "globals": {
+   "mediaWiki": false,
+   "jQuery": true
+   }
 }
diff --git a/Gruntfile.js b/Gruntfile.js
index a4c3dcb..72b8e0d 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -6,11 +6,21 @@
 
 /*jshint node:true */
 module.exports = function ( grunt ) {
+   var conf = grunt.file.readJSON( 'extension.json' );
+   grunt.loadNpmTasks( 'grunt-contrib-jshint' );
grunt.loadNpmTasks( 'grunt-banana-checker' );
grunt.loadNpmTasks( 'grunt-jsonlint' );
 
-   var conf = grunt.file.readJSON( 'extension.json' );
grunt.initConfig( {
+   jshint: {
+   options: {
+   jshintrc: true
+   },
+   all: [
+   '**/*.js',
+   '!node_modules/**'
+   ]
+   },
banana: conf.MessagesDirs,
jsonlint: {
all: [
@@ -20,6 +30,6 @@
}
} );
 
-   grunt.registerTask( 'test', [ 'jsonlint', 'banana' ] );
+   grunt.registerTask( 'test', [ 'jshint', 'jsonlint', 'banana' ] );
grunt.registerTask( 'default', 'test' );
 };
diff --git a/package.json b/package.json
index 42a50b9..9943a42 100644
--- a/package.json
+++ b/package.json
@@ -10,6 +10,7 @@
 "grunt": "0.4.5",
 "grunt-cli": "0.1.13",
 "grunt-banana-checker": "0.4.0",
+"grunt-contrib-jshint": "1.0.0",
 "grunt-jsonlint": "1.0.7"
   }
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Icbeb3836e5aa12c3b3a9b8ea05e76c4b7a1f559c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VectorBeta
Gerrit-Branch: master
Gerrit-Owner: Paladox 

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


[MediaWiki-commits] [Gerrit] Move assignment of $dir outside of loop - change (mediawiki...UniversalLanguageSelector)

2016-03-05 Thread Siebrand (Code Review)
Siebrand has uploaded a new change for review.

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

Change subject: Move assignment of $dir outside of loop
..

Move assignment of $dir outside of loop

Change-Id: I24009db72d0afbb47532eb2c00329e488461066f
---
M data/fontrepo/scripts/compile.php
1 file changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/data/fontrepo/scripts/compile.php 
b/data/fontrepo/scripts/compile.php
index 98c74f4..008988f 100644
--- a/data/fontrepo/scripts/compile.php
+++ b/data/fontrepo/scripts/compile.php
@@ -16,6 +16,8 @@
$languages = array();
$version = null;
 
+   $dir = dirname( $inifile );
+
foreach ( $conf as $fontname => $font ) {
if ( isset( $font['languages'] ) ) {
$languages = explode( ',', $font['languages'] );
@@ -51,8 +53,6 @@
if ( isset( $font['fontstyle'] ) ) {
$list['fonts'][$fontname]['fontstyle'] = 
$font['fontstyle'];
}
-
-   $dir = dirname( $inifile );
 
if ( isset( $font['ttf'] ) ) {
$list['fonts'][$fontname]['ttf'] = basename( $dir ) . 
'/' . $font['ttf'];

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I24009db72d0afbb47532eb2c00329e488461066f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector
Gerrit-Branch: master
Gerrit-Owner: Siebrand 

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


[MediaWiki-commits] [Gerrit] Update newlines - change (mediawiki...UniversalLanguageSelector)

2016-03-05 Thread Siebrand (Code Review)
Siebrand has uploaded a new change for review.

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

Change subject: Update newlines
..

Update newlines

Change-Id: I147338b76d3c9b1a34de51978dbfdebd17026bc8
---
M data/fontrepo/scripts/compile.php
1 file changed, 13 insertions(+), 1 deletion(-)


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

diff --git a/data/fontrepo/scripts/compile.php 
b/data/fontrepo/scripts/compile.php
index 1ab1726..98c74f4 100644
--- a/data/fontrepo/scripts/compile.php
+++ b/data/fontrepo/scripts/compile.php
@@ -10,20 +10,23 @@
 
 $list = array();
 $list['base'] = '../data/fontrepo/fonts/';
+
 foreach ( glob( '../fonts/*/font.ini' ) as $inifile ) {
$conf = parse_ini_file( $inifile, true );
$languages = array();
$version = null;
-   foreach ( $conf as $fontname => $font ) {
 
+   foreach ( $conf as $fontname => $font ) {
if ( isset( $font['languages'] ) ) {
$languages = explode( ',', $font['languages'] );
foreach ( $languages as $rcode ) {
$rcode = trim( $rcode );
$code = str_replace( '*', '', $rcode );
+
if ( !isset( $list['languages'][$code] ) ) {
$list['languages'][$code] = array( 
'system' );
}
+
if ( strpos( $rcode, '*' ) !== false ) {
unset( $list['languages'][$code][0] );
array_unshift( 
$list['languages'][$code], $fontname );
@@ -32,9 +35,11 @@
}
}
}
+
if ( isset( $font['version'] ) ) {
$version = $font['version'];
}
+
$list['fonts'][$fontname] = array(
'version' => $version,
);
@@ -42,6 +47,7 @@
if ( isset( $font['fontweight'] ) ) {
$list['fonts'][$fontname]['fontweight'] = 
$font['fontweight'];
}
+
if ( isset( $font['fontstyle'] ) ) {
$list['fonts'][$fontname]['fontstyle'] = 
$font['fontstyle'];
}
@@ -51,15 +57,19 @@
if ( isset( $font['ttf'] ) ) {
$list['fonts'][$fontname]['ttf'] = basename( $dir ) . 
'/' . $font['ttf'];
}
+
if ( isset( $font['svg'] ) ) {
$list['fonts'][$fontname]['svg'] = basename( $dir ) . 
'/' . $font['svg'];
}
+
if ( isset( $font['eot'] ) ) {
$list['fonts'][$fontname]['eot'] = basename( $dir ) . 
'/' . $font['eot'];
}
+
if ( isset( $font['woff'] ) ) {
$list['fonts'][$fontname]['woff'] = basename( $dir ) . 
'/' . $font['woff'];
}
+
if ( isset( $font['woff2'] ) ) {
$list['fonts'][$fontname]['woff2'] = basename( $dir ) . 
'/' . $font['woff2'];
}
@@ -76,9 +86,11 @@
if ( isset( $font['bold'] ) ) {
$list['fonts'][$fontname]['variants']['bold'] = 
$font['bold'];
}
+
if ( isset( $font['bolditalic'] ) ) {
$list['fonts'][$fontname]['variants']['bolditalic'] = 
$font['bolditalic'];
}
+
if ( isset( $font['italic'] ) ) {
$list['fonts'][$fontname]['variants']['italic'] = 
$font['italic'];
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I147338b76d3c9b1a34de51978dbfdebd17026bc8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector
Gerrit-Branch: master
Gerrit-Owner: Siebrand 

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


[MediaWiki-commits] [Gerrit] Add .gitreview - change (labs...stewardbots)

2016-03-05 Thread MarcoAurelio (Code Review)
MarcoAurelio has submitted this change and it was merged.

Change subject: Add .gitreview
..


Add .gitreview

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

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



diff --git a/.gitreview b/.gitreview
new file mode 100644
index 000..84798bc
--- /dev/null
+++ b/.gitreview
@@ -0,0 +1,5 @@
+[gerrit]
+host=gerrit.wikimedia.org
+port=29418
+project=labs/tools/stewardbots.git
+defaultbranch=master

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I91396eb5515f077a4b363bf3cb45f561bb6c42a3
Gerrit-PatchSet: 2
Gerrit-Project: labs/tools/stewardbots
Gerrit-Branch: master
Gerrit-Owner: Glaisher 
Gerrit-Reviewer: MarcoAurelio 

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


[MediaWiki-commits] [Gerrit] Elections: unbreak elections.php - change (labs...stewardbots)

2016-03-05 Thread MarcoAurelio (Code Review)
MarcoAurelio has submitted this change and it was merged.

Change subject: Elections: unbreak elections.php
..


Elections: unbreak elections.php

* Fix PHP syntax error
* Fix regex so that spaces are taken into account in template

Also removed commented out code as it doesn't serve any useful purpose now

Bug: T128742
Change-Id: I66a64f4cef142df37d3a6bab2096c270ce162f4c
---
M Elections/elections.php
1 file changed, 3 insertions(+), 7 deletions(-)

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



diff --git a/Elections/elections.php b/Elections/elections.php
index bfac819..bd67bf6 100644
--- a/Elections/elections.php
+++ b/Elections/elections.php
@@ -116,12 +116,7 @@
 if($pages) {
 $content = $pages[0]['content'];
 }
-#preg_match_all('/^\\{\\{[Ss]e[_ ]candidate[_
-]indexer\\|2016\\|(?[^\\|\\}]+)(?:\\|(?[^\\|\\}]+))?\\}\\}/m',
-$content, $m);
-preg_match_all('/^\{\{[Ss]e[_ ]candidate[_
-]indexer\|2016\|(?[^\|\}]+)(?:\|(?[^\|\}]+))?\}\}/m', $content,
-$m);
+preg_match_all('/^\{\{[Ss]e[_ ]candidate[_ 
]indexer\|2016\|(?[^\|\}]+)(?:\|(?[^\|\}]+))?\}\}/m', $content, 
$m);
 
 // Loop users
 $titles = array();
@@ -132,6 +127,7 @@
 if(!$status || $status == 'yes')
 $titles[] = 'Stewards/Elections_2016/Votes/' . $user;
 }
+
 natcasesort($titles);
 
 $titles = array_chunk($titles, 40);
@@ -273,4 +269,4 @@
 
 
 
-
\ No newline at end of file
+

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I66a64f4cef142df37d3a6bab2096c270ce162f4c
Gerrit-PatchSet: 1
Gerrit-Project: labs/tools/stewardbots
Gerrit-Branch: master
Gerrit-Owner: Glaisher 
Gerrit-Reviewer: MarcoAurelio 
Gerrit-Reviewer: Matanya 

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


[MediaWiki-commits] [Gerrit] Pass-by-reference is not needed - change (mediawiki...UniversalLanguageSelector)

2016-03-05 Thread Siebrand (Code Review)
Siebrand has uploaded a new change for review.

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

Change subject: Pass-by-reference is not needed
..

Pass-by-reference is not needed

https://secure.php.net/manual/en/language.oop5.references.php

Change-Id: I6730b8e4326abf304f102fe5c50041342e3a70a1
---
M UniversalLanguageSelector.hooks.php
1 file changed, 4 insertions(+), 4 deletions(-)


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

diff --git a/UniversalLanguageSelector.hooks.php 
b/UniversalLanguageSelector.hooks.php
index 9d0c3a4..99746b0 100644
--- a/UniversalLanguageSelector.hooks.php
+++ b/UniversalLanguageSelector.hooks.php
@@ -110,7 +110,7 @@
 * @return bool
 * Hook: ResourceLoaderTestModules
 */
-   public static function addTestModules( array &$testModules, 
ResourceLoader &$resourceLoader ) {
+   public static function addTestModules( array &$testModules, 
ResourceLoader $resourceLoader ) {
$testModules['qunit']['ext.uls.tests'] = array(
'scripts' => array( 'tests/qunit/ext.uls.tests.js' ),
'dependencies' => array( 'jquery.uls', 'ext.uls.init', 
'ext.uls.preferences' ),
@@ -357,8 +357,8 @@
 * @param QuickTemplate $template
 * @return bool
 */
-   public static function onSkinTemplateOutputPageBeforeExec( Skin &$skin,
-   QuickTemplate &$template
+   public static function onSkinTemplateOutputPageBeforeExec( Skin $skin,
+   QuickTemplate $template
) {
global $wgULSPosition;
 
@@ -403,7 +403,7 @@
 * @param ResourceLoader $resourceLoader
 * @return boolean true
 */
-   public static function onResourceLoaderRegisterModules( ResourceLoader 
&$resourceLoader ) {
+   public static function onResourceLoaderRegisterModules( ResourceLoader 
$resourceLoader ) {
global $wgResourceModules, $wgULSEventLogging;
 
if (

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6730b8e4326abf304f102fe5c50041342e3a70a1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector
Gerrit-Branch: master
Gerrit-Owner: Siebrand 

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


[MediaWiki-commits] [Gerrit] Declare functions with access modifiers - change (mediawiki...UniversalLanguageSelector)

2016-03-05 Thread Siebrand (Code Review)
Siebrand has uploaded a new change for review.

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

Change subject: Declare functions with access modifiers
..

Declare functions with access modifiers

Change-Id: I047d3dc6642de07130a43ad4c2fd4a8106450aac
---
M UniversalLanguageSelector.hooks.php
M data/LanguageNameSearch.php
M includes/ResourceLoaderULSJsonMessageModule.php
M tests/phpunit/ResourceLoaderULSTest.php
4 files changed, 7 insertions(+), 7 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UniversalLanguageSelector 
refs/changes/76/275176/1

diff --git a/UniversalLanguageSelector.hooks.php 
b/UniversalLanguageSelector.hooks.php
index 8080748..9d0c3a4 100644
--- a/UniversalLanguageSelector.hooks.php
+++ b/UniversalLanguageSelector.hooks.php
@@ -125,7 +125,7 @@
 * Add some tabs for navigation for users who do not use Ajax interface.
 * Hook: PersonalUrls
 */
-   static function addPersonalBarTrigger( array &$personal_urls, &$title ) 
{
+   public static function addPersonalBarTrigger( array &$personal_urls, 
&$title ) {
global $wgULSPosition;
 
if ( $wgULSPosition !== 'personal' ) {
diff --git a/data/LanguageNameSearch.php b/data/LanguageNameSearch.php
index 3062f81..2de687f 100644
--- a/data/LanguageNameSearch.php
+++ b/data/LanguageNameSearch.php
@@ -62,7 +62,7 @@
 * @param $str string
 * @return integer Code point of first letter of string
 */
-   static function getCodepoint( $str ) {
+   public static function getCodepoint( $str ) {
$values = array();
$lookingFor = 1;
$strLen = strlen( $str );
@@ -107,7 +107,7 @@
 * @param $str2
 * @return integer
 */
-   static function levenshteinDistance( $str1, $str2 ) {
+   public static function levenshteinDistance( $str1, $str2 ) {
$length1 = mb_strlen( $str1, 'UTF-8' );
$length2 = mb_strlen( $str2, 'UTF-8' );
if ( $length1 < $length2 ) {
diff --git a/includes/ResourceLoaderULSJsonMessageModule.php 
b/includes/ResourceLoaderULSJsonMessageModule.php
index 4ce2190..cb07cf9 100644
--- a/includes/ResourceLoaderULSJsonMessageModule.php
+++ b/includes/ResourceLoaderULSJsonMessageModule.php
@@ -19,7 +19,7 @@
 * @param ResourceLoaderContext $context
 * @return string[] Module names.
 */
-   function getDependencies( ResourceLoaderContext $context = null ) {
+   public function getDependencies( ResourceLoaderContext $context = null 
) {
return array( 'ext.uls.i18n' );
}
 
@@ -29,7 +29,7 @@
 * @param ResourceLoaderContext $context
 * @return int Unix timestamp.
 */
-   function getModifiedTime( ResourceLoaderContext $context ) {
+   public function getModifiedTime( ResourceLoaderContext $context ) {
$code = $context->getLanguage();
if ( !Language::isValidCode( $code ) ) {
$code = 'en';
@@ -51,7 +51,7 @@
 * @param ResourceLoaderContext $context
 * @return string JavaScript code.
 */
-   function getScript( ResourceLoaderContext $context ) {
+   public function getScript( ResourceLoaderContext $context ) {
$code = $context->getLanguage();
if ( !Language::isValidCode( $code ) ) {
$code = 'en';
diff --git a/tests/phpunit/ResourceLoaderULSTest.php 
b/tests/phpunit/ResourceLoaderULSTest.php
index 41e6f25..cdc98be 100644
--- a/tests/phpunit/ResourceLoaderULSTest.php
+++ b/tests/phpunit/ResourceLoaderULSTest.php
@@ -17,7 +17,7 @@
 * correctly with language code.
 * @covers ResourceLoaderSchemaModule::getModifiedTime
 */
-   function testModifiedTime() {
+   public function testModifiedTime() {
$request = new WebRequest();
$module = new ResourceLoaderULSModule();
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I047d3dc6642de07130a43ad4c2fd4a8106450aac
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector
Gerrit-Branch: master
Gerrit-Owner: Siebrand 

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


[MediaWiki-commits] [Gerrit] Provide license label for "Special:Version" - change (mediawiki...WikiLove)

2016-03-05 Thread Kghbln (Code Review)
Kghbln has uploaded a new change for review.

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

Change subject: Provide license label for "Special:Version"
..

Provide license label for "Special:Version"

Change-Id: Id350dbf0c8a290d25acbec355d7c72ee764e5d0f
---
M extension.json
1 file changed, 1 insertion(+), 0 deletions(-)


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

diff --git a/extension.json b/extension.json
index 339e94f..87df4c4 100644
--- a/extension.json
+++ b/extension.json
@@ -8,6 +8,7 @@
],
"url": "https://www.mediawiki.org/wiki/Extension:WikiLove";,
"descriptionmsg": "wikilove-desc",
+   "license-name": "MIT",
"type": "other",
"APIModules": {
"wikilove": "ApiWikiLove"

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id350dbf0c8a290d25acbec355d7c72ee764e5d0f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikiLove
Gerrit-Branch: master
Gerrit-Owner: Kghbln 

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


[MediaWiki-commits] [Gerrit] JSCS: use preferred value for 'requireCamelCaseOrUpperCaseId... - change (mediawiki...parsoid)

2016-03-05 Thread Ricordisamoa (Code Review)
Ricordisamoa has uploaded a new change for review.

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

Change subject: JSCS: use preferred value for 
'requireCamelCaseOrUpperCaseIdentifiers' rule
..

JSCS: use preferred value for 'requireCamelCaseOrUpperCaseIdentifiers' rule

As stated at http://jscs.info/rule/requireCamelCaseOrUpperCaseIdentifiers
the "ignoreProperties" value is deprecated, an object with "ignoreProperties"
as a key should be used instead.

Change-Id: I188f7473f5920d5f5365b06a539a6364e041ff9b
---
M .jscsrc
1 file changed, 3 insertions(+), 1 deletion(-)


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

diff --git a/.jscsrc b/.jscsrc
index 81a435f..91ae790 100644
--- a/.jscsrc
+++ b/.jscsrc
@@ -19,7 +19,9 @@
"catch"
],
"validateIndentation": "\t",
-   "requireCamelCaseOrUpperCaseIdentifiers": "ignoreProperties",
+   "requireCamelCaseOrUpperCaseIdentifiers": {
+   "ignoreProperties": true
+   },
"maximumLineLength": null,
"validateQuoteMarks": null,
"disallowQuotedKeysInObjects": null,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I188f7473f5920d5f5365b06a539a6364e041ff9b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Ricordisamoa 

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


[MediaWiki-commits] [Gerrit] Tweaking various bits and pices - change (mediawiki...RSS)

2016-03-05 Thread Kghbln (Code Review)
Kghbln has uploaded a new change for review.

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

Change subject: Tweaking various bits and pices
..

Tweaking various bits and pices

* Provide license label for "Special:Version"
* Fixed some links to use https
* Consistently use __DIR__
* Updated RELEASE-NOTES

Change-Id: I32d8384029f2e1ce69ad0cd9c847f06bf818f337
---
M RELEASE-NOTES
M RSS.php
2 files changed, 17 insertions(+), 11 deletions(-)


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

diff --git a/RELEASE-NOTES b/RELEASE-NOTES
index 1d85971..02e40d0 100644
--- a/RELEASE-NOTES
+++ b/RELEASE-NOTES
@@ -1,8 +1,8 @@
 RELEASE NOTES of the MediaWiki extension RSS
 
-Version 2.24 20131017
+Version 2.25 2014-03-28
 
-Manual http://www.mediawiki.org/wiki/Extension:RSS
+Manual https://www.mediawiki.org/wiki/Extension:RSS
 
 Browser view
 https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/extensions/RSS.git;a=tree
@@ -27,6 +27,11 @@
   The length limitation must be HTML tag-safe, but it is not at the moment.
   Length limitation is disabled by default.
 
+=== Version 2.25 2014-03-28 ===
+* Migrated I18n to use json-files
+* Provide backwards compatible shim up to version MW 1.17+ and higher
+* Drops compatibility with MW 1.16+ and lower
+
 === Version 2.24 2013-10-17 ==
 * fix for Bug 55763 Undefined variable: txt in RSSParser.php on line 376
 
diff --git a/RSS.php b/RSS.php
index dc01f91..1f65a39 100644
--- a/RSS.php
+++ b/RSS.php
@@ -4,14 +4,14 @@
  *
  * @file
  * @ingroup Extensions
- * @version 2.24
+ * @version 2.25.0
  * @author mutante, Daniel Kinzler, Rdb, Mafs, Thomas Gries, Alxndr, Chris 
Reigrut, K001
  * @author Kellan Elliott-McCrea  -- author of MagpieRSS
  * @author Jeroen De Dauw
  * @author Jack Phoenix 
  * @copyright © Kellan Elliott-McCrea 
  * @copyright © mutante, Daniel Kinzler, Rdb, Mafs, Thomas Gries, Alxndr, 
Chris Reigrut, K001
- * @link http://www.mediawiki.org/wiki/Extension:RSS Documentation
+ * @link https://www.mediawiki.org/wiki/Extension:RSS Documentation
  */
 
 define( "EXTENSION_RSS_VERSION", "2.25.0" );
@@ -26,21 +26,22 @@
'name' => 'RSS feed',
'author' => array( 'Kellan Elliott-McCrea', 'mutante', 'Daniel Kinzler',
'Rdb', 'Mafs', 'Alxndr', 'Thomas Gries', 'Chris Reigrut',
-   'K001', 'Jack Phoenix', 'Jeroen De Dauw', 'Mark A. Hershberger'
+   'K001', 'Jack Phoenix', 'Jeroen De Dauw', 'Mark A. Hershberger',
+   '...'
),
'version' => EXTENSION_RSS_VERSION,
'url' => 'https://www.mediawiki.org/wiki/Extension:RSS',
'descriptionmsg' => 'rss-desc',
+   'license-name' => 'GPL-2.0+'
 );
 
 // Internationalization file and autoloadable classes
-$dir = __DIR__ . '/';
 $wgMessagesDirs['RSS'] = __DIR__ . '/i18n';
-$wgExtensionMessagesFiles['RSS'] = $dir . 'RSS.i18n.php';
-$wgAutoloadClasses['RSSHooks'] = $dir . 'RSSHooks.php';
-$wgAutoloadClasses['RSSParser'] = $dir . 'RSSParser.php';
-$wgAutoloadClasses['RSSUtils'] = $dir . 'RSSParser.php';
-$wgAutoloadClasses['RSSData'] = $dir . 'RSSData.php';
+$wgExtensionMessagesFiles['RSS'] = __DIR__ . '/RSS.i18n.php';
+$wgAutoloadClasses['RSSHooks'] = __DIR__ . '/RSSHooks.php';
+$wgAutoloadClasses['RSSParser'] = __DIR__ . '/RSSParser.php';
+$wgAutoloadClasses['RSSUtils'] = __DIR__ . '/RSSParser.php';
+$wgAutoloadClasses['RSSData'] = __DIR__ . '/RSSData.php';
 
 // List tracking category on Special:TrackingCategories
 $wgTrackingCategories[] = 'rss-tracking-category';

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I32d8384029f2e1ce69ad0cd9c847f06bf818f337
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/RSS
Gerrit-Branch: master
Gerrit-Owner: Kghbln 

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


[MediaWiki-commits] [Gerrit] Provide license label for "Special:Version" - change (mediawiki...LabeledSectionTransclusion)

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

Change subject: Provide license label for "Special:Version"
..


Provide license label for "Special:Version"

Change-Id: I4a1ce57ffc42096a9f8a90eb42480b7fca810e45
---
M extension.json
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/extension.json b/extension.json
index 53ead38..82613f1 100644
--- a/extension.json
+++ b/extension.json
@@ -3,6 +3,7 @@
"author": "Steve Sanbeg",
"url": 
"https://www.mediawiki.org/wiki/Extension:Labeled_Section_Transclusion";,
"descriptionmsg": "lst-desc",
+   "license-name": "GPL-2.0+",
"type": "parserhook",
"MessagesDirs": {
"LabeledSectionTransclusion": [

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4a1ce57ffc42096a9f8a90eb42480b7fca810e45
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/LabeledSectionTransclusion
Gerrit-Branch: master
Gerrit-Owner: Kghbln 
Gerrit-Reviewer: Jackmcbarn 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Merlijn van Deen 
Gerrit-Reviewer: Tpt 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Provide license label for "Special:Version" - change (mediawiki...LabeledSectionTransclusion)

2016-03-05 Thread Kghbln (Code Review)
Kghbln has uploaded a new change for review.

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

Change subject: Provide license label for "Special:Version"
..

Provide license label for "Special:Version"

Change-Id: I4a1ce57ffc42096a9f8a90eb42480b7fca810e45
---
M extension.json
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/LabeledSectionTransclusion
 refs/changes/72/275172/1

diff --git a/extension.json b/extension.json
index 53ead38..82613f1 100644
--- a/extension.json
+++ b/extension.json
@@ -3,6 +3,7 @@
"author": "Steve Sanbeg",
"url": 
"https://www.mediawiki.org/wiki/Extension:Labeled_Section_Transclusion";,
"descriptionmsg": "lst-desc",
+   "license-name": "GPL-2.0+",
"type": "parserhook",
"MessagesDirs": {
"LabeledSectionTransclusion": [

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4a1ce57ffc42096a9f8a90eb42480b7fca810e45
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/LabeledSectionTransclusion
Gerrit-Branch: master
Gerrit-Owner: Kghbln 

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


  1   2   >