[MediaWiki-commits] [Gerrit] WikidataPageBanner check avoid empty icons - change (mediawiki...WikidataPageBanner)

2015-07-27 Thread Sumit (Code Review)
Sumit has uploaded a new change for review.

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

Change subject: WikidataPageBanner check avoid empty icons
..

WikidataPageBanner check avoid empty icons

Excess commas may lead to empty icon generation. Check for empty icon name and
avoid adding any such icon.

Bug: T107133
Change-Id: I63ec901acd049f62f0797a9e57d401232e6dc495
---
M includes/WikidataPageBanner.functions.php
1 file changed, 3 insertions(+), 0 deletions(-)


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

diff --git a/includes/WikidataPageBanner.functions.php 
b/includes/WikidataPageBanner.functions.php
index 2fda70e..dff4785 100644
--- a/includes/WikidataPageBanner.functions.php
+++ b/includes/WikidataPageBanner.functions.php
@@ -26,6 +26,9 @@
if ( isset( $argumentsFromParserFunction['icons'] ) ) {
$icons = explode( ',', 
$argumentsFromParserFunction['icons'] );
foreach ( $icons as $iconname ) {
+   if ( empty( $iconname ) ) {
+   continue;
+   }
$iconName = Sanitizer::escapeClass( $iconname );
$icon = new OOUI\IconWidget( array(
'icon' => $iconName,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I63ec901acd049f62f0797a9e57d401232e6dc495
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikidataPageBanner
Gerrit-Branch: master
Gerrit-Owner: Sumit 

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


[MediaWiki-commits] [Gerrit] Switch to python 3 - change (labs...crosswatch)

2015-07-27 Thread Sitic (Code Review)
Sitic has submitted this change and it was merged.

Change subject: Switch to python 3
..


Switch to python 3

\o/ gevent added python 3 support two weeks ago.

The switch is needed for mediawiki-utilities to check if a
revision was reverted.

Change-Id: I1c49eb7b3c68be860cf6a4a0ee3713a3f244bae2
---
M backend/celery/api.py
M backend/celery/tasks.py
M backend/server/__init__.py
M backend/server/flask_mwoauth/__init__.py
M scripts/celery.grid.sh
M setup.py
6 files changed, 39 insertions(+), 49 deletions(-)

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



diff --git a/backend/celery/api.py b/backend/celery/api.py
index fb6146d..7a4870f 100644
--- a/backend/celery/api.py
+++ b/backend/celery/api.py
@@ -38,7 +38,8 @@
 self.redis = StrictRedis(
 host=config.redis_server,
 port=config.redis_port,
-db=config.redis_db
+db=config.redis_db,
+decode_responses=True
 )
 
 def publish(self, message):
diff --git a/backend/celery/tasks.py b/backend/celery/tasks.py
index 6afd300..5c2ab90 100644
--- a/backend/celery/tasks.py
+++ b/backend/celery/tasks.py
@@ -4,6 +4,7 @@
 # Copyright (C) 2015 Jan Lebert
 from __future__ import absolute_import
 from __future__ import unicode_literals
+from builtins import range
 
 from uuid import uuid4
 from contextlib import closing
@@ -16,7 +17,7 @@
 
 def chunks(l, n):
 """Yield successive n-sized chunks from l."""
-for i in xrange(0, len(l), n):
+for i in range(0, len(l), n):
 yield l[i:i+n]
 
 
@@ -49,7 +50,8 @@
 db = MySQLdb.connect(
 host='centralauth.labsdb',
 user=config.sql_user,
-passwd=config.sql_passwd
+passwd=config.sql_passwd,
+charset='utf8'
 )
 
 projects = []
@@ -57,7 +59,7 @@
 cur.execute("SELECT lu_wiki FROM centralauth_p.localuser WHERE 
lu_name=%s;", [username])  # NOQA
 result = cur.fetchall()
 for row in result:
-project = row[0]
+project = row[0].decode("utf-8")
 try:
 wiki = wikis[project]
 if 'closed' not in wiki and project not in preload_projects:
@@ -84,7 +86,8 @@
 db = MySQLdb.connect(
 host='s4.labsdb',
 user=config.sql_user,
-passwd=config.sql_passwd
+passwd=config.sql_passwd,
+charset='utf8'
 )
 with closing(db.cursor()) as cur:
 for wiki in project_chunk:
@@ -221,7 +224,7 @@
 mw = MediaWiki(access_token=access_token, redis_channel=redis_channel)
 wikis = mw.wikis()
 
-for project, notifications in notifications.iteritems():
+for project, notifications in notifications.items():
 projecturl = wikis[project]['url']
 mw = MediaWiki(host=projecturl, access_token=access_token,
redis_channel=redis_channel)
diff --git a/backend/server/__init__.py b/backend/server/__init__.py
index 185ecd2..7264fe6 100644
--- a/backend/server/__init__.py
+++ b/backend/server/__init__.py
@@ -69,7 +69,7 @@
 
 
 def run(port):
-logging.basicConfig(level=logging.DEBUG,
+logging.basicConfig(level=logging.INFO,
 format='%(asctime)s %(name)-12s %(levelname)-8s' +
' %(message)s',
 datefmt='%m-%d %H:%M')
diff --git a/backend/server/flask_mwoauth/__init__.py 
b/backend/server/flask_mwoauth/__init__.py
index a05e110..1f02b17 100644
--- a/backend/server/flask_mwoauth/__init__.py
+++ b/backend/server/flask_mwoauth/__init__.py
@@ -1,38 +1,17 @@
 #!/usr/bin/env python
 # MediaWiki OAuth connector for Flask
 #
-# Requires flask-oauth
+# Requires flask-oauthlib
 #
 # (C) 2013 Merlijn van Deen 
 # (C) 2015 Jan Lebert
 # Licensed under the MIT License // http://opensource.org/licenses/MIT
 #
 
-__version__ = '0.1.35'
-
-import urllib
+from future.moves.urllib.parse import urlencode
 from flask import request, session, Blueprint, make_response, redirect, 
render_template
-from flask_oauth import OAuth, OAuthRemoteApp, OAuthException, parse_response
+from flask_oauthlib.client import OAuth, OAuthException
 import json
-
-
-class MWOAuthRemoteApp(OAuthRemoteApp):
-def handle_oauth1_response(self):
-"""Handles an oauth1 authorization response.  The return value of
-this method is forwarded as first argument to the handling view
-function.
-"""
-client = self.make_client()
-resp, content = client.request('%s&oauth_verifier=%s' % (
-self.expand_url(self.access_token_url),
-request.args['oauth_verifier'],
-), self.access_token_method)
-print resp, content
-data = parse_response(resp, content)
-if not self.status_okay(resp):
-raise OAuthException('Invalid response from ' + self.name,
- type='invalid_response', data=data)
-return data

[MediaWiki-commits] [Gerrit] [WIP] toolbar thing - change (mediawiki...UrlShortener)

2015-07-27 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review.

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

Change subject: [WIP] toolbar thing
..

[WIP] toolbar thing

Change-Id: Ia646c9554d2434342b414e53ab99b437002ee2e8
---
M UrlShortener.hooks.php
M UrlShortener.php
A modules/ext.urlShortener.toolbar.js
3 files changed, 29 insertions(+), 0 deletions(-)


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

diff --git a/UrlShortener.hooks.php b/UrlShortener.hooks.php
index 6e881e1..dd8cf52 100644
--- a/UrlShortener.hooks.php
+++ b/UrlShortener.hooks.php
@@ -25,6 +25,10 @@
return true;
}
 
+   public static function onBeforePageDisplay( OutputPage $out ) {
+   $out->addModules( 'ext.urlShortener.toolbar' );
+   }
+
/**
 * @param $du DatabaseUpdater
 * @return bool
diff --git a/UrlShortener.php b/UrlShortener.php
index 285f931..3d4165e 100644
--- a/UrlShortener.php
+++ b/UrlShortener.php
@@ -115,6 +115,7 @@
 
 $wgHooks['LoadExtensionSchemaUpdates'][] = 
'UrlShortenerHooks::onLoadExtensionSchemaUpdates';
 $wgHooks['WebRequestPathInfoRouter'][] = 
'UrlShortenerHooks::onWebRequestPathInfoRouter';
+$wgHooks['BeforePageDisplay'][] = 'UrlShortenerHooks::onBeforePageDisplay';
 
 $wgAPIModules['shortenurl'] = 'ApiShortenUrl';
 
@@ -138,3 +139,14 @@
'mediawiki.Uri',
),
 );
+
+$wgResourceModules['ext.urlShortener.toolbar'] = array(
+   'scripts' => array(
+   'modules/ext.urlShortener.toolbar.js',
+   ),
+   'dependencies' => array(
+   'oojs-ui',
+   ),
+   'localBasePath' => __DIR__,
+   'remoteExtPath' => 'UrlShortener',
+);
diff --git a/modules/ext.urlShortener.toolbar.js 
b/modules/ext.urlShortener.toolbar.js
new file mode 100644
index 000..8d938d4
--- /dev/null
+++ b/modules/ext.urlShortener.toolbar.js
@@ -0,0 +1,13 @@
+( function ( mw, $, OO ) {
+   $( function () {
+   var progress = new OO.ui.ProgressBarWidget(),
+   popup = new OO.ui.PopupWidget( {
+   $content: progress.$element,
+   padded: true,
+   align: 'forwards'
+   } );
+   $( '#t-print' ).append( popup.$element );
+   popup.toggle( true );
+   } );
+
+} )( mediaWiki, jQuery, OO );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia646c9554d2434342b414e53ab99b437002ee2e8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UrlShortener
Gerrit-Branch: master
Gerrit-Owner: Legoktm 

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


[MediaWiki-commits] [Gerrit] labstore: Followup to I90dc98401b89e769fa058943e3714e383dfe25ea - change (operations/puppet)

2015-07-27 Thread Yuvipanda (Code Review)
Yuvipanda has submitted this change and it was merged.

Change subject: labstore: Followup to I90dc98401b89e769fa058943e3714e383dfe25ea
..


labstore: Followup to I90dc98401b89e769fa058943e3714e383dfe25ea

- Make sure replica.my.cnf permissions are set properly
- Protect against symlink following
- Add more debugging information

Bug: T104453
Change-Id: I1a69d92cac4bfdd7defb565e6ec75ea0aa930a53
---
M modules/labstore/files/create-dbusers
1 file changed, 29 insertions(+), 9 deletions(-)

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



diff --git a/modules/labstore/files/create-dbusers 
b/modules/labstore/files/create-dbusers
index b1329a0..244deda 100755
--- a/modules/labstore/files/create-dbusers
+++ b/modules/labstore/files/create-dbusers
@@ -21,6 +21,7 @@
 import string
 import random
 import configparser
+import io
 
 
 class User:
@@ -58,6 +59,17 @@
 
 return users
 
+def write_user_file(self, path, content):
+try:
+f = os.open(path, os.O_CREAT | os.O_WRONLY)
+os.write(f, content.encode('utf-8'))
+# uid == gid
+os.fchown(f, self.uid, self.uid)
+os.fchmod(f, 0o400)
+finally:
+if f:
+os.close(f)
+
 
 class CredentialCreator:
 PASSWORD_LENGTH = 16
@@ -79,6 +91,20 @@
 return ''.join(sysrandom.sample(
 CredentialCreator.PASSWORD_CHARS,
 CredentialCreator.PASSWORD_LENGTH))
+
+def write_credentials_file(self, path, user):
+password = self._generate_pass()
+replica_config = configparser.ConfigParser()
+replica_config['client'] = {
+'user': user.db_username,
+'password': password
+}
+self.create_user(user, password)
+# Because ConfigParser can only write to a file
+# and not just return the value as a string directly
+replica_buffer = io.StringIO()
+replica_config.write(replica_buffer)
+sg.write_user_file(replica_path, replica_buffer.getvalue())
 
 def check_user_exists(self, user):
 exists = True
@@ -106,6 +132,7 @@
 user_pass=password
 )
 cur.execute(sql)
+logging.info('Created user %s in %s', user.db_username, 
conn.host)
 finally:
 cur.close()
 
@@ -150,15 +177,8 @@
 if not cgen.check_user_exists(sg):
 # No replica.my.cnf and no user in db
 # Generate new creds and put them in there!
-password = cgen._generate_pass()
-replica_config = configparser.ConfigParser()
-replica_config['client'] = {
-'user': sg.db_username,
-'password': password
-}
-cgen.create_user(sg, password)
-with open(replica_path, 'w') as f:
-replica_config.write(f)
+logging.info('Creating DB accounts for %s with db username 
%s', sg.name, sg.db_username)
+cgen.write_credentials_file(replica_path, sg)
 logging.info("Created replica.my.cnf for %s, with username 
%s", sg.name, sg.db_username)
 else:
 logging.info('Missing replica.my.cnf for user %s despite 
grants present in db', sg.name)

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1a69d92cac4bfdd7defb565e6ec75ea0aa930a53
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Yuvipanda 
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] labstore: Followup to I90dc98401b89e769fa058943e3714e383dfe25ea - change (operations/puppet)

2015-07-27 Thread Yuvipanda (Code Review)
Yuvipanda has uploaded a new change for review.

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

Change subject: labstore: Followup to I90dc98401b89e769fa058943e3714e383dfe25ea
..

labstore: Followup to I90dc98401b89e769fa058943e3714e383dfe25ea

- Make sure replica.my.cnf permissions are set properly
- Protect against symlink following
- Add more debugging information

Bug: T104453
Change-Id: I1a69d92cac4bfdd7defb565e6ec75ea0aa930a53
---
M modules/labstore/files/create-dbusers
1 file changed, 29 insertions(+), 9 deletions(-)


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

diff --git a/modules/labstore/files/create-dbusers 
b/modules/labstore/files/create-dbusers
index b1329a0..244deda 100755
--- a/modules/labstore/files/create-dbusers
+++ b/modules/labstore/files/create-dbusers
@@ -21,6 +21,7 @@
 import string
 import random
 import configparser
+import io
 
 
 class User:
@@ -58,6 +59,17 @@
 
 return users
 
+def write_user_file(self, path, content):
+try:
+f = os.open(path, os.O_CREAT | os.O_WRONLY)
+os.write(f, content.encode('utf-8'))
+# uid == gid
+os.fchown(f, self.uid, self.uid)
+os.fchmod(f, 0o400)
+finally:
+if f:
+os.close(f)
+
 
 class CredentialCreator:
 PASSWORD_LENGTH = 16
@@ -79,6 +91,20 @@
 return ''.join(sysrandom.sample(
 CredentialCreator.PASSWORD_CHARS,
 CredentialCreator.PASSWORD_LENGTH))
+
+def write_credentials_file(self, path, user):
+password = self._generate_pass()
+replica_config = configparser.ConfigParser()
+replica_config['client'] = {
+'user': user.db_username,
+'password': password
+}
+self.create_user(user, password)
+# Because ConfigParser can only write to a file
+# and not just return the value as a string directly
+replica_buffer = io.StringIO()
+replica_config.write(replica_buffer)
+sg.write_user_file(replica_path, replica_buffer.getvalue())
 
 def check_user_exists(self, user):
 exists = True
@@ -106,6 +132,7 @@
 user_pass=password
 )
 cur.execute(sql)
+logging.info('Created user %s in %s', user.db_username, 
conn.host)
 finally:
 cur.close()
 
@@ -150,15 +177,8 @@
 if not cgen.check_user_exists(sg):
 # No replica.my.cnf and no user in db
 # Generate new creds and put them in there!
-password = cgen._generate_pass()
-replica_config = configparser.ConfigParser()
-replica_config['client'] = {
-'user': sg.db_username,
-'password': password
-}
-cgen.create_user(sg, password)
-with open(replica_path, 'w') as f:
-replica_config.write(f)
+logging.info('Creating DB accounts for %s with db username 
%s', sg.name, sg.db_username)
+cgen.write_credentials_file(replica_path, sg)
 logging.info("Created replica.my.cnf for %s, with username 
%s", sg.name, sg.db_username)
 else:
 logging.info('Missing replica.my.cnf for user %s despite 
grants present in db', sg.name)

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

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

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


[MediaWiki-commits] [Gerrit] Remove "group" from ResourceModules - change (mediawiki...Blueprint)

2015-07-27 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Remove "group" from ResourceModules
..


Remove "group" from ResourceModules

legoktm says they are useless -
https://gerrit.wikimedia.org/r/#/c/222559/9/skin.json

Change-Id: Ibaf4b083dd90621f1222c0716acd3e991dc711be
---
M skin.json
1 file changed, 1 insertion(+), 3 deletions(-)

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



diff --git a/skin.json b/skin.json
index 9421af5..9e7b6f5 100644
--- a/skin.json
+++ b/skin.json
@@ -23,7 +23,6 @@
},
"ResourceModules": {
"ext.bootstrap": {
-   "group": "skin.blueprint",
"scripts": "lib/bootstrap/bootstrap.min.js",
"styles": "lib/bootstrap/bootstrap.min.css"
},
@@ -34,8 +33,7 @@
"resources/toc.js"
],
"dependencies": "ext.bootstrap",
-   "position": "top",
-   "group": "skin.blueprint"
+   "position": "top"
}
},
"ResourceFileModulePaths": {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibaf4b083dd90621f1222c0716acd3e991dc711be
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/skins/Blueprint
Gerrit-Branch: master
Gerrit-Owner: Prtksxna 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Spage 
Gerrit-Reviewer: VolkerE 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Add year and copyright holder in license - change (mediawiki...Blueprint)

2015-07-27 Thread Prtksxna (Code Review)
Prtksxna has uploaded a new change for review.

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

Change subject: Add year and copyright holder in license
..

Add year and copyright holder in license

Change-Id: I17fdec84139f19c1f1f35a42ac6881a91eb33bbb
---
M COPYING
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/Blueprint 
refs/changes/12/227412/1

diff --git a/COPYING b/COPYING
index 5b90145..2da05e6 100644
--- a/COPYING
+++ b/COPYING
@@ -1,6 +1,6 @@
 The MIT License (MIT)
 
-Copyright (c)  
+Copyright (c) 2015 Wikimedia Fountation and other contributors
 
 Permission is hereby granted, free of charge, to any person obtaining a copy
  of this software and associated documentation files (the "Software"), to deal

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I17fdec84139f19c1f1f35a42ac6881a91eb33bbb
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/Blueprint
Gerrit-Branch: master
Gerrit-Owner: Prtksxna 

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


[MediaWiki-commits] [Gerrit] Remove "group" from ResourceModules - change (mediawiki...Blueprint)

2015-07-27 Thread Prtksxna (Code Review)
Prtksxna has uploaded a new change for review.

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

Change subject: Remove "group" from ResourceModules
..

Remove "group" from ResourceModules

legoktm says they are useless -
https://gerrit.wikimedia.org/r/#/c/222559/9/skin.json

Change-Id: Ibaf4b083dd90621f1222c0716acd3e991dc711be
---
M skin.json
1 file changed, 0 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/Blueprint 
refs/changes/11/227411/1

diff --git a/skin.json b/skin.json
index 9421af5..597906c 100644
--- a/skin.json
+++ b/skin.json
@@ -23,7 +23,6 @@
},
"ResourceModules": {
"ext.bootstrap": {
-   "group": "skin.blueprint",
"scripts": "lib/bootstrap/bootstrap.min.js",
"styles": "lib/bootstrap/bootstrap.min.css"
},
@@ -35,7 +34,6 @@
],
"dependencies": "ext.bootstrap",
"position": "top",
-   "group": "skin.blueprint"
}
},
"ResourceFileModulePaths": {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibaf4b083dd90621f1222c0716acd3e991dc711be
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/Blueprint
Gerrit-Branch: master
Gerrit-Owner: Prtksxna 

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


[MediaWiki-commits] [Gerrit] Revert "Add redis_auth to redis nutcracker group" - change (operations/puppet)

2015-07-27 Thread Ori.livneh (Code Review)
Ori.livneh has submitted this change and it was merged.

Change subject: Revert "Add redis_auth to redis nutcracker group"
..


Revert "Add redis_auth to redis nutcracker group"

Not supported by our version

This reverts commit eb110f2e18c4a797fdcff31f456c99b7d5d67797.

Change-Id: I94971c3cc150f5ce46fa889805cb23a5a78bd69e
---
M manifests/role/mediawiki.pp
1 file changed, 0 insertions(+), 2 deletions(-)

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



diff --git a/manifests/role/mediawiki.pp b/manifests/role/mediawiki.pp
index 4d9bde0..65c115e 100644
--- a/manifests/role/mediawiki.pp
+++ b/manifests/role/mediawiki.pp
@@ -16,7 +16,6 @@
 include ::mediawiki
 include ::nutcracker::monitoring
 include ::tmpreaper
-include ::passwords::redis
 
 $nutcracker_pools = {
 'memcached' => {
@@ -45,7 +44,6 @@
 auto_eject_hosts => true,
 distribution => 'ketama',
 redis=> true,
-redis_auth   => $passwords::redis::main_password,
 hash => 'md5',
 listen   => '/var/run/nutcracker/session_redis.sock 
0666',
 preconnect   => true,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I94971c3cc150f5ce46fa889805cb23a5a78bd69e
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ori.livneh 
Gerrit-Reviewer: Ori.livneh 

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


[MediaWiki-commits] [Gerrit] Revert "Add redis_auth to redis nutcracker group" - change (operations/puppet)

2015-07-27 Thread Ori.livneh (Code Review)
Ori.livneh has uploaded a new change for review.

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

Change subject: Revert "Add redis_auth to redis nutcracker group"
..

Revert "Add redis_auth to redis nutcracker group"

Not supported by our version

This reverts commit eb110f2e18c4a797fdcff31f456c99b7d5d67797.

Change-Id: I94971c3cc150f5ce46fa889805cb23a5a78bd69e
---
M manifests/role/mediawiki.pp
1 file changed, 0 insertions(+), 2 deletions(-)


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

diff --git a/manifests/role/mediawiki.pp b/manifests/role/mediawiki.pp
index 4d9bde0..65c115e 100644
--- a/manifests/role/mediawiki.pp
+++ b/manifests/role/mediawiki.pp
@@ -16,7 +16,6 @@
 include ::mediawiki
 include ::nutcracker::monitoring
 include ::tmpreaper
-include ::passwords::redis
 
 $nutcracker_pools = {
 'memcached' => {
@@ -45,7 +44,6 @@
 auto_eject_hosts => true,
 distribution => 'ketama',
 redis=> true,
-redis_auth   => $passwords::redis::main_password,
 hash => 'md5',
 listen   => '/var/run/nutcracker/session_redis.sock 
0666',
 preconnect   => true,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I94971c3cc150f5ce46fa889805cb23a5a78bd69e
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ori.livneh 

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


[MediaWiki-commits] [Gerrit] Add redis_auth to redis nutcracker group - change (operations/puppet)

2015-07-27 Thread Ori.livneh (Code Review)
Ori.livneh has submitted this change and it was merged.

Change subject: Add redis_auth to redis nutcracker group
..


Add redis_auth to redis nutcracker group

Change-Id: I3a198bbcbf5d8e9c712806d8848d4a23ea256895
---
M manifests/role/mediawiki.pp
1 file changed, 2 insertions(+), 0 deletions(-)

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



diff --git a/manifests/role/mediawiki.pp b/manifests/role/mediawiki.pp
index 65c115e..4d9bde0 100644
--- a/manifests/role/mediawiki.pp
+++ b/manifests/role/mediawiki.pp
@@ -16,6 +16,7 @@
 include ::mediawiki
 include ::nutcracker::monitoring
 include ::tmpreaper
+include ::passwords::redis
 
 $nutcracker_pools = {
 'memcached' => {
@@ -44,6 +45,7 @@
 auto_eject_hosts => true,
 distribution => 'ketama',
 redis=> true,
+redis_auth   => $passwords::redis::main_password,
 hash => 'md5',
 listen   => '/var/run/nutcracker/session_redis.sock 
0666',
 preconnect   => true,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3a198bbcbf5d8e9c712806d8848d4a23ea256895
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ori.livneh 
Gerrit-Reviewer: Ori.livneh 

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


[MediaWiki-commits] [Gerrit] Provide useful error details when publishing fails - change (mediawiki...ContentTranslation)

2015-07-27 Thread Santhosh (Code Review)
Santhosh has uploaded a new change for review.

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

Change subject: Provide useful error details when publishing fails
..

Provide useful error details when publishing fails

From our logs, we see 4 main reasons for publishing failures.
1. Timeout. Related to network.
2. spamblacklist catching URLs in translation
3. User blocked from editing. Now we are not providing Special:CX at all for 
this
   category of users
4. Parsoid failed to convert the HTML to wikitext.

For all of these provide a brief hint in publishing error message.

Bug: T100498
Change-Id: Ia96ec15a4d44c7c1403542bdd1e25660984fad8b
---
M extension.json
M i18n/en.json
M i18n/qqq.json
M modules/publish/ext.cx.publish.js
4 files changed, 20 insertions(+), 6 deletions(-)


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

diff --git a/extension.json b/extension.json
index c20fdb5..ea27279 100644
--- a/extension.json
+++ b/extension.json
@@ -631,7 +631,8 @@
"cx-publish-page-success",
"cx-publish-page-error",
"cx-publish-button-publishing",
-   "cx-publish-captcha-title"
+   "cx-publish-captcha-title",
+   "unknown-error"
]
},
"ext.cx.wikibase.link": {
diff --git a/i18n/en.json b/i18n/en.json
index a965998..304ce59 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -28,7 +28,7 @@
"cx-header-all-translations": "All translations",
"cx-source-view-page": "view page",
"cx-publish-page-success": "Page published at $1",
-   "cx-publish-page-error": "An error occurred while saving the page. 
Please try to publish the page again.",
+   "cx-publish-page-error": "An error occurred while publishing the 
translation. Please try to publish the page again. Error: $1",
"cx-publish-button": "Publish translation",
"cx-publish-button-publishing": "Publishing...",
"cx-publish-summary": "Created by translating the page \"$1\"",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 2a2ded0..049b7b1 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -33,7 +33,7 @@
"cx-header-all-translations": "A link at the top of the translation 
interface to the main Special:ContentTranslation page that lists all 
translations by the user.\n{{Identical|All translations}}",
"cx-source-view-page": "A link that points to the source page under the 
heading of the source column.\n{{Identical|View page}}",
"cx-publish-page-success": "Message shown when page is published 
successfully. Parameters:\n* $1 - Link to the published page",
-   "cx-publish-page-error": "Error message to display when page saving 
fails.",
+   "cx-publish-page-error": "Error message to display when page saving 
fails.\n* $1 - Error details",
"cx-publish-button": "Publish button text in 
[[Special:ContentTranslation]].\n\nAlso used in 
{{msg-mw|Cx-tools-instructions-text6}}.",
"cx-publish-button-publishing": "Publish button text in 
[[Special:ContentTranslation]], shown while publishing is in progress. Replaces 
{{msg-mw|cx-publish-button}}.\n{{Identical|Publishing}}",
"cx-publish-summary": "This is an automatic edit summary for pages that 
were created by [[Special:ContentTranslation]].\n\nParameters:\n* $1 - the 
source page name",
diff --git a/modules/publish/ext.cx.publish.js 
b/modules/publish/ext.cx.publish.js
index b658e28..de38895 100644
--- a/modules/publish/ext.cx.publish.js
+++ b/modules/publish/ext.cx.publish.js
@@ -289,7 +289,8 @@
 * @param {object} details
 */
CXPublish.prototype.onFail = function ( code, details ) {
-   var trace = {
+   var trace, error;
+   trace = {
sourceLanguage: mw.cx.sourceLanguage,
targetLanguage: mw.cx.targetLanguage,
sourceTitle: mw.cx.sourceTitle,
@@ -305,8 +306,20 @@
this.targetTitle,
JSON.stringify( details )
);
-
-   mw.hook( 'mw.cx.error' ).fire( mw.msg( 'cx-publish-page-error' 
) );
+   // Try providing useful error information.
+   error = mw.msg( 'unknown-error' );
+   if ( details.error && details.error.info ) {
+   // 
{"servedby":"mw","error":{"code":"blocked","info":"You have been blocked 
from editing",
+   // "*":"See ..
+   error = details.error.info;
+   } else if ( details.edit ) {
+   // 
{"result":"error","edit":{"spamblacklist":"facebook.com","result":"Failure"}}
+   error = JSON.stringify( details.edit )

[MediaWiki-commits] [Gerrit] Add redis_auth to redis nutcracker group - change (operations/puppet)

2015-07-27 Thread Ori.livneh (Code Review)
Ori.livneh has uploaded a new change for review.

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

Change subject: Add redis_auth to redis nutcracker group
..

Add redis_auth to redis nutcracker group

Change-Id: I3a198bbcbf5d8e9c712806d8848d4a23ea256895
---
M manifests/role/mediawiki.pp
1 file changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/08/227408/1

diff --git a/manifests/role/mediawiki.pp b/manifests/role/mediawiki.pp
index 65c115e..4d9bde0 100644
--- a/manifests/role/mediawiki.pp
+++ b/manifests/role/mediawiki.pp
@@ -16,6 +16,7 @@
 include ::mediawiki
 include ::nutcracker::monitoring
 include ::tmpreaper
+include ::passwords::redis
 
 $nutcracker_pools = {
 'memcached' => {
@@ -44,6 +45,7 @@
 auto_eject_hosts => true,
 distribution => 'ketama',
 redis=> true,
+redis_auth   => $passwords::redis::main_password,
 hash => 'md5',
 listen   => '/var/run/nutcracker/session_redis.sock 
0666',
 preconnect   => true,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3a198bbcbf5d8e9c712806d8848d4a23ea256895
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ori.livneh 

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


[MediaWiki-commits] [Gerrit] Add 'session-redis' nutcracker group - change (operations/puppet)

2015-07-27 Thread Ori.livneh (Code Review)
Ori.livneh has submitted this change and it was merged.

Change subject: Add 'session-redis' nutcracker group
..


Add 'session-redis' nutcracker group

* Make codfw server aliases shard%2d (i.e., 'shard01' instead of 'shard1'). We
  can make this migration now because codfw MediaWikis are offline.
* Add a nutcracker pool for session-redis.

Change-Id: Ic828eb05f0d00df913e4c74c5f2561a42f00d233
---
M hieradata/codfw.yaml
M hieradata/eqiad.yaml
M manifests/role/mediawiki.pp
3 files changed, 63 insertions(+), 11 deletions(-)

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



diff --git a/hieradata/codfw.yaml b/hieradata/codfw.yaml
index 7b20cd1..de6559e 100644
--- a/hieradata/codfw.yaml
+++ b/hieradata/codfw.yaml
@@ -7,15 +7,15 @@
 swift_aux_partitions: ['/dev/sdm3', '/dev/sdn3']
 swift_check_http_host: 'ms-fe.svc.codfw.wmnet'
 mediawiki_memcached_servers:
-  - '10.192.0.34:11211:1 "shard1"'
-  - '10.192.0.35:11211:1 "shard2"'
-  - '10.192.0.36:11211:1 "shard3"'
-  - '10.192.0.37:11211:1 "shard4"'
-  - '10.192.0.38:11211:1 "shard5"'
-  - '10.192.0.39:11211:1 "shard6"'
-  - '10.192.16.37:11211:1 "shard7"'
-  - '10.192.16.38:11211:1 "shard8"'
-  - '10.192.16.39:11211:1 "shard9"'
+  - '10.192.0.34:11211:1 "shard01"'
+  - '10.192.0.35:11211:1 "shard02"'
+  - '10.192.0.36:11211:1 "shard03"'
+  - '10.192.0.37:11211:1 "shard04"'
+  - '10.192.0.38:11211:1 "shard05"'
+  - '10.192.0.39:11211:1 "shard06"'
+  - '10.192.16.37:11211:1 "shard07"'
+  - '10.192.16.38:11211:1 "shard08"'
+  - '10.192.16.39:11211:1 "shard09"'
   - '10.192.16.40:11211:1 "shard10"'
   - '10.192.16.41:11211:1 "shard11"'
   - '10.192.16.42:11211:1 "shard12"'
@@ -23,6 +23,25 @@
   - '10.192.32.21:11211:1 "shard14"'
   - '10.192.32.22:11211:1 "shard15"'
   - '10.192.32.23:11211:1 "shard16"'
+
+mediawiki_session_redis_servers:
+  - '10.192.0.34:6379:1 "shard01"'
+  - '10.192.0.35:6379:1 "shard02"'
+  - '10.192.0.36:6379:1 "shard03"'
+  - '10.192.0.37:6379:1 "shard04"'
+  - '10.192.0.38:6379:1 "shard05"'
+  - '10.192.0.39:6379:1 "shard06"'
+  - '10.192.16.37:6379:1 "shard07"'
+  - '10.192.16.38:6379:1 "shard08"'
+  - '10.192.16.39:6379:1 "shard09"'
+  - '10.192.16.40:6379:1 "shard10"'
+  - '10.192.16.41:6379:1 "shard11"'
+  - '10.192.16.42:6379:1 "shard12"'
+  - '10.192.32.20:6379:1 "shard13"'
+  - '10.192.32.21:6379:1 "shard14"'
+  - '10.192.32.22:6379:1 "shard15"'
+  - '10.192.32.23:6379:1 "shard16"'
+
 jobrunner_state: 'stopped'
 ganglia_aggregators: install2001.wikimedia.org:10649
 
diff --git a/hieradata/eqiad.yaml b/hieradata/eqiad.yaml
index 0322930..af9585d 100644
--- a/hieradata/eqiad.yaml
+++ b/hieradata/eqiad.yaml
@@ -20,6 +20,27 @@
   - '10.64.48.104:11211:1 "shard16"'
   - '10.64.48.95:11211:1 "shard17"'
   - '10.64.48.96:11211:1 "shard18"'
+
+mediawiki_session_redis_servers:
+  - '10.64.0.180:6379:1 "shard01"'
+  - '10.64.0.181:6379:1 "shard02"'
+  - '10.64.0.182:6379:1 "shard03"'
+  - '10.64.0.183:6379:1 "shard04"'
+  - '10.64.0.184:6379:1 "shard05"'
+  - '10.64.0.185:6379:1 "shard06"'
+  - '10.64.32.161:6379:1 "shard07"'
+  - '10.64.32.162:6379:1 "shard08"'
+  - '10.64.32.163:6379:1 "shard09"'
+  - '10.64.32.164:6379:1 "shard10"'
+  - '10.64.32.165:6379:1 "shard11"'
+  - '10.64.32.166:6379:1 "shard12"'
+  - '10.64.48.101:6379:1 "shard13"'
+  - '10.64.48.102:6379:1 "shard14"'
+  - '10.64.48.103:6379:1 "shard15"'
+  - '10.64.48.104:6379:1 "shard16"'
+  - '10.64.48.95:6379:1 "shard17"'
+  - '10.64.48.96:6379:1 "shard18"'
+
 #
 # Ganglia
 #
diff --git a/manifests/role/mediawiki.pp b/manifests/role/mediawiki.pp
index a43441e..65c115e 100644
--- a/manifests/role/mediawiki.pp
+++ b/manifests/role/mediawiki.pp
@@ -18,7 +18,7 @@
 include ::tmpreaper
 
 $nutcracker_pools = {
-'memcached' => {
+'memcached' => {
 auto_eject_hosts => true,
 distribution => 'ketama',
 hash => 'md5',
@@ -29,7 +29,7 @@
 timeout  => 250,
 servers  => hiera('mediawiki_memcached_servers'),
 },
-'mc-unix' => {
+'mc-unix'   => {
 auto_eject_hosts => true,
 distribution => 'ketama',
 hash => 'md5',
@@ -40,6 +40,18 @@
 timeout  => 250,
 servers  => hiera('mediawiki_memcached_servers'),
 },
+'session-redis' => {
+auto_eject_hosts => true,
+distribution => 'ketama',
+redis=> true,
+hash => 'md5',
+listen   => '/var/run/nutcracker/session_redis.sock 
0666',
+preconnect   => true,
+server_connections   => 2,
+server_failure_limit => 3,
+timeout  => 1000,
+servers  => hiera('mediawiki_session

[MediaWiki-commits] [Gerrit] Allow 0's {{useliquidthreads:01}} when handling magic word. - change (mediawiki...Flow)

2015-07-27 Thread Mattflaschen (Code Review)
Mattflaschen has uploaded a new change for review.

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

Change subject: Allow 0's {{useliquidthreads:01}} when handling magic word.
..

Allow 0's {{useliquidthreads:01}} when handling magic word.

Bug: T92303
Change-Id: I0658e2b6b93beb69a98bad65bc98a9d09afc18ec
---
M includes/Import/LiquidThreadsApi/ConversionStrategy.php
M includes/Import/LiquidThreadsApi/Objects.php
2 files changed, 5 insertions(+), 2 deletions(-)


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

diff --git a/includes/Import/LiquidThreadsApi/ConversionStrategy.php 
b/includes/Import/LiquidThreadsApi/ConversionStrategy.php
index cb77dc8..fb06563 100644
--- a/includes/Import/LiquidThreadsApi/ConversionStrategy.php
+++ b/includes/Import/LiquidThreadsApi/ConversionStrategy.php
@@ -58,6 +58,8 @@
 */
protected $notificationController;
 
+   const LQT_ENABLE_MAGIC_WORD_REGEX = 
'/{{\s*#useliquidthreads:\s*0*1\s*}}/i';
+
public function __construct(
DatabaseBase $dbw,
ImportSourceStore $sourceStore,
@@ -132,7 +134,7 @@
) );
 
$newWikitext = preg_replace(
-   '/{{\s*#useliquidthreads:\s*1\s*}}/i',
+   self::LQT_ENABLE_MAGIC_WORD_REGEX,
'',
$content->getNativeData()
);
diff --git a/includes/Import/LiquidThreadsApi/Objects.php 
b/includes/Import/LiquidThreadsApi/Objects.php
index d491a63..b3b7848 100644
--- a/includes/Import/LiquidThreadsApi/Objects.php
+++ b/includes/Import/LiquidThreadsApi/Objects.php
@@ -13,6 +13,7 @@
 use Flow\Import\ImportException;
 use Flow\Import\IObjectRevision;
 use Flow\Import\IRevisionableObject;
+use Flow\Import\LiquidThreadsApi\ConversionStrategy;
 use Iterator;
 use MWTimestamp;
 use Title;
@@ -526,7 +527,7 @@
// nowiki, etc.  It also ignores case and spaces in places 
where it doesn't
// matter.
$newWikitext = preg_replace(
-   '/{{\s*#useliquidthreads:\s*1\s*}}/i',
+   ConversionStrategy::LQT_ENABLE_MAGIC_WORD_REGEX,
'',
$wikitextForLastRevision
);

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0658e2b6b93beb69a98bad65bc98a9d09afc18ec
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Mattflaschen 

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


[MediaWiki-commits] [Gerrit] Add 'session-redis' nutcracker group - change (operations/puppet)

2015-07-27 Thread Ori.livneh (Code Review)
Ori.livneh has uploaded a new change for review.

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

Change subject: Add 'session-redis' nutcracker group
..

Add 'session-redis' nutcracker group

* Make codfw server aliases shard%2d (i.e., 'shard01' instead of 'shard1'). We
  can make this migration now because codfw MediaWikis are offline.
* Add a nutcracker pool for session-redis.

Change-Id: Ic828eb05f0d00df913e4c74c5f2561a42f00d233
---
M hieradata/codfw.yaml
M hieradata/eqiad.yaml
M manifests/role/mediawiki.pp
3 files changed, 63 insertions(+), 11 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/06/227406/1

diff --git a/hieradata/codfw.yaml b/hieradata/codfw.yaml
index 7b20cd1..de6559e 100644
--- a/hieradata/codfw.yaml
+++ b/hieradata/codfw.yaml
@@ -7,15 +7,15 @@
 swift_aux_partitions: ['/dev/sdm3', '/dev/sdn3']
 swift_check_http_host: 'ms-fe.svc.codfw.wmnet'
 mediawiki_memcached_servers:
-  - '10.192.0.34:11211:1 "shard1"'
-  - '10.192.0.35:11211:1 "shard2"'
-  - '10.192.0.36:11211:1 "shard3"'
-  - '10.192.0.37:11211:1 "shard4"'
-  - '10.192.0.38:11211:1 "shard5"'
-  - '10.192.0.39:11211:1 "shard6"'
-  - '10.192.16.37:11211:1 "shard7"'
-  - '10.192.16.38:11211:1 "shard8"'
-  - '10.192.16.39:11211:1 "shard9"'
+  - '10.192.0.34:11211:1 "shard01"'
+  - '10.192.0.35:11211:1 "shard02"'
+  - '10.192.0.36:11211:1 "shard03"'
+  - '10.192.0.37:11211:1 "shard04"'
+  - '10.192.0.38:11211:1 "shard05"'
+  - '10.192.0.39:11211:1 "shard06"'
+  - '10.192.16.37:11211:1 "shard07"'
+  - '10.192.16.38:11211:1 "shard08"'
+  - '10.192.16.39:11211:1 "shard09"'
   - '10.192.16.40:11211:1 "shard10"'
   - '10.192.16.41:11211:1 "shard11"'
   - '10.192.16.42:11211:1 "shard12"'
@@ -23,6 +23,25 @@
   - '10.192.32.21:11211:1 "shard14"'
   - '10.192.32.22:11211:1 "shard15"'
   - '10.192.32.23:11211:1 "shard16"'
+
+mediawiki_session_redis_servers:
+  - '10.192.0.34:6379:1 "shard01"'
+  - '10.192.0.35:6379:1 "shard02"'
+  - '10.192.0.36:6379:1 "shard03"'
+  - '10.192.0.37:6379:1 "shard04"'
+  - '10.192.0.38:6379:1 "shard05"'
+  - '10.192.0.39:6379:1 "shard06"'
+  - '10.192.16.37:6379:1 "shard07"'
+  - '10.192.16.38:6379:1 "shard08"'
+  - '10.192.16.39:6379:1 "shard09"'
+  - '10.192.16.40:6379:1 "shard10"'
+  - '10.192.16.41:6379:1 "shard11"'
+  - '10.192.16.42:6379:1 "shard12"'
+  - '10.192.32.20:6379:1 "shard13"'
+  - '10.192.32.21:6379:1 "shard14"'
+  - '10.192.32.22:6379:1 "shard15"'
+  - '10.192.32.23:6379:1 "shard16"'
+
 jobrunner_state: 'stopped'
 ganglia_aggregators: install2001.wikimedia.org:10649
 
diff --git a/hieradata/eqiad.yaml b/hieradata/eqiad.yaml
index 0322930..af9585d 100644
--- a/hieradata/eqiad.yaml
+++ b/hieradata/eqiad.yaml
@@ -20,6 +20,27 @@
   - '10.64.48.104:11211:1 "shard16"'
   - '10.64.48.95:11211:1 "shard17"'
   - '10.64.48.96:11211:1 "shard18"'
+
+mediawiki_session_redis_servers:
+  - '10.64.0.180:6379:1 "shard01"'
+  - '10.64.0.181:6379:1 "shard02"'
+  - '10.64.0.182:6379:1 "shard03"'
+  - '10.64.0.183:6379:1 "shard04"'
+  - '10.64.0.184:6379:1 "shard05"'
+  - '10.64.0.185:6379:1 "shard06"'
+  - '10.64.32.161:6379:1 "shard07"'
+  - '10.64.32.162:6379:1 "shard08"'
+  - '10.64.32.163:6379:1 "shard09"'
+  - '10.64.32.164:6379:1 "shard10"'
+  - '10.64.32.165:6379:1 "shard11"'
+  - '10.64.32.166:6379:1 "shard12"'
+  - '10.64.48.101:6379:1 "shard13"'
+  - '10.64.48.102:6379:1 "shard14"'
+  - '10.64.48.103:6379:1 "shard15"'
+  - '10.64.48.104:6379:1 "shard16"'
+  - '10.64.48.95:6379:1 "shard17"'
+  - '10.64.48.96:6379:1 "shard18"'
+
 #
 # Ganglia
 #
diff --git a/manifests/role/mediawiki.pp b/manifests/role/mediawiki.pp
index a43441e..806821e 100644
--- a/manifests/role/mediawiki.pp
+++ b/manifests/role/mediawiki.pp
@@ -18,7 +18,7 @@
 include ::tmpreaper
 
 $nutcracker_pools = {
-'memcached' => {
+'memcached' => {
 auto_eject_hosts => true,
 distribution => 'ketama',
 hash => 'md5',
@@ -29,7 +29,7 @@
 timeout  => 250,
 servers  => hiera('mediawiki_memcached_servers'),
 },
-'mc-unix' => {
+'mc-unix'   => {
 auto_eject_hosts => true,
 distribution => 'ketama',
 hash => 'md5',
@@ -40,6 +40,18 @@
 timeout  => 250,
 servers  => hiera('mediawiki_memcached_servers'),
 },
+'session-redis' => {
+auto_eject_hosts => true,
+distribution => 'ketama',
+redis=> true,
+hash => 'md5',
+listen   => '/var/run/nutcracker/session_redis.sock 
0666',
+preconnect   => true,
+server_connections   => 2,
+server_failure_limit => 3,
+timeout  => 250,
+serve

[MediaWiki-commits] [Gerrit] Publish: Enable the publish button after a publish fail to r... - change (mediawiki...ContentTranslation)

2015-07-27 Thread Santhosh (Code Review)
Santhosh has uploaded a new change for review.

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

Change subject: Publish: Enable the publish button after a publish fail to retry
..

Publish: Enable the publish button after a publish fail to retry

When publishing error happens, the publish button is disabled.
This behavior is not correct since the error message says:
"Publishing failed, please retry". To retry publishing, the button
should be enabled.

Change-Id: I54aa727872620ccc1774b981fc64503509efd171
---
M modules/publish/ext.cx.publish.js
1 file changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/modules/publish/ext.cx.publish.js 
b/modules/publish/ext.cx.publish.js
index e8305bd..e85f3e2 100644
--- a/modules/publish/ext.cx.publish.js
+++ b/modules/publish/ext.cx.publish.js
@@ -70,8 +70,6 @@
self.onFail( 'cxpublish', response.cxpublish );
} ).fail( function ( code, details ) {
self.onFail( code, details );
-   } ).always( function () {
-   self.$trigger.prop( 'disabled', true ).text( 
mw.msg( 'cx-publish-button' ) );
} );
} );
};
@@ -307,6 +305,8 @@
 
mw.hook( 'mw.cx.error' ).fire( mw.msg( 'cx-publish-page-error' 
) );
mw.log( '[CX] Error while publishing:', code, trace );
+   // Enable the publish button for retry
+   this.$trigger.prop( 'disabled', false ).text( mw.msg( 
'cx-publish-button' ) );
};
 
/**

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

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

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


[MediaWiki-commits] [Gerrit] tlsproxy: refactor/cleanup, beta work - change (operations/puppet)

2015-07-27 Thread BBlack (Code Review)
BBlack has uploaded a new change for review.

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

Change subject: tlsproxy: refactor/cleanup, beta work
..

tlsproxy: refactor/cleanup, beta work

For production, this mostly eliminates some pointless intermediary
classes like role::cache::ssl::local and unifies the configuration
of the "unified" cert a bit more between clusters (including new
monitoring for some).

All of the betassl hacks are removed completely, and the SSL
related beta conditionals are now reduced to just one small block
in role::cache::ssl::unified.  This will currently break on beta,
but the previous config was also broken in beta, so no change
there.  I'd rather target convergence than divergence when we
start fixing that on the beta instances, and this change brings
them into much closer (if not perfect) alignment.

Bug: T97593
Change-Id: I83d36b5db01becbd5cd42edbf630621549becf24
---
D manifests/role/tlsproxy.pp
M modules/role/manifests/cache/bits.pp
M modules/role/manifests/cache/mobile.pp
M modules/role/manifests/cache/parsoid.pp
D modules/role/manifests/cache/ssl/local.pp
M modules/role/manifests/cache/ssl/misc.pp
D modules/role/manifests/cache/ssl/parsoid.pp
M modules/role/manifests/cache/ssl/unified.pp
M modules/role/manifests/cache/text.pp
M modules/role/manifests/cache/upload.pp
D modules/tlsproxy/manifests/betassl.pp
M modules/tlsproxy/manifests/localssl.pp
D modules/tlsproxy/templates/betassl.erb
M nodes/labs/staging.yaml
14 files changed, 37 insertions(+), 238 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/04/227404/1

diff --git a/manifests/role/tlsproxy.pp b/manifests/role/tlsproxy.pp
deleted file mode 100644
index 1b6433d..000
--- a/manifests/role/tlsproxy.pp
+++ /dev/null
@@ -1,51 +0,0 @@
-# vim:sw=4:ts=4:et:
-
-# Wikimedia roles for HTTPS proxies
-#
-# In production, requests made on port 443 are redirected by the LVS frontends
-# to a pool of Nginx proxies.  They are terminating the SSL connection and
-# reinject the request as HTTP.
-#
-# The beta cluster also supports HTTPS though in a slightly different setup
-# since labs is lacking LVS support.  Instead the requests on port 443 are
-# handled on each of the caches which have a local nginx proxy terminating
-# the SSL connection and reinject the request on the instance IP address.
-
-# Because beta does not have a frontend LVS to redirect the requests
-# made to port 443, we have to setup a nginx proxy on each of the caches.
-# Nginx will listen on the real instance IP, proxy_addresses are not needed.
-#
-class role::tlsproxy::ssl::beta {
-
-system::role { 'role::tlsproxy::ssl:beta': description => 'SSL proxy on 
beta' }
-
-include standard
-
-sslcert::certificate { 'star.wmflabs.org': skip_private => true }
-
-# tlsproxy::instance parameters common to any beta instance
-$defaults = {
-proxy_server_cert_name => 'star.wmflabs.org',
-proxy_backend => {
-# send all traffic to the local cache
-'eqiad' => { 'primary' => '127.0.0.1' }
-},
-}
-
-$instances = {
-'bits'=> { proxy_server_name => 'bits.beta.wmflabs.org' },
-'wikidata'=> { proxy_server_name => 'wikidata.beta.wmflabs.org' },
-'wikimedia'   => { proxy_server_name => '*.wikimedia.beta.wmflabs.org' 
},
-
-'wikibooks'   => { proxy_server_name => '*.wikibooks.beta.wmflabs.org' 
},
-'wikinews'=> { proxy_server_name => '*.wikinews.beta.wmflabs.org' 
},
-'wikipedia'   => { proxy_server_name => '*.wikipedia.beta.wmflabs.org' 
},
-'wikiquote'   => { proxy_server_name => '*.wikiquote.beta.wmflabs.org' 
},
-'wikisource'  => { proxy_server_name => 
'*.wikisource.beta.wmflabs.org' },
-'wikiversity' => { proxy_server_name => 
'*.wikiversity.beta.wmflabs.org' },
-'wikivoyage'  => { proxy_server_name => 
'*.wikivoyage.beta.wmflabs.org' },
-'wiktionary'  => { proxy_server_name => 
'*.wiktionary.beta.wmflabs.org' },
-}
-
-create_resources( tlsproxy::betassl, $instances, $defaults )
-}
diff --git a/modules/role/manifests/cache/bits.pp 
b/modules/role/manifests/cache/bits.pp
index 86632a0..50ad7a7 100644
--- a/modules/role/manifests/cache/bits.pp
+++ b/modules/role/manifests/cache/bits.pp
@@ -12,9 +12,7 @@
 realserver_ips => $lvs::configuration::service_ips['bits'][$::site],
 }
 
-if $::realm == 'production' {
-include role::cache::ssl::unified
-}
+include role::cache::ssl::unified
 
 $cluster_options = {
 'test_hostname'  => 'test.wikipedia.org',
diff --git a/modules/role/manifests/cache/mobile.pp 
b/modules/role/manifests/cache/mobile.pp
index eda4858..9b9b00c 100644
--- a/modules/role/manifests/cache/mobile.pp
+++ b/modules/role/manifests/cache/mobile.pp
@@ -19,9 +19,7 @@
 # 1/8 of total mem
 $memory_storage_size = ceiling(0.125 * $::mem

[MediaWiki-commits] [Gerrit] Enhance /list api - change (mediawiki...cxserver)

2015-07-27 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Enhance /list api
..


Enhance /list api

/list/mt: List all language pairs with mt support, grouped by provider
/list/dictionary: List all language pairs with dictionary support, grouped by 
provider

Already existing:
/list/mt/en/es: List provider for machine translation between en and es
/list/dictionary/en/es: List provider for dictionary between en and es

Also unbreak the health check page that was introduced with a config file
change in 78d5bbe1d2df8ebc5c1e52a02b43c87eb5cdab36.

Bug: T93376
Change-Id: Ic5198966b3e70afa6342fedc2db27df2d0f4fdd4
---
M public/translation/js/main.js
M registry/index.js
M routes/v1.js
3 files changed, 43 insertions(+), 19 deletions(-)

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



diff --git a/public/translation/js/main.js b/public/translation/js/main.js
index 9adaa50..3f415d5 100644
--- a/public/translation/js/main.js
+++ b/public/translation/js/main.js
@@ -113,20 +113,24 @@
 
function healthcheck() {
$( 'table.mthealth' ).empty();
-   $.get( '/languagepairs', function ( response ) {
-   $.each( response, function ( source, targets ) {
-   var $tr, sourceLanguage, targetLanguage, i;
-   for ( i = 0; i < targets.length; i++ ) {
-   sourceLanguage = source;
-   targetLanguage = targets[ i ];
-   $tr = $( '' ).append(
-   $( '' ).text( 
sourceLanguage ),
-   $( '' ).text( 
targetLanguage ),
-   $( '' ).attr( 'id', 
sourceLanguage + '-' + targetLanguage ).text( 'CHECKING' ).addClass( 'status' )
-   );
-   $( 'table.mthealth' ).append( $tr );
-   check( sourceLanguage, targetLanguage );
-   }
+   $.get( '/list/mt', function ( response ) {
+   $.each( response, function ( provider, pairs ) {
+   $.each( pairs, function ( source, targets ) {
+   var $tr, sourceLanguage, 
targetLanguage, i;
+   if ( $.isArray( targets ) ) {
+   for ( i = 0; i < 
targets.length; i++ ) {
+   sourceLanguage = source;
+   targetLanguage = 
targets[i];
+   $tr = $( '' 
).append(
+   $( '' 
).text( sourceLanguage ),
+   $( '' 
).text( targetLanguage ),
+   $( '' 
).attr( 'id', sourceLanguage + '-' + targetLanguage ).text( 'CHECKING' 
).addClass( 'status' )
+   );
+   $( 'table.mthealth' 
).append( $tr );
+   check( sourceLanguage, 
targetLanguage );
+   }
+   }
+   } );
} );
} );
}
diff --git a/registry/index.js b/registry/index.js
index 985ef4f..99e1a3e 100644
--- a/registry/index.js
+++ b/registry/index.js
@@ -13,6 +13,14 @@
};
 }
 
+function getMTPairs() {
+   return registry.mt;
+}
+
+function getDictionaryPairs() {
+   return registry.dictionary;
+}
+
 /**
  * Get the available toolset for the given language pair
  * @param {string} from source language
@@ -83,6 +91,8 @@
 
 module.exports = {
getLanguagePairs: getLanguagePairs,
+   getMTPairs: getMTPairs,
+   getDictionaryPairs: getDictionaryPairs,
getToolSet: getToolSet,
getValidProvider: getValidProvider
 };
diff --git a/routes/v1.js b/routes/v1.js
index f782c7b..bc68df8 100644
--- a/routes/v1.js
+++ b/routes/v1.js
@@ -166,21 +166,31 @@
);
 } );
 
-app.get( '/list/:tool/:from/:to', function ( req, res ) {
-   var result = {},
+app.get( '/list/:tool/:from?/:to?', function ( req, res ) {
+   var toolset, result = {},
tool = req.params.tool,
from = req.params.from,
-   to = req.params.to,
-   toolset = registry.getToolSet( from, to );
+   to = req.params.to;
 
-   if ( toolset[ tool ] ) {
+   i

[MediaWiki-commits] [Gerrit] WIP: Add helpful 'should' require for running test standalone. - change (mediawiki...parsoid)

2015-07-27 Thread Cscott (Code Review)
Cscott has uploaded a new change for review.

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

Change subject: WIP: Add helpful 'should' require for running test standalone.
..

WIP: Add helpful 'should' require for running test standalone.

Change-Id: Ia1ea605153facf49e5fcba7aaf3ae77428c687e6
---
M tests/mocha/jsapi.js
1 file changed, 1 insertion(+), 0 deletions(-)


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

diff --git a/tests/mocha/jsapi.js b/tests/mocha/jsapi.js
index f78c312..723fd99 100644
--- a/tests/mocha/jsapi.js
+++ b/tests/mocha/jsapi.js
@@ -3,6 +3,7 @@
 "use strict";
 
 var Parsoid = require('../../');
+var should = require('chai').should();
 
 describe('Parsoid JS API', function() {
it('converts simple wikitext to HTML', function() {

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

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

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


[MediaWiki-commits] [Gerrit] set dynamic_directors to false for labs - change (operations/puppet)

2015-07-27 Thread BBlack (Code Review)
BBlack has submitted this change and it was merged.

Change subject: set dynamic_directors to false for labs
..


set dynamic_directors to false for labs

This probably unbreaks labs caches from the default=true switch in
0ea5ca804d57b44e7491b010efb831a935e68e4e

Bug: T106662
Change-Id: Ie535133de50e7591ff02c74909c1f968c92ff658
---
M hieradata/labs.yaml
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/hieradata/labs.yaml b/hieradata/labs.yaml
index ada1c38..edc5768 100644
--- a/hieradata/labs.yaml
+++ b/hieradata/labs.yaml
@@ -44,6 +44,7 @@
 role::cache::bits::top_domain: 'beta.wmflabs.org'
 role::cache::mobile::zero_site: 'http://zero.wikimedia.beta.wmflabs.org'
 role::cache::text::static_host: 'deployment.wikimedia.beta.wmflabs.org'
+varnish::dynamic_directors: false
 zookeeper_hosts:
   "${::fqdn}": 1
 nrpe::allowed_hosts: '10.68.16.195'

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

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

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


[MediaWiki-commits] [Gerrit] set dynamic_directors to false for labs - change (operations/puppet)

2015-07-27 Thread BBlack (Code Review)
BBlack has uploaded a new change for review.

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

Change subject: set dynamic_directors to false for labs
..

set dynamic_directors to false for labs

This probably unbreaks labs caches from the default=true switch in
0ea5ca804d57b44e7491b010efb831a935e68e4e

Bug: T106662
Change-Id: Ie535133de50e7591ff02c74909c1f968c92ff658
---
M hieradata/labs.yaml
1 file changed, 1 insertion(+), 0 deletions(-)


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

diff --git a/hieradata/labs.yaml b/hieradata/labs.yaml
index ada1c38..edc5768 100644
--- a/hieradata/labs.yaml
+++ b/hieradata/labs.yaml
@@ -44,6 +44,7 @@
 role::cache::bits::top_domain: 'beta.wmflabs.org'
 role::cache::mobile::zero_site: 'http://zero.wikimedia.beta.wmflabs.org'
 role::cache::text::static_host: 'deployment.wikimedia.beta.wmflabs.org'
+varnish::dynamic_directors: false
 zookeeper_hosts:
   "${::fqdn}": 1
 nrpe::allowed_hosts: '10.68.16.195'

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

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

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


[MediaWiki-commits] [Gerrit] convert to skin.json registration - change (mediawiki...Blueprint)

2015-07-27 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: convert to skin.json registration
..


convert to skin.json registration

Change-Id: I63a8f069e816a3aff2dd1ca714cd7b3481ffcd5e
---
M Blueprint.php
A BlueprintHooks.php
A COPYING
D autoload.php
A skin.json
5 files changed, 97 insertions(+), 91 deletions(-)

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



diff --git a/Blueprint.php b/Blueprint.php
index bb29502..d37cf22 100644
--- a/Blueprint.php
+++ b/Blueprint.php
@@ -1,85 +1,14 @@
 https://www.mediawiki.org/wiki/Extension_registration for 
more details.'
+   ); */
+   return true;
+} else {
+   die( 'This version of the Blueprint skin requires MediaWiki 1.25+' );
 }
-
-// Extension credits that will show up on Special:Version
-$wgExtensionCredits['skin'][] = array(
-   'path' => __FILE__,
-   'name' => 'Blueprint',
-   'url' => 'http://gerrit.wikimedia.org/r/p/mediawiki/skins/Blueprint',
-   'author' => array(
-   'Andrew Garrett',
-   'Prateek Saxena',
-   ),
-);
-
-$styleguideSkinResourceTemplate = array(
-   'localBasePath' => __DIR__ . "/resources",
-   'remoteSkinPath' => 'Blueprint/resources',
-   'group' => 'skin.blueprint',
-);
-
-$wgResourceModules += array(
-   'ext.bootstrap' => array(
-   'localBasePath' => __DIR__ . "/lib/bootstrap",
-   'remoteSkinPath' => 'Blueprint/lib/bootstrap',
-   'group' => 'skin.blueprint',
-   'scripts' => 'bootstrap.min.js',
-   'styles' => 'bootstrap.min.css',
-   ),
-   'skin.blueprint' => array(
-   'styles' => 'master.less',
-   'scripts' => array(
-   'menu.js',
-   'toc.js',
-   ),
-   'dependencies' => 'ext.bootstrap',
-   'position' => 'top',
-   ) + $styleguideSkinResourceTemplate,
-);
-
-$wgResourceModuleSkinStyles['blueprint'] = array(
-   // Apply original Tipsy styles
-   'jquery.tipsy' => array(
-   'tipsy.original.less',
-   'tipsy.override.less',
-   ),
-   'remoteSkinPath' => 'Blueprint/skinStyles',
-   'localBasePath' => __DIR__ . '/skinStyles',
-);
-
-require_once __DIR__."/autoload.php";
-require_once __DIR__."/vendor/autoload.php";
-
-$wgValidSkinNames['blueprint'] = 'Blueprint';
-
-$wgMessagesDirs['OOUIPlayground'] = __DIR__ . '/i18n';
diff --git a/BlueprintHooks.php b/BlueprintHooks.php
new file mode 100644
index 000..fe79ae1
--- /dev/null
+++ b/BlueprintHooks.php
@@ -0,0 +1,11 @@
+ 
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
\ No newline at end of file
diff --git a/autoload.php b/autoload.php
deleted file mode 100644
index 245c206..000
--- a/autoload.php
+++ /dev/null
@@ -1,9 +0,0 @@
- __DIR__ . '/src/BlueprintSkinTemplate.php',
-   'SkinBlueprint' => __DIR__ . '/src/SkinBlueprint.php',
-);
diff --git a/skin.json b/skin.json
new file mode 100644
index 000..9421af5
--- /dev/null
+++ b/skin.json
@@ -0,0 +1,54 @@
+{
+   "name": "Blueprint",
+   "author": [
+   "Andrew Garrett",
+   "Prateek Saxena"
+   ],
+   "url": "https://gerrit.wikimedia.org/r/p/mediawiki/skins/Blueprint";,
+   "type": "skin",
+   "license-name": "MIT",
+   "callback": "BlueprintHooks::registerExtension",
+   "ValidSkinNames": {
+   "blueprint": "Blueprint"
+   },
+   "MessagesDirs": {
+   "Blueprint": [
+   "i18n"
+   ]
+   },
+   "AutoloadClasses": {
+   "BlueprintHooks": "BlueprintHooks.php",
+   "SkinBlueprint": "src/SkinBlueprint.php",
+   "BlueprintSkinTemplate": "src/BlueprintSkinTemplate.php"
+   },
+   "ResourceModules": {
+   "ext.bootstrap": {
+   "group": "s

[MediaWiki-commits] [Gerrit] resourceloader: Add must-revalidate to Cache-Control - change (mediawiki/core)

2015-07-27 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: resourceloader: Add must-revalidate to Cache-Control
..


resourceloader: Add must-revalidate to Cache-Control

Bug: T105255
Change-Id: Ifdd32560335dee3bdd3a2844c8169e5b963b18c5
---
M includes/resourceloader/ResourceLoader.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/includes/resourceloader/ResourceLoader.php 
b/includes/resourceloader/ResourceLoader.php
index 508be2f..bf34c22 100644
--- a/includes/resourceloader/ResourceLoader.php
+++ b/includes/resourceloader/ResourceLoader.php
@@ -810,7 +810,7 @@
header( 'Cache-Control: private, no-cache, 
must-revalidate' );
header( 'Pragma: no-cache' );
} else {
-   header( "Cache-Control: public, max-age=$maxage, 
s-maxage=$smaxage" );
+   header( "Cache-Control: public, must-revalidate, 
max-age=$maxage, s-maxage=$smaxage" );
$exp = min( $maxage, $smaxage );
header( 'Expires: ' . wfTimestamp( TS_RFC2822, $exp + 
time() ) );
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ifdd32560335dee3bdd3a2844c8169e5b963b18c5
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Catrope 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Fix unique-users query - change (analytics/limn-flow-data)

2015-07-27 Thread Catrope (Code Review)
Catrope has uploaded a new change for review.

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

Change subject: Fix unique-users query
..

Fix unique-users query

The way it was using GROUP BY was breaking things somehow.
This may have been related to rev_user_ip being NULL for
logged-in users, or maybe GROUP BY is just weird.

COUNT(DISTINCT rev_user_id, rev_user_ip, rev_user_wiki) also doesn't
work because that drops any row where any of those fields is NULL;
but COALESCE()ing the nullable field fixes that.

Bonus: Renamed fields to readable names, and fixed
weekstart value to be the actual day the week starts (Sunday),
rather than the day before (Saturday) which isn't even part of
the week in question!

Bug: T106564
Change-Id: I3d08c7d6b7367103aacf1c906ebe62da9dc99759
---
M flow/unique-users.sql
1 file changed, 11 insertions(+), 12 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/analytics/limn-flow-data 
refs/changes/98/227398/1

diff --git a/flow/unique-users.sql b/flow/unique-users.sql
index 4b933fa..e5ebef7 100644
--- a/flow/unique-users.sql
+++ b/flow/unique-users.sql
@@ -1,12 +1,11 @@
-SELECT weekstart,
-   SUM(user) as unique_users
-  FROM (
-SELECT 1 as user,
-   
DATE(DATE_SUB(FROM_UNIXTIME((conv(substring(hex(rev_id),1,12),16,10)>>2)/1000), 
interval DAYOFWEEK( 
FROM_UNIXTIME((conv(substring(hex(rev_id),1,12),16,10)>>2)/1000)) day)) as 
weekstart
-  FROM flow_revision
- WHERE rev_user_wiki NOT IN ( 'testwiki', 'test2wiki' )
- GROUP BY rev_user_wiki, rev_user_id, rev_user_ip
-   ) x
- WHERE weekstart < DATE_SUB(CURDATE(), interval DAYOFWEEK(NOW()) day)
- GROUP BY weekstart;
-
+SELECT
+   DATE_SUB(d, interval DAYOFWEEK(d)-1 day) AS Week,
+   COUNT(DISTINCT rev_user_id, COALESCE(rev_user_ip, ''), rev_user_wiki) 
AS "Unique users"
+FROM (
+   SELECT 
DATE(FROM_UNIXTIME((conv(substring(hex(rev_id),1,12),16,10)>>2)/1000)) AS d, 
rev_user_id, rev_user_ip, rev_user_wiki
+   FROM flow_revision
+   WHERE rev_user_wiki NOT IN ('testwiki', 'test2wiki')
+) AS x
+GROUP BY Week
+HAVING Week < DATE_SUB(CURDATE(), interval DAYOFWEEK(NOW())-1 day)
+ORDER BY Week;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3d08c7d6b7367103aacf1c906ebe62da9dc99759
Gerrit-PatchSet: 1
Gerrit-Project: analytics/limn-flow-data
Gerrit-Branch: master
Gerrit-Owner: Catrope 

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


[MediaWiki-commits] [Gerrit] Put unique-users on top, and add top-reply-link back in - change (analytics/limn-flow-data)

2015-07-27 Thread Catrope (Code Review)
Catrope has uploaded a new change for review.

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

Change subject: Put unique-users on top, and add top-reply-link back in
..

Put unique-users on top, and add top-reply-link back in

Change-Id: I2b7112cd024aef89c636e107e184e0531b939b65
---
M dashboards/reportcard.json
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/analytics/limn-flow-data 
refs/changes/01/227401/1

diff --git a/dashboards/reportcard.json b/dashboards/reportcard.json
index c621388..54cab54 100644
--- a/dashboards/reportcard.json
+++ b/dashboards/reportcard.json
@@ -6,11 +6,12 @@
 {
 "name": "Usage data",
 "graph_ids": [
+
"http://datasets.wikimedia.org/limn-public-data/flow/datafiles/unique-users.csv";,
 
"http://datasets.wikimedia.org/limn-public-data/flow/datafiles/active-boards.csv";,
 
"http://datasets.wikimedia.org/limn-public-data/flow/datafiles/active-topics.csv";,
 
"http://datasets.wikimedia.org/limn-public-data/flow/datafiles/messages-posted.csv";,
 
"http://datasets.wikimedia.org/limn-public-data/flow/datafiles/moderation-actions.csv";,
-
"http://datasets.wikimedia.org/limn-public-data/flow/datafiles/unique-users.csv";
+
"http://datasets.wikimedia.org/limn-public-data/flow/datafiles/top-reply-link.csv";
 ]
 }
 ]

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2b7112cd024aef89c636e107e184e0531b939b65
Gerrit-PatchSet: 1
Gerrit-Project: analytics/limn-flow-data
Gerrit-Branch: master
Gerrit-Owner: Catrope 

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


[MediaWiki-commits] [Gerrit] Correct weekstart computation in the remaining queries - change (analytics/limn-flow-data)

2015-07-27 Thread Catrope (Code Review)
Catrope has uploaded a new change for review.

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

Change subject: Correct weekstart computation in the remaining queries
..

Correct weekstart computation in the remaining queries

Change-Id: If708233ea096f13b79bc44ed860533ccd9cc80a7
---
M flow/active-boards.sql
M flow/active-topics.sql
2 files changed, 4 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/analytics/limn-flow-data 
refs/changes/00/227400/1

diff --git a/flow/active-boards.sql b/flow/active-boards.sql
index f4efe81..0d9d83a 100644
--- a/flow/active-boards.sql
+++ b/flow/active-boards.sql
@@ -3,7 +3,7 @@
   FROM flow_workflow
   JOIN (
 SELECT a.tree_ancestor_id,
-   
DATE(DATE_SUB(FROM_UNIXTIME((conv(substring(hex(a.tree_descendant_id),1,12),16,10)>>2)/1000),
 interval DAYOFWEEK( 
FROM_UNIXTIME((conv(substring(hex(a.tree_descendant_id),1,12),16,10)>>2)/1000)) 
day)) as weekstart
+   
DATE(DATE_SUB(FROM_UNIXTIME((conv(substring(hex(a.tree_descendant_id),1,12),16,10)>>2)/1000),
 interval DAYOFWEEK( 
FROM_UNIXTIME((conv(substring(hex(a.tree_descendant_id),1,12),16,10)>>2)/1000))-1
 day)) as weekstart
   FROM flow_tree_node a
   JOIN (
 SELECT b.tree_descendant_id, MAX(b.tree_depth) as max
@@ -12,5 +12,5 @@
) y ON y.max = a.tree_depth AND y.tree_descendant_id = 
a.tree_descendant_id
) z ON z.tree_ancestor_id = workflow_id
  WHERE workflow_wiki NOT IN ( 'testwiki', 'test2wiki' )
- AND weekstart < DATE_SUB(CURDATE(), interval DAYOFWEEK(NOW()) day)
+ AND weekstart < DATE_SUB(CURDATE(), interval DAYOFWEEK(NOW())-1 day)
  GROUP BY z.weekstart;
diff --git a/flow/active-topics.sql b/flow/active-topics.sql
index e1c8887..3fdc365 100644
--- a/flow/active-topics.sql
+++ b/flow/active-topics.sql
@@ -2,7 +2,7 @@
   FROM flow_workflow
   JOIN (
 SELECT a.tree_ancestor_id,
-   
DATE(DATE_SUB(FROM_UNIXTIME((conv(substring(hex(a.tree_descendant_id),1,12),16,10)>>2)/1000),
 interval DAYOFWEEK( 
FROM_UNIXTIME((conv(substring(hex(a.tree_descendant_id),1,12),16,10)>>2)/1000)) 
day)) as weekstart
+   
DATE(DATE_SUB(FROM_UNIXTIME((conv(substring(hex(a.tree_descendant_id),1,12),16,10)>>2)/1000),
 interval DAYOFWEEK( 
FROM_UNIXTIME((conv(substring(hex(a.tree_descendant_id),1,12),16,10)>>2)/1000))-1
 day)) as weekstart
   FROM flow_tree_node a
   JOIN (
 SELECT b.tree_descendant_id, MAX(b.tree_depth) as max
@@ -11,5 +11,5 @@
) y ON y.max = a.tree_depth AND y.tree_descendant_id = 
a.tree_descendant_id
) z ON z.tree_ancestor_id = workflow_id
  WHERE workflow_wiki NOT IN ( 'testwiki', 'test2wiki' )
- AND weekstart < DATE_SUB(CURDATE(), interval DAYOFWEEK(NOW()) day)
+ AND weekstart < DATE_SUB(CURDATE(), interval DAYOFWEEK(NOW())-1 day)
  GROUP BY z.weekstart;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If708233ea096f13b79bc44ed860533ccd9cc80a7
Gerrit-PatchSet: 1
Gerrit-Project: analytics/limn-flow-data
Gerrit-Branch: master
Gerrit-Owner: Catrope 

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


[MediaWiki-commits] [Gerrit] Clean up the messages-posted and moderation-actions queries - change (analytics/limn-flow-data)

2015-07-27 Thread Catrope (Code Review)
Catrope has uploaded a new change for review.

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

Change subject: Clean up the messages-posted and moderation-actions queries
..

Clean up the messages-posted and moderation-actions queries

* Compute the week in two steps
* Human-readable column names
* Correct weekstart computation

Change-Id: I7f08359228477acd70d16e16b53ab6e48257f151
---
M flow/messages-posted.sql
M flow/moderation-actions.sql
2 files changed, 28 insertions(+), 25 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/analytics/limn-flow-data 
refs/changes/99/227399/1

diff --git a/flow/messages-posted.sql b/flow/messages-posted.sql
index 89e1611..fa0c7d9 100644
--- a/flow/messages-posted.sql
+++ b/flow/messages-posted.sql
@@ -1,7 +1,12 @@
-SELECT 
DATE(DATE_SUB(FROM_UNIXTIME((conv(substring(hex(rev_id),1,12),16,10)>>2)/1000), 
interval DAYOFWEEK( 
FROM_UNIXTIME((conv(substring(hex(rev_id),1,12),16,10)>>2)/1000)) day)) as 
weekstart,
-   count( rev_id ) as num_replies
-  FROM flow_revision
- WHERE rev_change_type = 'reply'
-   AND rev_user_wiki NOT IN ( 'testwiki', 'test2wiki' )
- GROUP BY weekstart
- HAVING weekstart < DATE_SUB(CURDATE(), interval DAYOFWEEK(NOW()) day);
+SELECT
+   DATE_SUB(d, interval DAYOFWEEK(d)-1 day) AS Week,
+   COUNT(*) AS Replies
+FROM (
+   SELECT 
DATE(FROM_UNIXTIME((conv(substring(hex(rev_id),1,12),16,10)>>2)/1000)) AS d
+   FROM flow_revision
+   WHERE rev_change_type = 'reply'
+   AND rev_user_wiki NOT IN ('testwiki', 'test2wiki')
+) x
+GROUP BY Week
+HAVING Week < DATE_SUB(CURDATE(), interval DAYOFWEEK(NOW())-1 day)
+ORDER BY Week;
diff --git a/flow/moderation-actions.sql b/flow/moderation-actions.sql
index 7e92d88..b25ccbe 100644
--- a/flow/moderation-actions.sql
+++ b/flow/moderation-actions.sql
@@ -1,18 +1,16 @@
- select weekstart as Date,
-sum(if(rev_change_type = 'restore-post', 1, 0)) as "Restore Post",
-sum(if(rev_change_type = 'hide-post', 1, 0)) as "Hide Post",
-sum(if(rev_change_type = 'delete-post', 1, 0)) as "Delete Post",
-sum(if(rev_change_type = 'restore-topic', 1, 0)) as "Restore Topic",
-sum(if(rev_change_type = 'hide-topic', 1, 0)) as "Hide Topic",
-sum(if(rev_change_type = 'delete-topic', 1, 0)) as "Delete Topic"
-
-   from (select 
DATE(DATE_SUB(FROM_UNIXTIME((conv(substring(hex(rev_id),1,12),16,10)>>2)/1000), 
interval DAYOFWEEK( 
FROM_UNIXTIME((conv(substring(hex(rev_id),1,12),16,10)>>2)/1000)) day)) as 
weekstart,
-rev_change_type
-   from flow_revision
-  where rev_user_wiki not in ('testwiki', 'test2wiki')
-) change_type_by_week
-
-  where weekstart > DATE_SUB(CURDATE(), INTERVAL 12 WEEK)
-  and weekstart < DATE_SUB(CURDATE(), interval DAYOFWEEK(NOW()) day)
-  group by weekstart
-  order by weekstart
+SELECT
+   DATE_SUB(d, interval DAYOFWEEK(d)-1 day) AS Week,
+   SUM(IF(rev_change_type = 'restore-post', 1, 0)) AS "Restore Post",
+   SUM(IF(rev_change_type = 'hide-post', 1, 0)) AS "Hide Post",
+   SUM(IF(rev_change_type = 'delete-post', 1, 0)) AS "Delete Post",
+   SUM(IF(rev_change_type = 'restore-topic', 1, 0)) AS "Restore Topic",
+   SUM(IF(rev_change_type = 'hide-topic', 1, 0)) AS "Hide Topic",
+   SUM(IF(rev_change_type = 'delete-topic', 1, 0)) AS "Delete Topic"
+FROM (
+   SELECT 
DATE(FROM_UNIXTIME((conv(substring(hex(rev_id),1,12),16,10)>>2)/1000)) AS d, 
rev_change_type
+   FROM flow_revision
+   WHERE rev_user_wiki NOT IN ('testwiki', 'test2wiki')
+) AS x
+GROUP BY Week
+HAVING Week < DATE_SUB(CURDATE(), interval DAYOFWEEK(NOW())-1 day)
+ORDER BY Week;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7f08359228477acd70d16e16b53ab6e48257f151
Gerrit-PatchSet: 1
Gerrit-Project: analytics/limn-flow-data
Gerrit-Branch: master
Gerrit-Owner: Catrope 

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


[MediaWiki-commits] [Gerrit] Upgrade to jscs 2.0 - change (mediawiki...Wikibase)

2015-07-27 Thread JanZerebecki (Code Review)
JanZerebecki has uploaded a new change for review.

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

Change subject: Upgrade to jscs 2.0
..

Upgrade to jscs 2.0

Disable some rules that we don't yet follow.
Ignore extensions directory that may be there from composer.

Bug: T107124
Change-Id: I40763f23ad907bb5dbe496fad370d22df0d091be
---
M .jscsrc
M package.json
2 files changed, 18 insertions(+), 4 deletions(-)


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

diff --git a/.jscsrc b/.jscsrc
index f66f6bd..312c030 100644
--- a/.jscsrc
+++ b/.jscsrc
@@ -3,12 +3,26 @@
"preset": "wikimedia",
 
// 
-   // Rules from wikimedia preset we don't follow
+   // Rules from wikimedia preset we don't yet? follow
 
"validateIndentation": null,
"requireMultipleVarDecl": null,
"disallowDanglingUnderscores": null,
-   "requireSpacesInsideArrayBrackets": null,
+   "requireSpacesInsideBrackets": null,
+   "requireVarDeclFirst": null,
+   "jsDoc": {
+   // what we don't yet follow is commented out
+   //"checkAnnotations": "jsduck5",
+   //"checkParamNames": true,
+   "requireParamTypes": true,
+   "checkRedundantParams": true,
+   //"checkReturnTypes": true,
+   "checkRedundantReturns": true,
+   //"requireReturnTypes": true,
+   //"checkTypes": "capitalizedNativeCase",
+   "checkRedundantAccess": true
+   //"requireNewlineAfterDescription": true
+   },
 
// 
// Own rules
@@ -24,5 +38,5 @@
"else"
],
 
-   "excludeFiles": [ "node_modules/**", "vendor/**" ]
+   "excludeFiles": [ "node_modules/**", "vendor/**", "extensions/**" ]
 }
diff --git a/package.json b/package.json
index 9fa2adb..43022cd 100644
--- a/package.json
+++ b/package.json
@@ -11,7 +11,7 @@
"author": "The Wikidata team",
"license": "GPL-2.0+",
"devDependencies": {
-   "jscs": "~1.13.1",
+   "jscs": ">=2.0",
"jshint": ""
}
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I40763f23ad907bb5dbe496fad370d22df0d091be
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: JanZerebecki 

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


[MediaWiki-commits] [Gerrit] Improve getentities language fallback test coverage - change (mediawiki...Wikibase)

2015-07-27 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Improve getentities language fallback test coverage
..


Improve getentities language fallback test coverage

Change-Id: I04833d2ba64f49d471ae55ab9ab77f3811a799ce
---
M repo/tests/phpunit/includes/api/GetEntitiesTest.php
M repo/tests/phpunit/includes/api/ResultBuilderTest.php
2 files changed, 180 insertions(+), 1 deletion(-)

Approvals:
  Jonas Kress (WMDE): Looks good to me, but someone else must approve
  JanZerebecki: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/repo/tests/phpunit/includes/api/GetEntitiesTest.php 
b/repo/tests/phpunit/includes/api/GetEntitiesTest.php
index 9cfbd12..37ec89b 100644
--- a/repo/tests/phpunit/includes/api/GetEntitiesTest.php
+++ b/repo/tests/phpunit/includes/api/GetEntitiesTest.php
@@ -514,6 +514,46 @@
 
),
),
+   array(
+   'Oslo',
+   array( 'sli', 'de-formal', 'kn', 'nb' ),
+   array(
+   'sli' => array(
+   'language' => 'de',
+   'value' => 'Oslo',
+   ),
+   'de-formal' => array(
+   'language' => 'de',
+   'value' => 'Oslo',
+   ),
+   'kn' => array(
+   'language' => 'en',
+   'value' => 'Oslo',
+   ),
+   'nb' => array(
+   'language' => 'nb',
+   'value' => 'Oslo',
+   ),
+   ),
+   array(
+   'sli' => array(
+   'language' => 'de',
+   'value' => 'Hauptstadt der 
Norwegen.',
+   ),
+   'de-formal' => array(
+   'language' => 'de',
+   'value' => 'Hauptstadt der 
Norwegen.',
+   ),
+   'kn' => array(
+   'language' => 'en',
+   'value' => 'Capital city in 
Norway.',
+   ),
+   'nb' => array(
+   'language' => 'nb',
+   'value' => 'Hovedsted i Norge.',
+   ),
+   ),
+   ),
);
}
 
@@ -528,7 +568,6 @@
'action' => 'wbgetentities',
'languages' => join( '|', $languages ),
'languagefallback' => '',
-   'format' => 'json', // make sure IDs are used 
as keys
'ids' => $id,
)
);
diff --git a/repo/tests/phpunit/includes/api/ResultBuilderTest.php 
b/repo/tests/phpunit/includes/api/ResultBuilderTest.php
index 274e5b2..538983f 100644
--- a/repo/tests/phpunit/includes/api/ResultBuilderTest.php
+++ b/repo/tests/phpunit/includes/api/ResultBuilderTest.php
@@ -5,6 +5,8 @@
 use ApiResult;
 use DataValues\Serializers\DataValueSerializer;
 use DataValues\StringValue;
+use Wikibase\LanguageFallbackChainFactory;
+use Wikibase\Lib\Serializers\EntitySerializer;
 use Wikibase\Repo\Api\ResultBuilder;
 use Wikibase\DataModel\Entity\Item;
 use Wikibase\DataModel\Entity\ItemId;
@@ -504,6 +506,144 @@
$this->assertArrayHasKey( 'FOO', $data['entities'] );
}
 
+   public function provideTestAddEntityRevisionFallback() {
+   return array(
+   array(
+   false,
+   array(
+   'entities' => array(
+   'Q123101' => array(
+   'id' => 'Q123101',
+   'type' => 'item',
+   'labels' => array(
+   'de-formal' => 
a

[MediaWiki-commits] [Gerrit] ResourceLoader: Add must-revalidate to Cache-Control - change (mediawiki/core)

2015-07-27 Thread Catrope (Code Review)
Catrope has uploaded a new change for review.

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

Change subject: ResourceLoader: Add must-revalidate to Cache-Control
..

ResourceLoader: Add must-revalidate to Cache-Control

Bug: T105255
Change-Id: Ifdd32560335dee3bdd3a2844c8169e5b963b18c5
---
M includes/resourceloader/ResourceLoader.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/96/227396/1

diff --git a/includes/resourceloader/ResourceLoader.php 
b/includes/resourceloader/ResourceLoader.php
index 508be2f..bf34c22 100644
--- a/includes/resourceloader/ResourceLoader.php
+++ b/includes/resourceloader/ResourceLoader.php
@@ -810,7 +810,7 @@
header( 'Cache-Control: private, no-cache, 
must-revalidate' );
header( 'Pragma: no-cache' );
} else {
-   header( "Cache-Control: public, max-age=$maxage, 
s-maxage=$smaxage" );
+   header( "Cache-Control: public, must-revalidate, 
max-age=$maxage, s-maxage=$smaxage" );
$exp = min( $maxage, $smaxage );
header( 'Expires: ' . wfTimestamp( TS_RFC2822, $exp + 
time() ) );
}

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

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

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


[MediaWiki-commits] [Gerrit] labstore: Change permissions on db / ldap credentials - change (operations/puppet)

2015-07-27 Thread Yuvipanda (Code Review)
Yuvipanda has uploaded a new change for review.

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

Change subject: labstore: Change permissions on db / ldap credentials
..

labstore: Change permissions on db / ldap credentials

Change-Id: Ibc551f5137f12f888afb3f9a9a4fb438aab80ce3
---
M modules/labstore/manifests/account_services.pp
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/95/227395/1

diff --git a/modules/labstore/manifests/account_services.pp 
b/modules/labstore/manifests/account_services.pp
index 65ee233..18e3d31 100644
--- a/modules/labstore/manifests/account_services.pp
+++ b/modules/labstore/manifests/account_services.pp
@@ -35,7 +35,7 @@
 content => ordered_json($creds),
 owner   => 'root',
 group   => 'root',
-mode=> '0444',
+mode=> '0400',
 }
 
 file { '/usr/local/sbin/create-dbusers':

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

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

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


[MediaWiki-commits] [Gerrit] labstore: Change permissions on db / ldap credentials - change (operations/puppet)

2015-07-27 Thread Yuvipanda (Code Review)
Yuvipanda has submitted this change and it was merged.

Change subject: labstore: Change permissions on db / ldap credentials
..


labstore: Change permissions on db / ldap credentials

Change-Id: Ibc551f5137f12f888afb3f9a9a4fb438aab80ce3
---
M modules/labstore/manifests/account_services.pp
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/modules/labstore/manifests/account_services.pp 
b/modules/labstore/manifests/account_services.pp
index 65ee233..18e3d31 100644
--- a/modules/labstore/manifests/account_services.pp
+++ b/modules/labstore/manifests/account_services.pp
@@ -35,7 +35,7 @@
 content => ordered_json($creds),
 owner   => 'root',
 group   => 'root',
-mode=> '0444',
+mode=> '0400',
 }
 
 file { '/usr/local/sbin/create-dbusers':

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibc551f5137f12f888afb3f9a9a4fb438aab80ce3
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Yuvipanda 
Gerrit-Reviewer: Yuvipanda 

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


[MediaWiki-commits] [Gerrit] labstore: Rewrite of replica-addusers.pl - change (operations/puppet)

2015-07-27 Thread Yuvipanda (Code Review)
Yuvipanda has submitted this change and it was merged.

Change subject: labstore: Rewrite of replica-addusers.pl
..


labstore: Rewrite of replica-addusers.pl

- Switch it to opt-in per project rather than turned on by
  default for all projects. That caused a deluge of unnecessary
  and unused mysql accounts, and also presumed that all projects
  got NFS by default (which is not the case).
- Opt-in only tools by default.
- Keeps state only in the replica.my.cnf files themselves - no
  state kept elsewhere (other than in the mysql dbs themselves, ofc)

TODO:
- Add support for user accoutns, not just service groups
- Figure out what to do if the replica.my.cnf file is missing but
  the user / grant already exists.

Bug: T104453
Change-Id: I90dc98401b89e769fa058943e3714e383dfe25ea
---
A modules/labstore/files/create-dbusers
A modules/labstore/manifests/account_services.pp
M modules/labstore/manifests/fileserver.pp
A modules/labstore/templates/initscripts/create-dbusers.systemd.erb
4 files changed, 223 insertions(+), 0 deletions(-)

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



diff --git a/modules/labstore/files/create-dbusers 
b/modules/labstore/files/create-dbusers
new file mode 100755
index 000..b1329a0
--- /dev/null
+++ b/modules/labstore/files/create-dbusers
@@ -0,0 +1,164 @@
+#!/usr/bin/python3
+"""
+This script does the following:
+
+  - Check if users / service groups in opted in projects have
+a replica.my.cnf file with mysql credentials
+  - If they do not exist, create a mysql user, give them
+appropriate grants and write the replica.my.cnf file
+  - If there is no replica.my.cnf but grants already exist, do
+nothing. This needs to be fixed with appropriate solution
+later on - either by recreating the replica.my.cnf or...
+something else
+"""
+import logging
+import argparse
+import ldap3
+import pymysql
+import yaml
+import re
+import os
+import string
+import random
+import configparser
+
+
+class User:
+def __init__(self, project, name, uid, homedir):
+self.project = project
+self.name = name
+self.uid = int(uid)
+self.homedir = homedir
+
+@property
+def db_username(self):
+"""
+The db username to use for this user.
+
+Guaranteed to be of the form (s|u)\d+
+"""
+return 's%s' % self.uid
+
+def __repr__(self):
+return "User(name=%s, uid=%s, homedir=%s)" % (
+self.name, self.uid, self.homedir)
+
+@classmethod
+def from_ldap_servicegroups(cls, conn, projectname):
+conn.search(
+'ou=people,ou=servicegroups,dc=wikimedia,dc=org',
+'(cn=%s.*)' % projectname,
+ldap3.SEARCH_SCOPE_WHOLE_SUBTREE,
+attributes=['uidNumber', 'homeDirectory', 'cn']
+)
+users = []
+for resp in conn.response:
+attrs = resp['attributes']
+users.append(cls(projectname, attrs['cn'][0], 
attrs['uidNumber'][0], attrs['homeDirectory'][0]))
+
+return users
+
+
+class CredentialCreator:
+PASSWORD_LENGTH = 16
+PASSWORD_CHARS = string.ascii_letters + string.digits
+GRANT_SQL_TEMPLATE = """
+CREATE USER '{user_name}'@'%' IDENTIFIED BY '{user_pass}';
+GRANT SELECT, SHOW VIEW ON `%\_p`.* TO '{user_name}'@'%';
+GRANT ALL PRIVILEGES ON `{user_name}\_\_%`.* TO '{user_name}'@'%';"""
+
+def __init__(self, hosts, username, password):
+self.conns = [
+pymysql.connect(host, username, password)
+for host in hosts
+]
+
+@staticmethod
+def _generate_pass():
+sysrandom = random.SystemRandom()  # Uses /dev/urandom
+return ''.join(sysrandom.sample(
+CredentialCreator.PASSWORD_CHARS,
+CredentialCreator.PASSWORD_LENGTH))
+
+def check_user_exists(self, user):
+exists = True
+for conn in self.conns:
+conn.ping(True)
+cur = conn.cursor()
+try:
+cur.execute('SELECT * FROM mysql.user WHERE User = %s', 
user.db_username)
+result = cur.fetchone()
+finally:
+cur.close()
+exists = exists and (result is not None)
+return exists
+
+def create_user(self, user, password):
+for conn in self.conns:
+conn.ping(True)
+cur = conn.cursor()
+try:
+# is ok, because password is guaranteed to never
+# contain a quote (only alphanumeric) and username
+# is guaranteed to be (u|s)\d+.
+sql = CredentialCreator.GRANT_SQL_TEMPLATE.format(
+user_name=user.db_username,
+user_pass=password
+)
+cur.execute(sql)
+finally:
+cur.close()
+
+
+if __name__ == '__main__':
+PROJECTS

[MediaWiki-commits] [Gerrit] Fix NPE in tabbed browsing - change (apps...wikipedia)

2015-07-27 Thread Niedzielski (Code Review)
Niedzielski has uploaded a new change for review.

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

Change subject: Fix NPE in tabbed browsing
..

Fix NPE in tabbed browsing

TabsProvider.enterTabMode(Runnable) was meant to handle a null parameter
as evidenced by the no parameter version which invokes it with null.
This patch adds null protection and specifies @Nullable on the
parameter.

No known repro steps at this time.

Change-Id: Ibdc58bf49cc5551fb00a9352a11486dd5390054f
---
M wikipedia/src/main/java/org/wikipedia/page/tabs/TabsProvider.java
1 file changed, 5 insertions(+), 2 deletions(-)


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

diff --git a/wikipedia/src/main/java/org/wikipedia/page/tabs/TabsProvider.java 
b/wikipedia/src/main/java/org/wikipedia/page/tabs/TabsProvider.java
index a796992..80adf08 100644
--- a/wikipedia/src/main/java/org/wikipedia/page/tabs/TabsProvider.java
+++ b/wikipedia/src/main/java/org/wikipedia/page/tabs/TabsProvider.java
@@ -11,6 +11,7 @@
 import com.squareup.picasso.Picasso;
 
 import android.support.annotation.NonNull;
+import android.support.annotation.Nullable;
 import android.support.v7.view.ActionMode;
 import android.view.LayoutInflater;
 import android.view.Menu;
@@ -100,13 +101,15 @@
 providerListener.onEnterTabView();
 }
 
-private void enterTabMode(Runnable onTabModeEntered) {
+private void enterTabMode(@Nullable Runnable onTabModeEntered) {
 if (tabActionMode != null) {
 // already inside action mode...
 // but make sure to update the list of tabs.
 tabListAdapter.notifyDataSetInvalidated();
 tabListView.smoothScrollToPosition(tabList.size() - 1);
-onTabModeEntered.run();
+if (onTabModeEntered != null) {
+onTabModeEntered.run();
+}
 return;
 }
 parentActivity.startSupportActionMode(new 
TabActionModeCallback(onTabModeEntered));

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

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

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


[MediaWiki-commits] [Gerrit] Restrict testAll* tasks to debug only - change (apps...wikipedia)

2015-07-27 Thread Niedzielski (Code Review)
Niedzielski has uploaded a new change for review.

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

Change subject: Restrict testAll* tasks to debug only
..

Restrict testAll* tasks to debug only

There is no connectedAndroidTest*Release. Hence, there should be no
testAll*Release tasks. Bad dependencies caused certain tasks to fail to
execute, namely the tasks task.

Change-Id: I1dd6e0b01012e28a87967ba7d215114cb83d0099
---
M config/quality.gradle
1 file changed, 10 insertions(+), 6 deletions(-)


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

diff --git a/config/quality.gradle b/config/quality.gradle
index f61de9b..e8a96f9 100644
--- a/config/quality.gradle
+++ b/config/quality.gradle
@@ -31,16 +31,20 @@
 testAllTask.shouldRunAfter jvmJUnitName
 }
 
-// Add testAll tasks for each build variant.
+// Add testAll tasks for each debug build variant. Note: there is no
+// connectedAndroidTest*Release.
 android.applicationVariants.all { variant ->
 def variantName = variant.name.capitalize()
-def testAllName = "testAll${variantName}"
-def jvmJUnitName = "test${variantName}"
-def androidInstrumentationName = "connectedAndroidTest${variantName}"
 
-addTestAllTask(testAllName, jvmJUnitName, androidInstrumentationName)
+if (variantName.endsWith('Debug')) {
+def testAllName = "testAll${variantName}"
+def jvmJUnitName = "test${variantName}"
+def androidInstrumentationName = "connectedAndroidTest${variantName}"
+
+addTestAllTask(testAllName, jvmJUnitName, androidInstrumentationName)
+}
 }
 
 // Add testAll task for all configurations.
 addTestAllTask('testAll', 'test', 'connectedAndroidTest')
-// --- /testAll ---
\ No newline at end of file
+// --- /testAll ---

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

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

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


[MediaWiki-commits] [Gerrit] Added l18n for EoWp to clean_sandbox.py - change (pywikibot/core)

2015-07-27 Thread Avicennasis (Code Review)
Avicennasis has uploaded a new change for review.

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

Change subject: Added l18n for EoWp to clean_sandbox.py
..

Added l18n for EoWp to clean_sandbox.py

Change-Id: I69d0d90565141c48f5aad584ea4bd81ac722da4a
---
M scripts/clean_sandbox.py
1 file changed, 2 insertions(+), 0 deletions(-)


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

diff --git a/scripts/clean_sandbox.py b/scripts/clean_sandbox.py
index 5df1da7..2edf67e 100755
--- a/scripts/clean_sandbox.py
+++ b/scripts/clean_sandbox.py
@@ -63,6 +63,7 @@
   u'and editing skills below this line. As this page is for editing '
   u'experiments, this page will automatically be cleaned every 12 '
   u'hours. -->',
+'eo': '{{Bonvolu ne forigi tiun cxi linion (Provejo)}}'
 'fa': u'{{subst:Wikipedia:ربات/sandbox}}',
 'fi': u'{{subst:Hiekka}}',
 'he': u'{{ארגז חול}}\n',
@@ -107,6 +108,7 @@
 'da': u'Project:Sandkassen',
 'de': u'Project:Spielwiese',
 'en': u'Project:Sandbox',
+'eo': 'Project:Provejo'
 'fa': [u'Project:صفحه تمرین', u'Project:آشنایی با ویرایش'],
 'fi': u'Project:Hiekkalaatikko',
 'fr': u'Project:Bac à sable',

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

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

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


[MediaWiki-commits] [Gerrit] Downgrade jscs. - change (mediawiki...Wikibase)

2015-07-27 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Downgrade jscs.
..


Downgrade jscs.

It seems after the 2.0 release new things are found that were not before,
temporarily downgrade to make CI pass.

Bug: T107124
Change-Id: Icefdec9c30506778895b25fa8d8728522d071d5c
---
M package.json
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/package.json b/package.json
index 2e22208..9fa2adb 100644
--- a/package.json
+++ b/package.json
@@ -11,7 +11,7 @@
"author": "The Wikidata team",
"license": "GPL-2.0+",
"devDependencies": {
-   "jscs": "",
+   "jscs": "~1.13.1",
"jshint": ""
}
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Icefdec9c30506778895b25fa8d8728522d071d5c
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: JanZerebecki 
Gerrit-Reviewer: Aude 
Gerrit-Reviewer: Hoo man 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] jshint: Ignore vendor and possible extensions directory from... - change (mediawiki...Wikibase)

2015-07-27 Thread JanZerebecki (Code Review)
JanZerebecki has uploaded a new change for review.

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

Change subject: jshint: Ignore vendor and possible extensions directory from 
composer.
..

jshint: Ignore vendor and possible extensions directory from composer.

Change-Id: I4268dbfcf9f4b9547a3fed019905282458f83f5f
---
M .jshintignore
1 file changed, 2 insertions(+), 0 deletions(-)


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

diff --git a/.jshintignore b/.jshintignore
index a860310..48b4341 100644
--- a/.jshintignore
+++ b/.jshintignore
@@ -1 +1,3 @@
 node_modules/**
+vendor/**
+extensions/**

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4268dbfcf9f4b9547a3fed019905282458f83f5f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: JanZerebecki 

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


[MediaWiki-commits] [Gerrit] Downgrade jscs. - change (mediawiki...Wikibase)

2015-07-27 Thread JanZerebecki (Code Review)
JanZerebecki has uploaded a new change for review.

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

Change subject: Downgrade jscs.
..

Downgrade jscs.

It seems after the 2.0 release new things are found that were not before,
temporarily downgrade to make CI pass.

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


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

diff --git a/package.json b/package.json
index 2e22208..9fa2adb 100644
--- a/package.json
+++ b/package.json
@@ -11,7 +11,7 @@
"author": "The Wikidata team",
"license": "GPL-2.0+",
"devDependencies": {
-   "jscs": "",
+   "jscs": "~1.13.1",
"jshint": ""
}
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Icefdec9c30506778895b25fa8d8728522d071d5c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: JanZerebecki 

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


[MediaWiki-commits] [Gerrit] Correct path to drush wrapper - change (mediawiki/vagrant)

2015-07-27 Thread Awight (Code Review)
Awight has uploaded a new change for review.

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

Change subject: Correct path to drush wrapper
..

Correct path to drush wrapper

Change-Id: I990e3d429c9e17e51040eb76c1a7c13bd4645224
---
M puppet/modules/crm/manifests/drupal.pp
M puppet/modules/crm/manifests/drush.pp
M puppet/modules/crm/templates/drupal-install.sh.erb
3 files changed, 6 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant 
refs/changes/88/227388/1

diff --git a/puppet/modules/crm/manifests/drupal.pp 
b/puppet/modules/crm/manifests/drupal.pp
index 3aa78a6..06856e0 100644
--- a/puppet/modules/crm/manifests/drupal.pp
+++ b/puppet/modules/crm/manifests/drupal.pp
@@ -85,7 +85,7 @@
 }
 
 exec { 'enable_drupal_modules':
-command => inline_template('<%= scope["::crm::drush::cmd"] %> 
pm-enable <%= @modules.join(" ") %>'),
+command => inline_template('<%= scope["::crm::drush::wrapper"] %> 
pm-enable <%= @modules.join(" ") %>'),
 refreshonly => true,
 subscribe   => [
 Exec['drupal_db_install'],
diff --git a/puppet/modules/crm/manifests/drush.pp 
b/puppet/modules/crm/manifests/drush.pp
index 6109985..dd2cf8b 100644
--- a/puppet/modules/crm/manifests/drush.pp
+++ b/puppet/modules/crm/manifests/drush.pp
@@ -7,7 +7,10 @@
 
 require_package('drush')
 
-file { '/usr/local/bin/drush':
+# FIXME: Correctly handle path everywhere.
+$wrapper = '/usr/local/bin/drush'
+
+file { $wrapper:
 ensure  => present,
 mode=> '0755',
 content => template('crm/drush-wrapper.sh.erb'),
diff --git a/puppet/modules/crm/templates/drupal-install.sh.erb 
b/puppet/modules/crm/templates/drupal-install.sh.erb
index 7aa19ac..40e65b8 100644
--- a/puppet/modules/crm/templates/drupal-install.sh.erb
+++ b/puppet/modules/crm/templates/drupal-install.sh.erb
@@ -1,6 +1,6 @@
 #!/bin/bash
 
-<%= scope['::crm::drush::bare_cmd'] %> \
+<%= scope['::crm::drush::wrapper'] %> \
 site-install standard \
 --db-url='<%= @db_url %>' \
 --site-name='<%= scope['::crm::site_name'] %>' \

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I990e3d429c9e17e51040eb76c1a7c13bd4645224
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: master
Gerrit-Owner: Awight 

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


[MediaWiki-commits] [Gerrit] Can't use minfraud without an API key. - change (mediawiki/vagrant)

2015-07-27 Thread Awight (Code Review)
Awight has uploaded a new change for review.

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

Change subject: Can't use minfraud without an API key.
..

Can't use minfraud without an API key.

Change-Id: I21c380cb5de76a45cfb34cb22da430562e1b23fb
---
M puppet/modules/payments/manifests/donation_interface.pp
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant 
refs/changes/89/227389/1

diff --git a/puppet/modules/payments/manifests/donation_interface.pp 
b/puppet/modules/payments/manifests/donation_interface.pp
index 2f744db..5030d5f 100644
--- a/puppet/modules/payments/manifests/donation_interface.pp
+++ b/puppet/modules/payments/manifests/donation_interface.pp
@@ -16,7 +16,7 @@
   wgDonationInterfaceEnableQueue   => true,
   wgDonationInterfaceEnableStomp   => true,
   wgDonationInterfaceEnableFunctionsFilter => true,
-  wgDonationInterfaceEnableMinfraud=> true,
+  wgDonationInterfaceEnableMinfraud=> false,
   wgDonationInterfaceEnableReferrerFilter  => true,
   wgDonationInterfaceEnableSourceFilter=> true,
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I21c380cb5de76a45cfb34cb22da430562e1b23fb
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: master
Gerrit-Owner: Awight 

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


[MediaWiki-commits] [Gerrit] labstore: Follow up to I82ac5bf45cd3c2e10df25f825bf423cb2f7d... - change (operations/puppet)

2015-07-27 Thread Yuvipanda (Code Review)
Yuvipanda has uploaded a new change for review.

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

Change subject: labstore: Follow up to I82ac5bf45cd3c2e10df25f825bf423cb2f7d1de0
..

labstore: Follow up to I82ac5bf45cd3c2e10df25f825bf423cb2f7d1de0

Change-Id: I93872dc285582afedd56bafd8855c3e263bf596f
---
M modules/labstore/files/storage-replicate
1 file changed, 1 insertion(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/87/227387/1

diff --git a/modules/labstore/files/storage-replicate 
b/modules/labstore/files/storage-replicate
index 68b0a88..3996ef1 100755
--- a/modules/labstore/files/storage-replicate
+++ b/modules/labstore/files/storage-replicate
@@ -79,12 +79,7 @@
 
 def read(self, path):
 if self.host:
-(out, err) = self.run('/bin/cat', path)
-if err and err != "":
-raise Context.ContextError(self, err)
-
-return out.splitlines()
-
+return self.run('/bin/cat', path).splitlines()
 else:
 with open(path, 'r') as fd:
 return fd.readlines()

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

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

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


[MediaWiki-commits] [Gerrit] labstore: Follow up to I82ac5bf45cd3c2e10df25f825bf423cb2f7d... - change (operations/puppet)

2015-07-27 Thread Yuvipanda (Code Review)
Yuvipanda has submitted this change and it was merged.

Change subject: labstore: Follow up to I82ac5bf45cd3c2e10df25f825bf423cb2f7d1de0
..


labstore: Follow up to I82ac5bf45cd3c2e10df25f825bf423cb2f7d1de0

Change-Id: I93872dc285582afedd56bafd8855c3e263bf596f
---
M modules/labstore/files/storage-replicate
1 file changed, 1 insertion(+), 6 deletions(-)

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



diff --git a/modules/labstore/files/storage-replicate 
b/modules/labstore/files/storage-replicate
index 68b0a88..3996ef1 100755
--- a/modules/labstore/files/storage-replicate
+++ b/modules/labstore/files/storage-replicate
@@ -79,12 +79,7 @@
 
 def read(self, path):
 if self.host:
-(out, err) = self.run('/bin/cat', path)
-if err and err != "":
-raise Context.ContextError(self, err)
-
-return out.splitlines()
-
+return self.run('/bin/cat', path).splitlines()
 else:
 with open(path, 'r') as fd:
 return fd.readlines()

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I93872dc285582afedd56bafd8855c3e263bf596f
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Yuvipanda 
Gerrit-Reviewer: Yuvipanda 

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


[MediaWiki-commits] [Gerrit] Follow-up I6e77eb39: Actually configure new logo for suwikiq... - change (operations/mediawiki-config)

2015-07-27 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Follow-up I6e77eb39: Actually configure new logo for suwikiquote
..


Follow-up I6e77eb39: Actually configure new logo for suwikiquote

The logo file existed, because we have one for each wiki. But we weren't
actually set up to use it - wikiquote.png was being used.

Bug: T106784
Change-Id: Ifbbd86cebce0136395639aecef178ed8b78ebfe2
---
M wmf-config/InitialiseSettings.php
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 229d41a..3875721 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -861,6 +861,7 @@
'sqwikiquote' => '/static/images/project-logos/sqwikiquote.png',
'srwikiquote' => '/static/images/project-logos/srwikiquote.png',
'tawikiquote' => '/static/images/project-logos/tawikiquote.png',  // 
T57864
+   'suwikiquote' => '/static/images/project-logos/suwikiquote.png',  // 
T106784
'thwikiquote' => '/static/images/project-logos/thwikiquote.png',
'trwikiquote' => '/static/images/project-logos/trwikiquote.png',
'ukwikiquote' => '/static/images/project-logos/ukwikiquote.png',

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

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

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


[MediaWiki-commits] [Gerrit] labstore: Make sure that output of .run() is unicode - change (operations/puppet)

2015-07-27 Thread Yuvipanda (Code Review)
Yuvipanda has submitted this change and it was merged.

Change subject: labstore: Make sure that output of .run() is unicode
..


labstore: Make sure that output of .run() is unicode

Change-Id: I9aaf37494b56c25e1b4bc3ba8bc902f38927116a
---
M modules/labstore/files/storage-replicate
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/modules/labstore/files/storage-replicate 
b/modules/labstore/files/storage-replicate
index 887709e..68b0a88 100755
--- a/modules/labstore/files/storage-replicate
+++ b/modules/labstore/files/storage-replicate
@@ -113,7 +113,7 @@
 raise subprocess.CalledProcessError(1, command, err)
 
 else:
-return subprocess.check_output(list(cmd))
+return subprocess.check_output(list(cmd)).decode()
 
 
 class Lockdir:

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9aaf37494b56c25e1b4bc3ba8bc902f38927116a
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Yuvipanda 
Gerrit-Reviewer: Yuvipanda 

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


[MediaWiki-commits] [Gerrit] labstore: Make sure that output of .run() is unicode - change (operations/puppet)

2015-07-27 Thread Yuvipanda (Code Review)
Yuvipanda has uploaded a new change for review.

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

Change subject: labstore: Make sure that output of .run() is unicode
..

labstore: Make sure that output of .run() is unicode

Change-Id: I9aaf37494b56c25e1b4bc3ba8bc902f38927116a
---
M modules/labstore/files/storage-replicate
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/86/227386/1

diff --git a/modules/labstore/files/storage-replicate 
b/modules/labstore/files/storage-replicate
index 887709e..68b0a88 100755
--- a/modules/labstore/files/storage-replicate
+++ b/modules/labstore/files/storage-replicate
@@ -113,7 +113,7 @@
 raise subprocess.CalledProcessError(1, command, err)
 
 else:
-return subprocess.check_output(list(cmd))
+return subprocess.check_output(list(cmd)).decode()
 
 
 class Lockdir:

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

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

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


[MediaWiki-commits] [Gerrit] Document what domains can be shortened on Special:UrlShortener - change (mediawiki...UrlShortener)

2015-07-27 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Document what domains can be shortened on Special:UrlShortener
..


Document what domains can be shortened on Special:UrlShortener

Bug: T107099
Change-Id: Idf827cefa747ce5658eb3ee103da4a68361ee34d
---
M SpecialUrlShortener.php
M UrlShortener.php
M i18n/en.json
M i18n/qqq.json
4 files changed, 39 insertions(+), 3 deletions(-)

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



diff --git a/SpecialUrlShortener.php b/SpecialUrlShortener.php
index ea1ef28..ca2c7c8 100644
--- a/SpecialUrlShortener.php
+++ b/SpecialUrlShortener.php
@@ -24,6 +24,23 @@
return 'ooui';
}
 
+   private function getApprovedDomainsMessage() {
+   global $wgUrlShortenerApprovedDomains, $wgServer;
+   if ( $wgUrlShortenerApprovedDomains ) {
+   $domains = $wgUrlShortenerApprovedDomains;
+   } else {
+   $parsed = wfParseUrl( $wgServer );
+   $domains = array( $parsed['host'] );
+   }
+
+   $lang = $this->getLanguage();
+   return $this->msg( 'urlshortener-approved-domains' )
+   ->numParams( count( $domains ) )
+   ->params( $lang->listToText( array_map( function( $i ) {
+   return "$i";
+   }, $domains ) ) );
+   }
+
/**
 * @param HTMLForm $form
 */
@@ -31,7 +48,7 @@
$form->setMethod( 'GET' );
$form->setSubmitID( 'mw-urlshortener-submit' );
$form->setSubmitTextMsg( 'urlshortener-url-input-submit' );
-
+   $form->setFooterText( 
$this->getApprovedDomainsMessage()->parse() );
$this->getOutput()->addModules( 'ext.urlShortener.special' );
$this->getOutput()->addJsConfigVars( array(
'wgUrlShortenerDomainsWhitelist' => 
UrlShortenerUtils::getWhitelistRegex(),
diff --git a/UrlShortener.php b/UrlShortener.php
index 9033bad..285f931 100644
--- a/UrlShortener.php
+++ b/UrlShortener.php
@@ -46,10 +46,27 @@
  *
  * // Allow *all* domains
  * $wgUrlShortenerDomainsWhitelist = array( '.*' );
+ *
+ * @var array|bool
  */
 $wgUrlShortenerDomainsWhitelist = false;
 
 /**
+ * A human readable version of $wgUrlShortenerDomainsWhitelist.
+ *
+ * This is ONLY for documentation. It is not used in any validation function.
+ *
+ * Example:
+ * $wgUrlShortenerApprovedDomains = array(
+ * '*.wikimedia.org',
+ * '*.wikipedia.org',
+ * );
+ *
+ * @var array|bool
+ */
+$wgUrlShortenerApprovedDomains = false;
+
+/**
  * If you're running a wiki farm, you probably just want to have one
  * central database with all of your short urls.
  * If not set, uses the local wiki's database.
diff --git a/i18n/en.json b/i18n/en.json
index b0826be..38f9aa1 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -14,5 +14,6 @@
"urlshortener-form-header": "Paste your long URL here",
"urlshortener-error-malformed-url": "Not a valid URL",
"urlshortener-shortened-url-label": "Shortened URL",
-   "urlshortener-error-disallowed-url": "URLs to domain $1 are not allowed 
to be shortened"
+   "urlshortener-error-disallowed-url": "URLs to domain $1 are not allowed 
to be shortened",
+   "urlshortener-approved-domains": "Links to the following 
{{PLURAL:$1|domain|domains}} may be shortened: $2."
 }
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 60f8910..b5a7d59 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -15,5 +15,6 @@
"urlshortener-form-header": "Message shown above the form where the 
user can paste a URL to be shortened",
"urlshortener-error-malformed-url": "Message shown to the user when 
they try to submit a malformed URL",
"urlshortener-shortened-url-label": "Message shown to user above the 
shortened URL",
-   "urlshortener-error-disallowed-url": "Message shown to user when they 
try to shorten URLs to a domain that isn't whitelisted. $1 refers to the domain 
of the URL that the user tried to shorten"
+   "urlshortener-error-disallowed-url": "Message shown to user when they 
try to shorten URLs to a domain that isn't whitelisted. $1 refers to the domain 
of the URL that the user tried to shorten",
+   "urlshortener-approved-domains": "Help message displayed on 
Special:UrlShortener showing which domains can be shortened. $1 is the number 
of domains, $2 is a comma separated list of domains."
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Idf827cefa747ce5658eb3ee103da4a68361ee34d
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/UrlShortener
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Leg

[MediaWiki-commits] [Gerrit] Actually commit build/typos.json - change (mediawiki...UrlShortener)

2015-07-27 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Actually commit build/typos.json
..


Actually commit build/typos.json

Change-Id: I63112d45a27c185891527681ad3214d68fa00207
---
A build/typos.json
1 file changed, 18 insertions(+), 0 deletions(-)

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



diff --git a/build/typos.json b/build/typos.json
new file mode 100644
index 000..f54ce28
--- /dev/null
+++ b/build/typos.json
@@ -0,0 +1,18 @@
+{
+   "caseSensitive": [
+   [ "@returns", "@return" ],
+   [ "\\.super", ".parent" ]
+   ],
+   "caseInsensitive": [
+   [ "paralell", "parallel" ],
+   [ "properites", "properties" ],
+   [ "visiblit(ies|y)", "visibilit$1" ],
+   [ "movablilties", "movabilities" ],
+   [ "inpsect(ors?|ion)", "inspect$1" ],
+   [ "\bteh\b", "the" ],
+   [ "intialization", "initialization" ],
+   [ "durring", "during" ],
+   [ "contian", "contain" ],
+   [ "occured", "occurred" ]
+   ]
+}

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

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

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


[MediaWiki-commits] [Gerrit] Actually commit build/typos.json - change (mediawiki...UrlShortener)

2015-07-27 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review.

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

Change subject: Actually commit build/typos.json
..

Actually commit build/typos.json

Change-Id: I63112d45a27c185891527681ad3214d68fa00207
---
A build/typos.json
1 file changed, 18 insertions(+), 0 deletions(-)


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

diff --git a/build/typos.json b/build/typos.json
new file mode 100644
index 000..f54ce28
--- /dev/null
+++ b/build/typos.json
@@ -0,0 +1,18 @@
+{
+   "caseSensitive": [
+   [ "@returns", "@return" ],
+   [ "\\.super", ".parent" ]
+   ],
+   "caseInsensitive": [
+   [ "paralell", "parallel" ],
+   [ "properites", "properties" ],
+   [ "visiblit(ies|y)", "visibilit$1" ],
+   [ "movablilties", "movabilities" ],
+   [ "inpsect(ors?|ion)", "inspect$1" ],
+   [ "\bteh\b", "the" ],
+   [ "intialization", "initialization" ],
+   [ "durring", "during" ],
+   [ "contian", "contain" ],
+   [ "occured", "occurred" ]
+   ]
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I63112d45a27c185891527681ad3214d68fa00207
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UrlShortener
Gerrit-Branch: master
Gerrit-Owner: Legoktm 

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


[MediaWiki-commits] [Gerrit] Add sitename to special wikis - change (mediawiki...SiteMatrix)

2015-07-27 Thread Alex Monk (Code Review)
Alex Monk has uploaded a new change for review.

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

Change subject: Add sitename to special wikis
..

Add sitename to special wikis

Bug: T104785
Change-Id: Ife0c2db30e7a93804cc05399e608f0a42760fc90
---
M SiteMatrixApi.php
1 file changed, 1 insertion(+), 0 deletions(-)


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

diff --git a/SiteMatrixApi.php b/SiteMatrixApi.php
index 50114e7..721ff8a 100644
--- a/SiteMatrixApi.php
+++ b/SiteMatrixApi.php
@@ -124,6 +124,7 @@
$wiki['url'] = $url;
$wiki['dbname'] = $dbName;
$wiki['code'] = str_replace( '_', '-', $lang ) 
. ( $site != 'wiki' ? $site : '' );
+   $wiki['sitename'] = $matrix->getSitename( 
$lang, $site );
 
$skip = true;
 

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

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

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


[MediaWiki-commits] [Gerrit] Use npm for UrlShortener - change (integration/config)

2015-07-27 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Use npm for UrlShortener
..


Use npm for UrlShortener

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

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



diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index cdc2fae..83027a1 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -5946,7 +5946,7 @@
 
   - name: mediawiki/extensions/UrlShortener
 template:
-  - name: extension-jslint
+  - name: npm
   - name: extension-unittests-generic
 
   - name: mediawiki/extensions/URNames

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ifa400cb316bbe4579d94111b224991cd1a0a0dab
Gerrit-PatchSet: 1
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Use npm for UrlShortener - change (integration/config)

2015-07-27 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review.

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

Change subject: Use npm for UrlShortener
..

Use npm for UrlShortener

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


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/83/227383/1

diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index cdc2fae..83027a1 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -5946,7 +5946,7 @@
 
   - name: mediawiki/extensions/UrlShortener
 template:
-  - name: extension-jslint
+  - name: npm
   - name: extension-unittests-generic
 
   - name: mediawiki/extensions/URNames

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifa400cb316bbe4579d94111b224991cd1a0a0dab
Gerrit-PatchSet: 1
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Legoktm 

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


[MediaWiki-commits] [Gerrit] New deployment branch: wmf/1.26wmf16 - change (mediawiki...Wikidata)

2015-07-27 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: New deployment branch: wmf/1.26wmf16
..


New deployment branch: wmf/1.26wmf16

Change-Id: I3256bf9b748b50d5fbd9dc6b14b03b51723ad4e6
---
M WikibaseClient.settings.php
M WikibaseRepo.settings.php
M composer.json
M composer.lock
M extensions/Constraints/README.md
M extensions/Constraints/WikibaseQualityConstraints.php
M extensions/Constraints/composer.json
R extensions/Constraints/maintenance/UpdateConstraintsTable.php
R 
extensions/Constraints/tests/phpunit/Maintenance/UpdateConstraintsTableTest.php
M extensions/PropertySuggester/README.md
M 
extensions/PropertySuggester/tests/phpunit/PropertySuggester/GetSuggestionsTest.php
M 
extensions/PropertySuggester/tests/phpunit/PropertySuggester/ResultBuilderTest.php
M 
extensions/PropertySuggester/tests/phpunit/PropertySuggester/SuggesterParamsParserTest.php
M 
extensions/PropertySuggester/tests/phpunit/PropertySuggester/Suggesters/SimpleSuggesterTest.php
M 
extensions/PropertySuggester/tests/phpunit/PropertySuggester/SuggestionGeneratorTest.php
M 
extensions/PropertySuggester/tests/phpunit/PropertySuggester/UpdateTable/UpdateTableTest.php
M extensions/Wikibase/Wikibase.php
M extensions/Wikibase/build/travis/install.sh
M extensions/Wikibase/client/ExampleSettings.php
M extensions/Wikibase/client/WikibaseClient.hooks.php
M extensions/Wikibase/client/WikibaseClient.i18n.magic.php
M extensions/Wikibase/client/WikibaseClient.php
M extensions/Wikibase/client/config/WikibaseClient.default.php
M extensions/Wikibase/client/i18n/av.json
M extensions/Wikibase/client/i18n/az.json
M extensions/Wikibase/client/i18n/bn.json
M extensions/Wikibase/client/i18n/br.json
M extensions/Wikibase/client/i18n/bs.json
M extensions/Wikibase/client/i18n/ce.json
M extensions/Wikibase/client/i18n/cs.json
M extensions/Wikibase/client/i18n/de.json
M extensions/Wikibase/client/i18n/dty.json
M extensions/Wikibase/client/i18n/en.json
M extensions/Wikibase/client/i18n/es.json
M extensions/Wikibase/client/i18n/et.json
M extensions/Wikibase/client/i18n/eu.json
M extensions/Wikibase/client/i18n/fa.json
M extensions/Wikibase/client/i18n/fi.json
M extensions/Wikibase/client/i18n/fr.json
M extensions/Wikibase/client/i18n/frr.json
M extensions/Wikibase/client/i18n/gl.json
M extensions/Wikibase/client/i18n/gom-deva.json
M extensions/Wikibase/client/i18n/gom-latn.json
M extensions/Wikibase/client/i18n/he.json
A extensions/Wikibase/client/i18n/hrx.json
M extensions/Wikibase/client/i18n/it.json
M extensions/Wikibase/client/i18n/ja.json
A extensions/Wikibase/client/i18n/kw.json
A extensions/Wikibase/client/i18n/ky.json
M extensions/Wikibase/client/i18n/lb.json
M extensions/Wikibase/client/i18n/lt.json
M extensions/Wikibase/client/i18n/luz.json
A extensions/Wikibase/client/i18n/mzn.json
M extensions/Wikibase/client/i18n/ne.json
M extensions/Wikibase/client/i18n/oc.json
M extensions/Wikibase/client/i18n/pl.json
A extensions/Wikibase/client/i18n/prs.json
M extensions/Wikibase/client/i18n/ps.json
M extensions/Wikibase/client/i18n/pt.json
M extensions/Wikibase/client/i18n/qqq.json
M extensions/Wikibase/client/i18n/ro.json
M extensions/Wikibase/client/i18n/ru.json
M extensions/Wikibase/client/i18n/sl.json
M extensions/Wikibase/client/i18n/sr-ec.json
M extensions/Wikibase/client/i18n/sr-el.json
M extensions/Wikibase/client/i18n/sv.json
M extensions/Wikibase/client/i18n/tl.json
M extensions/Wikibase/client/i18n/tt-cyrl.json
M extensions/Wikibase/client/i18n/udm.json
M extensions/Wikibase/client/i18n/vi.json
M extensions/Wikibase/client/i18n/yi.json
M extensions/Wikibase/client/i18n/yue.json
M extensions/Wikibase/client/i18n/zh-hans.json
M extensions/Wikibase/client/i18n/zh-hant.json
M extensions/Wikibase/client/includes/CachingOtherProjectsSitesProvider.php
M extensions/Wikibase/client/includes/Changes/ChangeHandler.php
M extensions/Wikibase/client/includes/Changes/ChangeRunCoalescer.php
M extensions/Wikibase/client/includes/Changes/WikiPageUpdater.php
M extensions/Wikibase/client/includes/DataAccess/PropertyIdResolver.php
M 
extensions/Wikibase/client/includes/DataAccess/PropertyParserFunction/PropertyClaimsRendererFactory.php
M 
extensions/Wikibase/client/includes/DataAccess/PropertyParserFunction/Runner.php
M extensions/Wikibase/client/includes/DataAccess/Scribunto/EntityAccessor.php
M 
extensions/Wikibase/client/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseEntityLibrary.php
M 
extensions/Wikibase/client/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseLibrary.php
M 
extensions/Wikibase/client/includes/DataAccess/Scribunto/WikibaseLuaBindings.php
M extensions/Wikibase/client/includes/DataAccess/SnaksFinder.php
M extensions/Wikibase/client/includes/Hooks/SpecialWatchlistQueryHandler.php
M extensions/Wikibase/client/includes/Hooks/UpdateRepoHookHandlers.php
M extensions/Wikibase/client/includes/SiteLinkCommentCreator.php
M extensions/Wikibase/client/includes/UpdateRepo/U

[MediaWiki-commits] [Gerrit] Update Wikidata to wmf/1.26wmf16 - change (mediawiki...release)

2015-07-27 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Update Wikidata to wmf/1.26wmf16
..


Update Wikidata to wmf/1.26wmf16

Change-Id: Idb3d114f51b03ae32b884699636c2e6e7439aabe
---
M make-wmf-branch/config.json
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/make-wmf-branch/config.json b/make-wmf-branch/config.json
index 0b3e3b6..dabd3d2 100644
--- a/make-wmf-branch/config.json
+++ b/make-wmf-branch/config.json
@@ -166,7 +166,7 @@
"special_extensions": {
"CentralNotice": "wmf_deploy",
"DonationInterface": "deployment",
-   "Wikidata": "wmf/1.26wmf13",
+   "Wikidata": "wmf/1.26wmf16",
"SemanticMediaWiki": "1.8.x",
"SemanticResultFormats": "1.8.x",
"Validator": "0.5.x"

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Idb3d114f51b03ae32b884699636c2e6e7439aabe
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/tools/release
Gerrit-Branch: master
Gerrit-Owner: Aude 
Gerrit-Reviewer: Aude 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Document what domains can be shortened on Special:UrlShortener - change (mediawiki...UrlShortener)

2015-07-27 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review.

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

Change subject: Document what domains can be shortened on Special:UrlShortener
..

Document what domains can be shortened on Special:UrlShortener

Bug: T107099
Change-Id: Idf827cefa747ce5658eb3ee103da4a68361ee34d
---
M SpecialUrlShortener.php
M UrlShortener.php
M i18n/en.json
M i18n/qqq.json
4 files changed, 39 insertions(+), 3 deletions(-)


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

diff --git a/SpecialUrlShortener.php b/SpecialUrlShortener.php
index ea1ef28..ca2c7c8 100644
--- a/SpecialUrlShortener.php
+++ b/SpecialUrlShortener.php
@@ -24,6 +24,23 @@
return 'ooui';
}
 
+   private function getApprovedDomainsMessage() {
+   global $wgUrlShortenerApprovedDomains, $wgServer;
+   if ( $wgUrlShortenerApprovedDomains ) {
+   $domains = $wgUrlShortenerApprovedDomains;
+   } else {
+   $parsed = wfParseUrl( $wgServer );
+   $domains = array( $parsed['host'] );
+   }
+
+   $lang = $this->getLanguage();
+   return $this->msg( 'urlshortener-approved-domains' )
+   ->numParams( count( $domains ) )
+   ->params( $lang->listToText( array_map( function( $i ) {
+   return "$i";
+   }, $domains ) ) );
+   }
+
/**
 * @param HTMLForm $form
 */
@@ -31,7 +48,7 @@
$form->setMethod( 'GET' );
$form->setSubmitID( 'mw-urlshortener-submit' );
$form->setSubmitTextMsg( 'urlshortener-url-input-submit' );
-
+   $form->setFooterText( 
$this->getApprovedDomainsMessage()->parse() );
$this->getOutput()->addModules( 'ext.urlShortener.special' );
$this->getOutput()->addJsConfigVars( array(
'wgUrlShortenerDomainsWhitelist' => 
UrlShortenerUtils::getWhitelistRegex(),
diff --git a/UrlShortener.php b/UrlShortener.php
index 9033bad..285f931 100644
--- a/UrlShortener.php
+++ b/UrlShortener.php
@@ -46,10 +46,27 @@
  *
  * // Allow *all* domains
  * $wgUrlShortenerDomainsWhitelist = array( '.*' );
+ *
+ * @var array|bool
  */
 $wgUrlShortenerDomainsWhitelist = false;
 
 /**
+ * A human readable version of $wgUrlShortenerDomainsWhitelist.
+ *
+ * This is ONLY for documentation. It is not used in any validation function.
+ *
+ * Example:
+ * $wgUrlShortenerApprovedDomains = array(
+ * '*.wikimedia.org',
+ * '*.wikipedia.org',
+ * );
+ *
+ * @var array|bool
+ */
+$wgUrlShortenerApprovedDomains = false;
+
+/**
  * If you're running a wiki farm, you probably just want to have one
  * central database with all of your short urls.
  * If not set, uses the local wiki's database.
diff --git a/i18n/en.json b/i18n/en.json
index b0826be..38f9aa1 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -14,5 +14,6 @@
"urlshortener-form-header": "Paste your long URL here",
"urlshortener-error-malformed-url": "Not a valid URL",
"urlshortener-shortened-url-label": "Shortened URL",
-   "urlshortener-error-disallowed-url": "URLs to domain $1 are not allowed 
to be shortened"
+   "urlshortener-error-disallowed-url": "URLs to domain $1 are not allowed 
to be shortened",
+   "urlshortener-approved-domains": "Links to the following 
{{PLURAL:$1|domain|domains}} may be shortened: $2."
 }
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 60f8910..b5a7d59 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -15,5 +15,6 @@
"urlshortener-form-header": "Message shown above the form where the 
user can paste a URL to be shortened",
"urlshortener-error-malformed-url": "Message shown to the user when 
they try to submit a malformed URL",
"urlshortener-shortened-url-label": "Message shown to user above the 
shortened URL",
-   "urlshortener-error-disallowed-url": "Message shown to user when they 
try to shorten URLs to a domain that isn't whitelisted. $1 refers to the domain 
of the URL that the user tried to shorten"
+   "urlshortener-error-disallowed-url": "Message shown to user when they 
try to shorten URLs to a domain that isn't whitelisted. $1 refers to the domain 
of the URL that the user tried to shorten",
+   "urlshortener-approved-domains": "Help message displayed on 
Special:UrlShortener showing which domains can be shortened. $1 is the number 
of domains, $2 is a comma separated list of domains."
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idf827cefa747ce5658eb3ee103da4a68361ee34d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UrlShortener
Gerri

[MediaWiki-commits] [Gerrit] Revert "Re-add default=wikipedia lines to wgCanonicalServer ... - change (operations/mediawiki-config)

2015-07-27 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Revert "Re-add default=wikipedia lines to wgCanonicalServer and 
wgSitename"
..


Revert "Re-add default=wikipedia lines to wgCanonicalServer and wgSitename"

This reverts commit 45ed8877f1d0f559d50959fde4a9a963e6404f4e.

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

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



diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 1feab08..8ee2162 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -1384,7 +1384,6 @@
 // This is the same as wgServer but with a protocol, so if wgServer is 
//foo.com this must be http://foo.com
 # wgCanonicalServer @{
 'wgCanonicalServer' => array(
-   'default' => 'https://$lang.wikipedia.org', // TODO: Get rid of this, 
see T104088 and T106963
// Projects
'wikipedia' => 'https://$lang.wikipedia.org',
'wikibooks' => 'https://$lang.wikibooks.org',
@@ -1475,7 +1474,6 @@
 
 # wgSitename @{
 'wgSitename' => array(
-   'default' => 'Wikipedia', // TODO: Get rid of this, see T104088 and 
T106963
// Projects
'wikipedia' => 'Wikipedia',
'wikibooks' => 'Wikibooks',

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

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

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


[MediaWiki-commits] [Gerrit] Revert "Re-add default=wikipedia lines to wgCanonicalServer ... - change (operations/mediawiki-config)

2015-07-27 Thread Alex Monk (Code Review)
Alex Monk has uploaded a new change for review.

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

Change subject: Revert "Re-add default=wikipedia lines to wgCanonicalServer and 
wgSitename"
..

Revert "Re-add default=wikipedia lines to wgCanonicalServer and wgSitename"

This reverts commit 45ed8877f1d0f559d50959fde4a9a963e6404f4e.

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


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 1feab08..8ee2162 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -1384,7 +1384,6 @@
 // This is the same as wgServer but with a protocol, so if wgServer is 
//foo.com this must be http://foo.com
 # wgCanonicalServer @{
 'wgCanonicalServer' => array(
-   'default' => 'https://$lang.wikipedia.org', // TODO: Get rid of this, 
see T104088 and T106963
// Projects
'wikipedia' => 'https://$lang.wikipedia.org',
'wikibooks' => 'https://$lang.wikibooks.org',
@@ -1475,7 +1474,6 @@
 
 # wgSitename @{
 'wgSitename' => array(
-   'default' => 'Wikipedia', // TODO: Get rid of this, see T104088 and 
T106963
// Projects
'wikipedia' => 'Wikipedia',
'wikibooks' => 'Wikibooks',

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

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

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


[MediaWiki-commits] [Gerrit] Update Wikidata to wmf/1.26wmf16 - change (mediawiki...release)

2015-07-27 Thread Aude (Code Review)
Aude has uploaded a new change for review.

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

Change subject: Update Wikidata to wmf/1.26wmf16
..

Update Wikidata to wmf/1.26wmf16

Change-Id: Idb3d114f51b03ae32b884699636c2e6e7439aabe
---
M make-wmf-branch/config.json
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/release 
refs/changes/80/227380/1

diff --git a/make-wmf-branch/config.json b/make-wmf-branch/config.json
index 0b3e3b6..dabd3d2 100644
--- a/make-wmf-branch/config.json
+++ b/make-wmf-branch/config.json
@@ -166,7 +166,7 @@
"special_extensions": {
"CentralNotice": "wmf_deploy",
"DonationInterface": "deployment",
-   "Wikidata": "wmf/1.26wmf13",
+   "Wikidata": "wmf/1.26wmf16",
"SemanticMediaWiki": "1.8.x",
"SemanticResultFormats": "1.8.x",
"Validator": "0.5.x"

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idb3d114f51b03ae32b884699636c2e6e7439aabe
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/tools/release
Gerrit-Branch: master
Gerrit-Owner: Aude 

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


[MediaWiki-commits] [Gerrit] Fix loading of canonical url and site name settings - change (mediawiki...SiteMatrix)

2015-07-27 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Fix loading of canonical url and site name settings
..


Fix loading of canonical url and site name settings

In the case of Wikipedia, $major needs to be 'wikipedia'
and not 'wiki'.

This worked previously because although no match was found
for the wikipedia sites, the default setting assumed
Wikipedia. The default has been removed / changed in wmf
settings so now these were null and blank.

Bug: T106963
Change-Id: I8fc92e432714a3301c6aa6615f461a3a2b380f37
(cherry picked from commit 0bc66ae5be87786112ff2642ff7ffad1c299e0b8)
---
M SiteMatrix_body.php
1 file changed, 30 insertions(+), 8 deletions(-)

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



diff --git a/SiteMatrix_body.php b/SiteMatrix_body.php
index e794812..7d4bdc4 100644
--- a/SiteMatrix_body.php
+++ b/SiteMatrix_body.php
@@ -173,11 +173,10 @@
 * @return Mixed
 */
public function getUrl( $minor, $major, $canonical = false ) {
-   global $wgConf;
-   $dbname = $this->getDBName( $minor, $major );
-   $minor = str_replace( '_', '-', $minor );
-   return $wgConf->get( $canonical ? 'wgCanonicalServer' : 
'wgServer',
-   $dbname, $major, array( 'lang' => $minor, 'site' => 
$major )
+   return $this->getSetting(
+   $canonical ? 'wgCanonicalServer' : 'wgServer',
+   $minor,
+   $major
);
}
 
@@ -187,7 +186,7 @@
 * @return Mixed
 */
public function getCanonicalUrl( $minor, $major ) {
-   return $this->getUrl( $minor, $major, true );
+   return $this->getSetting( 'wgCanonicalServer', $minor, $major );
}
 
/**
@@ -196,9 +195,30 @@
 * @return string
 */
public function getSitename( $minor, $major ) {
+   return $this->getSetting( 'wgSitename', $minor, $major );
+   }
+
+   /**
+* @param string $setting setting name
+* @param string $lang language subdomain
+* @param string $dbSuffix e.g. 'wiki' for 'enwiki' or 'wikisource' for 
'enwikisource'
+*
+* @return mixed
+*/
+   private function getSetting( $setting, $lang, $dbSuffix ) {
global $wgConf;
-   $dbname = $this->getDBName( $minor, $major );
-   return $wgConf->get( 'wgSitename', $dbname );
+
+   $dbname = $this->getDBName( $lang, $dbSuffix );
+
+   list( $major, $minor ) = $wgConf->siteFromDB( $dbname );
+   $minor = str_replace( '_', '-', $minor );
+
+   return $wgConf->get(
+   $setting,
+   $dbname,
+   $major,
+   array( 'lang' => $minor, 'site' => $major )
+   );
}
 
/**
@@ -234,6 +254,8 @@
// not very reliable.
global $wgConf;
 
+   list( $major, $minor ) = $wgConf->siteFromDB( $dbname );
+
if ( $wgConf->get( 'wgReadOnly', $dbname, $major, 
array( 'site' => $major, 'lang' => $minor ) ) ) {
return true;
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8fc92e432714a3301c6aa6615f461a3a2b380f37
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SiteMatrix
Gerrit-Branch: wmf/1.26wmf15
Gerrit-Owner: Alex Monk 
Gerrit-Reviewer: Alex Monk 
Gerrit-Reviewer: Aude 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Fix loading of canonical url and site name settings - change (mediawiki...SiteMatrix)

2015-07-27 Thread Alex Monk (Code Review)
Alex Monk has uploaded a new change for review.

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

Change subject: Fix loading of canonical url and site name settings
..

Fix loading of canonical url and site name settings

In the case of Wikipedia, $major needs to be 'wikipedia'
and not 'wiki'.

This worked previously because although no match was found
for the wikipedia sites, the default setting assumed
Wikipedia. The default has been removed / changed in wmf
settings so now these were null and blank.

Bug: T106963
Change-Id: I8fc92e432714a3301c6aa6615f461a3a2b380f37
(cherry picked from commit 0bc66ae5be87786112ff2642ff7ffad1c299e0b8)
---
M SiteMatrix_body.php
1 file changed, 30 insertions(+), 8 deletions(-)


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

diff --git a/SiteMatrix_body.php b/SiteMatrix_body.php
index e794812..7d4bdc4 100644
--- a/SiteMatrix_body.php
+++ b/SiteMatrix_body.php
@@ -173,11 +173,10 @@
 * @return Mixed
 */
public function getUrl( $minor, $major, $canonical = false ) {
-   global $wgConf;
-   $dbname = $this->getDBName( $minor, $major );
-   $minor = str_replace( '_', '-', $minor );
-   return $wgConf->get( $canonical ? 'wgCanonicalServer' : 
'wgServer',
-   $dbname, $major, array( 'lang' => $minor, 'site' => 
$major )
+   return $this->getSetting(
+   $canonical ? 'wgCanonicalServer' : 'wgServer',
+   $minor,
+   $major
);
}
 
@@ -187,7 +186,7 @@
 * @return Mixed
 */
public function getCanonicalUrl( $minor, $major ) {
-   return $this->getUrl( $minor, $major, true );
+   return $this->getSetting( 'wgCanonicalServer', $minor, $major );
}
 
/**
@@ -196,9 +195,30 @@
 * @return string
 */
public function getSitename( $minor, $major ) {
+   return $this->getSetting( 'wgSitename', $minor, $major );
+   }
+
+   /**
+* @param string $setting setting name
+* @param string $lang language subdomain
+* @param string $dbSuffix e.g. 'wiki' for 'enwiki' or 'wikisource' for 
'enwikisource'
+*
+* @return mixed
+*/
+   private function getSetting( $setting, $lang, $dbSuffix ) {
global $wgConf;
-   $dbname = $this->getDBName( $minor, $major );
-   return $wgConf->get( 'wgSitename', $dbname );
+
+   $dbname = $this->getDBName( $lang, $dbSuffix );
+
+   list( $major, $minor ) = $wgConf->siteFromDB( $dbname );
+   $minor = str_replace( '_', '-', $minor );
+
+   return $wgConf->get(
+   $setting,
+   $dbname,
+   $major,
+   array( 'lang' => $minor, 'site' => $major )
+   );
}
 
/**
@@ -234,6 +254,8 @@
// not very reliable.
global $wgConf;
 
+   list( $major, $minor ) = $wgConf->siteFromDB( $dbname );
+
if ( $wgConf->get( 'wgReadOnly', $dbname, $major, 
array( 'site' => $major, 'lang' => $minor ) ) ) {
return true;
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8fc92e432714a3301c6aa6615f461a3a2b380f37
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SiteMatrix
Gerrit-Branch: wmf/1.26wmf15
Gerrit-Owner: Alex Monk 
Gerrit-Reviewer: Aude 

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


[MediaWiki-commits] [Gerrit] Make WikimediaEventsHooks::onSpecialSearchResults() static - change (mediawiki...WikimediaEvents)

2015-07-27 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Make WikimediaEventsHooks::onSpecialSearchResults() static
..


Make WikimediaEventsHooks::onSpecialSearchResults() static

Bug: T107117
Change-Id: I4e200d051fcfed7ce85a6cbf9ec7aa4d7eead400
---
M WikimediaEventsHooks.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/WikimediaEventsHooks.php b/WikimediaEventsHooks.php
index 022ec7d..97325ba 100644
--- a/WikimediaEventsHooks.php
+++ b/WikimediaEventsHooks.php
@@ -351,7 +351,7 @@
 * SERP or not. This ends up being non-trivial due to localization, so
 * make it trivial by injecting a boolean value to check.
 */
-   public function onSpecialSearchResults( $term, &$titleMatches, 
&$textMatches ) {
+   public static function onSpecialSearchResults( $term, &$titleMatches, 
&$textMatches ) {
global $wgOut;
 
$wgOut->addJsConfigVars( array(

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4e200d051fcfed7ce85a6cbf9ec7aa4d7eead400
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikimediaEvents
Gerrit-Branch: master
Gerrit-Owner: Reedy 
Gerrit-Reviewer: Alex Monk 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Make WikimediaEventsHooks::onSpecialSearchResults() static - change (mediawiki...WikimediaEvents)

2015-07-27 Thread Reedy (Code Review)
Reedy has uploaded a new change for review.

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

Change subject: Make WikimediaEventsHooks::onSpecialSearchResults() static
..

Make WikimediaEventsHooks::onSpecialSearchResults() static

Bug: T107117
Change-Id: I4e200d051fcfed7ce85a6cbf9ec7aa4d7eead400
---
M WikimediaEventsHooks.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/WikimediaEventsHooks.php b/WikimediaEventsHooks.php
index 022ec7d..97325ba 100644
--- a/WikimediaEventsHooks.php
+++ b/WikimediaEventsHooks.php
@@ -351,7 +351,7 @@
 * SERP or not. This ends up being non-trivial due to localization, so
 * make it trivial by injecting a boolean value to check.
 */
-   public function onSpecialSearchResults( $term, &$titleMatches, 
&$textMatches ) {
+   public static function onSpecialSearchResults( $term, &$titleMatches, 
&$textMatches ) {
global $wgOut;
 
$wgOut->addJsConfigVars( array(

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4e200d051fcfed7ce85a6cbf9ec7aa4d7eead400
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikimediaEvents
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] Regression: Don't show button labels in Overlay - change (mediawiki...MobileFrontend)

2015-07-27 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Regression: Don't show button labels in Overlay
..


Regression: Don't show button labels in Overlay

Limit the workaround to the affected element only.

Bug: T107090
Change-Id: I7afa9e4add51ecf1facdd43f560232af426ff5b5
---
M resources/mobile.overlays/Overlay.less
1 file changed, 2 insertions(+), 1 deletion(-)

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



diff --git a/resources/mobile.overlays/Overlay.less 
b/resources/mobile.overlays/Overlay.less
index 7204da6..f0c75e2 100644
--- a/resources/mobile.overlays/Overlay.less
+++ b/resources/mobile.overlays/Overlay.less
@@ -296,7 +296,8 @@
top: 0;
 
// Workaround for chrome. See https://phabricator.wikimedia.org/T98846
-   .mw-ui-icon.mw-ui-icon-element {
+   // without .back the labels show. See 
https://phabricator.wikimedia.org/T107090
+   .mw-ui-icon.mw-ui-icon-element.back {
overflow: visible;
}
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7afa9e4add51ecf1facdd43f560232af426ff5b5
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Bmansurov 
Gerrit-Reviewer: BarryTheBrowserTestBot 
Gerrit-Reviewer: Jdlrobson 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Fix loading of canonical url and site name settings - change (mediawiki...SiteMatrix)

2015-07-27 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Fix loading of canonical url and site name settings
..


Fix loading of canonical url and site name settings

In the case of Wikipedia, $major needs to be 'wikipedia'
and not 'wiki'.

This worked previously because although no match was found
for the wikipedia sites, the default setting assumed
Wikipedia. The default has been removed / changed in wmf
settings so now these were null and blank.

Bug: T106963
Change-Id: I8fc92e432714a3301c6aa6615f461a3a2b380f37
---
M SiteMatrix_body.php
1 file changed, 30 insertions(+), 8 deletions(-)

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



diff --git a/SiteMatrix_body.php b/SiteMatrix_body.php
index e794812..7d4bdc4 100644
--- a/SiteMatrix_body.php
+++ b/SiteMatrix_body.php
@@ -173,11 +173,10 @@
 * @return Mixed
 */
public function getUrl( $minor, $major, $canonical = false ) {
-   global $wgConf;
-   $dbname = $this->getDBName( $minor, $major );
-   $minor = str_replace( '_', '-', $minor );
-   return $wgConf->get( $canonical ? 'wgCanonicalServer' : 
'wgServer',
-   $dbname, $major, array( 'lang' => $minor, 'site' => 
$major )
+   return $this->getSetting(
+   $canonical ? 'wgCanonicalServer' : 'wgServer',
+   $minor,
+   $major
);
}
 
@@ -187,7 +186,7 @@
 * @return Mixed
 */
public function getCanonicalUrl( $minor, $major ) {
-   return $this->getUrl( $minor, $major, true );
+   return $this->getSetting( 'wgCanonicalServer', $minor, $major );
}
 
/**
@@ -196,9 +195,30 @@
 * @return string
 */
public function getSitename( $minor, $major ) {
+   return $this->getSetting( 'wgSitename', $minor, $major );
+   }
+
+   /**
+* @param string $setting setting name
+* @param string $lang language subdomain
+* @param string $dbSuffix e.g. 'wiki' for 'enwiki' or 'wikisource' for 
'enwikisource'
+*
+* @return mixed
+*/
+   private function getSetting( $setting, $lang, $dbSuffix ) {
global $wgConf;
-   $dbname = $this->getDBName( $minor, $major );
-   return $wgConf->get( 'wgSitename', $dbname );
+
+   $dbname = $this->getDBName( $lang, $dbSuffix );
+
+   list( $major, $minor ) = $wgConf->siteFromDB( $dbname );
+   $minor = str_replace( '_', '-', $minor );
+
+   return $wgConf->get(
+   $setting,
+   $dbname,
+   $major,
+   array( 'lang' => $minor, 'site' => $major )
+   );
}
 
/**
@@ -234,6 +254,8 @@
// not very reliable.
global $wgConf;
 
+   list( $major, $minor ) = $wgConf->siteFromDB( $dbname );
+
if ( $wgConf->get( 'wgReadOnly', $dbname, $major, 
array( 'site' => $major, 'lang' => $minor ) ) ) {
return true;
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8fc92e432714a3301c6aa6615f461a3a2b380f37
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/SiteMatrix
Gerrit-Branch: master
Gerrit-Owner: Aude 
Gerrit-Reviewer: Alex Monk 
Gerrit-Reviewer: Hoo man 
Gerrit-Reviewer: Reedy 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] New deployment branch: wmf/1.26wmf16 - change (mediawiki...Wikidata)

2015-07-27 Thread Aude (Code Review)
Aude has uploaded a new change for review.

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

Change subject: New deployment branch: wmf/1.26wmf16
..

New deployment branch: wmf/1.26wmf16

Change-Id: I3256bf9b748b50d5fbd9dc6b14b03b51723ad4e6
---
M WikibaseClient.settings.php
M WikibaseRepo.settings.php
M composer.json
M composer.lock
M extensions/Constraints/README.md
M extensions/Constraints/WikibaseQualityConstraints.php
M extensions/Constraints/composer.json
R extensions/Constraints/maintenance/UpdateConstraintsTable.php
R 
extensions/Constraints/tests/phpunit/Maintenance/UpdateConstraintsTableTest.php
M extensions/PropertySuggester/README.md
M 
extensions/PropertySuggester/tests/phpunit/PropertySuggester/GetSuggestionsTest.php
M 
extensions/PropertySuggester/tests/phpunit/PropertySuggester/ResultBuilderTest.php
M 
extensions/PropertySuggester/tests/phpunit/PropertySuggester/SuggesterParamsParserTest.php
M 
extensions/PropertySuggester/tests/phpunit/PropertySuggester/Suggesters/SimpleSuggesterTest.php
M 
extensions/PropertySuggester/tests/phpunit/PropertySuggester/SuggestionGeneratorTest.php
M 
extensions/PropertySuggester/tests/phpunit/PropertySuggester/UpdateTable/UpdateTableTest.php
M extensions/Wikibase/Wikibase.php
M extensions/Wikibase/build/travis/install.sh
M extensions/Wikibase/client/ExampleSettings.php
M extensions/Wikibase/client/WikibaseClient.hooks.php
M extensions/Wikibase/client/WikibaseClient.i18n.magic.php
M extensions/Wikibase/client/WikibaseClient.php
M extensions/Wikibase/client/config/WikibaseClient.default.php
M extensions/Wikibase/client/i18n/av.json
M extensions/Wikibase/client/i18n/az.json
M extensions/Wikibase/client/i18n/bn.json
M extensions/Wikibase/client/i18n/br.json
M extensions/Wikibase/client/i18n/bs.json
M extensions/Wikibase/client/i18n/ce.json
M extensions/Wikibase/client/i18n/cs.json
M extensions/Wikibase/client/i18n/de.json
M extensions/Wikibase/client/i18n/dty.json
M extensions/Wikibase/client/i18n/en.json
M extensions/Wikibase/client/i18n/es.json
M extensions/Wikibase/client/i18n/et.json
M extensions/Wikibase/client/i18n/eu.json
M extensions/Wikibase/client/i18n/fa.json
M extensions/Wikibase/client/i18n/fi.json
M extensions/Wikibase/client/i18n/fr.json
M extensions/Wikibase/client/i18n/frr.json
M extensions/Wikibase/client/i18n/gl.json
M extensions/Wikibase/client/i18n/gom-deva.json
M extensions/Wikibase/client/i18n/gom-latn.json
M extensions/Wikibase/client/i18n/he.json
A extensions/Wikibase/client/i18n/hrx.json
M extensions/Wikibase/client/i18n/it.json
M extensions/Wikibase/client/i18n/ja.json
A extensions/Wikibase/client/i18n/kw.json
A extensions/Wikibase/client/i18n/ky.json
M extensions/Wikibase/client/i18n/lb.json
M extensions/Wikibase/client/i18n/lt.json
M extensions/Wikibase/client/i18n/luz.json
A extensions/Wikibase/client/i18n/mzn.json
M extensions/Wikibase/client/i18n/ne.json
M extensions/Wikibase/client/i18n/oc.json
M extensions/Wikibase/client/i18n/pl.json
A extensions/Wikibase/client/i18n/prs.json
M extensions/Wikibase/client/i18n/ps.json
M extensions/Wikibase/client/i18n/pt.json
M extensions/Wikibase/client/i18n/qqq.json
M extensions/Wikibase/client/i18n/ro.json
M extensions/Wikibase/client/i18n/ru.json
M extensions/Wikibase/client/i18n/sl.json
M extensions/Wikibase/client/i18n/sr-ec.json
M extensions/Wikibase/client/i18n/sr-el.json
M extensions/Wikibase/client/i18n/sv.json
M extensions/Wikibase/client/i18n/tl.json
M extensions/Wikibase/client/i18n/tt-cyrl.json
M extensions/Wikibase/client/i18n/udm.json
M extensions/Wikibase/client/i18n/vi.json
M extensions/Wikibase/client/i18n/yi.json
M extensions/Wikibase/client/i18n/yue.json
M extensions/Wikibase/client/i18n/zh-hans.json
M extensions/Wikibase/client/i18n/zh-hant.json
M extensions/Wikibase/client/includes/CachingOtherProjectsSitesProvider.php
M extensions/Wikibase/client/includes/Changes/ChangeHandler.php
M extensions/Wikibase/client/includes/Changes/ChangeRunCoalescer.php
M extensions/Wikibase/client/includes/Changes/WikiPageUpdater.php
M extensions/Wikibase/client/includes/DataAccess/PropertyIdResolver.php
M 
extensions/Wikibase/client/includes/DataAccess/PropertyParserFunction/PropertyClaimsRendererFactory.php
M 
extensions/Wikibase/client/includes/DataAccess/PropertyParserFunction/Runner.php
M extensions/Wikibase/client/includes/DataAccess/Scribunto/EntityAccessor.php
M 
extensions/Wikibase/client/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseEntityLibrary.php
M 
extensions/Wikibase/client/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseLibrary.php
M 
extensions/Wikibase/client/includes/DataAccess/Scribunto/WikibaseLuaBindings.php
M extensions/Wikibase/client/includes/DataAccess/SnaksFinder.php
M extensions/Wikibase/client/includes/Hooks/SpecialWatchlistQueryHandler.php
M extensions/Wikibase/client/includes/Hooks/UpdateRepoHookHandlers.php
M extensions/Wikibase/client/includes/SiteLinkCommentCreator.php
M extensions/Wikibase/cl

[MediaWiki-commits] [Gerrit] When user can not post a new thread, let the non-AJAX path h... - change (mediawiki...LiquidThreads)

2015-07-27 Thread Mattflaschen (Code Review)
Mattflaschen has uploaded a new change for review.

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

Change subject: When user can not post a new thread, let the non-AJAX path 
handle it
..

When user can not post a new thread, let the non-AJAX path handle it

This avoids a fatal due to a missing API parameter.

Bug: T104421
Change-Id: Ife478686bfce437f195b9cc47600743bc52900c1
---
M i18n/en.json
M lqt.js
2 files changed, 11 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/LiquidThreads 
refs/changes/76/227376/1

diff --git a/i18n/en.json b/i18n/en.json
index 29dbeb4..89b05d4 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -229,7 +229,7 @@
"restriction-newthread": "Post new threads",
"lqt-protected-reply-thread": "You cannot post in this thread because 
it has been protected from new posts.",
"lqt-protected-reply-talkpage": "You cannot post in this thread because 
this discussion page has been protected from replies to its threads.",
-   "lqt-protected-newthread": "You cannot post new threads to this 
discussion page because it has been protected from new threads.",
+   "lqt-protected-newthread": "You cannot post new threads to this 
discussion page because it has been protected from new threads, or you do not 
currently have permission to edit.",
"lqt-edit-bump": "Bump this thread",
"lqt-edit-bump-tooltip": "Move this thread to the top of its discussion 
page",
"lqt-historicalrevision-error": "The revision you have selected is 
corrupt, and cannot be viewed.",
diff --git a/lqt.js b/lqt.js
index f1d9176..69e163e 100644
--- a/lqt.js
+++ b/lqt.js
@@ -105,16 +105,19 @@
},
 
'handleNewLink' : function ( e ) {
-   e.preventDefault();
-
var talkpage = $( this ).attr( 'lqt_talkpage' );
-   var params = { 'talkpage' : talkpage, 'method' : 
'talkpage_new_thread' };
 
-   var container = $( '.lqt-new-thread' );
-   container.data( 'lqt-talkpage', talkpage );
+   if ( talkpage !== undefined ) {
+   e.preventDefault();
 
-   liquidThreads.injectEditForm( params, container );
-   liquidThreads.currentReplyThread = 0;
+   var params = { 'talkpage' : talkpage, 'method' : 
'talkpage_new_thread' };
+
+   var container = $( '.lqt-new-thread' );
+   container.data( 'lqt-talkpage', talkpage );
+
+   liquidThreads.injectEditForm( params, container );
+   liquidThreads.currentReplyThread = 0;
+   }
},
 
'handleEditLink' : function ( e ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ife478686bfce437f195b9cc47600743bc52900c1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/LiquidThreads
Gerrit-Branch: master
Gerrit-Owner: Mattflaschen 

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


[MediaWiki-commits] [Gerrit] Parse more of AstroPay's error descriptions - change (mediawiki...DonationInterface)

2015-07-27 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Parse more of AstroPay's error descriptions
..


Parse more of AstroPay's error descriptions

AstroPay's error codes are still unreliable and not informative enough
to drive our decisions.  But at least we have a list of error
descriptions with suggested ways to proceed.

This patch deals with invalid CPF errors, over-the-limit errors,
blacklisted user errors, and 'could not register' (capacity?) errors.

Also, log the whole response when AstroPay returns an error, and tweak
css so long error messages at the top don't widen the form.

Bug: T106053
Change-Id: I97db8f6216d75a0da508af713ef02616d8fe90d1
---
M astropay_gateway/astropay.adapter.php
M gateway_common/i18n/interface/en.json
M gateway_common/i18n/interface/qqq.json
M gateway_forms/mustache/forms.css
M gateway_forms/mustache/index.html.mustache
M tests/Adapter/Astropay/AstropayTest.php
M tests/includes/Responses/astropay/NewInvoice_1.testresponse
A tests/includes/Responses/astropay/NewInvoice_could_not_register.testresponse
A tests/includes/Responses/astropay/NewInvoice_fiscal_number.testresponse
A tests/includes/Responses/astropay/NewInvoice_limit_exceeded.testresponse
A tests/includes/Responses/astropay/NewInvoice_user_unauthorized.testresponse
11 files changed, 152 insertions(+), 23 deletions(-)

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



diff --git a/astropay_gateway/astropay.adapter.php 
b/astropay_gateway/astropay.adapter.php
index 66ea948..18b5f63 100644
--- a/astropay_gateway/astropay.adapter.php
+++ b/astropay_gateway/astropay.adapter.php
@@ -632,28 +632,50 @@
);
}
} else {
-   $logme = "Astropay response has non-zero status 
{$response['status']}.";
+   $logme = 'Astropay response has non-zero status.  Full 
response: '
+   . print_r( $response, true );
+   $this->logger->warning( $logme );
+
+   $code = 'internal-';
+   $message = $this->getErrorMapByCodeAndTranslate( $code 
);
+   $context = null;
+
if ( isset( $response['desc'] ) ) {
-   // They don't give us codes to distinguish 
failure modes, so we
-   // have to parse the description.
-   if ( preg_match( '/invoice already used/i', 
$response['desc'] ) ) {
+   // error codes are unreliable, so we have to 
examine the description
+   if ( preg_match( '/^invoice already used/i', 
$response['desc'] ) ) {
$this->logger->error( 'Order ID 
collision! Starting again.' );
throw new ResponseProcessingException(
'Order ID collision! Starting 
again.',

ResponseCodes::DUPLICATE_ORDER_ID,
array( 'order_id' )
);
+   } else if ( preg_match( '/^could not register 
user/i', $response['desc'] ) ) {
+   // AstroPay is overwhelmed.  Tell the 
donor to try again soon.
+   $message = WmfFramework::formatMessage( 
'donate_interface-try-again' );
+   } else if ( preg_match( '/^user 
(unauthorized|blacklisted)/i', $response['desc'] ) ) {
+   // They are blacklisted by Astropay for 
shady doings,
+   // or listed delinquent by their 
government.
+   // Either way, we can't process 'em 
through AstroPay
+   $this->finalizeInternalStatus( 
FinalStatus::FAILED );
+   } else if ( preg_match( '/^the user limit has 
been exceeded/i', $response['desc'] ) ) {
+   // They've spent too much via AstroPay 
today.
+   // Setting context to 'amount' will 
tell the form to treat
+   // this like a validation error and 
make amount editable.
+   $context = 'amount';
+   $message = WmfFramework::formatMessage( 
'donate_interface-error-msg-limit' );
+   } else if ( preg_match( '/param x_cpf$/i', 
$response['desc'] ) ) {
+   // Something wrong with the fiscal 
number
+   $context = 'fiscal_number';
+   $language 

[MediaWiki-commits] [Gerrit] Add country-specific versions of fiscal_number - change (mediawiki...DonationInterface)

2015-07-27 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Add country-specific versions of fiscal_number
..


Add country-specific versions of fiscal_number

Bug: T106137
Change-Id: I73aa199287a397ae4435d5d3079a995e246feb25
---
M gateway_common/i18n/interface/en.json
M gateway_common/i18n/interface/pt-br.json
M gateway_common/i18n/interface/pt.json
M gateway_common/i18n/interface/qqq.json
A tests/MessageTest.php
5 files changed, 62 insertions(+), 6 deletions(-)

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



diff --git a/gateway_common/i18n/interface/en.json 
b/gateway_common/i18n/interface/en.json
index 6725b84..c28b93c 100644
--- a/gateway_common/i18n/interface/en.json
+++ b/gateway_common/i18n/interface/en.json
@@ -157,6 +157,14 @@
"donate_interface-donor-submit": "Donate",
"donate_interface-donor-currency-msg": "This donation is being made in 
$1",
"donate_interface-donor-fiscal_number": "Fiscal number",
+   "donate_interface-donor-fiscal_number-ar": "CUIT",
+   "donate_interface-donor-fiscal_number-bo": "NIT",
+   "donate_interface-donor-fiscal_number-br": "CPF",
+   "donate_interface-donor-fiscal_number-cl": "RUT",
+   "donate_interface-donor-fiscal_number-co": "NIT",
+   "donate_interface-donor-fiscal_number-mx": "RFC",
+   "donate_interface-donor-fiscal_number-pe": "RUC",
+   "donate_interface-donor-fiscal_number-uy": "RUT",
"donate_interface-card-name-amex": "American Express",
"donate_interface-card-name-visa": "Visa",
"donate_interface-card-name-mc": "MasterCard",
@@ -200,6 +208,14 @@
"donate_interface-error-msg-genaricrequired": "This field is required",
"donate_interface-error-msg-country-calc": "Error - We are unable to 
accept your donation at this time.",
"donate_interface-error-msg-fiscal_number": "fiscal number",
+   "donate_interface-error-msg-fiscal_number-ar": "CUIT",
+   "donate_interface-error-msg-fiscal_number-bo": "NIT",
+   "donate_interface-error-msg-fiscal_number-br": "CPF",
+   "donate_interface-error-msg-fiscal_number-cl": "RUT",
+   "donate_interface-error-msg-fiscal_number-co": "NIT",
+   "donate_interface-error-msg-fiscal_number-mx": "RFC",
+   "donate_interface-error-msg-fiscal_number-pe": "RUC",
+   "donate_interface-error-msg-fiscal_number-uy": "RUT",
"donate_interface-donate-error-try-a-different-card": "Please [$1 try a 
different card] or one of our [$2 other ways to give] or contact us at $3",
"donate_interface-donate-error-try-again-html": "Please try again, try one of our other ways to 
give, or contact us at mailto:$3\";>$3",
"donate_interface-donate-error-thank-you-for-your-support": "Thank you 
for your support!",
diff --git a/gateway_common/i18n/interface/pt-br.json 
b/gateway_common/i18n/interface/pt-br.json
index bf17f4c..e452d26 100644
--- a/gateway_common/i18n/interface/pt-br.json
+++ b/gateway_common/i18n/interface/pt-br.json
@@ -166,7 +166,8 @@
"donate_interface-donor-security": "Código de segurança:",
"donate_interface-donor-submit": "Doar",
"donate_interface-donor-currency-msg": "Esta doação está se realizando 
em $1",
-   "donate_interface-donor-fiscal_number": "CPF",
+   "donate_interface-donor-fiscal_number": "Número fiscal",
+   "donate_interface-donor-fiscal_number-br": "CPF",
"donate_interface-card-name-amex": "American Express",
"donate_interface-card-name-visa": "Visa",
"donate_interface-card-name-mc": "Mastercard",
@@ -209,7 +210,8 @@
"donate_interface-error-msg-cookies": "Por favor permitir cookies em 
seu navegador.",
"donate_interface-error-msg-genaricrequired": "Este campo é 
obrigatório",
"donate_interface-error-msg-country-calc": "Erro- não foi possivel 
aceitar sua  doação neste momento",
-   "donate_interface-error-msg-fiscal_number": "CPF",
+   "donate_interface-error-msg-fiscal_number": "Número fiscal",
+   "donate_interface-error-msg-fiscal_number-br": "CPF",
"donate_interface-donate-error-try-a-different-card": "Por favor, [$1 
teste com um cartão diferente] ou com uma das [$2 diferentes formas de doar] ou 
entre em contato conosco no endereço $3",
"donate_interface-donate-error-try-again-html": "Por favor, tente novamente, tente outra de nossas maneiras 
para dar ou contate-nos em mailto:$3\";>$3",
"donate_interface-donate-error-thank-you-for-your-support": "Obrigado 
pelo seu apoio!",
diff --git a/gateway_common/i18n/interface/pt.json 
b/gateway_common/i18n/interface/pt.json
index b358cfe..c4c984d 100644
--- a/gateway_common/i18n/interface/pt.json
+++ b/gateway_common/i18n/interface/pt.json
@@ -168,7 +168,8 @@
"donate_interface-donor-security": "Código de segurança",
"donate_interface-donor-submit": "Fazer donativo",
"dona

[MediaWiki-commits] [Gerrit] Initialise repo - change (operations...plugins)

2015-07-27 Thread BryanDavis (Code Review)
BryanDavis has submitted this change and it was merged.

Change subject: Initialise repo
..


Initialise repo

* Copy-n-paste the .git controls files from
  operations/software/elasticsearch/plugins
* Store gem files in gitfat

Bug: T99735
Change-Id: I555e3187e12949ac9e85c86308e1033cdf306c9b
---
A .gitattributes
A .gitfat
A .gitignore
A .gitreview
4 files changed, 10 insertions(+), 0 deletions(-)

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



diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 000..d9f744b
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1 @@
+*.gem filter=fat -crlf
diff --git a/.gitfat b/.gitfat
new file mode 100644
index 000..108e44a
--- /dev/null
+++ b/.gitfat
@@ -0,0 +1,3 @@
+[rsync]
+remote = archiva.wikimedia.org::archiva/git-fat
+options = --copy-links --verbose
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000..7b18b55
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+.deploy
diff --git a/.gitreview b/.gitreview
new file mode 100644
index 000..68bf33d
--- /dev/null
+++ b/.gitreview
@@ -0,0 +1,5 @@
+[gerrit]
+host=gerrit.wikimedia.org
+port=29418
+project=operations/software/logstash/plugins.git
+defaultbranch=master

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I555e3187e12949ac9e85c86308e1033cdf306c9b
Gerrit-PatchSet: 2
Gerrit-Project: operations/software/logstash/plugins
Gerrit-Branch: master
Gerrit-Owner: BryanDavis 
Gerrit-Reviewer: BryanDavis 

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


[MediaWiki-commits] [Gerrit] Check error['context'] to place error messages - change (mediawiki...DonationInterface)

2015-07-27 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Check error['context'] to place error messages
..


Check error['context'] to place error messages

We got hacks on hacks on hacks.
Not fixing this in a more comprehensive way right now, cos I've got
my hopes up for shoving a ton of stuff into SmashPig
TODO: can we get rid of getTransactionErrors now?

Bug: T106053
Change-Id: Ic6a72d9e80e07d2b3e4e6997b4ab9cd3f2766cbe
---
M gateway_common/GatewayPage.php
1 file changed, 5 insertions(+), 3 deletions(-)

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



diff --git a/gateway_common/GatewayPage.php b/gateway_common/GatewayPage.php
index 75f5758..63c0811 100644
--- a/gateway_common/GatewayPage.php
+++ b/gateway_common/GatewayPage.php
@@ -472,10 +472,12 @@
} elseif ( $errors = $result->getErrors() ) {
// FIXME: Creepy.  Currently, the form inspects adapter 
errors.  Use
// the stuff encapsulated in PaymentResult instead.
-   foreach ( $this->adapter->getTransactionErrors() as 
$code => $message ) {
-
+   foreach ( 
$this->adapter->getTransactionResponse()->getErrors() as $code => 
$transactionError ) {
+   $message = $transactionError['message'];
$error = array();
-   if ( strpos( $code, 'internal' ) === 0 ) {
+   if ( !empty( $transactionError['context'] ) ) {
+   $error[$transactionError['context']] = 
$message;
+   } else if ( strpos( $code, 'internal' ) === 0 ) 
{
$error['retryMsg'][ $code ] = $message;
}
else {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic6a72d9e80e07d2b3e4e6997b4ab9cd3f2766cbe
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/DonationInterface
Gerrit-Branch: master
Gerrit-Owner: Ejegg 
Gerrit-Reviewer: AndyRussG 
Gerrit-Reviewer: Awight 
Gerrit-Reviewer: Ssmith 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Use old error forms for AstroPay fail page - change (mediawiki...DonationInterface)

2015-07-27 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Use old error forms for AstroPay fail page
..


Use old error forms for AstroPay fail page

TODO: create mustache error form.

Bug: T106053
Change-Id: I09bca28abd8f2cd4ece8414c2ee6ec3eb819f628
---
M DonationInterfaceFormSettings.php
M astropay_gateway/astropay.adapter.php
2 files changed, 7 insertions(+), 3 deletions(-)

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



diff --git a/DonationInterfaceFormSettings.php 
b/DonationInterfaceFormSettings.php
index a80f32b..98f9074 100644
--- a/DonationInterfaceFormSettings.php
+++ b/DonationInterfaceFormSettings.php
@@ -563,19 +563,19 @@
 
 $forms_whitelist['error-default'] = array (
'file' => $form_dirs['default'] . '/error-cc.html',
-   'gateway' => array ( 'globalcollect', 'adyen', 'amazon', 'paypal', 
'worldpay' ),
+   'gateway' => array ( 'globalcollect', 'adyen', 'amazon', 'astropay', 
'paypal', 'worldpay' ),
'special_type' => 'error', //brble
 );
 
 $forms_whitelist['error-noform'] = array (
'file' => $form_dirs['default'] . '/error-noform.html',
-   'gateway' => array ( 'globalcollect', 'adyen', 'amazon', 'paypal', 
'worldpay' ),
+   'gateway' => array ( 'globalcollect', 'adyen', 'amazon', 'astropay', 
'paypal', 'worldpay' ),
'special_type' => 'error',
 );
 
 $forms_whitelist['error-cc'] = array (
'file' => $form_dirs['default'] . '/error-cc.html',
-   'gateway' => array ( 'globalcollect', 'adyen', 'worldpay' ),
+   'gateway' => array ( 'globalcollect', 'adyen', 'astropay', 'worldpay' ),
'payment_methods' => array ( 'cc' => 'ALL' ),
'special_type' => 'error',
 );
diff --git a/astropay_gateway/astropay.adapter.php 
b/astropay_gateway/astropay.adapter.php
index 08b0950..66ea948 100644
--- a/astropay_gateway/astropay.adapter.php
+++ b/astropay_gateway/astropay.adapter.php
@@ -27,6 +27,10 @@
const GLOBAL_PREFIX = 'wgAstropayGateway';
 
public function getFormClass() {
+   if ( strpos( $this->dataObj->getVal_Escaped( 'ffname' ), 
'error') === 0 ) {
+   // TODO: make a mustache error form
+   return parent::getFormClass();
+   }
return 'Gateway_Form_Mustache';
}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I09bca28abd8f2cd4ece8414c2ee6ec3eb819f628
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/DonationInterface
Gerrit-Branch: master
Gerrit-Owner: Ejegg 
Gerrit-Reviewer: AndyRussG 
Gerrit-Reviewer: Awight 
Gerrit-Reviewer: Ssmith 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Initialise repo - change (operations...plugins)

2015-07-27 Thread BryanDavis (Code Review)
BryanDavis has uploaded a new change for review.

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

Change subject: Initialise repo
..

Initialise repo

* Copy-n-paste the .git controls files from
  operations/software/elasticsearch/plugins
* Store gem files in gitfat

Change-Id: I555e3187e12949ac9e85c86308e1033cdf306c9b
---
A .gitattributes
A .gitfat
A .gitignore
A .gitreview
4 files changed, 10 insertions(+), 0 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/operations/software/logstash/plugins 
refs/changes/75/227375/1

diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 000..d9f744b
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1 @@
+*.gem filter=fat -crlf
diff --git a/.gitfat b/.gitfat
new file mode 100644
index 000..108e44a
--- /dev/null
+++ b/.gitfat
@@ -0,0 +1,3 @@
+[rsync]
+remote = archiva.wikimedia.org::archiva/git-fat
+options = --copy-links --verbose
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000..7b18b55
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+.deploy
diff --git a/.gitreview b/.gitreview
new file mode 100644
index 000..68bf33d
--- /dev/null
+++ b/.gitreview
@@ -0,0 +1,5 @@
+[gerrit]
+host=gerrit.wikimedia.org
+port=29418
+project=operations/software/logstash/plugins.git
+defaultbranch=master

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I555e3187e12949ac9e85c86308e1033cdf306c9b
Gerrit-PatchSet: 1
Gerrit-Project: operations/software/logstash/plugins
Gerrit-Branch: master
Gerrit-Owner: BryanDavis 

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


[MediaWiki-commits] [Gerrit] Generate new order IDs for each NewInvoice call - change (mediawiki...DonationInterface)

2015-07-27 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Generate new order IDs for each NewInvoice call
..


Generate new order IDs for each NewInvoice call

AstroPay needs a different merchant-side identifier for each
NewInvoice call.  This commit introduces a 'sequence' key so as not
to abuse the numAttempt, which should only be incremented when
setting final status for a payment attempt.

Bug: T106039
Change-Id: I91b49430aeab43150f63751c51f56bb4c906051e
---
M astropay_gateway/astropay.adapter.php
M gateway_common/gateway.adapter.php
M tests/Adapter/Astropay/AstropayTest.php
M tests/Adapter/GatewayAdapterTest.php
M tests/Adapter/Worldpay/WorldpayTest.php
A tests/includes/Responses/astropay/NewInvoice_collision.testresponse
M worldpay_gateway/worldpay.adapter.php
7 files changed, 98 insertions(+), 13 deletions(-)

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



diff --git a/astropay_gateway/astropay.adapter.php 
b/astropay_gateway/astropay.adapter.php
index 2db25b9..08b0950 100644
--- a/astropay_gateway/astropay.adapter.php
+++ b/astropay_gateway/astropay.adapter.php
@@ -127,7 +127,7 @@
 
/**
 * Sets up the $order_id_meta array.
-* For Astropay, we use the ct_id.numAttempt format because we don't get
+* For Astropay, we use the ct_id.sequence format because we don't get
 * a gateway transaction ID until the user has actually paid.  If the 
user
 * doesn't return to the result switcher, we will need to use the 
order_id
 * to find a pending queue message with donor details to flesh out the
@@ -422,6 +422,11 @@
}
 
function doPayment() {
+   // If this is not our first NewInvoice call, get a fresh order 
ID
+   if ( $this->session_getData( 'sequence' ) ) {
+   $this->regenerateOrderID();
+   }
+
$transaction_result = $this->do_transaction( 'NewInvoice' );
$this->runAntifraudHooks();
if ( $this->getValidationAction() !== 'process' ) {
@@ -603,6 +608,8 @@
 * @param array $response
 */
protected function processNewInvoiceResponse( $response ) {
+   // Increment sequence number so next NewInvoice call gets a new 
order ID
+   $this->incrementSequenceNumber();
if ( !isset( $response['status'] ) ) {
$this->transaction_response->setCommunicationStatus( 
false );
$this->logger->error( 'Astropay response does not have 
a status code' );
@@ -627,8 +634,6 @@
// have to parse the description.
if ( preg_match( '/invoice already used/i', 
$response['desc'] ) ) {
$this->logger->error( 'Order ID 
collision! Starting again.' );
-   // Increment numAttempt to get a new 
order ID
-   $this->incrementNumAttempt();
throw new ResponseProcessingException(
'Order ID collision! Starting 
again.',

ResponseCodes::DUPLICATE_ORDER_ID,
diff --git a/gateway_common/gateway.adapter.php 
b/gateway_common/gateway.adapter.php
index d81ffa9..f834c10 100644
--- a/gateway_common/gateway.adapter.php
+++ b/gateway_common/gateway.adapter.php
@@ -126,7 +126,7 @@
 *  order IDs, false if we are deferring order_id generation to the
 *  gateway.
 * 'ct_id' => boolean value.  If True, when generating order ID use
-* the contribution tracking ID with the attempt number appended
+* the contribution tracking ID with the sequence number appended
 *
 * Will eventually contain the following keys/values:
 * 'final'=> The value that we have chosen as the valid order ID for
@@ -2445,6 +2445,26 @@
$_SESSION['numAttempt'] = $attempts;
}
 
+   /**
+* Some payment gateways require a distinct identifier for each API call
+* or for each new payment attempt, even if retrying an attempt that 
failed
+* validation.  This is slightly different from numAttempt, which is 
only
+* incremented when setting a final status for a payment attempt.
+* It is the child class's responsibility to increment this at the
+* appropriate time.
+*/
+   protected function incrementSequenceNumber() {
+   self::session_ensure();
+   $sequence = self::session_getData( 'sequence' ); 
//intentionally outside the 'Donor' key.
+   if ( is_numeric( $sequence ) ) {
+   $sequence += 1;
+   } else {
+   $sequence = 1;
+   }
+
+   $_SESS

[MediaWiki-commits] [Gerrit] Regression: Don't show button labels in Overlay - change (mediawiki...MobileFrontend)

2015-07-27 Thread Bmansurov (Code Review)
Bmansurov has uploaded a new change for review.

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

Change subject: Regression: Don't show button labels in Overlay
..

Regression: Don't show button labels in Overlay

Limit a workaround to the affected element only.

Bug: T107090
Change-Id: I7afa9e4add51ecf1facdd43f560232af426ff5b5
---
M resources/mobile.overlays/Overlay.less
1 file changed, 2 insertions(+), 1 deletion(-)


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

diff --git a/resources/mobile.overlays/Overlay.less 
b/resources/mobile.overlays/Overlay.less
index 7204da6..f0c75e2 100644
--- a/resources/mobile.overlays/Overlay.less
+++ b/resources/mobile.overlays/Overlay.less
@@ -296,7 +296,8 @@
top: 0;
 
// Workaround for chrome. See https://phabricator.wikimedia.org/T98846
-   .mw-ui-icon.mw-ui-icon-element {
+   // without .back the labels show. See 
https://phabricator.wikimedia.org/T107090
+   .mw-ui-icon.mw-ui-icon-element.back {
overflow: visible;
}
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7afa9e4add51ecf1facdd43f560232af426ff5b5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Bmansurov 

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


[MediaWiki-commits] [Gerrit] [WIP] resourceloader: Convert inline statements to queued fu... - change (mediawiki/core)

2015-07-27 Thread Krinkle (Code Review)
Krinkle has uploaded a new change for review.

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

Change subject: [WIP] resourceloader: Convert inline statements to queued 
functions
..

[WIP] resourceloader: Convert inline statements to queued functions

Instead of having inline statements be plain statements wrapped
in an if-conditional block, convert them to inline functions
pushed into a queue.

The queue is kept in-memory until the startup module is loaded
at which point it transforms into a function that is immediately
invoked.

This is in preparation of

Change-Id: Ifb38efca219c10ab973ad4c4ebb21c6a4239b005
---
M includes/OutputPage.php
M includes/resourceloader/ResourceLoader.php
M resources/src/startup.js
3 files changed, 20 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/73/227373/1

diff --git a/includes/OutputPage.php b/includes/OutputPage.php
index a551fe1..dd3d7fe 100644
--- a/includes/OutputPage.php
+++ b/includes/OutputPage.php
@@ -3004,12 +3004,6 @@
// Separate user.tokens as otherwise caching will be allowed 
(T84960)
$links[] = $this->makeResourceLoaderLink( 'user.tokens', 
ResourceLoaderModule::TYPE_COMBINED );
 
-   // Scripts and messages "only" requests marked for top inclusion
-   $links[] = $this->makeResourceLoaderLink(
-   $this->getModuleScripts( true, 'top' ),
-   ResourceLoaderModule::TYPE_SCRIPTS
-   );
-
// Modules requests - let the client calculate dependencies and 
batch requests as it likes
// Only load modules that have marked themselves for loading at 
the top
$modules = $this->getModules( true, 'top' );
@@ -3019,6 +3013,12 @@
);
}
 
+   // "Scripts only" modules marked for top inclusion
+   $links[] = $this->makeResourceLoaderLink(
+   $this->getModuleScripts( true, 'top' ),
+   ResourceLoaderModule::TYPE_SCRIPTS
+   );
+
if ( $this->getConfig()->get( 
'ResourceLoaderExperimentalAsyncLoading' ) ) {
$links[] = $this->getScriptsForBottomQueue( true );
}
diff --git a/includes/resourceloader/ResourceLoader.php 
b/includes/resourceloader/ResourceLoader.php
index 508be2f..09556cc 100644
--- a/includes/resourceloader/ResourceLoader.php
+++ b/includes/resourceloader/ResourceLoader.php
@@ -1368,7 +1368,9 @@
 * @return string
 */
public static function makeLoaderConditionalScript( $script ) {
-   return "if(window.mw){\n" . trim( $script ) . "\n}";
+   return ResourceLoader::inDebugMode()
+   ? "var RLQ = RLQ || []; RLQ.push( function () {\n" . 
trim( $script ) . "\n} );"
+   : 'var RLQ=RLQ||[];RLQ.push(function(){' . trim( 
$script ) . '});';
}
 
/**
diff --git a/resources/src/startup.js b/resources/src/startup.js
index ac42854..1332459 100644
--- a/resources/src/startup.js
+++ b/resources/src/startup.js
@@ -26,7 +26,7 @@
  */
 
 /*jshint unused: false, evil: true */
-/*globals mw, $VARS, $CODE */
+/*globals mw, RLQ: true, $VARS, $CODE */
 function isCompatible( ua ) {
if ( ua === undefined ) {
ua = navigator.userAgent;
@@ -76,6 +76,16 @@
 
$CODE.registrations();
 
+   window.RLQ = window.RLQ || [];
+   while ( RLQ.length ) {
+   RLQ.shift()();
+   }
+   RLQ = {
+   push: function ( fn ) {
+   fn();
+   }
+   };
+
mw.config.set( $VARS.configuration );
 }
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifb38efca219c10ab973ad4c4ebb21c6a4239b005
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] T105427: create nearly-blank RC entry for suppressed events - change (mediawiki/core)

2015-07-27 Thread Smalyshev (Code Review)
Smalyshev has uploaded a new change for review.

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

Change subject: T105427: create nearly-blank RC entry for suppressed events
..

T105427: create nearly-blank RC entry for suppressed events

The entry will contain only page ID that was changed but no other
information.

Change-Id: I9422c2dc1ac5631a6b8b8791b3e15604b50647b8
---
M includes/changes/RecentChange.php
M includes/logging/LogEntry.php
2 files changed, 33 insertions(+), 22 deletions(-)


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

diff --git a/includes/changes/RecentChange.php 
b/includes/changes/RecentChange.php
index 77bf5df..b884b3c 100644
--- a/includes/changes/RecentChange.php
+++ b/includes/changes/RecentChange.php
@@ -681,7 +681,7 @@
 * @param string $actionCommentIRC
 * @return RecentChange
 */
-   public static function newLogEntry( $timestamp, &$title, &$user, 
$actionComment, $ip,
+   public static function newLogEntry( $timestamp, $title, $user, 
$actionComment, $ip,
$type, $action, $target, $logComment, $params, $newId = 0, 
$actionCommentIRC = '' ) {
global $wgRequest;
 
diff --git a/includes/logging/LogEntry.php b/includes/logging/LogEntry.php
index 8427adb..1562902 100644
--- a/includes/logging/LogEntry.php
+++ b/includes/logging/LogEntry.php
@@ -575,40 +575,54 @@
/**
 * Get a RecentChanges object for the log entry
 * @param int $newId
+* @param bool $isRestricted Is this a restricted change?
 * @return RecentChange
 * @since 1.23
 */
-   public function getRecentChange( $newId = 0 ) {
+   public function getRecentChange( $newId = 0, $isRestricted = false ) {
$formatter = LogFormatter::newFromEntry( $this );
$context = RequestContext::newExtraneousContext( 
$this->getTarget() );
$formatter->setContext( $context );
-
$logpage = SpecialPage::getTitleFor( 'Log', $this->getType() );
-   $user = $this->getPerformer();
-   $ip = "";
-   if ( $user->isAnon() ) {
-   /*
-* "MediaWiki default" and friends may have
-* no IP address in their name
-*/
-   if ( IP::isIPAddress( $user->getName() ) ) {
-   $ip = $user->getName();
+
+   if ( !$isRestricted ) {
+   $user = $this->getPerformer();
+   $ip = "";
+   if ( $user->isAnon() ) {
+   /*
+   * "MediaWiki default" and friends may have
+   * no IP address in their name
+   */
+   if ( IP::isIPAddress( $user->getName() ) ) {
+   $ip = $user->getName();
+   }
}
+   } else {
+   // Restricted changes only have page ID in RC but other 
information is hidden
+   $row = array(
+   'page_id' => 
$this->getTarget()->getArticleID(),
+   'page_namespace' => 
$this->getTarget()->getNamespace(),
+   'page_title' => ''
+   );
+   $nullpage = Title::newFromRow( (object)$row );
+   $user = new User();
+   $user->setName( '0.0.0.0' );
+   $ip = '0.0.0.0';
}
 
return RecentChange::newLogEntry(
$this->getTimestamp(),
-   $logpage,
+   $isRestricted ? $nullpage : $logpage,
$user,
-   $formatter->getPlainActionText(),
+   $isRestricted ? '' : $formatter->getPlainActionText(),
$ip,
$this->getType(),
$this->getSubtype(),
-   $this->getTarget(),
-   $this->getComment(),
-   LogEntryBase::makeParamBlob( $this->getParameters() ),
+   $isRestricted ? $nullpage : $this->getTarget(),
+   $isRestricted ? '' : $this->getComment(),
+   $isRestricted ? '' : LogEntryBase::makeParamBlob( 
$this->getParameters() ),
$newId,
-   $formatter->getIRCActionComment() // Used for IRC feeds
+   $isRestricted ? '' : $formatter->getIRCActionComment() 
// Used for IRC feeds
);
}
 
@@ -619,11 +633,8 @@
 */
public function publish( $newId,

[MediaWiki-commits] [Gerrit] Auto-forward to search suggestion when zero results - change (mediawiki/core)

2015-07-27 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Auto-forward to search suggestion when zero results
..


Auto-forward to search suggestion when zero results

If the user gets zero results, but gets a "Did you mean" result, just
run the query for the "Did you mean" result and inform the user that
this happened. Adds a new query param 'runsuggestion' which will, when
given a falsy value, prevent running the suggestion and give the result
to the original query.

Bug: T105202
Change-Id: I7ed79942c242b1957d46bdcad59985f37466fb83
(cherry picked from commit bbfc872871ad2c418aa28229a4b351d18130474d)
---
M includes/DefaultSettings.php
M includes/specials/SpecialSearch.php
M languages/i18n/en.json
M languages/i18n/qqq.json
M tests/phpunit/includes/specials/SpecialSearchTest.php
5 files changed, 224 insertions(+), 31 deletions(-)

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



diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php
index 6d945af..b7ea8cb 100644
--- a/includes/DefaultSettings.php
+++ b/includes/DefaultSettings.php
@@ -7713,6 +7713,16 @@
 );
 
 /**
+ * Controls the percentage of zero-result search queries with suggestions that
+ * run the suggestion automatically. Must be a number between 0 and 1.  This
+ * can be lowered to reduce query volume at the expense of result quality.
+ *
+ * @var float
+ * @since 1.26
+ */
+$wgSearchRunSuggestedQueryPercent = 1;
+
+/**
  * For really cool vim folding this needs to be at the end:
  * vim: foldmarker=@{,@} foldmethod=marker
  * @}
diff --git a/includes/specials/SpecialSearch.php 
b/includes/specials/SpecialSearch.php
index a8fab92..f7faa2b 100644
--- a/includes/specials/SpecialSearch.php
+++ b/includes/specials/SpecialSearch.php
@@ -68,6 +68,11 @@
 */
protected $fulltext;
 
+   /**
+* @var bool
+*/
+   protected $runSuggestion = true;
+
const NAMESPACES_CURRENT = 'sense';
 
public function __construct() {
@@ -169,6 +174,7 @@
}
 
$this->fulltext = $request->getVal( 'fulltext' );
+   $this->runSuggestion = (bool)$request->getVal( 'runsuggestion', 
true );
$this->profile = $profile;
}
 
@@ -214,7 +220,6 @@
$search->setNamespaces( $this->namespaces );
$search->prefix = $this->mPrefix;
$term = $search->transformSearchTerm( $term );
-   $didYouMeanHtml = '';
 
Hooks::run( 'SpecialSearchSetupEngine', array( $this, 
$this->profile, $search ) );
 
@@ -265,37 +270,17 @@
}
 
// did you mean... suggestions
-   if ( $showSuggestion && $textMatches && !$textStatus && 
$textMatches->hasSuggestion() ) {
-   # mirror Go/Search behavior of original request ..
-   $didYouMeanParams = array( 'search' => 
$textMatches->getSuggestionQuery() );
-
-   if ( $this->fulltext != null ) {
-   $didYouMeanParams['fulltext'] = $this->fulltext;
+   $didYouMeanHtml = '';
+   if ( $showSuggestion && $textMatches && !$textStatus ) {
+   if ( $this->shouldRunSuggestedQuery( $textMatches ) ) {
+   $newMatches = $search->searchText( 
$textMatches->getSuggestionQuery() );
+   if ( $newMatches instanceof SearchResultSet && 
$newMatches->numRows() > 0 ) {
+   $didYouMeanHtml = 
$this->getDidYouMeanRewrittenHtml( $term, $textMatches );
+   $textMatches = $newMatches;
+   }
+   } elseif ( $textMatches->hasSuggestion() ) {
+   $didYouMeanHtml = $this->getDidYouMeanHtml( 
$textMatches );
}
-
-   $stParams = array_merge(
-   $didYouMeanParams,
-   $this->powerSearchOptions()
-   );
-
-   $suggestionSnippet = 
$textMatches->getSuggestionSnippet();
-
-   if ( $suggestionSnippet == '' ) {
-   $suggestionSnippet = null;
-   }
-
-   $suggestLink = Linker::linkKnown(
-   $this->getPageTitle(),
-   $suggestionSnippet,
-   array(),
-   $stParams
-   );
-
-   # html of did you mean... search suggestion link
-   $didYouMeanHtml =
-   Xml::openElement( 'div', array( 'class' => 
'searchdidyoumean' ) ) .
-   $this->msg( 'search-suggest' )->rawParams( 
$suggestLink )

[MediaWiki-commits] [Gerrit] Follow-up I6e77eb39: Actually configure new logo for suwikiq... - change (operations/mediawiki-config)

2015-07-27 Thread Alex Monk (Code Review)
Alex Monk has uploaded a new change for review.

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

Change subject: Follow-up I6e77eb39: Actually configure new logo for suwikiquote
..

Follow-up I6e77eb39: Actually configure new logo for suwikiquote

The logo file existed, because we have one for each wiki. But we weren't
actually set up to use it - wikiquote.png was being used.

Bug: T106784
Change-Id: Ifbbd86cebce0136395639aecef178ed8b78ebfe2
---
M wmf-config/InitialiseSettings.php
1 file changed, 1 insertion(+), 0 deletions(-)


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 229d41a..3875721 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -861,6 +861,7 @@
'sqwikiquote' => '/static/images/project-logos/sqwikiquote.png',
'srwikiquote' => '/static/images/project-logos/srwikiquote.png',
'tawikiquote' => '/static/images/project-logos/tawikiquote.png',  // 
T57864
+   'suwikiquote' => '/static/images/project-logos/suwikiquote.png',  // 
T106784
'thwikiquote' => '/static/images/project-logos/thwikiquote.png',
'trwikiquote' => '/static/images/project-logos/trwikiquote.png',
'ukwikiquote' => '/static/images/project-logos/ukwikiquote.png',

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

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

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


[MediaWiki-commits] [Gerrit] Add HTTPS variants for RSS feed whitelists - change (operations/mediawiki-config)

2015-07-27 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Add HTTPS variants for RSS feed whitelists
..


Add HTTPS variants for RSS feed whitelists

Bug: T104727
Change-Id: I38082f7720bce5ba6647018eb54d40f9a5e537d1
---
M wmf-config/InitialiseSettings.php
1 file changed, 5 insertions(+), 1 deletion(-)

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



diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index da50cfe..cb01fc7 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -12789,14 +12789,18 @@
 ),
 'wmgRSSUrlWhitelist' => array(
'default' => array(),  // as of Ext:RSS v2, this means no URLs are 
allowed.
-   'uawikimedia' => array( 'http://wikimediaukraine.wordpress.com/feed/' ),
+   'uawikimedia' => array( 'https://wikimediaukraine.wordpress.com/feed/' 
),
'foundationwiki' => array(
'http://blog.wikimedia.org/feed/',
'http://blog.wikimedia.org/c/our-wikis/wikimediacommons/feed/',

'http://blog.wikimedia.org/c/communications/picture-of-the-day/feed/',
+   'https://blog.wikimedia.org/feed/',
+   'https://blog.wikimedia.org/c/our-wikis/wikimediacommons/feed/',
+   
'https://blog.wikimedia.org/c/communications/picture-of-the-day/feed/',
),
'mediawikiwiki' => array(
'http://blog.wikimedia.org/feed/',
+   'https://blog.wikimedia.org/feed/',

'https://git.wikimedia.org/feed/mediawiki/extensions/Translate.git',

'https://mingle.corp.wikimedia.org/projects/analytics/feeds/8z8k6vUfniLmWc2qGe6GMQsxBujvKRKuybLd8mdTbMFHwGfLH3oxK*MU0E8zM6go.atom',

'https://bugzilla.wikimedia.org/buglist.cgi?bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=PATCH_TO_REVIEW'

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I38082f7720bce5ba6647018eb54d40f9a5e537d1
Gerrit-PatchSet: 2
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Jeremyb 
Gerrit-Reviewer: Alex Monk 
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] Use post time + 1 min for signature edit as well. - change (mediawiki...Flow)

2015-07-27 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Use post time + 1 min for signature edit as well.
..


Use post time + 1 min for signature edit as well.

Bug: T105484
Change-Id: Ic9365e73d9b46b5d47877d8a2f596e0f222c08d6
(cherry picked from commit cf429d5be5da4989a7d433c5556881259f330efb)
---
M includes/Import/LiquidThreadsApi/Objects.php
1 file changed, 10 insertions(+), 11 deletions(-)

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



diff --git a/includes/Import/LiquidThreadsApi/Objects.php 
b/includes/Import/LiquidThreadsApi/Objects.php
index e61eced..d491a63 100644
--- a/includes/Import/LiquidThreadsApi/Objects.php
+++ b/includes/Import/LiquidThreadsApi/Objects.php
@@ -202,7 +202,7 @@
$this,
$this->importSource->getScriptUser(),
$newWikitext,
-   wfTimestamp( TS_UNIX )
+   $lastRevision
);
return $clarificationRevision;
}
@@ -438,13 +438,18 @@
 * @param IImportObject $parentObject Object this is a revision of
 * @param User $destinationScriptUser User that performed this scripted 
edit
 * @param string $revisionText Text of revision
-* @param string $timestamp Timestamp of generated revision
+* @param IObjectRevision $baseRevision Base revision, used only for 
timestamp generation
 */
-   function __construct( IImportObject $parentObject, User 
$destinationScriptUser, $revisionText, $timestamp ) {
+   function __construct( IImportObject $parentObject, User 
$destinationScriptUser, $revisionText, $baseRevision ) {
$this->parent = $parentObject;
$this->destinationScriptUser = $destinationScriptUser;
$this->revisionText = $revisionText;
-   $this->timestamp = $timestamp;
+
+   $baseTimestamp = wfTimestamp( TS_UNIX, 
$baseRevision->getTimestamp() );
+
+   // Set a minute after.  If it uses $baseTimestamp again, there 
can be time
+   // collisions.
+   $this->timestamp = wfTimestamp( TS_UNIX, $baseTimestamp + 60 );
}
 
public function getText() {
@@ -532,18 +537,12 @@
) );
 
$newWikitext .= "\n\n{{{$templateName}|$arguments}}";
-   $initialHeaderTimestamp = wfTimestamp( TS_UNIX, 
$lastRevision->getTimestamp() );
-
-   // Set a minute after.  If it uses the current timestamp, there 
can be time
-   // collisions with the first generated header ID, which can 
cause wrong UID
-   // ordering.
-   $cleanupTimestamp = wfTimestamp( TS_UNIX, 
$initialHeaderTimestamp + 60 );
 
$cleanupRevision = new ScriptedImportRevision(
$this,
$this->source->getScriptUser(),
$newWikitext,
-   $cleanupTimestamp
+   $lastRevision
);
return $cleanupRevision;
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic9365e73d9b46b5d47877d8a2f596e0f222c08d6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: wmf/1.26wmf15
Gerrit-Owner: Mattflaschen 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: Mattflaschen 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Make addedwatchtext less verbose - change (mediawiki/core)

2015-07-27 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Make addedwatchtext less verbose
..


Make addedwatchtext less verbose

Bug: T13665
Change-Id: Ic9c761a1c2f214c07840271253bbdcf902a2f24b
---
M languages/i18n/en.json
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/languages/i18n/en.json b/languages/i18n/en.json
index 31c766f..2d13c98 100644
--- a/languages/i18n/en.json
+++ b/languages/i18n/en.json
@@ -1831,10 +1831,10 @@
"watchlistanontext": "Please log in to view or edit items on your 
watchlist.",
"watchnologin": "Not logged in",
"addwatch": "Add to watchlist",
-   "addedwatchtext": "The page \"[[:$1]]\" has been added to your 
[[Special:Watchlist|watchlist]].\nFuture changes to this page and its 
associated talk page will be listed there.",
+   "addedwatchtext": "\"[[:$1]]\" and its discussion page have been added 
to your [[Special:Watchlist|watchlist]].",
"addedwatchtext-short": "The page \"$1\" has been added to your 
watchlist.",
"removewatch": "Remove from watchlist",
-   "removedwatchtext": "The page \"[[:$1]]\" has been removed from 
[[Special:Watchlist|your watchlist]].",
+   "removedwatchtext": "\"[[:$1]]\" and its discussion page have been 
removed from your [[Special:Watchlist|watchlist]].",
"removedwatchtext-short": "The page \"$1\" has been removed from your 
watchlist.",
"watch": "Watch",
"watchthispage": "Watch this page",

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic9c761a1c2f214c07840271253bbdcf902a2f24b
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: AYUSH GARG 
Gerrit-Reviewer: Kaldari 
Gerrit-Reviewer: Nemo bis 
Gerrit-Reviewer: Nikerabbit 
Gerrit-Reviewer: Raimond Spekking 
Gerrit-Reviewer: Siebrand 
Gerrit-Reviewer: Tpt 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Increase default MW-Selenium WebDriver timeout - change (integration/config)

2015-07-27 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Increase default MW-Selenium WebDriver timeout
..


Increase default MW-Selenium WebDriver timeout

We're seeing frequent `Net::HTTP` timeout errors in MW-Selenium jobs
running through SauceLabs. This is one step toward mitigating these
failures.

Bug: T106878
Change-Id: I3c61ff4089791375e21aadfa045d503dfd73ca0e
---
M jjb/job-templates-browsertests.yaml
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/jjb/job-templates-browsertests.yaml 
b/jjb/job-templates-browsertests.yaml
index da431ec..5d020d0 100644
--- a/jjb/job-templates-browsertests.yaml
+++ b/jjb/job-templates-browsertests.yaml
@@ -63,7 +63,7 @@
 - defaults:
 name: browsertests
 node: contintLabsSlave && UbuntuTrusty
-browser_timeout: ''
+browser_timeout: 120
 browsertest_job_timeout: 180
 repository_host: 'gerrit.wikimedia.org/r'
 cucumber_tags: ''

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3c61ff4089791375e21aadfa045d503dfd73ca0e
Gerrit-PatchSet: 1
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Dduvall 
Gerrit-Reviewer: Dduvall 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: Jdlrobson 
Gerrit-Reviewer: Zfilipin 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Revert "Convert Special:Search to OOUI" - change (mediawiki/core)

2015-07-27 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Revert "Convert Special:Search to OOUI"
..


Revert "Convert Special:Search to OOUI"

This reverts commit 855f4cc0bf7e769ae947597ca5ea5007965f5bad.

Bug: T106273
Change-Id: Iba0ffc05458a855590b7aa0fb887417be8304de1
(cherry picked from commit 3c245536efcb134d8ca3078a2262ac1b489dafc8)
---
M includes/specials/SpecialSearch.php
M resources/Resources.php
M resources/src/mediawiki.special/mediawiki.special.search.css
M resources/src/mediawiki.special/mediawiki.special.search.js
M resources/src/mediawiki/mediawiki.searchSuggest.js
5 files changed, 21 insertions(+), 25 deletions(-)

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



diff --git a/includes/specials/SpecialSearch.php 
b/includes/specials/SpecialSearch.php
index a8fab92..bc1bb3d 100644
--- a/includes/specials/SpecialSearch.php
+++ b/includes/specials/SpecialSearch.php
@@ -328,7 +328,6 @@
$num = $titleMatchesNum + $textMatchesNum;
$totalRes = $numTitleMatches + $numTextMatches;
 
-   $out->enableOOUI();
$out->addHtml(
# This is an awful awful ID name. It's not a table, but 
we
# named it poorly from when this was a table so now 
we're
@@ -1079,23 +1078,21 @@
 * @return string
 */
protected function shortDialog( $term, $resultsShown, $totalNum ) {
-   $out =
-   Html::hidden( 'title', 
$this->getPageTitle()->getPrefixedText() ) .
-   Html::hidden( 'profile', $this->profile ) .
-   Html::hidden( 'fulltext', 'Search' ) .
-   new MediaWiki\Widget\TitleInputWidget( array(
-   'type' => 'search',
-   'icon' => 'search',
-   'id' => 'searchText',
-   'name' => 'search',
-   'autofocus' => trim( $term ) === '',
-   'value' => $term,
-   ) ) .
-   new OOUI\ButtonInputWidget( array(
-   'type' => 'submit',
-   'label' => $this->msg( 'searchbutton' )->text(),
-   'flags' => array( 'progressive', 'primary' ),
-   ) );
+   $out = Html::hidden( 'title', 
$this->getPageTitle()->getPrefixedText() );
+   $out .= Html::hidden( 'profile', $this->profile ) . "\n";
+   // Term box
+   $out .= Html::input( 'search', $term, 'search', array(
+   'id' => $this->isPowerSearch() ? 'powerSearchText' : 
'searchText',
+   'size' => '50',
+   'autofocus' => trim( $term ) === '',
+   'class' => 'mw-ui-input mw-ui-input-inline',
+   ) ) . "\n";
+   $out .= Html::hidden( 'fulltext', 'Search' ) . "\n";
+   $out .= Html::submitButton(
+   $this->msg( 'searchbutton' )->text(),
+   array( 'class' => 'mw-ui-button mw-ui-progressive' ),
+   array( 'mw-ui-progressive' )
+   ) . "\n";
 
// Results-info
if ( $totalNum > 0 && $this->offset < $totalNum ) {
diff --git a/resources/Resources.php b/resources/Resources.php
index 0fc8ade..9c74f60 100644
--- a/resources/Resources.php
+++ b/resources/Resources.php
@@ -1513,7 +1513,6 @@
'position' => 'top',
'scripts' => 
'resources/src/mediawiki.special/mediawiki.special.search.js',
'styles' => 
'resources/src/mediawiki.special/mediawiki.special.search.css',
-   'dependencies' => 'mediawiki.widgets',
'messages' => array(
'powersearch-togglelabel',
'powersearch-toggleall',
diff --git a/resources/src/mediawiki.special/mediawiki.special.search.css 
b/resources/src/mediawiki.special/mediawiki.special.search.css
index 8d648a6..8f845df 100644
--- a/resources/src/mediawiki.special/mediawiki.special.search.css
+++ b/resources/src/mediawiki.special/mediawiki.special.search.css
@@ -172,7 +172,3 @@
 form#powersearch {
clear: both;
 }
-
-#searchText {
-   display: inline-block;
-}
diff --git a/resources/src/mediawiki.special/mediawiki.special.search.js 
b/resources/src/mediawiki.special/mediawiki.special.search.js
index 23602b3..b27fe34 100644
--- a/resources/src/mediawiki.special/mediawiki.special.search.js
+++ b/resources/src/mediawiki.special/mediawiki.special.search.js
@@ -33,7 +33,8 @@
 
// Change the header search links to what user entered
$headerLinks = $( '.search-types a' );
-   OO.ui.infuse( 'searchText' ).on( 'change', functio

[MediaWiki-commits] [Gerrit] Localise suwikiquote logo - change (operations/mediawiki-config)

2015-07-27 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Localise suwikiquote logo
..


Localise suwikiquote logo

Bug: T106784
Change-Id: I6e77eb396742705b9f533808517da66aeb67
---
M w/static/images/project-logos/suwikiquote.png
1 file changed, 0 insertions(+), 0 deletions(-)

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



diff --git a/w/static/images/project-logos/suwikiquote.png 
b/w/static/images/project-logos/suwikiquote.png
index 4184de0..60478b9 100644
--- a/w/static/images/project-logos/suwikiquote.png
+++ b/w/static/images/project-logos/suwikiquote.png
Binary files differ

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6e77eb396742705b9f533808517da66aeb67
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Alex Monk 
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] Fix site name and meta namespace of zh_min_nanwikisource - change (operations/mediawiki-config)

2015-07-27 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Fix site name and meta namespace of zh_min_nanwikisource
..


Fix site name and meta namespace of zh_min_nanwikisource

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

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



diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 3951dfd..9c6520e 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -1902,7 +1902,7 @@
'yiwikisource' => 'װיקיביבליאָטעק',
'yiwiktionary' => 'װיקיװערטערבוך',
'zerowiki' => 'Wikipedia',
-   'zh-min-nanwikisource' => 'Wiki Tô·-su-kóan',
+   'zh_min_nanwikisource' => 'Wiki Tô·-su-kóan',
'zh_classicalwiki' => '維基大典',
'zhwikivoyage' => '维基导游', // T61077
'zh_yuewiki' => '維基百科',
@@ -2383,7 +2383,7 @@
'yiwikisource' => 'װיקיביבליאָטעק',
'yiwiktionary' => 'װיקיװערטערבוך',
'zerowiki' => 'Project',
-   'zh-min-nanwikisource' => 'Wiki_Tô·-su-kóan',
+   'zh_min_nanwikisource' => 'Wiki_Tô·-su-kóan',
'zh_classicalwiki' => '維基大典',
 ),
 # @} end of wgMetaNamespace

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I36e264f5cd6cb073279d3a6d6800fdba4fdc762e
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Alex Monk 
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] Enable GuidedTour on knwiki - change (operations/mediawiki-config)

2015-07-27 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Enable GuidedTour on knwiki
..


Enable GuidedTour on knwiki

Bug: T103659
Change-Id: I6521314de708d2519bbbdbb457fade87ed93ddba
---
M wmf-config/InitialiseSettings.php
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 3951dfd..b7c084b 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -14274,6 +14274,7 @@
'huwiki' => true,
'itwiki' => true,
'jawiki' => true,
+   'knwiki' => true, // T103659
'kowiki' => true,
'mediawikiwiki' => true,
'mkwiki' => true,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6521314de708d2519bbbdbb457fade87ed93ddba
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Alex Monk 
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] NewUserMessageOnAutoCreate = true for gomwiki - change (operations/mediawiki-config)

2015-07-27 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: NewUserMessageOnAutoCreate = true for gomwiki
..


NewUserMessageOnAutoCreate = true for gomwiki

Bug: T106169
Change-Id: I2a395c94a35ccc8f49f0206f9cececbf154b6400
---
M wmf-config/InitialiseSettings.php
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 3951dfd..4eee490 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -11099,6 +11099,7 @@
'fawikinews' => true,
'fawikivoyage' => true, // T76716
'fawiktionary' => true, // T90831
+   'gomwiki' => true, // T106169
'guwiki' => true, // T42872
'guwikisource' => true, // T42872
'hiwiki' => true,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2a395c94a35ccc8f49f0206f9cececbf154b6400
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Alex Monk 
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] Merge branch 'master' into deployment - change (wikimedia...crm)

2015-07-27 Thread Ejegg (Code Review)
Ejegg has submitted this change and it was merged.

Change subject: Merge branch 'master' into deployment
..


Merge branch 'master' into deployment

82dbd98 Don't override quicksearch for empty $name
04822e7 Better success check for recurring globalcollect

Change-Id: I3be8e824fd82ebbd336196d943911d65327468f6
---
0 files changed, 0 insertions(+), 0 deletions(-)

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




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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3be8e824fd82ebbd336196d943911d65327468f6
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: deployment
Gerrit-Owner: Ejegg 
Gerrit-Reviewer: Ejegg 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Merge branch 'master' into deployment - change (wikimedia...crm)

2015-07-27 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review.

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

Change subject: Merge branch 'master' into deployment
..

Merge branch 'master' into deployment

82dbd98 Don't override quicksearch for empty $name
04822e7 Better success check for recurring globalcollect

Change-Id: I3be8e824fd82ebbd336196d943911d65327468f6
---
0 files changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/70/227370/1


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3be8e824fd82ebbd336196d943911d65327468f6
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: deployment
Gerrit-Owner: Ejegg 

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


[MediaWiki-commits] [Gerrit] Fix app picker on older devices - change (apps...wikipedia)

2015-07-27 Thread Niedzielski (Code Review)
Niedzielski has uploaded a new change for review.

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

Change subject: Fix app picker on older devices
..

Fix app picker on older devices

- Specify appropriate resource package name.
- Set intent package name.
- Specify some function invariant annotations.

This patch was derived from behavior on actual devices rather than
documentation.

Bug: T106332
Change-Id: Ibbcc0f669f196e8e27c3e828a8305af969429596
---
M wikipedia/src/main/java/org/wikipedia/Utils.java
M wikipedia/src/main/java/org/wikipedia/util/ShareUtils.java
2 files changed, 22 insertions(+), 22 deletions(-)


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

diff --git a/wikipedia/src/main/java/org/wikipedia/Utils.java 
b/wikipedia/src/main/java/org/wikipedia/Utils.java
index 2fce3d0..22e9ed4 100644
--- a/wikipedia/src/main/java/org/wikipedia/Utils.java
+++ b/wikipedia/src/main/java/org/wikipedia/Utils.java
@@ -361,11 +361,8 @@
  * @param uri URI to open in an external browser
  */
 public static void visitInExternalBrowser(final Context context, Uri uri) {
-Intent intent = new Intent();
-intent.setAction(Intent.ACTION_VIEW);
-intent.setData(uri);
-
-Intent chooserIntent = ShareUtils.createChooserIntent(intent, null, 
context);
+Intent chooserIntent = ShareUtils.createChooserIntent(new 
Intent(Intent.ACTION_VIEW, uri),
+null, context);
 if (chooserIntent == null) {
 // This means that there was no way to handle this link.
 // We will just show a toast now. FIXME: Make this more visible?
diff --git a/wikipedia/src/main/java/org/wikipedia/util/ShareUtils.java 
b/wikipedia/src/main/java/org/wikipedia/util/ShareUtils.java
index 3201dac..56a5781 100644
--- a/wikipedia/src/main/java/org/wikipedia/util/ShareUtils.java
+++ b/wikipedia/src/main/java/org/wikipedia/util/ShareUtils.java
@@ -8,6 +8,7 @@
 import android.net.Uri;
 import android.os.Environment;
 import android.os.Parcelable;
+import android.support.annotation.NonNull;
 import android.support.annotation.Nullable;
 import android.util.Log;
 import android.widget.Toast;
@@ -156,18 +157,18 @@
 }
 
 @Nullable
-public static Intent createChooserIntent(Intent targetIntent,
- CharSequence chooserTitle,
- Context context) {
+public static Intent createChooserIntent(@NonNull Intent targetIntent,
+ @Nullable CharSequence 
chooserTitle,
+ @NonNull Context context) {
 return createChooserIntent(targetIntent, chooserTitle, context, 
APP_PACKAGE_REGEX);
 }
 
 @Nullable
-public static Intent createChooserIntent(Intent targetIntent,
- CharSequence chooserTitle,
- Context context,
+public static Intent createChooserIntent(@NonNull Intent targetIntent,
+ @Nullable CharSequence 
chooserTitle,
+ @NonNull Context context,
  String packageNameBlacklistRegex) 
{
-List intents = queryIntents(context, targetIntent, 
packageNameBlacklistRegex);
+List intents = queryIntents(context, targetIntent, 
packageNameBlacklistRegex);
 
 if (intents.isEmpty()) {
 return null;
@@ -175,13 +176,13 @@
 
 Intent bestIntent = intents.remove(0);
 return Intent.createChooser(bestIntent, chooserTitle)
-.putExtra(Intent.EXTRA_INITIAL_INTENTS, intents.toArray(new 
Parcelable[0]));
+.putExtra(Intent.EXTRA_INITIAL_INTENTS, intents.toArray(new 
Parcelable[intents.size()]));
 }
 
-public static List queryIntents(Context context,
-   Intent targetIntent,
-   String 
packageNameBlacklistRegex) {
-List intents = new ArrayList<>();
+public static List queryIntents(@NonNull Context context,
+@NonNull Intent targetIntent,
+String packageNameBlacklistRegex) {
+List intents = new ArrayList<>();
 for (ResolveInfo intentActivity : queryIntentActivities(targetIntent, 
context)) {
 if (!isIntentActivityBlacklisted(intentActivity, 
packageNameBlacklistRegex)) {
 intents.add(buildLabeledIntent(targetIntent, intentActivity));
@@ -190,24 +191,26 @@
 return intents;
 }
 
-public static List queryIntentActivities(Intent intent, 
Context context) {
+public static List queryIntentActivities(Intent intent, 
@NonNull Context context) {
 retu

[MediaWiki-commits] [Gerrit] Don't override quicksearch for empty $name - change (wikimedia...crm)

2015-07-27 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Don't override quicksearch for empty $name
..


Don't override quicksearch for empty $name

This and a crappy sync AJAX call were breaking editing for donors
with an employer set.

Change-Id: I0a70361fc5a1d915311e19bce20f31bfd5be
---
M sites/all/modules/wmf_civicrm/wmf_civicrm.module
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/sites/all/modules/wmf_civicrm/wmf_civicrm.module 
b/sites/all/modules/wmf_civicrm/wmf_civicrm.module
index 24f82e3..6946dc6 100644
--- a/sites/all/modules/wmf_civicrm/wmf_civicrm.module
+++ b/sites/all/modules/wmf_civicrm/wmf_civicrm.module
@@ -2104,7 +2104,7 @@
 ) AS t
 LIMIT 0, 10
 EOS;
-} else {
+} else if ( !empty( $name ) ) {
 $query = <

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


[MediaWiki-commits] [Gerrit] Adjust how position-fixed works in light of new beta - change (mediawiki...MobileFrontend)

2015-07-27 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Adjust how position-fixed works in light of new beta
..


Adjust how position-fixed works in light of new beta

Since all drawers/overlays get added to the viewport/body tag they
do not belong to either the content area so it's not possible to distinguish
whether the overlay/drawer should be shifted when the menu is open. Since this
only seems to be a problem for the search overlay - now the only overlay you
can open from the left menu let's limit these rules to drawers for the time
being.

Bug: T106434
Change-Id: Iec5659107f120939efb9e07607bb063ad6ea4012
---
M resources/mobile.mainMenu/mainmenu.less
1 file changed, 8 insertions(+), 4 deletions(-)

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



diff --git a/resources/mobile.mainMenu/mainmenu.less 
b/resources/mobile.mainMenu/mainmenu.less
index c9ad98b..02985a8 100644
--- a/resources/mobile.mainMenu/mainmenu.less
+++ b/resources/mobile.mainMenu/mainmenu.less
@@ -184,7 +184,8 @@
width: @menuWidth;
}
 
-   .position-fixed {
+   // FIXME: Menu shouldn't need to know about drawers but a cta drawer 
might be open
+   .drawer .position-fixed {
left: @menuWidth !important;
}
 }
@@ -248,14 +249,16 @@
 
 
 .navigation-enabled.animations {
-   .position-fixed,
+   // FIXME: Menu shouldn't need to know about drawers but a cta drawer 
might be open
+   .drawer .position-fixed,
#mw-mf-page-center {
.transition-transform(@duration @easing);
}
 }
 
 .primary-navigation-enabled.animations {
-   .position-fixed,
+   // FIXME: Menu shouldn't need to know about drawers
+   .drawer .position-fixed,
#mw-mf-page-center {
// override non-animated version
left: 0 !important;
@@ -291,7 +294,8 @@
}
 
&.primary-navigation-enabled.animations {
-   .position-fixed,
+   // FIXME: Menu shouldn't need to know about drawers
+   .drawer .position-fixed,
#mw-mf-page-center {
.transform(translate(-@menuWidth, 0));
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iec5659107f120939efb9e07607bb063ad6ea4012
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson 
Gerrit-Reviewer: BarryTheBrowserTestBot 
Gerrit-Reviewer: Bmansurov 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Don't override quicksearch for empty $name - change (wikimedia...crm)

2015-07-27 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review.

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

Change subject: Don't override quicksearch for empty $name
..

Don't override quicksearch for empty $name

This and a crappy sync AJAX call were breaking editing for donors
with an employer set.

Change-Id: I0a70361fc5a1d915311e19bce20f31bfd5be
---
M sites/all/modules/wmf_civicrm/wmf_civicrm.module
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/68/227368/1

diff --git a/sites/all/modules/wmf_civicrm/wmf_civicrm.module 
b/sites/all/modules/wmf_civicrm/wmf_civicrm.module
index 24f82e3..6946dc6 100644
--- a/sites/all/modules/wmf_civicrm/wmf_civicrm.module
+++ b/sites/all/modules/wmf_civicrm/wmf_civicrm.module
@@ -2104,7 +2104,7 @@
 ) AS t
 LIMIT 0, 10
 EOS;
-} else {
+} else if ( !empty( $name ) ) {
 $query = <

[MediaWiki-commits] [Gerrit] Fix flakey search in pages feature - change (mediawiki...MobileFrontend)

2015-07-27 Thread Jdlrobson (Code Review)
Jdlrobson has uploaded a new change for review.

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

Change subject: Fix flakey search in pages feature
..

Fix flakey search in pages feature

We seem to have forgotten that history.back is queued
Thus correct behaviour so this feature works as expected.
Also cleanup the browser test in the process to make it clearer to debug
in future

Changes:
* the page "Selenium search test" exists step seems to actually visit this
page, so switch the order so we are on the correct starting page.
* Add a step to explicitly check the ajax search request has finished.

Bug: T98476
Change-Id: I9abb8f57adb7d7e197a8a9e73aee0894ab407d57
---
M resources/mobile.search/SearchOverlay.js
M tests/browser/features/search.feature
M tests/browser/features/step_definitions/search_steps.rb
3 files changed, 11 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend 
refs/changes/67/227367/1

diff --git a/resources/mobile.search/SearchOverlay.js 
b/resources/mobile.search/SearchOverlay.js
index 8d2b0de..728e437 100644
--- a/resources/mobile.search/SearchOverlay.js
+++ b/resources/mobile.search/SearchOverlay.js
@@ -163,7 +163,11 @@
value: 'search'
} )
.appendTo( $form );
-   $form.submit();
+   // history.back queues a task so might run after this 
call. Thus we use setTimeout
+   // 
http://www.w3.org/TR/2011/WD-html5-20110113/webappapis.html#queue-a-task
+   window.setTimeout( function () {
+   $form.submit();
+   }, 0 );
},
 
/**
diff --git a/tests/browser/features/search.feature 
b/tests/browser/features/search.feature
index ce9b062..385744a 100644
--- a/tests/browser/features/search.feature
+++ b/tests/browser/features/search.feature
@@ -3,8 +3,8 @@
 
   Background:
 Given I am using the mobile site
+  #And the page "Selenium search test" exists
   And I am on the "Main Page" page
-  And the page "Selenium search test" exists
 When I click the placeholder search box
 
   Scenario: Closing search (overlay button)
@@ -23,6 +23,7 @@
   Scenario: Search with search in pages button
   And I see the search overlay
   And I type into search box "Test is used by Selenium web driver"
+  And I see the search in pages button
   And I click the search in pages button
 Then I should see a list of search results
 
diff --git a/tests/browser/features/step_definitions/search_steps.rb 
b/tests/browser/features/step_definitions/search_steps.rb
index bb17bbc..db46043 100644
--- a/tests/browser/features/step_definitions/search_steps.rb
+++ b/tests/browser/features/step_definitions/search_steps.rb
@@ -15,9 +15,11 @@
   on(ArticlePage).search_button_element.when_present.click
 end
 
+When(/^I see the search in pages button$/) do
+  expect(on(ArticlePage).search_within_pages_element.when_visible).to 
be_visible
+end
+
 When(/^I click the search in pages button$/) do
-  # Search results may take time to appear
-  sleep 5
   on(ArticlePage).search_within_pages_element.when_present.click
 end
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9abb8f57adb7d7e197a8a9e73aee0894ab407d57
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson 

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


[MediaWiki-commits] [Gerrit] Use post time + 1 min for signature edit as well. - change (mediawiki...Flow)

2015-07-27 Thread Mattflaschen (Code Review)
Mattflaschen has uploaded a new change for review.

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

Change subject: Use post time + 1 min for signature edit as well.
..

Use post time + 1 min for signature edit as well.

Bug: T105484
Change-Id: Ic9365e73d9b46b5d47877d8a2f596e0f222c08d6
(cherry picked from commit cf429d5be5da4989a7d433c5556881259f330efb)
---
M includes/Import/LiquidThreadsApi/Objects.php
1 file changed, 10 insertions(+), 11 deletions(-)


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

diff --git a/includes/Import/LiquidThreadsApi/Objects.php 
b/includes/Import/LiquidThreadsApi/Objects.php
index e61eced..d491a63 100644
--- a/includes/Import/LiquidThreadsApi/Objects.php
+++ b/includes/Import/LiquidThreadsApi/Objects.php
@@ -202,7 +202,7 @@
$this,
$this->importSource->getScriptUser(),
$newWikitext,
-   wfTimestamp( TS_UNIX )
+   $lastRevision
);
return $clarificationRevision;
}
@@ -438,13 +438,18 @@
 * @param IImportObject $parentObject Object this is a revision of
 * @param User $destinationScriptUser User that performed this scripted 
edit
 * @param string $revisionText Text of revision
-* @param string $timestamp Timestamp of generated revision
+* @param IObjectRevision $baseRevision Base revision, used only for 
timestamp generation
 */
-   function __construct( IImportObject $parentObject, User 
$destinationScriptUser, $revisionText, $timestamp ) {
+   function __construct( IImportObject $parentObject, User 
$destinationScriptUser, $revisionText, $baseRevision ) {
$this->parent = $parentObject;
$this->destinationScriptUser = $destinationScriptUser;
$this->revisionText = $revisionText;
-   $this->timestamp = $timestamp;
+
+   $baseTimestamp = wfTimestamp( TS_UNIX, 
$baseRevision->getTimestamp() );
+
+   // Set a minute after.  If it uses $baseTimestamp again, there 
can be time
+   // collisions.
+   $this->timestamp = wfTimestamp( TS_UNIX, $baseTimestamp + 60 );
}
 
public function getText() {
@@ -532,18 +537,12 @@
) );
 
$newWikitext .= "\n\n{{{$templateName}|$arguments}}";
-   $initialHeaderTimestamp = wfTimestamp( TS_UNIX, 
$lastRevision->getTimestamp() );
-
-   // Set a minute after.  If it uses the current timestamp, there 
can be time
-   // collisions with the first generated header ID, which can 
cause wrong UID
-   // ordering.
-   $cleanupTimestamp = wfTimestamp( TS_UNIX, 
$initialHeaderTimestamp + 60 );
 
$cleanupRevision = new ScriptedImportRevision(
$this,
$this->source->getScriptUser(),
$newWikitext,
-   $cleanupTimestamp
+   $lastRevision
);
return $cleanupRevision;
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic9365e73d9b46b5d47877d8a2f596e0f222c08d6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: wmf/1.26wmf15
Gerrit-Owner: Mattflaschen 

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


[MediaWiki-commits] [Gerrit] Convert to use OOUI - change (mediawiki...UrlShortener)

2015-07-27 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Convert to use OOUI
..


Convert to use OOUI

On the backend, we now use a simplified OOUIHTMLForm. The frontend was
mostly re-written to use OOUI.

Co-Authored-By: Prateek Saxena 
Change-Id: Icecc027206484feaf08dc5247f82356eb7d45469
---
A .gitignore
A .jscsrc
A .jshintignore
M .jshintrc
A Gruntfile.js
M SpecialUrlShortener.php
M UrlShortener.php
D js/ext.urlShortener.special.js
D less/ext.urlShortener.special.less
A modules/ext.urlShortener.special.js
A package.json
11 files changed, 238 insertions(+), 282 deletions(-)

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



diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000..c2658d7
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+node_modules/
diff --git a/.jscsrc b/.jscsrc
new file mode 100644
index 000..9d22e3f
--- /dev/null
+++ b/.jscsrc
@@ -0,0 +1,3 @@
+{
+   "preset": "wikimedia"
+}
diff --git a/.jshintignore b/.jshintignore
new file mode 100644
index 000..3c3629e
--- /dev/null
+++ b/.jshintignore
@@ -0,0 +1 @@
+node_modules
diff --git a/.jshintrc b/.jshintrc
index ca284e1..66e3d48 100644
--- a/.jshintrc
+++ b/.jshintrc
@@ -1,18 +1,24 @@
 {
-   "globals": {
-   "console": true,
-   "require": true,
-   "module": true,
-   "marshaller": true
-   },
-
-   "browser": true,
-   "curly": true,
+   // Enforcing
+   "bitwise": true,
"eqeqeq": true,
-   "forin": false,
-   "onevar": false,
-   "trailing": true,
-   "undef" : true,
+   "freeze": true,
+   "latedef": true,
+   "noarg": true,
+   "nonew": true,
+   "undef": true,
"unused": true,
-   "supernew": true
+   "strict": false,
+
+   // Relaxing
+   "es5": false,
+
+   // Environment
+   "browser": true,
+   "jquery": true,
+
+   "globals": {
+   "mediaWiki": false,
+   "OO": false
+   }
 }
diff --git a/Gruntfile.js b/Gruntfile.js
new file mode 100644
index 000..c2a64cc
--- /dev/null
+++ b/Gruntfile.js
@@ -0,0 +1,44 @@
+/*jshint node:true */
+module.exports = function ( grunt ) {
+   grunt.loadNpmTasks( 'grunt-contrib-jshint' );
+   grunt.loadNpmTasks( 'grunt-jsonlint' );
+   grunt.loadNpmTasks( 'grunt-banana-checker' );
+   grunt.loadNpmTasks( 'grunt-jscs' );
+   grunt.loadNpmTasks( 'grunt-tyops' );
+
+   grunt.initConfig( {
+   tyops: {
+   options: {
+   typos: 'build/typos.json'
+   },
+   src: [
+   '**/*',
+   '!{node_modules,vendor}/**',
+   '!build/typos.json'
+   ]
+   },
+   jshint: {
+   options: {
+   jshintrc: true
+   },
+   all: [
+   'modules/**/*.js'
+   ]
+   },
+   jscs: {
+   src: '<%= jshint.all %>'
+   },
+   banana: {
+   all: [ 'i18n/' ]
+   },
+   jsonlint: {
+   all: [
+   '**/*.json',
+   '!node_modules/**'
+   ]
+   }
+   } );
+
+   grunt.registerTask( 'test', [ 'tyops', 'jshint', 'jscs', 'jsonlint', 
'banana' ] );
+   grunt.registerTask( 'default', 'test' );
+};
diff --git a/SpecialUrlShortener.php b/SpecialUrlShortener.php
index d12c699..ea1ef28 100644
--- a/SpecialUrlShortener.php
+++ b/SpecialUrlShortener.php
@@ -20,42 +20,22 @@
parent::__construct( 'UrlShortener' );
}
 
+   protected function getDisplayFormat() {
+   return 'ooui';
+   }
+
/**
-* Remove the legend wrapper and also use the agora styles.
 * @param HTMLForm $form
 */
protected function alterForm( HTMLForm $form ) {
-   $form->setWrapperLegend( false );
-   $form->setDisplayFormat( 'raw' );
-   $form->suppressDefaultSubmit( true );
-   $form->addHeaderText(
-   Html::element( "span", array( "id" => 
"mwe-urlshortener-form-header" ),
-   $this->msg( 'urlshortener-form-header' )->text()
-   )
-   );
-   $form->addFooterText(
-   Html::rawElement( 'div', array( 'id' => 
'mwe-urlshortener-form-footer' ),
-   Html::element( 'span', array( 'id' => 
'mwe-urlshortener-shortened-url-label' ),
-   $this->msg( 
'urlshortener-shorte

[MediaWiki-commits] [Gerrit] Initial commit. - change (WrappedString)

2015-07-27 Thread Ori.livneh (Code Review)
Ori.livneh has uploaded a new change for review.

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

Change subject: Initial commit.
..

Initial commit.

Change-Id: I6330ca5e3f83534dab0980c8a8527adac1b7c4ea
---
A .editorconfig
A .gitignore
A .jshintrc
A .travis.yml
A Doxyfile
A LICENSE
A README.md
A composer.json
A phpcs.xml
A phpunit.xml.dist
A src/WrappedString.php
A tests/WrappedStringTest.php
12 files changed, 363 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/WrappedString 
refs/changes/65/227365/1

diff --git a/.editorconfig b/.editorconfig
new file mode 100644
index 000..42aefb6
--- /dev/null
+++ b/.editorconfig
@@ -0,0 +1,6 @@
+# http://editorconfig.org
+root = true
+
+[*]
+indent_style = tab
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000..c760786
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+/coverage
+/doc
+/vendor
+/composer.lock
diff --git a/.jshintrc b/.jshintrc
new file mode 100644
index 000..0cc2a4a
--- /dev/null
+++ b/.jshintrc
@@ -0,0 +1,12 @@
+{
+   // Enforcing
+   "bitwise": true,
+   "eqeqeq": true,
+   "freeze": true,
+   "latedef": true,
+   "noarg": true,
+   "nonew": true,
+   "undef": true,
+   "unused": true,
+   "node": true
+}
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 000..c25a516
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,13 @@
+sudo: false
+language: php
+php:
+  - "5.3.3"
+  - "5.3"
+  - "5.4"
+  - "5.5"
+  - "5.6"
+  - "hhvm"
+install:
+  - composer install
+script:
+  - composer test
diff --git a/Doxyfile b/Doxyfile
new file mode 100644
index 000..3aec825
--- /dev/null
+++ b/Doxyfile
@@ -0,0 +1,26 @@
+# Doxyfile for WrappedString
+#
+# See 
+# for help on how to use this file to configure Doxygen.
+
+PROJECT_NAME   = "WrappedString"
+PROJECT_BRIEF  = "Automatically compact sequentially-outputted strings 
that share a common prefix / suffix pair."
+OUTPUT_DIRECTORY   = doc
+JAVADOC_AUTOBRIEF  = YES
+QT_AUTOBRIEF   = YES
+WARN_NO_PARAMDOC   = YES
+INPUT  = README.md src/
+FILE_PATTERNS  = *.php
+RECURSIVE  = YES
+USE_MDFILE_AS_MAINPAGE = README.md
+HTML_DYNAMIC_SECTIONS  = YES
+GENERATE_TREEVIEW  = YES
+TREEVIEW_WIDTH = 250
+GENERATE_LATEX = NO
+HAVE_DOT   = YES
+DOT_FONTNAME   = Helvetica
+DOT_FONTSIZE   = 10
+TEMPLATE_RELATIONS = YES
+CALL_GRAPH = NO
+CALLER_GRAPH   = NO
+DOT_MULTI_TARGETS  = YES
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 000..9c1052f
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,19 @@
+Copyright (c) 2015 Timo Tijhof 
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/README.md b/README.md
new file mode 100644
index 000..06b5c1d
--- /dev/null
+++ b/README.md
@@ -0,0 +1,24 @@
+WrappedString
+=
+
+WrappedString is a small PHP library for compacting redundant string-wrapping
+code in text output. The most common use-case is to eliminate redundant runs of
+HTML open/close tags.
+
+Here is how you use it:
+
+```php
+use WrappedString\MultiStringMatcher;
+
+$buffer = array();
+$buffer[] = new WrappedString( 'var q = q || [];', 'q.push( 0 );', 
'' );
+$buffer[] = new WrappedString( 'var q = q || [];', 'q.push( 1 );', 
'' );
+$output = WrappedString::join( "\n", $buffer );
+// Result: var q = q || [];q.push( 0 );q.push( 1 );
+
+```
+
+License
+---
+
+The project is licensed under the MIT license.
diff --git a/composer.json b/composer.json
new file mode 100644
index 000..022db90
--- /dev/null
+++ b/composer.json
@@ -0,0 +1,30 @@
+{
+   "name": "mediawiki/wrappedstring",
+   "description": "Automatically compact sequentially-outputted strings 
that share a common prefix / suffix pair.",
+   "license": "MIT",
+   "homepage": "https://www.

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

2015-07-27 Thread Ori.livneh (Code Review)
Ori.livneh has submitted this change and it was merged.

Change subject: Add .gitreview
..


Add .gitreview

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

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



diff --git a/.gitreview b/.gitreview
new file mode 100644
index 000..31a36a8
--- /dev/null
+++ b/.gitreview
@@ -0,0 +1,6 @@
+[gerrit]
+host=gerrit.wikimedia.org
+port=29418
+project=WrappedString.git
+defaultbranch=master
+defaultrebase=0

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2080e2945e8586cd96492c339aad40479886f24a
Gerrit-PatchSet: 1
Gerrit-Project: WrappedString
Gerrit-Branch: master
Gerrit-Owner: Ori.livneh 
Gerrit-Reviewer: Ori.livneh 

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


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

2015-07-27 Thread Ori.livneh (Code Review)
Ori.livneh has uploaded a new change for review.

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

Change subject: Add .gitreview
..

Add .gitreview

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


  git pull ssh://gerrit.wikimedia.org:29418/WrappedString 
refs/changes/63/227363/1

diff --git a/.gitreview b/.gitreview
new file mode 100644
index 000..31a36a8
--- /dev/null
+++ b/.gitreview
@@ -0,0 +1,6 @@
+[gerrit]
+host=gerrit.wikimedia.org
+port=29418
+project=WrappedString.git
+defaultbranch=master
+defaultrebase=0

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2080e2945e8586cd96492c339aad40479886f24a
Gerrit-PatchSet: 1
Gerrit-Project: WrappedString
Gerrit-Branch: master
Gerrit-Owner: Ori.livneh 

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


  1   2   3   4   >