[MediaWiki-commits] [Gerrit] pywikibot: Store ImportError in imported variable - change (pywikibot/core)

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

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

Change subject: pywikibot: Store ImportError in imported variable
..

pywikibot: Store ImportError in imported variable

If a lazy ImportError is to be handled, the ImportError
needs to be stored in a vairable and then used when required.
Earlier, the imported vairable was set to `None` and the
import error which was caught with `except` was used. But
this import error may not exist at a later time as python
guarantees it's existence only inside the `except` statement.
Hence, this is changed so that the ImportError is saved in the
variable that was being imported and checked later using
`isinstance(, ImportError)`.

Bug: T134337
Change-Id: I80f82e7f0674bfca70688f28640620dacac1d80b
---
M pywikibot/botirc.py
M pywikibot/diff.py
M scripts/flickrripper.py
3 files changed, 8 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/87/286787/1

diff --git a/pywikibot/botirc.py b/pywikibot/botirc.py
index b509221..b0567d0 100644
--- a/pywikibot/botirc.py
+++ b/pywikibot/botirc.py
@@ -25,13 +25,14 @@
 try:
 from ircbot import SingleServerIRCBot
 except ImportError as e:
+SingleServerIRCBotImportError = e
 class SingleServerIRCBot(object):
 
 """Fake SingleServerIRCBot."""
 
 def __init__(*args, **kwargs):
 """Report import exception."""
-raise e
+raise SingleServerIRCBotImportError
 
 
 _logger = "botirc"
diff --git a/pywikibot/diff.py b/pywikibot/diff.py
index f83033f..5d180d2 100644
--- a/pywikibot/diff.py
+++ b/pywikibot/diff.py
@@ -23,7 +23,7 @@
 try:
 from bs4 import BeautifulSoup
 except ImportError as bserror:
-BeautifulSoup = False
+BeautifulSoup = bserror
 
 import pywikibot
 from pywikibot.tools import chars
@@ -580,8 +580,8 @@
 @rtype: dict
 """
 # check if BeautifulSoup imported
-if not BeautifulSoup:
-raise bserror  # should have been raised and stored earlier.
+if isinstance(BeautifulSoup, ImportError):
+raise BeautifulSoup  # should have been raised and stored earlier.
 
 comparands = {'deleted-context': [], 'added-context': []}
 soup = BeautifulSoup(compare_string)
diff --git a/scripts/flickrripper.py b/scripts/flickrripper.py
index 7d549aa..4dfa9b9 100755
--- a/scripts/flickrripper.py
+++ b/scripts/flickrripper.py
@@ -64,7 +64,7 @@
 try:
 from pywikibot.userinterfaces.gui import Tkdialog
 except ImportError as _tk_error:
-Tkdialog = None
+Tkdialog = _tk_error
 
 
 flickr_allowed_license = {
@@ -304,7 +304,7 @@
 override, addCategory,
 removeCategories)
 # pywikibot.output(photoDescription)
-if Tkdialog is not None and not autonomous:
+if not isinstance(Tkdialog, ImportError) and not autonomous:
 try:
 (newPhotoDescription, newFilename, skip) = Tkdialog(
 photoDescription, photo, filename).show_dialog()
@@ -315,7 +315,7 @@
 elif not autonomous:
 pywikibot.warning('Switching to autonomous mode because GUI '
   'interface cannot be used')
-pywikibot.warning(_tk_error)
+pywikibot.warning(Tkdialog)
 autonomous = True
 if autonomous:
 newPhotoDescription = photoDescription

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

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

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


[MediaWiki-commits] [Gerrit] bump version - change (wikidata...rdf)

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

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

Change subject: bump version
..

bump version

Change-Id: Ic90cb30ba8d704bdb6156d0f0b89dd749f1c5a03
---
M blazegraph/pom.xml
M common/pom.xml
M dist/pom.xml
M pom.xml
M testTools/pom.xml
M tools/pom.xml
M war/pom.xml
7 files changed, 7 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikidata/query/rdf 
refs/changes/86/286786/1

diff --git a/blazegraph/pom.xml b/blazegraph/pom.xml
index b2e9da0..0c18a50 100644
--- a/blazegraph/pom.xml
+++ b/blazegraph/pom.xml
@@ -4,7 +4,7 @@
   
 org.wikidata.query.rdf
 parent
-0.2.1
+0.2.2-SNAPSHOT
   
   blazegraph
   jar
diff --git a/common/pom.xml b/common/pom.xml
index 041968c..ac5dd1f 100644
--- a/common/pom.xml
+++ b/common/pom.xml
@@ -4,7 +4,7 @@
   
 org.wikidata.query.rdf
 parent
-0.2.1
+0.2.2-SNAPSHOT
   
   common
   jar
diff --git a/dist/pom.xml b/dist/pom.xml
index bba40ef..0f6232e 100644
--- a/dist/pom.xml
+++ b/dist/pom.xml
@@ -4,7 +4,7 @@
   
 org.wikidata.query.rdf
 parent
-0.2.1
+0.2.2-SNAPSHOT
   
   service
   pom
diff --git a/pom.xml b/pom.xml
index 595945b..a7d4903 100644
--- a/pom.xml
+++ b/pom.xml
@@ -9,7 +9,7 @@
   
   org.wikidata.query.rdf
   parent
-  0.2.1
+  0.2.2-SNAPSHOT
   pom
 
   
diff --git a/testTools/pom.xml b/testTools/pom.xml
index 5e5112b..46381c3 100644
--- a/testTools/pom.xml
+++ b/testTools/pom.xml
@@ -4,7 +4,7 @@
   
 org.wikidata.query.rdf
 parent
-0.2.1
+0.2.2-SNAPSHOT
   
   testTools
   jar
diff --git a/tools/pom.xml b/tools/pom.xml
index 5f00b37..975e16e 100644
--- a/tools/pom.xml
+++ b/tools/pom.xml
@@ -4,7 +4,7 @@
   
 org.wikidata.query.rdf
 parent
-0.2.1
+0.2.2-SNAPSHOT
   
   tools
   jar
diff --git a/war/pom.xml b/war/pom.xml
index c1e0e22..d798b4f 100644
--- a/war/pom.xml
+++ b/war/pom.xml
@@ -4,7 +4,7 @@
   
 org.wikidata.query.rdf
 parent
-0.2.1
+0.2.2-SNAPSHOT
   
   blazegraph-service
   pom

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic90cb30ba8d704bdb6156d0f0b89dd749f1c5a03
Gerrit-PatchSet: 1
Gerrit-Project: wikidata/query/rdf
Gerrit-Branch: master
Gerrit-Owner: Smalyshev 

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


[MediaWiki-commits] [Gerrit] Replace mark-as-read-on-click with ?markasread= URL parameter - change (mediawiki...Echo)

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

Change subject: Replace mark-as-read-on-click with ?markasread= URL parameter
..


Replace mark-as-read-on-click with ?markasread= URL parameter

Notifications were being marked as read in response to a click event
in JavaScript, but that causes a jarring effect in the UI, and it's
not reliable (the browser could abort the AJAX request).

Instead, add ?markasread=XYZ to the end of every primary link URL,
where XYZ is the event ID.

Bug: T133975
Depends-On: Icb99d5479836fea25a47451b5a758dd71f642f71
Change-Id: I8047d121584b43e6172463a50ad0e0de5f7fa73c
---
M Hooks.php
M Resources.php
M includes/formatters/EchoFlyoutFormatter.php
M includes/formatters/EventPresentationModel.php
M includes/formatters/SpecialNotificationsFormatter.php
M includes/mapper/NotificationMapper.php
M modules/ext.echo.init.js
M modules/ooui/mw.echo.ui.NotificationItemWidget.js
8 files changed, 80 insertions(+), 16 deletions(-)

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



diff --git a/Hooks.php b/Hooks.php
index e687fc6..7c8c2eb 100644
--- a/Hooks.php
+++ b/Hooks.php
@@ -762,11 +762,11 @@
// @todo should this really be here?
$subtractAlerts = 0;
$subtractMessages = 0;
+   $eventIds = array();
if ( $title->getArticleID() ) {
-   $mapper = new EchoTargetPageMapper();
-   $fetchedTargetPages = $mapper->fetchByUserPageId( 
$user, $title->getArticleID() );
+   $targetPageMapper = new EchoTargetPageMapper();
+   $fetchedTargetPages = 
$targetPageMapper->fetchByUserPageId( $user, $title->getArticleID() );
if ( $fetchedTargetPages ) {
-   $eventIds = array();
$attribManager = 
EchoAttributeManager::newFromGlobalVars();
/* @var EchoTargetPage[] $targetPages */
foreach ( $fetchedTargetPages as $id => 
$targetPages ) {
@@ -776,19 +776,35 @@
$targetPages[0]->getEventType()
);
if ( $section === 
EchoAttributeManager::MESSAGE ) {
-   $subtractMessages += 1;
+   $subtractMessages++;
} else {
// ALERT
-   $subtractAlerts += 1;
+   $subtractAlerts++;
}
$eventIds[] = $id;
}
-   DeferredUpdates::addCallableUpdate( function () 
use ( $user, $eventIds ) {
-   $notifUser = 
MWEchoNotifUser::newFromUser( $user );
-   $notifUser->markRead( $eventIds );
-   } );
}
}
+   // Attempt to mark as read the event ID in the ?markasread= 
parameter, if present
+   $markAsReadId = $sk->getOutput()->getRequest()->getInt( 
'markasread' );
+   if ( $markAsReadId !== 0 && !in_array( $markAsReadId, $eventIds 
) ) {
+   $notifMapper = new EchoNotificationMapper();
+   $notif = $notifMapper->fetchByUserEvent( $user, 
$markAsReadId );
+   if ( $notif && !$notif->getReadTimestamp() ) {
+   if ( $notif->getEvent()->getSection() === 
EchoAttributeManager::MESSAGE ) {
+   $subtractMessages++;
+   } else {
+   $subtractAlerts++;
+   }
+   $eventIds[] = $markAsReadId;
+   }
+   }
+   if ( $eventIds ) {
+   DeferredUpdates::addCallableUpdate( function () use ( 
$user, $eventIds ) {
+   $notifUser = MWEchoNotifUser::newFromUser( 
$user );
+   $notifUser->markRead( $eventIds );
+   } );
+   }
 
// Add a "My notifications" item to personal URLs
$notifUser = MWEchoNotifUser::newFromUser( $user );
diff --git a/Resources.php b/Resources.php
index d0c5229..09dd241 100644
--- a/Resources.php
+++ b/Resources.php
@@ -205,7 +205,10 @@
'scripts' => array(
'ext.echo.init.js',
),
-   'dependencies' => array( 'ext.echo.api' ),
+   'dependencies' => 

[MediaWiki-commits] [Gerrit] ircserver: don't use TS6 protocol, no other servers - change (operations/puppet)

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

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

Change subject: ircserver: don't use TS6 protocol, no other servers
..

ircserver: don't use TS6 protocol, no other servers

Don't use the TS6 protocol (to connect to other servers)
and remove the whole section that is about connecting
to other servers.  We just have 1 servers.

Bug:134271
Change-Id: Ib4d096c374be3dcda589501c29475a343080a4e7
---
M modules/mw_rc_irc/templates/ircd.conf.erb
1 file changed, 1 insertion(+), 47 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/85/286785/1

diff --git a/modules/mw_rc_irc/templates/ircd.conf.erb 
b/modules/mw_rc_irc/templates/ircd.conf.erb
index 1826e1a..1dbb4c7 100644
--- a/modules/mw_rc_irc/templates/ircd.conf.erb
+++ b/modules/mw_rc_irc/templates/ircd.conf.erb
@@ -44,7 +44,7 @@
/* use ts6: whether we want to use the TS6 protocol to other servers
 * or not.
 */
-   use_ts6 = yes;
+   use_ts6 = no;
 
/* sid: the unique server id of our server.  This must be three
 * characters long.  The first character must be a digit [0-9], the
@@ -335,52 +335,6 @@
 user="*@special.user";
 password="<%= rc_oper_pass %>";
 };
-
-/* connect {}: controls servers we connect to (OLD C:, N:, H:, L:) */
-connect "irc.wikimedia.org" {
-/* the name must go above */
-
-/* host: the host or IP to connect to.  If a hostname is used it
- * must match the reverse dns of the server.
- */
-host = "kraz.wikimedia.org";
-
-/* vhost: the host or IP to bind to for this connection.  If this
- * is not specified, the default vhost (in serverinfo {}) is used.
- */
-#vhost = "192.168.0.50";
-
-/* passwords: the passwords we send (OLD C:) and accept (OLD N:).
- * The remote server will have these passwords reversed.
- */
-send_password = "<%= send_password %>";
-accept_password = "<%= accept_password %>";
-
-/* port: the port to connect to this server on */
-port = ;
-
-/* hub mask: the mask of servers that this server may hub. Multiple
- * entries are permitted
- */
-hub_mask = "*";
-
-/* leaf mask: the mask of servers this server may not hub.  Multiple
- * entries are permitted.  Useful for forbidding EU -> US -> EU routes.
- */
-#leaf_mask = "*.uk";
-
-/* class: the class this server is in */
-class = "server";
-
-/* flags: controls special options for this server
- * encrypted- marks the accept_password as being crypt()'d
- * autoconn - automatically connect to this server
- * compressed   - compress traffic via ziplinks
- * topicburst   - burst topics between servers
- */
-flags = compressed, topicburst;
-};
-
 
 
 /* The channel block contains options pertaining to channels */

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

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

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


[MediaWiki-commits] [Gerrit] Blacklist some meta-table Cassandra metrics - change (operations/puppet)

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

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

Change subject: Blacklist some meta-table Cassandra metrics
..

Blacklist some meta-table Cassandra metrics

Whitelists a curated set of metrics, mostly related to rate, latency, and
size, and blacklists the remaining.  Requires cassandra-metrics-collector
support for whitelisting, found here:

https://github.com/wikimedia/cassandra-metrics-collector/pull/9 and
https://github.com/wikimedia/cassandra-metrics-collector/pull/10

Bug: T134016
Change-Id: I423742774310344395f4009e0447a8ad9e0422bf
---
M hieradata/regex.yaml
M hieradata/role/common/cassandra.yaml
M modules/cassandra/manifests/metrics.pp
M modules/cassandra/templates/metrics-filter.yaml.erb
4 files changed, 76 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/84/286784/1

diff --git a/hieradata/regex.yaml b/hieradata/regex.yaml
index 6003b73..767375d 100644
--- a/hieradata/regex.yaml
+++ b/hieradata/regex.yaml
@@ -115,6 +115,26 @@
   cassandra::application_password: "%{passwords::cassandra::restbase}"
   restbase::cassandra_user: restb
   restbase::cassandra_password: "%{passwords::cassandra::restbase}"
+  cassandra::metrics::whitelist:
+- 
.*\.metrics\.ColumnFamily\.local_group_.*\.meta\.CoordinatorReadLatency\..*$
+- 
.*\.metrics\.ColumnFamily\.local_group_.*\.meta\.CoordinatorScanLatency\..*$
+- 
.*\.metrics\.ColumnFamily\.local_group_.*\.meta\.EstimatedColumnCountHistogram\..*$
+- .*\.metrics\.ColumnFamily\.local_group_.*\.meta\.EstimatedRowCount\..*$
+- 
.*\.metrics\.ColumnFamily\.local_group_.*\.meta\.EstimatedRowSizeHistogram\..*$
+- .*\.metrics\.ColumnFamily\.local_group_.*\.meta\.LiveDiskSpaceUsed\..*$
+- .*\.metrics\.ColumnFamily\.local_group_.*\.meta\.LiveSSTableCount\..*$
+- 
.*\.metrics\.ColumnFamily\.local_group_.*\.meta\.LiveScannedHistogram\..*$
+- .*\.metrics\.ColumnFamily\.local_group_.*\.meta\.MaxRowSize\..*$
+- .*\.metrics\.ColumnFamily\.local_group_.*\.meta\.MeanRowSize\..*$
+- .*\.metrics\.ColumnFamily\.local_group_.*\.meta\.MinRowSize\..*$
+- .*\.metrics\.ColumnFamily\.local_group_.*\.meta\.PendingCompactions\..*$
+- .*\.metrics\.ColumnFamily\.local_group_.*\.meta\.PendingFlushes\..*$
+- .*\.metrics\.ColumnFamily\.local_group_.*\.meta\.RangeLatency\..*$
+- .*\.metrics\.ColumnFamily\.local_group_.*\.meta\.ReadLatency\..*$
+- 
.*\.metrics\.ColumnFamily\.local_group_.*\.meta\.SSTablesPerReadHistogram\..*$
+- 
.*\.metrics\.ColumnFamily\.local_group_.*\.meta\.TombstoneScannedHistogram\..*$
+- .*\.metrics\.ColumnFamily\.local_group_.*\.meta\.TotalDiskSpaceUsed\..*$
+- .*\.metrics\.ColumnFamily\.local_group_.*\.meta\.WriteLatency\..*$
   cassandra::metrics::blacklist:
   - .*\.15MinuteRate$
   - .*\.5MinuteRate$
@@ -173,6 +193,26 @@
   cassandra::application_password: "%{passwords::cassandra::restbase}"
   restbase::cassandra_user: restb
   restbase::cassandra_password: "%{passwords::cassandra::restbase}"
+  cassandra::metrics::whitelist:
+- 
.*\.metrics\.ColumnFamily\.local_group_.*\.meta\.CoordinatorReadLatency\..*$
+- 
.*\.metrics\.ColumnFamily\.local_group_.*\.meta\.CoordinatorScanLatency\..*$
+- 
.*\.metrics\.ColumnFamily\.local_group_.*\.meta\.EstimatedColumnCountHistogram\..*$
+- .*\.metrics\.ColumnFamily\.local_group_.*\.meta\.EstimatedRowCount\..*$
+- 
.*\.metrics\.ColumnFamily\.local_group_.*\.meta\.EstimatedRowSizeHistogram\..*$
+- .*\.metrics\.ColumnFamily\.local_group_.*\.meta\.LiveDiskSpaceUsed\..*$
+- .*\.metrics\.ColumnFamily\.local_group_.*\.meta\.LiveSSTableCount\..*$
+- 
.*\.metrics\.ColumnFamily\.local_group_.*\.meta\.LiveScannedHistogram\..*$
+- .*\.metrics\.ColumnFamily\.local_group_.*\.meta\.MaxRowSize\..*$
+- .*\.metrics\.ColumnFamily\.local_group_.*\.meta\.MeanRowSize\..*$
+- .*\.metrics\.ColumnFamily\.local_group_.*\.meta\.MinRowSize\..*$
+- .*\.metrics\.ColumnFamily\.local_group_.*\.meta\.PendingCompactions\..*$
+- .*\.metrics\.ColumnFamily\.local_group_.*\.meta\.PendingFlushes\..*$
+- .*\.metrics\.ColumnFamily\.local_group_.*\.meta\.RangeLatency\..*$
+- .*\.metrics\.ColumnFamily\.local_group_.*\.meta\.ReadLatency\..*$
+- 
.*\.metrics\.ColumnFamily\.local_group_.*\.meta\.SSTablesPerReadHistogram\..*$
+- 
.*\.metrics\.ColumnFamily\.local_group_.*\.meta\.TombstoneScannedHistogram\..*$
+- .*\.metrics\.ColumnFamily\.local_group_.*\.meta\.TotalDiskSpaceUsed\..*$
+- .*\.metrics\.ColumnFamily\.local_group_.*\.meta\.WriteLatency\..*$
   cassandra::metrics::blacklist:
   - .*\.15MinuteRate$
   - .*\.5MinuteRate$
diff --git a/hieradata/role/common/cassandra.yaml 
b/hieradata/role/common/cassandra.yaml
index a6d9479..6478beb 100644
--- a/hieradata/role/common/cassandra.yaml
+++ b/hieradata/role/common/cassandra.yaml
@@ -84,6 +84,26 @@
 

[MediaWiki-commits] [Gerrit] ircserver: move ircd.conf to public repo - change (operations/puppet)

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

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

Change subject: ircserver: move ircd.conf to public repo
..

ircserver: move ircd.conf to public repo

Move the ircd.conf into the public repo after
replacing all the actually private parts with variables in an
.erb template.

Like T1234271 says "the config file should be split into a
public section, checked in to puppet.."

WIP: Need to add the private values in the private repo
and test.

Bug:T134271
Change-Id: I3b9fe33d896c15de41900bc069c32e85dd1f7aea
---
M modules/mw_rc_irc/manifests/ircserver.pp
A modules/mw_rc_irc/templates/ircd.conf.erb
2 files changed, 833 insertions(+), 1 deletion(-)


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

diff --git a/modules/mw_rc_irc/manifests/ircserver.pp 
b/modules/mw_rc_irc/manifests/ircserver.pp
index 69abd5f..1e6b4e3 100644
--- a/modules/mw_rc_irc/manifests/ircserver.pp
+++ b/modules/mw_rc_irc/manifests/ircserver.pp
@@ -12,7 +12,7 @@
 mode   => '0444',
 owner  => 'irc',
 group  => 'irc',
-content => secret('misc/ircd.conf');
+content => template('mw_rc_irc/ircd.conf');
 '/usr/etc/ircd.motd':
 mode=> '0444',
 owner   => 'irc',
diff --git a/modules/mw_rc_irc/templates/ircd.conf.erb 
b/modules/mw_rc_irc/templates/ircd.conf.erb
new file mode 100644
index 000..1826e1a
--- /dev/null
+++ b/modules/mw_rc_irc/templates/ircd.conf.erb
@@ -0,0 +1,832 @@
+/* This file is managed by Puppet!
+ *
+ * Copyright (C) 2000-2002 Hybrid Development Team
+ * Copyright (C) 2002-2003 ircd-ratbox development team
+ *
+ * Written by ejb, wcampbel, db, leeh and others
+ * Previously modified for EFNet by Disciple
+ *
+ * $Id: example.efnet.conf 23955 2007-05-14 17:22:36Z leeh $
+ */
+
+/* IMPORTANT NOTES:
+ *
+ * class {} blocks MUST be specified before anything that uses them.  That
+ * means they must be defined before auth {} and before connect {}.
+ *
+ * auth {} blocks MUST be specified in order of precedence.  The first one
+ * that matches a user will be used.  So place spoofs first, then specials,
+ * then general access, then restricted.
+ *
+ * Both shell style (#) and C style comments are supported.
+ *
+ * Files may be included by either:
+ *.include "filename"
+ *.include 
+ *
+ * Times/durations are written as:
+ *12 hours 30 minutes 1 second
+ *
+ * Valid units of time:
+ *month, week, day, hour, minute, second
+ *
+ * Valid units of size:
+ *megabyte/mbyte/mb, kilobyte/kbyte/kb, byte
+ *
+ * Sizes and times may be singular or plural.
+ */
+
+ /* serverinfo {}:  Contains information about the server. (OLD M:) */
+serverinfo {
+   /* name: the name of our server */
+   name = "irc.wikimedia.org";
+
+   /* use ts6: whether we want to use the TS6 protocol to other servers
+* or not.
+*/
+   use_ts6 = yes;
+
+   /* sid: the unique server id of our server.  This must be three
+* characters long.  The first character must be a digit [0-9], the
+* remaining two chars may be letters [A-Z] or digits [0-9].
+*
+* This must be specified even if use_ts6 is set to no.
+*/
+   sid = "42Y";
+
+   /* description: the description of our server.  '[' and ']' may not
+* be used here for compatibility with older servers.
+*/
+   description = "Wikimedia IRC Server";
+
+   /* network info: the name and description of the network this server
+* is on.  Shown in the 005 reply and used with serverhiding.
+*/
+   network_name = "Wikimedia";
+   network_desc = "Wikimedia RC -> IRC gateway";
+
+   /* hub: allow this server to act as a hub and have multiple servers
+* connected to it.
+*/
+   hub = no;
+
+   /* vhost: the IP to bind to when we connect outward to ipv4 servers.
+* This should be an ipv4 IP only.
+*/
+   #vhost = "192.169.0.1";
+
+   /* vhost6: the IP to bind to when we connect outward to ipv6 servers.
+* This should be an ipv6 IP only.
+*/
+   #vhost6 = "3ffe:80e8:546::2";
+
+   /* default max clients: the default maximum number of clients
+* allowed to connect.  This can be changed once ircd has started by
+* issuing:
+*   /quote set maxclients 
+*/
+   default_max_clients = 1;
+};
+
+/* admin {}: contains admin information about the server. (OLD A:) */
+admin {
+   name = "Wikimedia Administrators";
+   description = "Wikimedia Administrator";
+   email = "n...@wikimedia.org";
+};
+
+/* log {}: contains information about logfiles. */
+log {
+   /* logfiles: the logfiles to use for specific activity.  if these
+* paths are defined, then ircd will log to them, otherwise it wont.
+*
+  

[MediaWiki-commits] [Gerrit] [wip] Adjust to local x-wiki call - change (mediawiki...Echo)

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

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

Change subject: [wip] Adjust to local x-wiki call
..

[wip] Adjust to local x-wiki call

Fetch x-wiki notifications by asking the local API, but still
maintain the ability to send remote requests to the foreign wikis
for mark as read operations.

Change-Id: I48524cb9dff43257a401d7483e939edfb042b928
---
M modules/api/mw.echo.api.APIHandler.js
M modules/api/mw.echo.api.EchoApi.js
M modules/api/mw.echo.api.LocalAPIHandler.js
M modules/viewmodel/mw.echo.dm.NotificationGroupItem.js
M modules/viewmodel/mw.echo.dm.NotificationsModel.js
5 files changed, 128 insertions(+), 72 deletions(-)


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

diff --git a/modules/api/mw.echo.api.APIHandler.js 
b/modules/api/mw.echo.api.APIHandler.js
index 0100e9a..9ab47e7 100644
--- a/modules/api/mw.echo.api.APIHandler.js
+++ b/modules/api/mw.echo.api.APIHandler.js
@@ -58,9 +58,11 @@
 * the cached promise.
 *
 * @param {string} type Notification type
+* @param {string[]} [sources] An array of sources to query
 */
-   mw.echo.api.APIHandler.prototype.createNewFetchNotificationPromise = 
function ( type ) {
-   var me = this,
+   mw.echo.api.APIHandler.prototype.createNewFetchNotificationPromise = 
function ( type, sources ) {
+   var fetchingSource = 'local',
+   me = this,
params = $.extend( {
action: 'query',
meta: 'notifications',
@@ -72,11 +74,19 @@
uselang: this.userLang
}, this.getTypeParams( type ) );
 
-   this.apiErrorState[ type ] = false;
-   this.fetchNotificationsPromise[ type ] = this.api.get( params )
+   if ( Array.isArray( sources ) && sources.indexOf( 'local' ) === 
-1 ) {
+   params.notwikis = sources.join( '|' );
+   params.notfilter = '!read';
+   fetchingSource = 'foreign';
+   }
+
+   this.apiErrorState[ type ] = this.apiErrorState[ type ] || {};
+   this.apiErrorState[ type ][ fetchingSource ] = false;
+   this.fetchNotificationsPromise[ type ] = 
this.fetchNotificationsPromise[ type ] || {};
+   this.fetchNotificationsPromise[ type ][ fetchingSource ] = 
this.api.get( params )
.fail( function () {
// Mark API error state
-   me.apiErrorState[ type ] = true;
+   me.apiErrorState[ type ][ fetchingSource ] = 
true;
} );
 
};
@@ -138,8 +148,13 @@
 * @param {string} type Notification type, 'alert', 'message' or 'all'
 * @return {boolean} The model is in API error state
 */
-   mw.echo.api.APIHandler.prototype.isFetchingErrorState = function ( type 
) {
-   return !!this.apiErrorState[ type ];
+   mw.echo.api.APIHandler.prototype.isFetchingErrorState = function ( 
type, sources ) {
+   var fetchingSource = 'local';
+
+   if ( Array.isArray( sources ) && sources.indexOf( 'local' ) === 
-1 ) {
+   fetchingSource = 'foreign';
+   }
+   return !!( this.apiErrorState[ type ] && this.apiErrorState[ 
type ][ fetchingSource ] );
};
 
/**
@@ -149,11 +164,16 @@
 * @return {jQuery.Promise} Promise that is resolved when notifications 
are
 *  fetched from the API.
 */
-   mw.echo.api.APIHandler.prototype.getFetchNotificationPromise = function 
( type ) {
-   if ( !this.fetchNotificationsPromise[ type ] ) {
-   this.createNewFetchNotificationPromise( type );
+   mw.echo.api.APIHandler.prototype.getFetchNotificationPromise = function 
( type, sources ) {
+   var fetchingSource = 'local';
+
+   if ( Array.isArray( sources ) && sources.indexOf( 'local' ) === 
-1 ) {
+   fetchingSource = 'foreign';
}
-   return this.fetchNotificationsPromise[ type ];
+   if ( !this.fetchNotificationsPromise[ type ] || 
!this.fetchNotificationsPromise[ type ][ fetchingSource ] ) {
+   this.createNewFetchNotificationPromise( type, sources );
+   }
+   return this.fetchNotificationsPromise[ type ][ fetchingSource ];
};
 
/**
diff --git a/modules/api/mw.echo.api.EchoApi.js 
b/modules/api/mw.echo.api.EchoApi.js
index 18fe23d..0fb4ebc 100644
--- a/modules/api/mw.echo.api.EchoApi.js
+++ b/modules/api/mw.echo.api.EchoApi.js
@@ -33,10 +33,14 @@
 * @return {jQuery.Promise} Promise that is 

[MediaWiki-commits] [Gerrit] 0.2.1 - change (wikidata...rdf)

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

Change subject: 0.2.1
..


0.2.1

Change-Id: I8f9631a282fd8bdf78e196a571e74fb82f695858
---
M blazegraph/pom.xml
M common/pom.xml
M dist/pom.xml
M pom.xml
M testTools/pom.xml
M tools/pom.xml
M war/pom.xml
7 files changed, 7 insertions(+), 7 deletions(-)

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



diff --git a/blazegraph/pom.xml b/blazegraph/pom.xml
index 550ca38..b2e9da0 100644
--- a/blazegraph/pom.xml
+++ b/blazegraph/pom.xml
@@ -4,7 +4,7 @@
   
 org.wikidata.query.rdf
 parent
-0.2.1-SNAPSHOT
+0.2.1
   
   blazegraph
   jar
diff --git a/common/pom.xml b/common/pom.xml
index fce7b9a..041968c 100644
--- a/common/pom.xml
+++ b/common/pom.xml
@@ -4,7 +4,7 @@
   
 org.wikidata.query.rdf
 parent
-0.2.1-SNAPSHOT
+0.2.1
   
   common
   jar
diff --git a/dist/pom.xml b/dist/pom.xml
index bc99aeb..bba40ef 100644
--- a/dist/pom.xml
+++ b/dist/pom.xml
@@ -4,7 +4,7 @@
   
 org.wikidata.query.rdf
 parent
-0.2.1-SNAPSHOT
+0.2.1
   
   service
   pom
diff --git a/pom.xml b/pom.xml
index 1cc63df..595945b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -9,7 +9,7 @@
   
   org.wikidata.query.rdf
   parent
-  0.2.1-SNAPSHOT
+  0.2.1
   pom
 
   
diff --git a/testTools/pom.xml b/testTools/pom.xml
index 68c462c..5e5112b 100644
--- a/testTools/pom.xml
+++ b/testTools/pom.xml
@@ -4,7 +4,7 @@
   
 org.wikidata.query.rdf
 parent
-0.2.1-SNAPSHOT
+0.2.1
   
   testTools
   jar
diff --git a/tools/pom.xml b/tools/pom.xml
index 3a0e548..5f00b37 100644
--- a/tools/pom.xml
+++ b/tools/pom.xml
@@ -4,7 +4,7 @@
   
 org.wikidata.query.rdf
 parent
-0.2.1-SNAPSHOT
+0.2.1
   
   tools
   jar
diff --git a/war/pom.xml b/war/pom.xml
index f21f032..c1e0e22 100644
--- a/war/pom.xml
+++ b/war/pom.xml
@@ -4,7 +4,7 @@
   
 org.wikidata.query.rdf
 parent
-0.2.1-SNAPSHOT
+0.2.1
   
   blazegraph-service
   pom

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8f9631a282fd8bdf78e196a571e74fb82f695858
Gerrit-PatchSet: 1
Gerrit-Project: wikidata/query/rdf
Gerrit-Branch: master
Gerrit-Owner: Smalyshev 
Gerrit-Reviewer: Smalyshev 
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 MultiHttpClient for server-side cross-wiki requests - change (mediawiki...Echo)

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

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

Change subject: Use MultiHttpClient for server-side cross-wiki requests
..

Use MultiHttpClient for server-side cross-wiki requests

Change-Id: I6d647f250941a671b7b63890ef115380a22d38cc
---
M includes/api/ApiEchoNotifications.php
1 file changed, 20 insertions(+), 30 deletions(-)


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

diff --git a/includes/api/ApiEchoNotifications.php 
b/includes/api/ApiEchoNotifications.php
index 982f478..1217105 100644
--- a/includes/api/ApiEchoNotifications.php
+++ b/includes/api/ApiEchoNotifications.php
@@ -358,43 +358,33 @@
return array();
}
 
-   $multi = curl_multi_init();
-   $curls = array();
+   // Don't request cross-wiki notifications
+   unset( $params['notcrosswikisummary'] );
+   $params['format'] = 'php';
 
+   $reqs = array();
foreach ( $apis as $wiki => $api ) {
-   // only request data from that specific wiki, or they'd 
all spawn
-   // cross-wiki api requests...
-   $params['notwikis'] = $wiki;
-   unset( $params['notcrosswikisummary'] );
-
-   // get data in an easy-to-process format here
-   $params['format'] = 'php';
-
-   $curl = curl_init( $api['url'] );
-   curl_setopt( $curl, CURLOPT_RETURNTRANSFER, true );
-   curl_setopt( $curl, CURLOPT_POSTFIELDS, $params );
-
-   curl_multi_add_handle( $multi, $curl );
-   $curls[$wiki] = $curl;
+   $reqs[$wiki] = array(
+   'method' => 'GET',
+   'url' => $api['url'],
+   // Only request data from that specific wiki, 
or they'd all spawn
+   // cross-wiki api requests...
+   'query' => array_merge( $params, array( 
'notwikis' => $wiki ) ),
+   );
}
 
-   do {
-   curl_multi_exec( $multi, $running );
-   curl_multi_select( $multi );
-   } while ( $running > 0 );
+   $http = new MultiHttpClient( array() );
+   $responses = $http->runMulti( $reqs );
 
-   $results = array();
-   foreach ( $curls as $wiki => $curl ) {
-   $content = curl_multi_getcontent( $curl );
-   curl_multi_remove_handle( $multi, $curl );
-
-   if ( $content !== null ) {
-   $results[$wiki] = unserialize( $content );
-   $results[$wiki] = 
$results[$wiki]['query']['notifications'];
+   foreach ( $responses as $wiki => $response ) {
+   $statusCode = $response['response']['code'];
+   if ( $statusCode >= 200 && $statusCode <= 299 ) {
+   $parsed = unserialize( 
$response['response']['body'] );
+   if ( $parsed ) {
+   $results[$wiki] = 
$parsed['query']['notifications'];
+   }
}
}
-
-   curl_multi_close( $multi );
 
return $results;
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6d647f250941a671b7b63890ef115380a22d38cc
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
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] Update GUI - change (wikidata...rdf)

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

Change subject: Update GUI
..


Update GUI

Change-Id: I88bd2e494d9d3ba7fdafbb6a950e5f1d6018ac7c
---
M gui
1 file changed, 0 insertions(+), 0 deletions(-)

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



diff --git a/gui b/gui
index a8e9c45..dfe6040 16
--- a/gui
+++ b/gui
-Subproject commit a8e9c458684acccac61000ac40e158f68ecbdf45
+Subproject commit dfe6040cd807f77e24e7e5ff3e1a195edc4f05d3

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I88bd2e494d9d3ba7fdafbb6a950e5f1d6018ac7c
Gerrit-PatchSet: 1
Gerrit-Project: wikidata/query/rdf
Gerrit-Branch: master
Gerrit-Owner: Smalyshev 
Gerrit-Reviewer: Smalyshev 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Update GUI - change (wikidata...rdf)

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

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

Change subject: Update GUI
..

Update GUI

Change-Id: I88bd2e494d9d3ba7fdafbb6a950e5f1d6018ac7c
---
M gui
1 file changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikidata/query/rdf 
refs/changes/79/286779/1

diff --git a/gui b/gui
index a8e9c45..dfe6040 16
--- a/gui
+++ b/gui
-Subproject commit a8e9c458684acccac61000ac40e158f68ecbdf45
+Subproject commit dfe6040cd807f77e24e7e5ff3e1a195edc4f05d3

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I88bd2e494d9d3ba7fdafbb6a950e5f1d6018ac7c
Gerrit-PatchSet: 1
Gerrit-Project: wikidata/query/rdf
Gerrit-Branch: master
Gerrit-Owner: Smalyshev 

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


[MediaWiki-commits] [Gerrit] 0.2.1 - change (wikidata...rdf)

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

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

Change subject: 0.2.1
..

0.2.1

Change-Id: I8f9631a282fd8bdf78e196a571e74fb82f695858
---
M blazegraph/pom.xml
M common/pom.xml
M dist/pom.xml
M pom.xml
M testTools/pom.xml
M tools/pom.xml
M war/pom.xml
7 files changed, 7 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikidata/query/rdf 
refs/changes/80/286780/1

diff --git a/blazegraph/pom.xml b/blazegraph/pom.xml
index 550ca38..b2e9da0 100644
--- a/blazegraph/pom.xml
+++ b/blazegraph/pom.xml
@@ -4,7 +4,7 @@
   
 org.wikidata.query.rdf
 parent
-0.2.1-SNAPSHOT
+0.2.1
   
   blazegraph
   jar
diff --git a/common/pom.xml b/common/pom.xml
index fce7b9a..041968c 100644
--- a/common/pom.xml
+++ b/common/pom.xml
@@ -4,7 +4,7 @@
   
 org.wikidata.query.rdf
 parent
-0.2.1-SNAPSHOT
+0.2.1
   
   common
   jar
diff --git a/dist/pom.xml b/dist/pom.xml
index bc99aeb..bba40ef 100644
--- a/dist/pom.xml
+++ b/dist/pom.xml
@@ -4,7 +4,7 @@
   
 org.wikidata.query.rdf
 parent
-0.2.1-SNAPSHOT
+0.2.1
   
   service
   pom
diff --git a/pom.xml b/pom.xml
index 1cc63df..595945b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -9,7 +9,7 @@
   
   org.wikidata.query.rdf
   parent
-  0.2.1-SNAPSHOT
+  0.2.1
   pom
 
   
diff --git a/testTools/pom.xml b/testTools/pom.xml
index 68c462c..5e5112b 100644
--- a/testTools/pom.xml
+++ b/testTools/pom.xml
@@ -4,7 +4,7 @@
   
 org.wikidata.query.rdf
 parent
-0.2.1-SNAPSHOT
+0.2.1
   
   testTools
   jar
diff --git a/tools/pom.xml b/tools/pom.xml
index 3a0e548..5f00b37 100644
--- a/tools/pom.xml
+++ b/tools/pom.xml
@@ -4,7 +4,7 @@
   
 org.wikidata.query.rdf
 parent
-0.2.1-SNAPSHOT
+0.2.1
   
   tools
   jar
diff --git a/war/pom.xml b/war/pom.xml
index f21f032..c1e0e22 100644
--- a/war/pom.xml
+++ b/war/pom.xml
@@ -4,7 +4,7 @@
   
 org.wikidata.query.rdf
 parent
-0.2.1-SNAPSHOT
+0.2.1
   
   blazegraph-service
   pom

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8f9631a282fd8bdf78e196a571e74fb82f695858
Gerrit-PatchSet: 1
Gerrit-Project: wikidata/query/rdf
Gerrit-Branch: master
Gerrit-Owner: Smalyshev 

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


[MediaWiki-commits] [Gerrit] Amount is displayed correctly in PayPal - change (mediawiki...DonationInterface)

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

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

Change subject: Amount is displayed correctly in PayPal
..

Amount is displayed correctly in PayPal

Bug: T131811
Change-Id: I325f72da199e80362034c2769a80dc8406b7377c
---
M DonationInterface.php
M paypal_gateway/express_checkout/config/var_map.yaml
M paypal_gateway/express_checkout/paypal_express.adapter.php
3 files changed, 5 insertions(+), 1 deletion(-)


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

diff --git a/DonationInterface.php b/DonationInterface.php
index 056dc3a..6995bf9 100644
--- a/DonationInterface.php
+++ b/DonationInterface.php
@@ -404,7 +404,7 @@
//'Password' => '12345',
//'Credential' => '123123123123',
//'Signature' => 'or 123123123',
-   'RedirectURL' => 
'https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_express-checkout=',
+   'RedirectURL' => 
'https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_express-checkout=commit=',
 );
 # FIXME: These are only for signature authentication.
 # https://developer.paypal.com/docs/classic/api/endpoints/
diff --git a/paypal_gateway/express_checkout/config/var_map.yaml 
b/paypal_gateway/express_checkout/config/var_map.yaml
index c4d1d5c..6fac4df 100644
--- a/paypal_gateway/express_checkout/config/var_map.yaml
+++ b/paypal_gateway/express_checkout/config/var_map.yaml
@@ -19,3 +19,4 @@
 # TODO: discuss whether to capture
 #PHONENUM: phone
 TOKEN: ec_token
+L_PAYMENTREQUEST_0_AMT0: amount
diff --git a/paypal_gateway/express_checkout/paypal_express.adapter.php 
b/paypal_gateway/express_checkout/paypal_express.adapter.php
index 6d6120a..79f6ff5 100644
--- a/paypal_gateway/express_checkout/paypal_express.adapter.php
+++ b/paypal_gateway/express_checkout/paypal_express.adapter.php
@@ -96,6 +96,8 @@
'LOCALECODE',
// TODO: PAGESTYLE, HDRIMG, LOGOIMG
'EMAIL',
+   'L_PAYMENTREQUEST_0_AMT0',
+   'L_PAYMENTREQUEST_0_DESC0',
'PAYMENTREQUEST_0_AMT',
'PAYMENTREQUEST_0_CURRENCYCODE',
// FIXME: This should be deprecated, and is 
only for back-compat.
@@ -116,6 +118,7 @@
'CANCELURL' => ResultPages::getCancelPage( 
$this ),
'REQCONFIRMSHIPPING' => 0,
'NOSHIPPING' => 1,
+   'L_PAYMENTREQUEST_0_DESC0' => 
WmfFramework::formatMessage( 'donate_interface-donation-description' ),
'PAYMENTREQUEST_0_DESC' => 
WmfFramework::formatMessage( 'donate_interface-donation-description' ),
'PAYMENTREQUEST_0_PAYMENTACTION' => 'Sale',
'PAYMENTREQUEST_0_PAYMENTREASON' => 'None',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I325f72da199e80362034c2769a80dc8406b7377c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DonationInterface
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] Record final gateway_txn_id - change (mediawiki...DonationInterface)

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

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

Change subject: Record final gateway_txn_id
..

Record final gateway_txn_id

Bug: T131811
Change-Id: Ic4650fc2a094d600743453559d00286fa8622cfd
---
M gateway_common/gateway.adapter.php
M paypal_gateway/express_checkout/config/var_map.yaml
M paypal_gateway/express_checkout/paypal_express.adapter.php
3 files changed, 14 insertions(+), 10 deletions(-)


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

diff --git a/gateway_common/gateway.adapter.php 
b/gateway_common/gateway.adapter.php
index 6deb60d..e39af20 100644
--- a/gateway_common/gateway.adapter.php
+++ b/gateway_common/gateway.adapter.php
@@ -1709,6 +1709,7 @@
);
 
// Add the rest of the relevant data
+   // FIXME: We should use normalized data instead, almost 
everywhere.
$stomp_data = array_intersect_key(
$this->getData_Unstaged_Escaped(),
array_flip( $this->dataObj->getStompMessageFields() )
diff --git a/paypal_gateway/express_checkout/config/var_map.yaml 
b/paypal_gateway/express_checkout/config/var_map.yaml
index dd6e75c..c4d1d5c 100644
--- a/paypal_gateway/express_checkout/config/var_map.yaml
+++ b/paypal_gateway/express_checkout/config/var_map.yaml
@@ -1,13 +1,8 @@
-#USER: api_username
-#PWD: api_password
-#SIGNATURE: calculated
-#cancelUrl: const
-#returnUrl: const
-#VERSION
-
-LOCALECODE: language
+COUNTRYCODE: country
 EMAIL: email
-TOKEN: ec_token
+FIRSTNAME: fname
+LASTNAME: lname
+LOCALECODE: language
 PAYERID: payer_id
 RETURNURL: returnto
 PAYMENTREQUEST_0_AMT: amount
@@ -21,3 +16,6 @@
 PAYMENTINFO_0_ORDERTIME: date
 PAYMENTINFO_0_PAYMENTSTATUS: gateway_status
 PAYMENTINFO_0_TRANSACTIONID: gateway_txn_id
+# TODO: discuss whether to capture
+#PHONENUM: phone
+TOKEN: ec_token
diff --git a/paypal_gateway/express_checkout/paypal_express.adapter.php 
b/paypal_gateway/express_checkout/paypal_express.adapter.php
index 2421969..6d6120a 100644
--- a/paypal_gateway/express_checkout/paypal_express.adapter.php
+++ b/paypal_gateway/express_checkout/paypal_express.adapter.php
@@ -32,7 +32,8 @@
function __construct( $options = array() ) {
parent::__construct( $options );
 
-   if ( $this->getData_Unstaged_Escaped( 'payment_method' ) == 
null ) {
+   // FIXME: What's this about?
+   if ( !$this->getData_Unstaged_Escaped( 'payment_method' ) ) {
$this->addRequestData(
array( 'payment_method' => 'paypal' )
);
@@ -259,6 +260,7 @@
 
// Merge response into our transaction data.
// XXX--wait, there's no default function to unstage 
using var_map?
+   // FIXME: We don't want to allow overwriting of ctid, 
for example.
$this->addResponseData( $this->unstageKeys( $response ) 
);
 
$this->runAntifraudHooks();
@@ -273,6 +275,9 @@
$this->finalizeInternalStatus( 
FinalStatus::FAILED );
break;
}
+   $this->addResponseData( $this->unstageKeys( $response ) 
);
+   // FIXME: Silly.
+   $this->transaction_response->setGatewayTransactionId( 
$this->getData_Unstaged_Escaped( 'gateway_txn_id' ) );
$status = $this->findCodeAction( 
'DoExpressCheckoutPayment',
'PAYMENTINFO_0_ERRORCODE', 
$response['PAYMENTINFO_0_ERRORCODE'] );
$this->finalizeInternalStatus( $status );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic4650fc2a094d600743453559d00286fa8622cfd
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DonationInterface
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] Bump WDQS cache to 5 mins - change (operations/puppet)

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

Change subject: Bump WDQS cache to 5 mins
..


Bump WDQS cache to 5 mins

Change-Id: Id5b6a983a09d6459193724fc290f82b664a50bc9
---
M modules/wdqs/templates/nginx.erb
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/modules/wdqs/templates/nginx.erb b/modules/wdqs/templates/nginx.erb
index a3ec22c..da3cd93 100644
--- a/modules/wdqs/templates/nginx.erb
+++ b/modules/wdqs/templates/nginx.erb
@@ -55,7 +55,7 @@
 
 add_header X-Served-By <%= @hostname %> always;
 add_header Access-Control-Allow-Origin * always;
-add_header Cache-Control "public, max-age=60";
+add_header Cache-Control "public, max-age=300";
 add_header Vary Accept;
 
 client_max_body_size 1m;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id5b6a983a09d6459193724fc290f82b664a50bc9
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Smalyshev 
Gerrit-Reviewer: BBlack 
Gerrit-Reviewer: Gehel 
Gerrit-Reviewer: Giuseppe Lavagetto 
Gerrit-Reviewer: Yurik 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Prevent too large boolean queries from being created - change (search/extra)

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

Change subject: Prevent too large boolean queries from being created
..


Prevent too large boolean queries from being created

With some complex regular expressions the number of ngram automaton transition
is properly limited by max_ngrams_extracted. Unfortunately these transitions
may loop between each others and can cause the boolean expression generator
to create a very large boolean expression (100 extracted ngrams may be combined
into a 3+ boolean clauses).
This problem was not really noticed before because we used BooleanFilter which 
does
not re-create/optimize the boolean tree on each segment and remain relatively 
fast.
By using BooleanQuery we now hit the problem where a complex scorer is created 
on each
segment (in addition to the BooleanWeight) and the time required to build the 
scorer
tree is certainly counter productive.
BooleanQueries being limited to 1024 clauses it seems reasonable to also limit
the number of ngram clauses to 1024 by default.

This patch adds a check on the number of clauses in the boolean expression, if 
this
number exceeds max_ngram_clauses then a flat disjunction with the ngrams will 
be used
as the approximation. In some case it may still help to accelerate the query 
(if none
of the ngram extracted is popular). In other cases it will be just like an
unoptimized regex with a small overhead due to useless ngram lookup.

Bug: T133751

Change-Id: If9fc5c95dfcaa33e6bf3e007eb3781b817d4728f
---
M docs/source_regex.md
M 
src/main/java/org/wikimedia/search/extra/regex/AcceleratedSourceRegexQuery.java
M 
src/main/java/org/wikimedia/search/extra/regex/ExpressionToQueryTransformer.java
M src/main/java/org/wikimedia/search/extra/regex/SourceRegexQuery.java
M src/main/java/org/wikimedia/search/extra/regex/SourceRegexQueryBuilder.java
M src/main/java/org/wikimedia/search/extra/regex/SourceRegexQueryParser.java
M 
src/main/java/org/wikimedia/search/extra/regex/UnacceleratedSourceRegexQuery.java
M 
src/main/java/org/wikimedia/search/extra/regex/expression/AbstractCompositeExpression.java
M src/main/java/org/wikimedia/search/extra/regex/expression/Expression.java
A 
src/main/java/org/wikimedia/search/extra/regex/expression/ExpressionRewriter.java
M src/main/java/org/wikimedia/search/extra/regex/expression/False.java
M src/main/java/org/wikimedia/search/extra/regex/expression/Leaf.java
M src/main/java/org/wikimedia/search/extra/regex/expression/True.java
M src/test/java/org/wikimedia/search/extra/regex/expression/ExpressionTest.java
14 files changed, 167 insertions(+), 8 deletions(-)

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



diff --git a/docs/source_regex.md b/docs/source_regex.md
index 4d359c0..6449bda 100644
--- a/docs/source_regex.md
+++ b/docs/source_regex.md
@@ -121,6 +121,15 @@
 ignored.  Defaults to 100 which makes a lot of term filters but its not _too_
 many.  Without this even simple little regexes like /[abc]{20,80}/ would make
 thousands of term filters.
+* ```max_ngram_clauses``` Maximum number of boolean clauses generated by the
+accelerated ngram query. ```max_ngrams_extracted``` is useful to limit the
+number of ngram generated but depending on the regex complexity these ngrams
+may be combined into very large boolean clauses. This parameter prevents the
+accelerated ngram query from generating a too large boolean expression.
+Defaults to 1024 (same as BooleanQuery default). If the number of generated
+gram clauses is higher than the limit then a degraded boolean query may still
+be attempted.
+
 
 Also supports the standard Elasticsearch filter options:
 * ```_name```
diff --git 
a/src/main/java/org/wikimedia/search/extra/regex/AcceleratedSourceRegexQuery.java
 
b/src/main/java/org/wikimedia/search/extra/regex/AcceleratedSourceRegexQuery.java
index 88136e4..097b2ad 100644
--- 
a/src/main/java/org/wikimedia/search/extra/regex/AcceleratedSourceRegexQuery.java
+++ 
b/src/main/java/org/wikimedia/search/extra/regex/AcceleratedSourceRegexQuery.java
@@ -38,12 +38,13 @@
 
 @Override
 public Weight createWeight(IndexSearcher searcher, boolean needsScores) 
throws IOException {
-// TODO: Get rid of this shared mutable state, we should be able to use
-// the generic timeout system.
-final MutableValueInt inspected = new MutableValueInt();
 // Build the approximation based on trigrams
 final Weight approxWeight = approximation.createWeight(searcher, 
false);
 return new ConstantScoreWeight(this) {
+// TODO: Get rid of this shared mutable state, we should be able 
to use
+// the generic timeout system.
+private final MutableValueInt inspected = new MutableValueInt();
+
 @Override
 public Scorer scorer(final LeafReaderContext context) throws 
IOException {
 final Scorer approxScorer 

[MediaWiki-commits] [Gerrit] Bump WDQS cache to 5 mins - change (operations/puppet)

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

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

Change subject: Bump WDQS cache to 5 mins
..

Bump WDQS cache to 5 mins

Change-Id: Id5b6a983a09d6459193724fc290f82b664a50bc9
---
M modules/wdqs/templates/nginx.erb
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/76/286776/1

diff --git a/modules/wdqs/templates/nginx.erb b/modules/wdqs/templates/nginx.erb
index a3ec22c..da3cd93 100644
--- a/modules/wdqs/templates/nginx.erb
+++ b/modules/wdqs/templates/nginx.erb
@@ -55,7 +55,7 @@
 
 add_header X-Served-By <%= @hostname %> always;
 add_header Access-Control-Allow-Origin * always;
-add_header Cache-Control "public, max-age=60";
+add_header Cache-Control "public, max-age=300";
 add_header Vary Accept;
 
 client_max_body_size 1m;

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

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

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


[MediaWiki-commits] [Gerrit] Add jamwiki messages - change (mediawiki...WikimediaMessages)

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

Change subject: Add jamwiki messages
..


Add jamwiki messages

Bug: T134017
Change-Id: Ia074dd98391fa2f6a85223cbde479af60a10d8df
---
M i18n/wikimediainterwikisearchresults/en.json
M i18n/wikimediainterwikisearchresults/qqq.json
M i18n/wikimediaprojectnames/en.json
M i18n/wikimediaprojectnames/qqq.json
4 files changed, 4 insertions(+), 0 deletions(-)

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



diff --git a/i18n/wikimediainterwikisearchresults/en.json 
b/i18n/wikimediainterwikisearchresults/en.json
index 0d33d3b..bafc14f 100644
--- a/i18n/wikimediainterwikisearchresults/en.json
+++ b/i18n/wikimediainterwikisearchresults/en.json
@@ -114,6 +114,7 @@
"search-interwiki-results-iswiki": "Showing results from 
[[:is:Main_Page|Icelandic Wikipedia]].",
"search-interwiki-results-itwiki": "Showing results from 
[[:it:Main_Page|Italian Wikipedia]].",
"search-interwiki-results-iuwiki": "Showing results from 
[[:iu:Main_Page|Inuktitut Wikipedia]].",
+   "search-interwiki-results-jamwiki": "Showing results from 
[[:jam:Main_Page|Jamaican Patois Wikipedia]].",
"search-interwiki-results-jawiki": "Showing results from 
[[:ja:Main_Page|Japanese Wikipedia]].",
"search-interwiki-results-jbowiki": "Showing results from 
[[:jbo:Main_Page|Lojban Wikipedia]].",
"search-interwiki-results-jvwiki": "Showing results from 
[[:jv:Main_Page|Javanese Wikipedia]].",
diff --git a/i18n/wikimediainterwikisearchresults/qqq.json 
b/i18n/wikimediainterwikisearchresults/qqq.json
index da37f39..d1d4d69 100644
--- a/i18n/wikimediainterwikisearchresults/qqq.json
+++ b/i18n/wikimediainterwikisearchresults/qqq.json
@@ -116,6 +116,7 @@
"search-interwiki-results-iswiki": "Search results description for 
Icelandic Wikipedia.",
"search-interwiki-results-itwiki": "Search results description for 
Italian Wikipedia.",
"search-interwiki-results-iuwiki": "Search results description for 
Inuktitut Wikipedia.",
+   "search-interwiki-results-jamwiki": "Search results description for 
Jamaican Patois Wikipedia.",
"search-interwiki-results-jawiki": "Search results description for 
Japanese Wikipedia.",
"search-interwiki-results-jbowiki": "Search results description for 
Lojban Wikipedia.",
"search-interwiki-results-jvwiki": "Search results description for 
Javanese Wikipedia.",
diff --git a/i18n/wikimediaprojectnames/en.json 
b/i18n/wikimediaprojectnames/en.json
index 063c4e6..ff08c0b 100644
--- a/i18n/wikimediaprojectnames/en.json
+++ b/i18n/wikimediaprojectnames/en.json
@@ -339,6 +339,7 @@
"project-localized-name-itwikivoyage": "Italian Wikivoyage",
"project-localized-name-iuwiki": "Inuktitut Wikipedia",
"project-localized-name-iuwiktionary": "Inuktitut Wiktionary",
+   "project-localized-name-jamwiki": "Jamaican Patois Wikipedia",
"project-localized-name-jawiki": "Japanese Wikipedia",
"project-localized-name-jawiktionary": "Japanese Wiktionary",
"project-localized-name-jawikibooks": "Japanese Wikibooks",
diff --git a/i18n/wikimediaprojectnames/qqq.json 
b/i18n/wikimediaprojectnames/qqq.json
index 72a3a62..ac18dbe 100644
--- a/i18n/wikimediaprojectnames/qqq.json
+++ b/i18n/wikimediaprojectnames/qqq.json
@@ -346,6 +346,7 @@
"project-localized-name-itwikivoyage": 
"{{ProjectNameDocumentation|url=https://it.wikivoyage.org|name=Italian 
Wikivoyage|language=it}}",
"project-localized-name-iuwiki": 
"{{ProjectNameDocumentation|url=https://iu.wikipedia.org|name=Inuktitut 
Wikipedia|language=iu}}",
"project-localized-name-iuwiktionary": 
"{{ProjectNameDocumentation|url=https://iu.wiktionary.org|name=Inuktitut 
Wiktionary|language=iu}}",
+   "project-localized-name-jamwiki": 
"{{ProjectNameDocumentation|url=https://jam.wikipedia.org|name=Jamaican Patois 
Wikipedia|language=jam}}",
"project-localized-name-jawiki": 
"{{ProjectNameDocumentation|url=https://ja.wikipedia.org|name=Japanese 
Wikipedia|language=ja}}",
"project-localized-name-jawiktionary": 
"{{ProjectNameDocumentation|url=https://ja.wiktionary.org|name=Japanese 
Wiktionary|language=ja}}",
"project-localized-name-jawikibooks": 
"{{ProjectNameDocumentation|url=https://ja.wikibooks.org|name=Japanese 
Wikibooks|language=ja}}",

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia074dd98391fa2f6a85223cbde479af60a10d8df
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/WikimediaMessages
Gerrit-Branch: master
Gerrit-Owner: Alex Monk 
Gerrit-Reviewer: Alex Monk 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: Legoktm 

[MediaWiki-commits] [Gerrit] Match modern module loading in core - change (mediawiki...Graph)

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

Change subject: Match modern module loading in core
..


Match modern module loading in core

Bug: T134142
Bug: T134160
Change-Id: I6ce2f5aca3182daef07c86713534f646310223c6
(cherry picked from commit 78b7c572d0083cc3f92f7e89f42d06110193)
---
M extension.json
A lib/d3-global.js
A lib/topojson-global.js
3 files changed, 8 insertions(+), 0 deletions(-)

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



diff --git a/extension.json b/extension.json
index c9f7035..c8af69d 100644
--- a/extension.json
+++ b/extension.json
@@ -53,7 +53,9 @@
"ext.graph.vega1": {
"scripts": [
"lib/d3.js",
+   "lib/d3-global.js",
"lib/topojson.js",
+   "lib/topojson-global.js",
"lib/vega1/vega.js",
"modules/graph1.js"
],
@@ -69,7 +71,9 @@
"ext.graph.vega2": {
"scripts": [
"lib/d3.js",
+   "lib/d3-global.js",
"lib/topojson.js",
+   "lib/topojson-global.js",
"lib/vega2/vega.js",
"lib/graph2.compiled.js"
],
diff --git a/lib/d3-global.js b/lib/d3-global.js
new file mode 100644
index 000..cbf642a
--- /dev/null
+++ b/lib/d3-global.js
@@ -0,0 +1,2 @@
+// Back-compat: Export module as global
+window.d3 = module.exports;
diff --git a/lib/topojson-global.js b/lib/topojson-global.js
new file mode 100644
index 000..60e9e6a
--- /dev/null
+++ b/lib/topojson-global.js
@@ -0,0 +1,2 @@
+// Back-compat: Export module as global
+window.topojson = module.exports;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6ce2f5aca3182daef07c86713534f646310223c6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Graph
Gerrit-Branch: wmf/1.27.0-wmf.22
Gerrit-Owner: Dereckson 
Gerrit-Reviewer: Dereckson 
Gerrit-Reviewer: Yurik 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Match modern module loading in core - change (mediawiki...Graph)

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

Change subject: Match modern module loading in core
..


Match modern module loading in core

Bug: T134142
Bug: T134160
Change-Id: I6ce2f5aca3182daef07c86713534f646310223c6
(cherry picked from commit 78b7c572d0083cc3f92f7e89f42d06110193)
---
M extension.json
A lib/d3-global.js
A lib/topojson-global.js
3 files changed, 8 insertions(+), 0 deletions(-)

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



diff --git a/extension.json b/extension.json
index c9f7035..c8af69d 100644
--- a/extension.json
+++ b/extension.json
@@ -53,7 +53,9 @@
"ext.graph.vega1": {
"scripts": [
"lib/d3.js",
+   "lib/d3-global.js",
"lib/topojson.js",
+   "lib/topojson-global.js",
"lib/vega1/vega.js",
"modules/graph1.js"
],
@@ -69,7 +71,9 @@
"ext.graph.vega2": {
"scripts": [
"lib/d3.js",
+   "lib/d3-global.js",
"lib/topojson.js",
+   "lib/topojson-global.js",
"lib/vega2/vega.js",
"lib/graph2.compiled.js"
],
diff --git a/lib/d3-global.js b/lib/d3-global.js
new file mode 100644
index 000..cbf642a
--- /dev/null
+++ b/lib/d3-global.js
@@ -0,0 +1,2 @@
+// Back-compat: Export module as global
+window.d3 = module.exports;
diff --git a/lib/topojson-global.js b/lib/topojson-global.js
new file mode 100644
index 000..60e9e6a
--- /dev/null
+++ b/lib/topojson-global.js
@@ -0,0 +1,2 @@
+// Back-compat: Export module as global
+window.topojson = module.exports;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6ce2f5aca3182daef07c86713534f646310223c6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Graph
Gerrit-Branch: wmf/1.27.0-wmf.23
Gerrit-Owner: Dereckson 
Gerrit-Reviewer: Dereckson 
Gerrit-Reviewer: Yurik 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Update OOjs UI to v0.17.1 - change (mediawiki/core)

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

Change subject: Update OOjs UI to v0.17.1
..


Update OOjs UI to v0.17.1

Release notes:
 
https://phabricator.wikimedia.org/diffusion/GOJU/browse/master/History.md;v0.17.1

Change-Id: I6175a5d788f71f5d07efeabe54aca6335fce4766
---
M composer.json
M resources/lib/oojs-ui/oojs-ui-apex.js
M resources/lib/oojs-ui/oojs-ui-core-apex.css
M resources/lib/oojs-ui/oojs-ui-core-mediawiki.css
M resources/lib/oojs-ui/oojs-ui-core.js
M resources/lib/oojs-ui/oojs-ui-mediawiki.js
M resources/lib/oojs-ui/oojs-ui-toolbars-apex.css
M resources/lib/oojs-ui/oojs-ui-toolbars-mediawiki.css
M resources/lib/oojs-ui/oojs-ui-toolbars.js
M resources/lib/oojs-ui/oojs-ui-widgets-apex.css
M resources/lib/oojs-ui/oojs-ui-widgets-mediawiki.css
M resources/lib/oojs-ui/oojs-ui-widgets.js
M resources/lib/oojs-ui/oojs-ui-windows-apex.css
M resources/lib/oojs-ui/oojs-ui-windows-mediawiki.css
M resources/lib/oojs-ui/oojs-ui-windows.js
15 files changed, 158 insertions(+), 156 deletions(-)

Approvals:
  Bartosz Dziewoński: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/composer.json b/composer.json
index 4fb107e..57531c1 100644
--- a/composer.json
+++ b/composer.json
@@ -25,7 +25,7 @@
"ext-xml": "*",
"liuggio/statsd-php-client": "1.0.18",
"mediawiki/at-ease": "1.1.0",
-   "oojs/oojs-ui": "0.17.0",
+   "oojs/oojs-ui": "0.17.1",
"oyejorge/less.php": "1.7.0.10",
"php": ">=5.5.9",
"psr/log": "1.0.0",
diff --git a/resources/lib/oojs-ui/oojs-ui-apex.js 
b/resources/lib/oojs-ui/oojs-ui-apex.js
index 62613b8..625c02e 100644
--- a/resources/lib/oojs-ui/oojs-ui-apex.js
+++ b/resources/lib/oojs-ui/oojs-ui-apex.js
@@ -1,12 +1,12 @@
 /*!
- * OOjs UI v0.17.0
+ * OOjs UI v0.17.1
  * https://www.mediawiki.org/wiki/OOjs_UI
  *
  * Copyright 2011–2016 OOjs UI Team and other contributors.
  * Released under the MIT license
  * http://oojs.mit-license.org
  *
- * Date: 2016-04-26T21:34:01Z
+ * Date: 2016-05-03T22:58:02Z
  */
 ( function ( OO ) {
 
diff --git a/resources/lib/oojs-ui/oojs-ui-core-apex.css 
b/resources/lib/oojs-ui/oojs-ui-core-apex.css
index c928838..eeb4b28 100644
--- a/resources/lib/oojs-ui/oojs-ui-core-apex.css
+++ b/resources/lib/oojs-ui/oojs-ui-core-apex.css
@@ -1,12 +1,12 @@
 /*!
- * OOjs UI v0.17.0
+ * OOjs UI v0.17.1
  * https://www.mediawiki.org/wiki/OOjs_UI
  *
  * Copyright 2011–2016 OOjs UI Team and other contributors.
  * Released under the MIT license
  * http://oojs.mit-license.org
  *
- * Date: 2016-04-26T21:34:05Z
+ * Date: 2016-05-03T22:58:06Z
  */
 .oo-ui-element-hidden {
display: none !important;
diff --git a/resources/lib/oojs-ui/oojs-ui-core-mediawiki.css 
b/resources/lib/oojs-ui/oojs-ui-core-mediawiki.css
index 72e4db8..268a680 100644
--- a/resources/lib/oojs-ui/oojs-ui-core-mediawiki.css
+++ b/resources/lib/oojs-ui/oojs-ui-core-mediawiki.css
@@ -1,12 +1,12 @@
 /*!
- * OOjs UI v0.17.0
+ * OOjs UI v0.17.1
  * https://www.mediawiki.org/wiki/OOjs_UI
  *
  * Copyright 2011–2016 OOjs UI Team and other contributors.
  * Released under the MIT license
  * http://oojs.mit-license.org
  *
- * Date: 2016-04-26T21:34:05Z
+ * Date: 2016-05-03T22:58:06Z
  */
 .oo-ui-element-hidden {
display: none !important;
@@ -53,6 +53,9 @@
font-weight: bold;
text-decoration: none;
 }
+.oo-ui-buttonElement > .oo-ui-buttonElement-button:focus {
+   outline: 0;
+}
 .oo-ui-buttonElement.oo-ui-iconElement > .oo-ui-buttonElement-button > 
.oo-ui-iconElement-icon {
margin-left: 0;
 }
@@ -60,8 +63,7 @@
margin-left: 0.46875em;
 }
 .oo-ui-buttonElement-frameless > .oo-ui-buttonElement-button:focus {
-   box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(0, 0, 0, 
0.2);
-   outline: 0;
+   box-shadow: inset 0 0 0 1px #347bff, 0 0 0 1px #347bff;
 }
 .oo-ui-buttonElement-frameless > .oo-ui-buttonElement-button 
.oo-ui-indicatorElement-indicator {
margin-right: 0;
@@ -83,36 +85,33 @@
 
.oo-ui-buttonElement-frameless.oo-ui-widget-enabled.oo-ui-buttonElement-pressed 
> .oo-ui-buttonElement-button > .oo-ui-labelElement-label {
color: #44;
 }
-.oo-ui-buttonElement-frameless.oo-ui-widget-enabled.oo-ui-flaggedElement-progressive
 > .oo-ui-buttonElement-button:hover > .oo-ui-labelElement-label,
-.oo-ui-buttonElement-frameless.oo-ui-widget-enabled.oo-ui-flaggedElement-progressive
 > .oo-ui-buttonElement-button:focus > .oo-ui-labelElement-label {
-   color: #2962cc;
-}
 
.oo-ui-buttonElement-frameless.oo-ui-widget-enabled.oo-ui-flaggedElement-progressive
 > .oo-ui-buttonElement-button > .oo-ui-labelElement-label {
color: #347bff;
+}
+.oo-ui-buttonElement-frameless.oo-ui-widget-enabled.oo-ui-flaggedElement-progressive.oo-ui-widget-enabled
 > .oo-ui-buttonElement-button:hover > .oo-ui-labelElement-label {
+   

[MediaWiki-commits] [Gerrit] Fix relevancy_api test with/without boostlinks - change (mediawiki...CirrusSearch)

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

Change subject: Fix relevancy_api test with/without boostlinks
..


Fix relevancy_api test with/without boostlinks

Computed norms were the same for both articles. By disabling boostLinks scores
for these docs are exactly the same.  By adding 5 words to Relevancylinktest
Larger Extraword we decrease the all.plain norm to 0.109375 (instead of 0.125).

Bug: T133756
Change-Id: If340a097da1c6ed3bef6e024e8b3d147b56c8a7b
---
M tests/browser/features/relevancy_api.feature
1 file changed, 18 insertions(+), 1 deletion(-)

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



diff --git a/tests/browser/features/relevancy_api.feature 
b/tests/browser/features/relevancy_api.feature
index 4830e13..69dc2bc 100644
--- a/tests/browser/features/relevancy_api.feature
+++ b/tests/browser/features/relevancy_api.feature
@@ -64,7 +64,7 @@
 
   Scenario: Incoming links count in page weight
 Given a page named Relevancylinktest Smaller exists
-  And a page named Relevancylinktest Larger Extraword exists
+  And a page named Relevancylinktest Larger Extraword exists with contents 
Relevancylinktest needs 5 extra words
   And a page named Relevancylinktest Larger/Link A exists with contents 
[[Relevancylinktest Larger Extraword]]
   And a page named Relevancylinktest Larger/Link B exists with contents 
[[Relevancylinktest Larger Extraword]]
   And a page named Relevancylinktest Larger/Link C exists with contents 
[[Relevancylinktest Larger Extraword]]
@@ -74,6 +74,23 @@
 Then Relevancylinktest Smaller is the first api search result
   And Relevancylinktest Larger Extraword is the second api search result
 # This test can fail spuriously for the same reasons that "Redirects count 
as incoming links" can fail
+# With the allfield Relevancylinktest Smaller will get 21 freq for the 
term Relevancylinktest and a
+# length norm of 0.125 for the all.plain (title is copied to the text 
field if no text is set)
+# Relevancylinktest Larger Extraword will get 21 freq for the same term 
(content being set we re-add
+# "Relevancylinktest" in the content to match the 21 freq of 
Relevancylinktest Smaller)
+# We add extra words to decrease the length norm to 0.109375.
+# freq 21 is explained by the copy_to features which will copy title words 
20 times to the all.plain
+# add one occurrence for the term in the text field and you'll get 21.
+# for norms: Relevancylinktest Smaller will have a term length of 40 + 2 
-> 42 which will be computed as
+# 1/sqrt(42) => 0.154 and then encoded as 0.125 (precision reduction)
+# Relevancylinktest Larger Extraword will be 60 + 5 => 65 computed as 
0.124 but encoded as 0.109
+# Small java test case to understand:
+# int termCount = 65;
+# TFIDFSimilarity sim = new ClassicSimilarity();
+# FieldInvertState fiv = new FieldInvertState("test", 0, termCount, 0, 0, 
1f);
+# System.out.println("computed: " + sim.lengthNorm(fiv));
+# System.out.println("encoded: " + 
sim.decodeNormValue(sim.computeNorm(fiv)));
+
 
   Scenario: Results are sorted based on how close the match is
 When I api search with disabled incoming link weighting for 
Relevancyclosetest Foô

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If340a097da1c6ed3bef6e024e8b3d147b56c8a7b
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/CirrusSearch
Gerrit-Branch: es2.x
Gerrit-Owner: DCausse 
Gerrit-Reviewer: DCausse 
Gerrit-Reviewer: EBernhardson 
Gerrit-Reviewer: Gehel 
Gerrit-Reviewer: Manybubbles 
Gerrit-Reviewer: Smalyshev 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Follow-up f9b4bbff: Fix typo'ed variable name - change (mediawiki/core)

2016-05-03 Thread Code Review
Bartosz Dziewoński has submitted this change and it was merged.

Change subject: Follow-up f9b4bbff: Fix typo'ed variable name
..


Follow-up f9b4bbff: Fix typo'ed variable name

Change-Id: Ied52bbaa8d9b8e15470a99cd45ebef0c43c5dd69
---
M maintenance/resources/update-oojs-ui.sh
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Bartosz Dziewoński: Verified; Looks good to me, approved
  Jforrester: Looks good to me, approved



diff --git a/maintenance/resources/update-oojs-ui.sh 
b/maintenance/resources/update-oojs-ui.sh
index d20cbe8..dbce7a7 100755
--- a/maintenance/resources/update-oojs-ui.sh
+++ b/maintenance/resources/update-oojs-ui.sh
@@ -70,7 +70,7 @@
 Update OOjs UI to v$OOJSUI_VERSION
 
 Release notes:
- 
https://phabricator.wikimedia.org/diffusion/GOJU/browse/master/History.md;v$OOJS_VERSION
+ 
https://phabricator.wikimedia.org/diffusion/GOJU/browse/master/History.md;v$OOJSUI_VERSION
 END
 )
 

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

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

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


[MediaWiki-commits] [Gerrit] Match modern module loading in core - change (mediawiki...Graph)

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

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

Change subject: Match modern module loading in core
..

Match modern module loading in core

Bug: T134142
Bug: T134160
Change-Id: I6ce2f5aca3182daef07c86713534f646310223c6
(cherry picked from commit 78b7c572d0083cc3f92f7e89f42d06110193)
---
M extension.json
A lib/d3-global.js
A lib/topojson-global.js
3 files changed, 8 insertions(+), 0 deletions(-)


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

diff --git a/extension.json b/extension.json
index c9f7035..c8af69d 100644
--- a/extension.json
+++ b/extension.json
@@ -53,7 +53,9 @@
"ext.graph.vega1": {
"scripts": [
"lib/d3.js",
+   "lib/d3-global.js",
"lib/topojson.js",
+   "lib/topojson-global.js",
"lib/vega1/vega.js",
"modules/graph1.js"
],
@@ -69,7 +71,9 @@
"ext.graph.vega2": {
"scripts": [
"lib/d3.js",
+   "lib/d3-global.js",
"lib/topojson.js",
+   "lib/topojson-global.js",
"lib/vega2/vega.js",
"lib/graph2.compiled.js"
],
diff --git a/lib/d3-global.js b/lib/d3-global.js
new file mode 100644
index 000..cbf642a
--- /dev/null
+++ b/lib/d3-global.js
@@ -0,0 +1,2 @@
+// Back-compat: Export module as global
+window.d3 = module.exports;
diff --git a/lib/topojson-global.js b/lib/topojson-global.js
new file mode 100644
index 000..60e9e6a
--- /dev/null
+++ b/lib/topojson-global.js
@@ -0,0 +1,2 @@
+// Back-compat: Export module as global
+window.topojson = module.exports;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6ce2f5aca3182daef07c86713534f646310223c6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Graph
Gerrit-Branch: wmf/1.27.0-wmf.23
Gerrit-Owner: Dereckson 
Gerrit-Reviewer: Yurik 

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


[MediaWiki-commits] [Gerrit] Match modern module loading in core - change (mediawiki...Graph)

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

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

Change subject: Match modern module loading in core
..

Match modern module loading in core

Bug: T134142
Bug: T134160
Change-Id: I6ce2f5aca3182daef07c86713534f646310223c6
(cherry picked from commit 78b7c572d0083cc3f92f7e89f42d06110193)
---
M extension.json
A lib/d3-global.js
A lib/topojson-global.js
3 files changed, 8 insertions(+), 0 deletions(-)


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

diff --git a/extension.json b/extension.json
index c9f7035..c8af69d 100644
--- a/extension.json
+++ b/extension.json
@@ -53,7 +53,9 @@
"ext.graph.vega1": {
"scripts": [
"lib/d3.js",
+   "lib/d3-global.js",
"lib/topojson.js",
+   "lib/topojson-global.js",
"lib/vega1/vega.js",
"modules/graph1.js"
],
@@ -69,7 +71,9 @@
"ext.graph.vega2": {
"scripts": [
"lib/d3.js",
+   "lib/d3-global.js",
"lib/topojson.js",
+   "lib/topojson-global.js",
"lib/vega2/vega.js",
"lib/graph2.compiled.js"
],
diff --git a/lib/d3-global.js b/lib/d3-global.js
new file mode 100644
index 000..cbf642a
--- /dev/null
+++ b/lib/d3-global.js
@@ -0,0 +1,2 @@
+// Back-compat: Export module as global
+window.d3 = module.exports;
diff --git a/lib/topojson-global.js b/lib/topojson-global.js
new file mode 100644
index 000..60e9e6a
--- /dev/null
+++ b/lib/topojson-global.js
@@ -0,0 +1,2 @@
+// Back-compat: Export module as global
+window.topojson = module.exports;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6ce2f5aca3182daef07c86713534f646310223c6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Graph
Gerrit-Branch: wmf/1.27.0-wmf.22
Gerrit-Owner: Dereckson 
Gerrit-Reviewer: Yurik 

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


[MediaWiki-commits] [Gerrit] Update OOjs UI to v0.17.1 - change (mediawiki/vendor)

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

Change subject: Update OOjs UI to v0.17.1
..


Update OOjs UI to v0.17.1

Release notes:
 https://git.wikimedia.org/blob/oojs%2Fui.git/v0.17.1/History.md

Change-Id: I6175a5d788f71f5d07efeabe54aca6335fce4766
---
M composer.json
M composer.lock
M composer/installed.json
M oojs/oojs-ui/History.md
M oojs/oojs-ui/package.json
5 files changed, 101 insertions(+), 90 deletions(-)

Approvals:
  Bartosz Dziewoński: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/composer.json b/composer.json
index 3c5fe80..5c6993f 100644
--- a/composer.json
+++ b/composer.json
@@ -17,7 +17,7 @@
"mediawiki/at-ease": "1.1.0",
"monolog/monolog": "1.18.2",
"nmred/kafka-php": "0.1.5",
-   "oojs/oojs-ui": "0.17.0",
+   "oojs/oojs-ui": "0.17.1",
"oyejorge/less.php": "1.7.0.10",
"pear/console_getopt": "1.4.1",
"pear/mail": "1.3.0",
diff --git a/composer.lock b/composer.lock
index 5533072..603f8f0 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,8 +4,8 @@
 "Read more about it at 
https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file;,
 "This file is @generated automatically"
 ],
-"hash": "92fec9f4618c90943af51d690cc7393f",
-"content-hash": "55f53c0a9cecd4c22bf025f3f955591a",
+"hash": "2e032cbe0c06b4225c319a65930d7631",
+"content-hash": "c61356e2af6e9a24a6629157061d8971",
 "packages": [
 {
 "name": "composer/semver",
@@ -430,16 +430,16 @@
 },
 {
 "name": "oojs/oojs-ui",
-"version": "v0.17.0",
+"version": "v0.17.1",
 "source": {
 "type": "git",
 "url": "https://github.com/wikimedia/oojs-ui.git;,
-"reference": "332cb90192b83979e479b691b970b5f2c18e6df7"
+"reference": "ca52adc5c0191eb278baa2bcb50d30b2bd7b0af3"
 },
 "dist": {
 "type": "zip",
-"url": 
"https://api.github.com/repos/wikimedia/oojs-ui/zipball/332cb90192b83979e479b691b970b5f2c18e6df7;,
-"reference": "332cb90192b83979e479b691b970b5f2c18e6df7",
+"url": 
"https://api.github.com/repos/wikimedia/oojs-ui/zipball/ca52adc5c0191eb278baa2bcb50d30b2bd7b0af3;,
+"reference": "ca52adc5c0191eb278baa2bcb50d30b2bd7b0af3",
 "shasum": ""
 },
 "require": {
@@ -505,7 +505,7 @@
 ],
 "description": "Provides library of common widgets, layouts, and 
windows.",
 "homepage": "https://www.mediawiki.org/wiki/OOjs_UI;,
-"time": "2016-04-26 21:06:41"
+"time": "2016-05-03 22:34:48"
 },
 {
 "name": "oyejorge/less.php",
diff --git a/composer/installed.json b/composer/installed.json
index c99841a..637eb49 100644
--- a/composer/installed.json
+++ b/composer/installed.json
@@ -1729,87 +1729,6 @@
 "homepage": "https://www.mediawiki.org/wiki/HtmlFormatter;
 },
 {
-"name": "oojs/oojs-ui",
-"version": "v0.17.0",
-"version_normalized": "0.17.0.0",
-"source": {
-"type": "git",
-"url": "https://github.com/wikimedia/oojs-ui.git;,
-"reference": "332cb90192b83979e479b691b970b5f2c18e6df7"
-},
-"dist": {
-"type": "zip",
-"url": 
"https://api.github.com/repos/wikimedia/oojs-ui/zipball/332cb90192b83979e479b691b970b5f2c18e6df7;,
-"reference": "332cb90192b83979e479b691b970b5f2c18e6df7",
-"shasum": ""
-},
-"require": {
-"mediawiki/at-ease": "1.1.0",
-"php": ">=5.5.9"
-},
-"require-dev": {
-"jakub-onderka/php-parallel-lint": "0.9.2",
-"mediawiki/mediawiki-codesniffer": "0.6.0",
-"phpunit/phpunit": "4.8.21"
-},
-"time": "2016-04-26 21:06:41",
-"type": "library",
-"installation-source": "dist",
-"autoload": {
-"classmap": [
-"php/"
-]
-},
-"notification-url": "https://packagist.org/downloads/;,
-"license": [
-"MIT"
-],
-"authors": [
-{
-"name": "Timo Tijhof",
-"email": "krinklem...@gmail.com"
-},
-{
-"name": "Bartosz Dziewoński",
-"email": "matma@gmail.com"
-},
-{
-"name": "Ed Sanders",
-"email": "esand...@wikimedia.org"
-},
-{
-"name": "James D. Forrester",
-"email": "jforres...@wikimedia.org"
-},
-{
-"name": "Kirsten 

[MediaWiki-commits] [Gerrit] WIP SQLite support for PDO backend - change (wikimedia...php-queue)

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

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

Change subject: WIP SQLite support for PDO backend
..

WIP SQLite support for PDO backend

Mashed together with a thing that changes the signature of
createTable and deleteTable, which should be untangled

Change-Id: I6def3c3b0e56a3d0608478bb11516077d054d695
---
M src/PHPQueue/Backend/PDO.php
R test/PHPQueue/Backend/PDOBaseTest.php
A test/PHPQueue/Backend/PDOMysqlTest.php
A test/PHPQueue/Backend/PDOSqliteTest.php
4 files changed, 69 insertions(+), 34 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/php-queue 
refs/changes/73/286773/1

diff --git a/src/PHPQueue/Backend/PDO.php b/src/PHPQueue/Backend/PDO.php
index 5530022..9b89c7a 100644
--- a/src/PHPQueue/Backend/PDO.php
+++ b/src/PHPQueue/Backend/PDO.php
@@ -6,6 +6,7 @@
 use PHPQueue\Interfaces\FifoQueueStore;
 use PHPQueue\Interfaces\IndexedFifoQueueStore;
 use PHPQueue\Interfaces\KeyValueStore;
+use RuntimeException;
 
 class PDO
 extends Base
@@ -72,10 +73,12 @@
 
 public function push($data)
 {
-$sql = sprintf('INSERT INTO `%s` (`data`, `timestamp`) VALUES (?, 
now())', $this->db_table);
+$sql = sprintf('INSERT INTO `%s` (`data`, `timestamp`) VALUES (?, ?)', 
$this->db_table);
 $sth = $this->getConnection()->prepare($sql);
 $_tmp = json_encode($data);
 $sth->bindParam(1, $_tmp, \PDO::PARAM_STR);
+$now = new \DateTime('now', new \DateTimeZone('UTC'));
+$sth->bindParam(2, $now->format('Y-m-d\TH:i:s.u'), \PDO::PARAM_STR);
 try {
 $success = $sth->execute();
 if (!$success) {
@@ -83,7 +86,7 @@
 }
 } catch (\Exception $ex) {
 // TODO: Log original error and table creation attempt.
-$this->createTable($this->db_table);
+$this->createTable();
 
 // Try again.
 if (!$sth->execute()) {
@@ -158,7 +161,7 @@
 $this->getConnection()->commit();
 return $data;
 } catch (\Exception $ex) {
-$this->getConnection()->rollback();
+$this->getConnection()->rollBack();
 throw $ex;
 }
 }
@@ -191,9 +194,9 @@
 return true;
 }
 
-public function createTable($table_name)
+public function createTable()
 {
-if (empty($table_name)) {
+if (empty($this->db_table)) {
 throw new BackendException('Invalid table name.');
 }
 switch ($this->getDriverName()) {
@@ -203,7 +206,14 @@
 `data` mediumtext NULL,
 `timestamp` datetime NOT NULL,
 PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;", 
$table_name);
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;", 
$this->db_table);
+break;
+case 'sqlite':
+$sql = sprintf("CREATE TABLE IF NOT EXISTS `%s` (
+`id` INTEGER PRIMARY KEY,
+`data` text NULL,
+`timestamp` datetime NOT NULL
+);", $this->db_table);
 break;
 default:
 throw new BackendException('Unknown database driver: ' . 
$this->getDriverName());
@@ -218,12 +228,12 @@
 return $this->getConnection()->getAttribute(\PDO::ATTR_DRIVER_NAME);
 }
 
-public function deleteTable($table_name)
+public function deleteTable()
 {
-if (empty($table_name)) {
+if (empty($this->db_table)) {
 throw new BackendException('Invalid table name.');
 }
-$sql = sprintf("DROP TABLE IF EXISTS `%s` ;", $table_name);
+$sql = sprintf("DROP TABLE IF EXISTS `%s` ;", $this->db_table);
 $this->getConnection()->exec($sql);
 
 return true;
diff --git a/test/PHPQueue/Backend/PDOTest.php 
b/test/PHPQueue/Backend/PDOBaseTest.php
similarity index 78%
rename from test/PHPQueue/Backend/PDOTest.php
rename to test/PHPQueue/Backend/PDOBaseTest.php
index 9149025..5eafd30 100644
--- a/test/PHPQueue/Backend/PDOTest.php
+++ b/test/PHPQueue/Backend/PDOBaseTest.php
@@ -1,44 +1,25 @@
 markTestSkipped('PDO extension is not installed');
-}
-$options = array(
-  'connection_string' => 'mysql:host=localhost;dbname=phpqueuetest'
-, 'db_table'  => 'pdotest'
-, 'pdo_options'   => array(
-\PDO::ATTR_PERSISTENT => true
-)
-);
 
-// Check that the database exists, and politely skip if not.
-try {
-new \PDO($options['connection_string']);
-} catch ( \PDOException $ex ) {
-$this->markTestSkipped('Database access failed: ' . 
$ex->getMessage());
+if ( !class_exists( '\PDO' ) ) {
+$this->markTestSkipped( 

[MediaWiki-commits] [Gerrit] Fix prefix_search_api test to support both prefix search and... - change (mediawiki...CirrusSearch)

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

Change subject: Fix prefix_search_api test to support both prefix search and 
completion suggester
..


Fix prefix_search_api test to support both prefix search and completion 
suggester

Bug: T133753
Change-Id: I2bf6979d1f2d1c8a8df69193d79cc1a44737
---
M tests/browser/features/prefix_search_api.feature
M tests/browser/features/step_definitions/search_steps.rb
M tests/browser/features/support/cirrus_search_api_helper.rb
3 files changed, 53 insertions(+), 16 deletions(-)

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



diff --git a/tests/browser/features/prefix_search_api.feature 
b/tests/browser/features/prefix_search_api.feature
index 0dfce0f..f4d8171 100644
--- a/tests/browser/features/prefix_search_api.feature
+++ b/tests/browser/features/prefix_search_api.feature
@@ -1,25 +1,39 @@
-@clean @api @prefix
+@clean @api @prefix @redirect @accent_squashing @accented_namespace @suggest
 Feature: Prefix search via api
+# @suggest needs to be at the end because it will update the completion 
suggester index
   Scenario: Suggestions don't appear when you search for a string that is too 
long
 When I get api suggestions for 
贵州省瞬时速度团头鲂身体c实施ysstsstsg说tyttxy以推销员会同香港推广系统在同他讨厌她团体淘汰>赛系统大选于它拥有一天天用于与体育学院国ttxzyttxtxytdttyyyztdsytstsstxtttd天天体育系统的摄像头听到他他偷笑>偷笑太阳团体杏眼桃腮他要tttxx
 
y贵州省瞬时速度团头鲂身体c实施ysstsstsg说tyttxy以推销员会同香港推广系统在同他讨厌她团体淘汰>赛系统大选于它拥有一天天用于与体育学院国ttxzyttxtxytdttyyyztdsytstsstxtttd天天体育系统的摄像头听到他他偷笑>偷笑太阳团体杏眼桃腮他要tttxx
 y
 #Then the api warns Prefix search request was longer than the maximum 
allowed length. (288 > 255)
Then the api returns error code 400
 
-  @redirect
   Scenario: Prefix search lists page name if both redirect and page name match
-When I get api suggestions for Redirecttest Y
+When I get api suggestions for Redirecttest Y using the classic profile
+Then Redirecttest Yay is the first api suggestion
+  And Redirecttest Yikes is not in the api suggestions
+When I get api suggestions for Redirecttest Y using the fuzzy profile
 Then Redirecttest Yay is the first api suggestion
   And Redirecttest Yikes is not in the api suggestions
 
-  @redirect
   Scenario: Prefix search ranks redirects under title matches
-When I get api suggestions for PrefixRedirectRanking
+When I get api suggestions for PrefixRedirectRanking using the classic 
profile
+Then PrefixRedirectRanking 1 is the first api suggestion
+  And PrefixRedirectRanking 2 is the second api suggestion
+When I get api suggestions for PrefixRedirectRanking using the fuzzy 
profile
 Then PrefixRedirectRanking 1 is the first api suggestion
   And PrefixRedirectRanking 2 is the second api suggestion
 
-  @accent_squashing
+  Scenario: Prefix search with classic profile is stricter than the fuzzy 
profile
+When I get api suggestions for PrefixRedirectRankng using the classic 
profile
+Then the API should produce list of length 0
+When I get api suggestions for PrefixRedirectRankng using the fuzzy profile
+Then PrefixRedirectRanking 1 is the first api suggestion
+  And PrefixRedirectRanking 2 is the second api suggestion
+
   Scenario Outline: Search suggestions with accents
-When I get api suggestions for 
+When I get api suggestions for  using the classic profile
+Then  is the first api suggestion
+  And  is the second api suggestion
+When I get api suggestions for  using the fuzzy profile
 Then  is the first api suggestion
   And  is the second api suggestion
   Examples:
@@ -36,7 +50,10 @@
 Then Template talk:Foo is in the api suggestions
 
   Scenario Outline: Search suggestions
-When I get api suggestions for 
+When I get api suggestions for  using the classic profile
+Then  is the first api suggestion
+  And the api should offer to search for pages containing 
+When I get api suggestions for  using the fuzzy profile
 Then  is the first api suggestion
   And the api should offer to search for pages containing 
 When I get api near matches for 
@@ -59,23 +76,31 @@
 | Jean-Yves Le Drian | Jean-Yves Le Drian | Jean-Yves Le Drian 
|
 | Jean Yves Le Drian | Jean-Yves Le Drian | Jean-Yves Le Drian 
|
 
-  @redirect
   Scenario: Prefix search includes redirects
-When I get api suggestions for SEO Redirecttest
+When I get api suggestions for SEO Redirecttest using the classic profile
+Then SEO Redirecttest is the first api suggestion
+When I get api near matches for SEO Redirecttest
+Then SEO Redirecttest is the first api search result
+When I get api suggestions for SEO Redirecttest using the fuzzy profile
 Then SEO Redirecttest is the first api suggestion
 When I get api near matches for SEO Redirecttest
 Then SEO Redirecttest is the first api search result
 
-  @redirect
   

[MediaWiki-commits] [Gerrit] udpmxircecho: die if socket fails to open - change (operations/puppet)

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

Change subject: udpmxircecho: die if socket fails to open
..


udpmxircecho: die if socket fails to open

Bug:T134247
Change-Id: I3e955ba8cc5a8498240a777934438f05571c2cef
---
M modules/mw_rc_irc/templates/udpmxircecho.py.erb
1 file changed, 6 insertions(+), 2 deletions(-)

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



diff --git a/modules/mw_rc_irc/templates/udpmxircecho.py.erb 
b/modules/mw_rc_irc/templates/udpmxircecho.py.erb
index 315aa51..7c96cc8 100755
--- a/modules/mw_rc_irc/templates/udpmxircecho.py.erb
+++ b/modules/mw_rc_irc/templates/udpmxircecho.py.erb
@@ -20,10 +20,14 @@
 self.bot = bot
 
 def run(self):
+
 udpsock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
 udpsock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
-udpsock.bind(('', 9390))
-
+try:
+udpsock.bind(('', 9390))
+except socket.error, msg:
+sys.stderr.write("[ERROR] %s\n" % msg[1])
+sys.exit(2)
 while True:
 try:
 s = udpsock.recv(65535)

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3e955ba8cc5a8498240a777934438f05571c2cef
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn 
Gerrit-Reviewer: Alex Monk 
Gerrit-Reviewer: ArielGlenn 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: Faidon Liambotis 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Print styles: Wrap CSS-generated URLs - change (mediawiki/core)

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

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

Change subject: Print styles: Wrap CSS-generated URLs
..

Print styles: Wrap CSS-generated URLs

Chrome does not actually break CSS-generated URL content with word-wrap, which
causes some infoboxes to expand to the entire page.

This patch adds the word-break CSS property, which allows Chrome to break
those URLs at any position. This fixes the rendering of infoboxes on pages
like https://en.wikipedia.org/wiki/San_Francisco.

With basically all PDF generators (including browsers) including clickable
links & many PDFs consumed on-screen it might be worth considering making
print URLs optional at some point, and defaulting to "screen optimized" PDFs.

Change-Id: I8d03032a553643198da6a1dd8b78201a9255fcbb
---
M resources/src/mediawiki.legacy/commonPrint.css
1 file changed, 1 insertion(+), 0 deletions(-)


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

diff --git a/resources/src/mediawiki.legacy/commonPrint.css 
b/resources/src/mediawiki.legacy/commonPrint.css
index c172a7f..efdc022 100644
--- a/resources/src/mediawiki.legacy/commonPrint.css
+++ b/resources/src/mediawiki.legacy/commonPrint.css
@@ -181,6 +181,7 @@
 .mw-body a.external.autonumber:after {
content: " (" attr( href ) ")";
word-wrap: break-word;
+   word-break: break-all;
 }
 
 /* Expand protocol-relative URLs for printing */

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

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

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


[MediaWiki-commits] [Gerrit] cirrus: Only use curl pools on hhvm - change (operations/mediawiki-config)

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

Change subject: cirrus: Only use curl pools on hhvm
..


cirrus: Only use curl pools on hhvm

Maintenance scripts are still run using zend which logs some warnings
when using the pooled curl because it's not supported. To resolve the
warnings check for HHVM_VERSION and only use the pooled curl when we are
running under HHVM.

Bug: T132751
Change-Id: I612b60f3eb152bbcbc35ba8ad736511556d7781d
---
M wmf-config/CirrusSearch-production.php
1 file changed, 10 insertions(+), 6 deletions(-)

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



diff --git a/wmf-config/CirrusSearch-production.php 
b/wmf-config/CirrusSearch-production.php
index 1130bbb..3f307d4 100644
--- a/wmf-config/CirrusSearch-production.php
+++ b/wmf-config/CirrusSearch-production.php
@@ -11,7 +11,12 @@
 $wgCirrusSearchMasterTimeout = '2m';
 
 $wgCirrusSearchClusters = array(
-   'eqiad' => array_map( function ( $host ) {
+   'eqiad' => $wmfAllServices['eqiad']['search'],
+   'codfw' => $wmfAllServices['codfw']['search'],
+   'labsearch' => array( '10.64.37.14' ), // nobelium.eqiad.wmnet
+);
+if ( defined( 'HHVM_VERSION' ) ) {
+   $wgCirrusSearchClusters['eqiad'] = array_map( function ( $host ) {
return array(
'transport' => 'CirrusSearch\\Elastica\\PooledHttps',
'port' => '9243',
@@ -20,8 +25,8 @@
'pool' => 'cirrus-eqiad',
),
);
-   }, $wmfAllServices['eqiad']['search'] ),
-   'codfw' => array_map( function ( $host ) {
+   }, $wgCirrusSearchClusters['eqiad'] );
+   $wgCirrusSearchClusters['codfw'] = array_map( function ( $host ) {
return array(
'transport' => 'CirrusSearch\\Elastica\\PooledHttps',
'port' => '9243',
@@ -30,9 +35,8 @@
'pool' => 'cirrus-codfw',
),
);
-   }, $wmfAllServices['codfw']['search'] ),
-   'labsearch' => array( '10.64.37.14' ), // nobelium.eqiad.wmnet
-);
+   }, $wgCirrusSearchClusters['codfw'] );
+}
 
 if ( $wgDBname === 'labswiki' || $wgDBname === 'labtestwiki' ) {
$wgCirrusSearchClusters = array(

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I612b60f3eb152bbcbc35ba8ad736511556d7781d
Gerrit-PatchSet: 3
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: EBernhardson 
Gerrit-Reviewer: Dereckson 
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: Gehel 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Update OOjs UI to v0.17.1 - change (mediawiki/vendor)

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

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

Change subject: Update OOjs UI to v0.17.1
..

Update OOjs UI to v0.17.1

Release notes:
 https://git.wikimedia.org/blob/oojs%2Fui.git/v0.17.1/History.md

Change-Id: I6175a5d788f71f5d07efeabe54aca6335fce4766
---
M composer.json
M composer.lock
M composer/installed.json
M oojs/oojs-ui/History.md
M oojs/oojs-ui/package.json
5 files changed, 101 insertions(+), 90 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vendor 
refs/changes/70/286770/1

diff --git a/composer.json b/composer.json
index 3c5fe80..5c6993f 100644
--- a/composer.json
+++ b/composer.json
@@ -17,7 +17,7 @@
"mediawiki/at-ease": "1.1.0",
"monolog/monolog": "1.18.2",
"nmred/kafka-php": "0.1.5",
-   "oojs/oojs-ui": "0.17.0",
+   "oojs/oojs-ui": "0.17.1",
"oyejorge/less.php": "1.7.0.10",
"pear/console_getopt": "1.4.1",
"pear/mail": "1.3.0",
diff --git a/composer.lock b/composer.lock
index 5533072..603f8f0 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,8 +4,8 @@
 "Read more about it at 
https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file;,
 "This file is @generated automatically"
 ],
-"hash": "92fec9f4618c90943af51d690cc7393f",
-"content-hash": "55f53c0a9cecd4c22bf025f3f955591a",
+"hash": "2e032cbe0c06b4225c319a65930d7631",
+"content-hash": "c61356e2af6e9a24a6629157061d8971",
 "packages": [
 {
 "name": "composer/semver",
@@ -430,16 +430,16 @@
 },
 {
 "name": "oojs/oojs-ui",
-"version": "v0.17.0",
+"version": "v0.17.1",
 "source": {
 "type": "git",
 "url": "https://github.com/wikimedia/oojs-ui.git;,
-"reference": "332cb90192b83979e479b691b970b5f2c18e6df7"
+"reference": "ca52adc5c0191eb278baa2bcb50d30b2bd7b0af3"
 },
 "dist": {
 "type": "zip",
-"url": 
"https://api.github.com/repos/wikimedia/oojs-ui/zipball/332cb90192b83979e479b691b970b5f2c18e6df7;,
-"reference": "332cb90192b83979e479b691b970b5f2c18e6df7",
+"url": 
"https://api.github.com/repos/wikimedia/oojs-ui/zipball/ca52adc5c0191eb278baa2bcb50d30b2bd7b0af3;,
+"reference": "ca52adc5c0191eb278baa2bcb50d30b2bd7b0af3",
 "shasum": ""
 },
 "require": {
@@ -505,7 +505,7 @@
 ],
 "description": "Provides library of common widgets, layouts, and 
windows.",
 "homepage": "https://www.mediawiki.org/wiki/OOjs_UI;,
-"time": "2016-04-26 21:06:41"
+"time": "2016-05-03 22:34:48"
 },
 {
 "name": "oyejorge/less.php",
diff --git a/composer/installed.json b/composer/installed.json
index c99841a..637eb49 100644
--- a/composer/installed.json
+++ b/composer/installed.json
@@ -1729,87 +1729,6 @@
 "homepage": "https://www.mediawiki.org/wiki/HtmlFormatter;
 },
 {
-"name": "oojs/oojs-ui",
-"version": "v0.17.0",
-"version_normalized": "0.17.0.0",
-"source": {
-"type": "git",
-"url": "https://github.com/wikimedia/oojs-ui.git;,
-"reference": "332cb90192b83979e479b691b970b5f2c18e6df7"
-},
-"dist": {
-"type": "zip",
-"url": 
"https://api.github.com/repos/wikimedia/oojs-ui/zipball/332cb90192b83979e479b691b970b5f2c18e6df7;,
-"reference": "332cb90192b83979e479b691b970b5f2c18e6df7",
-"shasum": ""
-},
-"require": {
-"mediawiki/at-ease": "1.1.0",
-"php": ">=5.5.9"
-},
-"require-dev": {
-"jakub-onderka/php-parallel-lint": "0.9.2",
-"mediawiki/mediawiki-codesniffer": "0.6.0",
-"phpunit/phpunit": "4.8.21"
-},
-"time": "2016-04-26 21:06:41",
-"type": "library",
-"installation-source": "dist",
-"autoload": {
-"classmap": [
-"php/"
-]
-},
-"notification-url": "https://packagist.org/downloads/;,
-"license": [
-"MIT"
-],
-"authors": [
-{
-"name": "Timo Tijhof",
-"email": "krinklem...@gmail.com"
-},
-{
-"name": "Bartosz Dziewoński",
-"email": "matma@gmail.com"
-},
-{
-"name": "Ed Sanders",
-"email": "esand...@wikimedia.org"
-},
-{
-"name": "James D. Forrester",
-"email": "jforres...@wikimedia.org"
-},
-{
-

[MediaWiki-commits] [Gerrit] Follow-up f9b4bbff: Fix typo'ed variable name - change (mediawiki/core)

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

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

Change subject: Follow-up f9b4bbff: Fix typo'ed variable name
..

Follow-up f9b4bbff: Fix typo'ed variable name

Change-Id: Ied52bbaa8d9b8e15470a99cd45ebef0c43c5dd69
---
M maintenance/resources/update-oojs-ui.sh
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/69/286769/1

diff --git a/maintenance/resources/update-oojs-ui.sh 
b/maintenance/resources/update-oojs-ui.sh
index d20cbe8..dbce7a7 100755
--- a/maintenance/resources/update-oojs-ui.sh
+++ b/maintenance/resources/update-oojs-ui.sh
@@ -70,7 +70,7 @@
 Update OOjs UI to v$OOJSUI_VERSION
 
 Release notes:
- 
https://phabricator.wikimedia.org/diffusion/GOJU/browse/master/History.md;v$OOJS_VERSION
+ 
https://phabricator.wikimedia.org/diffusion/GOJU/browse/master/History.md;v$OOJSUI_VERSION
 END
 )
 

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

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

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


[MediaWiki-commits] [Gerrit] varnishreqstats: fix systemd deps - change (operations/puppet)

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

Change subject: varnishreqstats: fix systemd deps
..


varnishreqstats: fix systemd deps

Change-Id: If4cbca2b04f7ae3eaaabb983ab51f55591f71ca7
---
M modules/varnish/templates/initscripts/varnishreqstats.systemd.erb
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/modules/varnish/templates/initscripts/varnishreqstats.systemd.erb 
b/modules/varnish/templates/initscripts/varnishreqstats.systemd.erb
index 63b132a..f23e853 100644
--- a/modules/varnish/templates/initscripts/varnishreqstats.systemd.erb
+++ b/modules/varnish/templates/initscripts/varnishreqstats.systemd.erb
@@ -1,7 +1,7 @@
 [Unit]
 Description=Varnish Request Stats StatsD reporter
-After=<%= @varnish_service_name %>
-Requires=<%= @varnish_service_name %>
+After=<%= @varnish_service_name %>.service
+Requires=<%= @varnish_service_name %>.service
 
 [Service]
 ExecStart=/usr/local/bin/varnishreqstats <%= /\w/.match(@instance_name) ? 
"--varnish-name=#{@instance_name}" : ""  %> --statsd=<%= @statsd %> 
--metric-prefix=<%= @metric_prefix %> --interval=<%= @interval %>

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

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

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


[MediaWiki-commits] [Gerrit] Update OOjs UI to v0.17.1 - change (mediawiki/core)

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

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

Change subject: Update OOjs UI to v0.17.1
..

Update OOjs UI to v0.17.1

Release notes:
 
https://phabricator.wikimedia.org/diffusion/GOJU/browse/master/History.md;v0.17.1

Change-Id: I6175a5d788f71f5d07efeabe54aca6335fce4766
---
M composer.json
M resources/lib/oojs-ui/oojs-ui-apex.js
M resources/lib/oojs-ui/oojs-ui-core-apex.css
M resources/lib/oojs-ui/oojs-ui-core-mediawiki.css
M resources/lib/oojs-ui/oojs-ui-core.js
M resources/lib/oojs-ui/oojs-ui-mediawiki.js
M resources/lib/oojs-ui/oojs-ui-toolbars-apex.css
M resources/lib/oojs-ui/oojs-ui-toolbars-mediawiki.css
M resources/lib/oojs-ui/oojs-ui-toolbars.js
M resources/lib/oojs-ui/oojs-ui-widgets-apex.css
M resources/lib/oojs-ui/oojs-ui-widgets-mediawiki.css
M resources/lib/oojs-ui/oojs-ui-widgets.js
M resources/lib/oojs-ui/oojs-ui-windows-apex.css
M resources/lib/oojs-ui/oojs-ui-windows-mediawiki.css
M resources/lib/oojs-ui/oojs-ui-windows.js
15 files changed, 158 insertions(+), 156 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/67/286767/1

diff --git a/composer.json b/composer.json
index 4fb107e..57531c1 100644
--- a/composer.json
+++ b/composer.json
@@ -25,7 +25,7 @@
"ext-xml": "*",
"liuggio/statsd-php-client": "1.0.18",
"mediawiki/at-ease": "1.1.0",
-   "oojs/oojs-ui": "0.17.0",
+   "oojs/oojs-ui": "0.17.1",
"oyejorge/less.php": "1.7.0.10",
"php": ">=5.5.9",
"psr/log": "1.0.0",
diff --git a/resources/lib/oojs-ui/oojs-ui-apex.js 
b/resources/lib/oojs-ui/oojs-ui-apex.js
index 62613b8..625c02e 100644
--- a/resources/lib/oojs-ui/oojs-ui-apex.js
+++ b/resources/lib/oojs-ui/oojs-ui-apex.js
@@ -1,12 +1,12 @@
 /*!
- * OOjs UI v0.17.0
+ * OOjs UI v0.17.1
  * https://www.mediawiki.org/wiki/OOjs_UI
  *
  * Copyright 2011–2016 OOjs UI Team and other contributors.
  * Released under the MIT license
  * http://oojs.mit-license.org
  *
- * Date: 2016-04-26T21:34:01Z
+ * Date: 2016-05-03T22:58:02Z
  */
 ( function ( OO ) {
 
diff --git a/resources/lib/oojs-ui/oojs-ui-core-apex.css 
b/resources/lib/oojs-ui/oojs-ui-core-apex.css
index c928838..eeb4b28 100644
--- a/resources/lib/oojs-ui/oojs-ui-core-apex.css
+++ b/resources/lib/oojs-ui/oojs-ui-core-apex.css
@@ -1,12 +1,12 @@
 /*!
- * OOjs UI v0.17.0
+ * OOjs UI v0.17.1
  * https://www.mediawiki.org/wiki/OOjs_UI
  *
  * Copyright 2011–2016 OOjs UI Team and other contributors.
  * Released under the MIT license
  * http://oojs.mit-license.org
  *
- * Date: 2016-04-26T21:34:05Z
+ * Date: 2016-05-03T22:58:06Z
  */
 .oo-ui-element-hidden {
display: none !important;
diff --git a/resources/lib/oojs-ui/oojs-ui-core-mediawiki.css 
b/resources/lib/oojs-ui/oojs-ui-core-mediawiki.css
index 72e4db8..268a680 100644
--- a/resources/lib/oojs-ui/oojs-ui-core-mediawiki.css
+++ b/resources/lib/oojs-ui/oojs-ui-core-mediawiki.css
@@ -1,12 +1,12 @@
 /*!
- * OOjs UI v0.17.0
+ * OOjs UI v0.17.1
  * https://www.mediawiki.org/wiki/OOjs_UI
  *
  * Copyright 2011–2016 OOjs UI Team and other contributors.
  * Released under the MIT license
  * http://oojs.mit-license.org
  *
- * Date: 2016-04-26T21:34:05Z
+ * Date: 2016-05-03T22:58:06Z
  */
 .oo-ui-element-hidden {
display: none !important;
@@ -53,6 +53,9 @@
font-weight: bold;
text-decoration: none;
 }
+.oo-ui-buttonElement > .oo-ui-buttonElement-button:focus {
+   outline: 0;
+}
 .oo-ui-buttonElement.oo-ui-iconElement > .oo-ui-buttonElement-button > 
.oo-ui-iconElement-icon {
margin-left: 0;
 }
@@ -60,8 +63,7 @@
margin-left: 0.46875em;
 }
 .oo-ui-buttonElement-frameless > .oo-ui-buttonElement-button:focus {
-   box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(0, 0, 0, 
0.2);
-   outline: 0;
+   box-shadow: inset 0 0 0 1px #347bff, 0 0 0 1px #347bff;
 }
 .oo-ui-buttonElement-frameless > .oo-ui-buttonElement-button 
.oo-ui-indicatorElement-indicator {
margin-right: 0;
@@ -83,36 +85,33 @@
 
.oo-ui-buttonElement-frameless.oo-ui-widget-enabled.oo-ui-buttonElement-pressed 
> .oo-ui-buttonElement-button > .oo-ui-labelElement-label {
color: #44;
 }
-.oo-ui-buttonElement-frameless.oo-ui-widget-enabled.oo-ui-flaggedElement-progressive
 > .oo-ui-buttonElement-button:hover > .oo-ui-labelElement-label,
-.oo-ui-buttonElement-frameless.oo-ui-widget-enabled.oo-ui-flaggedElement-progressive
 > .oo-ui-buttonElement-button:focus > .oo-ui-labelElement-label {
-   color: #2962cc;
-}
 
.oo-ui-buttonElement-frameless.oo-ui-widget-enabled.oo-ui-flaggedElement-progressive
 > .oo-ui-buttonElement-button > .oo-ui-labelElement-label {
color: #347bff;
+}
+.oo-ui-buttonElement-frameless.oo-ui-widget-enabled.oo-ui-flaggedElement-progressive.oo-ui-widget-enabled
 > .oo-ui-buttonElement-button:hover > 

[MediaWiki-commits] [Gerrit] varnishreqstats: fix systemd deps - change (operations/puppet)

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

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

Change subject: varnishreqstats: fix systemd deps
..

varnishreqstats: fix systemd deps

Change-Id: If4cbca2b04f7ae3eaaabb983ab51f55591f71ca7
---
M modules/varnish/templates/initscripts/varnishreqstats.systemd.erb
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/68/286768/1

diff --git a/modules/varnish/templates/initscripts/varnishreqstats.systemd.erb 
b/modules/varnish/templates/initscripts/varnishreqstats.systemd.erb
index 63b132a..f23e853 100644
--- a/modules/varnish/templates/initscripts/varnishreqstats.systemd.erb
+++ b/modules/varnish/templates/initscripts/varnishreqstats.systemd.erb
@@ -1,7 +1,7 @@
 [Unit]
 Description=Varnish Request Stats StatsD reporter
-After=<%= @varnish_service_name %>
-Requires=<%= @varnish_service_name %>
+After=<%= @varnish_service_name %>.service
+Requires=<%= @varnish_service_name %>.service
 
 [Service]
 ExecStart=/usr/local/bin/varnishreqstats <%= /\w/.match(@instance_name) ? 
"--varnish-name=#{@instance_name}" : ""  %> --statsd=<%= @statsd %> 
--metric-prefix=<%= @metric_prefix %> --interval=<%= @interval %>

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If4cbca2b04f7ae3eaaabb983ab51f55591f71ca7
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] udpmxircecho: set setsockopt SO_REUSEADDR - change (operations/puppet)

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

Change subject: udpmxircecho: set setsockopt SO_REUSEADDR
..


udpmxircecho: set setsockopt SO_REUSEADDR

Set "setsockopt SO_REUSEADDR" to avoid
error: [Errno 98] Address already in use.

Bug:T134247
Change-Id: I37d351caba96b46fbf857711bffb32290017513c
---
M modules/mw_rc_irc/templates/udpmxircecho.py.erb
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Alex Monk: Looks good to me, but someone else must approve
  jenkins-bot: Verified
  Dzahn: Looks good to me, approved



diff --git a/modules/mw_rc_irc/templates/udpmxircecho.py.erb 
b/modules/mw_rc_irc/templates/udpmxircecho.py.erb
index df2ff38..315aa51 100755
--- a/modules/mw_rc_irc/templates/udpmxircecho.py.erb
+++ b/modules/mw_rc_irc/templates/udpmxircecho.py.erb
@@ -21,7 +21,7 @@
 
 def run(self):
 udpsock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
-
+udpsock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
 udpsock.bind(('', 9390))
 
 while True:

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I37d351caba96b46fbf857711bffb32290017513c
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn 
Gerrit-Reviewer: Alex Monk 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: Faidon Liambotis 
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 "Don't yet allow wikidatasparql graph urls" - change (operations/mediawiki-config)

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

Change subject: Revert "Don't yet allow wikidatasparql graph urls"
..


Revert "Don't yet allow wikidatasparql graph urls"

This reverts commit 9e550fa64e5ab33e0c1a98e911153130d68130ad.

Now that the sparql caching has been resolved, we can re-enable it.

Bug: T126741
Change-Id: Ia04e44c6a6d5bce2f924f60dea484d90ca8ab4c9
---
M wmf-config/CommonSettings-labs.php
M wmf-config/CommonSettings.php
2 files changed, 4 insertions(+), 4 deletions(-)

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



diff --git a/wmf-config/CommonSettings-labs.php 
b/wmf-config/CommonSettings-labs.php
index ecd1eeb..c4d404b 100644
--- a/wmf-config/CommonSettings-labs.php
+++ b/wmf-config/CommonSettings-labs.php
@@ -320,10 +320,7 @@
// See https://www.mediawiki.org/wiki/Extension:Graph#External_data
$wgGraphAllowedDomains['http'] = [ 'wmflabs.org' ];
$wgGraphAllowedDomains['wikirawupload'][] = 'upload.beta.wmflabs.org';
-   $wgGraphAllowedDomains['wikidatasparql'] = [
-   'query.wikidata.org',
-   'wdqs-test.wmflabs.org'
-   ];
+   $wgGraphAllowedDomains['wikidatasparql'][] = 'wdqs-test.wmflabs.org';
 }
 
 if ( $wmgUseKartographer ) {
diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index 2068ad9..996d80c 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -3065,6 +3065,9 @@
'wikirawupload' => [
'upload.wikimedia.org',
],
+   'wikidatasparql' => [
+   'query.wikidata.org',
+   ],
];
 
if ( $wmgUseGraphWithNamespace ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia04e44c6a6d5bce2f924f60dea484d90ca8ab4c9
Gerrit-PatchSet: 4
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Yurik 
Gerrit-Reviewer: Aude 
Gerrit-Reviewer: Chad 
Gerrit-Reviewer: Dereckson 
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: Hoo man 
Gerrit-Reviewer: JanZerebecki 
Gerrit-Reviewer: Lydia Pintscher 
Gerrit-Reviewer: Smalyshev 
Gerrit-Reviewer: Yurik 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] PayPal EC gets donor details back using API call - change (mediawiki...DonationInterface)

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

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

Change subject: PayPal EC gets donor details back using API call
..

PayPal EC gets donor details back using API call

Bug: T131811
Change-Id: I3b91d55dc137e59a8db85b4e1be8e1ceafbc5692
---
M paypal_gateway/express_checkout/config/var_map.yaml
M paypal_gateway/express_checkout/paypal_express.adapter.php
2 files changed, 11 insertions(+), 7 deletions(-)


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

diff --git a/paypal_gateway/express_checkout/config/var_map.yaml 
b/paypal_gateway/express_checkout/config/var_map.yaml
index 25f03e8..dd6e75c 100644
--- a/paypal_gateway/express_checkout/config/var_map.yaml
+++ b/paypal_gateway/express_checkout/config/var_map.yaml
@@ -5,19 +5,19 @@
 #returnUrl: const
 #VERSION
 
-PAYMENTREQUEST_0_AMT: amount
 LOCALECODE: language
 EMAIL: email
+TOKEN: ec_token
+PAYERID: payer_id
+RETURNURL: returnto
+PAYMENTREQUEST_0_AMT: amount
 PAYMENTREQUEST_0_CURRENCYCODE: currency_code
-PAYMENTREQUEST_0_ITEMAMT: amount
 # TODO: deprecated
 PAYMENTREQUEST_0_CUSTOM: contribution_tracking_id
 # FIXME: Update the audit and IPN listener to read from this field.
 PAYMENTREQUEST_0_INVNUM: contribution_tracking_id
-TOKEN: ec_token
-PAYERID: payer_id
-RETURNURL: returnto
-PAYMENTINFO_0_TRANSACTIONID: gateway_txn_id
+PAYMENTREQUEST_0_ITEMAMT: amount
 # Example: 2016%2d05%2d03T21%3a25%3a22Z&
 PAYMENTINFO_0_ORDERTIME: date
 PAYMENTINFO_0_PAYMENTSTATUS: gateway_status
+PAYMENTINFO_0_TRANSACTIONID: gateway_txn_id
diff --git a/paypal_gateway/express_checkout/paypal_express.adapter.php 
b/paypal_gateway/express_checkout/paypal_express.adapter.php
index 7616e87..2421969 100644
--- a/paypal_gateway/express_checkout/paypal_express.adapter.php
+++ b/paypal_gateway/express_checkout/paypal_express.adapter.php
@@ -256,7 +256,11 @@
$this->finalizeInternalStatus( 
FinalStatus::FAILED );
break;
}
-   // TODO: merge response into my data
+
+   // Merge response into our transaction data.
+   // XXX--wait, there's no default function to unstage 
using var_map?
+   $this->addResponseData( $this->unstageKeys( $response ) 
);
+
$this->runAntifraudHooks();
if ( $this->getValidationAction() !== 'process' ) {
$this->finalizeInternalStatus( 
FinalStatus::FAILED );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3b91d55dc137e59a8db85b4e1be8e1ceafbc5692
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DonationInterface
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] Helper function to unstage the keys of an array - change (mediawiki...DonationInterface)

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

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

Change subject: Helper function to unstage the keys of an array
..

Helper function to unstage the keys of an array

I don't understand whether this magic already exists somewhere...

Change-Id: Idb87be3da1faff6b638f67e399493cf76fba55d5
---
M gateway_common/gateway.adapter.php
M worldpay_gateway/worldpay.adapter.php
2 files changed, 24 insertions(+), 0 deletions(-)


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

diff --git a/gateway_common/gateway.adapter.php 
b/gateway_common/gateway.adapter.php
index 9189b7b..6deb60d 100644
--- a/gateway_common/gateway.adapter.php
+++ b/gateway_common/gateway.adapter.php
@@ -502,9 +502,32 @@
$newlyUnstagedData[$key] = 
$this->unstaged_data[$key];
}
}
+   $this->logger->debug( "Adding response data: " . json_encode( 
$newlyUnstagedData ) );
$this->dataObj->addData( $newlyUnstagedData );
}
 
+   /**
+* Change the keys on this data from processor API names to normalized 
names.
+*
+* TODO: Figure out why this isn't the default behavior in 
addResponseData.
+* Once that's resolved, we might operate on member fields rather than 
be a pipe.
+*/
+   public function unstageKeys( $staged_data, $key_map = null ) {
+   if ( $key_map === null ) {
+   $key_map = $this->config['var_map'];
+   }
+
+   $addme = array( );
+   foreach ( $key_map as $theirs => $ours ) {
+   if ( isset( $staged_data[$theirs] ) ) {
+   $addme[$ours] = $staged_data[$theirs];
+   } else {
+   $emptyVars[] = $theirs;
+   }
+   }
+   return $addme;
+   }
+
public function getData_Unstaged_Escaped( $val = '' ) {
if ( $val === '' ) {
return $this->unstaged_data;
diff --git a/worldpay_gateway/worldpay.adapter.php 
b/worldpay_gateway/worldpay.adapter.php
index 6bdcfa3..cd53be1 100644
--- a/worldpay_gateway/worldpay.adapter.php
+++ b/worldpay_gateway/worldpay.adapter.php
@@ -702,6 +702,7 @@
 * @throws ResponseProcessingException if any required variables are 
missing
 */
protected function addRequiredData( $data, $pull_vars ) {
+   // TODO: use unstageKeys
$emptyVars = array( );
$addme = array( );
foreach ( $pull_vars as $theirs => $ours ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idb87be3da1faff6b638f67e399493cf76fba55d5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DonationInterface
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] Tag v0.17.1 - change (oojs/ui)

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

Change subject: Tag v0.17.1
..


Tag v0.17.1

Change-Id: Ica130c2cf2589f40094efffd6cf25d6de392ce6e
---
M History.md
M package.json
2 files changed, 12 insertions(+), 1 deletion(-)

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



diff --git a/History.md b/History.md
index 449e36f..172f07a 100644
--- a/History.md
+++ b/History.md
@@ -1,5 +1,16 @@
 # OOjs UI Release History
 
+## v0.17.1 / 2016-05-03
+### Styles
+* CapsuleMultiSelectWidget: Fix cross-browser inconsistencies and improve UX 
(Volker E)
+* SelectFileWidget: Add `no-drop` cursor where it belongs (Volker E)
+* MediaWiki theme: Align focus state of capsuleItemWidget with other widgets 
(Volker E)
+* MediaWiki theme: Custom `:focus` state for SelectWidgets (Bartosz Dziewoński)
+* MediaWiki theme: Standardize `:focus` states of ButtonWidgets (Volker E)
+
+### Code
+* DraggableGroupElement: Simplify and improve drag logic (Ed Sanders)
+
 ## v0.17.0 / 2016-04-26
 ### Breaking changes
 * [BREAKING CHANGE] PHP: Use traits instead of custom mixin system (Kunal 
Mehta)
diff --git a/package.json b/package.json
index 7129468..cfea830 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
 {
   "name": "oojs-ui",
-  "version": "0.17.0",
+  "version": "0.17.1",
   "description": "User interface classes built on the OOjs framework.",
   "keywords": [
 "oojs-plugin",

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ica130c2cf2589f40094efffd6cf25d6de392ce6e
Gerrit-PatchSet: 1
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: Jforrester 
Gerrit-Reviewer: Bartosz Dziewoński 
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 remote-tracking branch 'origin/master' into es2.x - change (mediawiki/vendor)

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

Change subject: Merge remote-tracking branch 'origin/master' into es2.x
..


Merge remote-tracking branch 'origin/master' into es2.x

Change-Id: Id542ef40595b93d5c5af806cce15df7068462d95
---
M composer.lock
M composer/autoload_static.php
M composer/installed.json
3 files changed, 96 insertions(+), 66 deletions(-)

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



diff --git a/composer.lock b/composer.lock
index 02a2aad..6434fca 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,13 +4,8 @@
 "Read more about it at 
https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file;,
 "This file is @generated automatically"
 ],
-<<< HEAD   (6fbbc9 Update default branch)
-"hash": "ab4d86afae911d53afb28b77fe7ae5d8",
-"content-hash": "c39b250acbb8e348d46509fcdaef24b0",
-===
-"hash": "92fec9f4618c90943af51d690cc7393f",
-"content-hash": "55f53c0a9cecd4c22bf025f3f955591a",
->>> BRANCH (f3a65a Add justinrainbow/json-schema)
+"hash": "4064fbe009ba723670ebb861d9793b95",
+"content-hash": "f5361eb3e8f8ba3336d2089ccd5b38cc",
 "packages": [
 {
 "name": "composer/semver",
diff --git a/composer/autoload_static.php b/composer/autoload_static.php
index 20402df..4d23593 100644
--- a/composer/autoload_static.php
+++ b/composer/autoload_static.php
@@ -28,6 +28,10 @@
 array (
 'Monolog\\' => 8,
 ),
+'J' => 
+array (
+'JsonSchema\\' => 11,
+),
 'F' => 
 array (
 'Firebase\\JWT\\' => 13,
@@ -67,6 +71,10 @@
 'Monolog\\' => 
 array (
 0 => __DIR__ . '/..' . '/monolog/monolog/src/Monolog',
+),
+'JsonSchema\\' => 
+array (
+0 => __DIR__ . '/..' . '/justinrainbow/json-schema/src/JsonSchema',
 ),
 'Firebase\\JWT\\' => 
 array (
@@ -450,6 +458,33 @@
 'Firebase\\JWT\\SignatureInvalidException' => __DIR__ . '/..' . 
'/firebase/php-jwt/src/SignatureInvalidException.php',
 'HtmlFormatter\\HtmlFormatter' => __DIR__ . '/..' . 
'/wikimedia/html-formatter/src/HtmlFormatter.php',
 'IPSet\\IPSet' => __DIR__ . '/..' . '/wikimedia/ip-set/src/IPSet.php',
+'JsonSchema\\Constraints\\CollectionConstraint' => __DIR__ . '/..' . 
'/justinrainbow/json-schema/src/JsonSchema/Constraints/CollectionConstraint.php',
+'JsonSchema\\Constraints\\Constraint' => __DIR__ . '/..' . 
'/justinrainbow/json-schema/src/JsonSchema/Constraints/Constraint.php',
+'JsonSchema\\Constraints\\ConstraintInterface' => __DIR__ . '/..' . 
'/justinrainbow/json-schema/src/JsonSchema/Constraints/ConstraintInterface.php',
+'JsonSchema\\Constraints\\EnumConstraint' => __DIR__ . '/..' . 
'/justinrainbow/json-schema/src/JsonSchema/Constraints/EnumConstraint.php',
+'JsonSchema\\Constraints\\Factory' => __DIR__ . '/..' . 
'/justinrainbow/json-schema/src/JsonSchema/Constraints/Factory.php',
+'JsonSchema\\Constraints\\FormatConstraint' => __DIR__ . '/..' . 
'/justinrainbow/json-schema/src/JsonSchema/Constraints/FormatConstraint.php',
+'JsonSchema\\Constraints\\NumberConstraint' => __DIR__ . '/..' . 
'/justinrainbow/json-schema/src/JsonSchema/Constraints/NumberConstraint.php',
+'JsonSchema\\Constraints\\ObjectConstraint' => __DIR__ . '/..' . 
'/justinrainbow/json-schema/src/JsonSchema/Constraints/ObjectConstraint.php',
+'JsonSchema\\Constraints\\SchemaConstraint' => __DIR__ . '/..' . 
'/justinrainbow/json-schema/src/JsonSchema/Constraints/SchemaConstraint.php',
+'JsonSchema\\Constraints\\StringConstraint' => __DIR__ . '/..' . 
'/justinrainbow/json-schema/src/JsonSchema/Constraints/StringConstraint.php',
+'JsonSchema\\Constraints\\TypeConstraint' => __DIR__ . '/..' . 
'/justinrainbow/json-schema/src/JsonSchema/Constraints/TypeConstraint.php',
+'JsonSchema\\Constraints\\UndefinedConstraint' => __DIR__ . '/..' . 
'/justinrainbow/json-schema/src/JsonSchema/Constraints/UndefinedConstraint.php',
+'JsonSchema\\Exception\\InvalidArgumentException' => __DIR__ . '/..' . 
'/justinrainbow/json-schema/src/JsonSchema/Exception/InvalidArgumentException.php',
+'JsonSchema\\Exception\\InvalidSchemaMediaTypeException' => __DIR__ . 
'/..' . 
'/justinrainbow/json-schema/src/JsonSchema/Exception/InvalidSchemaMediaTypeException.php',
+'JsonSchema\\Exception\\InvalidSourceUriException' => __DIR__ . '/..' 
. 
'/justinrainbow/json-schema/src/JsonSchema/Exception/InvalidSourceUriException.php',
+'JsonSchema\\Exception\\JsonDecodingException' => __DIR__ . '/..' . 
'/justinrainbow/json-schema/src/JsonSchema/Exception/JsonDecodingException.php',
+'JsonSchema\\Exception\\ResourceNotFoundException' => __DIR__ . '/..' 
. 

[MediaWiki-commits] [Gerrit] Merge remote-tracking branch 'origin/master' into es2.x - change (mediawiki/vendor)

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

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

Change subject: Merge remote-tracking branch 'origin/master' into es2.x
..

Merge remote-tracking branch 'origin/master' into es2.x

Change-Id: Id542ef40595b93d5c5af806cce15df7068462d95
---
M composer.lock
M composer/autoload_static.php
M composer/installed.json
3 files changed, 96 insertions(+), 66 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vendor 
refs/changes/64/286764/1

diff --git a/composer.lock b/composer.lock
index 02a2aad..6434fca 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,13 +4,8 @@
 "Read more about it at 
https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file;,
 "This file is @generated automatically"
 ],
-<<< HEAD   (6fbbc9 Update default branch)
-"hash": "ab4d86afae911d53afb28b77fe7ae5d8",
-"content-hash": "c39b250acbb8e348d46509fcdaef24b0",
-===
-"hash": "92fec9f4618c90943af51d690cc7393f",
-"content-hash": "55f53c0a9cecd4c22bf025f3f955591a",
->>> BRANCH (f3a65a Add justinrainbow/json-schema)
+"hash": "4064fbe009ba723670ebb861d9793b95",
+"content-hash": "f5361eb3e8f8ba3336d2089ccd5b38cc",
 "packages": [
 {
 "name": "composer/semver",
diff --git a/composer/autoload_static.php b/composer/autoload_static.php
index 20402df..4d23593 100644
--- a/composer/autoload_static.php
+++ b/composer/autoload_static.php
@@ -28,6 +28,10 @@
 array (
 'Monolog\\' => 8,
 ),
+'J' => 
+array (
+'JsonSchema\\' => 11,
+),
 'F' => 
 array (
 'Firebase\\JWT\\' => 13,
@@ -67,6 +71,10 @@
 'Monolog\\' => 
 array (
 0 => __DIR__ . '/..' . '/monolog/monolog/src/Monolog',
+),
+'JsonSchema\\' => 
+array (
+0 => __DIR__ . '/..' . '/justinrainbow/json-schema/src/JsonSchema',
 ),
 'Firebase\\JWT\\' => 
 array (
@@ -450,6 +458,33 @@
 'Firebase\\JWT\\SignatureInvalidException' => __DIR__ . '/..' . 
'/firebase/php-jwt/src/SignatureInvalidException.php',
 'HtmlFormatter\\HtmlFormatter' => __DIR__ . '/..' . 
'/wikimedia/html-formatter/src/HtmlFormatter.php',
 'IPSet\\IPSet' => __DIR__ . '/..' . '/wikimedia/ip-set/src/IPSet.php',
+'JsonSchema\\Constraints\\CollectionConstraint' => __DIR__ . '/..' . 
'/justinrainbow/json-schema/src/JsonSchema/Constraints/CollectionConstraint.php',
+'JsonSchema\\Constraints\\Constraint' => __DIR__ . '/..' . 
'/justinrainbow/json-schema/src/JsonSchema/Constraints/Constraint.php',
+'JsonSchema\\Constraints\\ConstraintInterface' => __DIR__ . '/..' . 
'/justinrainbow/json-schema/src/JsonSchema/Constraints/ConstraintInterface.php',
+'JsonSchema\\Constraints\\EnumConstraint' => __DIR__ . '/..' . 
'/justinrainbow/json-schema/src/JsonSchema/Constraints/EnumConstraint.php',
+'JsonSchema\\Constraints\\Factory' => __DIR__ . '/..' . 
'/justinrainbow/json-schema/src/JsonSchema/Constraints/Factory.php',
+'JsonSchema\\Constraints\\FormatConstraint' => __DIR__ . '/..' . 
'/justinrainbow/json-schema/src/JsonSchema/Constraints/FormatConstraint.php',
+'JsonSchema\\Constraints\\NumberConstraint' => __DIR__ . '/..' . 
'/justinrainbow/json-schema/src/JsonSchema/Constraints/NumberConstraint.php',
+'JsonSchema\\Constraints\\ObjectConstraint' => __DIR__ . '/..' . 
'/justinrainbow/json-schema/src/JsonSchema/Constraints/ObjectConstraint.php',
+'JsonSchema\\Constraints\\SchemaConstraint' => __DIR__ . '/..' . 
'/justinrainbow/json-schema/src/JsonSchema/Constraints/SchemaConstraint.php',
+'JsonSchema\\Constraints\\StringConstraint' => __DIR__ . '/..' . 
'/justinrainbow/json-schema/src/JsonSchema/Constraints/StringConstraint.php',
+'JsonSchema\\Constraints\\TypeConstraint' => __DIR__ . '/..' . 
'/justinrainbow/json-schema/src/JsonSchema/Constraints/TypeConstraint.php',
+'JsonSchema\\Constraints\\UndefinedConstraint' => __DIR__ . '/..' . 
'/justinrainbow/json-schema/src/JsonSchema/Constraints/UndefinedConstraint.php',
+'JsonSchema\\Exception\\InvalidArgumentException' => __DIR__ . '/..' . 
'/justinrainbow/json-schema/src/JsonSchema/Exception/InvalidArgumentException.php',
+'JsonSchema\\Exception\\InvalidSchemaMediaTypeException' => __DIR__ . 
'/..' . 
'/justinrainbow/json-schema/src/JsonSchema/Exception/InvalidSchemaMediaTypeException.php',
+'JsonSchema\\Exception\\InvalidSourceUriException' => __DIR__ . '/..' 
. 
'/justinrainbow/json-schema/src/JsonSchema/Exception/InvalidSourceUriException.php',
+'JsonSchema\\Exception\\JsonDecodingException' => __DIR__ . '/..' . 
'/justinrainbow/json-schema/src/JsonSchema/Exception/JsonDecodingException.php',
+'JsonSchema\\Exception\\ResourceNotFoundException' => __DIR__ . 

[MediaWiki-commits] [Gerrit] Increase the filehandle limit for rabbitmq in labs. - change (operations/puppet)

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

Change subject: Increase the filehandle limit for rabbitmq in labs.
..


Increase the filehandle limit for rabbitmq in labs.

This is an impulsive change motivated by:

- I just saw a talk by some OpenStack admins full of horror stories
   of cryptic failure cases when the file handle limit is hit
- Rabbitmq just now seized up and I had to restart it
- https://bugs.launchpad.net/fuel/+bug/1279594

Change-Id: Ie7ce51964accc19e9389c20ef156287af65ab410
---
A modules/openstack/files/rabbitmq/labs-rabbitmq.default
M modules/openstack/manifests/queue_server.pp
2 files changed, 27 insertions(+), 0 deletions(-)

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



diff --git a/modules/openstack/files/rabbitmq/labs-rabbitmq.default 
b/modules/openstack/files/rabbitmq/labs-rabbitmq.default
new file mode 100644
index 000..0592815
--- /dev/null
+++ b/modules/openstack/files/rabbitmq/labs-rabbitmq.default
@@ -0,0 +1,18 @@
+#
+### THIS FILE IS MANAGED BY PUPPET
+### puppet:///modules/openstack/rabbitmq/labs-rabbitmq.default
+#
+
+
+# This file is sourced by /etc/init.d/rabbitmq-server. Its primary
+# reason for existing is to allow adjustment of system limits for the
+# rabbitmq-server process.
+#
+# Default file handles limit is 1024.  We need a handle
+#  for every worker thread of every service on every node
+#  which shouldn't add up to 1024 but Rabbit has been dying
+#  and this is an inexpensive thing to try.
+#
+# Many big production OS installs have this set to 16k or even 64k.
+#
+ulimit -n 8192
diff --git a/modules/openstack/manifests/queue_server.pp 
b/modules/openstack/manifests/queue_server.pp
index 3a3bf50..b9503ce 100644
--- a/modules/openstack/manifests/queue_server.pp
+++ b/modules/openstack/manifests/queue_server.pp
@@ -8,6 +8,15 @@
 require => Class['openstack::repo'];
 }
 
+# Turn up the number of allowed file handles for rabbitmq
+file { '/etc/default/rabbitmq-server':
+ensure => present,
+owner  => 'root',
+group  => 'root',
+mode   => '0444',
+source => 'puppet:///modules/openstack/rabbitmq/labs-rabbitmq.default',
+}
+
 if $::fqdn == hiera('labs_nova_controller') {
 service { 'rabbitmq-server':
 ensure=> running,

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

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

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


[MediaWiki-commits] [Gerrit] Tag v0.17.1 - change (oojs/ui)

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

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

Change subject: Tag v0.17.1
..

Tag v0.17.1

Change-Id: Ica130c2cf2589f40094efffd6cf25d6de392ce6e
---
M History.md
M package.json
2 files changed, 12 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/63/286763/1

diff --git a/History.md b/History.md
index 449e36f..172f07a 100644
--- a/History.md
+++ b/History.md
@@ -1,5 +1,16 @@
 # OOjs UI Release History
 
+## v0.17.1 / 2016-05-03
+### Styles
+* CapsuleMultiSelectWidget: Fix cross-browser inconsistencies and improve UX 
(Volker E)
+* SelectFileWidget: Add `no-drop` cursor where it belongs (Volker E)
+* MediaWiki theme: Align focus state of capsuleItemWidget with other widgets 
(Volker E)
+* MediaWiki theme: Custom `:focus` state for SelectWidgets (Bartosz Dziewoński)
+* MediaWiki theme: Standardize `:focus` states of ButtonWidgets (Volker E)
+
+### Code
+* DraggableGroupElement: Simplify and improve drag logic (Ed Sanders)
+
 ## v0.17.0 / 2016-04-26
 ### Breaking changes
 * [BREAKING CHANGE] PHP: Use traits instead of custom mixin system (Kunal 
Mehta)
diff --git a/package.json b/package.json
index 7129468..cfea830 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
 {
   "name": "oojs-ui",
-  "version": "0.17.0",
+  "version": "0.17.1",
   "description": "User interface classes built on the OOjs framework.",
   "keywords": [
 "oojs-plugin",

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

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

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


[MediaWiki-commits] [Gerrit] Don't fail hard on dependencies error for ext.centralNotice.... - change (mediawiki...CentralNotice)

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

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

Change subject: Don't fail hard on dependencies error for 
ext.centralNotice.startUp
..

Don't fail hard on dependencies error for ext.centralNotice.startUp

Bug: T134310
Change-Id: Ibb12a7b4d40480623fca4a1db47f4932ad1ce579
---
M resources/subscribing/ext.centralNotice.startUp.js
1 file changed, 9 insertions(+), 0 deletions(-)


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

diff --git a/resources/subscribing/ext.centralNotice.startUp.js 
b/resources/subscribing/ext.centralNotice.startUp.js
index 737bf9f..779735c 100644
--- a/resources/subscribing/ext.centralNotice.startUp.js
+++ b/resources/subscribing/ext.centralNotice.startUp.js
@@ -59,6 +59,15 @@
return;
}
 
+   // If there's some issue with RL causing ext.centralNotice.display not
+   // to load, don't fail hard
+   if ( !cn.chooseAndMaybeDisplay ) {
+   mw.log( 'Possible campaign(s) received in choiceData, but ' +
+   'mw.centralNotice.chooseAndMaybeDisplay() is not 
available' );
+
+   return;
+   }
+
cn.chooseAndMaybeDisplay();
 
 } )(  jQuery, mediaWiki );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibb12a7b4d40480623fca4a1db47f4932ad1ce579
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CentralNotice
Gerrit-Branch: master
Gerrit-Owner: AndyRussG 

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


[MediaWiki-commits] [Gerrit] MediaWiki theme: Align focus state of capsuleItemWidget with... - change (oojs/ui)

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

Change subject: MediaWiki theme: Align focus state of capsuleItemWidget with 
other widgets
..


MediaWiki theme: Align focus state of capsuleItemWidget with other widgets

Aligning `:focus` state of capsuleItemWidget with other widgets and
introducing `@box-shadow-focus-default` Less variable.

Change-Id: I83af82855654a392790f62e7d7eb65cf9946584c
---
M src/themes/mediawiki/common.less
M src/themes/mediawiki/widgets.less
2 files changed, 2 insertions(+), 0 deletions(-)

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



diff --git a/src/themes/mediawiki/common.less b/src/themes/mediawiki/common.less
index 22faac8..389eeef 100644
--- a/src/themes/mediawiki/common.less
+++ b/src/themes/mediawiki/common.less
@@ -54,6 +54,7 @@
 @box-shadow-dialog: 0 0.15em 0 0 rgba( 0, 0, 0, 0.15 );
 @box-shadow-menu: @box-shadow-dialog;
 @box-shadow-popup: @box-shadow-dialog;
+@box-shadow-focus-default: inset 0 0 0 1px @color-progressive;
 @box-shadow-light-inset: inset 0 0 0 1px @color-default-light;
 
 @text-shadow-default: 0 1px 1px #fff; // 'coined' effect
diff --git a/src/themes/mediawiki/widgets.less 
b/src/themes/mediawiki/widgets.less
index 200fc88..bf880f2 100644
--- a/src/themes/mediawiki/widgets.less
+++ b/src/themes/mediawiki/widgets.less
@@ -792,6 +792,7 @@
&:focus {
outline: 0;
border-color: @color-progressive;
+   box-shadow: @box-shadow-focus-default;
}
 
&.oo-ui-widget-disabled {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I83af82855654a392790f62e7d7eb65cf9946584c
Gerrit-PatchSet: 1
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: VolkerE 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Add beta-specific access.conf exceptions in scap::target - change (operations/puppet)

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

Change subject: Add beta-specific access.conf exceptions in scap::target
..


Add beta-specific access.conf exceptions in scap::target

Explicitly allow scap-managed users to log in to targets from the
deployment host. refs T121721

Bug: T121721
Change-Id: I3a5b08b0a9c31d8984aac503d8e94fdab00a75cf
---
M hieradata/labs/deployment-prep/common.yaml
M modules/beta/manifests/deployaccess.pp
M modules/scap/manifests/target.pp
3 files changed, 15 insertions(+), 6 deletions(-)

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



diff --git a/hieradata/labs/deployment-prep/common.yaml 
b/hieradata/labs/deployment-prep/common.yaml
index 582f22d..e41d43b 100644
--- a/hieradata/labs/deployment-prep/common.yaml
+++ b/hieradata/labs/deployment-prep/common.yaml
@@ -162,6 +162,7 @@
 "role::url_downloader::url_downloader_ip": 10.68.16.135
 "zotero::http_proxy": 
deployment-urldownloader.deployment-prep.eqiad.wmflabs:8080
 "trebuchet::deployment_server": deployment-tin.deployment-prep.eqiad.wmflabs
+"scap::deployment_server": deployment-tin.deployment-prep.eqiad.wmflabs
 "scap::dsh::group_source": 'puppet:///modules/beta/dsh/group'
 "mediawiki::users::mwdeploy_pub_key": 'ssh-rsa 
B3NzaC1yc2EDAQABAAABAQDFwlmBBBJAr1GI+vuYjFh5vq0YIVa5fqE5DZdpzUZISlQ0Kt+9bIr2qNHIj+Jl5Bc6ZY1mkh8l693tAHVx+8tayoiFWYNs9IVsxR+iHgOOhAdDIBXaHaUattdiye5bQmdvJVXaVegckNX2gbmUCOc09jvZvlk3blKFTSEpZRU8dmpXQzKdZgaAq2VTajAegoFnuN9FbC7hzBPA+1NxFNKn94eIeFPSlo5rWr44OEb5Uy3O0B5c6WPM+IgfiygetP+yGL4cKv7qEjZ0Sxok/Rh1lBh1vP1YQ/Mc6tMV0s+kOv7Wz+P88bfU1/uWvy479OZdfh3NQqDTrLzqHwVW1vef
 root@deployment-salt'
 # NOTE: these elasticsearch settings will need to be overloaded on a per-host
diff --git a/modules/beta/manifests/deployaccess.pp 
b/modules/beta/manifests/deployaccess.pp
index 5bcb949..6e56469 100644
--- a/modules/beta/manifests/deployaccess.pp
+++ b/modules/beta/manifests/deployaccess.pp
@@ -9,10 +9,4 @@
 priority => 50,
 }
 
-# Allow eventlogging user to deploy.
-security::access::config { 'beta-allow-eventlogging':
-content  => "+ : eventlogging : ${bastion_ip}\n",
-priority => 51,
-}
-
 }
diff --git a/modules/scap/manifests/target.pp b/modules/scap/manifests/target.pp
index 0b5cfa8..aa7a301 100644
--- a/modules/scap/manifests/target.pp
+++ b/modules/scap/manifests/target.pp
@@ -77,6 +77,20 @@
 User[$deploy_user] -> Scap::Target[$title]
 }
 
+if $::realm == 'labs' {
+if !defined(Security::Access::Config["beta-allow-${deploy_user}"]) {
+# Allow $deploy_user login from scap deployment host.
+# adds an exception in /etc/security/access.conf
+# to work around labs-specific restrictions
+$deployment_host = hiera('scap::deployment_server')
+$deployment_ip = ipresolve($deployment_host)
+security::access::config { "beta-allow-${deploy_user}":
+content  => "+ : ${deploy_user} : ${deployment_ip}\n",
+priority => 60,
+}
+}
+}
+
 package { $package_name:
 install_options => [{
   owner => $deploy_user}],

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3a5b08b0a9c31d8984aac503d8e94fdab00a75cf
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: 20after4 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: Ottomata 
Gerrit-Reviewer: Rush 
Gerrit-Reviewer: Thcipriani 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] CapsuleMultiSelectWidget: Fix cross-browser inconsistencies ... - change (oojs/ui)

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

Change subject: CapsuleMultiSelectWidget: Fix cross-browser inconsistencies and 
improve UX
..


CapsuleMultiSelectWidget: Fix cross-browser inconsistencies and improve UX

Fixing browser inconsistencies between Firefox, Chrome and IE 11. Also
* increasing clickable area of clear button for better usability and
* hiding clear button on disabled label elements

Bug: T134117
Change-Id: Id80f68f8c9162d38e353026fb83ec11d251da617
---
M src/themes/mediawiki/widgets.less
1 file changed, 34 insertions(+), 9 deletions(-)

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



diff --git a/src/themes/mediawiki/widgets.less 
b/src/themes/mediawiki/widgets.less
index 200fc88..ec849f0 100644
--- a/src/themes/mediawiki/widgets.less
+++ b/src/themes/mediawiki/widgets.less
@@ -780,14 +780,14 @@
max-width: 100%;
.oo-ui-box-sizing( border-box );
vertical-align: middle;
-   padding: 0 0.4em;
-   margin: 0.1em;
height: 1.7em;
line-height: 1.7em;
background-color: #eee;
-   border: @border-default;
color: @color-default;
+   margin: 0.1em;
+   border: @border-default;
border-radius: @border-radius-default;
+   padding: 0 0.4em;
 
&:focus {
outline: 0;
@@ -795,15 +795,40 @@
}
 
&.oo-ui-widget-disabled {
-   color: @color-disabled;
-   text-shadow: @text-shadow-disabled;
-   border-color: @border-color-disabled;
background-color: @background-color-disabled;
+   color: @color-disabled;
+   border-color: @border-color-disabled;
+   text-shadow: @text-shadow-disabled;
}
 
-   > .oo-ui-buttonElement {
-   margin-top: -1.4em;
-   padding-left: 0.3em;
+   // Clear button
+   & > .oo-ui-buttonElement {
+   display: none;
+   }
+
+   &.oo-ui-widget-enabled {
+   padding-right: @size-indicator + 0.6em;
+
+   > .oo-ui-buttonElement {
+   display: block;
+   position: absolute;
+   top: 0;
+   right: 0;
+   bottom: 0;
+   }
+   & .oo-ui-buttonElement-button {
+   display: block;
+   width: @size-indicator + 0.6em; // Padding on each side 
of the indicator
+   height: 100%; // Firefox height calculation fix
+
+   & .oo-ui-indicator-clear {
+   position: absolute;
+   top: 0;
+   right: 0.3em;
+   bottom: 0;
+   height: auto;
+   }
+   }
}
 }
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id80f68f8c9162d38e353026fb83ec11d251da617
Gerrit-PatchSet: 2
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: VolkerE 
Gerrit-Reviewer: Bartosz Dziewoński 
Gerrit-Reviewer: Esanders 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: Prtksxna 
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 replay button to video.js player - change (mediawiki...TimedMediaHandler)

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

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

Change subject: Add replay button to video.js player
..

Add replay button to video.js player

Change-Id: Ia7cec093a153cedad12a19d92877a12a75e098f5
---
M Gruntfile.js
M TimedMediaHandler.hooks.php
M package.json
M resources/ext.tmh.player.js
A resources/videojs-replay/lang/en.js
A resources/videojs-replay/videojs-replay.css
A resources/videojs-replay/videojs-replay.js
7 files changed, 124 insertions(+), 3 deletions(-)


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

diff --git a/Gruntfile.js b/Gruntfile.js
index f894208..b1b8cd3 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -35,7 +35,7 @@
},
exec: {
'npm-update-videojs': {
-   cmd: 'npm update video.js 
videojs-resolution-switcher videojs-ogvjs videojs-responsive-layout',
+   cmd: 'npm update video.js 
videojs-resolution-switcher videojs-ogvjs videojs-responsive-layout 
videojs-replay',
callback: function ( error, stdout, stderr ) {
grunt.log.write( stdout );
if ( stderr ) {
@@ -80,6 +80,12 @@
cwd: 
'node_modules/videojs-responsive-layout/dist/',
src: [ '**' ],
dest: 'resources/videojs-responsive-layout/'
+   },
+   'videojs-replay': {
+   expand: true,
+   cwd: 'node_modules/videojs-replay/dist/',
+   src: [ '**', '!**/*.min.js' ],
+   dest: 'resources/videojs-replay/'
}
},
patch: {
@@ -95,7 +101,7 @@
}
} );
 
-   grunt.registerTask( 'update-videojs', [ 'exec:npm-update-videojs', 
'copy:video.js', 'copy:videojs-resolution-switcher', 'copy:videojs-ogvjs', 
'copy:videojs-responsive-layout', 'patch:video.js' ] );
+   grunt.registerTask( 'update-videojs', [ 'exec:npm-update-videojs', 
'copy:video.js', 'copy:videojs-resolution-switcher', 'copy:videojs-ogvjs', 
'copy:videojs-responsive-layout', 'copy:videojs-replay', 'patch:video.js' ] );
grunt.registerTask( 'test', [ 'jshint', 'jscs', 'jsonlint', 'banana' ] 
);
grunt.registerTask( 'default', 'test' );
 };
diff --git a/TimedMediaHandler.hooks.php b/TimedMediaHandler.hooks.php
index 81fdc3a..2f690f0 100644
--- a/TimedMediaHandler.hooks.php
+++ b/TimedMediaHandler.hooks.php
@@ -155,6 +155,14 @@
'ext.tmh.video-js',
],
],
+   'ext.tmh.videojs-replay' => 
$baseExtensionResource + [
+   'scripts' => 
'resources/videojs-replay/videojs-replay.js',
+   'styles' => 
'resources/videojs-replay/videojs-replay.css',
+   'targets' => [ 'mobile', 'desktop' ],
+   'dependencies' => [
+   'ext.tmh.video-js',
+   ],
+   ],
'ext.tmh.player' => $baseExtensionResource + [
'scripts' => 
'resources/ext.tmh.player.js',
'targets' => [ 'mobile', 
'desktop' ],
@@ -163,6 +171,7 @@

'ext.tmh.videojs-resolution-switcher',
'ext.tmh.videojs-ogvjs',

'ext.tmh.videojs-responsive-layout',
+   
'ext.tmh.videojs-replay',
// 
'ext.tmh.videojs-offset',
],
],
diff --git a/package.json b/package.json
index c1ca728..86a565e 100644
--- a/package.json
+++ b/package.json
@@ -18,5 +18,8 @@
 "videojs-ogvjs": "^1.1.0",
 "videojs-resolution-switcher": "^0.4.2",
 "videojs-responsive-layout": "^1.1.0"
+  },
+  "dependencies": {
+"videojs-replay": "^1.1.0"
   }
 }
diff --git a/resources/ext.tmh.player.js b/resources/ext.tmh.player.js
index 5e303f5..5a68d95 100755
--- a/resources/ext.tmh.player.js
+++ b/resources/ext.tmh.player.js
@@ -121,7 +121,7 @@
// this.on( 'play', growPlayer );
// this.on( 'ended', 

[MediaWiki-commits] [Gerrit] DraggableGroupElement: Simplify and improve drag logic - change (oojs/ui)

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

Change subject: DraggableGroupElement: Simplify and improve drag logic
..


DraggableGroupElement: Simplify and improve drag logic

Now that we preview elements in place, checking if the element
is beyond the midway point of the target no longer makes sense.
This makes the logic considerably simpler and we just move the
current item into the place of the dragged-over item.

Change-Id: I109c085e42685b68e8f7066ccb685ac2ad3eb093
---
M src/mixins/DraggableGroupElement.js
1 file changed, 8 insertions(+), 59 deletions(-)

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



diff --git a/src/mixins/DraggableGroupElement.js 
b/src/mixins/DraggableGroupElement.js
index cac7422..19261ac 100644
--- a/src/mixins/DraggableGroupElement.js
+++ b/src/mixins/DraggableGroupElement.js
@@ -139,74 +139,23 @@
  * @fires reorder
  */
 OO.ui.mixin.DraggableGroupElement.prototype.onDragOver = function ( e ) {
-   var dragOverObj, $optionWidget, itemOffset, itemMidpoint, 
itemBoundingRect,
-   itemSize, cssOutput, dragPosition, overIndex, itemPosition, 
after,
-   targetIndex = null,
+   var overIndex, targetIndex,
item = this.getDragItem(),
-   dragItemIndex = item.getIndex(),
-   clientX = e.originalEvent.clientX,
-   clientY = e.originalEvent.clientY;
+   dragItemIndex = item.getIndex();
 
// Get the OptionWidget item we are dragging over
-   dragOverObj = this.getElementDocument().elementFromPoint( clientX, 
clientY );
-   $optionWidget = $( dragOverObj ).closest( '.oo-ui-draggableElement' );
-   if ( $optionWidget[ 0 ] ) {
-   itemOffset = $optionWidget.offset();
-   itemBoundingRect = $optionWidget[ 0 ].getBoundingClientRect();
-   itemPosition = $optionWidget.position();
-   overIndex = $optionWidget.data( 'index' );
-   }
+   overIndex = $( e.target ).closest( '.oo-ui-draggableElement' ).data( 
'index' );
 
-   if (
-   itemOffset &&
-   overIndex !== dragItemIndex
-   ) {
-   if ( this.orientation === 'horizontal' ) {
-   // Calculate where the mouse is relative to the item 
width
-   itemSize = itemBoundingRect.width;
-   itemMidpoint = itemBoundingRect.left + itemSize / 2;
-   dragPosition = clientX;
-   // Which side of the item we hover over will dictate
-   // where to drop the selected item, on the left or
-   // on the right
-   cssOutput = {
-   left: dragPosition < itemMidpoint ? 
itemPosition.left : itemPosition.left + itemSize,
-   top: itemPosition.top
-   };
-   } else {
-   // Calculate where the mouse is relative to the item 
height
-   itemSize = itemBoundingRect.height;
-   itemMidpoint = itemBoundingRect.top + itemSize / 2;
-   dragPosition = clientY;
-   // Which side of the item we hover over will dictate
-   // where to drop the selected item, on the top or
-   // on the bottom
-   cssOutput = {
-   top: dragPosition < itemMidpoint ? 
itemPosition.top : itemPosition.top + itemSize,
-   left: itemPosition.left
-   };
-   }
-   // Store whether we are before or after an item to rearrange
-   // For horizontal layout, we need to account for RTL, as this 
is flipped
-   if ( this.orientation === 'horizontal' && this.dir === 'rtl' ) {
-   after = dragPosition < itemMidpoint;
-   } else {
-   after = dragPosition > itemMidpoint;
-   }
-   targetIndex = overIndex + ( after ? 1 : 0 );
-   // Check the targetIndex isn't immediately to the left or right 
of the current item (a no-op)
-   if ( targetIndex === dragItemIndex || targetIndex === 
dragItemIndex + 1 ) {
-   targetIndex = null;
-   }
-   }
-   if ( targetIndex !== null ) {
+   if ( overIndex !== undefined && overIndex !== dragItemIndex ) {
+   targetIndex = overIndex + ( overIndex > dragItemIndex ? 1 : 0 );
+
if ( targetIndex > 0 ) {
this.$group.children().eq( targetIndex - 1 ).after( 
item.$element );
} else {
this.$group.prepend( item.$element );
}
-   

[MediaWiki-commits] [Gerrit] Provide several tweaks - change (mediawiki...SemanticImageInput)

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

Change subject: Provide several tweaks
..


Provide several tweaks

* Updated INSTALL file
* Updated README file
* Formatted COPYING file
* Provide license label to show on "Special:Version"
* Go https
* Do linkfixes
* Minor formatting of SemanticImageInput.php
* Consistently switch to use __DIR__

Bug: T123943
Change-Id: I98f57637e74e7d7e2a4ef133a09dcfd353502e19
---
M COPYING
M INSTALL
M README
M SemanticImageInput.php
4 files changed, 32 insertions(+), 30 deletions(-)

Approvals:
  Jeroen De Dauw: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/COPYING b/COPYING
index f583e2f..2677105 100644
--- a/COPYING
+++ b/COPYING
@@ -1,8 +1,9 @@
-The license text below "" applies to all files within this distribution, 
other
-than those that are in a directory which contains files named "LICENSE" or
-"COPYING", or a subdirectory thereof. For those files, the license text 
contained in
-said file overrides any license information contained in directories of 
smaller depth.
-Alternative licenses are typically used for software that is provided by 
external
+The license text below "" applies to all files within this
+distribution, other than those that are in a directory which contains
+files named "LICENSE" or "COPYING", or a subdirectory thereof. For those
+files, the license text contained in said file overrides any license
+information contained in directories of smaller depth. Alternative
+licenses are typically used for software that is provided by external
 parties, and merely packaged with this software for convenience.
 
 
@@ -679,4 +680,4 @@
 may consider it more useful to permit linking proprietary applications with
 the library.  If this is what you want to do, use the GNU Lesser General
 Public License instead of this License.  But first, please read
-.
\ No newline at end of file
+.
diff --git a/INSTALL b/INSTALL
index 2bce5cb..43a2be5 100644
--- a/INSTALL
+++ b/INSTALL
@@ -1,7 +1,7 @@
 These is the install file for the Semantic Image Input extension.

 Extension page on mediawiki.org: 
https://www.mediawiki.org/wiki/Extension:Semantic_Image_Input
-Latest version of the install file: 
http://svn.wikimedia.org/viewvc/mediawiki/trunk/extensions/SemanticImageInput/INSTALL?view=co
+Latest version of the install file: 
https://git.wikimedia.org/blob/mediawiki%2Fextensions%2FSemanticImageInput.git/master/INSTALL
 
 
 == Requirements ==
@@ -14,25 +14,27 @@
 
 == Download ==
 
-You can get the code directly from SVN. Tags can be obtained via
+You can get the code directly from Git.
 
- svn checkout 
http://svn.wikimedia.org/svnroot/mediawiki/tags/extensions/SemanticImageInput/REL_version
+ cd /path/to/extensions 
+ git clone 
https://gerrit.wikimedia.org/r/p/mediawiki/extensions/SemanticImageInput.git
 
-Where 'version' is the version number of the tag, such as 0_1 (see the 
[http://svn.wikimedia.org/svnroot/mediawiki/tags/extensions/SemanticImageInput/ 
available tags]).
-The latest code can be obtained from trunk:
+Tags can be viewed like
 
- svn checkout 
http://svn.wikimedia.org/svnroot/mediawiki/trunk/extensions/SemanticImageInput/
+ cd /SemanticImageInput
+ git tag -l
+ git checkout 
 
 == Installation ==
 
 Once you have downloaded the code, place the ''SemanticImageInput'' directory 
within your MediaWiki
-'extensions' directory. Then add the following code to your 
[[Manual:LocalSettings.php|LocalSettings.php]] file:
+'extensions' directory. Then add the following code to your 
"LocalSettings.php" file:
 
 # Semantic Image Input
-require_once( "$IP/extensions/SemanticImageInput/SemanticImageInput.php" );
+require_once "$IP/extensions/SemanticImageInput/SemanticImageInput.php";
 
 You also need to enable instant commons: 
https://www.mediawiki.org/wiki/Instant_commons
-This is done by adding the following code to your LocalSettings.php file:
+This is done by adding the following code to your "LocalSettings.php" file:
 
 # Enable instant commons
 $wgUseInstantCommons  = true;
@@ -42,10 +44,10 @@
 
 == Configuration ==
 
-Configuration of Contest is done by assigning to $egSIISettings in your
-[[Manual:LocalSettings.php|LocalSettings.php]] file, AFTER the inclusion of the
-extension. The options are listed below and their default is set in the 
Contest settings file:
-http://svn.wikimedia.org/viewvc/mediawiki/trunk/extensions/SemanticImageInput/SemanticImageInput.settings.php?view=markup
+Configuration of Contest is done by assigning to $egSIISettings in your 
"LocalSettings.php" file,
+AFTER the inclusion of the extension. The options are listed below and their 
default is set in the
+settings file:
+https://git.wikimedia.org/blob/mediawiki%2Fextensions%2FSemanticImageInput.git/master/SemanticImageInput.settings.php
 You should NOT modify the 

[MediaWiki-commits] [Gerrit] Fix Undefined variable: namespaces in includes/search/Search... - change (mediawiki/core)

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

Change subject: Fix Undefined variable: namespaces in 
includes/search/SearchEngineConfig.php on line 109
..


Fix Undefined variable: namespaces in includes/search/SearchEngineConfig.php on 
line 109

Bug: T134305
Change-Id: I220886e12a6d083ac34a8a75bc77871e89dbf747
(cherry picked from commit 257c023666d2dd2c37b0752f5e1f4ff0325a03c4)
---
M includes/search/SearchEngine.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/includes/search/SearchEngine.php b/includes/search/SearchEngine.php
index 27b6dd4..dcef95c 100644
--- a/includes/search/SearchEngine.php
+++ b/includes/search/SearchEngine.php
@@ -607,7 +607,7 @@
 * @return array
 */
public static function namespacesAsText( $namespaces ) {
-   return 
MediaWikiServices::getInstance()->getSearchEngineConfig()->namespacesAsText();
+   return 
MediaWikiServices::getInstance()->getSearchEngineConfig()->namespacesAsText( 
$namespaces );
}
 
/**

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I220886e12a6d083ac34a8a75bc77871e89dbf747
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.27.0-wmf.23
Gerrit-Owner: DCausse 
Gerrit-Reviewer: EBernhardson 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] [WIP] Log and report the file size of derivatives - change (mediawiki...TimedMediaHandler)

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

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

Change subject: [WIP] Log and report the file size of derivatives
..

[WIP] Log and report the file size of derivatives

Untested code. Might continue with this later. Or abandon.. you never
know.

Bug: T57942
Change-Id: Ib483d8ed1b7f3e24b69b62f2dd5b0bc2cb677c7f
---
M TimedMediaHandler.hooks.php
M TimedMediaHandler.sql
M TranscodeStatusTable.php
M WebVideoTranscode/WebVideoTranscode.php
M WebVideoTranscode/WebVideoTranscodeJob.php
A archives/transcode_size.sql
6 files changed, 34 insertions(+), 4 deletions(-)


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

diff --git a/TimedMediaHandler.hooks.php b/TimedMediaHandler.hooks.php
index 81fdc3a..da301ed 100644
--- a/TimedMediaHandler.hooks.php
+++ b/TimedMediaHandler.hooks.php
@@ -674,6 +674,7 @@
$updater->addExtensionTable( 'transcode', 
"$base/TimedMediaHandler.sql" );
$updater->addExtensionUpdate( [ 'addIndex', 
'transcode', 'transcode_name_key',
"$base/archives/transcode_name_key.sql", true ] 
);
+   $updater->addExtensionField( 'transcode', 
'transcode_size', "$base/archives/transcode_size.sql" );
break;
case 'postgres':
// TODO
diff --git a/TimedMediaHandler.sql b/TimedMediaHandler.sql
index 7bafe67..e58b8fe 100644
--- a/TimedMediaHandler.sql
+++ b/TimedMediaHandler.sql
@@ -10,7 +10,8 @@
transcode_time_startwork VARCHAR(14) NULL,
transcode_time_success VARCHAR(14) NULL,
transcode_time_error VARCHAR(14) NULL,
-   transcode_final_bitrate INT NOT NULL
+   transcode_final_bitrate INT NOT NULL,
+   transcode_size INT unsigned NOT NULL default 0
 ) /*$wgDBTableOptions*/;
 
 CREATE INDEX /*i*/transcode_time_inx ON /*_*/transcode( transcode_time_addjob 
,transcode_time_startwork , transcode_time_success, transcode_time_error );
diff --git a/TranscodeStatusTable.php b/TranscodeStatusTable.php
index 37fef9d..ff48b1d 100644
--- a/TranscodeStatusTable.php
+++ b/TranscodeStatusTable.php
@@ -102,6 +102,7 @@
 
$o .= '' . wfMessage( 'timedmedia-status' )->escaped() . 
'';
$o .= '' . wfMessage( 'timedmedia-transcodeduration' 
)->escaped() . '';
+   $o .= '' . wfMessage( 'timedmedia-transcodesize' 
)->escaped() . '';
$o .= "\n";
 
foreach ( $transcodeRows as $transcodeKey => $state ) {
@@ -130,6 +131,7 @@
// Status:
$o .= '' . self::getStatusMsg( $file, $state ) . 
'';
$o .= '' . self::getTranscodeDuration( $file, 
$state ) . '';
+   $o .= '' . self::getTranscodeFilesize( $file, 
$state ) . '';
 
$o .= '';
}
@@ -184,6 +186,24 @@
 * @param $state
 * @return string
 */
+   public static function getTranscodeFilesize( $file, $state ) {
+   global $wgLang;
+   if ( !is_null( $state['success'] ) {
+   if ( $state['size'] == 0 ) {
+   return $wgLang->formatSize( $state['size'] );
+   } else {
+   return $wgLang->formatSize( filesize( 
$this->getTargetEncodePath() );
+   }
+   } else {
+   return '';
+   }
+   }
+
+   /**
+* @param $file File
+* @param $state
+* @return string
+*/
public static function getStatusMsg( $file, $state ) {
global $wgContLang;
// Check for success:
diff --git a/WebVideoTranscode/WebVideoTranscode.php 
b/WebVideoTranscode/WebVideoTranscode.php
index 010e21c..ff7d002 100644
--- a/WebVideoTranscode/WebVideoTranscode.php
+++ b/WebVideoTranscode/WebVideoTranscode.php
@@ -1046,6 +1046,9 @@
$fields["bandwidth"] = intval(
self::$transcodeState[$fileName][ $transcodeKey 
]['final_bitrate']
);
+   $fields["size"] = intval(
+   self::$transcodeState[$fileName][ $transcodeKey 
]['size']
+   );
}
 
if ( !$file->getHandler()->isAudio( $file ) ) {
@@ -1103,7 +1106,8 @@
'transcode_key' => 
$transcodeKey,
'transcode_time_addjob' => null,
'transcode_error' => "",
-   'transcode_final_bitrate' => 0
+   'transcode_final_bitrate' => 0,
+   

[MediaWiki-commits] [Gerrit] Dashboard: Added custom widget - change (mediawiki...BlueSpiceExtensions)

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

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

Change subject: Dashboard: Added custom widget
..

Dashboard: Added custom widget

A custom widget can now be used. It displays any given wiki article
in the widget. This can be used to create customized widgets with
arbitrary content.

Change-Id: Idb926dc401625e1d1adb96c65765e44c95e79cc9
---
M Dashboards/Dashboards.class.php
M Dashboards/Dashboards.setup.php
M Dashboards/i18n/en.json
M Dashboards/i18n/qqq.json
A Dashboards/includes/api/BSApiDashboardWidgets.php
D Dashboards/resources/BS.Dashboards/ArticlePortlet.js
D Dashboards/resources/BS.Dashboards/ArticlePortletConfig.js
A Dashboards/resources/BS.Dashboards/CustomPortlet.js
A Dashboards/resources/BS.Dashboards/CustomPortletConfig.js
9 files changed, 157 insertions(+), 28 deletions(-)


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

diff --git a/Dashboards/Dashboards.class.php b/Dashboards/Dashboards.class.php
index 06164ff..7546afd 100644
--- a/Dashboards/Dashboards.class.php
+++ b/Dashboards/Dashboards.class.php
@@ -211,6 +211,12 @@
'title' => wfMessage( 
'bs-dashboard-userportlet-calendar-title' )->plain()
)
);
+   $aPortalConfig[0][] = array(
+   'type'  => 'BS.Dashboards.CustomPortlet',
+   'config' => array(
+   'title' => wfMessage( 
'bs-dashboard-userportlet-custom-title' )->plain()
+   )
+   );
return true;
}
 
@@ -229,6 +235,14 @@
'title' => wfMessage( 
'bs-dashboard-userportlet-calendar-title' )->plain(),
'description' => wfMessage( 
'bs-dashboard-userportlet-calendar-description' )->plain()
);
+   $aPortlets[] = array(
+   'type'  => 'BS.Dashboards.CustomPortlet',
+   'config' => array(
+   'title' => wfMessage( 
'bs-dashboard-userportlet-custom-title' )->plain(),
+   ),
+   'title' => wfMessage( 
'bs-dashboard-userportlet-custom-title' )->plain(),
+   'description' => wfMessage( 
'bs-dashboard-userportlet-custom-description' )->plain()
+   );
return true;
}
 }
\ No newline at end of file
diff --git a/Dashboards/Dashboards.setup.php b/Dashboards/Dashboards.setup.php
index fea42bc..0be21ed 100644
--- a/Dashboards/Dashboards.setup.php
+++ b/Dashboards/Dashboards.setup.php
@@ -13,12 +13,14 @@
 $wgAutoloadClasses['SpecialUserDashboard'] = 
__DIR__.'/includes/specials/SpecialUserDashboard.php';
 $GLOBALS['wgAutoloadClasses']['BSApiDashboardTasks'] = __DIR__ . 
'/includes/api/BSApiDashboardTasks.php';
 $GLOBALS['wgAutoloadClasses']['BSApiDashboardStore'] = __DIR__ . 
'/includes/api/BSApiDashboardStore.php';
+$GLOBALS['wgAutoloadClasses']['BSApiDashboardWidgets'] = __DIR__ . 
'/includes/api/BSApiDashboardWidgets.php';
 
 $wgSpecialPages['AdminDashboard'] = 'SpecialAdminDashboard';
 $wgSpecialPages['UserDashboard']  = 'SpecialUserDashboard';
 
 $wgAPIModules['bs-dashboards-tasks'] = 'BSApiDashboardTasks';
 $wgAPIModules['bs-dashboards-store'] = 'BSApiDashboardStore';
+$wgAPIModules['bs-dashboards-widgets'] = 'BSApiDashboardWidgets';
 
 $wgHooks['LoadExtensionSchemaUpdates'][] = 'Dashboards::getSchemaUpdates';
 $wgHooks['BSDashboardsUserDashboardPortalPortlets'][] = 
'Dashboards::onBSDashboardsUserDashboardPortalPortlets';
@@ -50,7 +52,8 @@
'messages' => array(
'bs-dashboards-addportlet',
'bs-dashboards-portlets',
-   'bs-extjs-rssfeeder-rss-title'
+   'bs-extjs-rssfeeder-rss-title',
+   'bs-dashboard-userportlet-custom-wiki-article'
)
 ) + $aResourceModuleTemplate;
 
diff --git a/Dashboards/i18n/en.json b/Dashboards/i18n/en.json
index 36657d9..9a1adf9 100644
--- a/Dashboards/i18n/en.json
+++ b/Dashboards/i18n/en.json
@@ -13,5 +13,9 @@
"admindashboard": "Admin dashboard",
"userdashboard": "User dashboard",
"bs-dashboard-userportlet-calendar-title": "Calendar",
-   "bs-dashboard-userportlet-calendar-description": "Calendar"
+   "bs-dashboard-userportlet-calendar-description": "Calendar",
+   "bs-dashboard-userportlet-custom-title": "Custom",
+   "bs-dashboard-userportlet-custom-description": "Use a wiki page to 
define the widget",
+   "bs-dashboard-userportlet-custom-wiki-article": "Wiki article",
+   "apihelp-bs-dashboard-task-param-dc": "Cache control parameter. Used by 
ExtJS."
 }
diff --git a/Dashboards/i18n/qqq.json b/Dashboards/i18n/qqq.json
index a48e145..2ca731d 100644
--- a/Dashboards/i18n/qqq.json
+++ b/Dashboards/i18n/qqq.json
@@ -16,5 +16,9 @@
   

[MediaWiki-commits] [Gerrit] Ignore results that arnt valid wiki articles - change (wikimedia...discernatron)

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

Change subject: Ignore results that arnt valid wiki articles
..


Ignore results that arnt valid wiki articles

Occasionally some engines return urls that point to search, or to the
top level domain. Ignore them rather than bailing out.

Change-Id: Ifadfc60cf96cbe6463457c217d72764c9d79749b
---
M src/RelevanceScoring/Import/HtmlResultGetter.php
A tests/unit/RelevanceScoring/Import/HtmlResultGetter.php
2 files changed, 131 insertions(+), 9 deletions(-)

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



diff --git a/src/RelevanceScoring/Import/HtmlResultGetter.php 
b/src/RelevanceScoring/Import/HtmlResultGetter.php
index c287881..6db5bb2 100644
--- a/src/RelevanceScoring/Import/HtmlResultGetter.php
+++ b/src/RelevanceScoring/Import/HtmlResultGetter.php
@@ -58,10 +58,6 @@
 ]);
 }
 
-private function getWikiDomain($wiki)
-{
-return parse_url($this->wikis[$wiki], PHP_URL_HOST);
-}
 /**
  * @param ResponseInterface $response
  * @param string$wiki
@@ -74,7 +70,6 @@
 public function handleResponse(ResponseInterface $response, $wiki, $query)
 {
 if ($response->getStatusCode() !== 200) {
-var_dump($response);
 throw new RuntimeException('Failed search');
 }
 
@@ -87,16 +82,14 @@
 throw new RuntimeException('No results section');
 }
 
-$domain = strtolower($this->getWikiDomain($wiki));
 $results = [];
 foreach ($doc[$this->selectors['results']] as $result) {
 $pq = \pq($result);
 $url = $pq[$this->selectors['url']]->attr('href');
-$urlDomain = strtolower(parse_url($url, PHP_URL_HOST));
-if ($urlDomain === $domain) {
+if ($this->isValidWikiArticle($wiki, $url)) {
 $results[] = ImportedResult::createFromURL(
 $this->source,
-$pq[$this->selectors['url']]->attr('href'),
+$url,
 $pq[$this->selectors['snippet']]->text(),
 count($results)
 );
@@ -105,4 +98,40 @@
 
 return $results;
 }
+
+/**
+ * @param string $wiki
+ * @return string
+ */
+private function getWikiDomain($wiki)
+{
+return parse_url($this->wikis[$wiki], PHP_URL_HOST);
+}
+
+/**
+ * @param string $url
+ * @return bool
+ */
+private function isValidWikiArticle($wiki, $url)
+{
+
+$parts = parse_url($url);
+
+$domain = strtolower($this->getWikiDomain($wiki));
+$urlDomain = strtolower($parts['host']);
+if ($urlDomain !== $domain) {
+return false;
+}
+
+if (strlen($parts['path']) > 6 && substr($parts['path'], 0, 6) === 
'/wiki/') {
+return true;
+}
+
+if (empty($parts['query'])) {
+return false;
+}
+
+parse_str($parts['query'], $query);
+return !empty($query['title']);
+}
 }
diff --git a/tests/unit/RelevanceScoring/Import/HtmlResultGetter.php 
b/tests/unit/RelevanceScoring/Import/HtmlResultGetter.php
new file mode 100644
index 000..93dda2c
--- /dev/null
+++ b/tests/unit/RelevanceScoring/Import/HtmlResultGetter.php
@@ -0,0 +1,93 @@
+ 'body',
+   'results' => 'li',
+   'url' => 'a',
+   'snippet' => 'p',
+   ];
+
+   $genHtml = function (array $results) {
+   $content = '';
+   foreach ($results as $url => $snippet) {
+   $content .= "some text";
+   $content .= "$snippet";
+   }
+   return "$content";
+   };
+
+   return [
+   'simple wiki article' => [
+   $selectors,
+   
$genHtml(['https://test.wikipedia.org/wiki/Subject' => 'blah blah blah']),
+   // expected results
+   [new ImportedResult('unittest', 'Subject', 
'blah blah blah', 0)]
+   ],
+   'article in query string' => [
+   $selectors,
+   
$genHtml(['https://test.wikipedia.org/w/index.php?title=Other' => 'foo bar 
baz']),
+   [new ImportedResult('unittest', 'Other', 'foo 
bar baz', 0)]
+   ],
+   'multiple articles' => [
+   $selectors,
+   $genHtml([
+   'https://test.wikipedia.org/wiki/Other' 
=> 'foo bar baz',
+   
'https://test.wikipedia.org/w/index.php?title=Thing' => 

[MediaWiki-commits] [Gerrit] Ignore results that arnt valid wiki articles - change (wikimedia...discernatron)

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

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

Change subject: Ignore results that arnt valid wiki articles
..

Ignore results that arnt valid wiki articles

Occasionally some engines return urls that point to search, or to the
top level domain. Ignore them rather than bailing out.

Change-Id: Ifadfc60cf96cbe6463457c217d72764c9d79749b
---
M src/RelevanceScoring/Import/HtmlResultGetter.php
A tests/unit/RelevanceScoring/Import/HtmlResultGetter.php
2 files changed, 131 insertions(+), 9 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/discovery/discernatron 
refs/changes/58/286758/1

diff --git a/src/RelevanceScoring/Import/HtmlResultGetter.php 
b/src/RelevanceScoring/Import/HtmlResultGetter.php
index c287881..6db5bb2 100644
--- a/src/RelevanceScoring/Import/HtmlResultGetter.php
+++ b/src/RelevanceScoring/Import/HtmlResultGetter.php
@@ -58,10 +58,6 @@
 ]);
 }
 
-private function getWikiDomain($wiki)
-{
-return parse_url($this->wikis[$wiki], PHP_URL_HOST);
-}
 /**
  * @param ResponseInterface $response
  * @param string$wiki
@@ -74,7 +70,6 @@
 public function handleResponse(ResponseInterface $response, $wiki, $query)
 {
 if ($response->getStatusCode() !== 200) {
-var_dump($response);
 throw new RuntimeException('Failed search');
 }
 
@@ -87,16 +82,14 @@
 throw new RuntimeException('No results section');
 }
 
-$domain = strtolower($this->getWikiDomain($wiki));
 $results = [];
 foreach ($doc[$this->selectors['results']] as $result) {
 $pq = \pq($result);
 $url = $pq[$this->selectors['url']]->attr('href');
-$urlDomain = strtolower(parse_url($url, PHP_URL_HOST));
-if ($urlDomain === $domain) {
+if ($this->isValidWikiArticle($wiki, $url)) {
 $results[] = ImportedResult::createFromURL(
 $this->source,
-$pq[$this->selectors['url']]->attr('href'),
+$url,
 $pq[$this->selectors['snippet']]->text(),
 count($results)
 );
@@ -105,4 +98,40 @@
 
 return $results;
 }
+
+/**
+ * @param string $wiki
+ * @return string
+ */
+private function getWikiDomain($wiki)
+{
+return parse_url($this->wikis[$wiki], PHP_URL_HOST);
+}
+
+/**
+ * @param string $url
+ * @return bool
+ */
+private function isValidWikiArticle($wiki, $url)
+{
+
+$parts = parse_url($url);
+
+$domain = strtolower($this->getWikiDomain($wiki));
+$urlDomain = strtolower($parts['host']);
+if ($urlDomain !== $domain) {
+return false;
+}
+
+if (strlen($parts['path']) > 6 && substr($parts['path'], 0, 6) === 
'/wiki/') {
+return true;
+}
+
+if (empty($parts['query'])) {
+return false;
+}
+
+parse_str($parts['query'], $query);
+return !empty($query['title']);
+}
 }
diff --git a/tests/unit/RelevanceScoring/Import/HtmlResultGetter.php 
b/tests/unit/RelevanceScoring/Import/HtmlResultGetter.php
new file mode 100644
index 000..93dda2c
--- /dev/null
+++ b/tests/unit/RelevanceScoring/Import/HtmlResultGetter.php
@@ -0,0 +1,93 @@
+ 'body',
+   'results' => 'li',
+   'url' => 'a',
+   'snippet' => 'p',
+   ];
+
+   $genHtml = function (array $results) {
+   $content = '';
+   foreach ($results as $url => $snippet) {
+   $content .= "some text";
+   $content .= "$snippet";
+   }
+   return "$content";
+   };
+
+   return [
+   'simple wiki article' => [
+   $selectors,
+   
$genHtml(['https://test.wikipedia.org/wiki/Subject' => 'blah blah blah']),
+   // expected results
+   [new ImportedResult('unittest', 'Subject', 
'blah blah blah', 0)]
+   ],
+   'article in query string' => [
+   $selectors,
+   
$genHtml(['https://test.wikipedia.org/w/index.php?title=Other' => 'foo bar 
baz']),
+   [new ImportedResult('unittest', 'Other', 'foo 
bar baz', 0)]
+   ],
+   'multiple articles' => [
+   $selectors,
+   $genHtml([
+   'https://test.wikipedia.org/wiki/Other' 
=> 'foo bar baz',
+  

[MediaWiki-commits] [Gerrit] Match modern module loading in core - change (mediawiki...Graph)

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

Change subject: Match modern module loading in core
..


Match modern module loading in core

Bug: T134142
Bug: T134160
Change-Id: I6ce2f5aca3182daef07c86713534f646310223c6
---
M extension.json
A lib/d3-global.js
A lib/topojson-global.js
3 files changed, 8 insertions(+), 0 deletions(-)

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



diff --git a/extension.json b/extension.json
index c9f7035..c8af69d 100644
--- a/extension.json
+++ b/extension.json
@@ -53,7 +53,9 @@
"ext.graph.vega1": {
"scripts": [
"lib/d3.js",
+   "lib/d3-global.js",
"lib/topojson.js",
+   "lib/topojson-global.js",
"lib/vega1/vega.js",
"modules/graph1.js"
],
@@ -69,7 +71,9 @@
"ext.graph.vega2": {
"scripts": [
"lib/d3.js",
+   "lib/d3-global.js",
"lib/topojson.js",
+   "lib/topojson-global.js",
"lib/vega2/vega.js",
"lib/graph2.compiled.js"
],
diff --git a/lib/d3-global.js b/lib/d3-global.js
new file mode 100644
index 000..cbf642a
--- /dev/null
+++ b/lib/d3-global.js
@@ -0,0 +1,2 @@
+// Back-compat: Export module as global
+window.d3 = module.exports;
diff --git a/lib/topojson-global.js b/lib/topojson-global.js
new file mode 100644
index 000..60e9e6a
--- /dev/null
+++ b/lib/topojson-global.js
@@ -0,0 +1,2 @@
+// Back-compat: Export module as global
+window.topojson = module.exports;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6ce2f5aca3182daef07c86713534f646310223c6
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/Graph
Gerrit-Branch: master
Gerrit-Owner: Yurik 
Gerrit-Reviewer: Bartosz Dziewoński 
Gerrit-Reviewer: JGirault 
Gerrit-Reviewer: Jdlrobson 
Gerrit-Reviewer: Yurik 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Register EntityDifferStrategy builder and EntityId builder pair - change (mediawiki...WikibaseMediaInfo)

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

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

Change subject: Register EntityDifferStrategy builder and EntityId builder pair
..

Register EntityDifferStrategy builder and EntityId builder pair

Bug: T134264
Bug: T134265
Change-Id: I9679d7d05d1016a827d6a0c598bc83fff9ca6f41
---
M WikibaseMediaInfo.entitytypes.php
1 file changed, 13 insertions(+), 1 deletion(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikibaseMediaInfo 
refs/changes/57/286757/1

diff --git a/WikibaseMediaInfo.entitytypes.php 
b/WikibaseMediaInfo.entitytypes.php
index 8b0e3b6..def7fd7 100644
--- a/WikibaseMediaInfo.entitytypes.php
+++ b/WikibaseMediaInfo.entitytypes.php
@@ -19,8 +19,11 @@
 use Wikibase\LanguageFallbackChain;
 use Wikibase\MediaInfo\Content\MediaInfoContent;
 use Wikibase\MediaInfo\Content\MediaInfoHandler;
+use Wikibase\MediaInfo\DataModel\MediaInfo;
+use Wikibase\MediaInfo\DataModel\MediaInfoId;
 use Wikibase\MediaInfo\DataModel\Serialization\MediaInfoDeserializer;
 use Wikibase\MediaInfo\DataModel\Serialization\MediaInfoSerializer;
+use Wikibase\MediaInfo\DataModel\Services\Diff;
 use Wikibase\MediaInfo\View\MediaInfoView;
 use Wikibase\Repo\MediaWikiLanguageDirectionalityLookup;
 use Wikibase\Repo\WikibaseRepo;
@@ -74,6 +77,15 @@
$errorLocalizer = 
$wikibaseRepo->getValidatorErrorLocalizer(),
$wikibaseRepo->getEntityIdParser()
);
-   }
+   },
+   'entity-id-builder-pair' => [
+   MediaInfoId::PATTERN,
+   function( $serialization ) {
+   return new MediaInfoId( $serialization );
+   }
+   ],
+   'entity-differ-strategy-builder' => function() {
+   return new MediaInfoDiffer();
+   },
]
 ];

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9679d7d05d1016a827d6a0c598bc83fff9ca6f41
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikibaseMediaInfo
Gerrit-Branch: master
Gerrit-Owner: Adrian Heine 

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


[MediaWiki-commits] [Gerrit] Collect pending_tasks count metric from elasticsearch - change (operations/puppet)

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

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

Change subject: Collect pending_tasks count metric from elasticsearch
..

Collect pending_tasks count metric from elasticsearch

Bug: T134240
Change-Id: I38a0409c306e2b5682dae87ddb15f6503903e2e3
---
M modules/elasticsearch/files/monitor/wmfelastic.py
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/56/286756/1

diff --git a/modules/elasticsearch/files/monitor/wmfelastic.py 
b/modules/elasticsearch/files/monitor/wmfelastic.py
index 5c2723e..25ccef2 100644
--- a/modules/elasticsearch/files/monitor/wmfelastic.py
+++ b/modules/elasticsearch/files/monitor/wmfelastic.py
@@ -48,6 +48,7 @@
 "unassigned_shards",
 "initializing_shards",
 "relocating_shards",
+"number_of_pending_tasks",
 ]
 
 # Metrics provided at cluster level

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

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

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


[MediaWiki-commits] [Gerrit] Fix issues in metrics-by-project breakdown patterns - change (analytics/dashiki)

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

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

Change subject: Fix issues in metrics-by-project breakdown patterns
..

Fix issues in metrics-by-project breakdown patterns

Bug: T133944

Change-Id: I948ead0ce98b6a9eeff3ca31906beb838ee41725
---
M src/components/visualizers/wikimetrics/wikimetrics.js
1 file changed, 20 insertions(+), 14 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/analytics/dashiki 
refs/changes/55/286755/1

diff --git a/src/components/visualizers/wikimetrics/wikimetrics.js 
b/src/components/visualizers/wikimetrics/wikimetrics.js
index a25316f..bc72e73 100644
--- a/src/components/visualizers/wikimetrics/wikimetrics.js
+++ b/src/components/visualizers/wikimetrics/wikimetrics.js
@@ -94,21 +94,27 @@
 return visualizer.colors[i % visualizer.colors.length];
 };
 
-// The patternScale assigns patterns to the labels passed,
-// and remembers them so that they are reusable.
-// Whenever the dataset changes, resets to empty.
-this.patternScale = ko.computed(function () {
-ko.unwrap(this.datasets);
-var patternProject = [];
+// store patterns "per metric" so as not to have to re-compute
+// do not love the fact this is so stateful
+this.patternMetric = {};
 
-return function (patternLabel) {
-var i = _.indexOf(patternProject, patternLabel);
-if (i === -1) {
-i = patternProject.push(patternLabel) - 1;
-}
-return visualizer.patterns[i % visualizer.patterns.length];
-};
-}, this);
+// The patternScale assigns patterns to the labels passed,
+// and remembers them, patternLabels are going to be
+// tied to metric breakdowns ex: "mobile-web"
+this.patternScale = function (patternLabel) {
+var name = visualizer.metric().name;
+var patternMetric = visualizer.patternMetric;
+if (!patternMetric[name]) {
+patternMetric[name] = [];
+}
+var i = _.indexOf(patternMetric[name], patternLabel);
+
+if (i === -1) {
+i = patternMetric[name].push(patternLabel) - 1;
+}
+return visualizer.patterns[i % visualizer.patterns.length];
+};
+
 
 this.format = numberUtils.numberFormatter('kmb');
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I948ead0ce98b6a9eeff3ca31906beb838ee41725
Gerrit-PatchSet: 1
Gerrit-Project: analytics/dashiki
Gerrit-Branch: master
Gerrit-Owner: Nuria 

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


[MediaWiki-commits] [Gerrit] registration: Allow string value for Hooks - change (mediawiki/core)

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

Change subject: registration: Allow string value for Hooks
..


registration: Allow string value for Hooks

Instead of forcing an object even for single-hook-listeners, allow
string values, too (one hook listener for one hook, only). Also:
use it as default for the conversion script, if only one listener
is added to a hook (which is usually the case). This leads into a
much cleaner output of the Hooks section of extension.json.

Bug: T133628
Change-Id: Ie9e54f0931c41706eb8d82d00256698992ec41cc
---
M docs/extension.schema.json
M includes/registration/ExtensionProcessor.php
M maintenance/convertExtensionToRegistration.php
M tests/phpunit/includes/registration/ExtensionProcessorTest.php
4 files changed, 18 insertions(+), 5 deletions(-)

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



diff --git a/docs/extension.schema.json b/docs/extension.schema.json
old mode 100644
new mode 100755
index 3c2c057..ed3eaa9
--- a/docs/extension.schema.json
+++ b/docs/extension.schema.json
@@ -684,7 +684,7 @@
"type": "object"
},
"Hooks": {
-   "type": "object",
+   "type": [ "string", "object" ],
"description": "Hooks this extension uses (mapping of 
hook name to callback)"
},
"JobClasses": {
diff --git a/includes/registration/ExtensionProcessor.php 
b/includes/registration/ExtensionProcessor.php
old mode 100644
new mode 100755
index f977124..415e664
--- a/includes/registration/ExtensionProcessor.php
+++ b/includes/registration/ExtensionProcessor.php
@@ -209,8 +209,12 @@
protected function extractHooks( array $info ) {
if ( isset( $info['Hooks'] ) ) {
foreach ( $info['Hooks'] as $name => $value ) {
-   foreach ( (array)$value as $callback ) {
-   $this->globals['wgHooks'][$name][] = 
$callback;
+   if ( is_array( $value ) ) {
+   foreach ( $value as $callback ) {
+   
$this->globals['wgHooks'][$name][] = $callback;
+   }
+   } else {
+   $this->globals['wgHooks'][$name][] = 
$value;
}
}
}
diff --git a/maintenance/convertExtensionToRegistration.php 
b/maintenance/convertExtensionToRegistration.php
old mode 100644
new mode 100755
index 8993146..f9dd58c
--- a/maintenance/convertExtensionToRegistration.php
+++ b/maintenance/convertExtensionToRegistration.php
@@ -216,7 +216,7 @@
}
 
public function handleHooks( $realName, $value ) {
-   foreach ( $value as $hookName => $handlers ) {
+   foreach ( $value as $hookName => &$handlers ) {
foreach ( $handlers as $func ) {
if ( $func instanceof Closure ) {
$this->error( "Error: Closures cannot 
be converted to JSON. " .
@@ -230,6 +230,9 @@
);
}
}
+   if ( count( $handlers ) === 1 ) {
+   $handlers = $handlers[0];
+   }
}
$this->json[$realName] = $value;
}
diff --git a/tests/phpunit/includes/registration/ExtensionProcessorTest.php 
b/tests/phpunit/includes/registration/ExtensionProcessorTest.php
index 27c0c60..0120d79 100644
--- a/tests/phpunit/includes/registration/ExtensionProcessorTest.php
+++ b/tests/phpunit/includes/registration/ExtensionProcessorTest.php
@@ -50,7 +50,7 @@
self::$default,
$merge,
],
-   // No current hooks, adding one for "FooBaz"
+   // No current hooks, adding one for "FooBaz" in string 
format
[
[],
[ 'Hooks' => [ 'FooBaz' => 'FooBazCallback' ] ] 
+ self::$default,
@@ -62,6 +62,12 @@
[ 'Hooks' => [ 'FooBaz' => 'FooBazCallback' ] ] 
+ self::$default,
[ 'FooBaz' => [ 'PriorCallback', 
'FooBazCallback' ] ] + $merge,
],
+   // No current hooks, adding one for "FooBaz" in verbose 
array format
+   [
+   [],
+   [ 'Hooks' => [ 'FooBaz' => [ 'FooBazCallback' ] 
] ] + self::$default,
+   [ 'FooBaz' => [ 'FooBazCallback' ] ] + $merge,
+  

[MediaWiki-commits] [Gerrit] Correct error message for missing permission to get patrol i... - change (mediawiki/core)

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

Change subject: Correct error message for missing permission to get patrol 
information
..


Correct error message for missing permission to get patrol information

Patrolmarks permission is enough to request patrol information, as it's coded
in useRCPatrol() and useNPPatrol().

Change-Id: I4115bdbbcaf6764d71784efe2d8ac63cc77ce770
---
M includes/api/ApiQueryRecentChanges.php
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/includes/api/ApiQueryRecentChanges.php 
b/includes/api/ApiQueryRecentChanges.php
index 74c2214..f0fd2f4 100644
--- a/includes/api/ApiQueryRecentChanges.php
+++ b/includes/api/ApiQueryRecentChanges.php
@@ -206,7 +206,7 @@
) {
if ( !$user->useRCPatrol() && 
!$user->useNPPatrol() ) {
$this->dieUsage(
-   'You need the patrol right to 
request the patrolled flag',
+   'You need patrol or patrolmarks 
permission to request the patrolled flag',
'permissiondenied'
);
}
@@ -277,7 +277,7 @@
 
if ( $this->fld_patrolled && !$user->useRCPatrol() && 
!$user->useNPPatrol() ) {
$this->dieUsage(
-   'You need the patrol right to request 
the patrolled flag',
+   'You need patrol or patrolmarks 
permission to request the patrolled flag',
'permissiondenied'
);
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4115bdbbcaf6764d71784efe2d8ac63cc77ce770
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: MGChecker 
Gerrit-Reviewer: Anomie 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: Luke081515 
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 beta-specific access.conf exceptions in scap::target - change (operations/puppet)

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

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

Change subject: Add beta-specific access.conf exceptions in scap::target
..

Add beta-specific access.conf exceptions in scap::target

Explicitly allow scap-managed users to log in to targets from the
deployment host. refs T121721

Bug: T121721
Change-Id: I3a5b08b0a9c31d8984aac503d8e94fdab00a75cf
---
M hieradata/labs/deployment-prep/common.yaml
M modules/beta/manifests/deployaccess.pp
M modules/scap/manifests/target.pp
3 files changed, 15 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/54/286754/1

diff --git a/hieradata/labs/deployment-prep/common.yaml 
b/hieradata/labs/deployment-prep/common.yaml
index 582f22d..e41d43b 100644
--- a/hieradata/labs/deployment-prep/common.yaml
+++ b/hieradata/labs/deployment-prep/common.yaml
@@ -162,6 +162,7 @@
 "role::url_downloader::url_downloader_ip": 10.68.16.135
 "zotero::http_proxy": 
deployment-urldownloader.deployment-prep.eqiad.wmflabs:8080
 "trebuchet::deployment_server": deployment-tin.deployment-prep.eqiad.wmflabs
+"scap::deployment_server": deployment-tin.deployment-prep.eqiad.wmflabs
 "scap::dsh::group_source": 'puppet:///modules/beta/dsh/group'
 "mediawiki::users::mwdeploy_pub_key": 'ssh-rsa 
B3NzaC1yc2EDAQABAAABAQDFwlmBBBJAr1GI+vuYjFh5vq0YIVa5fqE5DZdpzUZISlQ0Kt+9bIr2qNHIj+Jl5Bc6ZY1mkh8l693tAHVx+8tayoiFWYNs9IVsxR+iHgOOhAdDIBXaHaUattdiye5bQmdvJVXaVegckNX2gbmUCOc09jvZvlk3blKFTSEpZRU8dmpXQzKdZgaAq2VTajAegoFnuN9FbC7hzBPA+1NxFNKn94eIeFPSlo5rWr44OEb5Uy3O0B5c6WPM+IgfiygetP+yGL4cKv7qEjZ0Sxok/Rh1lBh1vP1YQ/Mc6tMV0s+kOv7Wz+P88bfU1/uWvy479OZdfh3NQqDTrLzqHwVW1vef
 root@deployment-salt'
 # NOTE: these elasticsearch settings will need to be overloaded on a per-host
diff --git a/modules/beta/manifests/deployaccess.pp 
b/modules/beta/manifests/deployaccess.pp
index 5bcb949..6e56469 100644
--- a/modules/beta/manifests/deployaccess.pp
+++ b/modules/beta/manifests/deployaccess.pp
@@ -9,10 +9,4 @@
 priority => 50,
 }
 
-# Allow eventlogging user to deploy.
-security::access::config { 'beta-allow-eventlogging':
-content  => "+ : eventlogging : ${bastion_ip}\n",
-priority => 51,
-}
-
 }
diff --git a/modules/scap/manifests/target.pp b/modules/scap/manifests/target.pp
index 0b5cfa8..aa7a301 100644
--- a/modules/scap/manifests/target.pp
+++ b/modules/scap/manifests/target.pp
@@ -77,6 +77,20 @@
 User[$deploy_user] -> Scap::Target[$title]
 }
 
+if $::realm == 'labs' {
+if !defined(Security::Access::Config["beta-allow-${deploy_user}"]) {
+# Allow $deploy_user login from scap deployment host.
+# adds an exception in /etc/security/access.conf
+# to work around labs-specific restrictions
+$deployment_host = hiera('scap::deployment_server')
+$deployment_ip = ipresolve($deployment_host)
+security::access::config { "beta-allow-${deploy_user}":
+content  => "+ : ${deploy_user} : ${deployment_ip}\n",
+priority => 60,
+}
+}
+}
+
 package { $package_name:
 install_options => [{
   owner => $deploy_user}],

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3a5b08b0a9c31d8984aac503d8e94fdab00a75cf
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: 20after4 

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


[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: 2bd7117..e59a008 - change (mediawiki/extensions)

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

Change subject: Syncronize VisualEditor: 2bd7117..e59a008
..


Syncronize VisualEditor: 2bd7117..e59a008

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

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



diff --git a/VisualEditor b/VisualEditor
index 2bd7117..e59a008 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit 2bd7117f89b80260ff027a6c460c6377d1a9
+Subproject commit e59a008a1e8a91840afa57ff02104fccd81e7ba2

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

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

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


[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: 2bd7117..e59a008 - change (mediawiki/extensions)

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

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

Change subject: Syncronize VisualEditor: 2bd7117..e59a008
..

Syncronize VisualEditor: 2bd7117..e59a008

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


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

diff --git a/VisualEditor b/VisualEditor
index 2bd7117..e59a008 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit 2bd7117f89b80260ff027a6c460c6377d1a9
+Subproject commit e59a008a1e8a91840afa57ff02104fccd81e7ba2

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

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

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


[MediaWiki-commits] [Gerrit] Script for generating a list of human-readable project names - change (mediawiki...WikimediaMaintenance)

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

Change subject: Script for generating a list of human-readable project names
..


Script for generating a list of human-readable project names

It generates both en.json and and qqq.json files to a specified
directory.  This is intended to feed into WikimediaMessages.

See If07983030e18141d2047da2de02b5b3a5f7057a5

Bug: T121936
Change-Id: I0baa4916d2fabf19242b68ebce487f50a24041f6
Co-Author: Moriel Schottlender 
Co-Author: Matthew Flaschen 
---
A createHumanReadableProjectNameFiles.php
1 file changed, 219 insertions(+), 0 deletions(-)

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



diff --git a/createHumanReadableProjectNameFiles.php 
b/createHumanReadableProjectNameFiles.php
new file mode 100644
index 000..a017797
--- /dev/null
+++ b/createHumanReadableProjectNameFiles.php
@@ -0,0 +1,219 @@
+mDescription = 'Builds i18n files for translating names 
of Wikimedia projects';
+
+   $this->addOption( 'directory', 'Output directory where files 
should be created', true, true );
+   }
+
+   /**
+* Gets actual language code (not necessarily the same as subdomain, 
even if there is
+* a language subdomain)
+*
+* @param string $projURL URL of root of domain (e.g. 
https://en.wikipedia.org)
+* @return Language code, or null on failure
+*/
+   private function getLanguageCode( $projURL ) {
+   $url = 
"$projURL/w/api.php?action=query=siteinfo=json";
+   $responseText = Http::get( $url );
+   $response = FormatJson::decode( $responseText, true );
+   if ( isset( $response['query']['general']['lang'] ) ) {
+   return $response['query']['general']['lang'];
+   } else {
+   return null;
+   }
+   }
+
+   private function createQQQ( $projName, $projURL ) {
+   $languageCode = $this->getLanguageCode( $projURL );
+
+   return 
"{{ProjectNameDocumentation|url=$projURL|name=$projName|language=$languageCode}}";
+   }
+
+   public function execute() {
+   $outEn = array();
+   $outQqq = array();
+   $counter = 0;
+   $info = $this->getSitematrixFromAPI();
+   $languages = LanguageNames::getNames( 'en' );
+
+   // Wikis that have messages in WikimediaMessages
+   $messageMatrix = array(
+   // code => project name
+   "wiki" => wfMessage( "wikibase-otherprojects-wikipedia" 
)->text(),
+   "wiktionary" => "Wiktionary", // No message for this!?
+   "wikibooks" => wfMessage( 
"wikibase-otherprojects-wikibooks" )->text(),
+   "wikiquote" => wfMessage( 
"wikibase-otherprojects-wikiquote" )->text(),
+   "wikinews" => wfMessage( 
"wikibase-otherprojects-wikinews" )->text(),
+   "wikisource" => wfMessage( 
"wikibase-sitelinks-wikisource" )->text(),
+   "wikiversity" => "Wikiversity", // No message for this, 
either!
+   "wikivoyage" => wfMessage( 
"wikibase-otherprojects-wikivoyage" )->text(),
+   );
+
+   $failedLangWikis = array(
+   "azbwiki" => "South Azerbaijani Wikipedia",
+   "be_x_oldwiki" => "Belarusian (Taraškievica) Wikipedia",
+   "bhwiki" => "Bihari Wikipedia",
+   "bhwiktionary" => "Bihari Wiktionary",
+   "bxrwiki" => "Buryat Wikipedia",
+   "lbewiki" => "Laki Wikipedia",
+   "mowiki" => "Moldovan Wikipedia",
+   "mowiktionary" => "Moldovan Wiktionary",
+   "roa_tarawiki" => "Tarandíne Wikipedia",
+   "zh_min_nanwiki" => "Min Nan Wikipedia",
+   "zh_min_nanwiktionary" => "Min Nan Wiktionary",
+   "zh_min_nanwikibooks" => "Min Nan Wikibooks",
+   "zh_min_nanwikiquote" => "Min Nan Wikiquote",
+   "zh_min_nanwikisource" => "Min Nan Wikisource",
+   );
+
+
+   // SPECIAL WIKIS
+   $exceptions = array(
+   // code => full message
+   "arbcom-de" => "German Wikipedia Arbitration Committee",
+   "arbcom-en" => "English Wikipedia Arbitration 
Committee",
+   "arbcom-fi" => "Finnish Wikipedia Arbitration 
Committee",
+   "arbcom-nl" => "Dutch Wikipedia Arbitration Committee",
+   "betawikiversity" => "Wikiversity Beta",
+   "commons" => wfMessage( 
"wikibase-otherprojects-commons" 

[MediaWiki-commits] [Gerrit] configureHightingForSource expects an options field - change (mediawiki...CirrusSearch)

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

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

Change subject: configureHightingForSource expects an options field
..

configureHightingForSource expects an options field

When running without the experimental highlighter we end up raising an
undefined index warning because this options key only gets set in the
branch that deals with the experimental highlighter. This key is not
supported by the fvh, so don't provide it.

Add's some basic unit tests to ensure the config didn't change, beyond
stripping the options key, due to this adjustment. Also add's an
exception when trying to use highlight regex with fvh. This was already
unsupported, it just errored out in less obvious ways.

Change-Id: I26d6419341bec5d11a318bc50c07e18e57c7af1e
---
M includes/Search/ResultsType.php
A tests/unit/Search/ResultsTypeTest.php
2 files changed, 302 insertions(+), 37 deletions(-)


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

diff --git a/includes/Search/ResultsType.php b/includes/Search/ResultsType.php
index 05dd22c..43f6f0a 100644
--- a/includes/Search/ResultsType.php
+++ b/includes/Search/ResultsType.php
@@ -377,33 +377,65 @@
'post_tags' => array( Searcher::HIGHLIGHT_POST ),
'fields' => array(),
);
+   $experimental = array();
+
if ( count( $highlightSource ) ) {
+   if ( $wgCirrusSearchUseExperimentalHighlighter ) {
+   throw new \RuntimeException( 'regex is only 
supported with $wgCirrusSearchUseExperimentalHighlighter = true' );
+   }
$config[ 'fields' ][ 'source_text.plain' ] = $text;
-   $this->configureHighlightingForSource( $config, 
$highlightSource );
-   return $config;
+   $this->configureHighlightingForSource( $config, 
$experimental, $highlightSource );
+   } else {
+   if ( $this->highlightingConfig & self::HIGHLIGHT_TITLE 
) {
+   $config[ 'fields' ][ 'title' ] = $entireValue;
+   }
+   if ( $this->highlightingConfig & 
self::HIGHLIGHT_ALT_TITLE ) {
+   $config[ 'fields' ][ 'redirect.title' ] = 
$redirectAndHeading;
+   $experimental[ 'fields' ][ 'redirect.title' ][ 
'options' ][ 'skip_if_last_matched' ] = true;
+   $config[ 'fields' ][ 'category' ] = 
$redirectAndHeading;
+   $experimental[ 'fields' ][ 'category' ][ 
'options' ][ 'skip_if_last_matched' ] = true;
+   $config[ 'fields' ][ 'heading' ] = 
$redirectAndHeading;
+   $experimental[ 'fields' ][ 'heading' ][ 
'options' ][ 'skip_if_last_matched' ] = true;
+   }
+   if ( $this->highlightingConfig & 
self::HIGHLIGHT_SNIPPET ) {
+   $config[ 'fields' ][ 'text' ] = $text;
+   $config[ 'fields' ][ 'auxiliary_text' ] = 
$remainingText;
+   $experimental[ 'fields' ][ 'auxiliary_text' ][ 
'options' ][ 'skip_if_last_matched' ] = true;
+   if ( $this->highlightingConfig & 
self::HIGHLIGHT_FILE_TEXT ) {
+   $config[ 'fields' ][ 'file_text' ] = 
$remainingText;
+   $experimental[ 'fields' ][ 'file_text' 
][ 'options' ][ 'skip_if_last_matched' ] = true;
+   }
+   }
+   $config[ 'fields' ] = $this->addMatchedFields( $config[ 
'fields' ] );
}
-   if ( $this->highlightingConfig & self::HIGHLIGHT_TITLE ) {
-   $config[ 'fields' ][ 'title' ] = $entireValue;
+
+   if ( $wgCirrusSearchUseExperimentalHighlighter ) {
+   $config = $this->arrayMergeRecursive( $config, 
$experimental );
}
-   if ( $this->highlightingConfig & self::HIGHLIGHT_ALT_TITLE ) {
-   $config[ 'fields' ][ 'redirect.title' ] = 
$redirectAndHeading;
-   $config[ 'fields' ][ 'redirect.title' ][ 'options' ][ 
'skip_if_last_matched' ] = true;
-   $config[ 'fields' ][ 'category' ] = $redirectAndHeading;
-   $config[ 'fields' ][ 'category' ][ 'options' ][ 
'skip_if_last_matched' ] = true;
-   $config[ 'fields' ][ 'heading' ] = $redirectAndHeading;
-   $config[ 'fields' ][ 'heading' ][ 'options' ][ 
'skip_if_last_matched' ] = true;
-   }
-   if ( $this->highlightingConfig & self::HIGHLIGHT_SNIPPET ) {

[MediaWiki-commits] [Gerrit] Print CSS: Avoid page breaks inside and - change (mediawiki/core)

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

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

Change subject: Print CSS: Avoid page breaks inside  and 
..

Print CSS: Avoid page breaks inside  and 

Change-Id: Iee0932286135ea25a7f47fb2e6ddb6e6d669fa7a
---
M resources/src/mediawiki.legacy/commonPrint.css
1 file changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/21/286721/1

diff --git a/resources/src/mediawiki.legacy/commonPrint.css 
b/resources/src/mediawiki.legacy/commonPrint.css
index 975ec2a..331be90 100644
--- a/resources/src/mediawiki.legacy/commonPrint.css
+++ b/resources/src/mediawiki.legacy/commonPrint.css
@@ -84,6 +84,8 @@
 }
 
 img,
+figure,
+table,
 .wikitable,
 .thumb {
/* Pagination */

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

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

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


[MediaWiki-commits] [Gerrit] Fix Undefined variable: namespaces in includes/search/Search... - change (mediawiki/core)

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

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

Change subject: Fix Undefined variable: namespaces in 
includes/search/SearchEngineConfig.php on line 109
..

Fix Undefined variable: namespaces in includes/search/SearchEngineConfig.php on 
line 109

Bug: T134305
Change-Id: I220886e12a6d083ac34a8a75bc77871e89dbf747
(cherry picked from commit 257c023666d2dd2c37b0752f5e1f4ff0325a03c4)
---
M includes/search/SearchEngine.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/20/286720/1

diff --git a/includes/search/SearchEngine.php b/includes/search/SearchEngine.php
index 27b6dd4..dcef95c 100644
--- a/includes/search/SearchEngine.php
+++ b/includes/search/SearchEngine.php
@@ -607,7 +607,7 @@
 * @return array
 */
public static function namespacesAsText( $namespaces ) {
-   return 
MediaWikiServices::getInstance()->getSearchEngineConfig()->namespacesAsText();
+   return 
MediaWikiServices::getInstance()->getSearchEngineConfig()->namespacesAsText( 
$namespaces );
}
 
/**

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I220886e12a6d083ac34a8a75bc77871e89dbf747
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.27.0-wmf.23
Gerrit-Owner: DCausse 

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


[MediaWiki-commits] [Gerrit] Fix Undefined variable: namespaces in includes/search/Search... - change (mediawiki/core)

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

Change subject: Fix Undefined variable: namespaces in 
includes/search/SearchEngineConfig.php on line 109
..


Fix Undefined variable: namespaces in includes/search/SearchEngineConfig.php on 
line 109

Bug: T134305
Change-Id: I220886e12a6d083ac34a8a75bc77871e89dbf747
---
M includes/search/SearchEngine.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/includes/search/SearchEngine.php b/includes/search/SearchEngine.php
index 27b6dd4..dcef95c 100644
--- a/includes/search/SearchEngine.php
+++ b/includes/search/SearchEngine.php
@@ -607,7 +607,7 @@
 * @return array
 */
public static function namespacesAsText( $namespaces ) {
-   return 
MediaWikiServices::getInstance()->getSearchEngineConfig()->namespacesAsText();
+   return 
MediaWikiServices::getInstance()->getSearchEngineConfig()->namespacesAsText( 
$namespaces );
}
 
/**

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I220886e12a6d083ac34a8a75bc77871e89dbf747
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: DCausse 
Gerrit-Reviewer: DCausse 
Gerrit-Reviewer: EBernhardson 
Gerrit-Reviewer: Smalyshev 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Introduce possibility to add triples - change (wikidata...gui)

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

Change subject: Introduce possibility to add triples
..


Introduce possibility to add triples

Bug: T133660
Bug: T133316
Change-Id: I79d8d1b82e78cdc32e182795efbe21d757b357ce
---
M index.html
M style.css
M wikibase/queryService/RdfNamespaces.js
M wikibase/queryService/ui/App.js
M wikibase/queryService/ui/visualEditor/SelectorBox.js
M wikibase/queryService/ui/visualEditor/SparqlQuery.js
M wikibase/queryService/ui/visualEditor/VisualEditor.js
M wikibase/tests/queryService/ui/visualEditor/SparqlQuery.test.js
M wikibase/tests/queryService/ui/visualEditor/VisualEditor.test.js
9 files changed, 458 insertions(+), 203 deletions(-)

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



diff --git a/index.html b/index.html
index e783ac5..8373f9a 100644
--- a/index.html
+++ b/index.html
@@ -137,7 +137,7 @@



-   Query explanation 
+   



diff --git a/style.css b/style.css
index e58aee1..33f7c4f 100644
--- a/style.css
+++ b/style.css
@@ -378,6 +378,10 @@
 background: rgba(255,255,255,0.9);
 }
 
+.visual-editor .panel-body {
+   font-size: 120%;
+}
+
 .select2-container {
z-index: 2000;
min-width: 200px;
@@ -387,7 +391,7 @@
 }
 
 .visual-editor .spacer {
-   min-height: 0.5em;
+   min-height: 0.8em;
 }
 
 /*
diff --git a/wikibase/queryService/RdfNamespaces.js 
b/wikibase/queryService/RdfNamespaces.js
index 7fbe5a3..b10bdc1 100644
--- a/wikibase/queryService/RdfNamespaces.js
+++ b/wikibase/queryService/RdfNamespaces.js
@@ -62,13 +62,16 @@
return $.extend( p, v );
}, {} );
 
-   RdfNamespaces.STANDARD_PREFIXES = [ 'PREFIX wd: 
',
-   'PREFIX wdt: ',
-   'PREFIX wikibase: ',
-   'PREFIX p: ',
-   'PREFIX ps: ',
-   'PREFIX pq: ',
-   'PREFIX rdfs: ' 
];
+   RdfNamespaces.STANDARD_PREFIXES = {
+   wd: 'PREFIX wd: ',
+   wdt: 'PREFIX wdt: ',
+   wikibase: 'PREFIX wikibase: ',
+   p: 'PREFIX p: ',
+   ps: 'PREFIX ps: ',
+   pq: 'PREFIX pq: ',
+   rdfs: 'PREFIX rdfs: ',
+   bd: 'PREFIX bd: '
+   };
 
RdfNamespaces.getPrefixMap = function ( entityTypes ) {
var prefixes = {};
diff --git a/wikibase/queryService/ui/App.js b/wikibase/queryService/ui/App.js
index 2cc3f52..8d5579d 100644
--- a/wikibase/queryService/ui/App.js
+++ b/wikibase/queryService/ui/App.js
@@ -291,7 +291,10 @@
$.proxy( this._handleNamespaceSelected, this ) 
);
 
$( '.addPrefixes' ).click( function() {
-   var prefixes = 
wikibase.queryService.RdfNamespaces.STANDARD_PREFIXES.join( '\n' );
+   var standardPrefixes = 
wikibase.queryService.RdfNamespaces.STANDARD_PREFIXES;
+   var prefixes = Object.keys( standardPrefixes ).map( 
function( x ) {
+   return standardPrefixes[x];
+   } ).join( '\n' );
self._editor.prepandValue( prefixes + '\n\n' );
} );
 
diff --git a/wikibase/queryService/ui/visualEditor/SelectorBox.js 
b/wikibase/queryService/ui/visualEditor/SelectorBox.js
index 66bf9ab..b70feb6 100644
--- a/wikibase/queryService/ui/visualEditor/SelectorBox.js
+++ b/wikibase/queryService/ui/visualEditor/SelectorBox.js
@@ -36,20 +36,22 @@
 *
 * @param {jQuery} $element
 * @param {Function} listener a function called when value selected
+* @param {Object} toolbar {icon:callback}
 */
-   SELF.prototype.add = function( $element, listener ) {
-   this._create( $element, listener );
+   SELF.prototype.add = function( $element, listener, toolbar ) {
+   this._create( $element, listener, toolbar );
};
 
/**
 * @private

[MediaWiki-commits] [Gerrit] WIP QueueConsumer for AtomicReadBuffers - change (wikimedia...SmashPig)

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

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

Change subject: WIP QueueConsumer for AtomicReadBuffers
..

WIP QueueConsumer for AtomicReadBuffers

TODO: tests, maybe some default option merging

Change-Id: I6efdac1a912f31b20c6a39da9f613899fb05e0c6
---
M Core/Configuration.php
A Core/DataStores/QueueConsumer.php
2 files changed, 68 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/SmashPig 
refs/changes/18/286718/1

diff --git a/Core/Configuration.php b/Core/Configuration.php
index 4786dad..75ab0fd 100644
--- a/Core/Configuration.php
+++ b/Core/Configuration.php
@@ -258,7 +258,7 @@
/**
 * Determine if a given configuration node exists in the loaded 
configuration.
 *
-* @param $node Node path; ie: logging/logstreams/syslog/class
+* @param string $node Node path; ie: logging/logstreams/syslog/class
 *
 * @return bool True if the node exists
 */
diff --git a/Core/DataStores/QueueConsumer.php 
b/Core/DataStores/QueueConsumer.php
new file mode 100644
index 000..2d8b53b
--- /dev/null
+++ b/Core/DataStores/QueueConsumer.php
@@ -0,0 +1,67 @@
+getConfiguration();
+   $this->backend = $config->object(
+   "data-stores/queues/$queueName", true
+   );
+   if ( !$this->backend instanceof AtomicReadBuffer ) {
+   throw new RuntimeException( "Queue $queueName is not an 
AtomicReadBuffer" );
+   }
+   $this->timeLimit = $timeLimit;
+   $this->messageLimit = $messageLimit;
+   }
+
+   /**
+* Dequeue and process messages until time limit or message limit is
+* reached, or till queue is empty. Using an @see AtomicReadBuffer
+* implementation for the backend means that if the processing function
+* throws an exception, the message will remain on the queue.
+*
+* @param callable $callback processing function taking message array
+* @return int number of messages processed
+*/
+   public function dequeueMessages( $callback ) {
+   $startTime = time();
+   $processed = 0;
+   do {
+   $data = $this->backend->popAtomic( $callback );
+   if ( $data !== null ) {
+   $processed++;
+   }
+   $timeOk = $this->timeLimit === 0 || time() <= 
$startTime + $this->timeLimit;
+   $countOk = $this->messageLimit === 0 || $processed <= 
$this->messageLimit;
+   }
+   while( $timeOk && $countOk && $data !== null );
+   return $processed;
+   }
+
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6efdac1a912f31b20c6a39da9f613899fb05e0c6
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/SmashPig
Gerrit-Branch: master
Gerrit-Owner: Ejegg 

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


[MediaWiki-commits] [Gerrit] Convert Special:Lockdb and Special:Unlockdb to OOUI - change (mediawiki/core)

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

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

Change subject: Convert Special:Lockdb and Special:Unlockdb to OOUI
..

Convert Special:Lockdb and Special:Unlockdb to OOUI

Bug: T134308
Change-Id: Ie5bdba62fa8e39f44522c39cc6b6d3649aec8141
---
M includes/specials/SpecialLockdb.php
M includes/specials/SpecialUnlockdb.php
2 files changed, 14 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/17/286717/1

diff --git a/includes/specials/SpecialLockdb.php 
b/includes/specials/SpecialLockdb.php
index a229fa3..cb7eb36 100644
--- a/includes/specials/SpecialLockdb.php
+++ b/includes/specials/SpecialLockdb.php
@@ -65,9 +65,9 @@
}
 
protected function alterForm( HTMLForm $form ) {
-   $form->setWrapperLegend( false );
-   $form->setHeaderText( $this->msg( 'lockdbtext' 
)->parseAsBlock() );
-   $form->setSubmitTextMsg( 'lockbtn' );
+   $form->setWrapperLegend( false )
+   ->setHeaderText( $this->msg( 'lockdbtext' 
)->parseAsBlock() )
+   ->setSubmitTextMsg( 'lockbtn' );
}
 
public function onSubmit( array $data ) {
@@ -105,6 +105,10 @@
$out->addWikiMsg( 'lockdbsuccesstext' );
}
 
+   protected function getDisplayFormat() {
+   return 'ooui';
+   }
+
protected function getGroupName() {
return 'wiki';
}
diff --git a/includes/specials/SpecialUnlockdb.php 
b/includes/specials/SpecialUnlockdb.php
index 9214c23..474c3af 100644
--- a/includes/specials/SpecialUnlockdb.php
+++ b/includes/specials/SpecialUnlockdb.php
@@ -58,9 +58,9 @@
}
 
protected function alterForm( HTMLForm $form ) {
-   $form->setWrapperLegend( false );
-   $form->setHeaderText( $this->msg( 'unlockdbtext' 
)->parseAsBlock() );
-   $form->setSubmitTextMsg( 'unlockbtn' );
+   $form->setWrapperLegend( false )
+   ->setHeaderText( $this->msg( 'unlockdbtext' 
)->parseAsBlock() )
+   ->setSubmitTextMsg( 'unlockbtn' );
}
 
public function onSubmit( array $data ) {
@@ -86,6 +86,10 @@
$out->addWikiMsg( 'unlockdbsuccesstext' );
}
 
+   protected function getDisplayFormat() {
+   return 'ooui';
+   }
+
protected function getGroupName() {
return 'wiki';
}

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

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

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


[MediaWiki-commits] [Gerrit] Give token param a WMF namespace - change (mediawiki...DonationInterface)

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

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

Change subject: Give token param a WMF namespace
..

Give token param a WMF namespace

This makes it possible to receive "token" params from the processors.

Bug: T131811
Change-Id: I1c464e128286a48915a749ff24d5a89efe3f6d09
---
M adyen_gateway/forms/js/adyen.js
M amazon_gateway/amazon.api.php
M amazon_gateway/amazon.js
M amazon_gateway/i18n/en.json
M amazon_gateway/i18n/qqq.json
M gateway_common/DonationData.php
M gateway_common/gateway.adapter.php
M gateway_forms/RapidHtml.php
M gateway_forms/mustache/index.html.mustache
M globalcollect_gateway/forms/html/bt/bt.html
M globalcollect_gateway/forms/html/cash/boletos.html
M globalcollect_gateway/forms/html/cc/cc-a.html
M globalcollect_gateway/forms/html/cc/cc-jvma.html
M globalcollect_gateway/forms/html/cc/cc-vjma.html
M globalcollect_gateway/forms/html/cc/cc-vm.html
M globalcollect_gateway/forms/html/cc/cc-vma.html
M globalcollect_gateway/forms/html/cc/cc-vmad.html
M globalcollect_gateway/forms/html/cc/cc-vmaj.html
M globalcollect_gateway/forms/html/cc/cc-vmd.html
M globalcollect_gateway/forms/html/cc/cc-vmj.html
M globalcollect_gateway/forms/html/cc/cc.html
M globalcollect_gateway/forms/html/dd/dd-recurring.html
M globalcollect_gateway/forms/html/dd/dd.html
M globalcollect_gateway/forms/html/ew/ew-alipay.html
M globalcollect_gateway/forms/html/ew/ew-webmoney.html
M globalcollect_gateway/forms/html/ew/ew-yandex.html
M globalcollect_gateway/forms/html/obt/obt-bpay.html
M globalcollect_gateway/forms/html/rcc/rcc-vm.html
M globalcollect_gateway/forms/html/rcc/rcc-vma.html
M globalcollect_gateway/forms/html/rcc/rcc-vmad.html
M globalcollect_gateway/forms/html/rcc/rcc-vmaj.html
M globalcollect_gateway/forms/html/rcc/rcc-vmd.html
M globalcollect_gateway/forms/html/rcc/rcc-vmj.html
M globalcollect_gateway/forms/html/rcc/rcc.html
M globalcollect_gateway/forms/html/rtbt/rtbt-enets.html
M globalcollect_gateway/forms/html/rtbt/rtbt-eps.html
M globalcollect_gateway/forms/html/rtbt/rtbt-ideal-noadd.html
M globalcollect_gateway/forms/html/rtbt/rtbt-ideal.html
M globalcollect_gateway/forms/html/rtbt/rtbt-sofo-GB.html
M globalcollect_gateway/forms/html/rtbt/rtbt-sofo.html
M globalcollect_gateway/forms/html/webitects2nd-AU.html
M globalcollect_gateway/forms/html/webitects2nd-US.html
M globalcollect_gateway/forms/html/webitects2nd-amex.html
M globalcollect_gateway/forms/html/webitects2nd.html
M globalcollect_gateway/forms/html/webitects2nd_green-US.html
M globalcollect_gateway/forms/html/webitects_2_3step-CA.html
M globalcollect_gateway/forms/html/webitects_2_3step.html
M globalcollect_gateway/forms/html/webitects_2_3stepB-US.html
M paypal_gateway/forms/html/paypal-recurring.html
M paypal_gateway/forms/html/paypal.html
M tests/DonationDataTest.php
M worldpay_gateway/WorldpayReturnto.php
M worldpay_gateway/forms/html/worldpay-dd-test.html
M worldpay_gateway/forms/html/worldpay-test.html
M worldpay_gateway/forms/html/worldpay.html
M worldpay_gateway/forms/js/esop.js
M worldpay_gateway/forms/js/worldpay.js
M worldpay_gateway/i18n/en.json
M worldpay_gateway/i18n/qqq.json
M worldpay_gateway/worldpay.api.php
60 files changed, 69 insertions(+), 69 deletions(-)


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

diff --git a/adyen_gateway/forms/js/adyen.js b/adyen_gateway/forms/js/adyen.js
index 78513dc..ea18592 100644
--- a/adyen_gateway/forms/js/adyen.js
+++ b/adyen_gateway/forms/js/adyen.js
@@ -35,7 +35,7 @@
utm_medium: $( '#utm_medium' ).val(),
referrer: $( '#referrer' ).val(),
recurring: $( '#recurring' ).val(),
-   token: $( '#token' ).val(),
+   wmf_token: $( '#wmf_token' ).val(),
format: 'json'
};
 
diff --git a/amazon_gateway/amazon.api.php b/amazon_gateway/amazon.api.php
index 4fdd87e..6fcd7b8 100644
--- a/amazon_gateway/amazon.api.php
+++ b/amazon_gateway/amazon.api.php
@@ -7,20 +7,20 @@
'currency_code',
'orderReferenceId',
'recurring',
-   'token',
+   'wmf_token',
);
 
public function execute() {
$output = $this->getResult();
$recurring = $this->getParameter( 'recurring');
-   $token = $this->getParameter( 'token' );
+   $token = $this->getParameter( 'wmf_token' );
$adapterParams = array(
'api_request' => true,
'external_data' => array(
'amount' => $this->getParameter( 'amount' ),
'currency_code' => $this->getParameter( 
'currency_code' ),
'recurring' => $recurring,
-   'token' => $token,
+   'wmf_token' => 

[MediaWiki-commits] [Gerrit] WIP: Log clicks on interlanguage links - change (mediawiki...UniversalLanguageSelector)

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

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

Change subject: WIP: Log clicks on interlanguage links
..

WIP: Log clicks on interlanguage links

DO NOT MERGE, WORK IN PROGRESS, BARELY TESTED

Bug: T132425
Change-Id: I7e83d2d11bb597f438d5836558a4146c2c207533
---
M resources/js/ext.uls.eventlogger.js
M resources/js/ext.uls.interface.js
2 files changed, 22 insertions(+), 0 deletions(-)


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

diff --git a/resources/js/ext.uls.eventlogger.js 
b/resources/js/ext.uls.eventlogger.js
index 262852b..7909b87 100644
--- a/resources/js/ext.uls.eventlogger.js
+++ b/resources/js/ext.uls.eventlogger.js
@@ -85,6 +85,7 @@
mw.hook( 'mw.uls.ime.morelanguages' ).add( $.proxy( 
this.imeMoreLanguages, this ) );
mw.hook( 'mw.uls.interface.morelanguages' ).add( 
$.proxy( this.interfaceMoreLanguages, this ) );
mw.hook( 'mw.uls.interface.language.change' ).add( 
$.proxy( this.interfaceLanguageChange, this ) );
+   mw.hook( 'mw.uls.content.language.change' ).add( 
$.proxy( this.contentLanguageChange, this ) );
mw.hook( 'mw.uls.font.change' ).add( $.proxy( 
this.fontChange, this ) );
mw.hook( 'mw.uls.webfonts.enable' ).add( $.proxy( 
this.enableWebfonts, this ) );
mw.hook( 'mw.uls.webfonts.disable' ).add( $.proxy( 
this.disableWebfonts, this ) );
@@ -181,6 +182,21 @@
},
 
/**
+* Log content language change
+*
+* @param {string} language language code
+*/
+   contentLanguageChange: function ( language ) {
+   var logParams = {
+   action: 'language-change',
+   context: 'content',
+   contentLanguage: language
+   };
+
+   this.log( logParams );
+   },
+
+   /**
 * More languages in display settings is clicked
 */
interfaceMoreLanguages: function () {
diff --git a/resources/js/ext.uls.interface.js 
b/resources/js/ext.uls.interface.js
index db6e662..3312ec9 100644
--- a/resources/js/ext.uls.interface.js
+++ b/resources/js/ext.uls.interface.js
@@ -502,6 +502,12 @@
mw.ime.handleFocus( $input );
} );
} );
+
+   $( '#-plang .interlanguage-link' ).on( 'click', function () {
+   mw.hook( 'mw.uls.content.language.change' ).fire(
+   $( this ).find( 'a' ).attr( 'lang' )
+   );
+   } );
}
 
$( document ).ready( function () {

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

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

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


[MediaWiki-commits] [Gerrit] Fix Undefined variable: namespaces in includes/search/Search... - change (mediawiki/core)

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

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

Change subject: Fix Undefined variable: namespaces in 
includes/search/SearchEngineConfig.php on line 109
..

Fix Undefined variable: namespaces in includes/search/SearchEngineConfig.php on 
line 109

Bug: T134305
Change-Id: I220886e12a6d083ac34a8a75bc77871e89dbf747
---
M includes/search/SearchEngine.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/14/286714/1

diff --git a/includes/search/SearchEngine.php b/includes/search/SearchEngine.php
index 27b6dd4..dcef95c 100644
--- a/includes/search/SearchEngine.php
+++ b/includes/search/SearchEngine.php
@@ -607,7 +607,7 @@
 * @return array
 */
public static function namespacesAsText( $namespaces ) {
-   return 
MediaWikiServices::getInstance()->getSearchEngineConfig()->namespacesAsText();
+   return 
MediaWikiServices::getInstance()->getSearchEngineConfig()->namespacesAsText( 
$namespaces );
}
 
/**

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

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

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


[MediaWiki-commits] [Gerrit] Avoid calling Parser::getOutput() twice unnecessarily - change (mediawiki...Kartographer)

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

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

Change subject: Avoid calling Parser::getOutput() twice unnecessarily
..

Avoid calling Parser::getOutput() twice unnecessarily

Change-Id: I69593cb1abe56d8cf35954914fca8f3c37520d26
---
M includes/Tag/MapFrame.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/includes/Tag/MapFrame.php b/includes/Tag/MapFrame.php
index 1c71a7d..1ea7227 100644
--- a/includes/Tag/MapFrame.php
+++ b/includes/Tag/MapFrame.php
@@ -78,7 +78,7 @@
*/
 
case 'interactive':
-   $this->parser->getOutput()->addModules( 
'ext.kartographer.live' );
+   $output->addModules( 'ext.kartographer.live' );
 
 
$attrs = $this->getDefaultAttributes();

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I69593cb1abe56d8cf35954914fca8f3c37520d26
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Kartographer
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] Clean out pdns config cruft. - change (operations/puppet)

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

Change subject: Clean out pdns config cruft.
..


Clean out pdns config cruft.

Change-Id: I001e24c51b7ac83f96ba5f586587f06c5c3d7fb1
---
M modules/labs_dns/manifests/init.pp
1 file changed, 8 insertions(+), 0 deletions(-)

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



diff --git a/modules/labs_dns/manifests/init.pp 
b/modules/labs_dns/manifests/init.pp
index 881d8cd..a4cf7aa 100644
--- a/modules/labs_dns/manifests/init.pp
+++ b/modules/labs_dns/manifests/init.pp
@@ -27,6 +27,14 @@
 content => template('labs_dns/pdns.conf.erb'),
 }
 
+# Clean up any example configs that the pdns packages might have installed;
+#  We don't want them accidentally used or merged into our puppetized 
config.
+file { '/etc/powerdns/pdns.d/':
+ensure  => directory,
+purge   => true,
+recurse => true,
+}
+
 service { 'pdns':
 ensure => 'running',
 require=> [ Package['pdns-server'],

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I001e24c51b7ac83f96ba5f586587f06c5c3d7fb1
Gerrit-PatchSet: 5
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Andrew Bogott 
Gerrit-Reviewer: Andrew Bogott 
Gerrit-Reviewer: Rush 
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 LdapAuthenticationPlugin::userExists() - change (mediawiki...LdapAuthentication)

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

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

Change subject: Fix LdapAuthenticationPlugin::userExists()
..

Fix LdapAuthenticationPlugin::userExists()

As far as I can tell, this has been broken since the initial commit in
2007: it would always return true since ldap_read returns a
(possibly empty) resource rather than a falsey value when there are no
results. Apparently no one ever noticed.

Change-Id: I0c7e90663430fd7b530ba0388b4ee967054d2199
---
M LdapAuthenticationPlugin.php
1 file changed, 7 insertions(+), 5 deletions(-)


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

diff --git a/LdapAuthenticationPlugin.php b/LdapAuthenticationPlugin.php
index a0a9d0c..30a5167 100644
--- a/LdapAuthenticationPlugin.php
+++ b/LdapAuthenticationPlugin.php
@@ -443,15 +443,17 @@
if ( $this->connect() ) {
$searchstring = $this->getSearchString( $username );
 
-   // If we are using auto authentication, and we got
-   // anything back, then the user exists.
-   if ( $this->useAutoAuth() && $searchstring != '' ) {
+   if ( $searchstring == '' ) {
+   // It is possible that getSearchString will 
return an
+   // empty string, which means "no user".
+   } elseif ( $this->useAutoAuth() ) {
+   // If we are using auto authentication, and we 
got
+   // anything back, then the user exists.
$ret = true;
} else {
// Search for the entry.
$entry = LdapAuthenticationPlugin::ldap_read( 
$this->ldapconn, $searchstring, "objectclass=*" );
-
-   if ( $entry ) {
+   if ( $entry && 
LdapAuthenticationPlugin::ldap_count_entries( $this->ldapconn, $entry ) > 0 ) {
$this->printDebug( "Found a matching 
user in LDAP", NONSENSITIVE );
$ret = true;
} else {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0c7e90663430fd7b530ba0388b4ee967054d2199
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/LdapAuthentication
Gerrit-Branch: master
Gerrit-Owner: Anomie 

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


[MediaWiki-commits] [Gerrit] Support hash fragments in wfAppendQuery() - change (mediawiki/core)

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

Change subject: Support hash fragments in wfAppendQuery()
..


Support hash fragments in wfAppendQuery()

Change-Id: Icb99d5479836fea25a47451b5a758dd71f642f71
---
M includes/GlobalFunctions.php
M tests/phpunit/includes/GlobalFunctions/wfAppendQueryTest.php
2 files changed, 26 insertions(+), 0 deletions(-)

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



diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php
index 5c42bc2..b5de66f 100644
--- a/includes/GlobalFunctions.php
+++ b/includes/GlobalFunctions.php
@@ -501,12 +501,26 @@
$query = wfArrayToCgi( $query );
}
if ( $query != '' ) {
+   // Remove the fragment, if there is one
+   $fragment = false;
+   $hashPos = strpos( $url, '#' );
+   if ( $hashPos !== false ) {
+   $fragment = substr( $url, $hashPos );
+   $url = substr( $url, 0, $hashPos );
+   }
+
+   // Add parameter
if ( false === strpos( $url, '?' ) ) {
$url .= '?';
} else {
$url .= '&';
}
$url .= $query;
+
+   // Put the fragment back
+   if ( $fragment !== false ) {
+   $url .= $fragment;
+   }
}
return $url;
 }
diff --git a/tests/phpunit/includes/GlobalFunctions/wfAppendQueryTest.php 
b/tests/phpunit/includes/GlobalFunctions/wfAppendQueryTest.php
index eb9adea..bb71610 100644
--- a/tests/phpunit/includes/GlobalFunctions/wfAppendQueryTest.php
+++ b/tests/phpunit/includes/GlobalFunctions/wfAppendQueryTest.php
@@ -61,6 +61,18 @@
'baz=quux=baz',

'http://www.example.org/index.php?foo=bar=quux=baz',
'Modify query string'
+   ],
+   [
+   'http://www.example.org/index.php#baz',
+   'foo=bar',
+   'http://www.example.org/index.php?foo=bar#baz',
+   'URL with fragment'
+   ],
+   [
+   'http://www.example.org/index.php?foo=bar#baz',
+   'quux=blah',
+   
'http://www.example.org/index.php?foo=bar=blah#baz',
+   'URL with query string and fragment'
]
];
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Icb99d5479836fea25a47451b5a758dd71f642f71
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Catrope 
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] Document $wgDonationInterfaceDebugLog global - change (mediawiki...DonationInterface)

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

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

Change subject: Document $wgDonationInterfaceDebugLog global
..

Document $wgDonationInterfaceDebugLog global

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


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

diff --git a/DonationInterface.php b/DonationInterface.php
index add9f90..359b811 100644
--- a/DonationInterface.php
+++ b/DonationInterface.php
@@ -205,6 +205,13 @@
 $wgDonationInterfaceUseSyslog = false;
 $wgDonationInterfaceSaveCommStats = false;
 
+/**
+ * Set to true to allow debug level log messages.
+ * TODO: Deprecate and show how to accomplish the same thing using Monolog
+ * configuration.
+ */
+$wgDonationInterfaceDebugLog = false;
+
 $wgDonationInterfaceCSSVersion = 1;
 $wgDonationInterfaceTimeout = 5;
 $wgDonationInterfaceDefaultForm = 'RapidHtml';

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6c3de0d07246ffdb6a184e485d45730b2184b8e8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DonationInterface
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] Dashboard: added padding to panel content - change (mediawiki...BlueSpiceFoundation)

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

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

Change subject: Dashboard: added padding to panel content
..

Dashboard: added padding to panel content

This is a tiny visualisation improvement by adding a padding between
panel border and content.

Change-Id: Ie5f88a7c8a96f34de4cbbc96c236127c7bdb3c43
---
M resources/bluespice.extjs/bluespice.extjs.BS.portal.css
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceFoundation 
refs/changes/10/286710/1

diff --git a/resources/bluespice.extjs/bluespice.extjs.BS.portal.css 
b/resources/bluespice.extjs/bluespice.extjs.BS.portal.css
index d94bb14..9b49374 100644
--- a/resources/bluespice.extjs/bluespice.extjs.BS.portal.css
+++ b/resources/bluespice.extjs/bluespice.extjs.BS.portal.css
@@ -47,6 +47,7 @@
 }
 .x-portlet .x-panel-body {
background: #fff;
+   padding: 5px;
 }
 .portlet-content {
padding: 10px;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie5f88a7c8a96f34de4cbbc96c236127c7bdb3c43
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceFoundation
Gerrit-Branch: master
Gerrit-Owner: Mglaser 

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


[MediaWiki-commits] [Gerrit] Group0 to php-1.27.0-wmf.23 - change (operations/mediawiki-config)

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

Change subject: Group0 to php-1.27.0-wmf.23
..


Group0 to php-1.27.0-wmf.23

Bug: T131557
Change-Id: I2d0668d54810730202d25d3d3612ea02dee6158a
---
M wikiversions.json
1 file changed, 5 insertions(+), 5 deletions(-)

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



diff --git a/wikiversions.json b/wikiversions.json
index f3cd731..8572f47 100644
--- a/wikiversions.json
+++ b/wikiversions.json
@@ -478,7 +478,7 @@
 "maiwiki": "php-1.27.0-wmf.22",
 "map_bmswiki": "php-1.27.0-wmf.22",
 "mdfwiki": "php-1.27.0-wmf.22",
-"mediawikiwiki": "php-1.27.0-wmf.22",
+"mediawikiwiki": "php-1.27.0-wmf.23",
 "metawiki": "php-1.27.0-wmf.22",
 "mgwiki": "php-1.27.0-wmf.22",
 "mgwikibooks": "php-1.27.0-wmf.22",
@@ -745,9 +745,9 @@
 "tawikisource": "php-1.27.0-wmf.22",
 "tawiktionary": "php-1.27.0-wmf.22",
 "tenwiki": "php-1.27.0-wmf.22",
-"test2wiki": "php-1.27.0-wmf.22",
-"testwiki": "php-1.27.0-wmf.22",
-"testwikidatawiki": "php-1.27.0-wmf.22",
+"test2wiki": "php-1.27.0-wmf.23",
+"testwiki": "php-1.27.0-wmf.23",
+"testwikidatawiki": "php-1.27.0-wmf.23",
 "tetwiki": "php-1.27.0-wmf.22",
 "tewiki": "php-1.27.0-wmf.22",
 "tewikibooks": "php-1.27.0-wmf.22",
@@ -877,7 +877,7 @@
 "zawikiquote": "php-1.27.0-wmf.22",
 "zawiktionary": "php-1.27.0-wmf.22",
 "zeawiki": "php-1.27.0-wmf.22",
-"zerowiki": "php-1.27.0-wmf.22",
+"zerowiki": "php-1.27.0-wmf.23",
 "zh_classicalwiki": "php-1.27.0-wmf.22",
 "zh_min_nanwiki": "php-1.27.0-wmf.22",
 "zh_min_nanwikibooks": "php-1.27.0-wmf.22",

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2d0668d54810730202d25d3d3612ea02dee6158a
Gerrit-PatchSet: 4
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Hashar 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Clean out pdns config cruft. - change (operations/puppet)

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

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

Change subject: Clean out pdns config cruft.
..

Clean out pdns config cruft.

Change-Id: I001e24c51b7ac83f96ba5f586587f06c5c3d7fb1
---
M modules/labs_dns/manifests/init.pp
1 file changed, 8 insertions(+), 0 deletions(-)


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

diff --git a/modules/labs_dns/manifests/init.pp 
b/modules/labs_dns/manifests/init.pp
index 881d8cd..74bb11c 100644
--- a/modules/labs_dns/manifests/init.pp
+++ b/modules/labs_dns/manifests/init.pp
@@ -27,6 +27,14 @@
 content => template('labs_dns/pdns.conf.erb'),
 }
 
+# Clean up any example configs that the pdns packages might have installed;
+#  We don't want them accidentally used or merged into our puppetized 
config.
+file { '/etc/powerdns/pdns.d/':
+ensure=> directory,
+purge => true
+recurselimit => 1,
+}
+
 service { 'pdns':
 ensure => 'running',
 require=> [ Package['pdns-server'],

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I001e24c51b7ac83f96ba5f586587f06c5c3d7fb1
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Andrew Bogott 

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


[MediaWiki-commits] [Gerrit] Remove confluent conditional in role::kafka::analytics::broker - change (operations/puppet)

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

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

Change subject: Remove confluent conditional in role::kafka::analytics::broker
..

Remove confluent conditional in role::kafka::analytics::broker

This should not be merged until the upgrade to confluent kafka 0.9 is complete
Bug: T121562

Change-Id: I7e184a9d5c7a66afb247b68a54fa45f9ebb9edfb
---
M modules/role/manifests/kafka/analytics/broker.pp
1 file changed, 52 insertions(+), 136 deletions(-)


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

diff --git a/modules/role/manifests/kafka/analytics/broker.pp 
b/modules/role/manifests/kafka/analytics/broker.pp
index 9d64b7f..e805165 100644
--- a/modules/role/manifests/kafka/analytics/broker.pp
+++ b/modules/role/manifests/kafka/analytics/broker.pp
@@ -43,6 +43,51 @@
 'production' => 65536,
 }
 
+class { '::confluent::kafka::broker':
+
+# NOTE: This will be removed once all brokers are on 0.9
+inter_broker_protocol_version   => '0.8.2.X',
+
+log_dirs=> $log_dirs,
+brokers => $config['brokers']['hash'],
+zookeeper_connect   => $config['zookeeper']['url'],
+nofiles_ulimit  => $nofiles_ulimit,
+jmx_port=> $config['jmx_port'],
+
+# I don't trust auto.leader.rebalance :)
+auto_leader_rebalance_enable=> false,
+
+default_replication_factor  => 3,
+
+# The default for log segment bytes has changed in the puppet
+# module / packaging.  536870912 is what we have always used on
+# analytics brokers, no need to change it now.
+log_segment_bytes   => 536870912,
+# Bump this up to get a little more
+# parallelism between replicas.
+num_replica_fetchers=> 12,
+# Setting this to a value according to 
https://cwiki.apache.org/confluence/display/KAFKA/FAQ#FAQ-HowtoreducechurnsinISR?WhendoesabrokerleavetheISR?
+# 1 / MinFetcHRate * 1000.  I assume this result to be in seconds,
+# since the default for max_ms is 1.
+# MinFetchRate ~= 45. 1/45*1000 ~= 22.  Setting this to 30 seconds
+# to overcompensate.
+# See also: 
http://ganglia.wikimedia.org/latest/graph_all_periods.php?title%5B%5D=analytics102%5B12%5D.*%5B%5D=kafka.server.ReplicaFetcherManager.Replica-MinFetchRate.Value=line=show=1
+replica_lag_time_max_ms => 3,
+# Allow for 16 seconds of latency when talking with Zookeeper.
+# We seen an issue where (mainly or only) analytics1021 will
+# pause for almost 12 seconds for a yet unknown reason.  Upping
+# the session timeout here should give the broker enough time
+# to get back in sync with Zookeeper before it is removed from the
+# ISR. See T83561 (near the bottom) and:
+# 
http://mail-archives.apache.org/mod_mbox/kafka-users/201407.mbox/%3CCAFbh0Q2f71qgs5JDNFxkm7SSdZyYMH=zpeoxotueqfkqexq...@mail.gmail.com%3E
+log_flush_interval_ms   => 3000,
+zookeeper_connection_timeout_ms => 16000,
+zookeeper_session_timeout_ms=> 16000,
+# Use LinkedIn recommended settings with G1 garbage collector,
+jvm_performance_opts=> '-server -XX:PermSize=48m 
-XX:MaxPermSize=48m -XX:+UseG1GC -XX:MaxGCPauseMillis=20 
-XX:InitiatingHeapOccupancyPercent=35',
+}
+
+
 # Historically there was only one kafka cluster in eqiad.
 # This cluster was named 'eqiad'.  For the metrics, let's display
 # a 'logical' cluster name of analytics-eqiad.
@@ -53,144 +98,15 @@
 $group_prefix = "kafka.cluster.${cluster_name}."
 }
 
-# Temporary list of brokers that have been upgraded to the new
-# confluent puppet module.  This will only be here while we
-# perform the upgrade 1 broker at at ime.
-$confluent_brokers = hiera('confluent_brokers', [])
-if $::hostname in $confluent_brokers {
-class { '::confluent::kafka::broker':
-
-# NOTE: This will be removed once all brokers are on 0.9
-inter_broker_protocol_version   => '0.8.2.X',
-
-log_dirs=> $log_dirs,
-brokers => $config['brokers']['hash'],
-zookeeper_connect   => $config['zookeeper']['url'],
-nofiles_ulimit  => $nofiles_ulimit,
-jmx_port=> $config['jmx_port'],
-
-# I don't trust auto.leader.rebalance :)
-auto_leader_rebalance_enable=> false,
-
-default_replication_factor  => 3,
-
-# The default for log segment bytes has changed in the puppet
-# module / packaging.  536870912 is what we have always 

[MediaWiki-commits] [Gerrit] NamespaceManager: fixed action confirmation - change (mediawiki...BlueSpiceExtensions)

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

Change subject: NamespaceManager: fixed action confirmation
..


NamespaceManager: fixed action confirmation

Now NamespaceManager gives the corresponding text when an action is
conducted on a namespace.

Change-Id: Ib956f55a451c3a714f868be68a95f3fd2dafd7eb
---
M NamespaceManager/includes/api/BSApiNamespaceTasks.php
1 file changed, 4 insertions(+), 1 deletion(-)

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



diff --git a/NamespaceManager/includes/api/BSApiNamespaceTasks.php 
b/NamespaceManager/includes/api/BSApiNamespaceTasks.php
index f912851..76de18e 100644
--- a/NamespaceManager/includes/api/BSApiNamespaceTasks.php
+++ b/NamespaceManager/includes/api/BSApiNamespaceTasks.php
@@ -74,6 +74,7 @@
'create',
array( '4::namespace' => $sNamespace )
);
+   $aResult['message'] = wfMessage( 
'bs-namespacemanager-nsadded' )->plain();
}
 
$oResult->success = $aResult['success'];
@@ -156,6 +157,8 @@
'5::newNamespaceName' => $sNamespace
) );
}
+
+   $aResult['message'] = wfMessage( 
'bs-namespacemanager-nsedited' )->plain();
}
 
$oResult->success = $aResult['success'];
@@ -246,7 +249,7 @@
);
 
$oResult->success = $aResult[ 'success' ];
-   $oResult->message = $aResult[ 'message' ];
+   $oResult->message = wfMessage( 
'bs-namespacemanager-nsremoved' )->plain();
}
} else {
$oResult->message = wfMessage( 
'bs-namespacemanager-error_on_remove_namespace' )->plain();

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib956f55a451c3a714f868be68a95f3fd2dafd7eb
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions
Gerrit-Branch: master
Gerrit-Owner: Mglaser 
Gerrit-Reviewer: Dvogel hallowelt 
Gerrit-Reviewer: Ljonka 
Gerrit-Reviewer: Pwirth 
Gerrit-Reviewer: Robert Vogel 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] ExtendedSearch: Keep facet operator when changing facets - change (mediawiki...BlueSpiceExtensions)

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

Change subject: ExtendedSearch: Keep facet operator when changing facets
..


ExtendedSearch: Keep facet operator when changing facets

Facet operators are now stable when changing the facet. Before, the
operator changed back to default.

Change-Id: Id814ae9eb506e87a8d57287ab8b1a361621bff7b
---
M ExtendedSearch/includes/SearchIndex/SearchUriBuilder.class.php
M ExtendedSearch/resources/bluespice.facetsettings.js
2 files changed, 9 insertions(+), 3 deletions(-)

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



diff --git a/ExtendedSearch/includes/SearchIndex/SearchUriBuilder.class.php 
b/ExtendedSearch/includes/SearchIndex/SearchUriBuilder.class.php
index facc7bc..996fba3 100644
--- a/ExtendedSearch/includes/SearchIndex/SearchUriBuilder.class.php
+++ b/ExtendedSearch/includes/SearchIndex/SearchUriBuilder.class.php
@@ -71,9 +71,13 @@
 */
const OFFSET = 4096;
/**
+* Facet operators.
+*/
+   const FSET = 8192;
+   /**
 * Other params (?)
 */
-   const EXTENDED = 8192;
+   const EXTENDED = 16384;
/**
 * Combination of order, direction and offset (?)
 */
@@ -81,7 +85,7 @@
/**
 * Everything
 */
-   const ALL = 8191; // all but EXTENDED
+   const ALL = 16383; // all but EXTENDED
 
/**
 * Instance of SearchOptions
@@ -150,6 +154,7 @@
$this->aUri[self::ASC] = 
'search_asc='.$this->oSearchOptions->getOption( 'asc' );
$this->aUri[self::OFFSET] = 
'search_offset='.$this->oSearchOptions->getOption( 'offset' );
$this->aUri[self::EXTENDED] = 'search_extended=1';
+   $this->aUri[self::FSET] = 'fset='.json_encode( 
$this->oSearchOptions->getOption( 'fset' ) );
}
 
/**
@@ -188,6 +193,7 @@
if ( self::EDITOR & $components ) $aKeysWanted[self::EDITOR] = 
true;
if ( self::ORDER & $components ) $aKeysWanted[self::ORDER] = 
true;
if ( self::ASC & $components ) $aKeysWanted[self::ASC] = true;
+   if ( self::FSET & $components ) $aKeysWanted[self::FSET] = true;
if ( self::EXTENDED & $components ) 
$aKeysWanted[self::EXTENDED] = true;
 
$arrayKeysValuesWanted = array_intersect_key( $this->aUri , 
$aKeysWanted );
diff --git a/ExtendedSearch/resources/bluespice.facetsettings.js 
b/ExtendedSearch/resources/bluespice.facetsettings.js
index 15e616d..91efe32 100644
--- a/ExtendedSearch/resources/bluespice.facetsettings.js
+++ b/ExtendedSearch/resources/bluespice.facetsettings.js
@@ -14,7 +14,7 @@
},
'settingschange': function() {
var fsets = {};
-   $( '.bs-es-facetsettings' ).each( 
function(){
+   $( '.bs-es-facetsettings' ).each( 
function(index, me){
var fset = $(me).data( 'fset' );
var fsetparam = $(me).data( 
'fset-param' );
fsets[fsetparam] = fset;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id814ae9eb506e87a8d57287ab8b1a361621bff7b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions
Gerrit-Branch: master
Gerrit-Owner: Mglaser 
Gerrit-Reviewer: Dvogel hallowelt 
Gerrit-Reviewer: Ljonka 
Gerrit-Reviewer: Pwirth 
Gerrit-Reviewer: Robert Vogel 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] VisualEditor: Do not focus when in preview - change (mediawiki...BlueSpiceExtensions)

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

Change subject: VisualEditor: Do not focus when in preview
..


VisualEditor: Do not focus when in preview

When in preview mode, users want to see the preview article and not
the edit box. So in this case, the editor will not be autofocussed.

Change-Id: Icf761b6ce3d1b20f8c7804da85c2f0529762eaf4
---
M VisualEditor/VisualEditor.class.php
1 file changed, 8 insertions(+), 0 deletions(-)

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



diff --git a/VisualEditor/VisualEditor.class.php 
b/VisualEditor/VisualEditor.class.php
index 2d8d875..677abf5 100644
--- a/VisualEditor/VisualEditor.class.php
+++ b/VisualEditor/VisualEditor.class.php
@@ -449,6 +449,14 @@
)
);
 
+   // When in preview mode, users want to see the preview article 
and not
+   // the edit box. So in this case, the editor will not be 
autofocussed.
+   $sAction = $this->getRequest()->getVal( 'action', 'view' );
+   if ( $sAction == 'submit' ) {
+   unset( $aConfigs['standard']['auto_focus'] );
+   unset( $aConfigs['overwrite']['auto_focus'] );
+   }
+
$aExtensionTags = $oParser->getTags(); //TODO: Use, or at least 
fall back to API "action=query=siteinfo=extensiontags"
$sAllowedTags = '';
$sSpecialTags = '';

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Icf761b6ce3d1b20f8c7804da85c2f0529762eaf4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions
Gerrit-Branch: master
Gerrit-Owner: Mglaser 
Gerrit-Reviewer: Dvogel hallowelt 
Gerrit-Reviewer: Ljonka 
Gerrit-Reviewer: Pwirth 
Gerrit-Reviewer: Robert Vogel 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Fix table creation in strict mode - change (wikimedia...php-queue)

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

Change subject: Fix table creation in strict mode
..


Fix table creation in strict mode

Otherwise we get a PDOException: SQLSTATE[42000] [1101] BLOB, TEXT,
GEOMETRY or JSON column 'data' can't have a default value

Change-Id: I3a6005a5c5b1ab982314fa886be38750cb794860
---
M src/PHPQueue/Backend/PDO.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/src/PHPQueue/Backend/PDO.php b/src/PHPQueue/Backend/PDO.php
index 85d023f..5530022 100644
--- a/src/PHPQueue/Backend/PDO.php
+++ b/src/PHPQueue/Backend/PDO.php
@@ -200,7 +200,7 @@
 case 'mysql':
 $sql = sprintf("CREATE TABLE IF NOT EXISTS `%s` (
 `id` mediumint(20) NOT NULL AUTO_INCREMENT,
-`data` mediumtext NULL DEFAULT '',
+`data` mediumtext NULL,
 `timestamp` datetime NOT NULL,
 PRIMARY KEY (`id`)
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;", 
$table_name);

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3a6005a5c5b1ab982314fa886be38750cb794860
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/php-queue
Gerrit-Branch: master
Gerrit-Owner: Ejegg 
Gerrit-Reviewer: Awight 
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 table creation in strict mode - change (wikimedia...php-queue)

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

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

Change subject: Fix table creation in strict mode
..

Fix table creation in strict mode

Otherwise we get a PDOException: SQLSTATE[42000] [1101] BLOB, TEXT,
GEOMETRY or JSON column 'data' can't have a default value

Change-Id: I3a6005a5c5b1ab982314fa886be38750cb794860
---
M src/PHPQueue/Backend/PDO.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/php-queue 
refs/changes/07/286707/1

diff --git a/src/PHPQueue/Backend/PDO.php b/src/PHPQueue/Backend/PDO.php
index 85d023f..5530022 100644
--- a/src/PHPQueue/Backend/PDO.php
+++ b/src/PHPQueue/Backend/PDO.php
@@ -200,7 +200,7 @@
 case 'mysql':
 $sql = sprintf("CREATE TABLE IF NOT EXISTS `%s` (
 `id` mediumint(20) NOT NULL AUTO_INCREMENT,
-`data` mediumtext NULL DEFAULT '',
+`data` mediumtext NULL,
 `timestamp` datetime NOT NULL,
 PRIMARY KEY (`id`)
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;", 
$table_name);

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3a6005a5c5b1ab982314fa886be38750cb794860
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/php-queue
Gerrit-Branch: master
Gerrit-Owner: Ejegg 

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


[MediaWiki-commits] [Gerrit] Adjust to changes to LdapAuthentication in preparation for A... - change (mediawiki...OpenStackManager)

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

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

Change subject: Adjust to changes to LdapAuthentication in preparation for 
AuthManager
..

Adjust to changes to LdapAuthentication in preparation for AuthManager

We can no longer rely on $wgAuth being LdapAuthentication; instead, call
LdapAuthenticationPlugin::getInstance().

Change-Id: I7f5115c0fe68c05d26514b089db4e61cc2d440a7
Depends-On: Ia7d05f93783571ca9f1b79481303b3d2c95a5c88
---
M OpenStackManager.php
M maintenance/purgeOldServiceGroups.php
M maintenance/qualifyInstancePages.php
M maintenance/updateInstancePages.php
M maintenance/updatedomains.php
M nova/OpenStackNovaController.php
M nova/OpenStackNovaDomain.php
M nova/OpenStackNovaHost.php
M nova/OpenStackNovaLdapConnection.php
M nova/OpenStackNovaPrivateHost.php
M nova/OpenStackNovaProject.php
M nova/OpenStackNovaProjectGroup.php
M nova/OpenStackNovaPublicHost.php
M nova/OpenStackNovaRole.php
M nova/OpenStackNovaServiceGroup.php
M nova/OpenStackNovaSudoer.php
M nova/OpenStackNovaUser.php
M special/SpecialNovaInstance.php
18 files changed, 310 insertions(+), 351 deletions(-)


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

diff --git a/OpenStackManager.php b/OpenStackManager.php
index e22a194..60ff338 100644
--- a/OpenStackManager.php
+++ b/OpenStackManager.php
@@ -58,18 +58,6 @@
 $wgHooks['UserRemoveGroup'][] = 
'OpenStackNovaUser::removeUserFromBastionProject';
 $wgHooks['getUserPermissionsErrors'][] = 
'OpenStackManagerHooks::getUserPermissionsErrors';
 
-# Block runs on Wikimedia Jenkins CI system
-if ( isset( $wgWikimediaJenkinsCI ) && $wgWikimediaJenkinsCI ) {
-
-   # Please MediaWiki ApiDocumentationTest which invokes our API calls 
which
-   # require $wgAuth to be an instance of the LdapAuthenticationPlugin.
-   # T124613
-   $wgExtensionFunctions[] = function () {
-   global $wgAuth;
-   $wgAuth = new LdapAuthenticationPlugin();
-   };
-}
-
 // Keystone identity URI
 $wgOpenStackManagerNovaIdentityURI = 'http://localhost:5000/v2.0';
 $wgOpenStackManagerNovaIdentityV3URI = 'http://localhost:5000/v3';
diff --git a/maintenance/purgeOldServiceGroups.php 
b/maintenance/purgeOldServiceGroups.php
index 65c7423..8423afe 100644
--- a/maintenance/purgeOldServiceGroups.php
+++ b/maintenance/purgeOldServiceGroups.php
@@ -14,8 +14,8 @@
 
public function execute() {
global $wgOpenStackManagerLDAPUsername;
-   global $wgAuth;
 
+   $ldap = LdapAuthenticationPlugin::getInstance();
$user = new OpenStackNovaUser( 
$wgOpenStackManagerLDAPUsername );
$projects = OpenStackNovaProject::getAllProjects();
 
@@ -37,20 +37,20 @@
$oldServiceGroupOUDN = 'ou=groups,' . 
$project->getProjectDN();
$oldServiceUserOUDN = 'ou=people,' . 
$project->getProjectDN();
 
-   $result = LdapAuthenticationPlugin::ldap_search( 
$wgAuth->ldapconn,
+   $result = LdapAuthenticationPlugin::ldap_search( 
$ldap->ldapconn,
$oldServiceGroupOUDN,
'(objectclass=groupofnames)' );
 
if ( $result ) {
$this->serviceGroups = array();
-   $groupList = 
LdapAuthenticationPlugin::ldap_get_entries( $wgAuth->ldapconn, $result );
+   $groupList = 
LdapAuthenticationPlugin::ldap_get_entries( $ldap->ldapconn, $result );
if ( isset( $groupList ) ) {
array_shift( $groupList );
foreach ( $groupList as $groupEntry ) {
$deleteme = "cn=" . 
$groupEntry['cn'][0] . "," . $oldServiceGroupOUDN;
print "needs deleting: " . 
$deleteme . "...";
$attempt_count++;
-   $success = 
LdapAuthenticationPlugin::ldap_delete( $wgAuth->ldapconn, $deleteme );
+   $success = 
LdapAuthenticationPlugin::ldap_delete( $ldap->ldapconn, $deleteme );
if ( $success ) {
$synced_count++;
print( "done.\n");
@@ -62,20 +62,20 @@
}
}
 
-   $result = LdapAuthenticationPlugin::ldap_search( 
$wgAuth->ldapconn,
+   $result = LdapAuthenticationPlugin::ldap_search( 
$ldap->ldapconn,
$oldServiceUserOUDN,

[MediaWiki-commits] [Gerrit] udpmxircecho: die if socket fails to open - change (operations/puppet)

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

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

Change subject: udpmxircecho: die if socket fails to open
..

udpmxircecho: die if socket fails to open

Bug:T134247
Change-Id: I3e955ba8cc5a8498240a777934438f05571c2cef
---
A modules/mw_rc_irc/templates/udpmxircecho.py
M modules/mw_rc_irc/templates/udpmxircecho.py.erb
2 files changed, 77 insertions(+), 2 deletions(-)


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

diff --git a/modules/mw_rc_irc/templates/udpmxircecho.py 
b/modules/mw_rc_irc/templates/udpmxircecho.py
new file mode 100755
index 000..46a1f8f
--- /dev/null
+++ b/modules/mw_rc_irc/templates/udpmxircecho.py
@@ -0,0 +1,71 @@
+#! /usr/bin/env python
+#
+# usage: udpmxircecho.py nickname server
+import sys
+reload(sys)
+sys.setdefaultencoding('utf8')
+
+from irc.bot import SingleServerIRCBot
+
+import threading, socket
+
+
+class EchoReader(threading.Thread):
+def __init__(self, bot):
+threading.Thread.__init__(self)
+self.bot = bot
+
+def run(self):
+
+udpsock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
+udpsock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
+try:
+udpsock.bind(('', 9390))
+except socket.error, msg:
+sys.stderr.write("[ERROR] %s\n" % msg[1])
+sys.exit(2)
+while True:
+try:
+s = udpsock.recv(65535)
+sp = s.split("\t")
+if len(sp) == 2:
+channel = sp[0]
+text = sp[1]
+text = 
text.lstrip().replace('\r','').replace('\n','')
+
+if channel not in self.bot.chans:
+self.bot.chans.append(channel)
+
self.bot.connection.join(channel)
+# this throws an exception if not 
connected.
+self.bot.connection.privmsg(channel, 
text)
+
+except EOFError:
+# Once the input is finished, the bot should 
exit
+sys.exit()
+except Exception as e:
+print e
+
+class EchoBot(SingleServerIRCBot):
+def __init__(self, chans, nickname, server):
+port = 6667
+print "connecting to %s as %s on port %s" % (server, nickname, 
port)
+SingleServerIRCBot.__init__(self, [(server, port)], nickname, 
"IRC echo bot")
+self.chans = chans
+
+def on_nicknameinuse(self, c, e):
+print '%s nickname in use!' % (c.get_nickname(),)
+c.nick(c.get_nickname() + "_")
+
+def on_welcome(self, c, e):
+print "got welcome"
+c.oper("rc", "<%= @ircpassword %>")
+
+for chan in self.chans:
+c.join(chan)
+
+def main():
+bot = EchoBot([], sys.argv[1], sys.argv[2]);
+sthr = EchoReader(bot)
+sthr.start()
+bot.start()
+main()
diff --git a/modules/mw_rc_irc/templates/udpmxircecho.py.erb 
b/modules/mw_rc_irc/templates/udpmxircecho.py.erb
index 315aa51..7c96cc8 100755
--- a/modules/mw_rc_irc/templates/udpmxircecho.py.erb
+++ b/modules/mw_rc_irc/templates/udpmxircecho.py.erb
@@ -20,10 +20,14 @@
 self.bot = bot
 
 def run(self):
+
 udpsock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
 udpsock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
-udpsock.bind(('', 9390))
-
+try:
+udpsock.bind(('', 9390))
+except socket.error, msg:
+sys.stderr.write("[ERROR] %s\n" % msg[1])
+sys.exit(2)
 while True:
 try:
 s = udpsock.recv(65535)

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

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

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


[MediaWiki-commits] [Gerrit] Update for AuthManager, somewhat - change (mediawiki...LdapAuthentication)

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

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

Change subject: Update for AuthManager, somewhat
..

Update for AuthManager, somewhat

Since WMF only uses the extension on wikitech.wikimedia.org and is going
to stop using it there once OpenStackManager is replaced, and I don't
know much about LDAP, the update here is mainly adapting the core BC
AuthPluginPrimaryAuthenticationProvider to slightly-more-specifically
wrap LdapAuthenticationPlugin to get things working well enough for
wikitech.

If someone who knows about authenticating against LDAP wants to pick up
the torch and write a really good PrimaryAuthenticationProvider that
doesn't have craziness like a global "domain" variable that we have to
guess at the correct value in half the entry points, I'll be happy to
help you with that.

Change-Id: If44ca97dc72dcad9e7935eced805ff0f1f12c093
---
M LdapAuthentication.php
A LdapPrimaryAuthenticationProvider.php
2 files changed, 453 insertions(+), 0 deletions(-)


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

diff --git a/LdapAuthentication.php b/LdapAuthentication.php
index acd311e..42debe2 100644
--- a/LdapAuthentication.php
+++ b/LdapAuthentication.php
@@ -90,6 +90,7 @@
 );
 
 $wgAutoloadClasses['LdapAuthenticationPlugin'] = __DIR__ . 
'/LdapAuthenticationPlugin.php';
+$wgAutoloadClasses['LdapPrimaryAuthenticationProvider'] = __DIR__ . 
'/LdapPrimaryAuthenticationProvider.php';
 
 $wgMessagesDirs['LdapAuthentication'] = __DIR__ . '/i18n';
 
@@ -134,6 +135,21 @@
 function AutoAuthSetup() {
global $wgHooks;
global $wgAuth;
+   global $wgDisableAuthManager;
+
+   if ( class_exists( MediaWiki\Auth\AuthManager::class ) && empty( 
$wgDisableAuthManager ) ) {
+   /**
+* @todo If you want to make AutoAuthSetup() work in an 
AuthManager
+*  world, what you need to do is figure out how to do it with a
+*  SessionProvider instead of the hackiness below. You'll 
probably
+*  want an ImmutableSessionProviderWithCookie subclass where
+*  provideSessionInfo() does the first part of
+*  LdapAutoAuthentication::Authenticate() (stop before the 
$localId
+*  bit).
+*/
+   throw new BadFunctionCallException( 'AutoAuthSetup() is not 
supported with AuthManager.' );
+   }
+
$wgAuth = LdapAuthenticationPlugin::getInstance();
 
$wgAuth->printDebug( "Entering AutoAuthSetup.", NONSENSITIVE );
diff --git a/LdapPrimaryAuthenticationProvider.php 
b/LdapPrimaryAuthenticationProvider.php
new file mode 100644
index 000..8148517
--- /dev/null
+++ b/LdapPrimaryAuthenticationProvider.php
@@ -0,0 +1,437 @@
+http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup Auth
+ */
+
+use MediaWiki\Auth\AbstractPasswordPrimaryAuthenticationProvider;
+use MediaWiki\Auth\PasswordAuthenticationRequest;
+use MediaWiki\Auth\PasswordDomainAuthenticationRequest;
+
+/**
+ * Primary authentication provider wrapper for LdapAuthentication
+ * @warning This is rather hacky, and probably doesn't fully support what
+ *  LdapAuthenticationPlugin can do. In particular, it's probably even more
+ *  likely to have bugs with multiple domains than LdapAuthenticationPlugin
+ *  itself, since AuthManager may well break some of the assumptions that
+ *  LdapAuthenticationPlugin makes based on the old AuthPlugin-using code, and
+ *  it doesn't support any username munging (i.e.
+ *  LdapAuthenticationPlugin::getCanonicalName()).
+ * @todo Someday someone who knows about authenticating against LDAP should
+ *  write an extension that doesn't have craziness like a global "domain"
+ *  variable where we have to guess at the correct value in half the entry
+ *  points.
+ */
+class LdapPrimaryAuthenticationProvider
+   extends AbstractPasswordPrimaryAuthenticationProvider
+{
+   private $hasMultipleDomains;
+   private $requestType;
+
+   public function __construct() {
+   parent::__construct();
+
+   $ldap = LdapAuthenticationPlugin::getInstance();
+   $this->hasMultipleDomains = count( $ldap->domainList() ) > 1;
+   $this->requestType = $this->hasMultipleDomains
+   ? PasswordDomainAuthenticationRequest::class
+   : PasswordAuthenticationRequest::class;
+
+   // Hooks to handle updating LDAP on various core events
+   \Hooks::register( 'UserSaveSettings', [ $this, 
'onUserSaveSettings' ] );
+   \Hooks::register( 'UserGroupsChanged', [ $this, 
'onUserGroupsChanged' ] );
+   \Hooks::register( 'UserLoggedIn', [ $this, 'onUserLoggedIn' ] );
+   \Hooks::register( 'LocalUserCreated', [ $this, 
'onLocalUserCreated' ] );
+   }
+
+   /**
+  

[MediaWiki-commits] [Gerrit] Support query_string response parsing - change (mediawiki...DonationInterface)

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

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

Change subject: Support query_string response parsing
..

Support query_string response parsing

This decodes a URL-encoded and query-string delimited response body.

Change-Id: I448db2cdfbf5d07fab9dcb362d90f518f730600f
---
M gateway_common/gateway.adapter.php
1 file changed, 9 insertions(+), 3 deletions(-)


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

diff --git a/gateway_common/gateway.adapter.php 
b/gateway_common/gateway.adapter.php
index 4454914..8111b78 100644
--- a/gateway_common/gateway.adapter.php
+++ b/gateway_common/gateway.adapter.php
@@ -1443,10 +1443,11 @@
// For anything else, delete all the headers and the blank line 
after
$noHeaders = preg_replace( '/^.*?\n\r?\n/ms', '', $rawResponse, 
1 );
$this->logger->info( "Raw Response:" . $noHeaders );
-   if ( $type === 'json' ) {
+   switch ( $type ) {
+   case 'json':
return json_decode( $noHeaders, true );
-   }
-   if ( $type === 'delimited' ) {
+
+   case 'delimited':
$delimiter = $this->transaction_option( 
'response_delimiter' );
$keys = $this->transaction_option( 'response_keys' );
if ( !$delimiter || !$keys ) {
@@ -1458,6 +1459,11 @@
throw new InvalidArgumentException( 'Wrong 
number of values found in delimited response.');
}
return $combined;
+
+   case 'query_string':
+   $parsed = array();
+   parse_str( $noHeaders, $parsed );
+   return $parsed;
}
return $noHeaders;
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I448db2cdfbf5d07fab9dcb362d90f518f730600f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DonationInterface
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] Defaults and comments - change (mediawiki...DonationInterface)

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

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

Change subject: Defaults and comments
..

Defaults and comments

Change-Id: I0af169a3efa2cf7ffc7efeea8f4de2e9ff1a61fb
---
M DonationInterface.php
M paypal_gateway/legacy/paypal_legacy.adapter.php
2 files changed, 4 insertions(+), 1 deletion(-)


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

diff --git a/DonationInterface.php b/DonationInterface.php
index 7e78a58..651e6f1 100644
--- a/DonationInterface.php
+++ b/DonationInterface.php
@@ -163,6 +163,7 @@
  * Global form dir
  */
 $wgDonationInterfaceHtmlFormDir = __DIR__ . '/gateway_forms/rapidhtml/html';
+# FIXME: Consider defaulting to true.
 $wgDonationInterfaceTest = false;
 
 /**
@@ -277,7 +278,8 @@
  * Where to send donors who click a 'cancel' button on a payment processor's 
web site.
  * Currently only used with PayPal.
  */
-$wgDonationInterfaceCancelPage = ''; 
//https://wikimediafoundation.org/wiki/Ways_to_Give
+//$wgDonationInterfaceCancelPage = 
'https://wikimediafoundation.org/wiki/Ways_to_Give';
+$wgDonationInterfaceCancelPage = 'Donate-error';
 
 /**
  * Retry Loop Count - If there's a place where the API can choose to loop on 
some retry behavior, do it this number of times.
diff --git a/paypal_gateway/legacy/paypal_legacy.adapter.php 
b/paypal_gateway/legacy/paypal_legacy.adapter.php
index 4f38a31..63308c4 100644
--- a/paypal_gateway/legacy/paypal_legacy.adapter.php
+++ b/paypal_gateway/legacy/paypal_legacy.adapter.php
@@ -187,6 +187,7 @@
case 'Donate':
case 'DonateXclick':
case 'DonateRecurring':
+   // FIXME: Push into a standard 
namevalue+redirect handler.
$this->transactions[ $transaction ][ 'url' ] =
$this->getGlobal( 'URL' ) . '?' . 
http_build_query( $this->buildRequestParams() );
$result = parent::do_transaction( $transaction 
);

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0af169a3efa2cf7ffc7efeea8f4de2e9ff1a61fb
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DonationInterface
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] cache_misc: HTTP/2 T96848 - change (operations/puppet)

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

Change subject: cache_misc: HTTP/2 T96848
..


cache_misc: HTTP/2 T96848

Change-Id: I3e34cca830ef5319979aa643e64d514983ce56ee
---
M hieradata/role/common/cache/misc.yaml
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/hieradata/role/common/cache/misc.yaml 
b/hieradata/role/common/cache/misc.yaml
index 731542e..2a016ad 100644
--- a/hieradata/role/common/cache/misc.yaml
+++ b/hieradata/role/common/cache/misc.yaml
@@ -23,3 +23,4 @@
   codfw: 'eqiad'
   ulsfo: 'codfw'
   esams: 'eqiad'
+tlsproxy::localssl::do_spdy: false

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

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

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


[MediaWiki-commits] [Gerrit] cache_misc: HTTP/2 T96848 - change (operations/puppet)

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

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

Change subject: cache_misc: HTTP/2 T96848
..

cache_misc: HTTP/2 T96848

Change-Id: I3e34cca830ef5319979aa643e64d514983ce56ee
---
M hieradata/role/common/cache/misc.yaml
1 file changed, 1 insertion(+), 0 deletions(-)


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

diff --git a/hieradata/role/common/cache/misc.yaml 
b/hieradata/role/common/cache/misc.yaml
index 731542e..2a016ad 100644
--- a/hieradata/role/common/cache/misc.yaml
+++ b/hieradata/role/common/cache/misc.yaml
@@ -23,3 +23,4 @@
   codfw: 'eqiad'
   ulsfo: 'codfw'
   esams: 'eqiad'
+tlsproxy::localssl::do_spdy: false

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3e34cca830ef5319979aa643e64d514983ce56ee
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] Fix for namespaces array being empty - change (mediawiki...ApprovedRevs)

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

Change subject: Fix for namespaces array being empty
..


Fix for namespaces array being empty

Change-Id: I117ac16f13f35f3e869aade6c6b739b7656b8010
---
M SpecialApprovedRevs.php
1 file changed, 8 insertions(+), 4 deletions(-)

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



diff --git a/SpecialApprovedRevs.php b/SpecialApprovedRevs.php
index 54c2f48..6605743 100644
--- a/SpecialApprovedRevs.php
+++ b/SpecialApprovedRevs.php
@@ -135,7 +135,11 @@
function getQueryInfo() {
global $egApprovedRevsNamespaces;
 
-   $namespacesString = '(' . implode( ',', 
$egApprovedRevsNamespaces ) . ')';
+   $mainCondsString = "( pp_propname = 'approvedrevs' AND pp_value 
= 'y' )";
+   if ( count( $egApprovedRevsNamespaces ) > 0 ) {
+   $mainCondsString .= " OR ( p.page_namespace IN ( " . 
implode( ',', $egApprovedRevsNamespaces ) . " ) )";
+   }
+
if ( $this->mMode == 'notlatest' ) {
return array(
'tables' => array(
@@ -156,7 +160,7 @@
'LEFT OUTER JOIN', 
'ar.page_id=pp_page'
),
),
-   'conds' => "p.page_latest != ar.rev_id AND 
((p.page_namespace IN $namespacesString) OR (pp_propname = 'approvedrevs' AND 
pp_value = 'y'))",
+   'conds' => "p.page_latest != ar.rev_id AND ( 
$mainCondsString )"
);
} elseif ( $this->mMode == 'unapproved' ) {
return array(
@@ -177,7 +181,7 @@
'LEFT OUTER JOIN', 
'ar.page_id=pp_page'
),
),
-   'conds' => "ar.page_id IS NULL AND 
((p.page_namespace IN $namespacesString) OR (pp_propname = 'approvedrevs' AND 
pp_value = 'y'))",
+   'conds' => "ar.page_id IS NULL AND ( 
$mainCondsString )"
);
} else { // all approved pages
return array(
@@ -199,7 +203,7 @@
'LEFT OUTER JOIN', 
'ar.page_id=pp_page'
),
),
-   'conds' => "(p.page_namespace IN 
$namespacesString) OR (pp_propname = 'approvedrevs' AND pp_value = 'y')",
+   'conds' => $mainCondsString
);
}
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I117ac16f13f35f3e869aade6c6b739b7656b8010
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ApprovedRevs
Gerrit-Branch: master
Gerrit-Owner: Yaron Koren 
Gerrit-Reviewer: Yaron Koren 
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 for namespaces array being empty - change (mediawiki...ApprovedRevs)

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

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

Change subject: Fix for namespaces array being empty
..

Fix for namespaces array being empty

Change-Id: I117ac16f13f35f3e869aade6c6b739b7656b8010
---
M SpecialApprovedRevs.php
1 file changed, 8 insertions(+), 4 deletions(-)


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

diff --git a/SpecialApprovedRevs.php b/SpecialApprovedRevs.php
index 54c2f48..6605743 100644
--- a/SpecialApprovedRevs.php
+++ b/SpecialApprovedRevs.php
@@ -135,7 +135,11 @@
function getQueryInfo() {
global $egApprovedRevsNamespaces;
 
-   $namespacesString = '(' . implode( ',', 
$egApprovedRevsNamespaces ) . ')';
+   $mainCondsString = "( pp_propname = 'approvedrevs' AND pp_value 
= 'y' )";
+   if ( count( $egApprovedRevsNamespaces ) > 0 ) {
+   $mainCondsString .= " OR ( p.page_namespace IN ( " . 
implode( ',', $egApprovedRevsNamespaces ) . " ) )";
+   }
+
if ( $this->mMode == 'notlatest' ) {
return array(
'tables' => array(
@@ -156,7 +160,7 @@
'LEFT OUTER JOIN', 
'ar.page_id=pp_page'
),
),
-   'conds' => "p.page_latest != ar.rev_id AND 
((p.page_namespace IN $namespacesString) OR (pp_propname = 'approvedrevs' AND 
pp_value = 'y'))",
+   'conds' => "p.page_latest != ar.rev_id AND ( 
$mainCondsString )"
);
} elseif ( $this->mMode == 'unapproved' ) {
return array(
@@ -177,7 +181,7 @@
'LEFT OUTER JOIN', 
'ar.page_id=pp_page'
),
),
-   'conds' => "ar.page_id IS NULL AND 
((p.page_namespace IN $namespacesString) OR (pp_propname = 'approvedrevs' AND 
pp_value = 'y'))",
+   'conds' => "ar.page_id IS NULL AND ( 
$mainCondsString )"
);
} else { // all approved pages
return array(
@@ -199,7 +203,7 @@
'LEFT OUTER JOIN', 
'ar.page_id=pp_page'
),
),
-   'conds' => "(p.page_namespace IN 
$namespacesString) OR (pp_propname = 'approvedrevs' AND pp_value = 'y')",
+   'conds' => $mainCondsString
);
}
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I117ac16f13f35f3e869aade6c6b739b7656b8010
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ApprovedRevs
Gerrit-Branch: master
Gerrit-Owner: Yaron Koren 

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


  1   2   3   4   >