[MediaWiki-commits] [Gerrit] pywikibot/core[master]: page.py: implement FilePage.download()

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

Change subject: page.py: implement FilePage.download()
..


page.py: implement FilePage.download()

Add FilePage.download() to save image file to local file.

Added tests in file_tests.py

Change-Id: I82e9e9fca2e346ddf1ca3af82e60b5234fc49af0
---
M pywikibot/page.py
M tests/file_tests.py
2 files changed, 63 insertions(+), 0 deletions(-)

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



diff --git a/pywikibot/page.py b/pywikibot/page.py
index a268b1e..6f7c7be 100644
--- a/pywikibot/page.py
+++ b/pywikibot/page.py
@@ -23,6 +23,7 @@
 
 import hashlib
 import logging
+import os.path
 import re
 import sys
 
@@ -67,6 +68,7 @@
 from pywikibot.family import Family
 from pywikibot.site import Namespace, need_version
 from pywikibot.tools import (
+compute_file_hash,
 PYTHON_VERSION,
 MediaWikiVersion, UnicodeMixin, ComparableMixin, DotReadableDict,
 deprecated, deprecate_arg, deprecated_args, issue_deprecation_warning,
@@ -2528,6 +2530,38 @@
 return self.site.upload(self, source_filename=filename, source_url=url,
 **kwargs)
 
+def download(self, filename=None, chunk_size=100 * 1024):
+"""
+Download to filename file of FilePage.
+
+@param filename: filename where to save file:
+None: self.title(as_filename=True, withNamespace=False)
+will be used
+str: provided filename will be used.
+@type None or str
+@return: True if download is successful, False otherwise.
+@raise: IOError if filename cannot be written for any reason.
+"""
+if filename is None:
+filename = self.title(as_filename=True, withNamespace=False)
+
+filename = os.path.expanduser(filename)
+
+req = http.fetch(self.latest_file_info.url, stream=True)
+if req.status == 200:
+try:
+with open(filename, 'wb') as f:
+for chunk in req.data.iter_content(chunk_size):
+f.write(chunk)
+except IOError as e:
+raise e
+
+sha1 = compute_file_hash(filename)
+return sha1 == self.latest_file_info.sha1
+else:
+pywikibot.warning('Unsuccesfull request (%s): %s' % (req.status, 
req.uri))
+return False
+
 
 wrapper = _ModuleDeprecationWrapper(__name__)
 wrapper._add_deprecated_attr('ImagePage', FilePage)
diff --git a/tests/file_tests.py b/tests/file_tests.py
index 91fb22b..6ab6b59 100644
--- a/tests/file_tests.py
+++ b/tests/file_tests.py
@@ -9,9 +9,13 @@
 
 __version__ = '$Id$'
 
+import os
+
 import pywikibot
 
 from pywikibot.tools import UnicodeType as unicode
+
+from tests import join_images_path
 
 from tests.aspects import unittest, TestCase, DeprecationTestCase
 
@@ -180,6 +184,31 @@
 self.assertIsInstance(latest[1], unicode)
 
 
+class TestFilePageDownload(TestCase):
+
+"""Test dowload fo FilePage to local file."""
+
+family = 'commons'
+code = 'commons'
+
+cached = True
+
+def test_successful_download(self):
+"""Test successful_download."""
+page = pywikibot.FilePage(self.site, 'File:Albert Einstein.jpg')
+filename = join_images_path('Albert Einstein.jpg')
+status_code = page.download(filename)
+self.assertTrue(status_code)
+os.unlink(filename)
+
+def test_not_existing_download(self):
+"""Test not existing download."""
+page = pywikibot.FilePage(self.site, 'File:Albert 
Einstein.jpg_notexisting')
+filename = join_images_path('Albert Einstein.jpg')
+with self.assertRaises(pywikibot.NoPage):
+page.download(filename)
+
+
 if __name__ == '__main__':  # pragma: no cover
 try:
 unittest.main()

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I82e9e9fca2e346ddf1ca3af82e60b5234fc49af0
Gerrit-PatchSet: 5
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Mpaa 
Gerrit-Reviewer: Magul 
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] pywikibot/core[master]: tools: make general function to compute file sha

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

Change subject: tools: make general function to compute file sha
..


tools: make general function to compute file sha

It can be reused in several places:
- site.upload()
- Filepage.download() [if/when it will be merged]

Change-Id: I756c4d127274f7f6031920127850f30de3964597
---
M pywikibot/site.py
M pywikibot/tools/__init__.py
M tests/tools_tests.py
3 files changed, 89 insertions(+), 10 deletions(-)

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



diff --git a/pywikibot/site.py b/pywikibot/site.py
index bdf1fb4..52e6927 100644
--- a/pywikibot/site.py
+++ b/pywikibot/site.py
@@ -18,7 +18,6 @@
 import copy
 import datetime
 import functools
-import hashlib
 import heapq
 import itertools
 import json
@@ -68,6 +67,7 @@
 from pywikibot.family import WikimediaFamily
 from pywikibot.throttle import Throttle
 from pywikibot.tools import (
+compute_file_hash,
 itergroup, UnicodeMixin, ComparableMixin, SelfCallMixin, SelfCallString,
 deprecated, deprecate_arg, deprecated_args, remove_last_args,
 redirect_func, issue_deprecation_warning,
@@ -6027,15 +6027,7 @@
 # The SHA1 was also requested so calculate and compare it
 assert 'sha1' in stash_info, \
 'sha1 not in stash info: {0}'.format(stash_info)
-sha1 = hashlib.sha1()
-bytes_to_read = offset
-with open(source_filename, 'rb') as f:
-while bytes_to_read > 0:
-read_bytes = f.read(min(bytes_to_read, 1 << 20))
-assert read_bytes  # make sure we actually read bytes
-bytes_to_read -= len(read_bytes)
-sha1.update(read_bytes)
-sha1 = sha1.hexdigest()
+sha1 = compute_file_hash(source_filename, bytes_to_read=offset)
 if sha1 != stash_info['sha1']:
 raise ValueError(
 'The SHA1 of {0} bytes of the stashed "{1}" is {2} '
diff --git a/pywikibot/tools/__init__.py b/pywikibot/tools/__init__.py
index 526fd93..261f5ac 100644
--- a/pywikibot/tools/__init__.py
+++ b/pywikibot/tools/__init__.py
@@ -10,6 +10,7 @@
 
 import collections
 import gzip
+import hashlib
 import inspect
 import itertools
 import os
@@ -1714,3 +1715,41 @@
 # re-read and check changes
 if os.stat(filename).st_mode != st_mode:
 warn(warn_str.format(filename, st_mode - stat.S_IFREG, mode))
+
+
+def compute_file_hash(filename, sha='sha1', bytes_to_read=None):
+"""Compute file hash.
+
+Result is expressed as hexdigest().
+
+@param filename: filename path
+@type filename: basestring
+
+@param func: hashing function among the following in hashlib:
+md5(), sha1(), sha224(), sha256(), sha384(), and sha512()
+function name shall be passed as string, e.g. 'sha1'.
+@type filename: basestring
+
+@param bytes_to_read: only the first bytes_to_read will be considered;
+if file size is smaller, the whole file will be considered.
+@type bytes_to_read: None or int
+
+"""
+size = os.path.getsize(filename)
+if bytes_to_read is None:
+bytes_to_read = size
+else:
+bytes_to_read = min(bytes_to_read, size)
+step = 1 << 20
+
+shas = ['md5', 'sha1', 'sha224', 'sha256', 'sha384', 'sha512']
+assert sha in shas
+sha = getattr(hashlib, sha)()  # sha instance
+
+with open(filename, 'rb') as f:
+while bytes_to_read > 0:
+read_bytes = f.read(min(bytes_to_read, step))
+assert read_bytes  # make sure we actually read bytes
+bytes_to_read -= len(read_bytes)
+sha.update(read_bytes)
+return sha.hexdigest()
diff --git a/tests/tools_tests.py b/tests/tools_tests.py
index 6e97772..c450966 100644
--- a/tests/tools_tests.py
+++ b/tests/tools_tests.py
@@ -754,6 +754,54 @@
 self.chmod.assert_called_once_with(self.file, 0o600)
 
 
+class TestFileShaCalculator(TestCase):
+
+"""Test calculator of sha of a file."""
+
+net = False
+
+filename = join_xml_data_path('article-pear-0.10.xml')
+
+def setUp(self):
+"""Setup tests."""
+super(TestFileShaCalculator, self).setUp()
+
+def test_md5_complete_calculation(self):
+Test md5 of complete file."""
+res = tools.compute_file_hash(self.filename, sha='md5')
+self.assertEqual(res, '5d7265e290e6733e1e2020630262a6f3')
+
+def test_md5_partial_calculation(self):
+Test md5 of partial file (1024 bytes)."""
+res = tools.compute_file_hash(self.filename, sha='md5',
+  bytes_to_read=1024)
+self.assertEqual(res, 'edf6e1accead082b6b831a0a600704bc')
+
+def 

[MediaWiki-commits] [Gerrit] translatewiki[master]: Update host names in for puppet

2017-02-23 Thread Siebrand (Code Review)
Siebrand has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/339604 )

Change subject: Update host names in for puppet
..

Update host names in for puppet

Change-Id: Id20484f564fd9241ae78248cb28c9805cd8db31e
---
M puppet/site.pp
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/translatewiki 
refs/changes/04/339604/1

diff --git a/puppet/site.pp b/puppet/site.pp
index b6f889e..fd9d04e 100644
--- a/puppet/site.pp
+++ b/puppet/site.pp
@@ -5,7 +5,7 @@
 }
 
 # web1 / Primary web server
-node 'translatewiki.net' {
+node 'web1.translatewiki.net' {
   include base
   include puppet
   include sshd
@@ -42,7 +42,7 @@
 }
 
 # es / Elastic Search
-node 'v220150764426371.yourvserver.net' {
+node 'es.translatewiki.net' {
   include base
   include puppet
   include sshd

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id20484f564fd9241ae78248cb28c9805cd8db31e
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
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] labs/private[master]: Add passwords::etcd

2017-02-23 Thread Giuseppe Lavagetto (Code Review)
Giuseppe Lavagetto has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/339603 )

Change subject: Add passwords::etcd
..


Add passwords::etcd

Change-Id: Ie57ebd4d9aa63d1196f1f653b08b5d83e14a6508
---
M modules/passwords/manifests/init.pp
1 file changed, 6 insertions(+), 0 deletions(-)

Approvals:
  Giuseppe Lavagetto: Verified; Looks good to me, approved



diff --git a/modules/passwords/manifests/init.pp 
b/modules/passwords/manifests/init.pp
index d2d249e..a99196e 100644
--- a/modules/passwords/manifests/init.pp
+++ b/modules/passwords/manifests/init.pp
@@ -500,3 +500,9 @@
 $db_password = 'notsecret'
 }
 
+class passwords::etcd {
+$accounts = {
+'root' => 'Wikipedia',
+'conftool' => 'another_secret',
+}
+}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie57ebd4d9aa63d1196f1f653b08b5d83e14a6508
Gerrit-PatchSet: 2
Gerrit-Project: labs/private
Gerrit-Branch: master
Gerrit-Owner: Giuseppe Lavagetto 
Gerrit-Reviewer: Giuseppe Lavagetto 

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


[MediaWiki-commits] [Gerrit] labs/private[master]: Add passwords::etcd

2017-02-23 Thread Giuseppe Lavagetto (Code Review)
Giuseppe Lavagetto has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/339603 )

Change subject: Add passwords::etcd
..

Add passwords::etcd

Change-Id: Ie57ebd4d9aa63d1196f1f653b08b5d83e14a6508
---
M modules/passwords/manifests/init.pp
1 file changed, 9 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/private 
refs/changes/03/339603/1

diff --git a/modules/passwords/manifests/init.pp 
b/modules/passwords/manifests/init.pp
index d2d249e..e4913a4 100644
--- a/modules/passwords/manifests/init.pp
+++ b/modules/passwords/manifests/init.pp
@@ -500,3 +500,12 @@
 $db_password = 'notsecret'
 }
 
+<<< HEAD
+===
+class passwords::etcd {
+$accounts = {
+'root' => 'Wikipedia',
+'conftool' => 'another_secret',
+}
+}
+>>> 041e298... Add passwords::etcd

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie57ebd4d9aa63d1196f1f653b08b5d83e14a6508
Gerrit-PatchSet: 1
Gerrit-Project: labs/private
Gerrit-Branch: master
Gerrit-Owner: Giuseppe Lavagetto 

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: db-codfw.php: Repool db2069 depool db2070

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

Change subject: db-codfw.php: Repool db2069 depool db2070
..


db-codfw.php: Repool db2069 depool db2070

db2069 finished the alter table
db2070 needs an alter table

Bug: T132416
Change-Id: Ic8bfa42066e7394b1c7a623b156e165b8a70659f
---
M wmf-config/db-codfw.php
1 file changed, 3 insertions(+), 3 deletions(-)

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



diff --git a/wmf-config/db-codfw.php b/wmf-config/db-codfw.php
index 85b3449..c877a54 100644
--- a/wmf-config/db-codfw.php
+++ b/wmf-config/db-codfw.php
@@ -99,8 +99,8 @@
'db2048' => 400, # C6 2.9TB 160GB,
'db2055' => 50,  # D6 3.3TB 160GB, dump (inactive), vslow
'db2062' => 100, # B5 3.3TB 160GB, api
-#  'db2069' => 100, # D6 3.3TB 160GB, api #T132416
-   'db2070' => 400, # C5 3.3TB 160GB
+   'db2069' => 100, # D6 3.3TB 160GB, api
+#  'db2070' => 400, # C5 3.3TB 160GB
],
's2' => [
'db2017' => 0,   # B6 2.9TB  96GB, master
@@ -245,7 +245,7 @@
],
'api' => [
'db2062' => 1,
-#  'db2069' => 1,
+   'db2069' => 1,
],
],
's2' => [

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic8bfa42066e7394b1c7a623b156e165b8a70659f
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Marostegui 
Gerrit-Reviewer: Marostegui 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: db-codfw.php: Repool db2069 depool db2070

2017-02-23 Thread Marostegui (Code Review)
Marostegui has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/339602 )

Change subject: db-codfw.php: Repool db2069 depool db2070
..

db-codfw.php: Repool db2069 depool db2070

db2069 finished the alter table
db2070 needs an alter table

Bug: T132416
Change-Id: Ic8bfa42066e7394b1c7a623b156e165b8a70659f
---
M wmf-config/db-codfw.php
1 file changed, 3 insertions(+), 3 deletions(-)


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

diff --git a/wmf-config/db-codfw.php b/wmf-config/db-codfw.php
index 85b3449..c877a54 100644
--- a/wmf-config/db-codfw.php
+++ b/wmf-config/db-codfw.php
@@ -99,8 +99,8 @@
'db2048' => 400, # C6 2.9TB 160GB,
'db2055' => 50,  # D6 3.3TB 160GB, dump (inactive), vslow
'db2062' => 100, # B5 3.3TB 160GB, api
-#  'db2069' => 100, # D6 3.3TB 160GB, api #T132416
-   'db2070' => 400, # C5 3.3TB 160GB
+   'db2069' => 100, # D6 3.3TB 160GB, api
+#  'db2070' => 400, # C5 3.3TB 160GB
],
's2' => [
'db2017' => 0,   # B6 2.9TB  96GB, master
@@ -245,7 +245,7 @@
],
'api' => [
'db2062' => 1,
-#  'db2069' => 1,
+   'db2069' => 1,
],
],
's2' => [

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

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

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


[MediaWiki-commits] [Gerrit] pywikibot/i18n[master]: Add Old English (ang) localisation redirect.py to i18n

2017-02-23 Thread Xqt (Code Review)
Xqt has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/339601 )

Change subject: Add Old English (ang) localisation redirect.py to i18n
..

Add Old English (ang) localisation redirect.py to i18n

This hasn't been ported by translater updater bot since months

Bug: T158843
Change-Id: I19de890f49e4d6efd98093bdbc452a2dd7a1313d
---
A redirect/ang.json
1 file changed, 8 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/i18n 
refs/changes/01/339601/1

diff --git a/redirect/ang.json b/redirect/ang.json
new file mode 100644
index 000..e7cec92
--- /dev/null
+++ b/redirect/ang.json
@@ -0,0 +1,8 @@
+{
+   "@metadata": {
+   "authors": [
+   "MarcoAurelio"
+   ]
+   },
+   "redirect-broken-redirect-template": "{{Ahwit|1=Bot: Þā folgendan 
edlǣdunga bendaþ tō unedwistlicum trametum.}}",
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I19de890f49e4d6efd98093bdbc452a2dd7a1313d
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/i18n
Gerrit-Branch: master
Gerrit-Owner: Xqt 

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


[MediaWiki-commits] [Gerrit] mediawiki...BlueSpiceExtendedSearch[master]: I18N

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

Change subject: I18N
..


I18N

Change-Id: I8923ad8453d8d8de653635a336f7d78e36c747f3
---
M extension.json
M i18n/en.json
M i18n/qqq.json
3 files changed, 41 insertions(+), 6 deletions(-)

Approvals:
  Robert Vogel: Looks good to me, approved
  Raimond Spekking: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/extension.json b/extension.json
index 36960e7..fe05c45 100644
--- a/extension.json
+++ b/extension.json
@@ -5,7 +5,7 @@
"Robert Vogel"
],
"url": 
"https://www.mediawiki.org/wiki/Extension:BlueSpiceExtendedSearch;,
-   "descriptionmsg": "bs-extendedsearch-desc",
+   "descriptionmsg": "bs-extsearch-desc",
"license-name": "GPL-2.0",
"type": "other",
"MessagesDirs": {
diff --git a/i18n/en.json b/i18n/en.json
index b053e75..ea775d7 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -5,9 +5,26 @@
]
},
"extensionname-bsextendedsearch": "BlueSpice ExtendedSearch",
-   "bs-extendedsearch-desc": "Elasticsearch search backend",
+   "bs-extsearch-desc": "Elasticsearch search backend",
+   "bssearchadmin": "Search admin",
+   "bssearchadmin-desc": "Provides a management interface of the search",
"bssearchcenter": "Search center",
"apihelp-bs-extendedsearch-query-description": "Search the index",
"apihelp-bs-extendedsearch-query-param-q": "The query term",
-   "bs-extendedsearch-search-input-placeholder": "Find ..."
+   "apihelp-bs-extendedsearch-query-param-params": "Additional parameters 
for the query",
+   "apihelp-bs-extendedsearch-stats-description": "Returns statistical 
data about the registered backends and their configured sources",
+   "apihelp-bs-extendedsearch-stats-param-stats": "A list of statistics 
that should be returned",
+   "apihelp-bs-extendedsearch-generic-param-backend": "Key of the 
configured backend that should be queried",
+   "apihelp-bs-extendedsearch-generic-param-sources" : "One or more 
sources within the specified backend separated by pipe. If empty, all available 
sources will be queried.",
+   "bs-extendedsearch-search-input-placeholder": "Find ...",
+   "bs-extendedsearch-source-label-wikipage": "Wiki page",
+   "bs-extendedsearch-source-label-specialpage": "Special page",
+   "bs-extendedsearch-source-label-repofile": "Upload file",
+   "bs-extendedsearch-source-label-user": "User",
+   "bs-extendedsearch-admin-heading-backend": "Backend \"$1\"",
+   "bs-extendedsearch-admin-label-error": "Error",
+   "bs-extendedsearch-admin-label-all-documents-count": "Total number of 
documents in index",
+   "bs-extendedsearch-admin-heading-sources": "Sources",
+   "bs-extendedsearch-admin-heading-sources-documentscount": "Documents",
+   "bs-extendedsearch-admin-heading-pendingupdatejobs": "Pending update 
jobs"
 }
diff --git a/i18n/qqq.json b/i18n/qqq.json
index cde96c2..aa4fcd1 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -5,9 +5,27 @@
]
},
"extensionname-bsextendedsearch": "{{name}}",
-   "bs-extendedsearch-desc": "{{desc|name=BlueSpiceExtendedSearch}}",
-   "bssearchcenter": "Special page name for extended search",
+   "bs-extsearch-desc": "{{desc|name=BlueSpiceExtendedSearch}}",
+   "bssearchadmin": "Special page name for Special:BSSearchAdmin",
+   "bssearchadmin-desc": "Description text for title attribute in menu 
link",
+   "bssearchcenter": "Special page name for Special:BSSearchCenter",
"apihelp-bs-extendedsearch-query-description": 
"{{doc-apihelp-description|bs-extendedsearch-query}}",
"apihelp-bs-extendedsearch-query-param-q": 
"{{doc-apihelp-param|bs-extendedsearch-query|q}}",
-   "bs-extendedsearch-search-input-placeholder": "Placeholder text within 
the search input field"
+   "apihelp-bs-extendedsearch-query-param-params": 
"{{doc-apihelp-param|bs-extendedsearch-query|params}}",
+   "apihelp-bs-extendedsearch-generic-param-backend": 
"{{doc-apihelp-param|bs-extendedsearch-generic|backend}}",
+   "apihelp-bs-extendedsearch-stats-description": 
"{{doc-apihelp-description|bs-extendedsearch-stats}}",
+   "apihelp-bs-extendedsearch-stats-param-stats": 
"{{doc-apihelp-param|bs-extendedsearch-stats|stats}}",
+   "apihelp-bs-extendedsearch-generic-param-backend": 
"{{doc-apihelp-param|bs-extendedsearch-query|backend}}",
+   "apihelp-bs-extendedsearch-generic-param-sources" : 
"{{doc-apihelp-param|bs-extendedsearch-query|sources}}",
+   "bs-extendedsearch-search-input-placeholder": "Placeholder text within 
the search input field",
+   "bs-extendedsearch-source-label-wikipage": "Label for heading of a 
section that lists hits from the source 'wikipage'",
+   

[MediaWiki-commits] [Gerrit] mediawiki...BlueSpiceFoundation[REL1_23]: Use Title from ParserOutput to handle DISPLAYTITLE

2017-02-23 Thread Robert Vogel (Code Review)
Robert Vogel has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/339398 )

Change subject: Use Title from ParserOutput to handle DISPLAYTITLE
..


Use Title from ParserOutput to handle DISPLAYTITLE

Change-Id: I90a41fac05e72a6517235d5726740dce27d1
---
M includes/utility/PageContentProvider.class.php
1 file changed, 7 insertions(+), 3 deletions(-)

Approvals:
  Robert Vogel: Verified; Looks good to me, approved



diff --git a/includes/utility/PageContentProvider.class.php 
b/includes/utility/PageContentProvider.class.php
index 0ea1748..1bbe818 100644
--- a/includes/utility/PageContentProvider.class.php
+++ b/includes/utility/PageContentProvider.class.php
@@ -328,7 +328,11 @@
}
 
//This would be the case with normal articles and imagepages
-   $sHTML = empty( $sHTML ) ? $wgOut->getHTML() : $sHTML;
+   $sTitle = "";
+   if( empty( $sHTML ) ){
+   $sHTML = $wgOut->getHTML();
+   $sTitle = $wgOut->getPageTitle();
+   }
 
$this->restoreGlobals();
 
@@ -345,8 +349,8 @@
$sHTML = sprintf(
$this->getTemplate(),
'bs-ue-jumpmark-'.
-   md5( 
$oTitle->getPrefixedText().$aParams['oldid'] ),
-   $oTitle->getPrefixedText(),
+   md5( 
$oTitle->getPrefixedText().$aParams['oldid'] ),
+   empty( $sTitle ) ? $oTitle->getPrefixedText( ) 
: $sTitle,
$sHTML
);
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I90a41fac05e72a6517235d5726740dce27d1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceFoundation
Gerrit-Branch: REL1_23
Gerrit-Owner: Robert Vogel 
Gerrit-Reviewer: Ljonka 
Gerrit-Reviewer: Robert Vogel 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/vendor[master]: Add wikimedia/remex-html

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

Change subject: Add wikimedia/remex-html
..

Add wikimedia/remex-html

For I900155b7dd199b0ae2a3b9cdb6db5136fc4f35a8

Change-Id: I864f31d9afdffdde49bfd39f07a0fb7f4df5c5d9
---
M composer.json
M composer.lock
M composer/autoload_classmap.php
M composer/autoload_psr4.php
M composer/autoload_static.php
M composer/installed.json
A wikimedia/remex-html/LICENSE
A wikimedia/remex-html/README.md
A wikimedia/remex-html/src/DOM/DOMBuilder.php
A wikimedia/remex-html/src/DOM/DOMFormatter.php
A wikimedia/remex-html/src/DOM/DOMSerializer.php
A wikimedia/remex-html/src/DOM/DOMUtils.php
A wikimedia/remex-html/src/GenerateDataFiles.php
A wikimedia/remex-html/src/HTMLData.php
A wikimedia/remex-html/src/PropGuard.php
A wikimedia/remex-html/src/Serializer/AbstractSerializer.php
A wikimedia/remex-html/src/Serializer/DepurateFormatter.php
A wikimedia/remex-html/src/Serializer/FastFormatter.php
A wikimedia/remex-html/src/Serializer/Formatter.php
A wikimedia/remex-html/src/Serializer/HtmlFormatter.php
A wikimedia/remex-html/src/Serializer/Serializer.php
A wikimedia/remex-html/src/Serializer/SerializerError.php
A wikimedia/remex-html/src/Serializer/SerializerNode.php
A wikimedia/remex-html/src/Serializer/TestFormatter.php
A wikimedia/remex-html/src/Tokenizer/Attribute.php
A wikimedia/remex-html/src/Tokenizer/Attributes.php
A wikimedia/remex-html/src/Tokenizer/LazyAttributes.php
A wikimedia/remex-html/src/Tokenizer/PlainAttributes.php
A wikimedia/remex-html/src/Tokenizer/TestTokenHandler.php
A wikimedia/remex-html/src/Tokenizer/TokenGenerator.php
A wikimedia/remex-html/src/Tokenizer/TokenGeneratorHandler.php
A wikimedia/remex-html/src/Tokenizer/TokenHandler.php
A wikimedia/remex-html/src/Tokenizer/TokenSerializer.php
A wikimedia/remex-html/src/Tokenizer/Tokenizer.php
A wikimedia/remex-html/src/Tokenizer/TokenizerError.php
A wikimedia/remex-html/src/TreeBuilder/ActiveFormattingElements.php
A wikimedia/remex-html/src/TreeBuilder/AfterAfterBody.php
A wikimedia/remex-html/src/TreeBuilder/AfterAfterFrameset.php
A wikimedia/remex-html/src/TreeBuilder/AfterBody.php
A wikimedia/remex-html/src/TreeBuilder/AfterFrameset.php
A wikimedia/remex-html/src/TreeBuilder/AfterHead.php
A wikimedia/remex-html/src/TreeBuilder/BeforeHead.php
A wikimedia/remex-html/src/TreeBuilder/BeforeHtml.php
A wikimedia/remex-html/src/TreeBuilder/CachingStack.php
A wikimedia/remex-html/src/TreeBuilder/DestructTracer.php
A wikimedia/remex-html/src/TreeBuilder/DestructTracerNode.php
A wikimedia/remex-html/src/TreeBuilder/DispatchTracer.php
A wikimedia/remex-html/src/TreeBuilder/Dispatcher.php
A wikimedia/remex-html/src/TreeBuilder/Element.php
A wikimedia/remex-html/src/TreeBuilder/ForeignAttributes.php
A wikimedia/remex-html/src/TreeBuilder/FormattingElement.php
A wikimedia/remex-html/src/TreeBuilder/InBody.php
A wikimedia/remex-html/src/TreeBuilder/InCaption.php
A wikimedia/remex-html/src/TreeBuilder/InCell.php
A wikimedia/remex-html/src/TreeBuilder/InColumnGroup.php
A wikimedia/remex-html/src/TreeBuilder/InForeignContent.php
A wikimedia/remex-html/src/TreeBuilder/InFrameset.php
A wikimedia/remex-html/src/TreeBuilder/InHead.php
A wikimedia/remex-html/src/TreeBuilder/InHeadNoscript.php
A wikimedia/remex-html/src/TreeBuilder/InPre.php
A wikimedia/remex-html/src/TreeBuilder/InRow.php
A wikimedia/remex-html/src/TreeBuilder/InSelect.php
A wikimedia/remex-html/src/TreeBuilder/InSelectInTable.php
A wikimedia/remex-html/src/TreeBuilder/InTable.php
A wikimedia/remex-html/src/TreeBuilder/InTableBody.php
A wikimedia/remex-html/src/TreeBuilder/InTableText.php
A wikimedia/remex-html/src/TreeBuilder/InTemplate.php
A wikimedia/remex-html/src/TreeBuilder/InTextarea.php
A wikimedia/remex-html/src/TreeBuilder/Initial.php
A wikimedia/remex-html/src/TreeBuilder/InsertionMode.php
A wikimedia/remex-html/src/TreeBuilder/Marker.php
A wikimedia/remex-html/src/TreeBuilder/SimpleStack.php
A wikimedia/remex-html/src/TreeBuilder/Stack.php
A wikimedia/remex-html/src/TreeBuilder/TemplateModeStack.php
A wikimedia/remex-html/src/TreeBuilder/Text.php
A wikimedia/remex-html/src/TreeBuilder/TreeBuilder.php
A wikimedia/remex-html/src/TreeBuilder/TreeBuilderError.php
A wikimedia/remex-html/src/TreeBuilder/TreeHandler.php
A wikimedia/remex-html/src/TreeBuilder/TreeMutationTracer.php
79 files changed, 15,218 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vendor 
refs/changes/00/339600/1


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I864f31d9afdffdde49bfd39f07a0fb7f4df5c5d9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/vendor
Gerrit-Branch: master
Gerrit-Owner: Tim Starling 

___
MediaWiki-commits mailing list

[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: Handle batch api thumb error

2017-02-23 Thread Arlolra (Code Review)
Arlolra has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/339598 )

Change subject: Handle batch api thumb error
..

Handle batch api thumb error

Change-Id: I0d5c1e1a9feb92b070b32f15fb9ad9728d00b2a0
---
M lib/wt2html/tt/LinkHandler.js
1 file changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid 
refs/changes/98/339598/1

diff --git a/lib/wt2html/tt/LinkHandler.js b/lib/wt2html/tt/LinkHandler.js
index 3bdb812..a44bc1b 100644
--- a/lib/wt2html/tt/LinkHandler.js
+++ b/lib/wt2html/tt/LinkHandler.js
@@ -1096,6 +1096,8 @@
} else {
errs.push({"key": "missing-image", "message": "This 
image does not exist." });
}
+   } else if (info.hasOwnProperty('thumberror')) {
+   errs.push({ key: 'thumb-error', 'message': info.thumberror });
}
 
var o;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0d5c1e1a9feb92b070b32f15fb9ad9728d00b2a0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Arlolra 

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


[MediaWiki-commits] [Gerrit] mediawiki...TimedMediaHandler[master]: Implement getAPIData for ParsoidBatchAPI

2017-02-23 Thread Arlolra (Code Review)
Arlolra has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/339597 )

Change subject: Implement getAPIData for ParsoidBatchAPI
..

Implement getAPIData for ParsoidBatchAPI

Change-Id: I39736b4e864f735141c05adc859296d37034ae9b
---
M TimedMediaTransformOutput.php
1 file changed, 7 insertions(+), 0 deletions(-)


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

diff --git a/TimedMediaTransformOutput.php b/TimedMediaTransformOutput.php
index 9f6eee6..a1e4c95 100644
--- a/TimedMediaTransformOutput.php
+++ b/TimedMediaTransformOutput.php
@@ -550,4 +550,11 @@
public static function resetSerialForTest() {
self::$serial = 1;
}
+
+   /**
+* @return array
+*/
+   public function getAPIData() {
+   return [ 'derivatives' => WebVideoTranscode::getSources( 
$this->file, [ 'fullurl' ] ) ];
+   }
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I39736b4e864f735141c05adc859296d37034ae9b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/TimedMediaHandler
Gerrit-Branch: master
Gerrit-Owner: Arlolra 

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


[MediaWiki-commits] [Gerrit] mediawiki...RemexHtml[master]: Explain "fast not elegant" in README.md

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

Change subject: Explain "fast not elegant" in README.md
..


Explain "fast not elegant" in README.md

Per Subbu's suggestion

Change-Id: I41b6c63ca937e2eda295dd0aa03f3ad04292ba25
---
M README.md
1 file changed, 3 insertions(+), 1 deletion(-)

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



diff --git a/README.md b/README.md
index ebc416e..cf12074 100644
--- a/README.md
+++ b/README.md
@@ -6,7 +6,9 @@
 RemexHtml aims to be:
 
 - Modular and flexible.
-- Fast, as opposed to elegant.
+- Fast, as opposed to elegant. For example, we sometimes use direct member
+  access instead of going through accessors, and manually inline some
+  performance-sensitive code.
 - Robust, aiming for O(N) worst-case performance.
 
 RemexHtml contains the following modules:

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I41b6c63ca937e2eda295dd0aa03f3ad04292ba25
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/libs/RemexHtml
Gerrit-Branch: master
Gerrit-Owner: Tim Starling 
Gerrit-Reviewer: Tim Starling 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Move remaining LoadBalancer classes to Rdbms

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

Change subject: Move remaining LoadBalancer classes to Rdbms
..


Move remaining LoadBalancer classes to Rdbms

The old names are left as aliases.

Change-Id: I52a327f2463a2ba7437324047b5b00d28cd1d758
---
M autoload.php
M includes/GlobalFunctions.php
M includes/MediaWikiServices.php
M includes/WatchedItemQueryService.php
M includes/WatchedItemStore.php
M includes/dao/DBAccessBase.php
M includes/deferred/DeferredUpdates.php
M includes/externalstore/ExternalStoreDB.php
M includes/libs/rdbms/connectionmanager/ConnectionManager.php
M includes/libs/rdbms/lbfactory/ILBFactory.php
M includes/libs/rdbms/lbfactory/LBFactory.php
M includes/libs/rdbms/lbfactory/LBFactoryMulti.php
M includes/libs/rdbms/lbfactory/LBFactorySimple.php
M includes/libs/rdbms/lbfactory/LBFactorySingle.php
M includes/libs/rdbms/loadbalancer/ILoadBalancer.php
M includes/libs/rdbms/loadbalancer/LoadBalancer.php
M includes/libs/rdbms/loadbalancer/LoadBalancerSingle.php
M includes/objectcache/SqlBagOStuff.php
M includes/site/DBSiteStore.php
M maintenance/backup.inc
M maintenance/dumpTextPass.php
M tests/phpunit/includes/libs/rdbms/connectionmanager/ConnectionManagerTest.php
M 
tests/phpunit/includes/libs/rdbms/connectionmanager/SessionConsistentConnectionManagerTest.php
23 files changed, 76 insertions(+), 51 deletions(-)

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



diff --git a/autoload.php b/autoload.php
index b21310e..e5be333 100644
--- a/autoload.php
+++ b/autoload.php
@@ -1590,6 +1590,8 @@
'Wikimedia\\Rdbms\\LBFactorySimple' => __DIR__ . 
'/includes/libs/rdbms/lbfactory/LBFactorySimple.php',
'Wikimedia\\Rdbms\\LBFactorySingle' => __DIR__ . 
'/includes/libs/rdbms/lbfactory/LBFactorySingle.php',
'Wikimedia\\Rdbms\\LikeMatch' => __DIR__ . 
'/includes/libs/rdbms/encasing/LikeMatch.php',
+   'Wikimedia\\Rdbms\\LoadBalancer' => __DIR__ . 
'/includes/libs/rdbms/loadbalancer/LoadBalancer.php',
+   'Wikimedia\\Rdbms\\LoadBalancerSingle' => __DIR__ . 
'/includes/libs/rdbms/loadbalancer/LoadBalancerSingle.php',
'Wikimedia\\Rdbms\\LoadMonitor' => __DIR__ . 
'/includes/libs/rdbms/loadmonitor/LoadMonitor.php',
'Wikimedia\\Rdbms\\LoadMonitorMySQL' => __DIR__ . 
'/includes/libs/rdbms/loadmonitor/LoadMonitorMySQL.php',
'Wikimedia\\Rdbms\\LoadMonitorNull' => __DIR__ . 
'/includes/libs/rdbms/loadmonitor/LoadMonitorNull.php',
diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php
index 46def53..3c3cdb8 100644
--- a/includes/GlobalFunctions.php
+++ b/includes/GlobalFunctions.php
@@ -28,7 +28,6 @@
 use MediaWiki\Logger\LoggerFactory;
 use MediaWiki\Session\SessionManager;
 use Wikimedia\ScopedCallback;
-use Wikimedia\Rdbms\LBFactory;
 
 // Hide compatibility functions from Doxygen
 /// @cond
@@ -3085,7 +3084,7 @@
  *  or MediaWikiServices::getDBLoadBalancerFactory() instead.
  *
  * @param string|bool $wiki Wiki ID, or false for the current wiki
- * @return LoadBalancer
+ * @return \Wikimedia\Rdbms\LoadBalancer
  */
 function wfGetLB( $wiki = false ) {
if ( $wiki === false ) {
@@ -3101,7 +3100,7 @@
  *
  * @deprecated since 1.27, use MediaWikiServices::getDBLoadBalancerFactory() 
instead.
  *
- * @return LBFactory
+ * @return \Wikimedia\Rdbms\LBFactory
  */
 function wfGetLBFactory() {
return 
\MediaWiki\MediaWikiServices::getInstance()->getDBLoadBalancerFactory();
diff --git a/includes/MediaWikiServices.php b/includes/MediaWikiServices.php
index ac151e2..e44fefe 100644
--- a/includes/MediaWikiServices.php
+++ b/includes/MediaWikiServices.php
@@ -12,7 +12,7 @@
 use Wikimedia\Rdbms\LBFactory;
 use LinkCache;
 use Liuggio\StatsdClient\Factory\StatsdDataFactory;
-use LoadBalancer;
+use Wikimedia\Rdbms\LoadBalancer;
 use MediaHandlerFactory;
 use MediaWiki\Linker\LinkRenderer;
 use MediaWiki\Linker\LinkRendererFactory;
diff --git a/includes/WatchedItemQueryService.php 
b/includes/WatchedItemQueryService.php
index c80e4a5..dd23310 100644
--- a/includes/WatchedItemQueryService.php
+++ b/includes/WatchedItemQueryService.php
@@ -2,6 +2,7 @@
 
 use MediaWiki\Linker\LinkTarget;
 use Wikimedia\Assert\Assert;
+use Wikimedia\Rdbms\LoadBalancer;
 
 /**
  * Class performing complex database queries related to WatchedItems.
diff --git a/includes/WatchedItemStore.php b/includes/WatchedItemStore.php
index 858d87b..9af5310 100644
--- a/includes/WatchedItemStore.php
+++ b/includes/WatchedItemStore.php
@@ -5,6 +5,7 @@
 use MediaWiki\MediaWikiServices;
 use Wikimedia\Assert\Assert;
 use Wikimedia\ScopedCallback;
+use Wikimedia\Rdbms\LoadBalancer;
 
 /**
  * Storage layer class for WatchedItems.
diff --git a/includes/dao/DBAccessBase.php b/includes/dao/DBAccessBase.php
index 6a1bbd6..da660bd 100644
--- a/includes/dao/DBAccessBase.php
+++ b/includes/dao/DBAccessBase.php
@@ -1,5 +1,7 @@
 

[MediaWiki-commits] [Gerrit] mediawiki...RemexHtml[master]: Explain "fast not elegant" in README.md

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

Change subject: Explain "fast not elegant" in README.md
..

Explain "fast not elegant" in README.md

Per Subbu's suggestion

Change-Id: I41b6c63ca937e2eda295dd0aa03f3ad04292ba25
---
M README.md
1 file changed, 3 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/libs/RemexHtml 
refs/changes/96/339596/1

diff --git a/README.md b/README.md
index ebc416e..cf12074 100644
--- a/README.md
+++ b/README.md
@@ -6,7 +6,9 @@
 RemexHtml aims to be:
 
 - Modular and flexible.
-- Fast, as opposed to elegant.
+- Fast, as opposed to elegant. For example, we sometimes use direct member
+  access instead of going through accessors, and manually inline some
+  performance-sensitive code.
 - Robust, aiming for O(N) worst-case performance.
 
 RemexHtml contains the following modules:

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I41b6c63ca937e2eda295dd0aa03f3ad04292ba25
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/libs/RemexHtml
Gerrit-Branch: master
Gerrit-Owner: Tim Starling 

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


[MediaWiki-commits] [Gerrit] mediawiki...SpamBlacklist[master]: Move cleanup.php maintenance script to maintenance folder

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

Change subject: Move cleanup.php maintenance script to maintenance folder
..


Move cleanup.php maintenance script to maintenance folder

Change-Id: I8e937738bb9b7c01606fec134372d1491d91ba86
---
R maintenance/cleanup.php
1 file changed, 0 insertions(+), 0 deletions(-)

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



diff --git a/cleanup.php b/maintenance/cleanup.php
similarity index 100%
rename from cleanup.php
rename to maintenance/cleanup.php

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8e937738bb9b7c01606fec134372d1491d91ba86
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SpamBlacklist
Gerrit-Branch: master
Gerrit-Owner: MarcoAurelio 
Gerrit-Reviewer: Jackmcbarn 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: Tim Starling 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: Revert "Support "videoinfo" in batching"

2017-02-23 Thread Arlolra (Code Review)
Arlolra has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/339595 )

Change subject: Revert "Support "videoinfo" in batching"
..

Revert "Support "videoinfo" in batching"

 * Batching already returns thumbdata in the proposed api from T51896,
   so let's make use of that by implementing getAPIData in the
   TimedMediaHandler extension.

This reverts commit 2ed7d11109d95b1261a9f246406160f242c73948.

Change-Id: I308b7ff963b63d06f6380e45ec596eac296d9aa5
---
M lib/config/WikiConfig.js
M lib/mw/ApiRequest.js
M lib/mw/Batcher.js
3 files changed, 6 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid 
refs/changes/95/339595/1

diff --git a/lib/config/WikiConfig.js b/lib/config/WikiConfig.js
index a08243e..0e12724 100644
--- a/lib/config/WikiConfig.js
+++ b/lib/config/WikiConfig.js
@@ -822,7 +822,7 @@
this.useVideoInfo = Array.isArray(query.parameters)
&& query.parameters.some(function(o) {
return o && o.name === 'prop' && 
o.type.indexOf('videoinfo') > -1;
-   }) && !env.conf.parsoid.useBatchAPI;  // Disabled for batching 
until deployed
+   });
}.bind(this));
 };
 
diff --git a/lib/mw/ApiRequest.js b/lib/mw/ApiRequest.js
index 51f1845..646e479 100644
--- a/lib/mw/ApiRequest.js
+++ b/lib/mw/ApiRequest.js
@@ -844,8 +844,7 @@
mangled = manglePreprocessorResponse(this.env, 
itemResponse);
break;
case 'imageinfo':
-   case 'videoinfo':
-   mangled = { batchResponse: itemResponse };
+   mangled = {batchResponse: itemResponse};
break;
default:
error = new Error("BatchRequest._handleJSON: 
Invalid action");
diff --git a/lib/mw/Batcher.js b/lib/mw/Batcher.js
index 8cee7fe..db3c53d 100644
--- a/lib/mw/Batcher.js
+++ b/lib/mw/Batcher.js
@@ -269,18 +269,17 @@
  */
 Batcher.prototype.imageinfo = Promise.method(function(filename, dims) {
var env = this.env;
-   var action = env.conf.wiki.useVideoInfo ? 'videoinfo' : 'imageinfo';
-   var hash = Util.makeHash([action, filename, dims.width || "", 
dims.height || "", env.page.name]);
+   var hash = Util.makeHash(["imageinfo", filename, dims.width || "", 
dims.height || "", env.page.name]);
if (hash in this.resultCache) {
return this.resultCache[hash];
} else if (!env.conf.parsoid.useBatchAPI) {
-   this.trace('Non-batched ' + action + ' request');
+   this.trace("Non-batched imageinfo request");
return this.legacyRequest(api.ImageInfoRequest, [
env, filename, dims, hash,
], hash);
} else {
var params = {
-   action: action,
+   action: "imageinfo",
filename: filename,
hash: hash,
page: env.page.name,
@@ -337,7 +336,7 @@
var apiItemParams;
for (i = 0; i < batchParams.length; i++) {
params = batchParams[i];
-   if (params.action === 'imageinfo' || params.action === 
'videoinfo') {
+   if (params.action === 'imageinfo') {
apiItemParams = {
action: params.action,
filename: params.filename,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I308b7ff963b63d06f6380e45ec596eac296d9aa5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Arlolra 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: installer: Fix "relation 'user' does not exist" error for Po...

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

Change subject: installer: Fix "relation 'user' does not exist" error for 
Postgres
..


installer: Fix "relation 'user' does not exist" error for Postgres

On Travis CI, the Postgres build has been failing very early on
in the installer (before phpunit) due to a database error:

> Creating administrator user account.. DBQueryError at Database.php:1059
> Query: SELECT user_id FROM "user" WHERE user_name = 'Admin' LIMIT 1
> Function: User::idForName
> Error: 42P01 ERROR:  relation "user" does not exist
> LINE 1: SELECT /* User::idForName  */ user_id FROM "user" ...

This is because the installer makes its own Database object without
involving ServiceWiring or MWLBFactory, which means wgDBport and
(more importantly) 'keywordTableMap' don't get applied.

While keywordTableMap doesn't matter during the database installation,
after the installer is done updating GlobalVarConfig and resetting
MediaWikiServices, DatabaseInstaller::enableLB takes that homemade
connection and injects it into MediaWikiServices by redefining
the 'DBLoadBalancerFactory' service. Which then affects all use
of wfGetDB(), such as from User::idForName().

Bug: T30162
Bug: T75174
Bug: T75176
Change-Id: I7af58c4beffc4908a93c0c1d8ab1aec9d4ec57c6
---
M includes/db/MWLBFactory.php
M includes/installer/MssqlInstaller.php
M includes/installer/PostgresInstaller.php
3 files changed, 8 insertions(+), 1 deletion(-)

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



diff --git a/includes/db/MWLBFactory.php b/includes/db/MWLBFactory.php
index 0186222..fe063f2 100644
--- a/includes/db/MWLBFactory.php
+++ b/includes/db/MWLBFactory.php
@@ -59,6 +59,9 @@
'readOnlyReason' => wfConfiguredReadOnlyReason(),
];
 
+   // When making changes here, remember to also specify 
MediaWiki-specific options
+   // for Database classes in the relevant Installer subclass.
+   // Such as MysqlInstaller::openConnection and 
PostgresInstaller::openConnectionWithParams.
if ( $lbConf['class'] === 'LBFactorySimple' ) {
if ( isset( $lbConf['servers'] ) ) {
// Server array is already explicitly 
configured; leave alone
diff --git a/includes/installer/MssqlInstaller.php 
b/includes/installer/MssqlInstaller.php
index 5e8ed3f..d6efeb2 100644
--- a/includes/installer/MssqlInstaller.php
+++ b/includes/installer/MssqlInstaller.php
@@ -214,6 +214,7 @@
try {
$db = Database::factory( 'mssql', [
'host' => $this->getVar( 'wgDBserver' ),
+   'port' => $this->getVar( 'wgDBport' ),
'user' => $user,
'password' => $password,
'dbname' => false,
diff --git a/includes/installer/PostgresInstaller.php 
b/includes/installer/PostgresInstaller.php
index 6dfa28b..906768f 100644
--- a/includes/installer/PostgresInstaller.php
+++ b/includes/installer/PostgresInstaller.php
@@ -156,10 +156,13 @@
try {
$db = Database::factory( 'postgres', [
'host' => $this->getVar( 'wgDBserver' ),
+   'port' => $this->getVar( 'wgDBport' ),
'user' => $user,
'password' => $password,
'dbname' => $dbName,
-   'schema' => $schema ] );
+   'schema' => $schema,
+   'keywordTableMap' => [ 'user' => 'mwuser', 
'text' => 'pagecontent' ],
+   ] );
$status->value = $db;
} catch ( DBConnectionError $e ) {
$status->fatal( 'config-connection-error', 
$e->getMessage() );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7af58c4beffc4908a93c0c1d8ab1aec9d4ec57c6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Krinkle 
Gerrit-Reviewer: BryanDavis 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: build: Change Travis postgres user "root" back to "travis"

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

Change subject: build: Change Travis postgres user "root" back to "travis"
..


build: Change Travis postgres user "root" back to "travis"

Follows-up 5168cb60f8f, in which we moved from Precise vms to Trusty vms.
As a side-effect, the undocumented behaviour of the mysql user "travis"
having create-db rights was no longer. As such, we changed it to "root",
per .

However, this broke Postgres builds since those should still use
"travis". There is no user named "root" for postgres.

* Add 'dbuser' to the matrix environment.
* Improve inline documentation.

Bug: T75176
Change-Id: I09fc0a1da8737e71b3d2b4b88d72b58c150519c4
---
M .travis.yml
1 file changed, 16 insertions(+), 9 deletions(-)

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



diff --git a/.travis.yml b/.travis.yml
index ec7bac3..f2cb40e 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -7,23 +7,30 @@
 # complement that setup by testing MediaWiki on travis
 #
 language: php
-# Using HHVM-3.6+ requires Trusty (Travis default: precise)
-# https://docs.travis-ci.com/user/languages/php#HHVM-versions
-# https://github.com/travis-ci/travis-ci/issues/7368
+# Use the slower sudo-enabled VMs instead of fast containers:
+# - Package 'djvulibre-bin' is not yet whitelisted for trusty containers.
+#   https://github.com/travis-ci/apt-package-whitelist/issues/4036
 sudo: required
 group: edge
+# Use Trusty instead of Travis default (precise)
+# - Required in order to use HHVM 3.6 or higher.
+# - Required for non-buggy xml library for XmlTypeCheck/UploadBaseTest 
(T75176).
 dist: trusty
 
 matrix:
   fast_finish: true
   include:
-- env: dbtype=mysql
+# On Trusty, mysql user 'travis' doesn't have create database rights
+# Postgres has no user called 'root'.
+- env: dbtype=mysql dbuser=root
   php: 5.5
-- env: dbtype=postgres
+- env: dbtype=postgres dbuser=travis
   php: 5.5
-- env: dbtype=mysql
+- env: dbtype=mysql dbuser=root
+  # https://docs.travis-ci.com/user/languages/php#HHVM-versions
+  # https://github.com/travis-ci/travis-ci/issues/7368
   php: hhvm-3.12
-- env: dbtype=mysql
+- env: dbtype=mysql dbuser=root
   php: 7
 
 services:
@@ -32,7 +39,7 @@
 branches:
   # Test changes in master and arbitrary Travis CI branches only.
   # The latter allows developers to enable Travis CI in their GitHub fork of
-  # wikimedia/mediawiki and then push changes they like to test to branches 
like
+  # wikimedia/mediawiki and then push changes for testing to branches like
   # "travis-ci/test-this-awesome-change".
   only:
 - master
@@ -50,7 +57,7 @@
   --pass travis
   --dbtype "$dbtype"
   --dbname traviswiki
-  --dbuser root
+  --dbuser "$dbuser"
   --dbpass ""
   --scriptpath "/w"
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I09fc0a1da8737e71b3d2b4b88d72b58c150519c4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Krinkle 
Gerrit-Reviewer: BryanDavis 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: build: Simplify Travis configuration

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

Change subject: build: Simplify Travis configuration
..


build: Simplify Travis configuration

* Remove redundant 'group: edge'. Use the default (stable) instead.
* Use simplified syntax for apt packages. On sudo-enabled VMs, like we
  use now, this translates to the same command. But has the benefit
  of being compatible with the fast non-sudo containers, which we
  want to use in the future. But, for that, djvulibre-bin needs to
  be approved first.
  

Bug: T75176
Change-Id: I3b42763ef3f8f08eec08a9008e5cf1e161bb1dff
---
M .travis.yml
1 file changed, 5 insertions(+), 4 deletions(-)

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



diff --git a/.travis.yml b/.travis.yml
index f2cb40e..5e2c7a0 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -11,7 +11,6 @@
 # - Package 'djvulibre-bin' is not yet whitelisted for trusty containers.
 #   https://github.com/travis-ci/apt-package-whitelist/issues/4036
 sudo: required
-group: edge
 # Use Trusty instead of Travis default (precise)
 # - Required in order to use HHVM 3.6 or higher.
 # - Required for non-buggy xml library for XmlTypeCheck/UploadBaseTest 
(T75176).
@@ -45,9 +44,11 @@
 - master
 - /^travis-ci\/.*$/
 
-before_install:
-  - sudo apt-get install -qq djvulibre-bin tidy
-  - composer self-update --quiet --no-interaction
+addons:
+  apt:
+packages:
+- djvulibre-bin
+- tidy
 
 before_script:
   - composer install --prefer-source --quiet --no-interaction

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3b42763ef3f8f08eec08a9008e5cf1e161bb1dff
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Krinkle 
Gerrit-Reviewer: BryanDavis 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: build: Change Travis postgres user "root" back to "travis"

2017-02-23 Thread Krinkle (Code Review)
Krinkle has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/339592 )

Change subject: build: Change Travis postgres user "root" back to "travis"
..

build: Change Travis postgres user "root" back to "travis"

Follows-up 5168cb60f8f, in which we moved from Precise vms to Trusty vms.
As a side-effect, the undocumented behaviour of the mysql user "travis"
having create-db rights was no longer. As such, we changed it to "root",
per .

However, this broke Postgres builds since those should still use
"travis". There is no user named "root" for postgres.

* Add 'dbuser' to the matrix environment.
* Improve inline documentation.

Bug: T75176
Change-Id: I09fc0a1da8737e71b3d2b4b88d72b58c150519c4
---
M .travis.yml
1 file changed, 16 insertions(+), 9 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/92/339592/1

diff --git a/.travis.yml b/.travis.yml
index ec7bac3..f2cb40e 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -7,23 +7,30 @@
 # complement that setup by testing MediaWiki on travis
 #
 language: php
-# Using HHVM-3.6+ requires Trusty (Travis default: precise)
-# https://docs.travis-ci.com/user/languages/php#HHVM-versions
-# https://github.com/travis-ci/travis-ci/issues/7368
+# Use the slower sudo-enabled VMs instead of fast containers:
+# - Package 'djvulibre-bin' is not yet whitelisted for trusty containers.
+#   https://github.com/travis-ci/apt-package-whitelist/issues/4036
 sudo: required
 group: edge
+# Use Trusty instead of Travis default (precise)
+# - Required in order to use HHVM 3.6 or higher.
+# - Required for non-buggy xml library for XmlTypeCheck/UploadBaseTest 
(T75176).
 dist: trusty
 
 matrix:
   fast_finish: true
   include:
-- env: dbtype=mysql
+# On Trusty, mysql user 'travis' doesn't have create database rights
+# Postgres has no user called 'root'.
+- env: dbtype=mysql dbuser=root
   php: 5.5
-- env: dbtype=postgres
+- env: dbtype=postgres dbuser=travis
   php: 5.5
-- env: dbtype=mysql
+- env: dbtype=mysql dbuser=root
+  # https://docs.travis-ci.com/user/languages/php#HHVM-versions
+  # https://github.com/travis-ci/travis-ci/issues/7368
   php: hhvm-3.12
-- env: dbtype=mysql
+- env: dbtype=mysql dbuser=root
   php: 7
 
 services:
@@ -32,7 +39,7 @@
 branches:
   # Test changes in master and arbitrary Travis CI branches only.
   # The latter allows developers to enable Travis CI in their GitHub fork of
-  # wikimedia/mediawiki and then push changes they like to test to branches 
like
+  # wikimedia/mediawiki and then push changes for testing to branches like
   # "travis-ci/test-this-awesome-change".
   only:
 - master
@@ -50,7 +57,7 @@
   --pass travis
   --dbtype "$dbtype"
   --dbname traviswiki
-  --dbuser root
+  --dbuser "$dbuser"
   --dbpass ""
   --scriptpath "/w"
 

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: installer: Fix "relation 'user' does not exist" error for Po...

2017-02-23 Thread Krinkle (Code Review)
Krinkle has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/339594 )

Change subject: installer: Fix "relation 'user' does not exist" error for 
Postgres
..

installer: Fix "relation 'user' does not exist" error for Postgres

On Travis CI, the Postgres build has been failing very early on
in the installer (before phpunit) due to a database error:

> Creating administrator user account.. DBQueryError at Database.php:1059
> Query: SELECT user_id FROM "user" WHERE user_name = 'Admin' LIMIT 1
> Function: User::idForName
> Error: 42P01 ERROR:  relation "user" does not exist
> LINE 1: SELECT /* User::idForName  */ user_id FROM "user" ...

This is because the installer makes its own Database object without
involving ServiceWiring or MWLBFactory, which means wgDBport and
(more importantly) 'keywordTableMap' don't get applied.

While keywordTableMap doesn't matter during the database installation,
after the installer is done updating GlobalVarConfig and resetting
MediaWikiServices, DatabaseInstaller::enableLB takes that homemade
connection and injects it into MediaWikiServices by redefining
the 'DBLoadBalancerFactory' service. Which then affects all use
of wfGetDB(), such as from User::idForName().

Bug: T30162
Bug: T75174
Bug: T75176
Change-Id: I7af58c4beffc4908a93c0c1d8ab1aec9d4ec57c6
---
M includes/db/MWLBFactory.php
M includes/installer/MssqlInstaller.php
M includes/installer/PostgresInstaller.php
3 files changed, 8 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/94/339594/1

diff --git a/includes/db/MWLBFactory.php b/includes/db/MWLBFactory.php
index 0186222..fe063f2 100644
--- a/includes/db/MWLBFactory.php
+++ b/includes/db/MWLBFactory.php
@@ -59,6 +59,9 @@
'readOnlyReason' => wfConfiguredReadOnlyReason(),
];
 
+   // When making changes here, remember to also specify 
MediaWiki-specific options
+   // for Database classes in the relevant Installer subclass.
+   // Such as MysqlInstaller::openConnection and 
PostgresInstaller::openConnectionWithParams.
if ( $lbConf['class'] === 'LBFactorySimple' ) {
if ( isset( $lbConf['servers'] ) ) {
// Server array is already explicitly 
configured; leave alone
diff --git a/includes/installer/MssqlInstaller.php 
b/includes/installer/MssqlInstaller.php
index 5e8ed3f..d6efeb2 100644
--- a/includes/installer/MssqlInstaller.php
+++ b/includes/installer/MssqlInstaller.php
@@ -214,6 +214,7 @@
try {
$db = Database::factory( 'mssql', [
'host' => $this->getVar( 'wgDBserver' ),
+   'port' => $this->getVar( 'wgDBport' ),
'user' => $user,
'password' => $password,
'dbname' => false,
diff --git a/includes/installer/PostgresInstaller.php 
b/includes/installer/PostgresInstaller.php
index 6dfa28b..906768f 100644
--- a/includes/installer/PostgresInstaller.php
+++ b/includes/installer/PostgresInstaller.php
@@ -156,10 +156,13 @@
try {
$db = Database::factory( 'postgres', [
'host' => $this->getVar( 'wgDBserver' ),
+   'port' => $this->getVar( 'wgDBport' ),
'user' => $user,
'password' => $password,
'dbname' => $dbName,
-   'schema' => $schema ] );
+   'schema' => $schema,
+   'keywordTableMap' => [ 'user' => 'mwuser', 
'text' => 'pagecontent' ],
+   ] );
$status->value = $db;
} catch ( DBConnectionError $e ) {
$status->fatal( 'config-connection-error', 
$e->getMessage() );

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: build: Simplify Travis configuration

2017-02-23 Thread Krinkle (Code Review)
Krinkle has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/339593 )

Change subject: build: Simplify Travis configuration
..

build: Simplify Travis configuration

* Remove redundant 'group: edge'. Use the default (stable) instead.
* Use simplified syntax for apt packages. On sudo-enabled VMs, like we
  use now, this translates to the same command. But has the benefit
  of being compatible with the fast non-sudo containers, which we
  want to use in the future. But, for that, djvulibre-bin needs to
  be approved first.
  

Bug: T75176
Change-Id: I3b42763ef3f8f08eec08a9008e5cf1e161bb1dff
---
M .travis.yml
1 file changed, 5 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/93/339593/1

diff --git a/.travis.yml b/.travis.yml
index f2cb40e..5e2c7a0 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -11,7 +11,6 @@
 # - Package 'djvulibre-bin' is not yet whitelisted for trusty containers.
 #   https://github.com/travis-ci/apt-package-whitelist/issues/4036
 sudo: required
-group: edge
 # Use Trusty instead of Travis default (precise)
 # - Required in order to use HHVM 3.6 or higher.
 # - Required for non-buggy xml library for XmlTypeCheck/UploadBaseTest 
(T75176).
@@ -45,9 +44,11 @@
 - master
 - /^travis-ci\/.*$/
 
-before_install:
-  - sudo apt-get install -qq djvulibre-bin tidy
-  - composer self-update --quiet --no-interaction
+addons:
+  apt:
+packages:
+- djvulibre-bin
+- tidy
 
 before_script:
   - composer install --prefer-source --quiet --no-interaction

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...luasandbox[master]: Fix getProfilerFunctionReport sorting in HHVM

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

Change subject: Fix getProfilerFunctionReport sorting in HHVM
..


Fix getProfilerFunctionReport sorting in HHVM

HHVM has a bug in their zend_hash_sort() where it ignores the passed
'compar' function, instead always doing a ksort. This breaks
getProfilerFunctionReport(). It's said to be unlikely that HHVM would
care enough to fix this.

On the plus side, HHVM has ext_luasandbox.php where we can put actual
PHP code to wrap the method and call arsort() to do the sorting.

Bug: T158029
Change-Id: I0a6d60fd981ab41f8b39b93f0164ee35214e6147
---
M ext_luasandbox.php
M luasandbox.c
M php_luasandbox.h
A tests/profiler-sorting.phpt
4 files changed, 94 insertions(+), 2 deletions(-)

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



diff --git a/ext_luasandbox.php b/ext_luasandbox.php
index a868ea4..f838865 100644
--- a/ext_luasandbox.php
+++ b/ext_luasandbox.php
@@ -13,7 +13,14 @@
<<__Native("ZendCompat")>> function unpauseUsageTimer(): mixed;
<<__Native("ZendCompat")>> function enableProfiler(mixed $period): 
mixed;
<<__Native("ZendCompat")>> function disableProfiler(): mixed;
-   <<__Native("ZendCompat")>> function getProfilerFunctionReport(mixed 
$units): mixed;
+   <<__Native("ZendCompat")>> private final function 
_internal_getProfilerFunctionReport(mixed $units): mixed;
+
+   public function getProfilerFunctionReport(mixed $units): mixed {
+   $report = $this->_internal_getProfilerFunctionReport( $units );
+   arsort( $report );
+   return $report;
+   }
+
<<__Native("ZendCompat")>> function callFunction(mixed $name): mixed;
<<__Native("ZendCompat")>> function wrapPhpFunction(mixed $name, mixed 
$function): mixed;
<<__Native("ZendCompat")>> function registerLibrary(mixed $libname, 
mixed $functions): mixed;
diff --git a/luasandbox.c b/luasandbox.c
index b386baf..942a2e1 100644
--- a/luasandbox.c
+++ b/luasandbox.c
@@ -193,7 +193,13 @@
PHP_ME(LuaSandbox, unpauseUsageTimer, 
arginfo_luasandbox_unpauseUsageTimer, 0)
PHP_ME(LuaSandbox, enableProfiler, arginfo_luasandbox_enableProfiler, 0)
PHP_ME(LuaSandbox, disableProfiler, arginfo_luasandbox_disableProfiler, 
0)
+#ifdef HHVM
+   // We need to wrap this method in ext_luasandbox.php for HHVM
+   PHP_ME(LuaSandbox, _internal_getProfilerFunctionReport, 
arginfo_luasandbox_getProfilerFunctionReport,
+   ZEND_ACC_PRIVATE | ZEND_ACC_FINAL)
+#else
PHP_ME(LuaSandbox, getProfilerFunctionReport, 
arginfo_luasandbox_getProfilerFunctionReport, 0)
+#endif
PHP_ME(LuaSandbox, callFunction, arginfo_luasandbox_callFunction, 0)
PHP_ME(LuaSandbox, wrapPhpFunction, arginfo_luasandbox_wrapPhpFunction, 
0)
PHP_ME(LuaSandbox, registerLibrary, arginfo_luasandbox_registerLibrary, 
0)
@@ -977,6 +983,7 @@
 }
 /* }}} */
 
+#ifndef HHVM
 static int luasandbox_sort_profile(const void *a, const void *b TSRMLS_DC) /* 
{{{ */
 {
Bucket *bucket_a, *bucket_b;
@@ -1004,6 +1011,7 @@
 }
 
 /* }}} */
+#endif
 
 /* {{{ proto array LuaSandbox::getProfilerFunctionReport(int what = 
LuaSandbox::SECONDS)
  *
@@ -1017,7 +1025,12 @@
  *   - LuaSandbox::SECONDS: Measure in seconds of CPU time (default)
  *   - LuaSandbox::PERCENT: Measure percentage of CPU time
  */
+#ifdef HHVM
+// We need to wrap this method in ext_luasandbox.php for HHVM
+PHP_METHOD(LuaSandbox, _internal_getProfilerFunctionReport)
+#else
 PHP_METHOD(LuaSandbox, getProfilerFunctionReport)
+#endif
 {
long_param_t units = LUASANDBOX_SECONDS;
php_luasandbox_obj * sandbox = GET_LUASANDBOX_OBJ(getThis());
@@ -1041,7 +1054,10 @@
}
 
// Sort the input array in descending order of time usage
-#if PHP_VERSION_ID < 7
+#ifdef HHVM
+   // HHVM's zend_hash_sort ignores the compar argument. The sorting is 
done
+   // in the systemlib instead.
+#elif PHP_VERSION_ID < 7
zend_hash_sort(counts, zend_qsort, luasandbox_sort_profile, 0 
TSRMLS_CC);
 #else
zend_hash_sort_ex(counts, zend_qsort, luasandbox_sort_profile, 0);
diff --git a/php_luasandbox.h b/php_luasandbox.h
index b5dc6a4..740095c 100644
--- a/php_luasandbox.h
+++ b/php_luasandbox.h
@@ -57,7 +57,11 @@
 PHP_METHOD(LuaSandbox, unpauseUsageTimer);
 PHP_METHOD(LuaSandbox, enableProfiler);
 PHP_METHOD(LuaSandbox, disableProfiler);
+#ifdef HHVM
+PHP_METHOD(LuaSandbox, _internal_getProfilerFunctionReport);
+#else
 PHP_METHOD(LuaSandbox, getProfilerFunctionReport);
+#endif
 PHP_METHOD(LuaSandbox, callFunction);
 PHP_METHOD(LuaSandbox, wrapPhpFunction);
 PHP_METHOD(LuaSandbox, registerLibrary);
diff --git a/tests/profiler-sorting.phpt b/tests/profiler-sorting.phpt
new file mode 100644
index 000..c2d4426
--- /dev/null
+++ b/tests/profiler-sorting.phpt
@@ -0,0 +1,65 

[MediaWiki-commits] [Gerrit] mediawiki...luasandbox[master]: Fix getProfilerFunctionReport 'seconds' and 'percent' output...

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

Change subject: Fix getProfilerFunctionReport 'seconds' and 'percent' output in 
PHP7
..


Fix getProfilerFunctionReport 'seconds' and 'percent' output in PHP7

It was using an integer data type instead of a double.

Change-Id: I5968c6d71f9e1beee07fdffe51a0e9eef8baaed2
---
M luasandbox.c
M tests/profiler.phpt
2 files changed, 9 insertions(+), 1 deletion(-)

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



diff --git a/luasandbox.c b/luasandbox.c
index ec83690..b386baf 100644
--- a/luasandbox.c
+++ b/luasandbox.c
@@ -1089,7 +1089,7 @@
if (units == LUASANDBOX_SAMPLES) {
zend_hash_add(Z_ARRVAL_P(return_value), key, count);
} else {
-   ZVAL_LONG(, Z_LVAL_P(count) * scale);
+   ZVAL_DOUBLE(, Z_LVAL_P(count) * scale);
zend_hash_add(Z_ARRVAL_P(return_value), key, );
}
} ZEND_HASH_FOREACH_END();
diff --git a/tests/profiler.phpt b/tests/profiler.phpt
index 0befd5b..1c058ce 100644
--- a/tests/profiler.phpt
+++ b/tests/profiler.phpt
@@ -23,6 +23,9 @@
 
 echo "Samples: " . $sandbox->getProfilerFunctionReport( LuaSandbox::SAMPLES 
)['clock'] . "\n";
 echo "Seconds: " . $sandbox->getProfilerFunctionReport( LuaSandbox::SECONDS 
)['clock'] . "\n";
+echo "Seconds > 0: "
+   . ( $sandbox->getProfilerFunctionReport( LuaSandbox::SECONDS )['clock'] 
> 0 ? 'yes' : 'no' )
+   . "\n";
 echo "Percent: " . $sandbox->getProfilerFunctionReport( LuaSandbox::PERCENT 
)['clock'] . "\n";
 
 // Test that re-enabling the profiler doesn't explode
@@ -32,6 +35,9 @@
 
 echo "Samples: " . $sandbox->getProfilerFunctionReport( LuaSandbox::SAMPLES 
)['clock'] . "\n";
 echo "Seconds: " . $sandbox->getProfilerFunctionReport( LuaSandbox::SECONDS 
)['clock'] . "\n";
+echo "Seconds > 0: "
+   . ( $sandbox->getProfilerFunctionReport( LuaSandbox::SECONDS )['clock'] 
> 0 ? 'yes' : 'no' )
+   . "\n";
 echo "Percent: " . $sandbox->getProfilerFunctionReport( LuaSandbox::PERCENT 
)['clock'] . "\n";
 
 // Test that disabling the profiler doesn't explode
@@ -43,7 +49,9 @@
 --EXPECTF--
 Samples: %d
 Seconds: %f
+Seconds > 0: yes
 Percent: %f
 Samples: %d
 Seconds: %f
+Seconds > 0: yes
 Percent: %f

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5968c6d71f9e1beee07fdffe51a0e9eef8baaed2
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/php/luasandbox
Gerrit-Branch: master
Gerrit-Owner: Anomie 
Gerrit-Reviewer: Anomie 
Gerrit-Reviewer: Tim Starling 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...luasandbox[master]: Fix HHVM test script

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

Change subject: Fix HHVM test script
..


Fix HHVM test script

The HHVM config used by Jenkins sets hhvm.dynamic_extension_path to
something other than the default '.', which results in the script
testing the system luasandbox.so instead of the one that was just
compiled. Avoid that issue by specifying the full path to the
just-complied luasandbox.so.

Change-Id: I958c0a105db52bf6cd6ffb42bb05c69d707b9dcd
---
M hhvm-test.sh
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/hhvm-test.sh b/hhvm-test.sh
index 1446426..682aa31 100755
--- a/hhvm-test.sh
+++ b/hhvm-test.sh
@@ -1,4 +1,4 @@
 #!/bin/sh
 # First run `phpize`, and then ./hhvm-test.sh run-tests.php
 export TEST_PHP_EXECUTABLE=$0
-hhvm -d "hhvm.dynamic_extensions[luasandbox]=luasandbox.so" "$@"
+hhvm -d "hhvm.dynamic_extensions[luasandbox]=$(pwd)/luasandbox.so" "$@"

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I958c0a105db52bf6cd6ffb42bb05c69d707b9dcd
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/php/luasandbox
Gerrit-Branch: master
Gerrit-Owner: Anomie 
Gerrit-Reviewer: Tim Starling 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...CollaborationKit[master]: CreateHubFeature layout improvements

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

Change subject: CreateHubFeature layout improvements
..


CreateHubFeature layout improvements

Bug: T158279
Change-Id: I8ba6fa82858be97feea2496e50aa30111bde5021
---
M extension.json
M includes/SpecialCreateHubFeature.php
M includes/content/CollaborationListContentHandler.php
A modules/ext.CollaborationKit.createhubfeature.styles.less
M modules/ext.CollaborationKit.edit.styles.less
M modules/ext.CollaborationKit.iconbrowser.js
M modules/ext.CollaborationKit.iconbrowser.styles.less
7 files changed, 63 insertions(+), 35 deletions(-)

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



diff --git a/extension.json b/extension.json
index 213e22c..282a35d 100644
--- a/extension.json
+++ b/extension.json
@@ -95,6 +95,9 @@
"ext.CollaborationKit.edit.styles": {
"styles": "ext.CollaborationKit.edit.styles.less"
},
+   "ext.CollaborationKit.createhubfeature.styles": {
+   "styles": 
"ext.CollaborationKit.createhubfeature.styles.less"
+   },
"ext.CollaborationKit.iconbrowser": {
"scripts": "ext.CollaborationKit.iconbrowser.js",
"dependencies": [
diff --git a/includes/SpecialCreateHubFeature.php 
b/includes/SpecialCreateHubFeature.php
index 6350327..c8dca00 100644
--- a/includes/SpecialCreateHubFeature.php
+++ b/includes/SpecialCreateHubFeature.php
@@ -19,7 +19,10 @@
public function execute( $par ) {
$output = $this->getContext()->getOutput();
$output->addModules( 'ext.CollaborationKit.iconbrowser' );
-   $output->addModuleStyles( 'ext.CollaborationKit.edit.styles' );
+   $output->addModuleStyles( [
+   'ext.CollaborationKit.createhubfeature.styles',
+   'ext.CollaborationKit.edit.styles'
+   ] );
$output->addJsConfigVars( 'wgCollaborationKitIconList', 
CollaborationKitImage::getCannedIcons() );
parent::execute( $par );
}
@@ -48,7 +51,7 @@
$fields = [
'collaborationhub' => [
'type' => 'title',
-   'cssclass' => 'mw-ck-title-input',
+   'cssclass' => 'mw-ck-fulltitle-input',
'label-message' => 
'collaborationkit-createhubfeature-collaborationhub',
'default' => $defaultCollabHub
],
diff --git a/includes/content/CollaborationListContentHandler.php 
b/includes/content/CollaborationListContentHandler.php
index 36c..d8f11c3 100644
--- a/includes/content/CollaborationListContentHandler.php
+++ b/includes/content/CollaborationListContentHandler.php
@@ -1,5 +1,4 @@
 .
// CONTENT_FORMAT_TEXT is for back-compat with old revs. Could 
be removed.
-
// @todo Ideally, we'd have the preferred format for editing be 
self::FORMAT_WIKI
// and the preferred format for db be CONTENT_FORMAT_JSON. 
Unclear if that's
// possible.
parent::__construct( $modelId, $formats );
}
-
/**
 * Can this content handler be used on a given page?
 *
@@ -34,13 +28,11 @@
 */
public function canBeUsedOn( Title $title ) {
global $wgCollaborationListAllowedNamespaces;
-
if ( in_array( $title->getNamespace(), array_keys( 
array_filter( $wgCollaborationListAllowedNamespaces ) ) ) ) {
return true;
}
return false;
}
-
/**
 * Takes JSON string and creates a new CollaborationListContent object.
 *
@@ -60,7 +52,6 @@
$content = new CollaborationListContent( $text );
return $content;
}
-
/**
 * Prepares a serialization of the content object.
 *
@@ -74,7 +65,6 @@
}
return parent::serializeContent( $content, $format );
}
-
/**
 * @return CollaborationListContent
 */
@@ -91,7 +81,6 @@
 JSON;
return new CollaborationListContent( $empty );
}
-
/**
 * Spawns a new "members" list, using the project creator as initial 
member.
 *
@@ -113,26 +102,21 @@
],
'description' => "$initialDescription"  // Do not take 
out these quote marks
];
-
$newMemberListJson = FormatJson::encode( $newMemberList, "\t", 
FormatJson::ALL_OK );
-
return new CollaborationListContent( $newMemberListJson );
}
-
/**
 * @return string
 */

[MediaWiki-commits] [Gerrit] mediawiki...SocialProfile[master]: Add missing i18n action-* messages for associated right-* me...

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

Change subject: Add missing i18n action-* messages for associated right-* 
messages
..


Add missing i18n action-* messages for associated right-* messages

The following messages were added:
- action-updatepoints
- action-generatetopusersreport
- action-giftadmin
- action-userboard-delete
- action-awardsmanage

Change-Id: Id9611c51b56187cccb74e1cceec854399ad0dd9a
---
M SystemGifts/i18n/en.json
M UserBoard/i18n/en.json
M UserGifts/i18n/en.json
M UserStats/i18n/en.json
4 files changed, 7 insertions(+), 2 deletions(-)

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



diff --git a/SystemGifts/i18n/en.json b/SystemGifts/i18n/en.json
index 0056811..305ba91 100644
--- a/SystemGifts/i18n/en.json
+++ b/SystemGifts/i18n/en.json
@@ -72,5 +72,6 @@
"echo-pref-tooltip-social-award": "Notify me when I receive an award.",
"notification-social-award-rec": "You have received a new award: $1.",
"notification-social-award-rec-bundle": "You have received 
{{PLURAL:$1|one new award|$1 new awards}}.",
-   "right-awardsmanage": "Create new and edit existing awards"
+   "right-awardsmanage": "Create new and edit existing awards",
+   "action-awardsmanage": "create new and edit existing awards"
 }
diff --git a/UserBoard/i18n/en.json b/UserBoard/i18n/en.json
index 25a9a0e..76ef97e 100644
--- a/UserBoard/i18n/en.json
+++ b/UserBoard/i18n/en.json
@@ -47,6 +47,7 @@
"userboard_loggedout": "You must be [[Special:UserLogin|logged in]] to 
post messages to other users.",
"userboard_showingmessages": "Showing {{PLURAL:$4|message $3|messages 
$2-$3}} of {{PLURAL:$1|$1 message|$1 messages}}.",
"right-userboard-delete": "Delete others' board messages",
+   "action-userboard-delete": "delete others' board messages",
"userboard-time-days": "{{PLURAL:$1|one day|$1 days}}",
"userboard-time-hours": "{{PLURAL:$1|one hour|$1 hours}}",
"userboard-time-minutes": "{{PLURAL:$1|one minute|$1 minutes}}",
diff --git a/UserGifts/i18n/en.json b/UserGifts/i18n/en.json
index 810bbdf..e66aa56 100644
--- a/UserGifts/i18n/en.json
+++ b/UserGifts/i18n/en.json
@@ -84,5 +84,6 @@
"notification-social-gift-send-no-message": "$1 just sent a gift to 
you: $2.",
"notification-social-gift-send-with-message": "$1 just sent a gift to 
you: $2.''$3''",
"notification-social-gift-send-bundle": "{{PLURAL:$1|One person|$1 
people}} sent you gifts.",
-   "right-giftadmin": "Create new and edit existing gifts"
+   "right-giftadmin": "Create new and edit existing gifts",
+   "action-giftadmin": "create new and edit existing gifts"
 }
diff --git a/UserStats/i18n/en.json b/UserStats/i18n/en.json
index 77bffb8..f739de5 100644
--- a/UserStats/i18n/en.json
+++ b/UserStats/i18n/en.json
@@ -48,7 +48,9 @@
"top-fans-stats-gifts-rec-count": "{{PLURAL:$1|Gift received|Gifts 
received}}",
"top-fans-stats-gifts-sent-count": "{{PLURAL:$1|Gift sent|Gifts sent}}",
"right-updatepoints": "Update edit counts",
+   "action-updatepoints": "update edit counts",
"right-generatetopusersreport": "Generate top users reports",
+   "action-generatetopusersreport": "generate top user reports",
"level-advanced-to": "advanced to level $1",
"level-advance-subject": "You are now a \"$1\" on {{SITENAME}}!",
"level-advance-body-html": "Hi $1.\n\nYou are now a \"$2\" on 
{{SITENAME}}!\n\nCongratulations,\n\nThe {{SITENAME}} team\n\n---\nHey, want to 
stop getting e-mails from us?\n\nClick [[Special:UpdateProfile]]\nand change 
your settings to disable e-mail notifications.",

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

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

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


[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Fix: persist settings screen toolbar on Activity recreation

2017-02-23 Thread Niedzielski (Code Review)
Niedzielski has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/339591 )

Change subject: Fix: persist settings screen toolbar on Activity recreation
..

Fix: persist settings screen toolbar on Activity recreation

Move SettingsFragment toolbar configuration later in the lifecycle. No
lifecycle constraints for setHasOptionsMenu() appears to be documented
but the toolbar no longer disappears.

Bug: T157823
Change-Id: I5ed1516089ef6b0f57f3feff3c5f1b597a7fa848
---
M app/src/main/java/org/wikipedia/settings/SettingsFragment.java
1 file changed, 2 insertions(+), 3 deletions(-)


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

diff --git a/app/src/main/java/org/wikipedia/settings/SettingsFragment.java 
b/app/src/main/java/org/wikipedia/settings/SettingsFragment.java
index cf8bb8f..9511d8e 100644
--- a/app/src/main/java/org/wikipedia/settings/SettingsFragment.java
+++ b/app/src/main/java/org/wikipedia/settings/SettingsFragment.java
@@ -12,9 +12,8 @@
 return new SettingsFragment();
 }
 
-@Override
-public void onCreate(Bundle savedInstanceState) {
-super.onCreate(savedInstanceState);
+@Override public void onActivityCreated(Bundle savedInstanceState) {
+super.onActivityCreated(savedInstanceState);
 setHasOptionsMenu(true);
 }
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5ed1516089ef6b0f57f3feff3c5f1b597a7fa848
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Niedzielski 
Gerrit-Reviewer: Sniedzielski 

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


[MediaWiki-commits] [Gerrit] mediawiki...CollaborationKit[master]: Hub theme widget re-design

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

Change subject: Hub theme widget re-design
..


Hub theme widget re-design

Bug: T157630
Change-Id: I670fce13f2a39d350460f27ac57b0d1ca0521104
---
M extension.json
M i18n/en.json
M i18n/qqq.json
M includes/CollaborationHubContentEditor.php
M includes/SpecialCreateCollaborationHub.php
D modules/ext.CollaborationKit.colour.js
D modules/ext.CollaborationKit.colourbrowser.styles.less
M modules/ext.CollaborationKit.edit.styles.less
D modules/ext.CollaborationKit.hubimage.js
A modules/ext.CollaborationKit.hubtheme.js
A modules/ext.CollaborationKit.hubtheme.styles.less
R modules/ext.CollaborationKit.iconbrowser.js
12 files changed, 580 insertions(+), 449 deletions(-)

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



diff --git a/extension.json b/extension.json
index d2bc720..213e22c 100644
--- a/extension.json
+++ b/extension.json
@@ -96,7 +96,7 @@
"styles": "ext.CollaborationKit.edit.styles.less"
},
"ext.CollaborationKit.iconbrowser": {
-   "scripts": "ext.CollaborationKit.icon.js",
+   "scripts": "ext.CollaborationKit.iconbrowser.js",
"dependencies": [
"oojs-ui",
"oojs-ui.styles.icons-movement",
@@ -112,36 +112,26 @@
],
"styles": "ext.CollaborationKit.iconbrowser.styles.less"
},
-   "ext.CollaborationKit.hubimagebrowser": {
-   "scripts": "ext.CollaborationKit.hubimage.js",
+   "ext.CollaborationKit.hubtheme": {
+   "scripts": "ext.CollaborationKit.hubtheme.js",
"dependencies": [
"oojs-ui",
-   "oojs-ui.styles.icons-movement",
+   "oojs-ui.styles.icons-editing-core",
+   "oojs-ui.styles.icons-moderation",
"mediawiki.widgets",
"mediawiki.widgets.UserInputWidget",
"mediawiki.widgets.MediaSearch",
-   "mediawiki.api"
+   "mediawiki.api",
+   "ext.CollaborationKit.icons"
],
"messages": [
+   "collaborationkit-hubedit-hubtheme",
+   "collaborationkit-hubedit-hubtheme-help",
"collaborationkit-hubimage-browser",
"collaborationkit-hubimage-select",
-   "collaborationkit-hubimage-launchbutton",
-   "cancel"
-   ]
-   },
-   "ext.CollaborationKit.colourbrowser": {
-   "scripts": "ext.CollaborationKit.colour.js",
-   "dependencies": [
-   "oojs-ui",
-   "oojs-ui.styles.icons-movement",
-   "mediawiki.widgets",
-   "mediawiki.widgets.UserInputWidget"
-   ],
-   "messages": [
+   "cancel",
"collaborationkit-colour-browser",
"collaborationkit-colour-select",
-   "collaborationkit-colour-launchbutton",
-   "cancel",
"collaborationkit-darkred",
"collaborationkit-red",
"collaborationkit-darkgrey",
@@ -166,7 +156,9 @@
"collaborationkit-khaki",
"collaborationkit-black"
],
-   "styles": 
"ext.CollaborationKit.colourbrowser.styles.less"
+   "styles": [
+   "ext.CollaborationKit.hubtheme.styles.less"
+   ]
},
"ext.CollaborationKit.list.edit": {
"scripts": "ext.CollaborationKit.list.edit.js",
diff --git a/i18n/en.json b/i18n/en.json
index f52fe47..47258de 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -87,10 +87,8 @@
"collaborationkit-icon-launchbutton": "Browse icons",
"collaborationkit-icon-browser": "Icon browser",
"collaborationkit-icon-select": "Select",
-   "collaborationkit-colour-launchbutton": "Browse colors",
"collaborationkit-colour-browser": "Color browser",
"collaborationkit-colour-select": "Select",
-   "collaborationkit-hubimage-launchbutton": 

[MediaWiki-commits] [Gerrit] mediawiki...SocialProfile[master]: Add missing i18n action-* messages for associated right-* me...

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

Change subject: Add missing i18n action-* messages for associated right-* 
messages
..

Add missing i18n action-* messages for associated right-* messages

The following messages were added:
- action-updatepoints
- action-generatetopusersreport
- action-giftadmin
- action-userboard-delete
- action-awardsmanage

Change-Id: Id9611c51b56187cccb74e1cceec854399ad0dd9a
---
M SystemGifts/i18n/en.json
M UserBoard/i18n/en.json
M UserGifts/i18n/en.json
M UserStats/i18n/en.json
4 files changed, 7 insertions(+), 2 deletions(-)


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

diff --git a/SystemGifts/i18n/en.json b/SystemGifts/i18n/en.json
index 0056811..305ba91 100644
--- a/SystemGifts/i18n/en.json
+++ b/SystemGifts/i18n/en.json
@@ -72,5 +72,6 @@
"echo-pref-tooltip-social-award": "Notify me when I receive an award.",
"notification-social-award-rec": "You have received a new award: $1.",
"notification-social-award-rec-bundle": "You have received 
{{PLURAL:$1|one new award|$1 new awards}}.",
-   "right-awardsmanage": "Create new and edit existing awards"
+   "right-awardsmanage": "Create new and edit existing awards",
+   "action-awardsmanage": "create new and edit existing awards"
 }
diff --git a/UserBoard/i18n/en.json b/UserBoard/i18n/en.json
index 25a9a0e..76ef97e 100644
--- a/UserBoard/i18n/en.json
+++ b/UserBoard/i18n/en.json
@@ -47,6 +47,7 @@
"userboard_loggedout": "You must be [[Special:UserLogin|logged in]] to 
post messages to other users.",
"userboard_showingmessages": "Showing {{PLURAL:$4|message $3|messages 
$2-$3}} of {{PLURAL:$1|$1 message|$1 messages}}.",
"right-userboard-delete": "Delete others' board messages",
+   "action-userboard-delete": "delete others' board messages",
"userboard-time-days": "{{PLURAL:$1|one day|$1 days}}",
"userboard-time-hours": "{{PLURAL:$1|one hour|$1 hours}}",
"userboard-time-minutes": "{{PLURAL:$1|one minute|$1 minutes}}",
diff --git a/UserGifts/i18n/en.json b/UserGifts/i18n/en.json
index 810bbdf..e66aa56 100644
--- a/UserGifts/i18n/en.json
+++ b/UserGifts/i18n/en.json
@@ -84,5 +84,6 @@
"notification-social-gift-send-no-message": "$1 just sent a gift to 
you: $2.",
"notification-social-gift-send-with-message": "$1 just sent a gift to 
you: $2.''$3''",
"notification-social-gift-send-bundle": "{{PLURAL:$1|One person|$1 
people}} sent you gifts.",
-   "right-giftadmin": "Create new and edit existing gifts"
+   "right-giftadmin": "Create new and edit existing gifts",
+   "action-giftadmin": "create new and edit existing gifts"
 }
diff --git a/UserStats/i18n/en.json b/UserStats/i18n/en.json
index 77bffb8..f739de5 100644
--- a/UserStats/i18n/en.json
+++ b/UserStats/i18n/en.json
@@ -48,7 +48,9 @@
"top-fans-stats-gifts-rec-count": "{{PLURAL:$1|Gift received|Gifts 
received}}",
"top-fans-stats-gifts-sent-count": "{{PLURAL:$1|Gift sent|Gifts sent}}",
"right-updatepoints": "Update edit counts",
+   "action-updatepoints": "update edit counts",
"right-generatetopusersreport": "Generate top users reports",
+   "action-generatetopusersreport": "generate top user reports",
"level-advanced-to": "advanced to level $1",
"level-advance-subject": "You are now a \"$1\" on {{SITENAME}}!",
"level-advance-body-html": "Hi $1.\n\nYou are now a \"$2\" on 
{{SITENAME}}!\n\nCongratulations,\n\nThe {{SITENAME}} team\n\n---\nHey, want to 
stop getting e-mails from us?\n\nClick [[Special:UpdateProfile]]\nand change 
your settings to disable e-mail notifications.",

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...SocialProfile[master]: Remove reference to the UserEmailTrack class

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

Change subject: Remove reference to the UserEmailTrack class
..


Remove reference to the UserEmailTrack class

It was moved to the MiniInvite extension a while ago, see
I653256eb7e78675c6ac860178fe08d895e1ff294 and
I49256b41d076c74540e30a52688b583b13f7af45.

Change-Id: I3ac14dd5eef57022b5267471313e078bca8dd3b0
---
M UserStats/UserStatsClass.php
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/UserStats/UserStatsClass.php b/UserStats/UserStatsClass.php
index c8bff24..a7e265a 100644
--- a/UserStats/UserStatsClass.php
+++ b/UserStats/UserStatsClass.php
@@ -3,12 +3,12 @@
die();
 }
 /**
- * Four classes for tracking users' social activity
+ * Three classes for tracking users' social activity
  * UserStatsTrack: main class, used by most other SocialProfile components
  * UserStats:
  * UserLevel: used for getting the names of user levels and points needed 
to
  * advance to the next level when $wgUserLevels is a 
properly-defined array.
- * UserEmailTrack: tracks email invitations (ones sent out by 
InviteContacts extension)
+ *
  * @file
  * @ingroup Extensions
  */

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3ac14dd5eef57022b5267471313e078bca8dd3b0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SocialProfile
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] mediawiki...SocialProfile[master]: Remove reference to the UserEmailTrack class

2017-02-23 Thread Jack Phoenix (Code Review)
Jack Phoenix has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/339589 )

Change subject: Remove reference to the UserEmailTrack class
..

Remove reference to the UserEmailTrack class

It was moved to the MiniInvite extension a while ago, see
I653256eb7e78675c6ac860178fe08d895e1ff294 and
I49256b41d076c74540e30a52688b583b13f7af45.

Change-Id: I3ac14dd5eef57022b5267471313e078bca8dd3b0
---
M UserStats/UserStatsClass.php
1 file changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/UserStats/UserStatsClass.php b/UserStats/UserStatsClass.php
index c8bff24..a7e265a 100644
--- a/UserStats/UserStatsClass.php
+++ b/UserStats/UserStatsClass.php
@@ -3,12 +3,12 @@
die();
 }
 /**
- * Four classes for tracking users' social activity
+ * Three classes for tracking users' social activity
  * UserStatsTrack: main class, used by most other SocialProfile components
  * UserStats:
  * UserLevel: used for getting the names of user levels and points needed 
to
  * advance to the next level when $wgUserLevels is a 
properly-defined array.
- * UserEmailTrack: tracks email invitations (ones sent out by 
InviteContacts extension)
+ *
  * @file
  * @ingroup Extensions
  */

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3ac14dd5eef57022b5267471313e078bca8dd3b0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SocialProfile
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] wikimedia...crm[master]: Major gifts requests, Do not send thank you for Benevity imp...

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

Change subject: Major gifts requests, Do not send thank you for Benevity 
import, Set Restrictions, Gift Source.
..


Major gifts requests, Do not send thank you for Benevity import, Set 
Restrictions, Gift Source.

Major gifts have confirmed Benevity send out emails & we should no. This fixes 
the import to set no_thank_you on imported contributions.

This also implements the following logic:
 We would definitely want to include the Gift Data info for these donations, 
both the Restrictions and Gift Source fields. Could we have the following?
- For organization gift (i.e. matching gift portion): Restriction = Restricted 
- Foundation/ Gift Source = Matching Gift
- For individual gift under ,000: Restriction = Unrestricted - General / Gift 
Source = Community Gift
- For individual gift ,000 and over: Restriction = Unrestricted - General / 
Gift Source = Benefactor Gift

Note that Restriction has the custom field name 'Fund' but is handled as 
'restriction' in the import code.
Gift source is AKA 'Campaign' and gift_source

Bug: T115044

Change-Id: I08e4e3c9b7d72128ab93d070963a627e7eadecb0
---
M sites/all/modules/offline2civicrm/BenevityFile.php
M sites/all/modules/offline2civicrm/tests/BenevityTest.php
M sites/all/modules/offline2civicrm/tests/data/benevity_mice_no_email.csv
3 files changed, 50 insertions(+), 2 deletions(-)

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



diff --git a/sites/all/modules/offline2civicrm/BenevityFile.php 
b/sites/all/modules/offline2civicrm/BenevityFile.php
index 64c82b3..a9c8f81 100644
--- a/sites/all/modules/offline2civicrm/BenevityFile.php
+++ b/sites/all/modules/offline2civicrm/BenevityFile.php
@@ -50,6 +50,12 @@
 if (!isset($msg['gross'])) {
   $msg['gross'] = 0;
 }
+if ($msg['gross'] >= 1000) {
+  $msg['gift_source'] = 'Benefactor Gift';
+}
+else {
+  $msg['gift_source'] = 'Community Gift';
+}
 foreach ($msg as $field => $value) {
   if ($value == 'Not shared by donor') {
 $msg[$field] = '';
@@ -98,6 +104,12 @@
   'contact_type' => 'Individual',
   'country' => 'US',
   'currency' => 'USD',
+  // Setting this avoids emails going out. We could set the thank_you_date
+  // instead to reflect Benevity having sent them out
+  // but we don't actually know what date they did that on,
+  // and recording it in our system would seem to imply we know for
+  // sure it happened (as opposed to Benevity says it happens).
+  'no_thank_you' => 1,
 );
   }
 
@@ -146,6 +158,8 @@
   $matchedMsg['soft_credit_to_id'] = ($msg['contact_id'] == 
$this->getAnonymousContactID() ? NULL : $msg['contact_id']);
   $matchedMsg['gross'] = $msg['matching_amount'];
   $matchedMsg['gateway_txn_id'] = $msg['gateway_txn_id'] . '_matched';
+  $matchedMsg['gift_source'] = 'Matching Gift';
+  $matchedMsg['restrictions'] = 'Restricted - Foundation';
   $this->unsetAddressFields($matchedMsg);
   $matchingContribution = 
wmf_civicrm_contribution_message_import($matchedMsg);
 }
diff --git a/sites/all/modules/offline2civicrm/tests/BenevityTest.php 
b/sites/all/modules/offline2civicrm/tests/BenevityTest.php
index e0083cb..7f4d582 100644
--- a/sites/all/modules/offline2civicrm/tests/BenevityTest.php
+++ b/sites/all/modules/offline2civicrm/tests/BenevityTest.php
@@ -191,8 +191,42 @@
 $contributions = $this->callAPISuccess('Contribution', 'get', 
array('contact_id' => $minnie['id']));
 $this->assertEquals(0, $contributions['count']);
 
-$contributions = $this->callAPISuccess('Contribution', 'get', 
array('contact_id' => $betterMinnie['id']));
+$contributions = $this->callAPISuccess('Contribution', 'get', array(
+  'contact_id' => $betterMinnie['id'],
+  'sequential' => 1,
+  'return' => array(
+wmf_civicrm_get_custom_field_name('no_thank_you'),
+wmf_civicrm_get_custom_field_name('Fund'),
+wmf_civicrm_get_custom_field_name('Campaign')
+  ),
+));
 $this->assertEquals(2, $contributions['count']);
+$contribution1 = $contributions['values'][0];
+$this->assertEquals(1, 
$contribution1[wmf_civicrm_get_custom_field_name('no_thank_you')], 'No thank 
you should be set');
+$this->assertEquals('Community Gift', 
$contribution1[wmf_civicrm_get_custom_field_name('Campaign')]);
+$this->assertEquals('Unrestricted - General', 
$contribution1[wmf_civicrm_get_custom_field_name('Fund')]);
+
+$contribution2 = $contributions['values'][1];
+$this->assertEquals(1, 
$contribution2[wmf_civicrm_get_custom_field_name('no_thank_you')]);
+// This contribution was over $1000 & hence is a benefactor gift.
+$this->assertEquals('Benefactor Gift', 
$contribution2[wmf_civicrm_get_custom_field_name('Campaign')]);
+

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: RCFilters UI: Add 'direction' property to the wrapper

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

Change subject: RCFilters UI: Add 'direction' property to the wrapper
..


RCFilters UI: Add 'direction' property to the wrapper

Adds 'direction: ltr' to the entire interface, rather than just
the input, since the entire FilterWrapperWidget is interface-direction
and not content direction.

Bug: T157189
Change-Id: I94ccfea878d83a24e071696b9c4e58115c9295c9
---
M 
resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.FilterWrapperWidget.less
1 file changed, 5 insertions(+), 1 deletion(-)

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



diff --git 
a/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.FilterWrapperWidget.less
 
b/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.FilterWrapperWidget.less
index 2928102..bdc94b3 100644
--- 
a/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.FilterWrapperWidget.less
+++ 
b/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.FilterWrapperWidget.less
@@ -1,5 +1,7 @@
 .mw-rcfilters-ui-filterWrapperWidget {
width: 100%;
+   // Make sure this uses the interface direction, not the content 
direction
+   direction: ltr;
 
&-popup {
// We have to override OOUI's definition, which is set
@@ -13,7 +15,9 @@
margin-top: -0.5em;
 
input {
-   // Make sure this uses the interface direction, not the 
content direction
+   // We need to reiterate the directionality
+   // for the input as well to literally override
+   // a MediaWiki CSS rule that turns it 'ltr'
direction: ltr;
}
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I94ccfea878d83a24e071696b9c4e58115c9295c9
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Mooeypoo 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: Jack Phoenix 
Gerrit-Reviewer: Mooeypoo 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...PageAssessments[master]: Fix bug where assessment isn't recorded when project title i...

2017-02-23 Thread Kaldari (Code Review)
Kaldari has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/339588 )

Change subject: Fix bug where assessment isn't recorded when project title is 
cleaned
..

Fix bug where assessment isn't recorded when project title is cleaned

Bug: T158932
Change-Id: I96981c30e0c6c88b2350ff151628517693b05916
---
M PageAssessmentsBody.php
1 file changed, 7 insertions(+), 3 deletions(-)


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

diff --git a/PageAssessmentsBody.php b/PageAssessmentsBody.php
index 24f3eb9..44be1bd 100644
--- a/PageAssessmentsBody.php
+++ b/PageAssessmentsBody.php
@@ -46,11 +46,15 @@
// Compile a list of projects found in the parserData to find 
out which
// assessment records need to be inserted, deleted, or updated.
$projects = array();
-   foreach ( $assessmentData as $parserData ) {
+   foreach ( $assessmentData as $key => $parserData ) {
// If the name of the project is set...
if ( isset( $parserData[0] ) && $parserData[0] !== '' ) 
{
+   // Clean the project name.
$projectName = self::cleanProjectTitle( 
$parserData[0] );
-   // ...get the corresponding ID from 
page_assessments_projects table.
+   // Replace the original project name with the 
cleaned project
+   // name in the assessment data, since we'll 
need it to match later.
+   $assessmentData[$key][0] = $projectName;
+   // Get the corresponding ID from 
page_assessments_projects table.
$projectId = self::getProjectId( $projectName );
// If there is no existing project by that 
name, add it to the table.
if ( $projectId === false ) {
@@ -76,7 +80,7 @@
 
$i = 0;
 
-   // Add and update records to the database
+   // Add and update assessment records to the database
foreach ( $assessmentData as $parserData ) {
$projectId = $projects[$parserData[0]];
if ( $projectId && $pageId ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I96981c30e0c6c88b2350ff151628517693b05916
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/PageAssessments
Gerrit-Branch: master
Gerrit-Owner: Kaldari 

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


[MediaWiki-commits] [Gerrit] mediawiki...GlobalUsage[master]: Move files into subdirectories

2017-02-23 Thread MaxSem (Code Review)
MaxSem has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/339585 )

Change subject: Move files into subdirectories
..

Move files into subdirectories

Bug: T154047
Change-Id: I3229575e7efccb2ed4105bd00b1083092d6fe7f7
---
M extension.json
R includes/ApiQueryGlobalUsage.php
R includes/GlobalUsage.php
R includes/GlobalUsageCachePurgeJob.php
R includes/GlobalUsageHooks.php
R includes/GlobalUsageImagePageHooks.php
R includes/GlobalUsageQuery.php
R includes/SpecialGlobalUsage.php
R includes/SpecialGloballyWantedFiles.php
R includes/SpecialMostGloballyLinkedFiles.php
R patches/GlobalUsage.pg.sql
R patches/GlobalUsage.sql
12 files changed, 12 insertions(+), 12 deletions(-)


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

diff --git a/extension.json b/extension.json
index 9fc513b..6712f4a 100644
--- a/extension.json
+++ b/extension.json
@@ -26,15 +26,15 @@
"GlobalUsageAliases": "GlobalUsage.alias.php"
},
"AutoloadClasses": {
-   "GlobalUsage": "GlobalUsage_body.php",
-   "GlobalUsageHooks": "GlobalUsageHooks.php",
-   "GlobalUsageImagePageHooks": "GlobalUsageImagePageHooks.php",
-   "SpecialGlobalUsage": "SpecialGlobalUsage.php",
-   "GlobalUsageQuery": "GlobalUsageQuery.php",
-   "ApiQueryGlobalUsage": "ApiQueryGlobalUsage.php",
-   "GlobalUsageCachePurgeJob": "GlobalUsageCachePurgeJob.php",
-   "MostGloballyLinkedFilesPage": 
"SpecialMostGloballyLinkedFiles.php",
-   "SpecialGloballyWantedFiles": "SpecialGloballyWantedFiles.php"
+   "GlobalUsage": "includes/GlobalUsage.php",
+   "GlobalUsageHooks": "includes/GlobalUsageHooks.php",
+   "GlobalUsageImagePageHooks": 
"includes/GlobalUsageImagePageHooks.php",
+   "SpecialGlobalUsage": "includes/SpecialGlobalUsage.php",
+   "GlobalUsageQuery": "includes/GlobalUsageQuery.php",
+   "ApiQueryGlobalUsage": "includes/ApiQueryGlobalUsage.php",
+   "GlobalUsageCachePurgeJob": 
"includes/GlobalUsageCachePurgeJob.php",
+   "MostGloballyLinkedFilesPage": 
"includes/SpecialMostGloballyLinkedFiles.php",
+   "SpecialGloballyWantedFiles": 
"includes/SpecialGloballyWantedFiles.php"
},
"@doc": [
"Things that can cause link updates:",
diff --git a/ApiQueryGlobalUsage.php b/includes/ApiQueryGlobalUsage.php
similarity index 100%
rename from ApiQueryGlobalUsage.php
rename to includes/ApiQueryGlobalUsage.php
diff --git a/GlobalUsage_body.php b/includes/GlobalUsage.php
similarity index 100%
rename from GlobalUsage_body.php
rename to includes/GlobalUsage.php
diff --git a/GlobalUsageCachePurgeJob.php 
b/includes/GlobalUsageCachePurgeJob.php
similarity index 100%
rename from GlobalUsageCachePurgeJob.php
rename to includes/GlobalUsageCachePurgeJob.php
diff --git a/GlobalUsageHooks.php b/includes/GlobalUsageHooks.php
similarity index 95%
rename from GlobalUsageHooks.php
rename to includes/GlobalUsageHooks.php
index 3b88380..e8252c0 100644
--- a/GlobalUsageHooks.php
+++ b/includes/GlobalUsageHooks.php
@@ -202,18 +202,18 @@
 * @return bool
 */
public static function onLoadExtensionSchemaUpdates( $updater = null ) {
-   $dir = dirname( __FILE__ );
+   $dir = dirname( __FILE__ ) . '/patches';
 
if ( $updater->getDB()->getType() == 'mysql' || 
$updater->getDB()->getType() == 'sqlite' ) {
$updater->addExtensionUpdate( array( 'addTable', 
'globalimagelinks',
"$dir/GlobalUsage.sql", true ) );
$updater->addExtensionUpdate( array( 'addIndex', 
'globalimagelinks',
-   'globalimagelinks_wiki_nsid_title', 
"$dir/patches/patch-globalimagelinks_wiki_nsid_title.sql", true ) );
+   'globalimagelinks_wiki_nsid_title', 
"$dir/patch-globalimagelinks_wiki_nsid_title.sql", true ) );
} elseif ( $updater->getDB()->getType() == 'postgresql' ) {
$updater->addExtensionUpdate( array( 'addTable', 
'globalimagelinks',
"$dir/GlobalUsage.pg.sql", true ) );
$updater->addExtensionUpdate( array( 'addIndex', 
'globalimagelinks',
-   'globalimagelinks_wiki_nsid_title', 
"$dir/patches/patch-globalimagelinks_wiki_nsid_title.pg.sql", true ) );
+   'globalimagelinks_wiki_nsid_title', 
"$dir/patch-globalimagelinks_wiki_nsid_title.pg.sql", true ) );
}
return true;
}
diff --git a/GlobalUsageImagePageHooks.php 
b/includes/GlobalUsageImagePageHooks.php
similarity index 100%
rename from GlobalUsageImagePageHooks.php
rename to 

[MediaWiki-commits] [Gerrit] mediawiki...GlobalUsage[master]: Namespace this extension

2017-02-23 Thread MaxSem (Code Review)
MaxSem has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/339586 )

Change subject: Namespace this extension
..

Namespace this extension

Bug: T154047
Change-Id: Ie955b72fda8ba5b387b75d80a2398c4f8219529d
---
M extension.json
M includes/ApiQueryGlobalUsage.php
M includes/GlobalUsage.php
M includes/GlobalUsageCachePurgeJob.php
M includes/GlobalUsageHooks.php
M includes/GlobalUsageImagePageHooks.php
M includes/GlobalUsageQuery.php
M includes/SpecialGlobalUsage.php
M includes/SpecialGloballyWantedFiles.php
M includes/SpecialMostGloballyLinkedFiles.php
10 files changed, 128 insertions(+), 36 deletions(-)


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

diff --git a/extension.json b/extension.json
index 6712f4a..52826ed 100644
--- a/extension.json
+++ b/extension.json
@@ -7,15 +7,15 @@
"license-name": "MIT",
"type": "specialpage",
"SpecialPages": {
-   "MostGloballyLinkedFiles": "MostGloballyLinkedFilesPage",
-   "GloballyWantedFiles": "SpecialGloballyWantedFiles",
-   "GlobalUsage": "SpecialGlobalUsage"
+   "MostGloballyLinkedFiles": 
"GlobalUsage\\MostGloballyLinkedFilesPage",
+   "GloballyWantedFiles": 
"GlobalUsage\\SpecialGloballyWantedFiles",
+   "GlobalUsage": "GlobalUsage\\SpecialGlobalUsage"
},
"JobClasses": {
-   "globalUsageCachePurge": "GlobalUsageCachePurgeJob"
+   "globalUsageCachePurge": "GlobalUsage\\GlobalUsageCachePurgeJob"
},
"APIPropModules": {
-   "globalusage": "ApiQueryGlobalUsage"
+   "globalusage": "GlobalUsage\\ApiQueryGlobalUsage"
},
"MessagesDirs": {
"GlobalUsage": [
@@ -26,15 +26,16 @@
"GlobalUsageAliases": "GlobalUsage.alias.php"
},
"AutoloadClasses": {
-   "GlobalUsage": "includes/GlobalUsage.php",
-   "GlobalUsageHooks": "includes/GlobalUsageHooks.php",
-   "GlobalUsageImagePageHooks": 
"includes/GlobalUsageImagePageHooks.php",
-   "SpecialGlobalUsage": "includes/SpecialGlobalUsage.php",
-   "GlobalUsageQuery": "includes/GlobalUsageQuery.php",
-   "ApiQueryGlobalUsage": "includes/ApiQueryGlobalUsage.php",
+   "GlobalUsage\\GlobalUsage": "includes/GlobalUsage.php",
+   "GlobalUsage\\GlobalUsageHooks": 
"includes/GlobalUsageHooks.php",
+   "GlobalUsage\\GlobalUsageImagePageHooks": 
"includes/GlobalUsageImagePageHooks.php",
+   "GlobalUsage\\SpecialGlobalUsage": 
"includes/SpecialGlobalUsage.php",
+   "GlobalUsage\\GlobalUsageQuery": 
"includes/GlobalUsageQuery.php",
+   "GlobalUsage\\ApiQueryGlobalUsage": 
"includes/ApiQueryGlobalUsage.php",
"GlobalUsageCachePurgeJob": 
"includes/GlobalUsageCachePurgeJob.php",
-   "MostGloballyLinkedFilesPage": 
"includes/SpecialMostGloballyLinkedFiles.php",
-   "SpecialGloballyWantedFiles": 
"includes/SpecialGloballyWantedFiles.php"
+   "GlobalUsage\\GlobalUsageCachePurgeJob": 
"includes/GlobalUsageCachePurgeJob.php",
+   "GlobalUsage\\MostGloballyLinkedFilesPage": 
"includes/SpecialMostGloballyLinkedFiles.php",
+   "GlobalUsage\\SpecialGloballyWantedFiles": 
"includes/SpecialGloballyWantedFiles.php"
},
"@doc": [
"Things that can cause link updates:",
@@ -45,37 +46,37 @@
],
"Hooks": {
"LinksUpdateComplete": [
-   "GlobalUsageHooks::onLinksUpdateComplete"
+   "GlobalUsage\\GlobalUsageHooks::onLinksUpdateComplete"
],
"ArticleDeleteComplete": [
-   "GlobalUsageHooks::onArticleDeleteComplete"
+   "GlobalUsage\\GlobalUsageHooks::onArticleDeleteComplete"
],
"FileDeleteComplete": [
-   "GlobalUsageHooks::onFileDeleteComplete"
+   "GlobalUsage\\GlobalUsageHooks::onFileDeleteComplete"
],
"FileUndeleteComplete": [
-   "GlobalUsageHooks::onFileUndeleteComplete"
+   "GlobalUsage\\GlobalUsageHooks::onFileUndeleteComplete"
],
"UploadComplete": [
-   "GlobalUsageHooks::onUploadComplete"
+   "GlobalUsage\\GlobalUsageHooks::onUploadComplete"
],
"TitleMoveComplete": [
-   "GlobalUsageHooks::onTitleMoveComplete"
+   "GlobalUsage\\GlobalUsageHooks::onTitleMoveComplete"
],
"ImagePageAfterImageLinks": [
-   "GlobalUsageImagePageHooks::onImagePageAfterImageLinks"
+ 

[MediaWiki-commits] [Gerrit] mediawiki...GlobalUsage[master]: Convert to new array syntax

2017-02-23 Thread MaxSem (Code Review)
MaxSem has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/339587 )

Change subject: Convert to new array syntax
..

Convert to new array syntax

Bug: T154047
Change-Id: I68a51e81512407e91c3c9dc410c9f48228c2ac34
---
M includes/ApiQueryGlobalUsage.php
M includes/GlobalUsage.php
M includes/GlobalUsageCachePurgeJob.php
M includes/GlobalUsageHooks.php
M includes/GlobalUsageImagePageHooks.php
M includes/GlobalUsageQuery.php
M includes/SpecialGlobalUsage.php
M includes/SpecialGloballyWantedFiles.php
M includes/SpecialMostGloballyLinkedFiles.php
9 files changed, 113 insertions(+), 113 deletions(-)


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

diff --git a/includes/ApiQueryGlobalUsage.php b/includes/ApiQueryGlobalUsage.php
index f67ad52..1361d87 100644
--- a/includes/ApiQueryGlobalUsage.php
+++ b/includes/ApiQueryGlobalUsage.php
@@ -62,10 +62,10 @@
} else {
$title = $item['title'];
}
-   $result = array(
+   $result = [
'title' => $title,
'wiki' => 
WikiMap::getWikiName( $wiki )
-   );
+   ];
if ( isset( $prop['url'] ) ) {
/* We expand the url 
because we don't want protocol relative urls in API results */
$result['url'] = 
wfExpandUrl( WikiMap::getForeignUrl( $item['wiki'], $title ), PROTO_CURRENT );
@@ -78,7 +78,7 @@
}
 
$fit = $apiResult->addValue(
-   array( 'query', 
'pages', $pageId, 'globalusage' ),
+   [ 'query', 'pages', 
$pageId, 'globalusage' ],
null,
$result
);
@@ -105,45 +105,45 @@
$pageIds = $this->getPageSet()->getAllTitlesByNamespace();
foreach ( $pageIds[NS_FILE] as $id ) {
$result->addIndexedTagName(
-   array( 'query', 'pages', $id, 'globalusage' ),
+   [ 'query', 'pages', $id, 'globalusage' ],
'gu'
);
}
}
 
public function getAllowedParams() {
-   return array(
-   'prop' => array(
+   return [
+   'prop' => [
ApiBase::PARAM_DFLT => 'url',
-   ApiBase::PARAM_TYPE => array(
+   ApiBase::PARAM_TYPE => [
'url',
'pageid',
'namespace',
-   ),
+   ],
ApiBase::PARAM_ISMULTI => true,
-   ),
-   'limit' => array(
+   ],
+   'limit' => [
ApiBase :: PARAM_DFLT => 10,
ApiBase :: PARAM_TYPE => 'limit',
ApiBase :: PARAM_MIN => 1,
ApiBase :: PARAM_MAX => ApiBase :: LIMIT_BIG1,
ApiBase :: PARAM_MAX2 => ApiBase :: LIMIT_BIG2
-   ),
-   'continue' => array(
+   ],
+   'continue' => [
ApiBase::PARAM_HELP_MSG => 
'api-help-param-continue',
-   ),
+   ],
'filterlocal' => false,
-   );
+   ];
}
 
/**
 * @see ApiBase::getExamplesMessages()
 */
protected function getExamplesMessages() {
-   return array(
+   return [
'action=query=globalusage=File:Example.jpg'
=> 'apihelp-query+globalusage-example-1',
-   );
+   ];
}
 
public function getCacheMode( $params ) {
diff --git a/includes/GlobalUsage.php b/includes/GlobalUsage.php
index 3760b32..9524221 100644
--- a/includes/GlobalUsage.php
+++ 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Drop in replacement of eval.php based on psysh

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

Change subject: Drop in replacement of eval.php based on psysh
..


Drop in replacement of eval.php based on psysh

eval.php is meant to eval() commands in MediaWiki global scope. We had
at least a couple attempts to move it to a regular Maintenance script.

As noted on the revert commit b475e930 r54839, using a Maintenance
script drop us in the callee function scope instead of the global scope
which is a hard requirement.

http://psysh.org/ is a Read-Eval-Print-Loop with color highlight, modern
code and more.

Add maintenance/shell.php script as MediaWikiShell class.

Passing command from stdin is supported.
Execution is forked for graceful handling of PHP fatal errors.
Colors!!
Support the undocumented '-d' arguments from eval.php:
  0 set $wgDebugLogFile to stdout. Eval.php used /dev/stdout, make it
php://stdout in the new script.
  1 additionally set DBO_DEBUG on all the database load balancer servers

PHP globals have to be whitelisted which is not supported out of the box
by Psy. Upon request, the author of PsySh, Justin Hileman, kindly
provided a pass to inject globals (with the exceptions of super
globals). He agreed for code reuse:
https://github.com/bobthecow/psysh/issues/353
The code was added to maintenance/CodeCleanerGlobalsPass.inc

Note that this is not a perfect simulation of global scope (but pretty
close): variables declared in the shell which did not exist before
won't be global unless the 'global' keword is used.

Example usage:

$ php maintenance/shell.php

>>> $wgFullyInitialised
=> true

>>> $hashar = User::newFromName( 'hashar' )
=> User {#274
 +mId: null,
 +mName: "Hashar",
 ...

>>> ls --long --all $h


Bug: T117661
Signed-off-by: Justin Hileman 
Signed-off-by: Gergő Tisza 
Change-Id: I3d6d42e138d3cc4a0aaafdd7f5f97cb17d8b8cb3
---
M autoload.php
M composer.json
A maintenance/CodeCleanerGlobalsPass.inc
A maintenance/shell.php
M tests/phan/config.php
5 files changed, 163 insertions(+), 5 deletions(-)

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



diff --git a/autoload.php b/autoload.php
index d4bd447..7f47d49 100644
--- a/autoload.php
+++ b/autoload.php
@@ -257,6 +257,7 @@
'ClearInterwikiCache' => __DIR__ . 
'/maintenance/clearInterwikiCache.php',
'CliInstaller' => __DIR__ . '/includes/installer/CliInstaller.php',
'CloneDatabase' => __DIR__ . '/includes/db/CloneDatabase.php',
+   'CodeCleanerGlobalsPass' => __DIR__ . 
'/maintenance/CodeCleanerGlobalsPass.inc',
'CodeContentHandler' => __DIR__ . 
'/includes/content/CodeContentHandler.php',
'Collation' => __DIR__ . '/includes/collation/Collation.php',
'CollationCkb' => __DIR__ . '/includes/collation/CollationCkb.php',
@@ -812,6 +813,7 @@
'MediaTransformOutput' => __DIR__ . 
'/includes/media/MediaTransformOutput.php',
'MediaWiki' => __DIR__ . '/includes/MediaWiki.php',
'MediaWikiI18N' => __DIR__ . '/includes/skins/MediaWikiI18N.php',
+   'MediaWikiShell' => __DIR__ . '/maintenance/shell.php',
'MediaWikiSite' => __DIR__ . '/includes/site/MediaWikiSite.php',
'MediaWikiTitleCodec' => __DIR__ . 
'/includes/title/MediaWikiTitleCodec.php',
'MediaWikiVersionFetcher' => __DIR__ . 
'/includes/MediaWikiVersionFetcher.php',
diff --git a/composer.json b/composer.json
index d41492e..9a9cb7c 100644
--- a/composer.json
+++ b/composer.json
@@ -57,7 +57,8 @@
"phpunit/phpunit": "4.8.31",
"wikimedia/avro": "1.7.7",
"hamcrest/hamcrest-php": "^2.0",
-   "wmde/hamcrest-html-matchers": "^0.1.0"
+   "wmde/hamcrest-html-matchers": "^0.1.0",
+   "psy/psysh": "0.8.1"
},
"suggest": {
"ext-apc": "Local data and opcode cache",
diff --git a/maintenance/CodeCleanerGlobalsPass.inc 
b/maintenance/CodeCleanerGlobalsPass.inc
new file mode 100644
index 000..5e8e754
--- /dev/null
+++ b/maintenance/CodeCleanerGlobalsPass.inc
@@ -0,0 +1,52 @@
+https://github.com/bobthecow/psysh/issues/353
+ *
+ * Copyright © 2017 Justin Hileman 
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License 

[MediaWiki-commits] [Gerrit] mediawiki/vendor[master]: Add psy/psysh 0.8.1

2017-02-23 Thread Reedy (Code Review)
Reedy has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/339584 )

Change subject: Add psy/psysh 0.8.1
..

Add psy/psysh 0.8.1

Change-Id: I375c9d681999e8ff46d8bbf2120194e7a4612011
---
M composer.json
M composer.lock
M composer/autoload_classmap.php
M composer/autoload_files.php
M composer/autoload_namespaces.php
M composer/autoload_psr4.php
M composer/installed.json
A dnoegel/php-xdg-base-dir/.gitignore
A dnoegel/php-xdg-base-dir/LICENSE
A dnoegel/php-xdg-base-dir/README.md
A dnoegel/php-xdg-base-dir/composer.json
A dnoegel/php-xdg-base-dir/phpunit.xml.dist
A dnoegel/php-xdg-base-dir/src/Xdg.php
A dnoegel/php-xdg-base-dir/tests/XdgTest.php
A jakub-onderka/php-console-color/.gitignore
A jakub-onderka/php-console-color/.travis.yml
A jakub-onderka/php-console-color/build.xml
A jakub-onderka/php-console-color/composer.json
A jakub-onderka/php-console-color/example.php
A jakub-onderka/php-console-color/phpunit.xml
A 
jakub-onderka/php-console-color/src/JakubOnderka/PhpConsoleColor/ConsoleColor.php
A 
jakub-onderka/php-console-color/src/JakubOnderka/PhpConsoleColor/InvalidStyleException.php
A 
jakub-onderka/php-console-color/tests/JakubOnderka/PhpConsoleColor/ConsoleColorTest.php
A jakub-onderka/php-console-color/tests/bootstrap.php
A jakub-onderka/php-console-highlighter/.gitignore
A jakub-onderka/php-console-highlighter/.travis.yml
A jakub-onderka/php-console-highlighter/LICENSE
A jakub-onderka/php-console-highlighter/README.md
A jakub-onderka/php-console-highlighter/build.xml
A jakub-onderka/php-console-highlighter/composer.json
A jakub-onderka/php-console-highlighter/examples/snippet.php
A jakub-onderka/php-console-highlighter/examples/whole_file.php
A jakub-onderka/php-console-highlighter/examples/whole_file_line_numbers.php
A jakub-onderka/php-console-highlighter/phpunit.xml
A 
jakub-onderka/php-console-highlighter/src/JakubOnderka/PhpConsoleHighlighter/Highlighter.php
A 
jakub-onderka/php-console-highlighter/tests/JakubOnderka/PhpConsoleHighligter/HigligterTest.php
A jakub-onderka/php-console-highlighter/tests/bootstrap.php
A nikic/php-parser/.gitignore
A nikic/php-parser/.travis.yml
A nikic/php-parser/CHANGELOG.md
A nikic/php-parser/LICENSE
A nikic/php-parser/README.md
A nikic/php-parser/UPGRADE-1.0.md
A nikic/php-parser/UPGRADE-2.0.md
A nikic/php-parser/UPGRADE-3.0.md
A nikic/php-parser/bin/php-parse
A nikic/php-parser/composer.json
A nikic/php-parser/doc/0_Introduction.markdown
A nikic/php-parser/doc/2_Usage_of_basic_components.markdown
A nikic/php-parser/doc/3_Other_node_tree_representations.markdown
A nikic/php-parser/doc/4_Code_generation.markdown
A nikic/php-parser/doc/component/Error_handling.markdown
A nikic/php-parser/doc/component/Lexer.markdown
A nikic/php-parser/grammar/README.md
A nikic/php-parser/grammar/parser.template
A nikic/php-parser/grammar/php5.y
A nikic/php-parser/grammar/php7.y
A nikic/php-parser/grammar/rebuildParsers.php
A nikic/php-parser/grammar/tokens.template
A nikic/php-parser/grammar/tokens.y
A nikic/php-parser/lib/PhpParser/Autoloader.php
A nikic/php-parser/lib/PhpParser/Builder.php
A nikic/php-parser/lib/PhpParser/Builder/Class_.php
A nikic/php-parser/lib/PhpParser/Builder/Declaration.php
A nikic/php-parser/lib/PhpParser/Builder/FunctionLike.php
A nikic/php-parser/lib/PhpParser/Builder/Function_.php
A nikic/php-parser/lib/PhpParser/Builder/Interface_.php
A nikic/php-parser/lib/PhpParser/Builder/Method.php
A nikic/php-parser/lib/PhpParser/Builder/Namespace_.php
A nikic/php-parser/lib/PhpParser/Builder/Param.php
A nikic/php-parser/lib/PhpParser/Builder/Property.php
A nikic/php-parser/lib/PhpParser/Builder/Trait_.php
A nikic/php-parser/lib/PhpParser/Builder/Use_.php
A nikic/php-parser/lib/PhpParser/BuilderAbstract.php
A nikic/php-parser/lib/PhpParser/BuilderFactory.php
A nikic/php-parser/lib/PhpParser/Comment.php
A nikic/php-parser/lib/PhpParser/Comment/Doc.php
A nikic/php-parser/lib/PhpParser/Error.php
A nikic/php-parser/lib/PhpParser/ErrorHandler.php
A nikic/php-parser/lib/PhpParser/ErrorHandler/Collecting.php
A nikic/php-parser/lib/PhpParser/ErrorHandler/Throwing.php
A nikic/php-parser/lib/PhpParser/Lexer.php
A nikic/php-parser/lib/PhpParser/Lexer/Emulative.php
A nikic/php-parser/lib/PhpParser/Node.php
A nikic/php-parser/lib/PhpParser/Node/Arg.php
A nikic/php-parser/lib/PhpParser/Node/Const_.php
A nikic/php-parser/lib/PhpParser/Node/Expr.php
A nikic/php-parser/lib/PhpParser/Node/Expr/ArrayDimFetch.php
A nikic/php-parser/lib/PhpParser/Node/Expr/ArrayItem.php
A nikic/php-parser/lib/PhpParser/Node/Expr/Array_.php
A nikic/php-parser/lib/PhpParser/Node/Expr/Assign.php
A nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp.php
A nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseAnd.php
A nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseOr.php
A nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseXor.php
A nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Concat.php
A 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: RCFilters UI: Style the 'old' RC option fieldset

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

Change subject: RCFilters UI: Style the 'old' RC option fieldset
..


RCFilters UI: Style the 'old' RC option fieldset

Bug: T158006
Change-Id: I230dc9095e41abf32e95adc68c40265b53a5f698
---
M resources/Resources.php
A resources/src/mediawiki.rcfilters/styles/mw.rcfilters.less
M 
resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.CapsuleItemWidget.less
3 files changed, 12 insertions(+), 1 deletion(-)

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



diff --git a/resources/Resources.php b/resources/Resources.php
index 0b24b71..d6cb43f 100644
--- a/resources/Resources.php
+++ b/resources/Resources.php
@@ -1786,6 +1786,7 @@

'resources/src/mediawiki.rcfilters/styles/mw.rcfilters.variables.less',

'resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.less',

'resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.Overlay.less',
+   
'resources/src/mediawiki.rcfilters/styles/mw.rcfilters.less',

'resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.FilterItemWidget.less',

'resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.CapsuleItemWidget.less',

'resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.FilterGroupWidget.less',
diff --git a/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.less 
b/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.less
new file mode 100644
index 000..8423363
--- /dev/null
+++ b/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.less
@@ -0,0 +1,9 @@
+// Corrections for the standard special page
+.rcoptions {
+   border: 0;
+   border-bottom: 1px solid #a2a9b1;
+
+   legend {
+   display: none;
+   }
+}
diff --git 
a/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.CapsuleItemWidget.less
 
b/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.CapsuleItemWidget.less
index 0bf6f58..46bd8f3 100644
--- 
a/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.CapsuleItemWidget.less
+++ 
b/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.CapsuleItemWidget.less
@@ -10,8 +10,9 @@
margin-top: 1em;
}
 
-   .oo-ui-labelElement-label {
+   &.oo-ui-labelElement .oo-ui-labelElement-label {
vertical-align: middle;
+   cursor: pointer;
}
 
&-muted {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I230dc9095e41abf32e95adc68c40265b53a5f698
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Mooeypoo 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: Mooeypoo 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: RCFilters: Align trash icon with filter list

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

Change subject: RCFilters: Align trash icon with filter list
..


RCFilters: Align trash icon with filter list

Bug: T149391
Change-Id: Icf867bf572253d288602f00890551909d869a459
---
M 
resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.FilterCapsuleMultiselectWidget.less
M 
resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterCapsuleMultiselectWidget.js
2 files changed, 37 insertions(+), 42 deletions(-)

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



diff --git 
a/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.FilterCapsuleMultiselectWidget.less
 
b/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.FilterCapsuleMultiselectWidget.less
index 6c11cdb..8921f7a 100644
--- 
a/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.FilterCapsuleMultiselectWidget.less
+++ 
b/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.FilterCapsuleMultiselectWidget.less
@@ -18,21 +18,12 @@
color: #72777d;
}
 
-   &-table {
-   display: table;
+   &-cell-filters {
width: 100%;
}
-
-   &-row {
-   display: table-row;
-   }
-
-   &-cell {
-   display: table-cell;
-
-   &:last-child {
-   text-align: right;
-   }
+   &-cell-reset {
+   text-align: right;
+   padding-left: 0.5em;
}
 
.oo-ui-capsuleItemWidget {
diff --git 
a/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterCapsuleMultiselectWidget.js
 
b/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterCapsuleMultiselectWidget.js
index 910e8e1..50b7d15 100644
--- 
a/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterCapsuleMultiselectWidget.js
+++ 
b/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterCapsuleMultiselectWidget.js
@@ -13,6 +13,13 @@
 * @cfg {jQuery} [$overlay] A jQuery object serving as overlay for 
popups
 */
mw.rcfilters.ui.FilterCapsuleMultiselectWidget = function 
MwRcfiltersUiFilterCapsuleMultiselectWidget( controller, model, filterInput, 
config ) {
+   var title = new OO.ui.LabelWidget( {
+   label: mw.msg( 'rcfilters-activefilters' ),
+   classes: [ 
'mw-rcfilters-ui-filterCapsuleMultiselectWidget-wrapper-content-title' ]
+   } ),
+   $contentWrapper = $( '' )
+   .addClass( 
'mw-rcfilters-ui-filterCapsuleMultiselectWidget-wrapper' );
+
this.$overlay = config.$overlay || this.$element;
 
// Parent
@@ -25,12 +32,6 @@
 
this.filterInput = filterInput;
 
-   this.$content.prepend(
-   $( '' )
-   .addClass( 
'mw-rcfilters-ui-filterCapsuleMultiselectWidget-content-title' )
-   .text( mw.msg( 'rcfilters-activefilters' ) )
-   );
-
this.resetButton = new OO.ui.ButtonWidget( {
icon: 'trash',
framed: false,
@@ -42,6 +43,7 @@
label: mw.msg( 'rcfilters-empty-filter' ),
classes: [ 
'mw-rcfilters-ui-filterCapsuleMultiselectWidget-emptyFilters' ]
} );
+   this.$content.append( this.emptyFilterMessage.$element );
 
// Events
this.resetButton.connect( this, { click: 'onResetButtonClick' } 
);
@@ -53,30 +55,32 @@
this.filterInput.$input
.on( 'focus', this.focus.bind( this ) );
 
+   // Build the content
+   $contentWrapper.append(
+   title.$element,
+   $( '' )
+   .addClass( 'mw-rcfilters-ui-table' )
+   .append(
+   // The filter list and button should 
appear side by side regardless of how
+   // wide the button is; the button also 
changes its width depending
+   // on language and its state, so the 
safest way to present both side
+   // by side is with a table layout
+   $( '' )
+   .addClass( 
'mw-rcfilters-ui-row' )
+   .append(
+   this.$content
+   .addClass( 
'mw-rcfilters-ui-cell' )
+   .addClass( 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: RCFilters UI: Reassess interaction after resetting filters

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

Change subject: RCFilters UI: Reassess interaction after resetting filters
..


RCFilters UI: Reassess interaction after resetting filters

Both resetting to defaults or resetting to no-filters state should
retrigger the interaction assessment so all filters should get their
included, fullyCovered and conflicted states resetted.

Bug: T158135
Change-Id: Iae23129b7fb378adb712b34e8e64208bbb70ccd7
---
M resources/src/mediawiki.rcfilters/mw.rcfilters.Controller.js
1 file changed, 6 insertions(+), 0 deletions(-)

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



diff --git a/resources/src/mediawiki.rcfilters/mw.rcfilters.Controller.js 
b/resources/src/mediawiki.rcfilters/mw.rcfilters.Controller.js
index 3ba4dc0..1df31a2 100644
--- a/resources/src/mediawiki.rcfilters/mw.rcfilters.Controller.js
+++ b/resources/src/mediawiki.rcfilters/mw.rcfilters.Controller.js
@@ -59,6 +59,9 @@
 */
mw.rcfilters.Controller.prototype.resetToDefaults = function () {
this.filtersModel.setFiltersToDefaults();
+   // Check all filter interactions
+   this.filtersModel.reassessFilterInteractions();
+
this.updateURL();
this.updateChangesList();
};
@@ -69,6 +72,9 @@
mw.rcfilters.Controller.prototype.emptyFilters = function () {
this.filtersModel.emptyAllFilters();
this.filtersModel.clearAllHighlightColors();
+   // Check all filter interactions
+   this.filtersModel.reassessFilterInteractions();
+
this.updateURL();
this.updateChangesList();
};

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iae23129b7fb378adb712b34e8e64208bbb70ccd7
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Mooeypoo 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: Mooeypoo 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: RCFilters UI: Stop mousedown propagation when capsule item '...

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

Change subject: RCFilters UI: Stop mousedown propagation when capsule item 'x' 
button is clicked
..


RCFilters UI: Stop mousedown propagation when capsule item 'x' button is clicked

We don't want the parent (the CapsuleMultiselectWidget) to receieve
the mousedown event, because it then uses it to focus and open the
popup.

Bug: T158006
Change-Id: I1ae9b58b723a70cc150392224196bdb67ebf30b4
---
M resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.CapsuleItemWidget.js
1 file changed, 27 insertions(+), 9 deletions(-)

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



diff --git 
a/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.CapsuleItemWidget.js 
b/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.CapsuleItemWidget.js
index a547020..8c5bd82 100644
--- a/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.CapsuleItemWidget.js
+++ b/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.CapsuleItemWidget.js
@@ -51,7 +51,7 @@
// Events
this.model.connect( this, { update: 'onModelUpdate' } );
 
-   this.closeButton.connect( this, { click: 
'onCapsuleRemovedByUser' } );
+   this.closeButton.$element.on( 'mousedown', 
this.onCloseButtonMouseDown.bind( this ) );
 
// Initialization
this.$overlay.append( this.popup.$element );
@@ -76,6 +76,32 @@
this.setCurrentMuteState();
 
this.setHighlightColor();
+   };
+
+   /**
+* Override mousedown event to prevent its propagation to the parent,
+* since the parent (the multiselect widget) focuses the popup when its
+* mousedown event is fired.
+*
+* @param {jQuery.Event} e Event
+*/
+   mw.rcfilters.ui.CapsuleItemWidget.prototype.onCloseButtonMouseDown = 
function ( e ) {
+   e.stopPropagation();
+   };
+
+   /**
+* Override the event listening to the item close button click
+*/
+   mw.rcfilters.ui.CapsuleItemWidget.prototype.onCloseClick = function () {
+   var element = this.getElementGroup();
+
+   if ( element && $.isFunction( element.removeItems ) ) {
+   element.removeItems( [ this ] );
+   }
+
+   // Respond to user removing the filter
+   this.controller.updateFilter( this.model.getName(), false );
+   this.controller.clearHighlightColor( this.model.getName() );
};
 
mw.rcfilters.ui.CapsuleItemWidget.prototype.setHighlightColor = 
function () {
@@ -118,14 +144,6 @@
this.positioned = true;
}
}
-   };
-
-   /**
-* Respond to the user removing the capsule with the close button
-*/
-   mw.rcfilters.ui.CapsuleItemWidget.prototype.onCapsuleRemovedByUser = 
function () {
-   this.controller.updateFilter( this.model.getName(), false );
-   this.controller.clearHighlightColor( this.model.getName() );
};
 
/**

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1ae9b58b723a70cc150392224196bdb67ebf30b4
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Mooeypoo 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: Mooeypoo 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: RCFilters UI: Fix mute state styling

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

Change subject: RCFilters UI: Fix mute state styling
..


RCFilters UI: Fix mute state styling

For some reason it stopped styling muted state in filterItemWidgets
Also adjusted the styling to be more similar to the prototype.

Bug: T156429
Change-Id: Ib043729ab7cfd32253d9424b145794e484ec11b6
---
M resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.FilterItemWidget.less
1 file changed, 18 insertions(+), 13 deletions(-)

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



diff --git 
a/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.FilterItemWidget.less
 
b/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.FilterItemWidget.less
index 293f3c3..94da3ac 100644
--- 
a/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.FilterItemWidget.less
+++ 
b/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.FilterItemWidget.less
@@ -8,26 +8,31 @@
padding-top: 0.5em;
}
 
-   &-filterCheckbox {
-   &-label {
-   &-title {
-   font-weight: bold;
-   font-size: 1.2em;
-   color: #222;
-   }
-   &-desc {
-   color: #464a4f;
-   }
+   &-muted {
+   background-color: #f8f9fa; // Base90 AAA
+   .mw-rcfilters-ui-filterItemWidget-label-title,
+   .mw-rcfilters-ui-filterItemWidget-label-desc {
+   color: #54595d; // Base20 AAA
}
+   }
 
+   &-label {
+   &-title {
+   font-weight: bold;
+   font-size: 1.2em;
+   color: #222;
+   }
+   &-desc {
+   color: #464a4f;
+   }
+   }
+
+   &-filterCheckbox {
.oo-ui-fieldLayout.oo-ui-fieldLayout-align-inline {
// Override margin-top and -bottom rules from 
FieldLayout
margin: 0 !important;
}
 
-   &-muted {
-   opacity: 0.5;
-   }
}
 
&-highlightButton {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib043729ab7cfd32253d9424b145794e484ec11b6
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Mooeypoo 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: RCFilters UI: Fix CapsuleItemWidget popup styling

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

Change subject: RCFilters UI: Fix CapsuleItemWidget popup styling
..


RCFilters UI: Fix CapsuleItemWidget popup styling

Bug: T158006
Change-Id: I83f72273bc5bf7bd9548d60efd094e427ff0e13a
---
M 
resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.CapsuleItemWidget.less
M resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.CapsuleItemWidget.js
2 files changed, 7 insertions(+), 10 deletions(-)

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



diff --git 
a/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.CapsuleItemWidget.less
 
b/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.CapsuleItemWidget.less
index 0bf6f58..65278f9 100644
--- 
a/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.CapsuleItemWidget.less
+++ 
b/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.CapsuleItemWidget.less
@@ -1,13 +1,9 @@
 @import "mw.rcfilters.mixins";
 
 .mw-rcfilters-ui-capsuleItemWidget {
-   &-popup {
-   padding: 1em;
-   }
-
-   .oo-ui-popupWidget {
-   // Fix the positioning of the popup itself
-   margin-top: 1em;
+   &-popup-content {
+   padding: 0.5em;
+   color: #54595d;
}
 
.oo-ui-labelElement-label {
diff --git 
a/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.CapsuleItemWidget.js 
b/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.CapsuleItemWidget.js
index a547020..4ab3681 100644
--- a/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.CapsuleItemWidget.js
+++ b/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.CapsuleItemWidget.js
@@ -14,7 +14,7 @@
 */
mw.rcfilters.ui.CapsuleItemWidget = function 
MwRcfiltersUiCapsuleItemWidget( controller, model, config ) {
var $popupContent = $( '' )
-   .addClass( 'mw-rcfilters-ui-capsuleItemWidget-popup' ),
+   .addClass( 
'mw-rcfilters-ui-capsuleItemWidget-popup-content' ),
descLabelWidget = new OO.ui.LabelWidget();
 
// Configuration initialization
@@ -34,11 +34,12 @@
// Mixin constructors
OO.ui.mixin.PopupElement.call( this, $.extend( {
popup: {
-   padded: true,
+   padded: false,
align: 'center',
$content: $popupContent
.append( descLabelWidget.$element ),
-   $floatableContainer: this.$element
+   $floatableContainer: this.$element,
+   classes: [ 
'mw-rcfilters-ui-capsuleItemWidget-popup' ]
}
}, config ) );
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I83f72273bc5bf7bd9548d60efd094e427ff0e13a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Mooeypoo 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...deploy[master]: Update restbase to 981855f

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

Change subject: Update restbase to 981855f
..


Update restbase to 981855f

List of changes:
5b60327 Deprecated endpoints that would be deleted
981855f Made 'deprecated' bold

Change-Id: I6d6af9fe8db04cf5e7802ba70943ea06bdf7a1f5
---
M restbase
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/restbase b/restbase
index 5bac1fb..981855f 16
--- a/restbase
+++ b/restbase
@@ -1 +1 @@
-Subproject commit 5bac1fb339f874ae92d22fc38ed92b53be0d276f
+Subproject commit 981855f071c12d842b00c453d5a6ddff9d9cb611

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6d6af9fe8db04cf5e7802ba70943ea06bdf7a1f5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/restbase/deploy
Gerrit-Branch: master
Gerrit-Owner: Ppchelko 
Gerrit-Reviewer: Mobrovac 

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Store goodfaith scores in the ORES tables

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

Change subject: Store goodfaith scores in the ORES tables
..


Store goodfaith scores in the ORES tables

Bug: T137966
Change-Id: I920a7c55b58f3845436bab063d493e6a1f52e509
---
M wmf-config/InitialiseSettings.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 0b6ab16..3ce0dde 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -17722,8 +17722,8 @@
 'wgOresModels' => [
'default' => [
'damaging' => true,
+   'goodfaith' => true,
'reverted' => false,
-   'goodfaith' => false,
'wp10' => false,
],
 ],

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I920a7c55b58f3845436bab063d493e6a1f52e509
Gerrit-PatchSet: 2
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Catrope 
Gerrit-Reviewer: Halfak 
Gerrit-Reviewer: Ladsgroup 
Gerrit-Reviewer: Mattflaschen 
Gerrit-Reviewer: Thcipriani 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...deploy[master]: Update restbase to 981855f

2017-02-23 Thread Ppchelko (Code Review)
Ppchelko has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/339583 )

Change subject: Update restbase to 981855f
..

Update restbase to 981855f

List of changes:
5b60327 Deprecated endpoints that would be deleted
981855f Made 'deprecated' bold

Change-Id: I6d6af9fe8db04cf5e7802ba70943ea06bdf7a1f5
---
M restbase
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/restbase/deploy 
refs/changes/83/339583/1

diff --git a/restbase b/restbase
index 5bac1fb..981855f 16
--- a/restbase
+++ b/restbase
@@ -1 +1 @@
-Subproject commit 5bac1fb339f874ae92d22fc38ed92b53be0d276f
+Subproject commit 981855f071c12d842b00c453d5a6ddff9d9cb611

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6d6af9fe8db04cf5e7802ba70943ea06bdf7a1f5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/restbase/deploy
Gerrit-Branch: master
Gerrit-Owner: Ppchelko 

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


[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Update NavTabLayout to use BottomNavigationView

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

Change subject: Update NavTabLayout to use BottomNavigationView
..


Update NavTabLayout to use BottomNavigationView

The bottom bar on the main screen is now a BottomNavigationView.
This is inline with the Material Design guidelines. As there are 4
tabs they now animate and text is only displayed for the current
tab.

Bug: T148791
Change-Id: I50c2b14f9920c5a38b0a20bc171ffdbf16512877
---
D 
app/screenshots-ref/org.wikipedia.navtab.NavTabViewTest.testLayoutDirection-120dp-en-ltr-font1.0x-light.png
D 
app/screenshots-ref/org.wikipedia.navtab.NavTabViewTest.testLayoutDirection-120dp-en-rtl-font1.0x-light.png
D 
app/screenshots-ref/org.wikipedia.navtab.NavTabViewTest.testSelect-120dp-en-ltr-font1.0x-dark.png
D 
app/screenshots-ref/org.wikipedia.navtab.NavTabViewTest.testSelect-120dp-en-ltr-font1.0x-light.png
D 
app/screenshots-ref/org.wikipedia.navtab.NavTabViewTest.testTheme-120dp-en-ltr-font1.0x-dark.png
D 
app/screenshots-ref/org.wikipedia.navtab.NavTabViewTest.testTheme-120dp-en-ltr-font1.0x-light.png
D 
app/screenshots-ref/org.wikipedia.navtab.NavTabViewTest.testWidth-120dp-en-ltr-font1.0x-light.png
D 
app/screenshots-ref/org.wikipedia.navtab.NavTabViewTest.testWidth-120dp-en-ltr-font1.5x-light.png
D 
app/screenshots-ref/org.wikipedia.navtab.NavTabViewTest.testWidth-720dp-en-ltr-font1.0x-light.png
D 
app/screenshots-ref/org.wikipedia.navtab.NavTabViewTest.testWidth-720dp-en-ltr-font1.5x-light.png
D app/src/androidTest/java/org/wikipedia/navtab/NavTabViewTest.java
M app/src/main/java/org/wikipedia/main/MainFragment.java
M app/src/main/java/org/wikipedia/navtab/NavTabLayout.java
D app/src/main/java/org/wikipedia/navtab/NavTabView.java
M app/src/main/res/values/attrs.xml
M app/src/main/res/values/styles.xml
M app/src/main/res/values/styles_dark.xml
M app/src/main/res/values/styles_light.xml
18 files changed, 27 insertions(+), 157 deletions(-)

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



diff --git 
a/app/screenshots-ref/org.wikipedia.navtab.NavTabViewTest.testLayoutDirection-120dp-en-ltr-font1.0x-light.png
 
b/app/screenshots-ref/org.wikipedia.navtab.NavTabViewTest.testLayoutDirection-120dp-en-ltr-font1.0x-light.png
deleted file mode 100644
index f695a38..000
--- 
a/app/screenshots-ref/org.wikipedia.navtab.NavTabViewTest.testLayoutDirection-120dp-en-ltr-font1.0x-light.png
+++ /dev/null
Binary files differ
diff --git 
a/app/screenshots-ref/org.wikipedia.navtab.NavTabViewTest.testLayoutDirection-120dp-en-rtl-font1.0x-light.png
 
b/app/screenshots-ref/org.wikipedia.navtab.NavTabViewTest.testLayoutDirection-120dp-en-rtl-font1.0x-light.png
deleted file mode 100644
index f695a38..000
--- 
a/app/screenshots-ref/org.wikipedia.navtab.NavTabViewTest.testLayoutDirection-120dp-en-rtl-font1.0x-light.png
+++ /dev/null
Binary files differ
diff --git 
a/app/screenshots-ref/org.wikipedia.navtab.NavTabViewTest.testSelect-120dp-en-ltr-font1.0x-dark.png
 
b/app/screenshots-ref/org.wikipedia.navtab.NavTabViewTest.testSelect-120dp-en-ltr-font1.0x-dark.png
deleted file mode 100644
index bf26306..000
--- 
a/app/screenshots-ref/org.wikipedia.navtab.NavTabViewTest.testSelect-120dp-en-ltr-font1.0x-dark.png
+++ /dev/null
Binary files differ
diff --git 
a/app/screenshots-ref/org.wikipedia.navtab.NavTabViewTest.testSelect-120dp-en-ltr-font1.0x-light.png
 
b/app/screenshots-ref/org.wikipedia.navtab.NavTabViewTest.testSelect-120dp-en-ltr-font1.0x-light.png
deleted file mode 100644
index bf26306..000
--- 
a/app/screenshots-ref/org.wikipedia.navtab.NavTabViewTest.testSelect-120dp-en-ltr-font1.0x-light.png
+++ /dev/null
Binary files differ
diff --git 
a/app/screenshots-ref/org.wikipedia.navtab.NavTabViewTest.testTheme-120dp-en-ltr-font1.0x-dark.png
 
b/app/screenshots-ref/org.wikipedia.navtab.NavTabViewTest.testTheme-120dp-en-ltr-font1.0x-dark.png
deleted file mode 100644
index f695a38..000
--- 
a/app/screenshots-ref/org.wikipedia.navtab.NavTabViewTest.testTheme-120dp-en-ltr-font1.0x-dark.png
+++ /dev/null
Binary files differ
diff --git 
a/app/screenshots-ref/org.wikipedia.navtab.NavTabViewTest.testTheme-120dp-en-ltr-font1.0x-light.png
 
b/app/screenshots-ref/org.wikipedia.navtab.NavTabViewTest.testTheme-120dp-en-ltr-font1.0x-light.png
deleted file mode 100644
index f695a38..000
--- 
a/app/screenshots-ref/org.wikipedia.navtab.NavTabViewTest.testTheme-120dp-en-ltr-font1.0x-light.png
+++ /dev/null
Binary files differ
diff --git 
a/app/screenshots-ref/org.wikipedia.navtab.NavTabViewTest.testWidth-120dp-en-ltr-font1.0x-light.png
 
b/app/screenshots-ref/org.wikipedia.navtab.NavTabViewTest.testWidth-120dp-en-ltr-font1.0x-light.png
deleted file mode 100644
index f695a38..000
--- 
a/app/screenshots-ref/org.wikipedia.navtab.NavTabViewTest.testWidth-120dp-en-ltr-font1.0x-light.png
+++ /dev/null
Binary files differ
diff 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Fix mute state styling

2017-02-23 Thread Mooeypoo (Code Review)
Mooeypoo has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/339582 )

Change subject: Fix mute state styling
..

Fix mute state styling

For some reason it stopped styling muted state in filterItemWidgets
Also adjusted the styling to be more similar to the prototype.

Bug: T156429
Change-Id: Ib043729ab7cfd32253d9424b145794e484ec11b6
---
M resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.FilterItemWidget.less
1 file changed, 18 insertions(+), 13 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/82/339582/1

diff --git 
a/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.FilterItemWidget.less
 
b/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.FilterItemWidget.less
index 293f3c3..94da3ac 100644
--- 
a/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.FilterItemWidget.less
+++ 
b/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.FilterItemWidget.less
@@ -8,26 +8,31 @@
padding-top: 0.5em;
}
 
-   &-filterCheckbox {
-   &-label {
-   &-title {
-   font-weight: bold;
-   font-size: 1.2em;
-   color: #222;
-   }
-   &-desc {
-   color: #464a4f;
-   }
+   &-muted {
+   background-color: #f8f9fa; // Base90 AAA
+   .mw-rcfilters-ui-filterItemWidget-label-title,
+   .mw-rcfilters-ui-filterItemWidget-label-desc {
+   color: #54595d; // Base20 AAA
}
+   }
 
+   &-label {
+   &-title {
+   font-weight: bold;
+   font-size: 1.2em;
+   color: #222;
+   }
+   &-desc {
+   color: #464a4f;
+   }
+   }
+
+   &-filterCheckbox {
.oo-ui-fieldLayout.oo-ui-fieldLayout-align-inline {
// Override margin-top and -bottom rules from 
FieldLayout
margin: 0 !important;
}
 
-   &-muted {
-   opacity: 0.5;
-   }
}
 
&-highlightButton {

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

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

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


[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Improve/simplify bottom tab bar behavior.

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

Change subject: Improve/simplify bottom tab bar behavior.
..


Improve/simplify bottom tab bar behavior.

This moves away from using a fake AppBarLayout to control the animation of
our bottom tab bar.  In doing this, we fix a few weird behaviors that have
been observed since its introduction.

Instead, the new behavior animates the bottom tab bar based on actual
nested scroll events coming from the CoordinatorLayout.

Note: This contains a slight workaround for a known support library issue:
https://code.google.com/p/android/issues/detail?id=222911
This is done by adding `focusableInTouchMode1 to the FrameLayout that
contains our FeedView, to prevent it from automatically jump-scrolling on
certain devices.

Bug: T156012
Bug: T146890
Bug: T148689
Change-Id: I6707637ca228c732e901de4125094f2fd87f8578
---
M app/src/main/java/org/wikipedia/main/MainFragment.java
M app/src/main/java/org/wikipedia/nearby/NearbyFragment.java
M app/src/main/java/org/wikipedia/readinglist/ReadingListsFragment.java
M app/src/main/java/org/wikipedia/util/FeedbackUtil.java
M app/src/main/java/org/wikipedia/views/BottomAppBarLayoutBehavior.java
M app/src/main/res/layout/fragment_feed.xml
M app/src/main/res/layout/fragment_history.xml
M app/src/main/res/layout/fragment_main.xml
M app/src/main/res/layout/fragment_nearby.xml
M app/src/main/res/layout/fragment_reading_lists.xml
10 files changed, 111 insertions(+), 58 deletions(-)

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



diff --git a/app/src/main/java/org/wikipedia/main/MainFragment.java 
b/app/src/main/java/org/wikipedia/main/MainFragment.java
index f92450d..17a1016 100644
--- a/app/src/main/java/org/wikipedia/main/MainFragment.java
+++ b/app/src/main/java/org/wikipedia/main/MainFragment.java
@@ -13,7 +13,6 @@
 import android.speech.RecognizerIntent;
 import android.support.annotation.NonNull;
 import android.support.annotation.Nullable;
-import android.support.design.widget.AppBarLayout;
 import android.support.design.widget.CoordinatorLayout;
 import android.support.design.widget.TabLayout;
 import android.support.v4.app.Fragment;
@@ -59,6 +58,7 @@
 import org.wikipedia.util.PermissionUtil;
 import org.wikipedia.util.ShareUtil;
 import org.wikipedia.util.log.L;
+import org.wikipedia.views.BottomAppBarLayoutBehavior;
 
 import java.io.File;
 import java.util.concurrent.TimeUnit;
@@ -72,7 +72,6 @@
 NearbyFragment.Callback, HistoryFragment.Callback, 
ReadingListsFragment.Callback,
 SearchFragment.Callback, LinkPreviewDialog.Callback, 
AddToReadingListDialog.Callback {
 @BindView(R.id.fragment_main_container) CoordinatorLayout 
coordinatorLayout;
-@BindView(R.id.fragment_main_padding_app_bar) AppBarLayout paddingAppBar;
 @BindView(R.id.fragment_main_view_pager) ViewPager viewPager;
 @BindView(R.id.fragment_main_nav_tab_layout) TabLayout tabLayout;
 private Unbinder unbinder;
@@ -467,11 +466,9 @@
 }
 
 private void ensureNavBarVisible() {
-CoordinatorLayout.LayoutParams params = 
(CoordinatorLayout.LayoutParams) paddingAppBar.getLayoutParams();
-AppBarLayout.Behavior behavior = (AppBarLayout.Behavior) 
params.getBehavior();
-if (behavior != null) {
-behavior.onNestedFling(coordinatorLayout, paddingAppBar, null, 0, 
params.height, true);
-}
+BottomAppBarLayoutBehavior behavior = (BottomAppBarLayoutBehavior)
+((CoordinatorLayout.LayoutParams) 
tabLayout.getLayoutParams()).getBehavior();
+behavior.show(tabLayout);
 }
 
 @Nullable private Callback callback() {
diff --git a/app/src/main/java/org/wikipedia/nearby/NearbyFragment.java 
b/app/src/main/java/org/wikipedia/nearby/NearbyFragment.java
index 0421f57..f07bf71 100644
--- a/app/src/main/java/org/wikipedia/nearby/NearbyFragment.java
+++ b/app/src/main/java/org/wikipedia/nearby/NearbyFragment.java
@@ -307,7 +307,7 @@
 }
 
 private void showLocationDisabledSnackbar() {
-Snackbar snackbar = FeedbackUtil.makeSnackbar(getView(),
+Snackbar snackbar = FeedbackUtil.makeSnackbar(getActivity(),
 getString(R.string.location_service_disabled),
 FeedbackUtil.LENGTH_DEFAULT);
 snackbar.setAction(R.string.enable_location_service, new 
View.OnClickListener() {
diff --git 
a/app/src/main/java/org/wikipedia/readinglist/ReadingListsFragment.java 
b/app/src/main/java/org/wikipedia/readinglist/ReadingListsFragment.java
index 761a7ca..9ca24d9 100644
--- a/app/src/main/java/org/wikipedia/readinglist/ReadingListsFragment.java
+++ b/app/src/main/java/org/wikipedia/readinglist/ReadingListsFragment.java
@@ -344,7 +344,7 @@
 }
 
 private void showDeleteListUndoSnackbar(final ReadingList readingList) {
-

[MediaWiki-commits] [Gerrit] mediawiki...ORES[master]: Make wording of filters in Special:Contribs as the same as C...

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

Change subject: Make wording of filters in Special:Contribs as the same as 
ChangesLists
..

Make wording of filters in Special:Contribs as the same as ChangesLists

Bug: T158862
Change-Id: I7fb589390086b3557f6ed924f1e31ecc6c4f9079
---
M i18n/en.json
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/i18n/en.json b/i18n/en.json
index ade6379..d9e9dbf 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -13,7 +13,7 @@
"ores-damaging-title": "This edit needs review",
"ores-damaging-legend": "This edit may be damaging and should be 
reviewed ([[:mw:Special:MyLanguage/ORES review tool|more info]])",
"ores-help-damaging-pref": "This threshold determines how sensitive 
ORES is when flagging edits needing review",
-   "ores-hide-nondamaging-filter": "Only show edits needing review",
+   "ores-hide-nondamaging-filter": "Hide probably good edits",
"ores-pref-damaging": "ORES sensitivity",
"ores-pref-rc-hidenondamaging": "Hide probably good edits from recent 
changes",
"ores-pref-watchlist-hidenondamaging": "Hide probably good edits from 
the watchlist",

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: labstore: Install package nethogs from jessie-backports

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

Change subject: labstore: Install package nethogs from jessie-backports
..


labstore: Install package nethogs from jessie-backports

Change-Id: I88318b3a399c15b0588052c00fefea22fec389f2
---
M modules/labstore/manifests/init.pp
1 file changed, 15 insertions(+), 0 deletions(-)

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



diff --git a/modules/labstore/manifests/init.pp 
b/modules/labstore/manifests/init.pp
index a101b5c..eeec2aa 100644
--- a/modules/labstore/manifests/init.pp
+++ b/modules/labstore/manifests/init.pp
@@ -11,6 +11,21 @@
 require_package('lvm2')
 require_package('nfsd-ldap')
 
+# Nethogs is useful to monitor NFS client resource utilization
+# The version in jessie has a bug that shows up in linux kernel 4.2+,
+# so using newer version from backports.
+if os_version('debian jessie') {
+apt::pin {'nethogs':
+pin  => 'release a=jessie-backports',
+priority => '1001',
+before   => Package['nethogs'],
+}
+}
+
+package { 'nethogs':
+ensure => present,
+}
+
 $ldapincludes = ['openldap', 'nss', 'utils']
 class { '::ldap::role::client::labs': ldapincludes => $ldapincludes }
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I88318b3a399c15b0588052c00fefea22fec389f2
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Madhuvishy 
Gerrit-Reviewer: Madhuvishy 
Gerrit-Reviewer: Rush 
Gerrit-Reviewer: Tim Landscheidt 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Align trash icon with filter list

2017-02-23 Thread Mooeypoo (Code Review)
Mooeypoo has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/339580 )

Change subject: Align trash icon with filter list
..

Align trash icon with filter list

Bug: T149391
Change-Id: Icf867bf572253d288602f00890551909d869a459
---
M 
resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.FilterCapsuleMultiselectWidget.less
M 
resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterCapsuleMultiselectWidget.js
2 files changed, 37 insertions(+), 42 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/80/339580/1

diff --git 
a/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.FilterCapsuleMultiselectWidget.less
 
b/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.FilterCapsuleMultiselectWidget.less
index 6c11cdb..8921f7a 100644
--- 
a/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.FilterCapsuleMultiselectWidget.less
+++ 
b/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.FilterCapsuleMultiselectWidget.less
@@ -18,21 +18,12 @@
color: #72777d;
}
 
-   &-table {
-   display: table;
+   &-cell-filters {
width: 100%;
}
-
-   &-row {
-   display: table-row;
-   }
-
-   &-cell {
-   display: table-cell;
-
-   &:last-child {
-   text-align: right;
-   }
+   &-cell-reset {
+   text-align: right;
+   padding-left: 0.5em;
}
 
.oo-ui-capsuleItemWidget {
diff --git 
a/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterCapsuleMultiselectWidget.js
 
b/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterCapsuleMultiselectWidget.js
index 910e8e1..50b7d15 100644
--- 
a/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterCapsuleMultiselectWidget.js
+++ 
b/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterCapsuleMultiselectWidget.js
@@ -13,6 +13,13 @@
 * @cfg {jQuery} [$overlay] A jQuery object serving as overlay for 
popups
 */
mw.rcfilters.ui.FilterCapsuleMultiselectWidget = function 
MwRcfiltersUiFilterCapsuleMultiselectWidget( controller, model, filterInput, 
config ) {
+   var title = new OO.ui.LabelWidget( {
+   label: mw.msg( 'rcfilters-activefilters' ),
+   classes: [ 
'mw-rcfilters-ui-filterCapsuleMultiselectWidget-wrapper-content-title' ]
+   } ),
+   $contentWrapper = $( '' )
+   .addClass( 
'mw-rcfilters-ui-filterCapsuleMultiselectWidget-wrapper' );
+
this.$overlay = config.$overlay || this.$element;
 
// Parent
@@ -25,12 +32,6 @@
 
this.filterInput = filterInput;
 
-   this.$content.prepend(
-   $( '' )
-   .addClass( 
'mw-rcfilters-ui-filterCapsuleMultiselectWidget-content-title' )
-   .text( mw.msg( 'rcfilters-activefilters' ) )
-   );
-
this.resetButton = new OO.ui.ButtonWidget( {
icon: 'trash',
framed: false,
@@ -42,6 +43,7 @@
label: mw.msg( 'rcfilters-empty-filter' ),
classes: [ 
'mw-rcfilters-ui-filterCapsuleMultiselectWidget-emptyFilters' ]
} );
+   this.$content.append( this.emptyFilterMessage.$element );
 
// Events
this.resetButton.connect( this, { click: 'onResetButtonClick' } 
);
@@ -53,30 +55,32 @@
this.filterInput.$input
.on( 'focus', this.focus.bind( this ) );
 
+   // Build the content
+   $contentWrapper.append(
+   title.$element,
+   $( '' )
+   .addClass( 'mw-rcfilters-ui-table' )
+   .append(
+   // The filter list and button should 
appear side by side regardless of how
+   // wide the button is; the button also 
changes its width depending
+   // on language and its state, so the 
safest way to present both side
+   // by side is with a table layout
+   $( '' )
+   .addClass( 
'mw-rcfilters-ui-row' )
+   .append(
+   this.$content
+   .addClass( 
'mw-rcfilters-ui-cell' )
+   .addClass( 
'mw-rcfilters-ui-filterCapsuleMultiselectWidget-cell-filters' ),
+   

[MediaWiki-commits] [Gerrit] operations/puppet[production]: Tools: Fully qualify hostnames

2017-02-23 Thread Andrew Bogott (Code Review)
Andrew Bogott has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/328451 )

Change subject: Tools: Fully qualify hostnames
..


Tools: Fully qualify hostnames

This change fully qualifies some hostnames in the "flat" namespace
beneath .eqiad.wmflabs.  Hostnames should only refer to the
project-specific instance, i. e. beneath .tools.eqiad.wmflabs.

This is most obvious in the case of role::toollabs::services: Here the
parameter $active_host was tested for equality with $::fqdn.  However,
due to $active_host being "tools-services-01.eqiad.wmflabs" and
$::fqdn being "tools-services-01.tools.eqiad.wmflabs", this would have
failed if $active_host had not been overwritten at
https://wikitech.wikimedia.org/wiki/Hiera:Tools.

An exception to this rule are modules/toollabs/files/host_aliases and
modules/toollabs/templates/mail-relay.exim4.conf.erb that need to list
legacy hostnames.

Bug: T153608
Change-Id: I6888bb449bd59bf4c522e3b14d6a38dc2540decd
---
M hieradata/labs/tools/common.yaml
M modules/role/manifests/toollabs/services.pp
M modules/toollabs/files/exec-manage
M modules/toollabs/manifests/init.pp
4 files changed, 4 insertions(+), 4 deletions(-)

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



diff --git a/hieradata/labs/tools/common.yaml b/hieradata/labs/tools/common.yaml
index 24c35d4..c62e87a 100644
--- a/hieradata/labs/tools/common.yaml
+++ b/hieradata/labs/tools/common.yaml
@@ -1,7 +1,7 @@
 "profile::base::core_dump_pattern": core
 classes:
 - role::aptly::client
-role::aptly::client::servername: tools-services-01
+role::aptly::client::servername: tools-services-01.tools.eqiad.wmflabs
 standard::has_default_mail_relay: false
 k8s_regular_users:
   - lolrrit-wm
diff --git a/modules/role/manifests/toollabs/services.pp 
b/modules/role/manifests/toollabs/services.pp
index 046eb14..068bbf3 100644
--- a/modules/role/manifests/toollabs/services.pp
+++ b/modules/role/manifests/toollabs/services.pp
@@ -1,6 +1,6 @@
 # filtertags: labs-project-tools
 class role::toollabs::services(
-$active_host = 'tools-services-01.eqiad.wmflabs',
+$active_host = 'tools-services-01.tools.eqiad.wmflabs',
 ) {
 system::role { 'role::toollabs::services':
 description => 'Tool Labs manifest based services',
diff --git a/modules/toollabs/files/exec-manage 
b/modules/toollabs/files/exec-manage
index 3eadaea..7a5fbd1 100644
--- a/modules/toollabs/files/exec-manage
+++ b/modules/toollabs/files/exec-manage
@@ -11,7 +11,7 @@
 echo "exec-manage [status|depool|repool|test] exec_host_name"
 echo "exec-manage [list]"
 echo ""
-echo "Example: exec-manage status tools-exec1001.eqiad.wmflabs "
+echo "Example: exec-manage status tools-exec1001.tools.eqiad.wmflabs"
 }
 
 if [[ ! "$1" || "$1" == '-h' ]]; then
diff --git a/modules/toollabs/manifests/init.pp 
b/modules/toollabs/manifests/init.pp
index 3ef6e56..33a98b6 100644
--- a/modules/toollabs/manifests/init.pp
+++ b/modules/toollabs/manifests/init.pp
@@ -4,7 +4,7 @@
 $external_hostname = undef,
 $external_ip = undef,
 $is_mail_relay = false,
-$active_mail_relay = 'tools-mail.eqiad.wmflabs',
+$active_mail_relay = 'tools-mail.tools.eqiad.wmflabs',
 $mail_domain = 'tools.wmflabs.org',
 ) {
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6888bb449bd59bf4c522e3b14d6a38dc2540decd
Gerrit-PatchSet: 6
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Landscheidt 
Gerrit-Reviewer: Andrew Bogott 
Gerrit-Reviewer: Chasemp 
Gerrit-Reviewer: Coren 
Gerrit-Reviewer: Madhuvishy 
Gerrit-Reviewer: Merlijn van Deen 
Gerrit-Reviewer: Tim Landscheidt 
Gerrit-Reviewer: Yuvipanda 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: Fix typos in parserTests.txt

2017-02-23 Thread Arlolra (Code Review)
Arlolra has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/339579 )

Change subject: Fix typos in parserTests.txt
..

Fix typos in parserTests.txt

Change-Id: I893d5dd78fe7603ebb080e2ef1083c64de32fde3
---
M tests/parserTests.txt
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid 
refs/changes/79/339579/1

diff --git a/tests/parserTests.txt b/tests/parserTests.txt
index 8aaf39e..9af52bd 100644
--- a/tests/parserTests.txt
+++ b/tests/parserTests.txt
@@ -24142,7 +24142,7 @@
 !! test
 4. No escaping needed
 !! options
-options=html2wt
+parsoid=html2wt
 !! html/parsoid
 'bar'
 'bar'
@@ -24279,7 +24279,7 @@
 !! test
 4. Leading whitespace in indent-pre suppressing contexts should not be escaped
 !! options
-options=html2wt
+parsoid=html2wt
 !! html/parsoid
  caption
 !! wikitext

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I893d5dd78fe7603ebb080e2ef1083c64de32fde3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Arlolra 

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


[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: T156295: Make tests php only

2017-02-23 Thread Arlolra (Code Review)
Arlolra has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/339578 )

Change subject: T156295: Make  tests php only
..

T156295: Make  tests php only

Change-Id: I7c4699a6b5ac1f2d1c891f0d66b3e1cc7d0bd5fa
---
M lib/config/baseconfig/enwiki.json
M tests/parserTests-blacklist.js
M tests/parserTests.txt
3 files changed, 5 insertions(+), 12 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid 
refs/changes/78/339578/1

diff --git a/lib/config/baseconfig/enwiki.json 
b/lib/config/baseconfig/enwiki.json
index 524e179..fef34c1 100644
--- a/lib/config/baseconfig/enwiki.json
+++ b/lib/config/baseconfig/enwiki.json
@@ -1297,7 +1297,8 @@
   "",
   "",
   "",
-  ""
+  "",
+  ""
 ],
 "general": {
   "mainpage": "Main Page",
diff --git a/tests/parserTests-blacklist.js b/tests/parserTests-blacklist.js
index 93087ee..985d46d 100644
--- a/tests/parserTests-blacklist.js
+++ b/tests/parserTests-blacklist.js
@@ -240,9 +240,6 @@
 add("wt2html", "formatdate parser function, with default format and on a page 
of which the content language is always English and different from the wiki 
content language", "Parser
 function implementation for pf_#formatdate missing in Parsoid.");
 add("wt2html", "Bad images - basic functionality", "");
 add("wt2html", "Bad images - T18039: text after bad image disappears", "Foo bar\n\nBar
 foo");
-add("wt2html", "Page status indicators: Empty name is invalid", "indicator name=\" 
\">/indicator>\nindicator>/indicator>");
-add("wt2html", "Page status indicators: Weird syntaxes that are okay", "indicator name=\"empty\" 
/>\nindicator name=\"name\">/indicator>");
-add("wt2html", "Page status indicators: Torture test", "indicator name=\"01\">hello 
world/indicator>\nindicator name=\"02\">Main Page/indicator>\nindicator 
name=\"03\">/indicator>\nindicator
 name=\"04\">/indicator>\nindicator
 name=\"05\">* foo\n bar/indicator>\nindicator name=\"06\">foo/indicator>\nindicator 
name=\"07\"> Preformatted/indicator>\nindicator name=\"08\">Broken
 tag/indicator>\nindicator 
name=\"09\">{| class=wikitable\n| cell\n|}/indicator>\nindicator 
name=\"10\">Two\n\nparagraphs/indicator>");
 add("wt2html", "T33098 Template which includes system messages which includes 
the template", "Parser
 function implementation for pf_int missing in Parsoid.\nParser function 
implementation for pf_int missing in Parsoid.");
 add("wt2html", "T33490 Turkish: ucfirst 'ix'", "Ix");
 add("wt2html", "T33490 Turkish: ucfırst (with a dotless i)", "Warning:
 Page/template fetching disabled, and no cache for Ucfırst:blah");
@@ -540,8 +537,6 @@
 add("html2html", "Free external link invading image caption", "http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg\; 
alt=\"180px-Foobar.jpg\" rel=\"mw:externalImage\" 
data-parsoid='{\"dsr\":[71,135,null,null]}'/>  [/wiki/File:Foobar.jpg]hello\n");
 add("html2html", "Bad images - basic functionality", "\n");
 add("html2html", "Bad images - T18039: text after bad image disappears", "Foo bar\n\nBar
 foo\n");
-add("html2html", "Page status indicators: Weird syntaxes that are okay", "empty=\nname=\n\n\n");
-add("html2html", "Page status indicators: Torture test", "01=hello world\n02=Main Page\n03=http://example.com/images/thumb/3/3a/Foobar.jpg/25px-Foobar.jpg\; 
alt=\"25px-Foobar.jpg\" rel=\"mw:externalImage\" 
data-parsoid='{\"dsr\":[50,113,null,null]}'/>\n04=http://example.com/images/thumb/3/3a/Foobar.jpg/25px-Foobar.jpg\; 
alt=\"25px-Foobar.jpg\" rel=\"mw:externalImage\" 
data-parsoid='{\"dsr\":[117,180,null,null]}'/>\n05=\n foo\n bar\n\n06=foo\n07=\nPreformatted\n\n08=Broken tag\n\n09=\n\n 
cell\n\n\n10=\n\nTwo\n\nparagraphs\n\n\n\n\n\n\n\n\n\n\n");
 add("html2html", "T33098 Template which includes system messages which 
includes the template", "Template 
loop detected: Template:Identical\nTemplate loop detected: 
Template:Identical\n");
 add("html2html", "T33490 Turkish: ucfırst (with a dotless i)", "[/index.php?title=%C5%9Eablon:Ucf%C4%B1rst:blahaction=editredlink=1
 Şablon:Ucfırst:blah]\n");
 add("html2html", "T33490 ucfırst (with a dotless i) with English language", 
"[/index.php?title=Template:Ucf%C4%B1rst:blahaction=editredlink=1
 Template:Ucfırst:blah]\n");
@@ -1151,9 +1146,6 @@
 add("html2wt", "formatdate parser function, with default format", "March 24, 2009\n");
 add("html2wt", "Spacing of numbers in formatted dates", "January 15\n");
 add("html2wt", "formatdate parser function, with default format and on a page 
of which the content language is always English and different from the wiki 
content language", "24 
March 2009\n");
-add("html2wt", "Page status indicators: Empty name is invalid", "Error: Page status indicators' 
name attribute must not be empty.\nError: Page status indicators' 
name attribute must not be empty.\n");
-add("html2wt", "Page status indicators: Weird syntaxes that are okay", 
"empty=\nname=\n\n\n");

[MediaWiki-commits] [Gerrit] mediawiki...SecurePoll[master]: Don't declare SecurePoll_Election->owner dynamically

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

Change subject: Don't declare SecurePoll_Election->owner dynamically
..


Don't declare SecurePoll_Election->owner dynamically

Change-Id: I02e02bdadcb878090eeddac857c2e212bf1fa611
---
M includes/entities/Election.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/includes/entities/Election.php b/includes/entities/Election.php
index bde1b78..7f070a4 100644
--- a/includes/entities/Election.php
+++ b/includes/entities/Election.php
@@ -71,7 +71,7 @@
 class SecurePoll_Election extends SecurePoll_Entity {
public $questions, $auth, $ballot;
public $id, $title, $ballotType, $tallyType, $primaryLang;
-   public $startDate, $endDate, $authType;
+   public $startDate, $endDate, $authType, $owner;
 
/**
 * Constructor.

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I02e02bdadcb878090eeddac857c2e212bf1fa611
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SecurePoll
Gerrit-Branch: master
Gerrit-Owner: Reedy 
Gerrit-Reviewer: Huji 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: labstore: Cleanup old/unused labstore1001 nfs related puppet...

2017-02-23 Thread Madhuvishy (Code Review)
Madhuvishy has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/339577 )

Change subject: labstore: Cleanup old/unused labstore1001 nfs related puppet 
files
..

labstore: Cleanup old/unused labstore1001 nfs related puppet files

Bug: T158196
Change-Id: I5cc74313715a94ae24a713df98982eb5477e6b7e
---
D modules/labstore/files/start-nfs
D modules/labstore/files/sync-exports
M modules/labstore/manifests/fileserver/exports.pp
D modules/labstore/manifests/fileserver/primary.pp
D modules/labstore/templates/initscripts/cleanup.timer.erb
D modules/labstore/templates/initscripts/replicate.timer.erb
D modules/role/manifests/labs/nfs/backup.pp
7 files changed, 1 insertion(+), 217 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/77/339577/1

diff --git a/modules/labstore/files/start-nfs b/modules/labstore/files/start-nfs
deleted file mode 100755
index 5661b18..000
--- a/modules/labstore/files/start-nfs
+++ /dev/null
@@ -1,53 +0,0 @@
-#! /bin/bash
-set -e
-
-cat <
-#
-#  Permission to use, copy, modify, and/or distribute this software for any
-#  purpose with or without fee is hereby granted, provided that the above
-#  copyright notice and this permission notice appear in all copies.
-#
-#  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-#  WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-#  MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-#  ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-#  WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-#  ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-#  OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-#
-##
-## THIS FILE IS MANAGED BY PUPPET
-##
-## Source: modules/ldap/files/scripts/sync-exports
-## From:   ldap::client::utils
-##
-
-for dir in /srv/*; do
-  exp=$(basename $dir)
-  if [ ! -d /exp/$exp ]; then mkdir /exp/$exp; fi
-  if [ "$exp" == "project" ]; then
-for pdir in /srv/project/* /srv/others/*; do
-  proj=$(basename $pdir)
-  if [ "$proj" != "lost+found" ]; then
-if [ ! -d /exp/project/$proj ]; then mkdir /exp/project/$proj; fi
-if ! /bin/mountpoint -q /exp/project/$proj; then /bin/mount --bind 
$pdir /exp/project/$proj; fi
-  fi
-done
-  else
-if ! /bin/mountpoint -q /exp/$exp; then /bin/mount --bind $dir /exp/$exp; 
fi
-  fi
-done
-
-for dir in /exp/project/*; do
-  if [ ! -d /srv/project/$(basename $dir) -a ! -d /srv/others/$(basename $dir) 
]; then
-if /bin/mountpoint -q $dir; then /bin/umount $dir; fi
-/bin/rmdir $dir
-  fi
-done
-
-for dir in /exp/*; do
-  if [ ! -d /srv/$(basename $dir) ]; then
-if /bin/mountpoint -q $dir; then /bin/umount $dir; fi
-/bin/rmdir $dir
-  fi
-done
-
-/usr/sbin/exportfs -ra
diff --git a/modules/labstore/manifests/fileserver/exports.pp 
b/modules/labstore/manifests/fileserver/exports.pp
index 6737ed7..bfd3f22 100644
--- a/modules/labstore/manifests/fileserver/exports.pp
+++ b/modules/labstore/manifests/fileserver/exports.pp
@@ -29,7 +29,6 @@
 privileges => [
 'ALL = NOPASSWD: /bin/mkdir -p /srv/*',
 'ALL = NOPASSWD: /bin/rmdir /srv/*',
-'ALL = NOPASSWD: /usr/local/sbin/sync-exports',
 'ALL = NOPASSWD: /usr/sbin/exportfs',
 ],
 require=> User['nfsmanager'],
@@ -43,8 +42,6 @@
 require => [Package['python3'], Package['python3-yaml']],
 }
 
-# Effectively replaces /usr/local/sbin/sync-exports but
-# makes assumptions only true on newer systems at the moment
 file { '/usr/local/sbin/nfs-manage-binds':
 owner   => 'root',
 group   => 'root',
@@ -53,13 +50,6 @@
 require => File['/etc/nfs-mounts.yaml'],
 }
 
-file { '/usr/local/sbin/sync-exports':
-owner   => 'root',
-group   => 'root',
-mode=> '0555',
-source  => 'puppet:///modules/labstore/sync-exports',
-require => File['/etc/nfs-mounts.yaml'],
-}
 
 include ::openstack::clientlib
 file { '/usr/local/bin/nfs-exportd':
@@ -67,7 +57,7 @@
 group   => 'root',
 mode=> '0555',
 source  => 'puppet:///modules/labstore/nfs-exportd',
-require => File['/usr/local/sbin/sync-exports'],
+require => File['/usr/local/sbin/nfs-manage-binds'],
 }
 
 file { '/usr/local/sbin/archive-project-volumes':
diff --git a/modules/labstore/manifests/fileserver/primary.pp 
b/modules/labstore/manifests/fileserver/primary.pp
deleted file mode 100644
index 1bcb5a0..000
--- a/modules/labstore/manifests/fileserver/primary.pp
+++ /dev/null
@@ -1,27 +0,0 @@
-class labstore::fileserver::primary {
-
-requires_os('Debian >= jessie')
-
-# Set to true only for the labstore that is currently
-# actively serving files
-$is_active = 

[MediaWiki-commits] [Gerrit] operations/dns[master]: Removing dns entries for several decom servers, strontium, a...

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

Change subject: Removing dns entries for several decom servers, strontium, 
antimony, lanthanum, carbon, neon, magnesium, tantalum, analytics1026
..


Removing dns entries for several decom servers, strontium, antimony, lanthanum, 
carbon, neon, magnesium, tantalum, analytics1026

Change-Id: I91b173c3236d384575c4ef3ead0f7c3cdf074b6f
---
M templates/10.in-addr.arpa
M templates/wmnet
2 files changed, 4 insertions(+), 28 deletions(-)

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



diff --git a/templates/10.in-addr.arpa b/templates/10.in-addr.arpa
index d71ff0c..0094102 100644
--- a/templates/10.in-addr.arpa
+++ b/templates/10.in-addr.arpa
@@ -257,7 +257,7 @@
 22  1H IN PTR   tungsten.eqiad.wmnet.
 23  1H IN PTR   ms1003.eqiad.wmnet.
 24  1H IN PTR   rdb1005.eqiad.wmnet.
-26  1H IN PTR   tantalum.eqiad.wmnet.
+
 27  1H IN PTR   cam1-a-eqiad.eqiad.wmnet.
 28  1H IN PTR   cam2-a-eqiad.eqiad.wmnet.
 29  1H IN PTR   cam1-a-b-eqiad.eqiad.wmnet.
@@ -337,7 +337,7 @@
 126 1H IN PTR   aqs1004-a.eqiad.wmnet. ; cassandra instance
 127 1H IN PTR   aqs1004-b.eqiad.wmnet. ; cassandra instance
 162 1H IN PTR   logstash1004.eqiad.wmnet.
-164 1H IN PTR   strontium.eqiad.wmnet.
+
 165 1H IN PTR   dbproxy1001.eqiad.wmnet.
 166 1H IN PTR   dbproxy1002.eqiad.wmnet.
 167 1H IN PTR   ms-fe1001.eqiad.wmnet.
@@ -1547,11 +1547,7 @@
 3   1H  IN PTR  silicon.mgmt.eqiad.wmnet.
 3   1H  IN PTR  wmf3148.mgmt.eqiad.wmnet.
 4   1H  IN PTR  wmf3147.mgmt.eqiad.wmnet.
-5   1H  IN PTR  magnesium.mgmt.eqiad.wmnet.
-5   1H  IN PTR  wmf3146.mgmt.eqiad.wmnet.
 
-7   1H  IN PTR  neon.mgmt.eqiad.wmnet.
-7   1H  IN PTR  wmf3144.mgmt.eqiad.wmnet.
 8   1H  IN PTR  fluorine.mgmt.eqiad.wmnet.
 8   1H  IN PTR  wmf3143.mgmt.eqiad.wmnet.
 9   1H  IN PTR  oxygen.mgmt.eqiad.wmnet.
@@ -1591,8 +1587,6 @@
 30  1H  IN PTR  wmf3289.mgmt.eqiad.wmnet.
 32  1H  IN PTR  poolcounter1002.mgmt.eqiad.wmnet.
 32  1H  IN PTR  wmf3287.mgmt.eqiad.wmnet.
-33  1H  IN PTR  tantalum.mgmt.eqiad.wmnet.
-33  1H  IN PTR  wmf3407.mgmt.eqiad.wmnet.
 34  1H  IN PTR  rhenium.mgmt.eqiad.wmnet.
 34  1H  IN PTR  wmf3408.mgmt.eqiad.wmnet.
 35  1H  IN PTR  rcs1002.mgmt.eqiad.wmnet.
@@ -1625,8 +1619,7 @@
 48  1H  IN PTR  wmf3423.mgmt.eqiad.wmnet.
 49  1H  IN PTR  rubidium.mgmt.eqiad.wmnet.
 49  1H  IN PTR  wmf3424.mgmt.eqiad.wmnet.
-50  1H  IN PTR  strontium.mgmt.eqiad.wmnet.
-50  1H  IN PTR  wmf3425.mgmt.eqiad.wmnet.
+
 51  1H  IN PTR  mw1259.mgmt.eqiad.wmnet.
 51  1H  IN PTR  wmf3426.mgmt.eqiad.wmnet.
 52  1H  IN PTR  wmf3427.mgmt.eqiad.wmnet.
@@ -1687,7 +1680,6 @@
 112 1H  IN PTR  conf1001.mgmt.eqiad.wmnet.
 113 1H  IN PTR  conf1002.mgmt.eqiad.wmnet.
 114 1H  IN PTR  conf1003.mgmt.eqiad.wmnet.
-115 1H  IN PTR  analytics1026.mgmt.eqiad.wmnet.
 116 1H  IN PTR  analytics1027.mgmt.eqiad.wmnet.
 117 1H  IN PTR  indium.mgmt.eqiad.wmnet.
 118 1H  IN PTR  wmf4073.mgmt.eqiad.wmnet.
@@ -1697,8 +1689,7 @@
 120 1H  IN PTR  wmf4075.mgmt.eqiad.wmnet.
 121 1H  IN PTR  barium.mgmt.eqiad.wmnet.
 121 1H  IN PTR  wmf4076.mgmt.eqiad.wmnet.
-122 1H  IN PTR  wmf4077.mgmt.eqiad.wmnet.
-122 1H  IN PTR  lanthanum.mngmt.eqiad.wmnet.
+
 123 1H  IN PTR  wmf4078.mgmt.eqiad.wmnet.
 123 1H  IN PTR  xenon.mgmt.eqiad.wmnet.
 124 1H  IN PTR  wmf4079.mgmt.eqiad.wmnet.
diff --git a/templates/wmnet b/templates/wmnet
index b5a2922..7508c89 100644
--- a/templates/wmnet
+++ b/templates/wmnet
@@ -802,12 +802,10 @@
 stat10031H  IN A10.64.36.103
 stat10041H  IN A10.64.5.104
 bromine 1H  IN A10.64.32.181 ; VM on the 
ganeti01.svc.eqiad.wmnet cluster
-strontium   1H  IN A10.64.0.164
 phab10011H  IN CNAMEiridium.eqiad.wmnet.
 phab1001-vcs1H  IN A10.64.32.186
 phab1001-vcs1H  IN  2620:0:861:103:10:64:32:186
 puppet  1H  IN CNAMEpuppetmaster1001.eqiad.wmnet.
-tantalum1H  IN A10.64.0.26
 technetium  1H  IN A10.64.32.188
 thorium 1H  IN A10.64.53.26
 thumbor1001 1H  IN A10.64.16.56
@@ -1088,7 +1086,6 @@
 conf10011H  IN A10.65.3.112
 conf10021H  IN A10.65.3.113
 conf10031H  IN A10.65.3.114
-analytics1026   1H  IN A10.65.3.115
 analytics1027   1H  IN A10.65.3.116
 wmf4580 1H  IN A10.65.3.211
 analytics1028   1H  IN A10.65.3.211
@@ -1522,8 +1519,6 @@
 wmf6968 1H  IN A10.65.8.35
 mc1036  1H  IN A10.65.8.36
 wmf6969 1H  IN A10.65.8.36
-tantalum1H  IN A10.65.3.33
-wmf3407 1H  IN A10.65.3.33
 rhenium 1H  IN A10.65.3.34
 wmf3408 1H  IN A10.65.3.34
 rcs1002 1H  IN A10.65.3.35
@@ -1816,8 +1811,6 @@
 

[MediaWiki-commits] [Gerrit] operations/dns[master]: Removing dns entries for several decom servers, strontium, a...

2017-02-23 Thread Cmjohnson (Code Review)
Cmjohnson has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/339576 )

Change subject: Removing dns entries for several decom servers, strontium, 
antimony, lanthanum, carbon, neon, magnesium, tantalum, analytics1026
..

Removing dns entries for several decom servers, strontium, antimony, lanthanum, 
carbon, neon, magnesium, tantalum, analytics1026

Change-Id: I91b173c3236d384575c4ef3ead0f7c3cdf074b6f
---
M templates/10.in-addr.arpa
M templates/wmnet
2 files changed, 4 insertions(+), 28 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/dns 
refs/changes/76/339576/1

diff --git a/templates/10.in-addr.arpa b/templates/10.in-addr.arpa
index d71ff0c..0094102 100644
--- a/templates/10.in-addr.arpa
+++ b/templates/10.in-addr.arpa
@@ -257,7 +257,7 @@
 22  1H IN PTR   tungsten.eqiad.wmnet.
 23  1H IN PTR   ms1003.eqiad.wmnet.
 24  1H IN PTR   rdb1005.eqiad.wmnet.
-26  1H IN PTR   tantalum.eqiad.wmnet.
+
 27  1H IN PTR   cam1-a-eqiad.eqiad.wmnet.
 28  1H IN PTR   cam2-a-eqiad.eqiad.wmnet.
 29  1H IN PTR   cam1-a-b-eqiad.eqiad.wmnet.
@@ -337,7 +337,7 @@
 126 1H IN PTR   aqs1004-a.eqiad.wmnet. ; cassandra instance
 127 1H IN PTR   aqs1004-b.eqiad.wmnet. ; cassandra instance
 162 1H IN PTR   logstash1004.eqiad.wmnet.
-164 1H IN PTR   strontium.eqiad.wmnet.
+
 165 1H IN PTR   dbproxy1001.eqiad.wmnet.
 166 1H IN PTR   dbproxy1002.eqiad.wmnet.
 167 1H IN PTR   ms-fe1001.eqiad.wmnet.
@@ -1547,11 +1547,7 @@
 3   1H  IN PTR  silicon.mgmt.eqiad.wmnet.
 3   1H  IN PTR  wmf3148.mgmt.eqiad.wmnet.
 4   1H  IN PTR  wmf3147.mgmt.eqiad.wmnet.
-5   1H  IN PTR  magnesium.mgmt.eqiad.wmnet.
-5   1H  IN PTR  wmf3146.mgmt.eqiad.wmnet.
 
-7   1H  IN PTR  neon.mgmt.eqiad.wmnet.
-7   1H  IN PTR  wmf3144.mgmt.eqiad.wmnet.
 8   1H  IN PTR  fluorine.mgmt.eqiad.wmnet.
 8   1H  IN PTR  wmf3143.mgmt.eqiad.wmnet.
 9   1H  IN PTR  oxygen.mgmt.eqiad.wmnet.
@@ -1591,8 +1587,6 @@
 30  1H  IN PTR  wmf3289.mgmt.eqiad.wmnet.
 32  1H  IN PTR  poolcounter1002.mgmt.eqiad.wmnet.
 32  1H  IN PTR  wmf3287.mgmt.eqiad.wmnet.
-33  1H  IN PTR  tantalum.mgmt.eqiad.wmnet.
-33  1H  IN PTR  wmf3407.mgmt.eqiad.wmnet.
 34  1H  IN PTR  rhenium.mgmt.eqiad.wmnet.
 34  1H  IN PTR  wmf3408.mgmt.eqiad.wmnet.
 35  1H  IN PTR  rcs1002.mgmt.eqiad.wmnet.
@@ -1625,8 +1619,7 @@
 48  1H  IN PTR  wmf3423.mgmt.eqiad.wmnet.
 49  1H  IN PTR  rubidium.mgmt.eqiad.wmnet.
 49  1H  IN PTR  wmf3424.mgmt.eqiad.wmnet.
-50  1H  IN PTR  strontium.mgmt.eqiad.wmnet.
-50  1H  IN PTR  wmf3425.mgmt.eqiad.wmnet.
+
 51  1H  IN PTR  mw1259.mgmt.eqiad.wmnet.
 51  1H  IN PTR  wmf3426.mgmt.eqiad.wmnet.
 52  1H  IN PTR  wmf3427.mgmt.eqiad.wmnet.
@@ -1687,7 +1680,6 @@
 112 1H  IN PTR  conf1001.mgmt.eqiad.wmnet.
 113 1H  IN PTR  conf1002.mgmt.eqiad.wmnet.
 114 1H  IN PTR  conf1003.mgmt.eqiad.wmnet.
-115 1H  IN PTR  analytics1026.mgmt.eqiad.wmnet.
 116 1H  IN PTR  analytics1027.mgmt.eqiad.wmnet.
 117 1H  IN PTR  indium.mgmt.eqiad.wmnet.
 118 1H  IN PTR  wmf4073.mgmt.eqiad.wmnet.
@@ -1697,8 +1689,7 @@
 120 1H  IN PTR  wmf4075.mgmt.eqiad.wmnet.
 121 1H  IN PTR  barium.mgmt.eqiad.wmnet.
 121 1H  IN PTR  wmf4076.mgmt.eqiad.wmnet.
-122 1H  IN PTR  wmf4077.mgmt.eqiad.wmnet.
-122 1H  IN PTR  lanthanum.mngmt.eqiad.wmnet.
+
 123 1H  IN PTR  wmf4078.mgmt.eqiad.wmnet.
 123 1H  IN PTR  xenon.mgmt.eqiad.wmnet.
 124 1H  IN PTR  wmf4079.mgmt.eqiad.wmnet.
diff --git a/templates/wmnet b/templates/wmnet
index b5a2922..7508c89 100644
--- a/templates/wmnet
+++ b/templates/wmnet
@@ -802,12 +802,10 @@
 stat10031H  IN A10.64.36.103
 stat10041H  IN A10.64.5.104
 bromine 1H  IN A10.64.32.181 ; VM on the 
ganeti01.svc.eqiad.wmnet cluster
-strontium   1H  IN A10.64.0.164
 phab10011H  IN CNAMEiridium.eqiad.wmnet.
 phab1001-vcs1H  IN A10.64.32.186
 phab1001-vcs1H  IN  2620:0:861:103:10:64:32:186
 puppet  1H  IN CNAMEpuppetmaster1001.eqiad.wmnet.
-tantalum1H  IN A10.64.0.26
 technetium  1H  IN A10.64.32.188
 thorium 1H  IN A10.64.53.26
 thumbor1001 1H  IN A10.64.16.56
@@ -1088,7 +1086,6 @@
 conf10011H  IN A10.65.3.112
 conf10021H  IN A10.65.3.113
 conf10031H  IN A10.65.3.114
-analytics1026   1H  IN A10.65.3.115
 analytics1027   1H  IN A10.65.3.116
 wmf4580 1H  IN A10.65.3.211
 analytics1028   1H  IN A10.65.3.211
@@ -1522,8 +1519,6 @@
 wmf6968 1H  IN A10.65.8.35
 mc1036  1H  IN A10.65.8.36
 wmf6969 1H  IN A10.65.8.36
-tantalum1H  IN A10.65.3.33
-wmf3407 1H  IN A10.65.3.33
 rhenium 1H  IN A10.65.3.34
 wmf3408 1H  IN A10.65.3.34
 rcs1002 1H  IN A10.65.3.35
@@ -1816,8 +1811,6 @@
 

[MediaWiki-commits] [Gerrit] operations/puppet[production]: Removing mentions of decom servers strontium

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

Change subject: Removing mentions of decom servers strontium
..


Removing mentions of decom servers strontium

Change-Id: Id49679433a3ff778e2a646647d15c96ac465e35a
---
M modules/install_server/files/autoinstall/netboot.cfg
M modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200
2 files changed, 1 insertion(+), 6 deletions(-)

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



diff --git a/modules/install_server/files/autoinstall/netboot.cfg 
b/modules/install_server/files/autoinstall/netboot.cfg
index 9e9e663..6f68724 100755
--- a/modules/install_server/files/autoinstall/netboot.cfg
+++ b/modules/install_server/files/autoinstall/netboot.cfg
@@ -51,7 +51,7 @@
 analytics102[3-7]) echo partman/analytics-dell.cfg ;; \
 
analytics102[8-9]|analytics103[0-9]|analytics104[0-9]|analytics105[0-9]) echo 
partman/analytics-flex.cfg ;; \
 aqs100[456789]) echo partman/aqs-cassandra-8ssd-2srv.cfg ;; \
-arsenic|heze|neodymium|oxygen|promethium|strontium|terbium|europium) 
echo partman/lvm.cfg ;; \
+arsenic|heze|neodymium|oxygen|promethium|terbium|europium) echo 
partman/lvm.cfg ;; \
 copper|ruthenium|subra|suhail|ocg1003) echo partman/raid1-lvm.cfg ;; \
 bast[1234]*) echo partman/raid1-lvm-ext4-srv.cfg ;; \
 californium|dbproxy10[0-1][0-9]|iridium) echo partman/raid1.cfg ;; \
diff --git a/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 
b/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200
index b3bfd06..b48d154 100644
--- a/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200
+++ b/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200
@@ -6024,11 +6024,6 @@
 filename "trusty-installer/ubuntu-installer/amd64/pxelinux.0";
 }
 
-host strontium {
-hardware ethernet 18:03:73:f4:ef:51;
-fixed-address strontium.eqiad.wmnet;
-}
-
 host subra {
 hardware ethernet D4:AE:52:AD:62:75;
 fixed-address subra.codfw.wmnet;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id49679433a3ff778e2a646647d15c96ac465e35a
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Cmjohnson 
Gerrit-Reviewer: Cmjohnson 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...Wikibase[master]: Add script to search entities from command line

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

Change subject: Add script to search entities from command line
..

Add script to search entities from command line

This is mainly to be used to test search results, etc. on relforge.
Based on runSearch.php from CirrusSearch, as such requires CirrusSearch
to be installed.

Change-Id: I65f272dcea0b1f63ddb5cf5c6ba23b5cf104c7ba
---
A repo/maintenance/searchEntities.php
1 file changed, 156 insertions(+), 0 deletions(-)


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

diff --git a/repo/maintenance/searchEntities.php 
b/repo/maintenance/searchEntities.php
new file mode 100644
index 000..5316414
--- /dev/null
+++ b/repo/maintenance/searchEntities.php
@@ -0,0 +1,156 @@
+addDescription( 'Search entity a-la wbsearchentities 
API.' );
+
+   $this->addOption( 'entity-type', "Only search this kind of 
entity, e.g. `item` or `property`.", true, true );
+   $this->addOption( 'limit', "Limit how many results are 
returned.", false, true );
+   $this->addOption( 'language', "Language for the search.", true, 
true );
+   $this->addOption( 'display-language', "Language for the 
display.", false, true );
+   $this->addOption( 'strict', "Should we use strict language 
match?", false, true );
+   $this->addOption( 'engine', "Which engine to use - e.g. sql, 
elastic.", false, true );
+   $this->addOption( 'fork', 'Fork multiple processes to run 
queries from.' .
+ 'defaults to false.', false, true );
+   $this->addOption( 'options', 'A JSON object mapping from global 
variable to ' .
+'its test value', false, true );
+   }
+
+   /**
+* Do the actual work. All child classes will need to implement this
+*/
+   public function execute() {
+   $engine = $this->getOption( 'engine', 'sql' );
+   $this->searchHelper = $this->getSearchHelper( $engine );
+
+   $callback = [ $this, 'doSearch' ];
+   $this->applyGlobals();
+   $forks = $this->getOption( 'fork', false );
+   $forks = ctype_digit( $forks ) ? intval( $forks ) : 0;
+   $controller = new OrderedStreamingForkController( $forks, 
$callback, STDIN, STDOUT );
+   $controller->start();
+   }
+
+   /**
+* Applies global variables provided as the options CLI argument
+* to override current settings.
+*/
+   protected function applyGlobals() {
+   $optionsData = $this->getOption( 'options', 'false' );
+   if ( substr_compare( $optionsData, 'B64://', 0, strlen( 
'B64://' ) ) === 0 ) {
+   $optionsData = base64_decode( substr( $optionsData, 
strlen( 'B64://' ) ) );
+   }
+   $options = json_decode( $optionsData, true );
+   if ( $options ) {
+   foreach ( $options as $key => $value ) {
+   if ( array_key_exists( $key, $GLOBALS ) ) {
+   $GLOBALS[$key] = $value;
+   } else {
+   $this->error( "\nERROR: $key is not a 
valid global variable\n" );
+   exit();
+   }
+   }
+   }
+   }
+
+   /**
+* Run search for one query.
+* @param $query
+* @return string
+*/
+   public function doSearch( $query ) {
+   $limit = (int)$this->getOption( 'limit', 5 );
+
+   $results = $this->searchHelper->getRankedSearchResults(
+   $query,
+   $this->getOption( 'language' ),
+   $this->getOption( 'entity-type' ),
+   $limit,
+   $this->getOption( 'strict', false )
+   );
+   $out = [
+   'query' => $query,
+   'totalHits' => count($results),
+   'rows' => []
+   ];
+
+   foreach ( $results as $match ) {
+   $entityId = $match->getEntityId();
+
+   $out['rows'][] = [
+   'pageId' => $entityId->getSerialization(),
+   'title' => $entityId->getSerialization(),
+   'snippets' => [
+   'term' => 
$match->getMatchedTerm()->getText(),
+   'type' => $match->getMatchedTermType(),
+   'title' => 
$match->getDisplayLabel()->getText(),
+ 

[MediaWiki-commits] [Gerrit] apps...wikipedia[save-cache]: Update: add second OkHttp cache for saved content

2017-02-23 Thread Niedzielski (Code Review)
Niedzielski has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/339574 )

Change subject: Update: add second OkHttp cache for saved content
..

Update: add second OkHttp cache for saved content

Bug: T156917
Change-Id: I45825777d18cbbc686d757a715002464cf94ae3f
---
M app/build.gradle
A app/src/main/java/okhttp3/CacheDelegate.java
A app/src/main/java/okhttp3/internal/cache/CacheDelegateInterceptor.java
M app/src/main/java/org/wikipedia/dataclient/okhttp/OkHttpConnectionFactory.java
A 
app/src/main/java/org/wikipedia/dataclient/okhttp/cache/CacheDelegateStrategy.java
A app/src/main/java/org/wikipedia/dataclient/okhttp/cache/SaveHeader.java
A app/src/test/java/okhttp3/internal/cache/CacheDelegateInterceptorTest.java
A 
app/src/test/java/org/wikipedia/dataclient/okhttp/cache/CacheDelegateStrategyTest.java
A app/src/test/java/org/wikipedia/dataclient/okhttp/cache/SaveHeaderTest.java
M app/src/test/java/org/wikipedia/test/MockWebServerTest.java
10 files changed, 490 insertions(+), 6 deletions(-)


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

diff --git a/app/build.gradle b/app/build.gradle
index 2fae41a..df2735e 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -157,7 +157,8 @@
 // use http://gradleplease.appspot.com/ or http://search.maven.org/.
 // Debug with ./gradlew -q app:dependencies --configuration compile
 
-String okHttpVersion = '3.6.0'
+String okHttpVersion = '3.6.0' // When updating this version, resync file 
copies under
+   // app/src/main/java/okhttp3
 String retrofitVersion = '2.1.0'
 String supportVersion = '25.1.1'
 String espressoVersion = '2.2.2'
diff --git a/app/src/main/java/okhttp3/CacheDelegate.java 
b/app/src/main/java/okhttp3/CacheDelegate.java
new file mode 100644
index 000..65951d3
--- /dev/null
+++ b/app/src/main/java/okhttp3/CacheDelegate.java
@@ -0,0 +1,54 @@
+package okhttp3;
+
+import android.support.annotation.NonNull;
+
+import java.io.IOException;
+
+import okhttp3.internal.Util;
+import okhttp3.internal.cache.DiskLruCache;
+import okhttp3.internal.cache.InternalCache;
+import okio.ByteString;
+
+public class CacheDelegate {
+@NonNull public static InternalCache internalCache(@NonNull Cache cache) {
+return cache.internalCache;
+}
+
+@NonNull private final Cache cache;
+
+public CacheDelegate(@NonNull Cache cache) {
+this.cache = cache;
+}
+
+// Copy of Cache.remove(). This method performs file I/O
+public boolean remove(@NonNull String url) {
+try {
+return cache.cache.remove(key(url));
+} catch (IOException ignore) { }
+return false;
+}
+
+// Copy of Cache.get(). Calling this method modifies the Cache. If the URL 
is present, it's
+// cache entry is moved to the head of the LRU queue. This method performs 
file I/O
+public boolean isCached(@NonNull String url) {
+String key = key(url);
+DiskLruCache.Snapshot snapshot;
+try {
+snapshot = cache.cache.get(key);
+if (snapshot == null) {
+return false;
+}
+} catch (IOException e) {
+// Give up because the cache cannot be read.
+return false;
+}
+
+Util.closeQuietly(snapshot);
+return true;
+}
+
+// Copy of Cache.key()
+@NonNull private String key(@NonNull String url) {
+return ByteString.encodeUtf8(url).md5().hex();
+}
+}
diff --git 
a/app/src/main/java/okhttp3/internal/cache/CacheDelegateInterceptor.java 
b/app/src/main/java/okhttp3/internal/cache/CacheDelegateInterceptor.java
new file mode 100644
index 000..e6132ab
--- /dev/null
+++ b/app/src/main/java/okhttp3/internal/cache/CacheDelegateInterceptor.java
@@ -0,0 +1,283 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package okhttp3.internal.cache;
+
+import org.wikipedia.dataclient.okhttp.cache.CacheDelegateStrategy;
+
+import java.io.IOException;
+
+import okhttp3.Headers;
+import okhttp3.Interceptor;
+import okhttp3.Protocol;
+import okhttp3.Request;

[MediaWiki-commits] [Gerrit] operations/puppet[production]: decom servers strontium

2017-02-23 Thread Cmjohnson (Code Review)
Cmjohnson has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/339573 )

Change subject: decom servers strontium
..

decom servers strontium

Change-Id: Id49679433a3ff778e2a646647d15c96ac465e35a
---
M modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200
1 file changed, 0 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/73/339573/1

diff --git a/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 
b/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200
index b3bfd06..b48d154 100644
--- a/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200
+++ b/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200
@@ -6024,11 +6024,6 @@
 filename "trusty-installer/ubuntu-installer/amd64/pxelinux.0";
 }
 
-host strontium {
-hardware ethernet 18:03:73:f4:ef:51;
-fixed-address strontium.eqiad.wmnet;
-}
-
 host subra {
 hardware ethernet D4:AE:52:AD:62:75;
 fixed-address subra.codfw.wmnet;

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...PerformanceInspector[master]: collector/newpp: More wgPageParseReport guarding

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

Change subject: collector/newpp: More wgPageParseReport guarding
..


collector/newpp: More wgPageParseReport guarding

Follows-up dfdbb8c.

> TypeError: limitreport of undefined

To reproduce the error, go to "Page information" from the sidebar
(which opens action=info).

There was one case before the 'if report.limitreport' condition
that still accessed it unconditionally to set the 'templates' var.

Also simplified the other references by re-using the local variable.

Change-Id: If6a99ef1950ac9ff2b02983fe7d7026192d1d7af
---
M modules/collectors/ext.PerformanceInspector.newpp.js
1 file changed, 4 insertions(+), 4 deletions(-)

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



diff --git a/modules/collectors/ext.PerformanceInspector.newpp.js 
b/modules/collectors/ext.PerformanceInspector.newpp.js
index 87129af..2476acd 100644
--- a/modules/collectors/ext.PerformanceInspector.newpp.js
+++ b/modules/collectors/ext.PerformanceInspector.newpp.js
@@ -8,7 +8,7 @@
function generateMustacheView( parserReport ) {
var limitReport = [],
timingProfile = [],
-   templates = 
parserReport.limitreport.timingprofile,
+   templates = parserReport.limitreport && 
parserReport.limitreport.timingprofile || [],
i, j, data, holder, item, cacheTime, ttlHuman;
 
// Push the data for the limit report
@@ -51,9 +51,9 @@
}
 
// in some cases we don't have the wgPageParseReport, see 
https://phabricator.wikimedia.org/T145717
-   report = mw.config.get( 'wgPageParseReport' );
-   parserReportSummary = report.limitreport ? mw.msg( 
'performanceinspector-newpp-summary', mw.config.get( 'wgPageParseReport' 
).limitreport.expensivefunctioncount.value ) : mw.msg( 
'performanceinspector-newpp-missing-report' );
-   mustacheView = report.limitreport ? generateMustacheView( 
mw.config.get( 'wgPageParseReport' ) ) : '';
+   report = mw.config.get( 'wgPageParseReport', {} );
+   parserReportSummary = report.limitreport ? mw.msg( 
'performanceinspector-newpp-summary', 
report.limitreport.expensivefunctioncount.value ) : mw.msg( 
'performanceinspector-newpp-missing-report' );
+   mustacheView = report.limitreport ? generateMustacheView( 
report ) : '';
 
return {
summary: {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If6a99ef1950ac9ff2b02983fe7d7026192d1d7af
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/PerformanceInspector
Gerrit-Branch: master
Gerrit-Owner: Krinkle 
Gerrit-Reviewer: Gilles 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: Phedenskog 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: RCFilters UI: Fix CapsuleItemWidget popup styling

2017-02-23 Thread Mooeypoo (Code Review)
Mooeypoo has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/339572 )

Change subject: RCFilters UI: Fix CapsuleItemWidget popup styling
..

RCFilters UI: Fix CapsuleItemWidget popup styling

Bug: T158006
Change-Id: I83f72273bc5bf7bd9548d60efd094e427ff0e13a
---
M 
resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.CapsuleItemWidget.less
M resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.CapsuleItemWidget.js
2 files changed, 7 insertions(+), 10 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/72/339572/1

diff --git 
a/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.CapsuleItemWidget.less
 
b/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.CapsuleItemWidget.less
index 0bf6f58..65278f9 100644
--- 
a/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.CapsuleItemWidget.less
+++ 
b/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.CapsuleItemWidget.less
@@ -1,13 +1,9 @@
 @import "mw.rcfilters.mixins";
 
 .mw-rcfilters-ui-capsuleItemWidget {
-   &-popup {
-   padding: 1em;
-   }
-
-   .oo-ui-popupWidget {
-   // Fix the positioning of the popup itself
-   margin-top: 1em;
+   &-popup-content {
+   padding: 0.5em;
+   color: #54595d;
}
 
.oo-ui-labelElement-label {
diff --git 
a/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.CapsuleItemWidget.js 
b/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.CapsuleItemWidget.js
index a547020..4ab3681 100644
--- a/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.CapsuleItemWidget.js
+++ b/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.CapsuleItemWidget.js
@@ -14,7 +14,7 @@
 */
mw.rcfilters.ui.CapsuleItemWidget = function 
MwRcfiltersUiCapsuleItemWidget( controller, model, config ) {
var $popupContent = $( '' )
-   .addClass( 'mw-rcfilters-ui-capsuleItemWidget-popup' ),
+   .addClass( 
'mw-rcfilters-ui-capsuleItemWidget-popup-content' ),
descLabelWidget = new OO.ui.LabelWidget();
 
// Configuration initialization
@@ -34,11 +34,12 @@
// Mixin constructors
OO.ui.mixin.PopupElement.call( this, $.extend( {
popup: {
-   padded: true,
+   padded: false,
align: 'center',
$content: $popupContent
.append( descLabelWidget.$element ),
-   $floatableContainer: this.$element
+   $floatableContainer: this.$element,
+   classes: [ 
'mw-rcfilters-ui-capsuleItemWidget-popup' ]
}
}, config ) );
 

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: mw.loader: Adding comment explaining MODULE_SIZE_MAX

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

Change subject: mw.loader: Adding comment explaining MODULE_SIZE_MAX
..


mw.loader: Adding comment explaining MODULE_SIZE_MAX

This informaiton was lost in Iedde8a3.

Change-Id: Ib884f3504c2a98537b919f78a043ae0b64a146cf
---
M resources/src/mediawiki/mediawiki.js
1 file changed, 2 insertions(+), 0 deletions(-)

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



diff --git a/resources/src/mediawiki/mediawiki.js 
b/resources/src/mediawiki/mediawiki.js
index 94ad217..7872818 100644
--- a/resources/src/mediawiki/mediawiki.js
+++ b/resources/src/mediawiki/mediawiki.js
@@ -2195,6 +2195,8 @@
// Whether the store is in use on this 
page.
enabled: null,
 
+   // Modules whose string representation 
exceeds 100 kB are
+   // ineligible for storage. See bug 
T66721.
MODULE_SIZE_MAX: 100 * 1000,
 
// The contents of the store, mapping 
'[name]@[version]' keys

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib884f3504c2a98537b919f78a043ae0b64a146cf
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Kaldari 
Gerrit-Reviewer: Bartosz Dziewoński 
Gerrit-Reviewer: Jack Phoenix 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] analytics/analytics.wikimedia.org[master]: Remember piwik instrumentation

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

Change subject: Remember piwik instrumentation
..


Remember piwik instrumentation

Change-Id: I0e65317fd140b5b07cbdad1ab21a10edb50c26ca
---
M dashboards/browsers/index.html
M dashboards/vital-signs/index.html
2 files changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/dashboards/browsers/index.html b/dashboards/browsers/index.html
index cbd769c..f391f9d 100644
--- a/dashboards/browsers/index.html
+++ b/dashboards/browsers/index.html
@@ -11,7 +11,7 @@
 
 Simple Request Breakdowns
 
-
+var _paq = _paq || 
[];_paq.push(["trackPageView"]);_paq.push(["enableLinkTracking"]);(function() 
{var u="//piwik.wikimedia.org/";_paq.push(["setTrackerUrl", 
u+"piwik.php"]);_paq.push(["setSiteId", 7]);var d=document, 
g=d.createElement("script"), 
s=d.getElementsByTagName("script")[0];g.type="text/javascript"; g.async=true; 
g.defer=true; g.src=u+"piwik.js"; 
s.parentNode.insertBefore(g,s);})();
 
 
 
diff --git a/dashboards/vital-signs/index.html 
b/dashboards/vital-signs/index.html
index 8db1fdd..926c97c 100644
--- a/dashboards/vital-signs/index.html
+++ b/dashboards/vital-signs/index.html
@@ -11,7 +11,7 @@
 
 Vital Signs
 
-
+var _paq = _paq || 
[];_paq.push(["trackPageView"]);_paq.push(["enableLinkTracking"]);(function() 
{var u="//piwik.wikimedia.org/";_paq.push(["setTrackerUrl", 
u+"piwik.php"]);_paq.push(["setSiteId", 6]);var d=document, 
g=d.createElement("script"), 
s=d.getElementsByTagName("script")[0];g.type="text/javascript"; g.async=true; 
g.defer=true; g.src=u+"piwik.js"; 
s.parentNode.insertBefore(g,s);})();
 
 
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0e65317fd140b5b07cbdad1ab21a10edb50c26ca
Gerrit-PatchSet: 1
Gerrit-Project: analytics/analytics.wikimedia.org
Gerrit-Branch: master
Gerrit-Owner: Milimetric 
Gerrit-Reviewer: Milimetric 

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


[MediaWiki-commits] [Gerrit] analytics/analytics.wikimedia.org[master]: Remember piwik instrumentation

2017-02-23 Thread Milimetric (Code Review)
Milimetric has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/339571 )

Change subject: Remember piwik instrumentation
..

Remember piwik instrumentation

Change-Id: I0e65317fd140b5b07cbdad1ab21a10edb50c26ca
---
M dashboards/browsers/index.html
M dashboards/vital-signs/index.html
2 files changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/analytics/analytics.wikimedia.org 
refs/changes/71/339571/1

diff --git a/dashboards/browsers/index.html b/dashboards/browsers/index.html
index cbd769c..f391f9d 100644
--- a/dashboards/browsers/index.html
+++ b/dashboards/browsers/index.html
@@ -11,7 +11,7 @@
 
 Simple Request Breakdowns
 
-
+var _paq = _paq || 
[];_paq.push(["trackPageView"]);_paq.push(["enableLinkTracking"]);(function() 
{var u="//piwik.wikimedia.org/";_paq.push(["setTrackerUrl", 
u+"piwik.php"]);_paq.push(["setSiteId", 7]);var d=document, 
g=d.createElement("script"), 
s=d.getElementsByTagName("script")[0];g.type="text/javascript"; g.async=true; 
g.defer=true; g.src=u+"piwik.js"; 
s.parentNode.insertBefore(g,s);})();
 
 
 
diff --git a/dashboards/vital-signs/index.html 
b/dashboards/vital-signs/index.html
index 8db1fdd..926c97c 100644
--- a/dashboards/vital-signs/index.html
+++ b/dashboards/vital-signs/index.html
@@ -11,7 +11,7 @@
 
 Vital Signs
 
-
+var _paq = _paq || 
[];_paq.push(["trackPageView"]);_paq.push(["enableLinkTracking"]);(function() 
{var u="//piwik.wikimedia.org/";_paq.push(["setTrackerUrl", 
u+"piwik.php"]);_paq.push(["setSiteId", 6]);var d=document, 
g=d.createElement("script"), 
s=d.getElementsByTagName("script")[0];g.type="text/javascript"; g.async=true; 
g.defer=true; g.src=u+"piwik.js"; 
s.parentNode.insertBefore(g,s);})();
 
 
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0e65317fd140b5b07cbdad1ab21a10edb50c26ca
Gerrit-PatchSet: 1
Gerrit-Project: analytics/analytics.wikimedia.org
Gerrit-Branch: master
Gerrit-Owner: Milimetric 

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


[MediaWiki-commits] [Gerrit] mediawiki...Wikibase[master]: Inject RemoveReferences dependencies

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

Change subject: Inject RemoveReferences dependencies
..

Inject RemoveReferences dependencies

Bug: T158912
Change-Id: Ic5ede4b821bd7dff6cf4ecf3cc1084127e4c99ca
---
M repo/Wikibase.php
M repo/includes/Api/RemoveReferences.php
2 files changed, 53 insertions(+), 21 deletions(-)


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

diff --git a/repo/Wikibase.php b/repo/Wikibase.php
index 7f2b47b..46019b7 100644
--- a/repo/Wikibase.php
+++ b/repo/Wikibase.php
@@ -395,7 +395,36 @@
}
];
$wgAPIModules['wbsetreference'] = Wikibase\Repo\Api\SetReference::class;
-   $wgAPIModules['wbremovereferences'] = 
Wikibase\Repo\Api\RemoveReferences::class;
+   $wgAPIModules['wbremovereferences'] = [
+   'class' => Wikibase\Repo\Api\RemoveReferences::class,
+   'factory' => function( ApiMain $mainModule, $moduleName ) {
+   $wikibaseRepo = 
Wikibase\Repo\WikibaseRepo::getDefaultInstance();
+   $apiHelperFactory = $wikibaseRepo->getApiHelperFactory( 
$mainModule->getContext() );
+   $changeOpFactoryProvider = 
$wikibaseRepo->getChangeOpFactoryProvider();
+
+   $modificationHelper = new 
Wikibase\Repo\Api\StatementModificationHelper(
+   $wikibaseRepo->getSnakFactory(),
+   $wikibaseRepo->getEntityIdParser(),
+   $wikibaseRepo->getStatementGuidValidator(),
+   $apiHelperFactory->getErrorReporter( 
$mainModule )
+   );
+
+   return new Wikibase\Repo\Api\RemoveReferences(
+   $mainModule,
+   $moduleName,
+   $apiHelperFactory->getErrorReporter( 
$mainModule ),
+   
$changeOpFactoryProvider->getStatementChangeOpFactory(),
+   $modificationHelper,
+   $wikibaseRepo->getStatementGuidParser(),
+   function ( $module ) use ( $apiHelperFactory ) {
+   return 
$apiHelperFactory->getResultBuilder( $module );
+   },
+   function ( $module ) use ( $apiHelperFactory ) {
+   return 
$apiHelperFactory->getEntitySavingHelper( $module );
+   }
+   );
+   }
+   ];
$wgAPIModules['wbsetclaim'] = [
'class' => Wikibase\Repo\Api\SetClaim::class,
'factory' => function( ApiMain $mainModule, $moduleName ) {
diff --git a/repo/includes/Api/RemoveReferences.php 
b/repo/includes/Api/RemoveReferences.php
index cfe4025..31d3d4b 100644
--- a/repo/includes/Api/RemoveReferences.php
+++ b/repo/includes/Api/RemoveReferences.php
@@ -54,28 +54,31 @@
/**
 * @param ApiMain $mainModule
 * @param string $moduleName
-* @param string $modulePrefix
+* @param ApiErrorReporter $errorReporter
+* @param StatementChangeOpFactory $statementChangeOpFactory
+* @param StatementModificationHelper $modificationHelper
+* @param StatementGuidParser $guidParser
+* @param callable $resultBuilderInstantiator
+* @param callable $entitySavingHelperInstantiator
 */
-   public function __construct( ApiMain $mainModule, $moduleName, 
$modulePrefix = '' ) {
-   parent::__construct( $mainModule, $moduleName, $modulePrefix );
+   public function __construct(
+   ApiMain $mainModule,
+   $moduleName,
+   ApiErrorReporter $errorReporter,
+   StatementChangeOpFactory $statementChangeOpFactory,
+   StatementModificationHelper $modificationHelper,
+   StatementGuidParser $guidParser,
+   callable $resultBuilderInstantiator,
+   callable $entitySavingHelperInstantiator
+   ) {
+   parent::__construct( $mainModule, $moduleName );
 
-   $wikibaseRepo = WikibaseRepo::getDefaultInstance();
-   $apiHelperFactory = $wikibaseRepo->getApiHelperFactory( 
$this->getContext() );
-   $changeOpFactoryProvider = 
$wikibaseRepo->getChangeOpFactoryProvider();
-
-   $this->errorReporter = $apiHelperFactory->getErrorReporter( 
$this );
-   $this->statementChangeOpFactory = 
$changeOpFactoryProvider->getStatementChangeOpFactory();
-
-   $this->modificationHelper = new StatementModificationHelper(
-   $wikibaseRepo->getSnakFactory(),
-   $wikibaseRepo->getEntityIdParser(),
-   

[MediaWiki-commits] [Gerrit] labs...heritage[master]: Change database docker image to mariadb:5.5.54

2017-02-23 Thread Code Review
Jean-Frédéric has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/339549 )

Change subject: Change database docker image to mariadb:5.5.54
..

Change database docker image to mariadb:5.5.54

To match the version used on Tool Labs

Bug: T158911
Change-Id: I53926d842bfdb26224bc755a45dc54c5025547c8
---
M conf/Dockerfile.dbdump
M docker-compose-base.yml
2 files changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/tools/heritage 
refs/changes/49/339549/1

diff --git a/conf/Dockerfile.dbdump b/conf/Dockerfile.dbdump
index f2b56d5..ccc091a 100644
--- a/conf/Dockerfile.dbdump
+++ b/conf/Dockerfile.dbdump
@@ -1,3 +1,3 @@
-FROM mysql:5.5.49
+FROM mariadb:5.5.54
 
 COPY monuments_db.sql.gz /docker-entrypoint-initdb.d/
diff --git a/docker-compose-base.yml b/docker-compose-base.yml
index dca5cd2..af0f541 100644
--- a/docker-compose-base.yml
+++ b/docker-compose-base.yml
@@ -16,7 +16,7 @@
 MYSQL_PASSWORD: password
 
 db_empty:
-  image: mysql:5.5.49
+  image: mariadb:5.5.54
   volumes:
 - ./mysql:/etc/mysql/conf.d
 - ./erfgoedbot/sql/:/docker-entrypoint-initdb.d/

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I53926d842bfdb26224bc755a45dc54c5025547c8
Gerrit-PatchSet: 1
Gerrit-Project: labs/tools/heritage
Gerrit-Branch: master
Gerrit-Owner: Jean-Frédéric 

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


[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: T156296: Reorder "thumb" before "thumbnail" in the enwiki ba...

2017-02-23 Thread Arlolra (Code Review)
Arlolra has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/339544 )

Change subject: T156296: Reorder "thumb" before "thumbnail" in the enwiki 
baseconfig
..

T156296: Reorder "thumb" before "thumbnail" in the enwiki baseconfig

Change-Id: I885ab8ef245d7ec47c4607a16ed8e717f7ca99a7
---
M lib/config/baseconfig/enwiki.json
M tests/parserTests-blacklist.js
M tests/parserTests.txt
3 files changed, 38 insertions(+), 42 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid 
refs/changes/44/339544/1

diff --git a/lib/config/baseconfig/enwiki.json 
b/lib/config/baseconfig/enwiki.json
index 524e179..642da03 100644
--- a/lib/config/baseconfig/enwiki.json
+++ b/lib/config/baseconfig/enwiki.json
@@ -538,8 +538,8 @@
   {
 "name": "img_thumbnail",
 "aliases": [
-  "thumbnail",
-  "thumb"
+  "thumb",
+  "thumbnail"
 ],
 "case-sensitive": ""
   },
diff --git a/tests/parserTests-blacklist.js b/tests/parserTests-blacklist.js
index 93087ee..3baf5ee 100644
--- a/tests/parserTests-blacklist.js
+++ b/tests/parserTests-blacklist.js
@@ -457,12 +457,12 @@
 add("html2html", "{{#speciale:}} page name, unknown", "Special:Foobar_nonexistent");
 add("html2html", "Allow empty links in image captions (T62753)", "Caption Link1\n[[]]\nLink2\n");
 add("html2html", "Image with multiple attributes from the same template", 
"Caption 
text\n");
-add("html2html", "Image with link tails", "123456\n123\n\n456\n123\n\n456\n");
+add("html2html", "Image with link tails", "123456\n123\n\n456\n123\n\n456\n");
 add("html2html", "Image with link parameter, wgNoFollowLinks set to false", 
"http://example.com/images/3/3a/Foobar.jpg\; alt=\"Foobar.jpg\" 
rel=\"mw:externalImage\" data-parsoid='{\"dsr\":[0,41,null,null]}'/>\n");
 add("html2html", "Image with link parameter, wgNoFollowDomainExceptions", "http://example.com/images/3/3a/Foobar.jpg\; alt=\"Foobar.jpg\" 
rel=\"mw:externalImage\" data-parsoid='{\"dsr\":[0,41,null,null]}'/>\n");
 add("html2html", "Link to image page- image page normally doesn't exists, 
hence edit link\nAdd test with existing image page\n#Image:test", "[/index.php?title=File:Testaction=editredlink=1
 Image:test]\n");
 add("html2html", "T20784  Link to non-existent image page with caption should 
use caption as link text", "[/index.php?title=File:Testaction=editredlink=1
 caption]\n");
-add("html2html", "SVG thumbnails with invalid language code", "\n");
+add("html2html", "SVG thumbnails with invalid language code", "\n");
 add("html2html", "T93580: 3. Templated  inside inline images", "\n\n↑  foo");
 add("html2html", "Subpage link", "/subpage\n");
 add("html2html", "Subpage noslash link", "subpage\n");
@@ -561,7 +561,7 @@
 add("html2html", "Empty TR followed by a template-generated TR", "\nfoo\n\n");
 add("html2html", "Empty TR followed by mixed-ws-comment line should RT 
correctly", "\n\n \n
 \n\n");
 add("html2html", "T73074: More fostering fun", "\n");
-add("html2html", "Image: upright option (parsoid)", "caption\ncaption\ncaption\n");
+add("html2html", "Image: upright option (parsoid)", "caption\ncaption\ncaption\n");
 add("html2html", "Consecutive s should not get merged", "a\n\nb\n\nc\n\nd\n\ne\n\n\n \nf\n");
 
 
@@ -957,10 +957,10 @@
 add("html2wt", "{{#speciale:}} page name, unknown", 
"Special:Foobar_nonexistent");
 add("html2wt", "Allow empty links in image captions (T62753)", 
"[[File:Foobar.jpg|thumb|Caption 
[[Link1]]\n[[]]\n[[Link2]]\n]]");
 add("html2wt", "Image with multiple attributes from the same template", 
"[[File:Foobar.jpg|right|Caption text]]\n");
-add("html2wt", "Image with link tails", 
"123[[File:Foobar.jpg]]456\n123\n[[File:Foobar.jpg|right]]\n456\n123\n[[File:Foobar.jpg|thumb]]\n456\n");
+add("html2wt", "Image with link tails", 
"123[[File:Foobar.jpg]]456\n123\n[[File:Foobar.jpg|right]]\n456\n123\n[[File:Foobar.jpg|thumbnail]]\n456\n");
 add("html2wt", "Image with multiple captions -- only last one is accepted", 
"[[File:Foobar.jpg|right|Caption3 - accepted]]\n");
 add("html2wt", "Image with multiple widths -- use last", 
"[[File:Foobar.jpg|300x300px|caption]]\n");
-add("html2wt", "Image with multiple alignments -- use first (T50664)", 
"[[File:Foobar.jpg|left|thumb|caption]]\n[[File:Foobar.jpg|middle|caption]]\n");
+add("html2wt", "Image with multiple alignments -- use first (T50664)", 
"[[File:Foobar.jpg|left|thumbnail|caption]]\n[[File:Foobar.jpg|middle|caption]]\n");
 add("html2wt", "Image with width attribute at different positions", 
"[[File:Foobar.jpg|right|200x200px|Caption]]\n[[File:Foobar.jpg|right|200x200px|Caption]]\n[[File:Foobar.jpg|right|200x200px|Caption]]\n");
 add("html2wt", "Image with link parameter, wiki target", 
"[[File:Foobar.jpg|link=Main_Page]]\n");
 add("html2wt", "Image with link parameter, wgNoFollowLinks set to false", 
"http://example.com/images/3/3a/Foobar.jpg\n;);
@@ -968,8 +968,8 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Folowup I341c3f7c: Fire wikipage.content with the correct co...

2017-02-23 Thread Mooeypoo (Code Review)
Mooeypoo has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/339542 )

Change subject: Folowup I341c3f7c: Fire wikipage.content with the correct 
content
..

Folowup I341c3f7c: Fire wikipage.content with the correct content

The content we are getting from the Ajax request can be either a
jQuery or string, which makes the handler of the event break.

Instead, pass in this.$element which already wrapped the response.

Change-Id: I1c1231b1476fb2cbef10231fdd853401ebf02ed3
---
M 
resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.ChangesListWrapperWidget.js
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/42/339542/1

diff --git 
a/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.ChangesListWrapperWidget.js
 
b/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.ChangesListWrapperWidget.js
index a2a6b16..84248e1 100644
--- 
a/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.ChangesListWrapperWidget.js
+++ 
b/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.ChangesListWrapperWidget.js
@@ -105,7 +105,7 @@
this.applyHighlight();
 
// Make sure enhanced RC re-initializes correctly
-   mw.hook( 'wikipage.content' ).fire( 
this.$changesListContent );
+   mw.hook( 'wikipage.content' ).fire( this.$element );
}
this.popPending();
};

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Stop mousedown propagation when capsule item 'x' button is c...

2017-02-23 Thread Mooeypoo (Code Review)
Mooeypoo has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/339540 )

Change subject: Stop mousedown propagation when capsule item 'x' button is 
clicked
..

Stop mousedown propagation when capsule item 'x' button is clicked

We don't want the parent (the CapsuleMultiselectWidget) to receieve
the mousedown event, because it then uses it to focus and open the
popup.

Bug: T158006
Change-Id: I1ae9b58b723a70cc150392224196bdb67ebf30b4
---
M resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.CapsuleItemWidget.js
1 file changed, 29 insertions(+), 9 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/40/339540/1

diff --git 
a/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.CapsuleItemWidget.js 
b/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.CapsuleItemWidget.js
index a547020..4160664 100644
--- a/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.CapsuleItemWidget.js
+++ b/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.CapsuleItemWidget.js
@@ -51,7 +51,7 @@
// Events
this.model.connect( this, { update: 'onModelUpdate' } );
 
-   this.closeButton.connect( this, { click: 
'onCapsuleRemovedByUser' } );
+   this.closeButton.$element.on( 'mousedown', 
this.onCloseButtonMouseDown.bind( this ) );
 
// Initialization
this.$overlay.append( this.popup.$element );
@@ -76,6 +76,34 @@
this.setCurrentMuteState();
 
this.setHighlightColor();
+   };
+
+   /**
+* Override mousedown event to prevent its propagation to the parent,
+* since the parent (the multiselect widget) focuses the popup when its
+* mousedown event is fired.
+*
+* @param {jQuery.Event} e Event
+*/
+   mw.rcfilters.ui.CapsuleItemWidget.prototype.onCloseButtonMouseDown = 
function ( e ) {
+   e.stopPropagation();
+   };
+
+   /**
+* Override the event listening to the item close button click
+*/
+   mw.rcfilters.ui.CapsuleItemWidget.prototype.onCloseClick = function () {
+   var element = this.getElementGroup();
+
+   if ( element && $.isFunction( element.removeItems ) ) {
+   element.removeItems( [ this ] );
+   }
+
+   // Respond to user removing the filter
+   this.controller.updateFilter( this.model.getName(), false );
+   this.controller.clearHighlightColor( this.model.getName() );
+
+   return false;
};
 
mw.rcfilters.ui.CapsuleItemWidget.prototype.setHighlightColor = 
function () {
@@ -118,14 +146,6 @@
this.positioned = true;
}
}
-   };
-
-   /**
-* Respond to the user removing the capsule with the close button
-*/
-   mw.rcfilters.ui.CapsuleItemWidget.prototype.onCapsuleRemovedByUser = 
function () {
-   this.controller.updateFilter( this.model.getName(), false );
-   this.controller.clearHighlightColor( this.model.getName() );
};
 
/**

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

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

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


[MediaWiki-commits] [Gerrit] analytics/dashiki[master]: Move datasets to analytics.wikimedia.org

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

Change subject: Move datasets to analytics.wikimedia.org
..


Move datasets to analytics.wikimedia.org

The old location was datasets.wikimedia.org/limn-public-data/metrics and
we update this to analytics.wikimedia.org/datasets/periodic/metrics
which should help explain a little better what kind of files are in
there.  Deployment plan (underway, on step 3):

1. puppet configuration for reportupdater jobs has to be updated (stop
jobs, update configuration, move output, start jobs)
2. wait for the files to sync and be available at the address above
3. deploy this configuration update to each dashboard that uses the
datasets api (search for Config: on meta)

Bug: T125854
Change-Id: I8d1bd3eba44fda3111cc465d02501e46310e239e
---
M src/app/config.js
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/src/app/config.js b/src/app/config.js
index 05823c9..d71b282 100644
--- a/src/app/config.js
+++ b/src/app/config.js
@@ -77,7 +77,7 @@
 },
 
 datasetsApi: {
-endpoint: 
'https://datasets.wikimedia.org/limn-public-data/metrics',
+endpoint: 
'https://analytics.wikimedia.org/datasets/periodic/reports/metrics',
 format: 'tsv'
 },
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8d1bd3eba44fda3111cc465d02501e46310e239e
Gerrit-PatchSet: 2
Gerrit-Project: analytics/dashiki
Gerrit-Branch: master
Gerrit-Owner: Milimetric 
Gerrit-Reviewer: Milimetric 

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


[MediaWiki-commits] [Gerrit] analytics/dashiki[master]: Fix style on worldmap

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

Change subject: Fix style on worldmap
..


Fix style on worldmap

NOTE: addition of large files in lib/data/ made the build super long.
We should exclude these files from the lint, hence .jshintignore

Change-Id: I52b5f0fdb3add8408c15b324f61252451c510984
---
A .jshintignore
M src/app/apis/wikimetrics.js
M src/components/visualizers/worldmap/bindings.js
M src/components/visualizers/worldmap/worldmap.js
4 files changed, 96 insertions(+), 96 deletions(-)

Approvals:
  Milimetric: Verified; Looks good to me, approved
  Fdans: Looks good to me, approved



diff --git a/.jshintignore b/.jshintignore
new file mode 100644
index 000..9c3ec60
--- /dev/null
+++ b/.jshintignore
@@ -0,0 +1,2 @@
+node_modules/**
+src/lib/data/**
diff --git a/src/app/apis/wikimetrics.js b/src/app/apis/wikimetrics.js
index a12644d..f6bb8d5 100644
--- a/src/app/apis/wikimetrics.js
+++ b/src/app/apis/wikimetrics.js
@@ -6,7 +6,6 @@
 define(function (require) {
 
 var siteConfig = require('config'),
-configApi = require('apis.config'),
 converterFinder = require('finders.converter'),
 uri = require('uri/URI'),
 TimeseriesData = require('models.timeseries');
diff --git a/src/components/visualizers/worldmap/bindings.js 
b/src/components/visualizers/worldmap/bindings.js
index c272fb3..9fb0280 100644
--- a/src/components/visualizers/worldmap/bindings.js
+++ b/src/components/visualizers/worldmap/bindings.js
@@ -1,30 +1,21 @@
-'use strict'
+'use strict';
 define(function (require) {
 var d3 = require('d3'),
 d3_color = require('d3-scale-chromatic'),
 ko = require('knockout'),
 topojson = require('topojson'),
 borders = require('data.world-50m'),
-isoCodes = require('data.country-codes');
+isoCodes = require('data.country-codes'),
+_ = require('lodash');
 
-ko.bindingHandlers.worldmap = {
-init: function (element) {
-initMap(element);
-},
-update: function (element, valueAccessor) {
-var values = ko.unwrap(valueAccessor());
-var data = values.data;
-var date = values.date;
-var buckets = 9;
-var palette = d3_color.schemeBlues[buckets];
-removeErrorBox(element);
-try {
-var currentData = getDataValues(data, date);
-drawMap(element, currentData, buckets, palette);
-} catch (error) {
-showError(element, error);
-}
-}
+function getZoomBehavior (features, path, projection) {
+return d3.behavior.zoom()
+.on('zoom',function() {
+features.attr('transform','translate(' +
+d3.event.translate.join(',') + ')scale(' + d3.event.scale + 
')');
+features.selectAll('path')
+.attr('d', path.projection(projection));
+});
 }
 
 function initMap (container) {
@@ -32,7 +23,7 @@
 var projection = path.projection(d3.geo.mercator());
 var svg = d3.select(container).append('svg');
 var g = svg.append('g');
-var features = g.selectAll('path').data(topojson.feature(borders, 
borders.objects.countries).features)
+var features = g.selectAll('path').data(topojson.feature(borders, 
borders.objects.countries).features);
 features.enter().append('path')
 .attr('stroke', '#aaa')
 .attr('stroke-width', '1px')
@@ -45,49 +36,14 @@
 svg.call(getZoomBehavior(features, path, projection));
 }
 
-function drawMap (container, currentData, buckets, palette) {
-var values = currentData.map(function(row) {
-// Temporarily assuming that the value we're after is the second 
column
-return row[1];
-});
-var min = d3.min(values);
-var max = d3.max(values);
-var scale = d3.scale.linear().domain([min, max]).range([0, buckets - 
1]);
-var dataByCountry = currentData.reduce(function(p,c) {
-p[c[0]] = c[1];
-return p;
-}, {})
-borders.objects.countries.geometries = 
borders.objects.countries.geometries.map(function (f) {
-f.properties = {
-color: getColor(dataByCountry, f, scale, palette)
-}
-return f;
-});
-_.defer(function () {
-var svg = d3.select(container).select('svg');
-var g = svg.select('g')
-var features = g.selectAll('path').data(topojson.feature(borders, 
borders.objects.countries).features)
-features.attr('fill', function (feature) {
-return feature.properties.color;
-});
-addLegend(container, palette, min, max);
-});
-}
-
-function getZoomBehavior (features, path, projection) {
- 

[MediaWiki-commits] [Gerrit] analytics/analytics.wikimedia.org[master]: Update dataset location

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

Change subject: Update dataset location
..


Update dataset location

Bug: T125854
Change-Id: I7ac8dfd54733dfe3ab0de71904b41f44c0a4f078
---
R dashboards/browsers/dygraphs-timeseries-dc9fe5d.js
R dashboards/browsers/filter-timeseries-dc9fe5d.js
R dashboards/browsers/hierarchy-dc9fe5d.js
M dashboards/browsers/index.html
R dashboards/browsers/out-of-service-dc9fe5d.js
M dashboards/browsers/scripts.js
R dashboards/browsers/stacked-bars-dc9fe5d.js
R dashboards/browsers/sunburst-dc9fe5d.js
R dashboards/browsers/table-timeseries-dc9fe5d.js
D dashboards/fonts/icons.svg
D dashboards/fonts/icons.ttf
D dashboards/fonts/icons.woff
D dashboards/fonts/icons.woff2
A dashboards/fonts/s/lato/v11/1YwB1sO8YE1Lyjf12WNiUA.woff2
A dashboards/fonts/s/lato/v11/AcvTq8Q0lyKKNxRlL28RnxJtnKITppOI_IvcXXDNrsc.woff2
A dashboards/fonts/s/lato/v11/H2DMvhDLycM56KNuAtbJYA.woff2
A dashboards/fonts/s/lato/v11/HkF_qI1x_noxlxhrhMQYEFtXRa8TVwTICgirnJhmVJw.woff2
A dashboards/fonts/s/lato/v11/ObQr5XYcoH0WBoUxiaYK3_Y6323mHUZFJMgTvxaG2iE.woff2
A dashboards/fonts/s/lato/v11/PLygLKRVCQnA5fhu3qk5fQ.woff2
A dashboards/fonts/s/lato/v11/UyBMtLsHKBKXelqf4x7VRQ.woff2
A dashboards/fonts/s/lato/v11/YMOYVM-eg6Qs9YzV9OSqZfesZW2xOQ-xsNqO47m55DA.woff2
R dashboards/standard-metrics/breakdown-toggle-dc9fe5d.js
R dashboards/standard-metrics/dygraphs-timeseries-dc9fe5d.js
M dashboards/standard-metrics/index.html
R dashboards/standard-metrics/out-of-service-dc9fe5d.js
R dashboards/standard-metrics/project-selector-dc9fe5d.js
M dashboards/standard-metrics/scripts.js
D dashboards/themes/default/assets/fonts
A dashboards/themes/default/assets/fonts/icons.eot
A dashboards/themes/default/assets/fonts/icons.svg
A dashboards/themes/default/assets/fonts/icons.ttf
A dashboards/themes/default/assets/fonts/icons.woff
A dashboards/themes/default/assets/fonts/icons.woff2
A dashboards/themes/default/assets/images/flags.png
R dashboards/vital-signs/breakdown-toggle-dc9fe5d.js
R dashboards/vital-signs/dygraphs-timeseries-dc9fe5d.js
M dashboards/vital-signs/index.html
R dashboards/vital-signs/out-of-service-dc9fe5d.js
R dashboards/vital-signs/project-selector-dc9fe5d.js
M dashboards/vital-signs/scripts.js
A favicon.ico
41 files changed, 744 insertions(+), 459 deletions(-)

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




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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7ac8dfd54733dfe3ab0de71904b41f44c0a4f078
Gerrit-PatchSet: 1
Gerrit-Project: analytics/analytics.wikimedia.org
Gerrit-Branch: master
Gerrit-Owner: Milimetric 
Gerrit-Reviewer: Milimetric 

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


[MediaWiki-commits] [Gerrit] analytics/analytics.wikimedia.org[master]: Update dataset location

2017-02-23 Thread Milimetric (Code Review)
Milimetric has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/339536 )

Change subject: Update dataset location
..

Update dataset location

Bug: T125854
Change-Id: I7ac8dfd54733dfe3ab0de71904b41f44c0a4f078
---
R dashboards/browsers/dygraphs-timeseries-dc9fe5d.js
R dashboards/browsers/filter-timeseries-dc9fe5d.js
R dashboards/browsers/hierarchy-dc9fe5d.js
M dashboards/browsers/index.html
R dashboards/browsers/out-of-service-dc9fe5d.js
M dashboards/browsers/scripts.js
R dashboards/browsers/stacked-bars-dc9fe5d.js
R dashboards/browsers/sunburst-dc9fe5d.js
R dashboards/browsers/table-timeseries-dc9fe5d.js
D dashboards/fonts/icons.svg
D dashboards/fonts/icons.ttf
D dashboards/fonts/icons.woff
D dashboards/fonts/icons.woff2
A dashboards/fonts/s/lato/v11/1YwB1sO8YE1Lyjf12WNiUA.woff2
A dashboards/fonts/s/lato/v11/AcvTq8Q0lyKKNxRlL28RnxJtnKITppOI_IvcXXDNrsc.woff2
A dashboards/fonts/s/lato/v11/H2DMvhDLycM56KNuAtbJYA.woff2
A dashboards/fonts/s/lato/v11/HkF_qI1x_noxlxhrhMQYEFtXRa8TVwTICgirnJhmVJw.woff2
A dashboards/fonts/s/lato/v11/ObQr5XYcoH0WBoUxiaYK3_Y6323mHUZFJMgTvxaG2iE.woff2
A dashboards/fonts/s/lato/v11/PLygLKRVCQnA5fhu3qk5fQ.woff2
A dashboards/fonts/s/lato/v11/UyBMtLsHKBKXelqf4x7VRQ.woff2
A dashboards/fonts/s/lato/v11/YMOYVM-eg6Qs9YzV9OSqZfesZW2xOQ-xsNqO47m55DA.woff2
R dashboards/standard-metrics/breakdown-toggle-dc9fe5d.js
R dashboards/standard-metrics/dygraphs-timeseries-dc9fe5d.js
M dashboards/standard-metrics/index.html
R dashboards/standard-metrics/out-of-service-dc9fe5d.js
R dashboards/standard-metrics/project-selector-dc9fe5d.js
M dashboards/standard-metrics/scripts.js
D dashboards/themes/default/assets/fonts
A dashboards/themes/default/assets/fonts/icons.eot
A dashboards/themes/default/assets/fonts/icons.svg
A dashboards/themes/default/assets/fonts/icons.ttf
A dashboards/themes/default/assets/fonts/icons.woff
A dashboards/themes/default/assets/fonts/icons.woff2
A dashboards/themes/default/assets/images/flags.png
R dashboards/vital-signs/breakdown-toggle-dc9fe5d.js
R dashboards/vital-signs/dygraphs-timeseries-dc9fe5d.js
M dashboards/vital-signs/index.html
R dashboards/vital-signs/out-of-service-dc9fe5d.js
R dashboards/vital-signs/project-selector-dc9fe5d.js
M dashboards/vital-signs/scripts.js
A favicon.ico
41 files changed, 744 insertions(+), 459 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/analytics/analytics.wikimedia.org 
refs/changes/36/339536/1


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7ac8dfd54733dfe3ab0de71904b41f44c0a4f078
Gerrit-PatchSet: 1
Gerrit-Project: analytics/analytics.wikimedia.org
Gerrit-Branch: master
Gerrit-Owner: Milimetric 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Add CSS classes for userlinks on SpecialPages

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

Change subject: Add CSS classes for userlinks on SpecialPages
..


Add CSS classes for userlinks on SpecialPages

On Special:Watchlist, Special:Contributions, Special:Recentchanges etc.
there are links to (talk | contribs | block) for the user who did the
contribution. Add CSS class for them. Introduce the following css
classes:
- mw-usertoollinks-contribs
- mw-usertoollinks-talk
- mw-usertoollinks-block
- mw-usertoollinks-mail

Bug: T156879
Change-Id: I85a3b0987a016ff25026f1c047214a31170b0452
---
M includes/Linker.php
1 file changed, 14 insertions(+), 4 deletions(-)

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

Objections:
  Fomafix: There's a problem with this change, please improve



diff --git a/includes/Linker.php b/includes/Linker.php
index 94b145e..05e3abb 100644
--- a/includes/Linker.php
+++ b/includes/Linker.php
@@ -933,13 +933,14 @@
if ( $userId ) {
// check if the user has an edit
$attribs = [];
+   $attribs['class'] = 'mw-usertoollinks-contribs';
if ( $redContribsWhenNoEdits ) {
if ( intval( $edits ) === 0 && $edits !== 0 ) {
$user = User::newFromId( $userId );
$edits = $user->getEditCount();
}
if ( $edits === 0 ) {
-   $attribs['class'] = 'new';
+   $attribs['class'] .= ' new';
}
}
$contribsPage = SpecialPage::getTitleFor( 
'Contributions', $userText );
@@ -986,7 +987,10 @@
 */
public static function userTalkLink( $userId, $userText ) {
$userTalkPage = Title::makeTitle( NS_USER_TALK, $userText );
-   $userTalkLink = self::link( $userTalkPage, wfMessage( 
'talkpagelinktext' )->escaped() );
+   $moreLinkAttribs['class'] = 'mw-usertoollinks-talk';
+   $userTalkLink = self::link( $userTalkPage,
+   wfMessage( 'talkpagelinktext' 
)->escaped(),
+   $moreLinkAttribs );
return $userTalkLink;
}
 
@@ -998,7 +1002,10 @@
 */
public static function blockLink( $userId, $userText ) {
$blockPage = SpecialPage::getTitleFor( 'Block', $userText );
-   $blockLink = self::link( $blockPage, wfMessage( 'blocklink' 
)->escaped() );
+   $moreLinkAttribs['class'] = 'mw-usertoollinks-block';
+   $blockLink = self::link( $blockPage,
+wfMessage( 'blocklink' )->escaped(),
+$moreLinkAttribs );
return $blockLink;
}
 
@@ -1009,7 +1016,10 @@
 */
public static function emailLink( $userId, $userText ) {
$emailPage = SpecialPage::getTitleFor( 'Emailuser', $userText );
-   $emailLink = self::link( $emailPage, wfMessage( 'emaillink' 
)->escaped() );
+   $moreLinkAttribs['class'] = 'mw-usertoollinks-mail';
+   $emailLink = self::link( $emailPage,
+wfMessage( 'emaillink' )->escaped(),
+$moreLinkAttribs );
return $emailLink;
}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I85a3b0987a016ff25026f1c047214a31170b0452
Gerrit-PatchSet: 10
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: EddieGP 
Gerrit-Reviewer: 20after4 
Gerrit-Reviewer: EddieGP 
Gerrit-Reviewer: Fomafix 
Gerrit-Reviewer: Zppix 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Adding comment explaining MODULE_SIZE_MAX

2017-02-23 Thread Kaldari (Code Review)
Kaldari has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/339524 )

Change subject: Adding comment explaining MODULE_SIZE_MAX
..

Adding comment explaining MODULE_SIZE_MAX

This informaiton was lost in Iedde8a3.

Change-Id: Ib884f3504c2a98537b919f78a043ae0b64a146cf
---
M resources/src/mediawiki/mediawiki.js
1 file changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/24/339524/1

diff --git a/resources/src/mediawiki/mediawiki.js 
b/resources/src/mediawiki/mediawiki.js
index 94ad217..7872818 100644
--- a/resources/src/mediawiki/mediawiki.js
+++ b/resources/src/mediawiki/mediawiki.js
@@ -2195,6 +2195,8 @@
// Whether the store is in use on this 
page.
enabled: null,
 
+   // Modules whose string representation 
exceeds 100 kB are
+   // ineligible for storage. See bug 
T66721.
MODULE_SIZE_MAX: 100 * 1000,
 
// The contents of the store, mapping 
'[name]@[version]' keys

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Add class in diff and history links in ChangesList

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

Change subject: Add class in diff and history links in ChangesList
..


Add class in diff and history links in ChangesList

It would make it easier to select in javascript and CSS

Bug: T157178
Change-Id: I2d5ef8c180ae4ff6e7f5d0ab443dc7084f8c4c77
---
M includes/changes/ChangesList.php
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/includes/changes/ChangesList.php b/includes/changes/ChangesList.php
index 1e88e13..970dc5a 100644
--- a/includes/changes/ChangesList.php
+++ b/includes/changes/ChangesList.php
@@ -379,7 +379,7 @@
$diffLink = $this->linkRenderer->makeKnownLink(
$rc->getTitle(),
new HtmlArmor( $this->message['diff'] ),
-   [],
+   [ 'class' => 'mw-changeslist-diff' ],
$query
);
}
@@ -391,7 +391,7 @@
$diffhist .= $this->linkRenderer->makeKnownLink(
$rc->getTitle(),
new HtmlArmor( $this->message['hist'] ),
-   [],
+   [ 'class' => 'mw-changeslist-history' ],
[
'curid' => $rc->mAttribs['rc_cur_id'],
'action' => 'history'

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2d5ef8c180ae4ff6e7f5d0ab443dc7084f8c4c77
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Ladsgroup 
Gerrit-Reviewer: 20after4 
Gerrit-Reviewer: Addshore 
Gerrit-Reviewer: EddieGP 
Gerrit-Reviewer: Gergő Tisza 
Gerrit-Reviewer: Ladsgroup 
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] operations/puppet[production]: WIP: Enable local logginng for RESTBase

2017-02-23 Thread Ppchelko (Code Review)
Ppchelko has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/339501 )

Change subject: WIP: Enable local logginng for RESTBase
..

WIP: Enable local logginng for RESTBase

Change-Id: Ib82ccbc573cc40d208a86152630b60167ef48865
---
M modules/restbase/manifests/init.pp
1 file changed, 0 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/01/339501/1

diff --git a/modules/restbase/manifests/init.pp 
b/modules/restbase/manifests/init.pp
index 98662d8..843e0be 100644
--- a/modules/restbase/manifests/init.pp
+++ b/modules/restbase/manifests/init.pp
@@ -138,7 +138,6 @@
 healthcheck_url => "/${monitor_domain}/v1",
 has_spec=> true,
 starter_script  => 'restbase/server.js',
-local_logging   => false,
 auto_refresh=> false,
 }
 

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Make the parser tests' "subpage" option actually enable for ...

2017-02-23 Thread Anomie (Code Review)
Anomie has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/339500 )

Change subject: Make the parser tests' "subpage" option actually enable for all 
subpages
..

Make the parser tests' "subpage" option actually enable for all subpages

The option says "enable subpages (disabled by default)", but it
currently just enables subpages for namespaces 0 and 2. This tripped me
up when writing some parser tests for TemplateStyles where I need
subpages enabled for namespace 10.

There's probably no reason not to have it enable subpages for all
namespaces.

Change-Id: Icf864dafc4208a76af7b3e71f5f9c97576c065b7
---
M tests/parser/ParserTestRunner.php
1 file changed, 3 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/00/339500/1

diff --git a/tests/parser/ParserTestRunner.php 
b/tests/parser/ParserTestRunner.php
index 7edde2a..35c2480 100644
--- a/tests/parser/ParserTestRunner.php
+++ b/tests/parser/ParserTestRunner.php
@@ -974,10 +974,9 @@
'wgEnableUploads' => self::getOptionValue( 
'wgEnableUploads', $opts, true ),
'wgLanguageCode' => $langCode,
'wgRawHtml' => self::getOptionValue( 'wgRawHtml', 
$opts, false ),
-   'wgNamespacesWithSubpages' => [
-   0 => isset( $opts['subpage'] ),
-   2 => isset( $opts['subpage'] ),
-   ],
+   'wgNamespacesWithSubpages' => array_fill_keys(
+   MWNamespace::getValidNamespaces(), isset( 
$opts['subpage'] )
+   ),
'wgMaxTocLevel' => $maxtoclevel,
'wgAllowExternalImages' => self::getOptionValue( 
'wgAllowExternalImages', $opts, true ),
'wgThumbLimits' => [ self::getOptionValue( 'thumbsize', 
$opts, 180 ) ],

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...Truglass[master]: Add grunt-jsonlint and grunt-banana-checker

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

Change subject: Add grunt-jsonlint and grunt-banana-checker
..


Add grunt-jsonlint and grunt-banana-checker

jsonlint and banana-checker will test for valid i18n files

Bug: T94547
Change-Id: Ideae6c4a60c16978c487b8b49ea4f4a3e6af4a40
---
A .gitignore
A Gruntfile.js
A package.json
3 files changed, 33 insertions(+), 0 deletions(-)

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



diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000..7e5da87
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,2 @@
+node_modules/
+vendor/
diff --git a/Gruntfile.js b/Gruntfile.js
new file mode 100644
index 000..472f993
--- /dev/null
+++ b/Gruntfile.js
@@ -0,0 +1,20 @@
+/*jshint node:true */
+module.exports = function ( grunt ) {
+   grunt.loadNpmTasks( 'grunt-jsonlint' );
+   grunt.loadNpmTasks( 'grunt-banana-checker' );
+
+   var conf = grunt.file.readJSON( 'skin.json' );
+   grunt.initConfig( {
+   banana: conf.MessagesDirs,
+   jsonlint: {
+   all: [
+   '**/*.json',
+   '!node_modules/**',
+   '!vendor/**'
+   ]
+   }
+   } );
+
+   grunt.registerTask( 'test', [ 'jsonlint', 'banana' ] );
+   grunt.registerTask( 'default', 'test' );
+};
diff --git a/package.json b/package.json
new file mode 100644
index 000..bcf5b13
--- /dev/null
+++ b/package.json
@@ -0,0 +1,11 @@
+{
+   "private": true,
+   "scripts": {
+   "test": "grunt test"
+   },
+   "devDependencies": {
+   "grunt": "1.0.1",
+   "grunt-banana-checker": "0.5.0",
+   "grunt-jsonlint": "1.1.0"
+   }
+}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ideae6c4a60c16978c487b8b49ea4f4a3e6af4a40
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/Truglass
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: Umherirrender 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] pywikibot/core[master]: Split TestWikibaseTypes into one class per type

2017-02-23 Thread Lokal Profil (Code Review)
Lokal Profil has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/339499 )

Change subject: Split TestWikibaseTypes into one class per type
..

Split TestWikibaseTypes into one class per type

Also add additional tests for Coordinate and WbTime.

Change-Id: I8ab1b45bb14996b0e11f667c8763de7e06ac288d
---
M tests/wikibase_tests.py
1 file changed, 158 insertions(+), 100 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/99/339499/1

diff --git a/tests/wikibase_tests.py b/tests/wikibase_tests.py
index 74fceb2..974be3e 100644
--- a/tests/wikibase_tests.py
+++ b/tests/wikibase_tests.py
@@ -139,14 +139,14 @@
  ItemPage(self.get_repo(), 'q5296'))
 
 
-class TestWikibaseTypes(WikidataTestCase):
+class TestWikibaseCoordinate(WikidataTestCase):
 
-"""Test Wikibase data types."""
+"""Test Wikibase Coordinate data type."""
 
 dry = True
 
 def test_Coordinate_dim(self):
-"""Test Coordinate."""
+"""Test Coordinate dimension."""
 repo = self.get_repo()
 x = pywikibot.Coordinate(site=repo, lat=12.0, lon=13.0, precision=5.0)
 self.assertEqual(x.precisionToDim(), 544434)
@@ -158,13 +158,64 @@
 with self.assertRaises(ValueError):
 z.precisionToDim()
 
-def test_WbTime(self):
-"""Test WbTime."""
+def test_Coordinate_entity_globe(self):
+"""Test setting Coordinate globe from entity."""
+repo = self.get_repo()
+coord = pywikibot.Coordinate(
+site=repo, lat=12.0, lon=13.0, precision=0,
+entity='http://www.wikidata.org/entity/Q123')
+self.assertEqual(coord.toWikibase(),
+ {'latitude': 12.0, 'longitude': 13.0,
+  'altitude': None, 'precision': 0,
+  'globe': 'http://www.wikidata.org/entity/Q123'})
+
+
+class TestWbTime(WikidataTestCase):
+
+"""Test Wikibase WbTime data type."""
+
+dry = True
+
+def test_WbTime_toTimestr(self):
+"""Test WbTime conversion to UTC date/time string."""
 repo = self.get_repo()
 t = pywikibot.WbTime(site=repo, year=2010, hour=12, minute=43)
 self.assertEqual(t.toTimestr(), '+0002010-01-01T12:43:00Z')
-self.assertRaises(ValueError, pywikibot.WbTime, site=repo, 
precision=15)
-self.assertRaises(ValueError, pywikibot.WbTime, site=repo, 
precision='invalid_precision')
+t = pywikibot.WbTime(site=repo, year=-2010, hour=12, minute=43)
+self.assertEqual(t.toTimestr(), '-0002010-01-01T12:43:00Z')
+
+def test_WbTime_fromTimestr(self):
+"""Test WbTime creation from UTC date/time string."""
+repo = self.get_repo()
+t = pywikibot.WbTime.fromTimestr('+0002010-01-01T12:43:00Z',
+ site=repo)
+self.assertEqual(t, pywikibot.WbTime(site=repo, year=2010, hour=12,
+ minute=43, precision=14))
+
+def test_WbTime_zero_month(self):
+"""Test WbTime creation from date/time string with zero month."""
+# ensures we support formats in T123888 / T107870
+repo = self.get_repo()
+t = pywikibot.WbTime.fromTimestr('+0002010-00-00T12:43:00Z',
+ site=repo)
+self.assertEqual(t, pywikibot.WbTime(site=repo, year=2010, month=0,
+ day=0, hour=12, minute=43,
+ precision=14))
+
+def test_WbTime_errors(self):
+"""Test WbTime precision errors."""
+repo = self.get_repo()
+self.assertRaises(ValueError, pywikibot.WbTime, site=repo,
+  precision=15)
+self.assertRaises(ValueError, pywikibot.WbTime, site=repo,
+  precision='invalid_precision')
+
+
+class TestWbQuantity(WikidataTestCase):
+
+"""Test Wikibase WbQuantity data type."""
+
+dry = True
 
 def test_WbQuantity_integer(self):
 """Test WbQuantity for integer value."""
@@ -214,8 +265,8 @@
   'upperBound': '+0.044405586', 'unit': '1', }
 self.assertEqual(q.toWikibase(), q_dict)
 
-def test_WbQuantity_formatting(self):
-"""Test other WbQuantity methods."""
+def test_WbQuantity_formatting_bound(self):
+"""Test WbQuantity formatting with bounds."""
 q = pywikibot.WbQuantity(amount='0.044405586', error='0')
 self.assertEqual("%s" % q,
  '{\n'
@@ -271,6 +322,104 @@
   'upperBound': '+1235',
   'unit': 'http://www.wikidata.org/entity/Q712226', })
 
+
+class TestWbQuantityNonDry(WikidataTestCase):
+
+"""
+Test Wikibase WbQuantity data type (non-dry).
+
+These can be moved to TestWbQuantity once DrySite has been bumped to
+  

[MediaWiki-commits] [Gerrit] integration/config[master]: [Truglass] Add npm job

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

Change subject: [Truglass] Add npm job
..


[Truglass] Add npm job

Needed for Ideae6c4a60c16978c487b8b49ea4f4a3e6af4a40

Change-Id: If2a049588cd5e3824578e451cd7f9176abc0a731
---
M zuul/layout.yaml
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index 0a7ad84..c048171 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -2007,6 +2007,7 @@
 template:
  - name: mw-checks-test
  - name: skin-tests-non-voting
+ - name: npm
 
   - name: mediawiki/skins/Vector
 template:

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If2a049588cd5e3824578e451cd7f9176abc0a731
Gerrit-PatchSet: 2
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...SecurePoll[master]: Protect against undefined owners

2017-02-23 Thread Chad (Code Review)
Chad has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/339488 )

Change subject: Protect against undefined owners
..

Protect against undefined owners

Owners might not be defined in the database if the election predates
the addition of the el_owner column. Avoid the non-existent property
warning in Store, and default to an empty string in Election when it's
not defined.

Change-Id: I8159edd7915ae68b42273c3516e37a475029ebd6
---
M includes/entities/Election.php
M includes/main/Store.php
2 files changed, 5 insertions(+), 2 deletions(-)


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

diff --git a/includes/entities/Election.php b/includes/entities/Election.php
index bde1b78..132f6ac 100644
--- a/includes/entities/Election.php
+++ b/includes/entities/Election.php
@@ -72,6 +72,7 @@
public $questions, $auth, $ballot;
public $id, $title, $ballotType, $tallyType, $primaryLang;
public $startDate, $endDate, $authType;
+   public $owner = '';
 
/**
 * Constructor.
@@ -91,7 +92,9 @@
$this->startDate = $info['startDate'];
$this->endDate = $info['endDate'];
$this->authType = $info['auth'];
-   $this->owner = $info['owner'];
+   if ( isset( $info['owner'] ) ) {
+   $this->owner = $info['owner'];
+   }
}
 
/**
diff --git a/includes/main/Store.php b/includes/main/Store.php
index fda55da..b0cb416 100644
--- a/includes/main/Store.php
+++ b/includes/main/Store.php
@@ -175,7 +175,7 @@
foreach ( $map as $key => $field ) {
if ( $key == 'startDate' || $key == 'endDate' ) {
$info[$key] = wfTimestamp( TS_MW, $row->$field 
);
-   } else {
+   } elseif( isset( $row->$field ) ) {
$info[$key] = $row->$field;
}
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8159edd7915ae68b42273c3516e37a475029ebd6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SecurePoll
Gerrit-Branch: master
Gerrit-Owner: Chad 

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


[MediaWiki-commits] [Gerrit] integration/config[master]: [Gamepress] Make unit tests voting

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

Change subject: [Gamepress] Make unit tests voting
..


[Gamepress] Make unit tests voting

Test fixed with  I70297c010e8eaa8416e223dac92e3e8dba8fa0c5

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

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



diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index 552a77e..0a7ad84 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -1873,7 +1873,7 @@
   - name: mediawiki/skins/Gamepress
 template:
  - name: mw-checks-test
- - name: skin-tests-non-voting
+ - name: skin-tests
  - name: npm
 
   - name: mediawiki/skins/GreyStuff

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I491bfe06220b9a991f9dcdc26dbc182fb831d7b9
Gerrit-PatchSet: 2
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: MaxSem 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...DonationInterface[master]: Update SmashPig library

2017-02-23 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/339489 )

Change subject: Update SmashPig library
..

Update SmashPig library

Get some Ingenico error handling

Change-Id: Ica848b6dcec3ce215d0e76b95d403cea6a4bce01
---
M composer.lock
1 file changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/composer.lock b/composer.lock
index c941554..bcc8efa 100644
--- a/composer.lock
+++ b/composer.lock
@@ -936,7 +936,7 @@
 "source": {
 "type": "git",
 "url": 
"https://gerrit.wikimedia.org/r/wikimedia/fundraising/SmashPig.git;,
-"reference": "d581a349e42a73ea7bf3166506262a7fb582b9e6"
+"reference": "4625e68bd0fde15a2dc3ff646cc01bcd4325d8fc"
 },
 "require": {
 "amzn/login-and-pay-with-amazon-sdk-php": "dev-master",
@@ -987,7 +987,7 @@
 "donations",
 "payments"
 ],
-"time": "2017-02-17 00:27:55"
+"time": "2017-02-23 20:48:06"
 },
 {
 "name": "zordius/lightncandy",

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ica848b6dcec3ce215d0e76b95d403cea6a4bce01
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DonationInterface
Gerrit-Branch: master
Gerrit-Owner: Ejegg 

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


[MediaWiki-commits] [Gerrit] mediawiki...SecurePoll[master]: Don't declare SecurePoll_Election->owner dynamically

2017-02-23 Thread Reedy (Code Review)
Reedy has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/339487 )

Change subject: Don't declare SecurePoll_Election->owner dynamically
..

Don't declare SecurePoll_Election->owner dynamically

Change-Id: I02e02bdadcb878090eeddac857c2e212bf1fa611
---
M includes/entities/Election.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/includes/entities/Election.php b/includes/entities/Election.php
index bde1b78..7f070a4 100644
--- a/includes/entities/Election.php
+++ b/includes/entities/Election.php
@@ -71,7 +71,7 @@
 class SecurePoll_Election extends SecurePoll_Entity {
public $questions, $auth, $ballot;
public $id, $title, $ballotType, $tallyType, $primaryLang;
-   public $startDate, $endDate, $authType;
+   public $startDate, $endDate, $authType, $owner;
 
/**
 * Constructor.

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I02e02bdadcb878090eeddac857c2e212bf1fa611
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SecurePoll
Gerrit-Branch: master
Gerrit-Owner: Reedy 

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


[MediaWiki-commits] [Gerrit] mediawiki...mobileapps[master]: On this day: wrap individual endpoint responses in object

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

Change subject: On this day: wrap individual endpoint responses in object
..


On this day: wrap individual endpoint responses in object

By wrapping the array response in an object with the same key as used
in the 'all' response we can later use the same Swagger spec schema for
every type of endpoint. The responses would be also more consistent
between all onthisday endpoints. I just wished we would have done the
same for the other endpoints used to comprise the aggregated feed.

Note: that this schema change would require a corresponding change to
be deployed in RB at the same time.

Change-Id: I69b39501af3604da178e41521efded23302f0634
---
M routes/on-this-day.js
M test/features/onthisday/on-this-day.js
2 files changed, 32 insertions(+), 35 deletions(-)

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



diff --git a/routes/on-this-day.js b/routes/on-this-day.js
index a98f850..691bf03 100644
--- a/routes/on-this-day.js
+++ b/routes/on-this-day.js
@@ -242,69 +242,63 @@
  * Gets array of WMFEvent models of births found in a document
  * @param  {!Document} document  Document to examine
  * @param  {!String}   lang  String for project language code
- * @return {!Array}  Array of WMFEvent models of births
+ * @return {!Object} Object containing list of births
  */
 const birthsInDoc = (document, lang) => {
 const selector = languages[lang].dayPage.headingIds.births;
-return eventsForYearListElements(
-listElementsByHeadingID(document, selector),
-lang
-);
+return { births: 
eventsForYearListElements(listElementsByHeadingID(document, selector), lang) };
 };
 
 /**
  * Gets array of WMFEvent models of deaths found in a document
  * @param  {!Document} document  Document to examine
  * @param  {!String}   lang  String for project language code
- * @return {!Array}  Array of WMFEvent models of deaths
+ * @return {!Object} Object containing list of deaths
  */
 const deathsInDoc = (document, lang) => {
 const selector = languages[lang].dayPage.headingIds.deaths;
-return eventsForYearListElements(
-listElementsByHeadingID(document, selector),
-lang
-);
+return { deaths:
+eventsForYearListElements(listElementsByHeadingID(document, selector), 
lang)
+};
 };
 
 /**
  * Gets array of WMFEvent models of events found in a document
  * @param  {!Document} document  Document to examine
  * @param  {!String}   lang  String for project language code
- * @return {!Array}  Array of WMFEvent models of events
+ * @return {!Object} Object containing list of events
  */
 const eventsInDoc = (document, lang) => {
 const selector = languages[lang].dayPage.headingIds.events;
-return eventsForYearListElements(
-listElementsByHeadingID(document, selector),
-lang
-);
+return { events:
+eventsForYearListElements(listElementsByHeadingID(document, selector), 
lang)
+};
 };
 
 /**
  * Gets array of WMFEvent models of holidays and observances found in a 
document
  * @param  {!Document} document  Document to examine
  * @param  {!String}   lang  String for project language code
- * @return {!Array}  Array of WMFEvent models of holidays and 
observances
+ * @return {!Object} Object containing list of holidays and 
observances
  */
 const holidaysInDoc = (document, lang) => {
 const selector = languages[lang].dayPage.headingIds.holidays;
-return holidaysForHolidayListElements(
-listElementsByHeadingID(document, selector)
-);
+return { holidays:
+holidaysForHolidayListElements(listElementsByHeadingID(document, 
selector))
+};
 };
 
 /**
- * Gets array of WMFEvent models of editor curated selected events found in a 
document
+ * Gets array of WMFEvent models of editor curated selected anniversaries 
found in a document
  * @param  {!Document} document  Document to examine
  * @param  {!String}   lang  String for project language code
- * @return {!Array}  Array of WMFEvent models of selections
+ * @return {!Object} Object containing list of selected 
anniversaries
  */
 const selectionsInDoc = (document, lang) => {
 const selector = languages[lang].selectedPage.listElementSelector;
-return eventsForYearListElements(
-document.querySelectorAll(selector),
-lang
-);
+return { selected:
+eventsForYearListElements(document.querySelectorAll(selector), lang)
+};
 };
 
 /**
@@ -313,17 +307,19 @@
  * @param  {!Document} dayDocDocument of events on a given day
  * @param  {!Document} selectionsDoc Document of editor curated events for a 
given day
  * @param  {!String}   lang  String for project language code
- * 

[MediaWiki-commits] [Gerrit] labs...heritage[master]: Change DB engine to InnoDB

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

Change subject: Change DB engine to InnoDB
..


Change DB engine to InnoDB

Change the DB engine from MyISAM to InnoDB throughout. While this
is unlikely to be the root cause of our failing dumps it is still
a recommended change.

Bug: T138517
Change-Id: I3f92f2b004e3ca846d7013a5b90ae94960d72638
---
M api/includes/StatsBuilder.php
M erfgoedbot/monument_tables.py
M erfgoedbot/sql/create_table_admin_tree.sql
M erfgoedbot/sql/create_table_commonscat.sql
M erfgoedbot/sql/create_table_id_dump.sql
M erfgoedbot/sql/create_table_image.sql
M erfgoedbot/sql/fill_table_monuments_all.sql
M erfgoedbot/sql/fill_table_wlpa_all.sql
M prox_search/create_table_prox_search.sql
9 files changed, 9 insertions(+), 9 deletions(-)

Approvals:
  Jean-Frédéric: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/api/includes/StatsBuilder.php b/api/includes/StatsBuilder.php
index c730415..0ac25dc 100644
--- a/api/includes/StatsBuilder.php
+++ b/api/includes/StatsBuilder.php
@@ -19,7 +19,7 @@
   `idx` varchar(100) NOT NULL,
   `value` varchar(16) NOT NULL DEFAULT '0',
   PRIMARY KEY (`day`,`item`,`idx`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 
 
 ALTER TABLE monuments_all ADD INDEX idx_ctry_municp(country,municipality);
diff --git a/erfgoedbot/monument_tables.py b/erfgoedbot/monument_tables.py
index 693dd12..899a773 100755
--- a/erfgoedbot/monument_tables.py
+++ b/erfgoedbot/monument_tables.py
@@ -71,7 +71,7 @@
 
 f.write('  PRIMARY KEY (`' + primkey.encode('utf8') + '`),\n')
 f.write('  KEY `latitude` (`lat`),\n  KEY `longitude` (`lon`)\n')
-f.write(') ENGINE=MyISAM DEFAULT CHARSET=utf8;\n')
+f.write(') ENGINE=InnoDB DEFAULT CHARSET=utf8;\n')
 f.close()
 
 
diff --git a/erfgoedbot/sql/create_table_admin_tree.sql 
b/erfgoedbot/sql/create_table_admin_tree.sql
index 053c3b0..4a33fcf 100644
--- a/erfgoedbot/sql/create_table_admin_tree.sql
+++ b/erfgoedbot/sql/create_table_admin_tree.sql
@@ -6,4 +6,4 @@
   `parent` INT,
   KEY `parent` (`parent`),
   KEY `level_name_lang` (`level`, `name`, `lang`)
-) ENGINE=INNODB DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
diff --git a/erfgoedbot/sql/create_table_commonscat.sql 
b/erfgoedbot/sql/create_table_commonscat.sql
index 5ebd058..2b6dde3 100644
--- a/erfgoedbot/sql/create_table_commonscat.sql
+++ b/erfgoedbot/sql/create_table_commonscat.sql
@@ -6,5 +6,5 @@
   `commonscat` VARCHAR (255), -- Commons category into which files listed at 
title should be categorised
   `changed` TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
   PRIMARY KEY (site, title)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 
diff --git a/erfgoedbot/sql/create_table_id_dump.sql 
b/erfgoedbot/sql/create_table_id_dump.sql
index f158203..cea23f8 100644
--- a/erfgoedbot/sql/create_table_id_dump.sql
+++ b/erfgoedbot/sql/create_table_id_dump.sql
@@ -5,4 +5,4 @@
   `country` varchar(10) binary NOT NULL DEFAULT '',
   `lang` varchar(10) binary NOT NULL DEFAULT '',
   `changed` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE 
CURRENT_TIMESTAMP
-) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
diff --git a/erfgoedbot/sql/create_table_image.sql 
b/erfgoedbot/sql/create_table_image.sql
index 5c4714b..ef14148 100644
--- a/erfgoedbot/sql/create_table_image.sql
+++ b/erfgoedbot/sql/create_table_image.sql
@@ -15,4 +15,4 @@
   PRIMARY KEY (`country`,`id`, `img_name`),
   KEY `country_id` (`country`,`id`),
   KEY `img_name` (`img_name`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
diff --git a/erfgoedbot/sql/fill_table_monuments_all.sql 
b/erfgoedbot/sql/fill_table_monuments_all.sql
index df2ff31..09abff6 100644
--- a/erfgoedbot/sql/fill_table_monuments_all.sql
+++ b/erfgoedbot/sql/fill_table_monuments_all.sql
@@ -45,7 +45,7 @@
   KEY `name` (`name`),
   KEY `coord` (`lat_int`,`lon_int`,`lat`),
   FULLTEXT KEY `name_address_ft` (`name`, `address`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 
 TRUNCATE TABLE `monuments_all_tmp`;
 
diff --git a/erfgoedbot/sql/fill_table_wlpa_all.sql 
b/erfgoedbot/sql/fill_table_wlpa_all.sql
index 64781a1..56447b3 100644
--- a/erfgoedbot/sql/fill_table_wlpa_all.sql
+++ b/erfgoedbot/sql/fill_table_wlpa_all.sql
@@ -48,7 +48,7 @@
   KEY `creator` (`creator`),
   KEY `coord` (`lat_int`,`lon_int`,`lat`),
   FULLTEXT KEY `name_address_ft` (`name`, `address`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 
 TRUNCATE TABLE `wlpa_all_tmp`;
 
diff --git a/prox_search/create_table_prox_search.sql 
b/prox_search/create_table_prox_search.sql
index cd333a0..455d9e8 100644
--- a/prox_search/create_table_prox_search.sql
+++ b/prox_search/create_table_prox_search.sql
@@ -18,4 +18,4 @@
   INDEX 

[MediaWiki-commits] [Gerrit] operations/puppet[production]: Keystone: Don't remove the upstart script for liberty.

2017-02-23 Thread Andrew Bogott (Code Review)
Andrew Bogott has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/339486 )

Change subject: Keystone:  Don't remove the upstart script for liberty.
..


Keystone:  Don't remove the upstart script for liberty.

Change-Id: I7e0c33ca5015d53bac6e29c7b40c067297f04a93
---
M modules/openstack/manifests/keystone/service.pp
1 file changed, 3 insertions(+), 4 deletions(-)

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



diff --git a/modules/openstack/manifests/keystone/service.pp 
b/modules/openstack/manifests/keystone/service.pp
index f855384..a4971b8 100644
--- a/modules/openstack/manifests/keystone/service.pp
+++ b/modules/openstack/manifests/keystone/service.pp
@@ -76,10 +76,6 @@
 mode=> '0644',
 notify  => Service['uwsgi-keystone-admin', 
'uwsgi-keystone-public'],
 recurse => true;
-# Disable the keystone process itself; this will be handled
-#  by nginx and uwsgi
-'/etc/init/keystone.conf':
-ensure  => 'absent';
 '/etc/logrotate.d/keystone-public-uwsgi':
 ensure => present,
 source => 
'puppet:///modules/openstack/keystone-public-uwsgi.logrotate',
@@ -143,6 +139,9 @@
 ensure  => stopped,
 require => Package['keystone'];
 }
+file {'/etc/init/keystone.conf':
+ensure  => 'absent';
+}
 }
 } else {
 $enable_uwsgi = false

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

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

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


[MediaWiki-commits] [Gerrit] wikimedia...SmashPig[master]: Throw a descendent of SmashPig exception on cURL fail

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

Change subject: Throw a descendent of SmashPig exception on cURL fail
..


Throw a descendent of SmashPig exception on cURL fail

Instead of a thing that apparently doesn't exist.

Change-Id: I4f25e473e9f899340a4dfcdba490ebb02cda5dfe
---
M Core/Http/CurlWrapper.php
1 file changed, 1 insertion(+), 2 deletions(-)

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



diff --git a/Core/Http/CurlWrapper.php b/Core/Http/CurlWrapper.php
index 8f4f862..c39cc59 100644
--- a/Core/Http/CurlWrapper.php
+++ b/Core/Http/CurlWrapper.php
@@ -2,7 +2,6 @@
 
 namespace SmashPig\Core\Http;
 
-use HttpRuntimeException;
 use SmashPig\Core\Configuration;
 use SmashPig\Core\Context;
 use SmashPig\Core\Logging\Logger;
@@ -85,7 +84,7 @@
 
if ( $response === false ) {
// no valid response after multiple tries
-   throw new HttpRuntimeException(
+   throw new HttpException(
"{$method} request to {$url} failed $loopCount 
times."
);
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4f25e473e9f899340a4dfcdba490ebb02cda5dfe
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/SmashPig
Gerrit-Branch: master
Gerrit-Owner: Ejegg 
Gerrit-Reviewer: AndyRussG 
Gerrit-Reviewer: Awight 
Gerrit-Reviewer: Cdentinger 
Gerrit-Reviewer: Eileen 
Gerrit-Reviewer: Katie Horn 
Gerrit-Reviewer: Pcoombe 
Gerrit-Reviewer: XenoRyet 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...PerformanceInspector[master]: build: Replace jscs/jshint with eslint and make pass; pin ve...

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

Change subject: build: Replace jscs/jshint with eslint and make pass; pin 
versions
..


build: Replace jscs/jshint with eslint and make pass; pin versions

Fixed issues –

> error  'caPILink' is assigned a value but never used
> error  '$summary' is not defined
> error  '$parsedHTML' is not defined

Bug: T118941
Change-Id: Iff79501de8d80a860eebb4a6e31dc8fca3285505
---
A .eslintrc.json
D .jshintignore
D .jshintrc
M Gruntfile.js
M modules/collectors/ext.PerformanceInspector.imagesize.js
M modules/collectors/ext.PerformanceInspector.modulescss.js
M modules/collectors/ext.PerformanceInspector.newpp.js
M modules/ext.PerformanceInspector.startup.js
M modules/ext.PerformanceInspector.view.js
M package.json
10 files changed, 46 insertions(+), 62 deletions(-)

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



diff --git a/.eslintrc.json b/.eslintrc.json
new file mode 100644
index 000..66e5300
--- /dev/null
+++ b/.eslintrc.json
@@ -0,0 +1,18 @@
+{
+   "extends": "wikimedia",
+   "env": {
+   "browser": true,
+   "jquery": true,
+   "qunit": true
+   },
+   "globals": {
+   "OO": false,
+   "mediaWiki": false,
+   "require": false
+   },
+   "rules": {
+   "dot-notation": [ "error", { "allowKeywords": true } ],
+   "valid-jsdoc": 0,
+   "indent": 0
+   }
+}
diff --git a/.jshintignore b/.jshintignore
deleted file mode 100644
index 3c3629e..000
--- a/.jshintignore
+++ /dev/null
@@ -1 +0,0 @@
-node_modules
diff --git a/.jshintrc b/.jshintrc
deleted file mode 100644
index f414e48..000
--- a/.jshintrc
+++ /dev/null
@@ -1,27 +0,0 @@
-{
-   // Enforcing
-   "bitwise": true,
-   "eqeqeq": true,
-   "freeze": true,
-   "latedef": true,
-   "noarg": true,
-   "nonew": true,
-   "undef": true,
-   "unused": true,
-   "strict": false,
-
-   // Relaxing
-   "es5": false,
-
-   // Environment
-   "browser": true,
-   "jquery": true,
-
-   "globals": {
-   "mediaWiki": false,
-   "OO": false,
-   "require": false,
-   "module": false,
-   "moment": false
-   }
-}
diff --git a/Gruntfile.js b/Gruntfile.js
index 18101d6..be270bd 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -1,22 +1,17 @@
-/*jshint node:true */
+/* eslint-env node */
 module.exports = function ( grunt ) {
-   grunt.loadNpmTasks( 'grunt-contrib-jshint' );
-   grunt.loadNpmTasks( 'grunt-jsonlint' );
-   grunt.loadNpmTasks( 'grunt-banana-checker' );
-   grunt.loadNpmTasks( 'grunt-jscs' );
var conf = grunt.file.readJSON( 'extension.json' );
 
+   grunt.loadNpmTasks( 'grunt-banana-checker' );
+   grunt.loadNpmTasks( 'grunt-eslint' );
+   grunt.loadNpmTasks( 'grunt-jsonlint' );
+
grunt.initConfig( {
-   jshint: {
-   options: {
-   jshintrc: true
-   },
+   eslint: {
all: [
-   'modules/'
+   'modules/**/*.js',
+   'tests/**/*.js'
]
-   },
-   jscs: {
-   src: '<%= jshint.all %>'
},
banana: conf.MessagesDirs,
jsonlint: {
@@ -27,6 +22,6 @@
}
} );
 
-   grunt.registerTask( 'test', [ 'jshint', 'jscs', 'jsonlint', 'banana' ] 
);
+   grunt.registerTask( 'test', [ 'eslint', 'jsonlint', 'banana' ] );
grunt.registerTask( 'default', 'test' );
 };
diff --git a/modules/collectors/ext.PerformanceInspector.imagesize.js 
b/modules/collectors/ext.PerformanceInspector.imagesize.js
index ced9ada..dc987b5 100644
--- a/modules/collectors/ext.PerformanceInspector.imagesize.js
+++ b/modules/collectors/ext.PerformanceInspector.imagesize.js
@@ -68,7 +68,7 @@
} );
}
for ( i = 0; i < img.length; i++ ) {
-   if ( img[ i ].currentSrc && img[ i 
].currentSrc.indexOf( 'data:image' ) === -1  ) {
+   if ( img[ i ].currentSrc && img[ i 
].currentSrc.indexOf( 'data:image' ) === -1 ) {
promises.push( fetchContent( img[ i 
].currentSrc ) );
}
}
@@ -96,12 +96,12 @@
url: 
values[ i ].url,

sizeRaw: sizeRaw,
   

[MediaWiki-commits] [Gerrit] integration/config[master]: Run parsoid's timedmediahandler tests as well

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

Change subject: Run parsoid's timedmediahandler tests as well
..


Run parsoid's timedmediahandler tests as well

Change-Id: I2d27e60d11cfed9b02c61917b5359362d68ad130
---
M jjb/parsoidsvc.yaml
1 file changed, 4 insertions(+), 1 deletion(-)

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



diff --git a/jjb/parsoidsvc.yaml b/jjb/parsoidsvc.yaml
index 583171d..d238032 100644
--- a/jjb/parsoidsvc.yaml
+++ b/jjb/parsoidsvc.yaml
@@ -16,7 +16,7 @@
 phpflavor: 'hhvm'
 - assert-node-version-6
 - castor-load
-- shell: "echo -e 'mediawiki/extensions/Cite' > deps.txt"
+- shell: "echo -e 
'mediawiki/extensions/Cite\nmediawiki/extensions/MwEmbedSupport\nmediawiki/extensions/TimedMediaHandler'
 > deps.txt"
 - zuul-parsoid-cloner:
 projects: >
 mediawiki/core
@@ -44,6 +44,7 @@
 # if something goes wrong
 find -name parserTests.txt -print0 | xargs -0 md5sum -b
 find -name citeParserTests.txt -print0 | xargs -0 md5sum -b
+find -name timedMediaHandlerParserTests.txt -print0 | xargs -0 
md5sum -b
 # Now run parserTests
 cd src/mediawiki/core
 # export again, we're in a new shell
@@ -52,6 +53,8 @@
 --file="$WORKSPACE/parsoidsvc/tests/parserTests.txt"
 php tests/parser/parserTests.php --color=no --quiet \
 --file="$WORKSPACE/parsoidsvc/tests/citeParserTests.txt"
+php tests/parser/parserTests.php --color=no --quiet \
+
--file="$WORKSPACE/parsoidsvc/tests/timedMediaHandlerParserTests.txt"
 publishers:
 - archive-log-allow-empty
 - castor-save

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2d27e60d11cfed9b02c61917b5359362d68ad130
Gerrit-PatchSet: 2
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Arlolra 
Gerrit-Reviewer: Arlolra 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Subramanya Sastry 
Gerrit-Reviewer: jenkins-bot <>

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


  1   2   3   4   >