[MediaWiki-commits] [Gerrit] Add $wgGadgetsEnableLegacyGadgets to allow disabling of lega... - change (mediawiki...Gadgets)

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

Change subject: Add $wgGadgetsEnableLegacyGadgets to allow disabling of legacy 
gadgets
..


Add $wgGadgetsEnableLegacyGadgets to allow disabling of legacy gadgets

Follows-up 192d37b19a4.

So we can turn them off in preparation of Gadgets 2.0, which
doesn't support them at all.

Change-Id: I98b4146579ccbbfcad8b83a51cc095da1fad673c
---
M GadgetHooks.php
M extension.json
2 files changed, 9 insertions(+), 3 deletions(-)

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



diff --git a/GadgetHooks.php b/GadgetHooks.php
index efec80a..2502a37 100644
--- a/GadgetHooks.php
+++ b/GadgetHooks.php
@@ -162,6 +162,8 @@
 * @return bool
 */
public static function beforePageDisplay( $out ) {
+   global $wgGadgetsEnableLegacyGadgets;
+
$gadgets = Gadget::loadList();
if ( !$gadgets ) {
return true;
@@ -189,8 +191,11 @@
}
}
 
-   // Allow other extensions, e.g. MobileFrontend, to disallow 
legacy gadgets
-   if ( Hooks::run( 'Gadgets::allowLegacy', array( 
$out-getContext() ) ) ) {
+   // Check if legacy gadgets are even enabled
+   if ( $wgGadgetsEnableLegacyGadgets 
+   // Allow other extensions, e.g. MobileFrontend, to 
disallow legacy gadgets
+   Hooks::run( 'Gadgets::allowLegacy', array( 
$out-getContext() ) )
+   ) {
$lb-execute( __METHOD__ );
 
$done = array();
diff --git a/extension.json b/extension.json
index 1e1e2b7..2a39601 100644
--- a/extension.json
+++ b/extension.json
@@ -56,7 +56,8 @@
},
config: {
GadgetsCaching: true,
-   GadgetsCacheType: false
+   GadgetsCacheType: false,
+   GadgetsEnableLegacyGadgets: true
},
manifest_version: 1
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I98b4146579ccbbfcad8b83a51cc095da1fad673c
Gerrit-PatchSet: 6
Gerrit-Project: mediawiki/extensions/Gadgets
Gerrit-Branch: master
Gerrit-Owner: Legoktm legoktm.wikipe...@gmail.com
Gerrit-Reviewer: Alex Monk kren...@gmail.com
Gerrit-Reviewer: Ori.livneh o...@wikimedia.org
Gerrit-Reviewer: Paladox thomasmulhall...@yahoo.com
Gerrit-Reviewer: Reedy re...@wikimedia.org
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 name of the 'PageViewUpdates' hook in docs - change (mediawiki/core)

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

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

Change subject: Fix name of the 'PageViewUpdates' hook in docs
..

Fix name of the 'PageViewUpdates' hook in docs

Added with commit 12c370c68b8bb2388be1829968e48d73f3b8d2e9

Change-Id: I53e90c2185841da1b4e2245f96748a1830003967
---
M docs/hooks.txt
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/30/225530/1

diff --git a/docs/hooks.txt b/docs/hooks.txt
index 2fd815e6..65ae988 100644
--- a/docs/hooks.txt
+++ b/docs/hooks.txt
@@ -2177,7 +2177,7 @@
 $confstr: reference to a hash key string which can be modified
 $user: User (object) requesting the page
 
-'PageViewUpdate': Allow database (or other) changes to be made after a
+'PageViewUpdates': Allow database (or other) changes to be made after a
 page view is seen by MediaWiki.  Note this does not capture views made
 via external caches such as Squid.
 $wikipage: WikiPage (object) for the page being viewed.

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I53e90c2185841da1b4e2245f96748a1830003967
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Ricordisamoa ricordisa...@openmailbox.org

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


[MediaWiki-commits] [Gerrit] Refactor Gadget construction process - change (mediawiki...Gadgets)

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

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

Change subject: Refactor Gadget construction process
..

Refactor Gadget construction process

The current method of setting private properties prevents the Gadget
object from being constructed by another class (like a GadgetRepo).

Instead, lets pass in arguments in an array.

Change-Id: I86853c72dfb323fb3e54be9ecff85973e30fe781
---
M Gadgets_body.php
1 file changed, 47 insertions(+), 14 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Gadgets 
refs/changes/28/225528/1

diff --git a/Gadgets_body.php b/Gadgets_body.php
index ce38797..02d1d86 100644
--- a/Gadgets_body.php
+++ b/Gadgets_body.php
@@ -39,6 +39,39 @@
/** @var array|bool Result of loadStructuredList() */
private static $definitionCache;
 
+   public function __construct( array $options ) {
+   foreach ( $options as $member = $option ) {
+   switch ( $member ) {
+   case 'scripts':
+   case 'styles':
+   case 'dependencies':
+   case 'name':
+   case 'definition':
+   case 'resourceLoaded':
+   case 'requiredRights':
+   case 'requiredSkins':
+   case 'targets':
+   case 'onByDefault':
+   case 'position':
+   case 'category':
+   $this-{$member} = $option;
+   break;
+   default:
+   throw new InvalidArgumentException( 
Unrecognized '$member' parameter );
+   }
+   }
+   }
+
+   /**
+* Whether the provided gadget id is valid
+*
+* @param string $id
+* @return bool
+*/
+   public static function isValidGadgetID( $id ) {
+   return strlen( $id )  0  ResourceLoader::isValidModuleName( 
ext.gadget.$id );
+   }
+
/**
 * Creates an instance of this class from definition in 
MediaWiki:Gadgets-definition
 * @param $definition String: Gadget definition
@@ -52,14 +85,14 @@
// NOTE: the gadget name is used as part of the name of a form 
field,
//  and must follow the rules defined in 
http://www.w3.org/TR/html4/types.html#type-cdata
//  Also, title-normalization applies.
-   $gadget = new Gadget();
-   $gadget-name = trim( str_replace( ' ', '_', $m[1] ) );
+   $info = array();
+   $info['name'] = trim( str_replace( ' ', '_', $m[1] ) );
// If the name is too long, then RL will throw an MWException 
when
// we try to register the module
-   if ( !ResourceLoader::isValidModuleName( 
$gadget-getModuleName() ) ) {
+   if ( !self::isValidGadgetID( $info['name'] ) ) {
return false;
}
-   $gadget-definition = $definition;
+   $info['definition'] = $definition;
$options = trim( $m[2], ' []' );
 
foreach ( preg_split( '/\s*\|\s*/', $options, -1, 
PREG_SPLIT_NO_EMPTY ) as $option ) {
@@ -74,25 +107,25 @@
 
switch ( $option ) {
case 'ResourceLoader':
-   $gadget-resourceLoaded = true;
+   $info['resourceLoaded'] = true;
break;
case 'dependencies':
-   $gadget-dependencies = $params;
+   $info['dependencies'] = $params;
break;
case 'rights':
-   $gadget-requiredRights = $params;
+   $info['requiredRights'] = $params;
break;
case 'skins':
-   $gadget-requiredSkins = $params;
+   $info['requiredSkins'] = $params;
break;
case 'default':
-   $gadget-onByDefault = true;
+   $info['onByDefault'] = true;
break;
case 'targets':
-   $gadget-targets = $params;
+   

[MediaWiki-commits] [Gerrit] Refactor Gadget construction process - change (mediawiki...Gadgets)

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

Change subject: Refactor Gadget construction process
..


Refactor Gadget construction process

The current method of setting private properties prevents the Gadget
object from being constructed by another class (like a GadgetRepo).

Instead, lets pass in arguments in an array.

Change-Id: I86853c72dfb323fb3e54be9ecff85973e30fe781
---
M Gadgets_body.php
1 file changed, 47 insertions(+), 14 deletions(-)

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



diff --git a/Gadgets_body.php b/Gadgets_body.php
index ce38797..02d1d86 100644
--- a/Gadgets_body.php
+++ b/Gadgets_body.php
@@ -39,6 +39,39 @@
/** @var array|bool Result of loadStructuredList() */
private static $definitionCache;
 
+   public function __construct( array $options ) {
+   foreach ( $options as $member = $option ) {
+   switch ( $member ) {
+   case 'scripts':
+   case 'styles':
+   case 'dependencies':
+   case 'name':
+   case 'definition':
+   case 'resourceLoaded':
+   case 'requiredRights':
+   case 'requiredSkins':
+   case 'targets':
+   case 'onByDefault':
+   case 'position':
+   case 'category':
+   $this-{$member} = $option;
+   break;
+   default:
+   throw new InvalidArgumentException( 
Unrecognized '$member' parameter );
+   }
+   }
+   }
+
+   /**
+* Whether the provided gadget id is valid
+*
+* @param string $id
+* @return bool
+*/
+   public static function isValidGadgetID( $id ) {
+   return strlen( $id )  0  ResourceLoader::isValidModuleName( 
ext.gadget.$id );
+   }
+
/**
 * Creates an instance of this class from definition in 
MediaWiki:Gadgets-definition
 * @param $definition String: Gadget definition
@@ -52,14 +85,14 @@
// NOTE: the gadget name is used as part of the name of a form 
field,
//  and must follow the rules defined in 
http://www.w3.org/TR/html4/types.html#type-cdata
//  Also, title-normalization applies.
-   $gadget = new Gadget();
-   $gadget-name = trim( str_replace( ' ', '_', $m[1] ) );
+   $info = array();
+   $info['name'] = trim( str_replace( ' ', '_', $m[1] ) );
// If the name is too long, then RL will throw an MWException 
when
// we try to register the module
-   if ( !ResourceLoader::isValidModuleName( 
$gadget-getModuleName() ) ) {
+   if ( !self::isValidGadgetID( $info['name'] ) ) {
return false;
}
-   $gadget-definition = $definition;
+   $info['definition'] = $definition;
$options = trim( $m[2], ' []' );
 
foreach ( preg_split( '/\s*\|\s*/', $options, -1, 
PREG_SPLIT_NO_EMPTY ) as $option ) {
@@ -74,25 +107,25 @@
 
switch ( $option ) {
case 'ResourceLoader':
-   $gadget-resourceLoaded = true;
+   $info['resourceLoaded'] = true;
break;
case 'dependencies':
-   $gadget-dependencies = $params;
+   $info['dependencies'] = $params;
break;
case 'rights':
-   $gadget-requiredRights = $params;
+   $info['requiredRights'] = $params;
break;
case 'skins':
-   $gadget-requiredSkins = $params;
+   $info['requiredSkins'] = $params;
break;
case 'default':
-   $gadget-onByDefault = true;
+   $info['onByDefault'] = true;
break;
case 'targets':
-   $gadget-targets = $params;
+   $info['targets'] = $params;
 

[MediaWiki-commits] [Gerrit] Add missing paths to maintenance/findHooks.php - change (mediawiki/core)

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

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

Change subject: Add missing paths to maintenance/findHooks.php
..

Add missing paths to maintenance/findHooks.php

* includes/changetags/
  created with commit 5c4681012e78a8d5004eea917eba90d448d7e0f3

* includes/exception/
  created with commit 557af130868dacfb981e916baa4dcbcb866e16a1

* includes/password/
  created with commit 95a8974c6bda2c6353612c40b01b9c78527b8956

Change-Id: Ie9047a1849969a078465d1e81ada16a7b47bc0ec
---
M maintenance/findHooks.php
1 file changed, 3 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/31/225531/1

diff --git a/maintenance/findHooks.php b/maintenance/findHooks.php
index 5cf4536..3414679 100644
--- a/maintenance/findHooks.php
+++ b/maintenance/findHooks.php
@@ -72,6 +72,7 @@
$IP . '/includes/api/',
$IP . '/includes/cache/',
$IP . '/includes/changes/',
+   $IP . '/includes/changetags/',
$IP . '/includes/clientpool/',
$IP . '/includes/content/',
$IP . '/includes/context/',
@@ -80,6 +81,7 @@
$IP . '/includes/debug/',
$IP . '/includes/deferred/',
$IP . '/includes/diff/',
+   $IP . '/includes/exception/',
$IP . '/includes/externalstore/',
$IP . '/includes/filebackend/',
$IP . '/includes/filerepo/',
@@ -95,6 +97,7 @@
$IP . '/includes/media/',
$IP . '/includes/page/',
$IP . '/includes/parser/',
+   $IP . '/includes/password/',
$IP . '/includes/rcfeed/',
$IP . '/includes/resourceloader/',
$IP . '/includes/revisiondelete/',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie9047a1849969a078465d1e81ada16a7b47bc0ec
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Ricordisamoa ricordisa...@openmailbox.org

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


[MediaWiki-commits] [Gerrit] Replace jquery.json dependency with JSON polyfill - change (mediawiki...Gadgets)

2015-07-18 Thread Alex Monk (Code Review)
Alex Monk has submitted this change and it was merged.

Change subject: Replace jquery.json dependency with JSON polyfill
..


Replace jquery.json dependency with JSON polyfill

...and move the dependency to the right module.

Change-Id: Ia71aaef9f59d0ed3c40ed79c9e255b0688c78a87
---
M Gadgets.php
M modules/ext.gadgets.api.js
2 files changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Alex Monk: Verified; Looks good to me, approved



diff --git a/Gadgets.php b/Gadgets.php
index 9cecc03..04a9a2a 100644
--- a/Gadgets.php
+++ b/Gadgets.php
@@ -205,6 +205,7 @@
'mediawiki.Title',
'mediawiki.util',
'mediawiki.api',
+   'json',
'user.tokens',
),
),
@@ -223,7 +224,6 @@
'jquery.ui.autocomplete',
'jquery.ui.dialog',
'jquery.createPropCloud',
-   'jquery.json',
'jquery.spinner',
'mediawiki.Title',
'mediawiki.util',
diff --git a/modules/ext.gadgets.api.js b/modules/ext.gadgets.api.js
index 0e6477e..9018f6d 100644
--- a/modules/ext.gadgets.api.js
+++ b/modules/ext.gadgets.api.js
@@ -255,7 +255,7 @@
query = {
action: 'edit',
title: t.getPrefixedDb(),
-   text: $.toJSON( gadget.metadata 
),
+   text: JSON.stringify( 
gadget.metadata ),
summary: mw.msg( 
'gadgetmanager-comment-modify', gadget.id ),
token: mw.user.tokens.get( 
'editToken' )
};

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia71aaef9f59d0ed3c40ed79c9e255b0688c78a87
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Gadgets
Gerrit-Branch: RL2
Gerrit-Owner: Legoktm legoktm.wikipe...@gmail.com
Gerrit-Reviewer: Alex Monk kren...@gmail.com
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Enable most PHPCS PSR2 sniffs - change (mediawiki...Wikibase)

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

Change subject: Enable most PHPCS PSR2 sniffs
..


Enable most PHPCS PSR2 sniffs

These are all PRS2 sniffs from the MediaWiki rule set plus a few more
that do not trigger any error in our code base (or almost none in
case of the newlines at the end of the file).

Change-Id: I3b3de98d8831c398c8dda911cef2e272d6cf9769
---
M Wikibase.php
M lib/includes/serializers/Serializer.php
M phpcs.xml
M repo/includes/LanguageFallbackLabelDescriptionLookupFactory.php
M repo/includes/actions/EditPropertyAction.php
M repo/includes/specials/SpecialListProperties.php
M repo/tests/phpunit/includes/CopyrightMessageBuilderTest.php
M 
repo/tests/phpunit/includes/LanguageFallbackLabelDescriptionLookupFactoryTest.php
M repo/tests/phpunit/includes/api/MergeItemsTest.php
M repo/tests/phpunit/includes/specials/SpecialListPropertiesTest.php
M repo/tests/phpunit/includes/specials/SpecialPageCopyrightViewTest.php
11 files changed, 5 insertions(+), 11 deletions(-)

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



diff --git a/Wikibase.php b/Wikibase.php
index f449ed0..c0bcf18 100644
--- a/Wikibase.php
+++ b/Wikibase.php
@@ -37,4 +37,3 @@
 if ( !array_key_exists( 'wgEnableWikibaseClient', $GLOBALS ) || 
$GLOBALS['wgEnableWikibaseClient'] ) {
require_once __DIR__ . '/client/WikibaseClient.php';
 }
-
diff --git a/lib/includes/serializers/Serializer.php 
b/lib/includes/serializers/Serializer.php
index 802b236..fb0b76d 100644
--- a/lib/includes/serializers/Serializer.php
+++ b/lib/includes/serializers/Serializer.php
@@ -51,4 +51,3 @@
public function getOptions();
 
 }
-
diff --git a/phpcs.xml b/phpcs.xml
index 6cf41d9..c547890 100644
--- a/phpcs.xml
+++ b/phpcs.xml
@@ -57,9 +57,13 @@
exclude-patterntests*phpunit*Test*\.php/exclude-pattern
/rule
 
-   !-- TODO: Enable PSR2 sniffs. --
+   rule ref=PSR2.Classes.PropertyDeclaration /
rule ref=PSR2.ControlStructures.ElseIfDeclaration /
+   rule ref=PSR2.Files.ClosingTag /
+   rule ref=PSR2.Files.EndFileNewline /
rule ref=PSR2.Methods.MethodDeclaration /
+   rule ref=PSR2.Namespaces.NamespaceDeclaration /
+   rule ref=PSR2.Namespaces.UseDeclaration /
 
rule ref=Squiz.Classes.ValidClassName.NotCamelCaps

exclude-patternDataAccess*Scribunto*Scribunto_LuaWikibase*Library/exclude-pattern
diff --git a/repo/includes/LanguageFallbackLabelDescriptionLookupFactory.php 
b/repo/includes/LanguageFallbackLabelDescriptionLookupFactory.php
index acf467d..471a5f6 100644
--- a/repo/includes/LanguageFallbackLabelDescriptionLookupFactory.php
+++ b/repo/includes/LanguageFallbackLabelDescriptionLookupFactory.php
@@ -93,4 +93,3 @@
}
 
 }
-
diff --git a/repo/includes/actions/EditPropertyAction.php 
b/repo/includes/actions/EditPropertyAction.php
index 85f3192..9702e31 100644
--- a/repo/includes/actions/EditPropertyAction.php
+++ b/repo/includes/actions/EditPropertyAction.php
@@ -13,4 +13,3 @@
 class EditPropertyAction extends EditEntityAction {
 
 }
-
diff --git a/repo/includes/specials/SpecialListProperties.php 
b/repo/includes/specials/SpecialListProperties.php
index 8ce4177..940cf50 100644
--- a/repo/includes/specials/SpecialListProperties.php
+++ b/repo/includes/specials/SpecialListProperties.php
@@ -218,4 +218,3 @@
}
 
 }
-
diff --git a/repo/tests/phpunit/includes/CopyrightMessageBuilderTest.php 
b/repo/tests/phpunit/includes/CopyrightMessageBuilderTest.php
index 5397cae..968f39f 100644
--- a/repo/tests/phpunit/includes/CopyrightMessageBuilderTest.php
+++ b/repo/tests/phpunit/includes/CopyrightMessageBuilderTest.php
@@ -53,4 +53,3 @@
}
 
 }
-
diff --git 
a/repo/tests/phpunit/includes/LanguageFallbackLabelDescriptionLookupFactoryTest.php
 
b/repo/tests/phpunit/includes/LanguageFallbackLabelDescriptionLookupFactoryTest.php
index 1d2ef82..c74716c 100644
--- 
a/repo/tests/phpunit/includes/LanguageFallbackLabelDescriptionLookupFactoryTest.php
+++ 
b/repo/tests/phpunit/includes/LanguageFallbackLabelDescriptionLookupFactoryTest.php
@@ -67,4 +67,3 @@
}
 
 }
-
diff --git a/repo/tests/phpunit/includes/api/MergeItemsTest.php 
b/repo/tests/phpunit/includes/api/MergeItemsTest.php
index 1db6ef9..ef1261b 100644
--- a/repo/tests/phpunit/includes/api/MergeItemsTest.php
+++ b/repo/tests/phpunit/includes/api/MergeItemsTest.php
@@ -17,7 +17,6 @@
 use Wikibase\Test\MockRepository;
 use Wikibase\Lib\Store\EntityRedirect;
 
-
 /**
  * @covers Wikibase\Repo\Api\MergeItems
  *
diff --git a/repo/tests/phpunit/includes/specials/SpecialListPropertiesTest.php 
b/repo/tests/phpunit/includes/specials/SpecialListPropertiesTest.php
index f5a0b2c..922fbad 100644
--- a/repo/tests/phpunit/includes/specials/SpecialListPropertiesTest.php
+++ b/repo/tests/phpunit/includes/specials/SpecialListPropertiesTest.php
@@ -159,4 +159,3 @@
}
 
 }
-
diff --git 

[MediaWiki-commits] [Gerrit] ores: Install uwsgi python3 plugin only on web nodes - change (operations/puppet)

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

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

Change subject: ores: Install uwsgi python3 plugin only on web nodes
..

ores: Install uwsgi python3 plugin only on web nodes

Change-Id: I5f5cb111200ab4401318fa4c0427b4ac0e83dd89
---
M modules/ores/manifests/base.pp
M modules/ores/manifests/web.pp
2 files changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/26/225526/1

diff --git a/modules/ores/manifests/base.pp b/modules/ores/manifests/base.pp
index d6d9dc9..4cb0df1 100644
--- a/modules/ores/manifests/base.pp
+++ b/modules/ores/manifests/base.pp
@@ -15,9 +15,6 @@
 # takes forever and is quite buggy
 require_package('python3-scipy')
 
-# ORES is a python3 application \o/
-require_package('uwsgi-plugin-python3')
-
 # It requires the enchant debian package
 require_package('enchant')
 
diff --git a/modules/ores/manifests/web.pp b/modules/ores/manifests/web.pp
index 99a4eb1..f755bd7 100644
--- a/modules/ores/manifests/web.pp
+++ b/modules/ores/manifests/web.pp
@@ -1,6 +1,9 @@
 # = Class: ores::web
 # Sets up a uwsgi based web server for ORES running python3
 class ores::web {
+# ORES is a python3 application \o/
+require_package('uwsgi-plugin-python3')
+
 uwsgi::app { 'ores-web':
 settings = {
 uwsgi = {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5f5cb111200ab4401318fa4c0427b4ac0e83dd89
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Yuvipanda yuvipa...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] ores: Install uwsgi python3 plugin only on web nodes - change (operations/puppet)

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

Change subject: ores: Install uwsgi python3 plugin only on web nodes
..


ores: Install uwsgi python3 plugin only on web nodes

Change-Id: I5f5cb111200ab4401318fa4c0427b4ac0e83dd89
---
M modules/ores/manifests/base.pp
M modules/ores/manifests/web.pp
2 files changed, 3 insertions(+), 3 deletions(-)

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



diff --git a/modules/ores/manifests/base.pp b/modules/ores/manifests/base.pp
index d6d9dc9..4cb0df1 100644
--- a/modules/ores/manifests/base.pp
+++ b/modules/ores/manifests/base.pp
@@ -15,9 +15,6 @@
 # takes forever and is quite buggy
 require_package('python3-scipy')
 
-# ORES is a python3 application \o/
-require_package('uwsgi-plugin-python3')
-
 # It requires the enchant debian package
 require_package('enchant')
 
diff --git a/modules/ores/manifests/web.pp b/modules/ores/manifests/web.pp
index 99a4eb1..f755bd7 100644
--- a/modules/ores/manifests/web.pp
+++ b/modules/ores/manifests/web.pp
@@ -1,6 +1,9 @@
 # = Class: ores::web
 # Sets up a uwsgi based web server for ORES running python3
 class ores::web {
+# ORES is a python3 application \o/
+require_package('uwsgi-plugin-python3')
+
 uwsgi::app { 'ores-web':
 settings = {
 uwsgi = {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5f5cb111200ab4401318fa4c0427b4ac0e83dd89
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Yuvipanda yuvipa...@wikimedia.org
Gerrit-Reviewer: Yuvipanda yuvipa...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Map 'gettext' to 'pot' - change (mediawiki...SyntaxHighlight_GeSHi)

2015-07-18 Thread John Vandenberg (Code Review)
John Vandenberg has uploaded a new change for review.

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

Change subject: Map 'gettext' to 'pot'
..

Map 'gettext' to 'pot'

Bug: T105889
Change-Id: I41a7441987bae95bfb7e138f06d9c27feef070b9
---
M SyntaxHighlight_GeSHi.compat.php
1 file changed, 1 insertion(+), 0 deletions(-)


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

diff --git a/SyntaxHighlight_GeSHi.compat.php b/SyntaxHighlight_GeSHi.compat.php
index 6be48d0..1ca6f68 100644
--- a/SyntaxHighlight_GeSHi.compat.php
+++ b/SyntaxHighlight_GeSHi.compat.php
@@ -89,6 +89,7 @@
'rpmspec'   = 'spec',
'rsplus'= 'splus',
'bnf'   = 'ebnf',
+   'gettext'   = 'pot',
 
// ML
'ocaml-brief' = 'ocaml',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I41a7441987bae95bfb7e138f06d9c27feef070b9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SyntaxHighlight_GeSHi
Gerrit-Branch: master
Gerrit-Owner: John Vandenberg jay...@gmail.com

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


[MediaWiki-commits] [Gerrit] Revert Add $wgGadgetsEnableLegacyGadgets to allow disabling... - change (mediawiki...Gadgets)

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

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

Change subject: Revert Add $wgGadgetsEnableLegacyGadgets to allow disabling of 
legacy gadgets
..

Revert Add $wgGadgetsEnableLegacyGadgets to allow disabling of legacy gadgets

This reverts commit 036aa3d876d56a83fc43734f2c3510929709f544.

Change-Id: I90840cbdaa1d6eabde3fffd113dc7a945a876e77
---
M GadgetHooks.php
M extension.json
2 files changed, 3 insertions(+), 9 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Gadgets 
refs/changes/29/225529/1

diff --git a/GadgetHooks.php b/GadgetHooks.php
index 2502a37..efec80a 100644
--- a/GadgetHooks.php
+++ b/GadgetHooks.php
@@ -162,8 +162,6 @@
 * @return bool
 */
public static function beforePageDisplay( $out ) {
-   global $wgGadgetsEnableLegacyGadgets;
-
$gadgets = Gadget::loadList();
if ( !$gadgets ) {
return true;
@@ -191,11 +189,8 @@
}
}
 
-   // Check if legacy gadgets are even enabled
-   if ( $wgGadgetsEnableLegacyGadgets 
-   // Allow other extensions, e.g. MobileFrontend, to 
disallow legacy gadgets
-   Hooks::run( 'Gadgets::allowLegacy', array( 
$out-getContext() ) )
-   ) {
+   // Allow other extensions, e.g. MobileFrontend, to disallow 
legacy gadgets
+   if ( Hooks::run( 'Gadgets::allowLegacy', array( 
$out-getContext() ) ) ) {
$lb-execute( __METHOD__ );
 
$done = array();
diff --git a/extension.json b/extension.json
index 2a39601..1e1e2b7 100644
--- a/extension.json
+++ b/extension.json
@@ -56,8 +56,7 @@
},
config: {
GadgetsCaching: true,
-   GadgetsCacheType: false,
-   GadgetsEnableLegacyGadgets: true
+   GadgetsCacheType: false
},
manifest_version: 1
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I90840cbdaa1d6eabde3fffd113dc7a945a876e77
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Gadgets
Gerrit-Branch: master
Gerrit-Owner: Alex Monk kren...@gmail.com

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


[MediaWiki-commits] [Gerrit] Revert Add $wgGadgetsEnableLegacyGadgets to allow disabling... - change (mediawiki...Gadgets)

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

Change subject: Revert Add $wgGadgetsEnableLegacyGadgets to allow disabling of 
legacy gadgets
..


Revert Add $wgGadgetsEnableLegacyGadgets to allow disabling of legacy gadgets

This reverts commit 036aa3d876d56a83fc43734f2c3510929709f544.

Change-Id: I90840cbdaa1d6eabde3fffd113dc7a945a876e77
---
M GadgetHooks.php
M extension.json
2 files changed, 3 insertions(+), 9 deletions(-)

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



diff --git a/GadgetHooks.php b/GadgetHooks.php
index 2502a37..efec80a 100644
--- a/GadgetHooks.php
+++ b/GadgetHooks.php
@@ -162,8 +162,6 @@
 * @return bool
 */
public static function beforePageDisplay( $out ) {
-   global $wgGadgetsEnableLegacyGadgets;
-
$gadgets = Gadget::loadList();
if ( !$gadgets ) {
return true;
@@ -191,11 +189,8 @@
}
}
 
-   // Check if legacy gadgets are even enabled
-   if ( $wgGadgetsEnableLegacyGadgets 
-   // Allow other extensions, e.g. MobileFrontend, to 
disallow legacy gadgets
-   Hooks::run( 'Gadgets::allowLegacy', array( 
$out-getContext() ) )
-   ) {
+   // Allow other extensions, e.g. MobileFrontend, to disallow 
legacy gadgets
+   if ( Hooks::run( 'Gadgets::allowLegacy', array( 
$out-getContext() ) ) ) {
$lb-execute( __METHOD__ );
 
$done = array();
diff --git a/extension.json b/extension.json
index 2a39601..1e1e2b7 100644
--- a/extension.json
+++ b/extension.json
@@ -56,8 +56,7 @@
},
config: {
GadgetsCaching: true,
-   GadgetsCacheType: false,
-   GadgetsEnableLegacyGadgets: true
+   GadgetsCacheType: false
},
manifest_version: 1
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I90840cbdaa1d6eabde3fffd113dc7a945a876e77
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Gadgets
Gerrit-Branch: master
Gerrit-Owner: Alex Monk kren...@gmail.com
Gerrit-Reviewer: Alex Monk kren...@gmail.com
Gerrit-Reviewer: Legoktm legoktm.wikipe...@gmail.com
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 8b7b20b9: Add new i18n directory to banana testing - change (mediawiki...VisualEditor)

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

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

Change subject: Follow-up 8b7b20b9: Add new i18n directory to banana testing
..

Follow-up 8b7b20b9: Add new i18n directory to banana testing

Change-Id: Ic8612e9646af4a3bfd8228ef9e4fa4e8162881c9
---
M Gruntfile.js
1 file changed, 4 insertions(+), 1 deletion(-)


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

diff --git a/Gruntfile.js b/Gruntfile.js
index e61c643..14c88cb 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -79,7 +79,10 @@
all: 'modules/**/*.css'
},
banana: {
-   all: 'modules/ve-{mw,wmf}/i18n/'
+   all: [
+   'modules/ve-{mw,wmf}/i18n/',
+   'modules/ve-mw/tests/browser/i18n'
+   ]
},
jsonlint: {
all: [

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic8612e9646af4a3bfd8228ef9e4fa4e8162881c9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Jforrester jforres...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Remove support for gettext documentation in non-tux editor - change (mediawiki...Translate)

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

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

Change subject: Remove support for gettext documentation in non-tux editor
..

Remove support for gettext documentation in non-tux editor

Change-Id: Id108045e0c8d0772db59c16a99a5a6f17a1f76c3
---
M utils/TranslationHelpers.php
1 file changed, 0 insertions(+), 54 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Translate 
refs/changes/44/225544/1

diff --git a/utils/TranslationHelpers.php b/utils/TranslationHelpers.php
index 0558398..efc34a0 100644
--- a/utils/TranslationHelpers.php
+++ b/utils/TranslationHelpers.php
@@ -436,12 +436,6 @@
 
$class = 'mw-sp-translate-edit-info';
 
-   $gettext = $this-formatGettextComments();
-   if ( $info !== null  $gettext ) {
-   $info .= Html::element( 'hr' );
-   }
-   $info .= $gettext;
-
// The information is most likely in English
$divAttribs = array( 'dir' = 'ltr', 'lang' = 'en', 'class' = 
'mw-content-ltr' );
 
@@ -462,54 +456,6 @@
$context-msg( 'translate-edit-information' 
)-rawParams( $edit )-escaped(),
Html::rawElement( 'div', $divAttribs, $contents ), 
array( 'class' = $class )
);
-   }
-
-   protected function formatGettextComments() {
-   if ( !$this-handle-isValid() ) {
-   return '';
-   }
-
-   // We need to get the primary group to get the correct file
-   // So $group can be different from $this-group
-   $group = $this-handle-getGroup();
-   if ( !$group instanceof FileBasedMessageGroup ) {
-   return '';
-   }
-
-   $ffs = $group-getFFS();
-   if ( $ffs instanceof GettextFFS ) {
-   global $wgContLang;
-   $mykey = $wgContLang-lcfirst( $this-handle-getKey() 
);
-   $mykey = str_replace( ' ', '_', $mykey );
-   $data = $ffs-read( $group-getSourceLanguage() );
-   $help = $data['TEMPLATE'][$mykey]['comments'];
-   // Do not display an empty comment. That's no help and 
takes up unnecessary space.
-   $conf = $group-getConfiguration();
-   if ( isset( $conf['BASIC']['codeBrowser'] ) ) {
-   $out = '';
-   $pattern = $conf['BASIC']['codeBrowser'];
-   $pattern = str_replace( '%FILE%', '\1', 
$pattern );
-   $pattern = str_replace( '%LINE%', '\2', 
$pattern );
-   $pattern = [$pattern \\1:\\2];
-   foreach ( $help as $type = $lines ) {
-   if ( $type === ':' ) {
-   $files = '';
-   foreach ( $lines as $line ) {
-   $files .= ' ' . 
preg_replace( '/([^ :]+):(\d+)/', $pattern, $line );
-   }
-   $out .= nowiki#:/nowiki 
$filesbr /;
-   } else {
-   foreach ( $lines as $line ) {
-   $out .= 
nowiki#$type/nowiki $linebr /;
-   }
-   }
-   }
-
-   return $out;
-   }
-   }
-
-   return '';
}
 
protected function getPageDiff() {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id108045e0c8d0772db59c16a99a5a6f17a1f76c3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Translate
Gerrit-Branch: master
Gerrit-Owner: Nikerabbit niklas.laxst...@gmail.com

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


[MediaWiki-commits] [Gerrit] Follow-up 8b7b20b9: Add new i18n directory to banana testing - change (mediawiki...VisualEditor)

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

Change subject: Follow-up 8b7b20b9: Add new i18n directory to banana testing
..


Follow-up 8b7b20b9: Add new i18n directory to banana testing

Change-Id: Ic8612e9646af4a3bfd8228ef9e4fa4e8162881c9
---
M Gruntfile.js
1 file changed, 4 insertions(+), 1 deletion(-)

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



diff --git a/Gruntfile.js b/Gruntfile.js
index e61c643..14c88cb 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -79,7 +79,10 @@
all: 'modules/**/*.css'
},
banana: {
-   all: 'modules/ve-{mw,wmf}/i18n/'
+   all: [
+   'modules/ve-{mw,wmf}/i18n/',
+   'modules/ve-mw/tests/browser/i18n'
+   ]
},
jsonlint: {
all: [

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic8612e9646af4a3bfd8228ef9e4fa4e8162881c9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Jforrester jforres...@wikimedia.org
Gerrit-Reviewer: Alex Monk kren...@gmail.com
Gerrit-Reviewer: Amire80 amir.ahar...@mail.huji.ac.il
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Split script tests into help and simulate tests - change (pywikibot/core)

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

Change subject: Split script tests into help and simulate tests
..


Split script tests into help and simulate tests

List 'version' as an unrunable script, as it does
not support global options.

Four auto-run scripts are moved from expected failures
to be allowed failures, as their output is highly
variable depending on existence of site templates or
categories, and may not emit output within the time
given on wikis with large backlogs.

Change-Id: I7f29107f2d4db5e6c639f349e83ce4705d478034
---
M tests/script_tests.py
M tests/utils.py
2 files changed, 91 insertions(+), 61 deletions(-)

Approvals:
  John Vandenberg: Looks good to me, but someone else must approve
  XZise: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/tests/script_tests.py b/tests/script_tests.py
index 78a6c34..f7938cd 100644
--- a/tests/script_tests.py
+++ b/tests/script_tests.py
@@ -11,8 +11,6 @@
 import os
 import sys
 
-from pywikibot import config
-
 from tests import _root_dir
 from tests.aspects import unittest, DefaultSiteTestCase, MetaTestCaseClass, 
PwbTestCase
 from tests.utils import allowed_failure, execute_pwb, add_metaclass
@@ -63,6 +61,7 @@
   if not check_script_deps(name)]
 
 unrunnable_script_list = [
+'version',  # does not use global args
 'script_wui',   # depends on lua compiling
 ]
 
@@ -145,7 +144,6 @@
 'spamremove': 'No spam site specified',
 'transferbot': 'Target site not different from source site',  # Bug 68662
 'unusedfiles': ('Working on', None),
-'version': 'unicode test: ',
 'watchlist': 'Retrieving watchlist',
 
 # The following auto-run and typically cant be validated,
@@ -180,21 +178,27 @@
   '(set PYWIKIBOT2_TEST_AUTORUN=1 to enable):\n  %r'
   % auto_run_script_list)
 
-tests = (['test__login_help'] +
- ['test_' + name + '_help'
+tests = (['test__login'] +
+ ['test_' + name
   for name in sorted(script_list)
-  if name != 'login'] +
- ['test__login_simulate'])
+  if name != 'login' and
+  name not in unrunnable_script_list
+  ])
 
-tests += ['test_' + name + '_simulate'
+test_list = ['tests.script_tests.TestScriptHelp.' + name
+ for name in tests]
+
+tests = (['test__login'] +
+ ['test_' + name
   for name in sorted(script_list)
   if name != 'login' and
   name not in failed_dep_script_list and
   name not in unrunnable_script_list and
-  (enable_autorun_tests or name not in auto_run_script_list)]
+  (enable_autorun_tests or name not in auto_run_script_list)
+  ])
 
-test_list = ['tests.script_tests.TestScript.' + name
- for name in tests]
+test_list += ['tests.script_tests.TestScriptSimulate.' + name
+  for name in tests]
 
 tests = loader.loadTestsFromNames(test_list)
 suite = unittest.TestSuite()
@@ -214,7 +218,7 @@
 
 def __new__(cls, name, bases, dct):
 Create the new class.
-def test_execution(script_name, args=[], expected_results=None):
+def test_execution(script_name, args=[]):
 is_autorun = '-help' not in args and script_name in 
auto_run_script_list
 
 def test_skip_script(self):
@@ -234,8 +238,8 @@
 if is_autorun:
 timeout = 5
 
-if expected_results and script_name in expected_results:
-error = expected_results[script_name]
+if self._results and script_name in self._results:
+error = self._results[script_name]
 if isinstance(error, basestring):
 stdout = None
 else:
@@ -244,7 +248,12 @@
 stdout = None
 error = None
 
-result = execute_pwb(cmd, data_in, timeout=timeout, 
error=error)
+test_overrides = {}
+if not hasattr(self, 'net') or not self.net:
+test_overrides['pywikibot.Site'] = 'None'
+
+result = execute_pwb(cmd, data_in, timeout=timeout, 
error=error,
+ overrides=test_overrides)
 
 stderr = result['stderr'].split('\n')
 stderr_sleep = [l for l in stderr
@@ -307,6 +316,8 @@
 return test_skip_script
 return testScript
 
+argument = dct['_argument']
+
 for script_name in script_list:
 # force login to be the first, alphabetically, so the login
 # message does not unexpectedly occur during execution of
@@ -314,66 +325,51 @@
 # unrunnable script tests are disabled by default in load_tests()
 
 

[MediaWiki-commits] [Gerrit] [FIX] Implement getargspec in tools - change (pywikibot/core)

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

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

Change subject: [FIX] Implement getargspec in tools
..

[FIX] Implement getargspec in tools

With version 3 inspect.getargspec has been deprecated and with version 3.6 it
is supposed to be removed. This implements getargspec in tools which just calls
the implementation before Python 3.3. In Python 3.3 it calls the replacement,
inspect.signature, and constructs a result simulating getargspec from it.

Bug: T106209
Change-Id: Ib68f09b3e47169279d9725ae0ddfab71009b2e1c
---
M pywikibot/data/api.py
M pywikibot/tools/__init__.py
M tests/tools_tests.py
3 files changed, 79 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/37/225537/1

diff --git a/pywikibot/data/api.py b/pywikibot/data/api.py
index 88701de..7d4fbfa 100644
--- a/pywikibot/data/api.py
+++ b/pywikibot/data/api.py
@@ -29,7 +29,9 @@
 
 import pywikibot
 from pywikibot import config, login
-from pywikibot.tools import MediaWikiVersion, deprecated, itergroup, ip, PY2
+from pywikibot.tools import (
+MediaWikiVersion, deprecated, itergroup, ip, PY2, getargspec,
+)
 from pywikibot.exceptions import (
 Server504Error, Server414Error, FatalServerError, Error
 )
@@ -1499,7 +1501,7 @@
 for super_cls in inspect.getmro(cls):
 if not super_cls.__name__.endswith('Request'):
 break
-args |= set(inspect.getargspec(super_cls.__init__)[0])
+args |= set(getargspec(super_cls.__init__)[0])
 else:
 raise ValueError('Request was not a super class of '
  '{0!r}'.format(cls))
diff --git a/pywikibot/tools/__init__.py b/pywikibot/tools/__init__.py
index bd96771..a73d2f7 100644
--- a/pywikibot/tools/__init__.py
+++ b/pywikibot/tools/__init__.py
@@ -27,10 +27,41 @@
 
 if not PY2:
 import queue as Queue
+
 basestring = (str,)
 unicode = str
 else:
 import Queue
+
+
+if PYTHON_VERSION  (3, 3):
+ArgSpec = inspect.ArgSpec
+getargspec = inspect.getargspec
+else:
+ArgSpec = collections.namedtuple('ArgSpec', ['args', 'varargs', 'keywords',
+ 'defaults'])
+
+def getargspec(func):
+Python 3 implementation using inspect.signature.
+sig = inspect.signature(func)
+args = []
+defaults = []
+varargs = None
+kwargs = None
+for p in sig.parameters.values():
+if p.kind == inspect.Parameter.VAR_POSITIONAL:
+varargs = p.name
+elif p.kind == inspect.Parameter.VAR_KEYWORD:
+kwargs = p.name
+else:
+args += [p.name]
+if p.default != inspect.Parameter.empty:
+defaults += [p.default]
+if defaults:
+defaults = tuple(defaults)
+else:
+defaults = None
+return ArgSpec(args, varargs, kwargs, defaults)
 
 
 def print_debug(msg, *args, **kwargs):
@@ -1287,7 +1318,7 @@
 
 name = obj.__full_name__
 depth = get_wrapper_depth(wrapper) + 1
-args, varargs, kwargs, _ = inspect.getargspec(wrapper.__wrapped__)
+args, varargs, kwargs, _ = getargspec(wrapper.__wrapped__)
 if varargs is not None and kwargs is not None:
 raise ValueError(u'{1} may not have * or ** args.'.format(
 name))
diff --git a/tests/tools_tests.py b/tests/tools_tests.py
index b60b2a5..ccb351d 100644
--- a/tests/tools_tests.py
+++ b/tests/tools_tests.py
@@ -408,6 +408,49 @@
 self.assertRaises(StopIteration, next, deduper)
 
 
+class TestArgSpec(TestCase):
+
+Test getargspec and ArgSpec from tools.
+
+net = False
+
+@staticmethod
+def method_test_args(a, b):
+Test method with two positional arguments.
+return (['a', 'b'], None, None, None)
+
+@staticmethod
+def method_test_kwargs(a, b=42):
+Test method with one positional and one keyword argument.
+return (['a', 'b'], None, None, (42,))
+
+@staticmethod
+def method_test_varargs(a, b, *var):
+Test method with two positional arguments and var args.
+return (['a', 'b'], 'var', None, None)
+
+@staticmethod
+def method_test_varkwargs(a, b, **var):
+Test method with two positional arguments and var kwargs.
+return (['a', 'b'], None, 'var', None)
+
+@staticmethod
+def method_test_vars(a, b, *args, **kwargs):
+Test method with two positional arguments and both var args.
+return (['a', 'b'], 'args', 'kwargs', None)
+
+def test_argspec(self):
+Test the different methods.
+for m in dir(TestArgSpec):
+if not m.startswith('method_test_'):
+continue
+m = getattr(self, m)
+# all expect at 

[MediaWiki-commits] [Gerrit] WIP: Use OOUI for Special:UserRights - change (mediawiki/core)

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

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

Change subject: WIP: Use OOUI for Special:UserRights
..

WIP: Use OOUI for Special:UserRights

Change-Id: I518a29aa82d9bb6626ae5fb692b34f895cab4b36
---
M includes/specials/SpecialUserrights.php
M resources/Resources.php
A resources/src/mediawiki.special/mediawiki.special.userrights.css
3 files changed, 106 insertions(+), 54 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/36/225536/1

diff --git a/includes/specials/SpecialUserrights.php 
b/includes/specials/SpecialUserrights.php
index 0158fdb..d5f449f 100644
--- a/includes/specials/SpecialUserrights.php
+++ b/includes/specials/SpecialUserrights.php
@@ -421,9 +421,35 @@
 * Output a form to allow searching for a user
 */
function switchForm() {
-   $this-getOutput()-addModules( 'mediawiki.userSuggest' );
+   $out = $this-getOutput();
+   $out-enableOOUI();
+   $out-addModules( array(
+   'mediawiki.widgets',
+   'mediawiki.special.userrights',
+   ) );
 
-   $this-getOutput()-addHTML(
+   $fieldset = new OOUI\FieldsetLayout( array(
+   'label' = $this-msg( 'userrights-lookup-user' 
)-text(),
+   'items' = array(
+   new OOUI\LabelWidget( array(
+   'input' = 'userrights-username',
+   'label' = $this-msg( 
'userrights-user-editname' )-text(),
+   'classes' = array( 'userrights-label' 
),
+   ) ),
+   new MediaWiki\Widget\UserInputWidget( array(
+   'id' = 'username',
+   'name' = 'user',
+   'value' = str_replace( '_', ' ', 
$this-mTarget ),
+   'autofocus' = true,
+   ) ),
+   new OOUI\ButtonInputWidget( array(
+   'type' = 'submit',
+   'label' = $this-msg( 'editusergroup' 
)-text(),
+   'flags' = array( 'progressive', 
'primary' ),
+   ) ),
+   ),
+   ) );
+   $out-addHTML(
Html::openElement(
'form',
array(
@@ -434,20 +460,13 @@
)
) .
Html::hidden( 'title', 
$this-getPageTitle()-getPrefixedText() ) .
-   Xml::fieldset( $this-msg( 'userrights-lookup-user' 
)-text() ) .
-   Xml::inputLabel(
-   $this-msg( 'userrights-user-editname' 
)-text(),
-   'user',
-   'username',
-   30,
-   str_replace( '_', ' ', $this-mTarget ),
-   array(
-   'autofocus' = '',
-   'class' = 'mw-autocomplete-user', // 
used by mediawiki.userSuggest
-   )
-   ) . ' ' .
-   Xml::submitButton( $this-msg( 'editusergroup' 
)-text() ) .
-   Html::closeElement( 'fieldset' ) .
+   new OOUI\PanelLayout( array(
+   'classes' = array( 
'mw-userrights-ooui-wrapper' ),
+   'expanded' = false,
+   'padded' = true,
+   'framed' = true,
+   'content' = $fieldset,
+   ) ) .
Html::closeElement( 'form' ) . \n
);
}
@@ -536,6 +555,33 @@
Linker::TOOL_LINKS_EMAIL /* Add send e-mail link */
);
 
+   $fieldset = new OOUI\FieldsetLayout( array(
+   'label' = $this-msg( 'userrights-editusergroup', 
$user-getName() )-text(),
+   ) );
+   $fieldset-group-appendContent( new OOUI\HtmlSnippet(
+   $this-msg( 'editinguser' )-params( wfEscapeWikiText( 
$user-getName() ) )
+   -rawParams( $userToolLinks )-parse() .
+   $this-msg( 'userrights-groups-help', $user-getName() 
)-parse() .
+   $grouplist .
+   $this-groupCheckboxes( $groups, $user ) .
+   new OOUI\FieldLayout(
+  

[MediaWiki-commits] [Gerrit] Remove suggestion support from non-tux editor - change (mediawiki...Translate)

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

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

Change subject: Remove suggestion support from non-tux editor
..

Remove suggestion support from non-tux editor

The largest cause of code duplication in Translate. Considerably
shorten the monster that is TranslationHelpers.

Change-Id: Ic7e3ee10c15eab29b7f3e0ade9db515f5cff6243
---
M resources/css/ext.translate.quickedit.css
M utils/TranslationEditPage.php
M utils/TranslationHelpers.php
3 files changed, 1 insertion(+), 694 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Translate 
refs/changes/40/225540/1

diff --git a/resources/css/ext.translate.quickedit.css 
b/resources/css/ext.translate.quickedit.css
index 3e8c7ef..fa117c5 100644
--- a/resources/css/ext.translate.quickedit.css
+++ b/resources/css/ext.translate.quickedit.css
@@ -124,10 +124,6 @@
background-color: #FFDBDB;
 }
 
-.mw-translate-edit-tmsugs {
-   background-color: #C0F9B6;
-}
-
 .mw-sp-translate-latestchange {
padding-bottom: 0;
 }
diff --git a/utils/TranslationEditPage.php b/utils/TranslationEditPage.php
index 8364422..89eaa09 100644
--- a/utils/TranslationEditPage.php
+++ b/utils/TranslationEditPage.php
@@ -77,12 +77,6 @@
$id = tm-target-{$helpers-dialogID()};
$helpers-setTextareaId( $id );
 
-   if ( $this-suggestions === 'only' ) {
-   echo $helpers-getBoxes( $this-suggestions );
-
-   return;
-   }
-
if ( $this-suggestions === 'checks' ) {
echo $helpers-getBoxes( $this-suggestions );
 
diff --git a/utils/TranslationHelpers.php b/utils/TranslationHelpers.php
index d296b36..1ddd3fb 100644
--- a/utils/TranslationHelpers.php
+++ b/utils/TranslationHelpers.php
@@ -176,15 +176,7 @@
// Box filter
$all = $this-getBoxNames();
 
-   if ( $suggestions === 'async' ) {
-   $all['translation-memory'] = array( $this, 
'getLazySuggestionBox' );
-   } elseif ( $suggestions === 'only' ) {
-   return (string)$this-callBox(
-   'translation-memory',
-   $all['translation-memory'],
-   array( 'lazy' )
-   );
-   } elseif ( $suggestions === 'checks' ) {
+   if ( $suggestions === 'checks' ) {
$request = RequestContext::getMain()-getRequest();
$this-translation = $request-getText( 'translation' );
 
@@ -234,565 +226,12 @@
public function getBoxNames() {
return array(
'other-languages' = array( $this, 
'getOtherLanguagesBox' ),
-   'translation-memory' = array( $this, 
'getSuggestionBox' ),
'translation-diff' = array( $this, 'getPageDiff' ),
'separator' = array( $this, 'getSeparatorBox' ),
'documentation' = array( $this, 'getDocumentationBox' 
),
'definition' = array( $this, 'getDefinitionBox' ),
'check' = array( $this, 'getCheckBox' ),
);
-   }
-
-   /**
-* Returns suggestions from a translation memory.
-* @param $serviceName
-* @param $config
-* @throws TranslationHelperException
-* @return string Html snippet which contains the suggestions.
-*/
-   protected function getTTMServerBox( $serviceName, $config ) {
-   $this-mustHaveDefinition();
-   $this-mustBeTranslation();
-
-   $source = $this-group-getSourceLanguage();
-   $code = $this-handle-getCode();
-   $definition = $this-getDefinition();
-   $TTMServer = TTMServer::factory( $config );
-   $suggestions = $TTMServer-query( $source, $code, $definition );
-   if ( count( $suggestions ) === 0 ) {
-   throw new TranslationHelperException( 'No suggestions' 
);
-   }
-
-   return $suggestions;
-   }
-
-   /**
-* Returns suggestions from a translation memory.
-* @param $serviceName
-* @param $config
-* @throws TranslationHelperException
-* @return string Html snippet which contains the suggestions.
-*/
-   protected function getRemoteTTMServerBox( $serviceName, $config ) {
-   $this-mustHaveDefinition();
-   $this-mustBeTranslation();
-
-   self::checkTranslationServiceFailure( $serviceName );
-
-   $source = $this-group-getSourceLanguage();
-   $code = $this-handle-getCode();
-   $definition = $this-getDefinition();
-   $params = array(
-   

[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: 0e5a6ac..81c599e - change (mediawiki/extensions)

2015-07-18 Thread Jenkins-mwext-sync (Code Review)
Jenkins-mwext-sync has uploaded a new change for review.

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

Change subject: Syncronize VisualEditor: 0e5a6ac..81c599e
..

Syncronize VisualEditor: 0e5a6ac..81c599e

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


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions 
refs/changes/42/225542/1

diff --git a/VisualEditor b/VisualEditor
index 0e5a6ac..81c599e 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit 0e5a6aca32131cc7eaa84f8351ae717ac962757d
+Subproject commit 81c599ef0b8ec00182a4846fda225f1ffaf64d62

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I465feb47773190ee1433393f811c10720b424b3b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions
Gerrit-Branch: master
Gerrit-Owner: Jenkins-mwext-sync jenkins-...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: 0e5a6ac..81c599e - change (mediawiki/extensions)

2015-07-18 Thread Jenkins-mwext-sync (Code Review)
Jenkins-mwext-sync has submitted this change and it was merged.

Change subject: Syncronize VisualEditor: 0e5a6ac..81c599e
..


Syncronize VisualEditor: 0e5a6ac..81c599e

Change-Id: I465feb47773190ee1433393f811c10720b424b3b
---
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 0e5a6ac..81c599e 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit 0e5a6aca32131cc7eaa84f8351ae717ac962757d
+Subproject commit 81c599ef0b8ec00182a4846fda225f1ffaf64d62

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I465feb47773190ee1433393f811c10720b424b3b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions
Gerrit-Branch: master
Gerrit-Owner: Jenkins-mwext-sync jenkins-...@wikimedia.org
Gerrit-Reviewer: Jenkins-mwext-sync jenkins-...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Remove support for getLastDiff from non-tux editor - change (mediawiki...Translate)

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

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

Change subject: Remove support for getLastDiff from non-tux editor
..

Remove support for getLastDiff from non-tux editor

Change-Id: I0b5774799a66e335c8b34b3d1ff06bcd83223145
---
M i18n/core/en.json
M resources/css/ext.translate.quickedit.css
M utils/TranslationHelpers.php
3 files changed, 0 insertions(+), 73 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Translate 
refs/changes/43/225543/1

diff --git a/i18n/core/en.json b/i18n/core/en.json
index 45cda36..e9601b2 100644
--- a/i18n/core/en.json
+++ b/i18n/core/en.json
@@ -292,10 +292,6 @@
translate-dynagroup-recent-desc: This message group shows all recent 
translations into this language.\nMost useful for the review tasks.,
translate-dynagroup-additions-label: Recent additions,
translate-dynagroup-additions-desc: This message group shows new and 
changed messages.,
-   translate-dynagroup-by: Translation made by {{GENDER:$1|$1}},
-   translate-dynagroup-byc: Translation made by {{GENDER:$1|$1}} ($2),
-   translate-dynagroup-last: Latest change by {{GENDER:$1|$1}},
-   translate-dynagroup-lastc: Latest change by {{GENDER:$1|$1}} ($2),
translate-gethelp: Help,
translate-msggroupselector-projects: Message group,
translate-msggroupselector-search-placeholder: Search groups,
diff --git a/resources/css/ext.translate.quickedit.css 
b/resources/css/ext.translate.quickedit.css
index fa117c5..aaeeeb6 100644
--- a/resources/css/ext.translate.quickedit.css
+++ b/resources/css/ext.translate.quickedit.css
@@ -124,10 +124,6 @@
background-color: #FFDBDB;
 }
 
-.mw-sp-translate-latestchange {
-   padding-bottom: 0;
-}
-
 .tqe-fakeheader {
border: 1px solid #CCC;
padding: .75em;
diff --git a/utils/TranslationHelpers.php b/utils/TranslationHelpers.php
index 1ddd3fb..0558398 100644
--- a/utils/TranslationHelpers.php
+++ b/utils/TranslationHelpers.php
@@ -183,10 +183,6 @@
return (string)$this-callBox( 'check', $all['check'] );
}
 
-   if ( $this-group instanceof RecentMessageGroup ) {
-   $all['last-diff'] = array( $this, 'getLastDiff' );
-   }
-
$boxes = array();
foreach ( $all as $type = $cb ) {
$box = $this-callBox( $type, $cb );
@@ -577,67 +573,6 @@
return $diff-getDiff(
wfMessage( 'tpt-diff-old' )-escaped(),
wfMessage( 'tpt-diff-new' )-escaped()
-   );
-   }
-
-   protected function getLastDiff() {
-   // Shortcuts
-   $title = $this-handle-getTitle();
-   $latestRevId = $title-getLatestRevID();
-   $previousRevId = $title-getPreviousRevisionID( $latestRevId );
-
-   $latestRev = Revision::newFromTitle( $title, $latestRevId );
-   $previousRev = Revision::newFromTitle( $title, $previousRevId );
-
-   $diffText = '';
-
-   if ( $latestRev  $previousRev ) {
-   $latest = ContentHandler::getContentText( 
$latestRev-getContent() );
-   $previous = ContentHandler::getContentText( 
$previousRev-getContent() );
-
-   if ( $previous !== $latest ) {
-   $diff = new DifferenceEngine;
-
-   if ( method_exists( 'DifferenceEngine', 
'setTextLanguage' ) ) {
-   $diff-setTextLanguage( 
$this-getTargetLanguage() );
-   }
-
-   $oldContent = ContentHandler::makeContent( 
$previous, $diff-getTitle() );
-   $newContent = ContentHandler::makeContent( 
$latest, $diff-getTitle() );
-
-   $diff-setContent( $oldContent, $newContent );
-   $diff-setReducedLineNumbers();
-   $diff-showDiffStyle();
-   $diffText = $diff-getDiff( false, false );
-   }
-   }
-
-   if ( !$latestRev ) {
-   return null;
-   }
-
-   $context = RequestContext::getMain();
-   $user = $latestRev-getUserText( Revision::FOR_THIS_USER, 
$context-getUser() );
-   $comment = $latestRev-getComment();
-
-   if ( $diffText === '' ) {
-   if ( strval( $comment ) !== '' ) {
-   $text = $context-msg( 
'translate-dynagroup-byc', $user, $comment )-escaped();
-   } else {
-   $text = $context-msg( 
'translate-dynagroup-by', $user )-escaped();
-   }
-   

[MediaWiki-commits] [Gerrit] Added name and revision - change (mediawiki/core)

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

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

Change subject: Added name and revision
..

Added name and revision

Added Rev-2

Added Rev-3

Added Rev-4

Added Rev-5

Change-Id: I9c6f9c37a73d1bf03dcc89178c2bd6587fee3863
---
M README
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/34/225534/1

diff --git a/README b/README
index 29577bc..d6f2952 100644
--- a/README
+++ b/README
@@ -26,7 +26,7 @@
 ** https://bugs.mediawiki.org/
 * Interested in helping out?
 ** https://www.mediawiki.org/wiki/How_to_contribute
-
+* Lasse Holm REV-1, REV-2, Rev-3, Rev-4, Rev-5
 MediaWiki is the result of global collaboration and cooperation. The CREDITS
 file lists technical contributors to the project. The COPYING file explains
 MediaWiki's copyright and license (GNU General Public License, version 2 or

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9c6f9c37a73d1bf03dcc89178c2bd6587fee3863
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Homlhl lars.h...@femtii.com

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


[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: 81c599e..9b29549 - change (mediawiki/extensions)

2015-07-18 Thread Jenkins-mwext-sync (Code Review)
Jenkins-mwext-sync has uploaded a new change for review.

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

Change subject: Syncronize VisualEditor: 81c599e..9b29549
..

Syncronize VisualEditor: 81c599e..9b29549

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


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions 
refs/changes/46/225546/1

diff --git a/VisualEditor b/VisualEditor
index 81c599e..9b29549 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit 81c599ef0b8ec00182a4846fda225f1ffaf64d62
+Subproject commit 9b29549894cf91e474cbe54994ac1b7e291b733a

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If2aec3f5105de0c0ce291cd05890efeb66e5ceaf
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions
Gerrit-Branch: master
Gerrit-Owner: Jenkins-mwext-sync jenkins-...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Update VE core submodule to master (67936f9) - change (mediawiki...VisualEditor)

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

Change subject: Update VE core submodule to master (67936f9)
..


Update VE core submodule to master (67936f9)

New changes:
252b491 Move repeated code in FileTransferHandler
64e4748 Localisation updates from https://translatewiki.net.
e16c52f Localisation updates from https://translatewiki.net.
c6f3136 Localisation updates from https://translatewiki.net.
6117b29 Follow-up c6f31365: Fix build for added language 'dty'
3caaf55 Localisation updates from https://translatewiki.net.
67936f9 Follow-up 3caaf55d: Fix build for added language 'li'

Change-Id: I4e7e38f6fbd0085440d5fcdd8b20526e31a989be
---
M lib/ve
1 file changed, 0 insertions(+), 0 deletions(-)

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



diff --git a/lib/ve b/lib/ve
index ac3e349..67936f9 16
--- a/lib/ve
+++ b/lib/ve
-Subproject commit ac3e34992c5d482837d7ea924dc4f2d74ef66147
+Subproject commit 67936f9520c394f4e31ab2abc7334dffe3318245

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4e7e38f6fbd0085440d5fcdd8b20526e31a989be
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Jforrester jforres...@wikimedia.org
Gerrit-Reviewer: Alex Monk kren...@gmail.com
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: 81c599e..9b29549 - change (mediawiki/extensions)

2015-07-18 Thread Jenkins-mwext-sync (Code Review)
Jenkins-mwext-sync has submitted this change and it was merged.

Change subject: Syncronize VisualEditor: 81c599e..9b29549
..


Syncronize VisualEditor: 81c599e..9b29549

Change-Id: If2aec3f5105de0c0ce291cd05890efeb66e5ceaf
---
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 81c599e..9b29549 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit 81c599ef0b8ec00182a4846fda225f1ffaf64d62
+Subproject commit 9b29549894cf91e474cbe54994ac1b7e291b733a

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If2aec3f5105de0c0ce291cd05890efeb66e5ceaf
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions
Gerrit-Branch: master
Gerrit-Owner: Jenkins-mwext-sync jenkins-...@wikimedia.org
Gerrit-Reviewer: Jenkins-mwext-sync jenkins-...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Add Module namespace translation for Albanian (sq) - change (mediawiki...Scribunto)

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

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

Change subject: Add Module namespace translation for Albanian (sq)
..

Add Module namespace translation for Albanian (sq)

See
https://translatewiki.net/wiki/Thread:Translating_talk:MediaWiki/Module_namespace_for_sqwiki

Change-Id: I10fce8028a9de4ce9143fd3ea0a7cd37acf66237
---
M Scribunto.namespaces.php
1 file changed, 5 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Scribunto 
refs/changes/35/225535/1

diff --git a/Scribunto.namespaces.php b/Scribunto.namespaces.php
index 9794c59..c725eaf 100644
--- a/Scribunto.namespaces.php
+++ b/Scribunto.namespaces.php
@@ -326,6 +326,11 @@
829 = 'Pogovor_o_modulu',
 );
 
+$namespaceNames['sq'] = array(
+   828 = 'Moduli',
+   829 = 'Moduli_diskutim',
+);
+
 $namespaceNames['sr-ec'] = array(
828 = 'Модул',
829 = 'Разговор_о_модулу',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I10fce8028a9de4ce9143fd3ea0a7cd37acf66237
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Scribunto
Gerrit-Branch: master
Gerrit-Owner: Amire80 amir.ahar...@mail.huji.ac.il

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


[MediaWiki-commits] [Gerrit] Update BaseX client to NTCIR result format - change (mediawiki...MathSearch)

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

Change subject: Update BaseX client to NTCIR result format
..


Update BaseX client to NTCIR result format

Change-Id: Ic2822336ef75aee664199abeff1d855229c4f475
---
M includes/engines/MathEngineBaseX.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/includes/engines/MathEngineBaseX.php 
b/includes/engines/MathEngineBaseX.php
index b1fa234..145d04b 100644
--- a/includes/engines/MathEngineBaseX.php
+++ b/includes/engines/MathEngineBaseX.php
@@ -49,7 +49,7 @@
 * @param SimpleXMLElement $xmlRoot
 */
function processMathResults( $xmlRoot ) {
-   foreach ( $xmlRoot-children( )-children() as $page ) {
+   foreach ( $xmlRoot-run-result-children() as $page ) {
$attrs = $page-attributes();
$uri = explode( #, $attrs[id] );
if ( sizeof($uri) != 2 ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic2822336ef75aee664199abeff1d855229c4f475
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MathSearch
Gerrit-Branch: master
Gerrit-Owner: Physikerwelt w...@physikerwelt.de
Gerrit-Reviewer: Dyiop akashworkm...@gmail.com
Gerrit-Reviewer: Hcohl hc...@nist.gov
Gerrit-Reviewer: Physikerwelt w...@physikerwelt.de
Gerrit-Reviewer: Whyameri yusuf.am...@gmail.com
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 translations for the name of Dari language - change (mediawiki...cldr)

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

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

Change subject: Add translations for the name of Dari language
..

Add translations for the name of Dari language

Not already in CLDR 27.0.1:
* http://unicode.org/cldr/trac/browser/tags/release-27-0-1/common/main/en.xml
* http://unicode.org/cldr/trac/browser/tags/release-27-0-1/common/main/ja.xml
* http://unicode.org/cldr/trac/browser/tags/release-27-0-1/common/main/fa.xml

Follow-up to I74d96b5c37bdda409c723c29ce38cde9518b56a7

Change-Id: I9e16eb778a9a0a13d47b5a3da5a1571deb11db56
---
M LocalNames/LocalNamesEn.php
M LocalNames/LocalNamesFa.php
M LocalNames/LocalNamesJa.php
3 files changed, 14 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/cldr 
refs/changes/33/225533/1

diff --git a/LocalNames/LocalNamesEn.php b/LocalNames/LocalNamesEn.php
index c44e1a0..a3f80e7 100644
--- a/LocalNames/LocalNamesEn.php
+++ b/LocalNames/LocalNamesEn.php
@@ -70,6 +70,11 @@
 */
'pnb' = 'Western Punjabi',
 
+   /* Not in CLDR 27.0.1. Dari language.
+* https://www.ethnologue.com/language/prs
+*/
+   'prs' = 'Dari',
+
/* Not in CLDR 27.0.1. Eastern Romance language.
 * https://www.ethnologue.com/language/ruq
 * Added 2008-02-04.
diff --git a/LocalNames/LocalNamesFa.php b/LocalNames/LocalNamesFa.php
index 4737997..1ba3e25 100644
--- a/LocalNames/LocalNamesFa.php
+++ b/LocalNames/LocalNamesFa.php
@@ -191,6 +191,11 @@
 */
// 'pnt' = 'Pontic',
 
+   /* Not in CLDR 27.0.1. Dari language.
+* https://www.ethnologue.com/language/prs
+*/
+   'prs' = 'دری',
+
/* Not in CLDR 27.0.1. Gallo-Italic language.
 * http://www.sil.org/iso639-3/documentation.asp?id=rgn
 * Added 2009-11-15.
diff --git a/LocalNames/LocalNamesJa.php b/LocalNames/LocalNamesJa.php
index 0ed98cf..d736161 100644
--- a/LocalNames/LocalNamesJa.php
+++ b/LocalNames/LocalNamesJa.php
@@ -70,6 +70,10 @@
 */
// 'pnb' = 'Western Punjabi',
 
+   /* Not in CLDR 27.0.1. Dari language.
+* https://www.ethnologue.com/language/prs
+*/
+   'prs' = 'ダリー語',
 
/* Not in CLDR 27.0.1. Eastern Romance language.
 * https://www.ethnologue.com/language/ruq

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9e16eb778a9a0a13d47b5a3da5a1571deb11db56
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/cldr
Gerrit-Branch: master
Gerrit-Owner: Mjbmr mjb...@gmail.com

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


[MediaWiki-commits] [Gerrit] Remove old VE namespaces on testwiki and mediawikiwiki - change (operations/mediawiki-config)

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

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

Change subject: Remove old VE namespaces on testwiki and mediawikiwiki
..

Remove old VE namespaces on testwiki and mediawikiwiki

Cleared of pages

Bug: T92797
Change-Id: Icb4f466ce31ea66a3055576d2269e7e2c50c16eb
---
M wmf-config/CommonSettings.php
M wmf-config/InitialiseSettings.php
2 files changed, 0 insertions(+), 16 deletions(-)


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

diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index 6d4970c..fe0fc2c 100755
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -2003,14 +2003,6 @@
 
$wgVisualEditorNamespaces = array_merge( $wgVisualEditorNamespaces, 
$wmgVisualEditorNamespaces );
 
-   if ( $wmgUseVisualEditorNamespace ) {
-   define( 'NS_VISUALEDITOR', 2500 );
-   define( 'NS_VISUALEDITOR_TALK', 2501 );
-   $wgExtraNamespaces[NS_VISUALEDITOR] = 'VisualEditor';
-   $wgExtraNamespaces[NS_VISUALEDITOR_TALK] = 'VisualEditor_talk';
-   $wgVisualEditorNamespaces[] = NS_VISUALEDITOR;
-   }
-
// User access configuration
if ( $wmgVisualEditorDefault ) {
$wgDefaultUserOptions['visualeditor-enable'] = 1;
diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 3a8ca35..5ca920b 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -12565,7 +12565,6 @@
 ),
 
 // Namespaces for VisualEditor to be active in, as well as wgContentNamespaces
-// NS_VISUALEDITOR is added in CommonSettings.php if 
wmgUseVisualEditorNamespace is true
 'wmgVisualEditorNamespaces' = array(
'default' = array( NS_USER, NS_FILE, NS_HELP, NS_CATEGORY ),
// Test wikis
@@ -12591,13 +12590,6 @@
'+sewikimedia' = array( 100 /* Projekt */ ), // T62882
// Private wikis
'+officewiki' = array( 100 /* Report */ ),
-),
-
-// Should a namespace in which VisualEditor is enabled by default for all 
users (including anons)
-'wmgUseVisualEditorNamespace' = array(
-   'default' = false,
-   'testwiki' = true,
-   'mediawikiwiki' = true,
 ),
 
 // Should VisualEditor be enabled for all users by default ('beta' mode)

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Icb4f466ce31ea66a3055576d2269e7e2c50c16eb
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Alex Monk kren...@gmail.com

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


[MediaWiki-commits] [Gerrit] Update VE core submodule to master (67936f9) - change (mediawiki...VisualEditor)

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

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

Change subject: Update VE core submodule to master (67936f9)
..

Update VE core submodule to master (67936f9)

New changes:
252b491 Move repeated code in FileTransferHandler
64e4748 Localisation updates from https://translatewiki.net.
e16c52f Localisation updates from https://translatewiki.net.
c6f3136 Localisation updates from https://translatewiki.net.
6117b29 Follow-up c6f31365: Fix build for added language 'dty'
3caaf55 Localisation updates from https://translatewiki.net.
67936f9 Follow-up 3caaf55d: Fix build for added language 'li'

Change-Id: I4e7e38f6fbd0085440d5fcdd8b20526e31a989be
---
M lib/ve
1 file changed, 0 insertions(+), 0 deletions(-)


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

diff --git a/lib/ve b/lib/ve
index ac3e349..67936f9 16
--- a/lib/ve
+++ b/lib/ve
-Subproject commit ac3e34992c5d482837d7ea924dc4f2d74ef66147
+Subproject commit 67936f9520c394f4e31ab2abc7334dffe3318245

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4e7e38f6fbd0085440d5fcdd8b20526e31a989be
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Jforrester jforres...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Add mathlog table - change (mediawiki...MathSearch)

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

Change subject: Add mathlog table
..


Add mathlog table

* The mathlog table is supposed to store debugging infromation regarding
  individual formulae
* The table was ported from the debug branch in the Math extension

Change-Id: I5b65075c8e4ca304b7809a37df00180d1cd43a33
---
M MathSearch.hooks.php
A db/mathlog.sql
2 files changed, 23 insertions(+), 0 deletions(-)

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



diff --git a/MathSearch.hooks.php b/MathSearch.hooks.php
index 43db9c5..3a4c6af 100644
--- a/MathSearch.hooks.php
+++ b/MathSearch.hooks.php
@@ -46,6 +46,7 @@
$updater-addExtensionTable( 'mathsemantics', $dir . 
'mathsemantics.sql' );
$updater-addExtensionTable( 'mathperformance', $dir . 
'mathperformance.sql' );
$updater-addExtensionTable( 'mathidentifier', $dir . 
'mathidentifier.sql' );
+   $updater-addExtensionTable( 'mathlog', $dir . 
'mathlog.sql' );
if ( $wgMathWmcServer ) {
$wmcDir = $dir . 'wmc/persistent/';
$updater-addExtensionTable( 'math_wmc_ref', 
$wmcDir . math_wmc_ref.sql );
diff --git a/db/mathlog.sql b/db/mathlog.sql
new file mode 100644
index 000..a7559f8
--- /dev/null
+++ b/db/mathlog.sql
@@ -0,0 +1,22 @@
+--
+-- Used by the math module to oganize the log files from
+-- different rendering engines
+--
+CREATE TABLE /*_*/mathlog (
+  -- Binary MD5 hash of math_inputtex, used as an identifier key.
+  math_inputhash varbinary(16) NOT NULL,
+  -- the log input
+  math_log text NOT NULL,
+  -- the post request sent
+  math_post text,
+  -- MW_MATH_(MAHML|LATEXML)
+  math_mode tinyint,
+  -- time needed to answer the request in ms
+  math_rederingtime int,
+  -- statuscode returned by the rendering engine
+  math_statuscode tinyint,
+  -- timestamp
+  math_timestamp TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE 
CURRENT_TIMESTAMP,
+  -- key
+  key ( math_inputhash, math_mode )
+) /*$wgDBTableOptions*/;
\ No newline at end of file

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5b65075c8e4ca304b7809a37df00180d1cd43a33
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MathSearch
Gerrit-Branch: master
Gerrit-Owner: Physikerwelt w...@physikerwelt.de
Gerrit-Reviewer: Dyiop akashworkm...@gmail.com
Gerrit-Reviewer: Hcohl hc...@nist.gov
Gerrit-Reviewer: Physikerwelt w...@physikerwelt.de
Gerrit-Reviewer: Springle sprin...@wikimedia.org
Gerrit-Reviewer: Whyameri yusuf.am...@gmail.com
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 wgMathDebug - change (mediawiki...MathSearch)

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

Change subject: Add wgMathDebug
..


Add wgMathDebug

Change-Id: Ie030c8df50c3223bf2bdd60acbeccf965101ab95
---
M MathSearch.php
1 file changed, 2 insertions(+), 0 deletions(-)

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



diff --git a/MathSearch.php b/MathSearch.php
index b63f950..bb72851 100644
--- a/MathSearch.php
+++ b/MathSearch.php
@@ -84,6 +84,8 @@
 $wgMathUploadEnabled = false;
 $wgAutoloadClasses['SpecialMathDownloadResult'] = __DIR__ . 
'/SpecialMathDownloadResult.php';
 $wgSpecialPages['MathDownload'] = 'SpecialMathDownloadResult';
+/** Stores debug information in the database and provides more detailed debug 
output */
+$wgMathDebug = false;
 
 $wgResourceModules['ext.mathsearch.styles'] = array(
'localBasePath' = __DIR__ ,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie030c8df50c3223bf2bdd60acbeccf965101ab95
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/MathSearch
Gerrit-Branch: master
Gerrit-Owner: Physikerwelt w...@physikerwelt.de
Gerrit-Reviewer: Dyiop akashworkm...@gmail.com
Gerrit-Reviewer: Hcohl hc...@nist.gov
Gerrit-Reviewer: Physikerwelt w...@physikerwelt.de
Gerrit-Reviewer: Whyameri yusuf.am...@gmail.com
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] ganglia: Set up robots.txt at doc_root, not ganglia_webdir - change (operations/puppet)

2015-07-18 Thread Alexandros Kosiaris (Code Review)
Alexandros Kosiaris has uploaded a new change for review.

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

Change subject: ganglia: Set up robots.txt at doc_root, not ganglia_webdir
..

ganglia: Set up robots.txt at doc_root, not ganglia_webdir

Otherwise it is not present under /robots.txt

Change-Id: I322f1d92c0eefff209479a9f88a8b65f1a25bec8
---
M modules/ganglia_new/manifests/web.pp
M modules/ganglia_new/templates/ganglia.wikimedia.org.erb
2 files changed, 4 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/50/225550/1

diff --git a/modules/ganglia_new/manifests/web.pp 
b/modules/ganglia_new/manifests/web.pp
index 0b9445d..9524f95 100644
--- a/modules/ganglia_new/manifests/web.pp
+++ b/modules/ganglia_new/manifests/web.pp
@@ -16,6 +16,8 @@
 $ganglia_ssl_chain = '/etc/ssl/localcerts/ganglia.wikimedia.org.chain.crt'
 $ganglia_ssl_key = '/etc/ssl/private/ganglia.wikimedia.org.key'
 $ssl_settings = ssl_ciphersuite('apache-2.4', 'compat')
+# Apache's docroot. Used for populating robots.txt
+$doc_root = '/var/www'
 
 package { [ 'php5-gd',
 'php5-mysql',
@@ -39,7 +41,7 @@
 require = Package['ganglia-webfrontend'],
 }
 
-file { ${ganglia_webdir}/robots.txt:
+file { ${doc_root}/robots.txt:
 ensure  = $ensure,
 mode= '0444',
 owner   = 'root',
diff --git a/modules/ganglia_new/templates/ganglia.wikimedia.org.erb 
b/modules/ganglia_new/templates/ganglia.wikimedia.org.erb
index fdb6531..afea120 100644
--- a/modules/ganglia_new/templates/ganglia.wikimedia.org.erb
+++ b/modules/ganglia_new/templates/ganglia.wikimedia.org.erb
@@ -4,7 +4,7 @@
 DocumentRoot /var/www
 ServerAdmin n...@wikimedia.org
 
-Directory /var/www
+Directory %= @doc_root %
 Options FollowSymLinks
 AllowOverride None
 Require all granted

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I322f1d92c0eefff209479a9f88a8b65f1a25bec8
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Alexandros Kosiaris akosia...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Allow to recover username from email address - change (translatewiki)

2015-07-18 Thread Nemo bis (Code Review)
Nemo bis has uploaded a new change for review.

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

Change subject: Allow to recover username from email address
..

Allow to recover username from email address

Change-Id: I789406c2f79a83b640eb747cd24be046f8b80840
---
M TranslatewikiSettings.php
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/translatewiki 
refs/changes/49/225549/1

diff --git a/TranslatewikiSettings.php b/TranslatewikiSettings.php
index feb4a66..de274e1 100644
--- a/TranslatewikiSettings.php
+++ b/TranslatewikiSettings.php
@@ -128,6 +128,7 @@
 #$wgDefaultUserOptions['lqtnotifytalk'] = true;
 $wgDefaultUserOptions['watchcreations'] = true;
 
+$wgPasswordResetRoutes['email'] = true;
 $wgCaptchaTriggers['createaccount'] = true; // Special:Userlogintype=signup
 $wgCaptchaRegexes[] = '/viagra|cialis/sDu';
 $wgCaptchaTriggers['edit'] = true; // Would check on every edit

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I789406c2f79a83b640eb747cd24be046f8b80840
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Nemo bis federicol...@tiscali.it

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


[MediaWiki-commits] [Gerrit] ganglia: Set up robots.txt at doc_root, not ganglia_webdir - change (operations/puppet)

2015-07-18 Thread Alexandros Kosiaris (Code Review)
Alexandros Kosiaris has submitted this change and it was merged.

Change subject: ganglia: Set up robots.txt at doc_root, not ganglia_webdir
..


ganglia: Set up robots.txt at doc_root, not ganglia_webdir

Otherwise it is not present under /robots.txt

Change-Id: I322f1d92c0eefff209479a9f88a8b65f1a25bec8
---
M modules/ganglia_new/manifests/web.pp
M modules/ganglia_new/templates/ganglia.wikimedia.org.erb
2 files changed, 7 insertions(+), 5 deletions(-)

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



diff --git a/modules/ganglia_new/manifests/web.pp 
b/modules/ganglia_new/manifests/web.pp
index 0b9445d..9524f95 100644
--- a/modules/ganglia_new/manifests/web.pp
+++ b/modules/ganglia_new/manifests/web.pp
@@ -16,6 +16,8 @@
 $ganglia_ssl_chain = '/etc/ssl/localcerts/ganglia.wikimedia.org.chain.crt'
 $ganglia_ssl_key = '/etc/ssl/private/ganglia.wikimedia.org.key'
 $ssl_settings = ssl_ciphersuite('apache-2.4', 'compat')
+# Apache's docroot. Used for populating robots.txt
+$doc_root = '/var/www'
 
 package { [ 'php5-gd',
 'php5-mysql',
@@ -39,7 +41,7 @@
 require = Package['ganglia-webfrontend'],
 }
 
-file { ${ganglia_webdir}/robots.txt:
+file { ${doc_root}/robots.txt:
 ensure  = $ensure,
 mode= '0444',
 owner   = 'root',
diff --git a/modules/ganglia_new/templates/ganglia.wikimedia.org.erb 
b/modules/ganglia_new/templates/ganglia.wikimedia.org.erb
index fdb6531..c7b913c 100644
--- a/modules/ganglia_new/templates/ganglia.wikimedia.org.erb
+++ b/modules/ganglia_new/templates/ganglia.wikimedia.org.erb
@@ -1,10 +1,10 @@
 VirtualHost *:80
 ServerName %= @ganglia_servername %
 ServerAlias %= @ganglia_serveralias %
-DocumentRoot /var/www
+DocumentRoot %= @doc_root %
 ServerAdmin n...@wikimedia.org
 
-Directory /var/www
+Directory %= @doc_root %
 Options FollowSymLinks
 AllowOverride None
 Require all granted
@@ -21,7 +21,7 @@
 VirtualHost *:443
 ServerName %= @ganglia_servername %
 ServerAlias %= @ganglia_serveralias %
-DocumentRoot /var/www
+DocumentRoot %= @doc_root %
 ServerAdmin n...@wikimedia.org
 
 SSLEngine on
@@ -30,7 +30,7 @@
 SSLCertificateKeyFile %= @ganglia_ssl_key %
 %= @ssl_settings.join(\n) %
 
-Directory /var/www
+Directory %= @doc_root %
 Options FollowSymLinks
 AllowOverride None
 Require all granted

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I322f1d92c0eefff209479a9f88a8b65f1a25bec8
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Alexandros Kosiaris akosia...@wikimedia.org
Gerrit-Reviewer: Alexandros Kosiaris akosia...@wikimedia.org
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] Update apache rules for 2.4 - change (operations...wikimetrics)

2015-07-18 Thread Code Review
Gergő Tisza has uploaded a new change for review.

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

Change subject: [WIP] Update apache rules for 2.4
..

[WIP] Update apache rules for 2.4

Add 2.4 version in conditionals and put 2.2 version in conditionals
for all files which matched ack '^\s*(Allow|Deny) ' but did not
match ack '^\s*Require '.
See http://httpd.apache.org/docs/2.4/upgrading.html#access

Changes have not been tested.

Change-Id: I6c0988fd1faaa51e51d089cb4c665f76ad13a0ed
---
M templates/wikimetrics.vhost.erb
1 file changed, 7 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet/wikimetrics 
refs/changes/53/225553/1

diff --git a/templates/wikimetrics.vhost.erb b/templates/wikimetrics.vhost.erb
index 82fb317..81cff77 100644
--- a/templates/wikimetrics.vhost.erb
+++ b/templates/wikimetrics.vhost.erb
@@ -78,8 +78,13 @@
 
   Options Indexes FollowSymLinks MultiViews
   AllowOverride None
-  Order deny,allow
-  Allow from all
+  IfVersion = 2.4
+  Require all granted
+  /IfVersion
+  IfVersion  2.4
+  Order deny,allow
+  Allow from all
+  /IfVersion
   /Directory
 
 /VirtualHost

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6c0988fd1faaa51e51d089cb4c665f76ad13a0ed
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet/wikimetrics
Gerrit-Branch: master
Gerrit-Owner: Gergő Tisza gti...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Add README with instructions on Vagrant setup - change (analytics...web)

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

Change subject: Add README with instructions on Vagrant setup
..


Add README with instructions on Vagrant setup

Change-Id: I8726561ebb98ea31fbec3b4fe46e89dde083ebd4
---
A README.md
1 file changed, 21 insertions(+), 0 deletions(-)

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



diff --git a/README.md b/README.md
new file mode 100644
index 000..0e51c2d
--- /dev/null
+++ b/README.md
@@ -0,0 +1,21 @@
+## Setting up a local environment ##
+
+Quarry uses [Vagrant](https://www.vagrantup.com/) to set up a local 
environment.
+You can set it up by:
+
+1. [Download](https://www.vagrantup.com/downloads.html) and install Vagrant
+2. Download and install [VirtualBox](https://www.virtualbox.org/)
+3. Clone the [Quarry 
repository](https://github.com/wikimedia/analytics-quarry-web)
+4. Run `vagrant up`
+5. Access your local quarry instance on `localhost:5000`
+
+The default instance queries the quarry database itself :)
+
+### Reloading after making a change ###
+
+The dev setups are set up to use auto-reloading when any files are changed. If 
that does not work well, you can reload them manually by:
+
+1. Run `vagrant ssh`
+2. Run `sudo service quarry-* restart`
+
+This will restart both the web server and the celery worker nodes.

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8726561ebb98ea31fbec3b4fe46e89dde083ebd4
Gerrit-PatchSet: 1
Gerrit-Project: analytics/quarry/web
Gerrit-Branch: master
Gerrit-Owner: Yuvipanda yuvipa...@wikimedia.org
Gerrit-Reviewer: Yuvipanda yuvipa...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Jump to version 0.3.0 - change (mediawiki...GoogleLogin)

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

Change subject: Jump to version 0.3.0
..


Jump to version 0.3.0

Copyright year to 2015, too, and needs at least MW 1.26 now.

Change-Id: Ibdff99425b0b6b14165938556d181efa7a30cc93
---
M GoogleLogin.php
1 file changed, 5 insertions(+), 5 deletions(-)

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



diff --git a/GoogleLogin.php b/GoogleLogin.php
index 15fe4ea..006e86d 100644
--- a/GoogleLogin.php
+++ b/GoogleLogin.php
@@ -1,7 +1,7 @@
 ?php
/**
GoogleLogin License
-   Copyright (c) 2014 Florian Schmidt
+   Copyright (c) 2015 Florian Schmidt
 
Permission is hereby granted, free of charge, to any person obtaining a 
copy
of this software and associated documentation files (the Software), 
to deal
@@ -26,9 +26,9 @@
die( 'This is an extension for Mediawiki and can not run 
standalone.' );
}
 
-   // master and v2.x requires MediaWiki 1.24
-   if ( version_compare( $wgVersion, '1.24c', '' ) ) {
-   echo This version of GoogleLogin requires MediaWiki 1.24, you 
have $wgVersion.br
+   // master and v2.x requires MediaWiki 1.26
+   if ( version_compare( $wgVersion, '1.26c', '' ) ) {
+   echo This version of GoogleLogin requires MediaWiki 1.26, you 
have $wgVersion.br
You can a 
href='https://www.mediawiki.org/wiki/Upgrade'upgrade your MediaWiki 
Installation/a
or a 
href='https://www.mediawiki.org/wiki/Special:ExtensionDistributor/GoogleLogin'download
 a
version of GoogleLogin/a which supports your MediaWiki 
version.;
@@ -41,7 +41,7 @@
'author' = 'Florian Schmidt',
'url' = 'https://www.mediawiki.org/wiki/Extension:GoogleLogin',
'descriptionmsg' = 'googlelogin-desc',
-   'version'  = '0.2.1-git',
+   'version'  = '0.3.0-git',
'license-name' = MIT,
);
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibdff99425b0b6b14165938556d181efa7a30cc93
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/GoogleLogin
Gerrit-Branch: master
Gerrit-Owner: Florianschmidtwelzow florian.schmidt.stargatewis...@gmail.com
Gerrit-Reviewer: Florianschmidtwelzow florian.schmidt.stargatewis...@gmail.com
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 a new option to move the button to the right side - change (mediawiki...GoogleLogin)

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

Change subject: Add a new option to move the button to the right side
..


Add a new option to move the button to the right side

Also use HTMLForm to built an own form above the normal login form
to get rid of the wgAuth hack use.

Depends on: Ibf561453604a830862d4f64819c8418a9458cb12

Change-Id: I7660e5d5cf34ca78feb69844abf85174e7bd40b3
---
M GoogleLogin.php
M includes/GoogleLogin.body.php
D includes/GoogleLoginAuth.php
M includes/specials/SpecialGoogleLogin.php
A style/ext.GoogleLogin.right.css
5 files changed, 110 insertions(+), 101 deletions(-)

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



diff --git a/GoogleLogin.php b/GoogleLogin.php
index 006e86d..40b908d 100644
--- a/GoogleLogin.php
+++ b/GoogleLogin.php
@@ -45,31 +45,17 @@
'license-name' = MIT,
);
 
-   $dir = __DIR__;
-
// Autoload Classes
-   $wgAutoloadClasses[ 'GoogleLogin' ] = $dir . 
'/includes/GoogleLogin.body.php';
-   $wgAutoloadClasses[ 'SpecialGoogleLogin' ] = $dir . 
'/includes/specials/SpecialGoogleLogin.php';
-   $wgAutoloadClasses[ 'SpecialManageGoogleLogin' ] = $dir . 
'/includes/specials/SpecialManageGoogleLogin.php';
-   $wgAutoloadClasses[ 'GoogleLoginHooks' ] = $dir . 
'/includes/GoogleLogin.hooks.php';
-   $wgAutoloadClasses[ 'GoogleLoginDB' ] = $dir . 
'/includes/GoogleLoginDB.php';
-   $wgAutoloadClasses[ 'GoogleLoginAuth' ] = $dir . 
'/includes/GoogleLoginAuth.php';
-   $wgAutoloadClasses[ 'ApiGoogleLoginInfo' ] = $dir . 
'/includes/api/ApiGoogleLoginInfo.php';
-
-   $wgExtensionFunctions[] = 'efGoogleLoginSetup';
-
-   function efGoogleLoginSetup() {
-   global $wgAuth;
-   // check if we can load wgAuth automatically
-   if ( class_exists( 'GoogleLoginAuth' ) ) {
-   // load $wgAuth
-   $wgAuth = new GoogleLoginAuth;
-   }
-   }
+   $wgAutoloadClasses[ 'GoogleLogin' ] = __DIR__ . 
'/includes/GoogleLogin.body.php';
+   $wgAutoloadClasses[ 'SpecialGoogleLogin' ] = __DIR__ . 
'/includes/specials/SpecialGoogleLogin.php';
+   $wgAutoloadClasses[ 'SpecialManageGoogleLogin' ] = __DIR__ . 
'/includes/specials/SpecialManageGoogleLogin.php';
+   $wgAutoloadClasses[ 'GoogleLoginHooks' ] = __DIR__ . 
'/includes/GoogleLogin.hooks.php';
+   $wgAutoloadClasses[ 'GoogleLoginDB' ] = __DIR__ . 
'/includes/GoogleLoginDB.php';
+   $wgAutoloadClasses[ 'ApiGoogleLoginInfo' ] = __DIR__ . 
'/includes/api/ApiGoogleLoginInfo.php';
 
// i18n directory and aliases
-   $wgExtensionMessagesFiles[ 'GoogleLoginAlias' ] = $dir . 
'/GoogleLogin.alias.php';
-   $wgMessagesDirs['GoogleLogin'] = $dir . '/i18n';
+   $wgExtensionMessagesFiles[ 'GoogleLoginAlias' ] = __DIR__ . 
'/GoogleLogin.alias.php';
+   $wgMessagesDirs['GoogleLogin'] = __DIR__ . '/i18n';
 
// new user rights for this extension
$wgGroupPermissions['sysop']['managegooglelogin'] = true;
@@ -101,10 +87,16 @@
'remoteExtPath' = 'GoogleLogin'
);
 
-   $wgResourceModules['ext.GoogleLogin.style'] = $wgGLResourcePath + array(
-   'styles' = 'style/ext.GoogleLogin.css',
-   'position' = 'top',
-   'targets' = array( 'desktop', 'mobile' ),
+   $wgResourceModules += array(
+   'ext.GoogleLogin.style' = $wgGLResourcePath + array(
+   'styles' = 'style/ext.GoogleLogin.css',
+   'position' = 'top',
+   'targets' = array( 'desktop', 'mobile' ),
+   ),
+   'ext.GoogleLogin.right.style' = $wgGLResourcePath + array(
+   'styles' = 'style/ext.GoogleLogin.right.css',
+   'position' = 'top',
+   ),
);
 
$wgResourceModules['ext.GoogleLogin.specialManage.scripts'] = 
$wgGLResourcePath + array(
@@ -197,3 +189,9 @@
 * Key for public API access. Used only for admin actions to check, if 
the user has a plus profile or not.
 */
$wgGLAPIKey = '';
+
+   /**
+* If set to true, the Google Login button will be added to the right 
side of the login form, instead
+* above the normal login form.
+*/
+   $wgGLShowRight = false;
diff --git a/includes/GoogleLogin.body.php b/includes/GoogleLogin.body.php
index 1843127..e606027 100644
--- a/includes/GoogleLogin.body.php
+++ b/includes/GoogleLogin.body.php
@@ -522,74 +522,75 @@
return true;
}
 
-   /**
-* Redirects to GoogleLogin login page if called. Actually used 
for AuthPlugin
-* @todo: kill if better solution as AuthPlugin is found
-*/
-   public static function externalLoginAttempt() {
-   

[MediaWiki-commits] [Gerrit] role::postgres: Update to 9.4 - change (operations/puppet)

2015-07-18 Thread Alexandros Kosiaris (Code Review)
Alexandros Kosiaris has uploaded a new change for review.

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

Change subject: role::postgres: Update to 9.4
..

role::postgres: Update to 9.4

Also use the rather ugly lsbdistcodename pattern to autodetermine the
postgresql version

Change-Id: Ic9799bb1666a33600cc1f38211e892eb463ee21d
---
M manifests/role/postgres.pp
M modules/postgresql/manifests/master.pp
M modules/postgresql/manifests/postgis.pp
3 files changed, 12 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/75/225575/1

diff --git a/manifests/role/postgres.pp b/manifests/role/postgres.pp
index c4ce8e3..167712a 100644
--- a/manifests/role/postgres.pp
+++ b/manifests/role/postgres.pp
@@ -3,9 +3,9 @@
 class role::postgres::common {
 include standard
 
-$datadir = '/srv/postgres/9.1/main'
+$datadir = '/srv/postgres/9.4/main'
 
-file { '/etc/postgresql/9.1/main/tuning.conf':
+file { '/etc/postgresql/9.4/main/tuning.conf':
 ensure = 'present',
 owner  = 'root',
 group  = 'root',
diff --git a/modules/postgresql/manifests/master.pp 
b/modules/postgresql/manifests/master.pp
index d46b724..3b5440c 100644
--- a/modules/postgresql/manifests/master.pp
+++ b/modules/postgresql/manifests/master.pp
@@ -29,7 +29,11 @@
 class postgresql::master(
 $master_server=$::fqdn,
 $includes=[],
-$pgversion='9.1',
+$pgversion = $::lsbdistcodename ? {
+jessie  = '9.4',
+precise = '9.1',
+trusty  = '9.3',
+},
 $ensure='present',
 $max_wal_senders=3,
 $checkpoint_segments=64,
diff --git a/modules/postgresql/manifests/postgis.pp 
b/modules/postgresql/manifests/postgis.pp
index 1ca536f..db7870b 100644
--- a/modules/postgresql/manifests/postgis.pp
+++ b/modules/postgresql/manifests/postgis.pp
@@ -13,8 +13,12 @@
 # include postgresql::postgis
 #
 class postgresql::postgis(
-$pgversion='9.1',
 $ensure='present'
+$pgversion = $::lsbdistcodename ? {
+jessie  = '9.4',
+precise = '9.1',
+trusty  = '9.3',
+},
 ) {
 
 package { [

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic9799bb1666a33600cc1f38211e892eb463ee21d
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Alexandros Kosiaris akosia...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Add public keywords to the QueryPage base class - change (mediawiki/core)

2015-07-18 Thread WMDE
Thiemo Mättig (WMDE) has uploaded a new change for review.

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

Change subject: Add public keywords to the QueryPage base class
..

Add public keywords to the QueryPage base class

A lot more methods do not have visibility keywords. Some probably
should be private, a lot need to be protected, but all this will be
a breaking change. In this patch I'm focusing on methods that are
already used as public methods. The added public keyword is not a
breaking change because it's the default anyway.

Change-Id: I52e34209557b00f97a4e68250afbeb7647b64146
---
M includes/specialpage/QueryPage.php
1 file changed, 9 insertions(+), 9 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/78/225578/1

diff --git a/includes/specialpage/QueryPage.php 
b/includes/specialpage/QueryPage.php
index 69e1d8c..3c8b742 100644
--- a/includes/specialpage/QueryPage.php
+++ b/includes/specialpage/QueryPage.php
@@ -141,7 +141,7 @@
 * @return array
 * @since 1.18
 */
-   function getQueryInfo() {
+   public function getQueryInfo() {
return null;
}
 
@@ -178,7 +178,7 @@
 * @return bool
 * @since 1.18
 */
-   function usesTimestamps() {
+   public function usesTimestamps() {
return false;
}
 
@@ -198,7 +198,7 @@
 *
 * @return bool
 */
-   function isExpensive() {
+   public function isExpensive() {
return $this-getConfig()-get( 'DisableQueryPages' );
}
 
@@ -219,7 +219,7 @@
 *
 * @return bool
 */
-   function isCached() {
+   public function isCached() {
return $this-isExpensive()  $this-getConfig()-get( 
'MiserMode' );
}
 
@@ -294,7 +294,7 @@
 * @throws DBError|Exception
 * @return bool|int
 */
-   function recache( $limit, $ignoreErrors = true ) {
+   public function recache( $limit, $ignoreErrors = true ) {
if ( !$this-isCacheable() ) {
return 0;
}
@@ -370,7 +370,7 @@
 * @return ResultWrapper
 * @since 1.18
 */
-   function reallyDoQuery( $limit, $offset = false ) {
+   public function reallyDoQuery( $limit, $offset = false ) {
$fname = get_class( $this ) . ::reallyDoQuery;
$dbr = $this-getRecacheDB();
$query = $this-getQueryInfo();
@@ -421,7 +421,7 @@
 * @param int|bool $limit
 * @return ResultWrapper
 */
-   function doQuery( $offset = false, $limit = false ) {
+   public function doQuery( $offset = false, $limit = false ) {
if ( $this-isCached()  $this-isCacheable() ) {
return $this-fetchFromCache( $limit, $offset );
} else {
@@ -436,7 +436,7 @@
 * @return ResultWrapper
 * @since 1.18
 */
-   function fetchFromCache( $limit, $offset = false ) {
+   public function fetchFromCache( $limit, $offset = false ) {
$dbr = wfGetDB( DB_SLAVE );
$options = array();
if ( $limit !== false ) {
@@ -487,7 +487,7 @@
 * real, honest-to-gosh query page.
 * @param string $par
 */
-   function execute( $par ) {
+   public function execute( $par ) {
$user = $this-getUser();
if ( !$this-userCanExecute( $user ) ) {
$this-displayRestrictionError();

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I52e34209557b00f97a4e68250afbeb7647b64146
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Thiemo Mättig (WMDE) thiemo.maet...@wikimedia.de

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


[MediaWiki-commits] [Gerrit] scap: Return early with usage note if no arguments passed - change (operations/puppet)

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

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

Change subject: scap: Return early with usage note if no arguments passed
..

scap: Return early with usage note if no arguments passed

Having it iterate over all wikis only to return the same error
800 times isn't very useful.

 aawiki:  Fatal error: --wiki must be the first parameter.

Change-Id: I07d5cf458c59eccce065046de923b0ff7468c64a
---
M modules/scap/files/foreachwiki
1 file changed, 10 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/05/225605/1

diff --git a/modules/scap/files/foreachwiki b/modules/scap/files/foreachwiki
index 3d7329c..c1e41da 100755
--- a/modules/scap/files/foreachwiki
+++ b/modules/scap/files/foreachwiki
@@ -1,5 +1,15 @@
 #!/bin/bash
 
+usage() {
+echo Usage: $(basename $0) command
+echo 
+exit
+}
+
+if [ -z $1 ] || [ $1 = --help ]; then
+   usage
+fi
+
 . /etc/profile.d/mediawiki.sh
 
 # Let us vary mediawiki-config files by realm

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I07d5cf458c59eccce065046de923b0ff7468c64a
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Krinkle krinklem...@gmail.com

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


[MediaWiki-commits] [Gerrit] Update TimedMediaHandler tests - change (integration/config)

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

Change subject: Update TimedMediaHandler tests
..


Update TimedMediaHandler tests

Change-Id: Idc3a4789264590654b287fb150f2514fda1be00f
---
M zuul/layout.yaml
1 file changed, 3 insertions(+), 2 deletions(-)

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



diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index 2ac2b76..3dc9a88 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -7087,11 +7087,12 @@
 
   - name: mediawiki/extensions/TimedMediaHandler
 template:
-  - name: jshint
-  - name: extension-unittests
+  - name: composer-test
+  - name: extension-unittests-generic
   - name: npm
 check:
   - jsonlint
+  - jshint
 
   - name: mediawiki/extensions/timeline
 template:

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Idc3a4789264590654b287fb150f2514fda1be00f
Gerrit-PatchSet: 3
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Paladox thomasmulhall...@yahoo.com
Gerrit-Reviewer: Brian Wolff bawolff...@gmail.com
Gerrit-Reviewer: Brion VIBBER br...@wikimedia.org
Gerrit-Reviewer: Hashar has...@free.fr
Gerrit-Reviewer: TheDJ hartman.w...@gmail.com
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] scap: Return early with usage note if no arguments passed - change (operations/puppet)

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

Change subject: scap: Return early with usage note if no arguments passed
..


scap: Return early with usage note if no arguments passed

Having it iterate over all wikis only to return the same error
800 times isn't very useful.

 aawiki:  Fatal error: --wiki must be the first parameter.

Change-Id: I07d5cf458c59eccce065046de923b0ff7468c64a
---
M modules/scap/files/foreachwiki
1 file changed, 10 insertions(+), 0 deletions(-)

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



diff --git a/modules/scap/files/foreachwiki b/modules/scap/files/foreachwiki
index 3d7329c..b9359fd 100755
--- a/modules/scap/files/foreachwiki
+++ b/modules/scap/files/foreachwiki
@@ -1,5 +1,15 @@
 #!/bin/bash
 
+usage() {
+echo Usage: $(basename $0) command
+echo 
+exit
+}
+
+if [ -z $1 ] || [ $1 = --help ]; then
+usage
+fi
+
 . /etc/profile.d/mediawiki.sh
 
 # Let us vary mediawiki-config files by realm

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I07d5cf458c59eccce065046de923b0ff7468c64a
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Krinkle krinklem...@gmail.com
Gerrit-Reviewer: Yuvipanda yuvipa...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Fixed Style/SpaceAfterNot RuboCop offense - change (mediawiki/vagrant)

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

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

Change subject: Fixed Style/SpaceAfterNot RuboCop offense
..

Fixed Style/SpaceAfterNot RuboCop offense

Bug: T106220
Change-Id: I9bf12e45bfe8169c9e98afdf43d115997b5bd45a
---
M .rubocop_todo.yml
M puppet/modules/stdlib/lib/puppet/parser/functions/defined_with_params.rb
2 files changed, 1 insertion(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant 
refs/changes/41/225641/1

diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml
index 7fc4053..3ce6667 100644
--- a/.rubocop_todo.yml
+++ b/.rubocop_todo.yml
@@ -244,11 +244,6 @@
 Style/SpaceAfterComma:
   Enabled: false
 
-# Offense count: 1
-# Cop supports --auto-correct.
-Style/SpaceAfterNot:
-  Enabled: false
-
 # Offense count: 4
 # Cop supports --auto-correct.
 # Configuration parameters: EnforcedStyle, SupportedStyles.
diff --git 
a/puppet/modules/stdlib/lib/puppet/parser/functions/defined_with_params.rb 
b/puppet/modules/stdlib/lib/puppet/parser/functions/defined_with_params.rb
index d7df306..bce241e 100644
--- a/puppet/modules/stdlib/lib/puppet/parser/functions/defined_with_params.rb
+++ b/puppet/modules/stdlib/lib/puppet/parser/functions/defined_with_params.rb
@@ -20,7 +20,7 @@
 ) do |vals|
   reference, params = vals
   raise(ArgumentError, 'Must specify a reference') unless reference
-  if (! params) || params == ''
+  if (!params) || params == ''
 params = {}
   end
   ret = false

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9bf12e45bfe8169c9e98afdf43d115997b5bd45a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: master
Gerrit-Owner: Zfilipin zfili...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Set $wgVectorResponsive = true on all beta cluster wikis - change (operations/mediawiki-config)

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

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

Change subject: Set $wgVectorResponsive = true on all beta cluster wikis
..

Set $wgVectorResponsive = true on all beta cluster wikis

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


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

diff --git a/wmf-config/InitialiseSettings-labs.php 
b/wmf-config/InitialiseSettings-labs.php
index 7ed88c1..a4093cf 100644
--- a/wmf-config/InitialiseSettings-labs.php
+++ b/wmf-config/InitialiseSettings-labs.php
@@ -208,6 +208,10 @@
'dewiki' = 
'http://upload.wikimedia.org/wikipedia/commons/1/14/Favicon-beta-wikipedia.png',
),
 
+   'wgVectorResponsive' = array(
+   'default' = true,
+   ),
+
// Editor Engagement stuff
'-wmfUseArticleCreationWorkflow' = array(
'default' = false,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I88531c747bc23e006c636f832a382faff7cfa029
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Legoktm legoktm.wikipe...@gmail.com

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


[MediaWiki-commits] [Gerrit] Enable PHPCS sniff Squiz.Scope.MethodScope - change (mediawiki...Wikibase)

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

Change subject: Enable PHPCS sniff Squiz.Scope.MethodScope
..


Enable PHPCS sniff Squiz.Scope.MethodScope

This is about missing visibility keywords, which is quite basic and
really should be enforced in my opinion, but needs exceptions because
there is still a lot of code with no visibility keywords in core.

Change-Id: I6f64016addd9af39fdb092797d6f54f3ddc59979
---
M phpcs.xml
M purtle/src/RdfWriterBase.php
2 files changed, 6 insertions(+), 1 deletion(-)

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



diff --git a/phpcs.xml b/phpcs.xml
index c547890..f473eb4 100644
--- a/phpcs.xml
+++ b/phpcs.xml
@@ -65,6 +65,7 @@
rule ref=PSR2.Namespaces.NamespaceDeclaration /
rule ref=PSR2.Namespaces.UseDeclaration /
 
+   !-- This sniff is included in PSR1 but needs an exception. --
rule ref=Squiz.Classes.ValidClassName.NotCamelCaps

exclude-patternDataAccess*Scribunto*Scribunto_LuaWikibase*Library/exclude-pattern
/rule
@@ -73,6 +74,10 @@
rule ref=Squiz.ControlStructures.ControlSignature.SpaceAfterKeyword
severity0/severity
/rule
+   rule ref=Squiz.Scope.MethodScope
+   !-- FIXME: This indicates an error in the QueryPage base class 
that should be fixed. --
+   exclude-patternSpecialUnconnectedPages\.php/exclude-pattern
+   /rule
rule ref=Squiz.WhiteSpace.FunctionSpacing
properties
property name=spacing value=1 /
diff --git a/purtle/src/RdfWriterBase.php b/purtle/src/RdfWriterBase.php
index 60940bd..d2d2635 100644
--- a/purtle/src/RdfWriterBase.php
+++ b/purtle/src/RdfWriterBase.php
@@ -103,7 +103,7 @@
 *
 * @throws InvalidArgumentException
 */
-   function __construct( $role, BNodeLabeler $labeler = null ) {
+   public function __construct( $role, BNodeLabeler $labeler = null ) {
if ( !is_string( $role ) ) {
throw new InvalidArgumentException( '$role must be a 
string' );
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6f64016addd9af39fdb092797d6f54f3ddc59979
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Thiemo Mättig (WMDE) thiemo.maet...@wikimedia.de
Gerrit-Reviewer: Addshore addshorew...@gmail.com
Gerrit-Reviewer: Bene benestar.wikime...@gmail.com
Gerrit-Reviewer: Hoo man h...@online.de
Gerrit-Reviewer: Jonas Kress (WMDE) jonas.kr...@wikimedia.de
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 Southern Kurdish as helper for Laki language - change (translatewiki)

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

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

Change subject: Add Southern Kurdish as helper for Laki language
..

Add Southern Kurdish as helper for Laki language

Laki is derived from Southern Kurdish and Norhtern Luri
* https://en.wikipedia.org/wiki/Laki_language
* http://glottolog.org/resource/languoid/id/laki1244

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


  git pull ssh://gerrit.wikimedia.org:29418/translatewiki 
refs/changes/44/225644/1

diff --git a/FallbackSettings.php b/FallbackSettings.php
index ebe5edf..5a9e683 100644
--- a/FallbackSettings.php
+++ b/FallbackSettings.php
@@ -61,7 +61,7 @@
 $wgTranslateLanguageFallbacks['kw'] = array( 'br', 'cy' );
 $wgTranslateLanguageFallbacks['lb'] = array( 'fr' );
 $wgTranslateLanguageFallbacks['lez'] = array( 'ru', 'az' ); # Robin 2011-09-27
-$wgTranslateLanguageFallbacks['lki'] = array( 'fa', 'lrc' );
+$wgTranslateLanguageFallbacks['lki'] = array( 'fa', 'lrc', 'sdh' );
 $wgTranslateLanguageFallbacks['lld'] = array( 'it', 'rm', 'fur' ); # Robin 
2011-12-04
 $wgTranslateLanguageFallbacks['lmo'] = array( 'pms', 'eml', 'lij', 'vec' );
 $wgTranslateLanguageFallbacks['luz'] = array( 'lrc', 'fa' );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic3f713e7e5448a6b307b49bf8fdd8894e6504976
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Mjbmr mjb...@gmail.com

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


[MediaWiki-commits] [Gerrit] Add public keywords to the QueryPage base class - change (mediawiki/core)

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

Change subject: Add public keywords to the QueryPage base class
..


Add public keywords to the QueryPage base class

A lot more methods do not have visibility keywords. Some probably
should be private, a lot need to be protected, but all this will be
a breaking change. In this patch I'm focusing on methods that are
already used as public methods. The added public keyword is not a
breaking change because it's the default anyway.

Change-Id: I52e34209557b00f97a4e68250afbeb7647b64146
---
M includes/specialpage/QueryPage.php
1 file changed, 9 insertions(+), 9 deletions(-)

Approvals:
  Aaron Schulz: Looks good to me, but someone else must approve
  Umherirrender: Looks good to me, but someone else must approve
  Addshore: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/specialpage/QueryPage.php 
b/includes/specialpage/QueryPage.php
index 69e1d8c..3c8b742 100644
--- a/includes/specialpage/QueryPage.php
+++ b/includes/specialpage/QueryPage.php
@@ -141,7 +141,7 @@
 * @return array
 * @since 1.18
 */
-   function getQueryInfo() {
+   public function getQueryInfo() {
return null;
}
 
@@ -178,7 +178,7 @@
 * @return bool
 * @since 1.18
 */
-   function usesTimestamps() {
+   public function usesTimestamps() {
return false;
}
 
@@ -198,7 +198,7 @@
 *
 * @return bool
 */
-   function isExpensive() {
+   public function isExpensive() {
return $this-getConfig()-get( 'DisableQueryPages' );
}
 
@@ -219,7 +219,7 @@
 *
 * @return bool
 */
-   function isCached() {
+   public function isCached() {
return $this-isExpensive()  $this-getConfig()-get( 
'MiserMode' );
}
 
@@ -294,7 +294,7 @@
 * @throws DBError|Exception
 * @return bool|int
 */
-   function recache( $limit, $ignoreErrors = true ) {
+   public function recache( $limit, $ignoreErrors = true ) {
if ( !$this-isCacheable() ) {
return 0;
}
@@ -370,7 +370,7 @@
 * @return ResultWrapper
 * @since 1.18
 */
-   function reallyDoQuery( $limit, $offset = false ) {
+   public function reallyDoQuery( $limit, $offset = false ) {
$fname = get_class( $this ) . ::reallyDoQuery;
$dbr = $this-getRecacheDB();
$query = $this-getQueryInfo();
@@ -421,7 +421,7 @@
 * @param int|bool $limit
 * @return ResultWrapper
 */
-   function doQuery( $offset = false, $limit = false ) {
+   public function doQuery( $offset = false, $limit = false ) {
if ( $this-isCached()  $this-isCacheable() ) {
return $this-fetchFromCache( $limit, $offset );
} else {
@@ -436,7 +436,7 @@
 * @return ResultWrapper
 * @since 1.18
 */
-   function fetchFromCache( $limit, $offset = false ) {
+   public function fetchFromCache( $limit, $offset = false ) {
$dbr = wfGetDB( DB_SLAVE );
$options = array();
if ( $limit !== false ) {
@@ -487,7 +487,7 @@
 * real, honest-to-gosh query page.
 * @param string $par
 */
-   function execute( $par ) {
+   public function execute( $par ) {
$user = $this-getUser();
if ( !$this-userCanExecute( $user ) ) {
$this-displayRestrictionError();

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I52e34209557b00f97a4e68250afbeb7647b64146
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Thiemo Mättig (WMDE) thiemo.maet...@wikimedia.de
Gerrit-Reviewer: Aaron Schulz asch...@wikimedia.org
Gerrit-Reviewer: Addshore addshorew...@gmail.com
Gerrit-Reviewer: Daniel Kinzler daniel.kinz...@wikimedia.de
Gerrit-Reviewer: Umherirrender umherirrender_de...@web.de
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] maintenance: Add --query option in sql.php - change (mediawiki/core)

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

Change subject: maintenance: Add --query option in sql.php
..


maintenance: Add --query option in sql.php

This makes it easier to run a query in a scripted fashion,
e.g. with Wikimedia's foreachwiki.

Change-Id: I5562be2fb0871817ee55f1395b686537069f78dc
---
M maintenance/sql.php
1 file changed, 19 insertions(+), 7 deletions(-)

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



diff --git a/maintenance/sql.php b/maintenance/sql.php
index a7fd827..a93e51f 100644
--- a/maintenance/sql.php
+++ b/maintenance/sql.php
@@ -34,6 +34,7 @@
parent::__construct();
$this-mDescription = Send SQL queries to a MediaWiki 
database.  .
Takes a file name containing SQL as argument 
or runs interactively.;
+   $this-addOption( 'query', 'Run a single query instead of 
running interactively', false, true );
$this-addOption( 'cluster', 'Use an external cluster by name', 
false, true );
$this-addOption( 'wikidb', 'The database wiki ID to use if not 
the current one', false, true );
$this-addOption( 'slave', 'Use a slave server (either any or 
by name)', false, true );
@@ -89,6 +90,13 @@
}
}
 
+   if ( $this-hasOption( 'query' ) ) {
+   $query = $this-getOption( 'query' );
+   $this-sqlDoQuery( $db, $query, /* dieOnError */ true );
+   wfWaitForSlaves();
+   return;
+   }
+
$useReadline = function_exists( 'readline_add_history' )
 Maintenance::posix_isatty( 0 /*STDIN*/ );
 
@@ -102,6 +110,7 @@
$wholeLine = '';
$newPrompt = ' ';
$prompt = $newPrompt;
+   $doDie = !Maintenance::posix_isatty( 0 );
while ( ( $line = Maintenance::readconsole( $prompt ) ) !== 
false ) {
if ( !$line ) {
# User simply pressed return key
@@ -122,19 +131,22 @@
readline_add_history( $wholeLine . 
$db-getDelimiter() );
readline_write_history( $historyFile );
}
-   try {
-   $res = $db-query( $wholeLine );
-   $this-sqlPrintResult( $res, $db );
-   } catch ( DBQueryError $e ) {
-   $doDie = !Maintenance::posix_isatty( 0 );
-   $this-error( $e, $doDie );
-   }
+   $this-sqlDoQuery( $db, $wholeLine, $doDie );
$prompt = $newPrompt;
$wholeLine = '';
}
wfWaitForSlaves();
}
 
+   protected function sqlDoQuery( $db, $line, $dieOnError ) {
+   try {
+   $res = $db-query( $line );
+   $this-sqlPrintResult( $res, $db );
+   } catch ( DBQueryError $e ) {
+   $this-error( $e, $dieOnError );
+   }
+   }
+
/**
 * Print the results, callback for $db-sourceStream()
 * @param ResultWrapper $res The results object

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5562be2fb0871817ee55f1395b686537069f78dc
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Krinkle krinklem...@gmail.com
Gerrit-Reviewer: Legoktm legoktm.wikipe...@gmail.com
Gerrit-Reviewer: Parent5446 tylerro...@gmail.com
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] [PULL THROUGH] Rename MWSurfaceWidget to MWTargetWidget - change (mediawiki...VisualEditor)

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

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

Change subject: [PULL THROUGH] Rename MWSurfaceWidget to MWTargetWidget
..

[PULL THROUGH] Rename MWSurfaceWidget to MWTargetWidget

Depends on Ib019df8b in core.

Bug: T94066
Change-Id: If578e15c1ee7effd5ca1d6073521a6c59caac255
---
M .jsduck/eg-iframe.html
M extension.json
M modules/ve-mw/ui/dialogs/ve.ui.MWMediaDialog.js
M modules/ve-mw/ui/dialogs/ve.ui.MWReferenceDialog.js
D modules/ve-mw/ui/widgets/ve.ui.MWSurfaceWidget.js
A modules/ve-mw/ui/widgets/ve.ui.MWTargetWidget.js
6 files changed, 61 insertions(+), 61 deletions(-)


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

diff --git a/.jsduck/eg-iframe.html b/.jsduck/eg-iframe.html
index d184564..cd1f4fc 100644
--- a/.jsduck/eg-iframe.html
+++ b/.jsduck/eg-iframe.html
@@ -48,7 +48,7 @@
link rel=stylesheet 
href=lib/ve/src/ui/styles/contextitems/ve.ui.TableContextItem.css 
class=stylesheet-ve
link rel=stylesheet 
href=lib/ve/src/ui/styles/ve.ui.Overlay.css class=stylesheet-ve
link rel=stylesheet 
href=lib/ve/src/ui/styles/ve.ui.Surface.css class=stylesheet-ve
-   link rel=stylesheet 
href=lib/ve/src/ui/styles/widgets/ve.ui.SurfaceWidget.css 
class=stylesheet-ve
+   link rel=stylesheet 
href=lib/ve/src/ui/styles/widgets/ve.ui.TargetWidget.css 
class=stylesheet-ve
link rel=stylesheet 
href=lib/ve/src/ui/styles/ve.ui.TableContext.css class=stylesheet-ve
link rel=stylesheet 
href=lib/ve/src/ui/styles/ve.ui.Toolbar.css class=stylesheet-ve
 
@@ -367,7 +367,7 @@
script 
src=lib/ve/src/ui/widgets/ve.ui.LanguageResultWidget.js/script
script 
src=lib/ve/src/ui/dialogs/ve.ui.LanguageSearchDialog.js/script
script 
src=lib/ve/src/ui/widgets/ve.ui.LanguageInputWidget.js/script
-   script 
src=lib/ve/src/ui/widgets/ve.ui.SurfaceWidget.js/script
+   script 
src=lib/ve/src/ui/widgets/ve.ui.TargetWidget.js/script
script 
src=lib/ve/src/ui/widgets/ve.ui.LinkAnnotationWidget.js/script
script 
src=lib/ve/src/ui/widgets/ve.ui.ContextSelectWidget.js/script
script 
src=lib/ve/src/ui/widgets/ve.ui.ContextOptionWidget.js/script
diff --git a/extension.json b/extension.json
index 07cb25c..78e117f 100644
--- a/extension.json
+++ b/extension.json
@@ -675,7 +675,7 @@

lib/ve/src/ui/datatransferhandlers/ve.ui.HTMLFileTransferHandler.js,

lib/ve/src/ui/windowmanagers/ve.ui.ToolbarDialogWindowManager.js,
lib/ve/src/ui/widgets/ve.ui.AlignWidget.js,
-   lib/ve/src/ui/widgets/ve.ui.SurfaceWidget.js,
+   lib/ve/src/ui/widgets/ve.ui.TargetWidget.js,

lib/ve/src/ui/widgets/ve.ui.LinkAnnotationWidget.js,

lib/ve/src/ui/widgets/ve.ui.ContextSelectWidget.js,

lib/ve/src/ui/widgets/ve.ui.ContextOptionWidget.js,
@@ -729,7 +729,7 @@

lib/ve/src/ui/styles/widgets/ve.ui.MediaSizeWidget.css,

lib/ve/src/ui/styles/inspectors/ve.ui.CommentInspector.css,

lib/ve/src/ui/styles/inspectors/ve.ui.FragmentInspector.css,
-   
lib/ve/src/ui/styles/widgets/ve.ui.SurfaceWidget.css,
+   
lib/ve/src/ui/styles/widgets/ve.ui.TargetWidget.css,
lib/ve/src/ui/styles/ve.ui.ContextItem.css,

lib/ve/src/ui/styles/contextitems/ve.ui.AlignableContextItem.css,

lib/ve/src/ui/styles/contextitems/ve.ui.CommentContextItem.css,
@@ -911,7 +911,7 @@
modules/ve-mw/ui/ve.ui.MWCommandRegistry.js,
modules/ve-mw/ui/ve.ui.MWSequenceRegistry.js,

modules/ve-mw/ui/commands/ve.ui.MWWikitextWarningCommand.js,
-   
modules/ve-mw/ui/widgets/ve.ui.MWSurfaceWidget.js,
+   
modules/ve-mw/ui/widgets/ve.ui.MWTargetWidget.js,

modules/ve-mw/ui/widgets/ve.ui.MWTocItemWidget.js,
modules/ve-mw/ui/widgets/ve.ui.MWTocWidget.js,

modules/ve-mw/ui/dialogs/ve.ui.MWSaveDialog.js,
diff --git a/modules/ve-mw/ui/dialogs/ve.ui.MWMediaDialog.js 
b/modules/ve-mw/ui/dialogs/ve.ui.MWMediaDialog.js
index cd50a11..8c8ea4d 100644
--- a/modules/ve-mw/ui/dialogs/ve.ui.MWMediaDialog.js
+++ b/modules/ve-mw/ui/dialogs/ve.ui.MWMediaDialog.js
@@ -903,8 +903,8 @@
// Only check 'changed' status after the model 

[MediaWiki-commits] [Gerrit] Converted \r\n to \n\n and removed one useless \r from the F... - change (mediawiki...Gamepress)

2015-07-18 Thread Jack Phoenix (Code Review)
Jack Phoenix has uploaded a new change for review.

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

Change subject: Converted \r\n to \n\n and removed one useless \r from the 
Finnish i18n file
..

Converted \r\n to \n\n and removed one useless \r from the Finnish i18n file

Change-Id: I0ddf62b330443676b0ba0b80a2dfcd250b90bce7
---
M i18n/en.json
M i18n/fi.json
2 files changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/Gamepress 
refs/changes/54/225654/1

diff --git a/i18n/en.json b/i18n/en.json
index 2a92b84..95ee620 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -3,7 +3,7 @@
authors: []
},
gamepress-back-to-top: Back to top uarr;,
-   gamepress-navigation: * mainpage|mainpage-description\r\n** 
faqpage|faq\r\n** recentchanges-url|recentchanges,
+   gamepress-navigation: * mainpage|mainpage-description\n\n** 
faqpage|faq\n\n** recentchanges-url|recentchanges,
gamepress-prefooter-1: ,
gamepress-prefooter-2: ,
gamepress-prefooter-3: 
diff --git a/i18n/fi.json b/i18n/fi.json
index dcbf3d3..48ec2a6 100644
--- a/i18n/fi.json
+++ b/i18n/fi.json
@@ -1,7 +1,7 @@
 {
@metadata: {
authors: [
-   Jack Phoenix j...@countervandalism.net\r
+   Jack Phoenix j...@countervandalism.net
]
},
gamepress-back-to-top: Palaa alkuun uarr;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0ddf62b330443676b0ba0b80a2dfcd250b90bce7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/Gamepress
Gerrit-Branch: master
Gerrit-Owner: Jack Phoenix j...@countervandalism.net

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


[MediaWiki-commits] [Gerrit] Converted \r\n to \n\n in the i18n file - change (mediawiki...Bouquet)

2015-07-18 Thread Jack Phoenix (Code Review)
Jack Phoenix has uploaded a new change for review.

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

Change subject: Converted \r\n to \n\n in the i18n file
..

Converted \r\n to \n\n in the i18n file

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


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/Bouquet 
refs/changes/53/225653/1

diff --git a/i18n/en.json b/i18n/en.json
index 8d48719..ff2ee69 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -2,5 +2,5 @@
@metadata: {
authors: []
},
-   bouquet-navigation: * mainpage|mainpage-description\r\n** 
recentchanges-url|recentchanges\r\n** randompage-url|randompage\r\n* 
faqpage|FAQ\r\n* helppage|help\r\n* portal-url|portal\r\n* 
currentevents-url|currentevents
+   bouquet-navigation: * mainpage|mainpage-description\n\n** 
recentchanges-url|recentchanges\n\n** randompage-url|randompage\n\n* 
faqpage|FAQ\n\n* helppage|help\n\n* portal-url|portal\n\n* 
currentevents-url|currentevents
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If83ff82d95b829c42bdf06769694d8cfcf2faf7e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/Bouquet
Gerrit-Branch: master
Gerrit-Owner: Jack Phoenix j...@countervandalism.net

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


[MediaWiki-commits] [Gerrit] Converted \r\n to \n\n - change (mediawiki...Nimbus)

2015-07-18 Thread Jack Phoenix (Code Review)
Jack Phoenix has uploaded a new change for review.

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

Change subject: Converted \r\n to \n\n
..

Converted \r\n to \n\n

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


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/Nimbus 
refs/changes/56/225656/1

diff --git a/i18n/en.json b/i18n/en.json
index 35d3ee4..6f2b37d 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -14,11 +14,11 @@
nimbus-logout: Log out?,
nimbus-more-actions: More actions,
nimbus-more-wikis: More wikis,
-   nimbus-pages-can-be-edited: This page can be edited.br /\r\nIs 
this page incomplete? Is there anything wrong?br /\r\nbChange it!/b,
+   nimbus-pages-can-be-edited: This page can be edited.br /\n\nIs 
this page incomplete? Is there anything wrong?br /\n\nbChange it!/b,
nimbus-profile: Profile,
nimbus-recent-contributors: Recent contributors to this page,
nimbus-recent-contributors-info: The following people recently 
contributed to this page.,
nimbus-signup: Sign up,
-   nimbus-sidebar: * navigation\r\n** 
mainpage|mainpage-description\r\n** portal-url|portal\r\n** 
currentevents-url|currentevents\r\n** recentchanges-url|recentchanges\r\n** 
randompage-url|randompage\r\n** helppage|help,
+   nimbus-sidebar: * navigation\n\n** 
mainpage|mainpage-description\n\n** portal-url|portal\n\n** 
currentevents-url|currentevents\n\n** recentchanges-url|recentchanges\n\n** 
randompage-url|randompage\n\n** helppage|help,
nimbus-welcome: Welcome $1
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7d67726921bccdfa20fa991ee9bdf9c3e65a9165
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/Nimbus
Gerrit-Branch: master
Gerrit-Owner: Jack Phoenix j...@countervandalism.net

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


[MediaWiki-commits] [Gerrit] Converted \r\n to \n\n - change (mediawiki...Nimbus)

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

Change subject: Converted \r\n to \n\n
..


Converted \r\n to \n\n

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

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



diff --git a/i18n/en.json b/i18n/en.json
index 35d3ee4..6f2b37d 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -14,11 +14,11 @@
nimbus-logout: Log out?,
nimbus-more-actions: More actions,
nimbus-more-wikis: More wikis,
-   nimbus-pages-can-be-edited: This page can be edited.br /\r\nIs 
this page incomplete? Is there anything wrong?br /\r\nbChange it!/b,
+   nimbus-pages-can-be-edited: This page can be edited.br /\n\nIs 
this page incomplete? Is there anything wrong?br /\n\nbChange it!/b,
nimbus-profile: Profile,
nimbus-recent-contributors: Recent contributors to this page,
nimbus-recent-contributors-info: The following people recently 
contributed to this page.,
nimbus-signup: Sign up,
-   nimbus-sidebar: * navigation\r\n** 
mainpage|mainpage-description\r\n** portal-url|portal\r\n** 
currentevents-url|currentevents\r\n** recentchanges-url|recentchanges\r\n** 
randompage-url|randompage\r\n** helppage|help,
+   nimbus-sidebar: * navigation\n\n** 
mainpage|mainpage-description\n\n** portal-url|portal\n\n** 
currentevents-url|currentevents\n\n** recentchanges-url|recentchanges\n\n** 
randompage-url|randompage\n\n** helppage|help,
nimbus-welcome: Welcome $1
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7d67726921bccdfa20fa991ee9bdf9c3e65a9165
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/Nimbus
Gerrit-Branch: master
Gerrit-Owner: Jack Phoenix j...@countervandalism.net
Gerrit-Reviewer: Jack Phoenix j...@countervandalism.net
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 UpdateConstraintsTableTest file name - change (mediawiki...WikibaseQualityConstraints)

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

Change subject: Fix UpdateConstraintsTableTest file name
..


Fix UpdateConstraintsTableTest file name

This was missed in I55fd778.

Change-Id: I1da244ec704985fd53036f9c99d36bbf225b6215
---
R tests/phpunit/Maintenance/UpdateConstraintsTableTest.php
1 file changed, 5 insertions(+), 5 deletions(-)

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



diff --git a/tests/phpunit/Maintenance/UpdateTableTest.php 
b/tests/phpunit/Maintenance/UpdateConstraintsTableTest.php
similarity index 97%
rename from tests/phpunit/Maintenance/UpdateTableTest.php
rename to tests/phpunit/Maintenance/UpdateConstraintsTableTest.php
index 40d9b13..744382c 100644
--- a/tests/phpunit/Maintenance/UpdateTableTest.php
+++ b/tests/phpunit/Maintenance/UpdateConstraintsTableTest.php
@@ -4,7 +4,6 @@
 
 use WikibaseQuality\ConstraintReport\Maintenance\UpdateConstraintsTable;
 
-
 /**
  * @covers WikibaseQuality\ConstraintReport\Maintenance\UpdateConstraintsTable
  *
@@ -19,20 +18,21 @@
 
protected function setup() {
parent::setup();
+
$this-tablesUsed[] = CONSTRAINT_TABLE;
}
 
public function addDBData() {
$this-db-delete( CONSTRAINT_TABLE, '*' );
$this-db-insert( CONSTRAINT_TABLE,
-   array (
-   array (
+   array(
+   array(
'constraint_guid' = 'foo',
'pid' = 42,
'constraint_type_qid' = 
'TestConstraint',
'constraint_parameters' = '{}'
),
-   array (
+   array(
'constraint_guid' = 'bar',
'pid' = 42,
'constraint_type_qid' = 
'TestConstraint',
@@ -84,4 +84,4 @@
);
}
 
-}
\ No newline at end of file
+}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1da244ec704985fd53036f9c99d36bbf225b6215
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/WikibaseQualityConstraints
Gerrit-Branch: master
Gerrit-Owner: Thiemo Mättig (WMDE) thiemo.maet...@wikimedia.de
Gerrit-Reviewer: Addshore addshorew...@gmail.com
Gerrit-Reviewer: Andreasburmeister andreas.burmeis...@student.hpi.de
Gerrit-Reviewer: Bene benestar.wikime...@gmail.com
Gerrit-Reviewer: Jonaskeutel jonas.keu...@student.hpi.de
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 abstract GadgetRepo and MediaWikiGadgetsDefinition imple... - change (mediawiki...Gadgets)

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

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

Change subject: Add abstract GadgetRepo and MediaWikiGadgetsDefinition 
implementation
..

Add abstract GadgetRepo and MediaWikiGadgetsDefinition implementation

Bug: T106176
Change-Id: I3e802889f6f495783f4dbac65c2a8cefa824a778
---
M GadgetHooks.php
M Gadgets_body.php
M SpecialGadgets.php
M api/ApiQueryGadgetCategories.php
M api/ApiQueryGadgets.php
M extension.json
A includes/GadgetRepo.php
A includes/MediaWikiGadgetsDefinitionRepo.php
M tests/GadgetTest.php
9 files changed, 354 insertions(+), 268 deletions(-)


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

diff --git a/GadgetHooks.php b/GadgetHooks.php
index efec80a..33a865c 100644
--- a/GadgetHooks.php
+++ b/GadgetHooks.php
@@ -33,8 +33,11 @@
public static function articleSaveComplete( $article, $user, $text ) {
// update cache if MediaWiki:Gadgets-definition was edited
$title = $article-getTitle();
-   if ( $title-getNamespace() == NS_MEDIAWIKI  
$title-getText() == 'Gadgets-definition' ) {
-   Gadget::purgeDefinitionCache();
+   $repo = GadgetRepo::singleton();
+   if ( $title-getNamespace() == NS_MEDIAWIKI  
$title-getText() == 'Gadgets-definition'
+$repo instanceof MediaWikiGadgetsDefinitionRepo
+   ) {
+   $repo-purgeDefinitionCache();
}
return true;
}
@@ -45,7 +48,7 @@
 * @return bool
 */
public static function userGetDefaultOptions( $defaultOptions ) {
-   $gadgets = Gadget::loadStructuredList();
+   $gadgets = GadgetRepo::singleton()-getStructuredList();
if ( !$gadgets ) {
return true;
}
@@ -71,7 +74,7 @@
 * @return bool
 */
public static function getPreferences( $user, $preferences ) {
-   $gadgets = Gadget::loadStructuredList();
+   $gadgets = GadgetRepo::singleton()-getStructuredList();
if ( !$gadgets ) {
return true;
}
@@ -138,15 +141,14 @@
 * @return bool
 */
public static function registerModules( $resourceLoader ) {
-   $gadgets = Gadget::loadList();
-   if ( !$gadgets ) {
+   $repo = GadgetRepo::singleton();
+   $ids = $repo-getGadgetIds();
+   if ( !$ids ) {
return true;
}
 
-   /**
-* @var $g Gadget
-*/
-   foreach ( $gadgets as $g ) {
+   foreach ( $ids as $id ) {
+   $g = $repo-getGadget( $id );
$module = $g-getModule();
if ( $module ) {
$resourceLoader-register( $g-getModuleName(), 
$module );
@@ -162,8 +164,9 @@
 * @return bool
 */
public static function beforePageDisplay( $out ) {
-   $gadgets = Gadget::loadList();
-   if ( !$gadgets ) {
+   $repo = GadgetRepo::singleton();
+   $ids = $repo-getGadgetIds();
+   if ( !$ids ) {
return true;
}
 
@@ -175,7 +178,8 @@
 * @var $gadget Gadget
 */
$user = $out-getUser();
-   foreach ( $gadgets as $gadget ) {
+   foreach ( $ids as $id ) {
+   $gadget = $repo-getGadget( $id );
if ( $gadget-isEnabled( $user )  $gadget-isAllowed( 
$user ) ) {
if ( $gadget-hasModule() ) {
$out-addModuleStyles( 
$gadget-getModuleName() );
@@ -191,7 +195,7 @@
 
// Allow other extensions, e.g. MobileFrontend, to disallow 
legacy gadgets
if ( Hooks::run( 'Gadgets::allowLegacy', array( 
$out-getContext() ) ) ) {
-   $lb-execute( __METHOD__ );
+   $lb-execute();
 
$done = array();
 
diff --git a/Gadgets_body.php b/Gadgets_body.php
index 02d1d86..ebead09 100644
--- a/Gadgets_body.php
+++ b/Gadgets_body.php
@@ -72,76 +72,6 @@
return strlen( $id )  0  ResourceLoader::isValidModuleName( 
ext.gadget.$id );
}
 
-   /**
-* Creates an instance of this class from definition in 
MediaWiki:Gadgets-definition
-* @param $definition String: Gadget definition
-* @return Gadget|bool Instance of Gadget class or false if $definition 
is invalid
-*/
-   public static function newFromDefinition( $definition ) {
-   $m = array();
-   if ( !preg_match( '/^\*+ 

[MediaWiki-commits] [Gerrit] role::postgres: Update to 9.4 - change (operations/puppet)

2015-07-18 Thread Alexandros Kosiaris (Code Review)
Alexandros Kosiaris has submitted this change and it was merged.

Change subject: role::postgres: Update to 9.4
..


role::postgres: Update to 9.4

Also use the rather ugly lsbdistcodename pattern to autodetermine the
postgresql version

Change-Id: Ic9799bb1666a33600cc1f38211e892eb463ee21d
---
M manifests/role/postgres.pp
M modules/postgresql/manifests/master.pp
M modules/postgresql/manifests/postgis.pp
3 files changed, 13 insertions(+), 5 deletions(-)

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



diff --git a/manifests/role/postgres.pp b/manifests/role/postgres.pp
index c4ce8e3..167712a 100644
--- a/manifests/role/postgres.pp
+++ b/manifests/role/postgres.pp
@@ -3,9 +3,9 @@
 class role::postgres::common {
 include standard
 
-$datadir = '/srv/postgres/9.1/main'
+$datadir = '/srv/postgres/9.4/main'
 
-file { '/etc/postgresql/9.1/main/tuning.conf':
+file { '/etc/postgresql/9.4/main/tuning.conf':
 ensure = 'present',
 owner  = 'root',
 group  = 'root',
diff --git a/modules/postgresql/manifests/master.pp 
b/modules/postgresql/manifests/master.pp
index d46b724..3b5440c 100644
--- a/modules/postgresql/manifests/master.pp
+++ b/modules/postgresql/manifests/master.pp
@@ -29,7 +29,11 @@
 class postgresql::master(
 $master_server=$::fqdn,
 $includes=[],
-$pgversion='9.1',
+$pgversion = $::lsbdistcodename ? {
+jessie  = '9.4',
+precise = '9.1',
+trusty  = '9.3',
+},
 $ensure='present',
 $max_wal_senders=3,
 $checkpoint_segments=64,
diff --git a/modules/postgresql/manifests/postgis.pp 
b/modules/postgresql/manifests/postgis.pp
index 1ca536f..594f759 100644
--- a/modules/postgresql/manifests/postgis.pp
+++ b/modules/postgresql/manifests/postgis.pp
@@ -13,8 +13,12 @@
 # include postgresql::postgis
 #
 class postgresql::postgis(
-$pgversion='9.1',
-$ensure='present'
+$ensure='present',
+$pgversion = $::lsbdistcodename ? {
+jessie  = '9.4',
+precise = '9.1',
+trusty  = '9.3',
+},
 ) {
 
 package { [

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic9799bb1666a33600cc1f38211e892eb463ee21d
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Alexandros Kosiaris akosia...@wikimedia.org
Gerrit-Reviewer: Alexandros Kosiaris akosia...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


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

2015-07-18 Thread Jenkins-mwext-sync (Code Review)
Jenkins-mwext-sync has submitted this change and it was merged.

Change subject: Syncronize VisualEditor: d42e10c..fb78225
..


Syncronize VisualEditor: d42e10c..fb78225

Change-Id: I0fc146e103c7df00af04acfa149af6c6425f1ac7
---
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 d42e10c..fb78225 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit d42e10cacbf5522e5da22506415e05f01773d637
+Subproject commit fb78225f763a371a0fcfd8410d0eaa63589dbacf

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0fc146e103c7df00af04acfa149af6c6425f1ac7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions
Gerrit-Branch: master
Gerrit-Owner: Jenkins-mwext-sync jenkins-...@wikimedia.org
Gerrit-Reviewer: Jenkins-mwext-sync jenkins-...@wikimedia.org

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


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

2015-07-18 Thread Jenkins-mwext-sync (Code Review)
Jenkins-mwext-sync has uploaded a new change for review.

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

Change subject: Syncronize VisualEditor: d42e10c..fb78225
..

Syncronize VisualEditor: d42e10c..fb78225

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


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions 
refs/changes/38/225638/1

diff --git a/VisualEditor b/VisualEditor
index d42e10c..fb78225 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit d42e10cacbf5522e5da22506415e05f01773d637
+Subproject commit fb78225f763a371a0fcfd8410d0eaa63589dbacf

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0fc146e103c7df00af04acfa149af6c6425f1ac7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions
Gerrit-Branch: master
Gerrit-Owner: Jenkins-mwext-sync jenkins-...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Update TimedMediaHandler tests - change (mediawiki...TimedMediaHandler)

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

Change subject: Update TimedMediaHandler tests
..


Update TimedMediaHandler tests

Change-Id: I30e60beae9222f631e0975374221411321f58d00
---
A .jscsrc
M Gruntfile.js
A composer.json
M package.json
4 files changed, 31 insertions(+), 3 deletions(-)

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



diff --git a/.jscsrc b/.jscsrc
new file mode 100644
index 000..9d22e3f
--- /dev/null
+++ b/.jscsrc
@@ -0,0 +1,3 @@
+{
+   preset: wikimedia
+}
diff --git a/Gruntfile.js b/Gruntfile.js
index 9c56558..4538071 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -1,20 +1,34 @@
 /*jshint node:true */
 module.exports = function ( grunt ) {
-   grunt.loadNpmTasks( 'grunt-banana-checker' );
+   grunt.loadNpmTasks( 'grunt-contrib-jshint' );
grunt.loadNpmTasks( 'grunt-jsonlint' );
+   grunt.loadNpmTasks( 'grunt-banana-checker' );
+   grunt.loadNpmTasks( 'grunt-jscs' );
 
grunt.initConfig( {
+   jshint: {
+   options: {
+   jshintrc: true
+   },
+   all: [
+   '*.js'
+   ]
+   },
+   jscs: {
+   src: '%= jshint.all %'
+   },
banana: {
all: 'i18n/'
},
jsonlint: {
all: [
+   '*.json',
'**/*.json',
'!node_modules/**'
]
}
} );
 
-   grunt.registerTask( 'test', [ 'jsonlint', 'banana' ] );
+   grunt.registerTask( 'test', [ 'jshint', 'jscs', 'jsonlint', 'banana' ] 
);
grunt.registerTask( 'default', 'test' );
 };
diff --git a/composer.json b/composer.json
new file mode 100644
index 000..3d55a97
--- /dev/null
+++ b/composer.json
@@ -0,0 +1,10 @@
+{
+   require-dev: {
+   jakub-onderka/php-parallel-lint: 0.9.*
+   },
+   scripts: {
+   test: [
+   parallel-lint . --exclude vendor
+   ]
+   }
+}
diff --git a/package.json b/package.json
index 76e8a82..93beca9 100644
--- a/package.json
+++ b/package.json
@@ -1,12 +1,13 @@
 {
-  private: true,
   scripts: {
 test: grunt test
   },
   devDependencies: {
 grunt: 0.4.5,
 grunt-cli: 0.1.13,
+grunt-contrib-jshint: 0.11.2,
 grunt-banana-checker: 0.2.2,
+grunt-jscs: 1.8.0,
 grunt-jsonlint: 1.0.4
   }
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I30e60beae9222f631e0975374221411321f58d00
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/TimedMediaHandler
Gerrit-Branch: master
Gerrit-Owner: Paladox thomasmulhall...@yahoo.com
Gerrit-Reviewer: Brian Wolff bawolff...@gmail.com
Gerrit-Reviewer: Brion VIBBER br...@wikimedia.org
Gerrit-Reviewer: Hashar has...@free.fr
Gerrit-Reviewer: TheDJ hartman.w...@gmail.com
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] maps: LVS IP for kartotherian and tilerator - change (operations/dns)

2015-07-18 Thread Alexandros Kosiaris (Code Review)
Alexandros Kosiaris has uploaded a new change for review.

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

Change subject: maps: LVS IP for kartotherian and tilerator
..

maps: LVS IP for kartotherian and tilerator

Assign IPs in codfw for the new maps kartotherian and tilerator nodejs
services

Bug: T105074
Change-Id: I5653d8ca3614d3ba085afbf754a891b234bcbc65
---
M templates/10.in-addr.arpa
M templates/wmnet
2 files changed, 4 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/dns 
refs/changes/40/225640/1

diff --git a/templates/10.in-addr.arpa b/templates/10.in-addr.arpa
index d32e4fc..f2631f7 100644
--- a/templates/10.in-addr.arpa
+++ b/templates/10.in-addr.arpa
@@ -19,6 +19,8 @@
 $ORIGIN 1.2.{{ zonename }}.
 
 1   1H  IN PTR  appservers.svc.codfw.wmnet.
+13  1H  IN PTR  kartotherian.svc.codfw.wmnet.
+14  1H  IN PTR  tilerator.svc.codfw.wmnet.
 21  1H  IN PTR  rendering.svc.codfw.wmnet.
 22  1H  IN PTR  api.svc.codfw.wmnet.
 27  1H  IN PTR  ms-fe.svc.codfw.wmnet.
diff --git a/templates/wmnet b/templates/wmnet
index 84cb2e7..1d33349 100644
--- a/templates/wmnet
+++ b/templates/wmnet
@@ -3783,3 +3783,5 @@
 api 1H  IN A10.2.1.22
 ms-fe   1H  IN A10.2.1.27
 labstore1H  IN A10.192.21.7
+kartotherian1H  IN A10.2.1.13
+tilerator   1H  IN A10.2.1.14

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5653d8ca3614d3ba085afbf754a891b234bcbc65
Gerrit-PatchSet: 1
Gerrit-Project: operations/dns
Gerrit-Branch: master
Gerrit-Owner: Alexandros Kosiaris akosia...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Move function to CentralAuthHook - change (mediawiki...CentralAuth)

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

Change subject: Move function to CentralAuthHook
..


Move function to CentralAuthHook

* Moves function to CentralAuthHook in preperation for extension.json.

Change-Id: Ia8784bd85019582b3486d3de9a49e4fd190e7aae
---
M CentralAuth.php
M includes/CentralAuthHooks.php
2 files changed, 78 insertions(+), 78 deletions(-)

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



diff --git a/CentralAuth.php b/CentralAuth.php
index 141885d..693d5de 100644
--- a/CentralAuth.php
+++ b/CentralAuth.php
@@ -478,13 +478,13 @@
 $wgLogActions['gblrights/groupperms']  = 
'centralauth-rightslog-entry-groupperms';
 $wgLogActions['gblrights/groupprms2']  = 
'centralauth-rightslog-entry-groupperms2';
 $wgLogActions['gblrights/groupprms3']  = 
'centralauth-rightslog-entry-groupperms3';
-$wgLogActionsHandlers['gblrights/grouprename'] = 'efHandleGrouprenameLogEntry';
+$wgLogActionsHandlers['gblrights/grouprename'] = 
'CentralAuthHooks::onHandleGrouprenameLogEntry';
 $wgLogActionsHandlers['gblrename/rename'] = 'GlobalRenameLogFormatter';
 $wgLogActionsHandlers['gblrename/promote'] = 'GlobalRenameLogFormatter';
 $wgLogActionsHandlers['gblrename/merge'] = 'GlobalUserMergeLogFormatter';
 
 foreach ( array( 'newset', 'setrename', 'setnewtype', 'setchange', 'deleteset' 
) as $type ) {
-   $wgLogActionsHandlers[gblrights/{$type}] = 'efHandleWikiSetLogEntry';
+   $wgLogActionsHandlers[gblrights/{$type}] = 
'CentralAuthHooks::onHandleWikiSetLogEntry';
 }
 
 $commonModuleInfo = array(
@@ -571,79 +571,3 @@
 
 // Finish configuration after other extensions and settings are loaded.
 $wgExtensionFunctions[] = 'CentralAuthHooks::onRunExtensionFunctions';
-
-/**
- * @param $type
- * @param $action
- * @param $title
- * @param $skin Skin|null If null, we want to use the wiki content language, 
since that will go to the IRC feed.
- * @param $params
- * @param $filterWikilinks bool
- * @return String
- */
-function efHandleWikiSetLogEntry( $type, $action, $title, $skin, $params, 
$filterWikilinks = false ) {
-   if ( $skin ) {
-   $link = Linker::link( $title, htmlspecialchars( $params[0] ) );
-   } else {
-   $link = $params[0];
-   }
-
-   switch( $action ) {
-   case 'newset':
-   $args = array( WikiSet::formatType( $params[1] ), 
$params[2] );
-   break;
-   case 'setrename':
-   $args = array( $params[1] );
-   break;
-   case 'setnewtype':
-   $args = array( WikiSet::formatType( $params[1] ), 
WikiSet::formatType( $params[2] ) );
-   break;
-   case 'setchange':
-   $args = array( $params[1]
-   ? $params[1] : wfMessage( 'rightsnone' 
)-text(), $params[2] ? $params[2] : wfMessage( 'rightsnone' )-text() );
-   break;
-   default: //'deleteset'
-   $args = array();
-   }
-
-   // Give grep a chance to find the usages:
-   // centralauth-rightslog-entry-newset, 
centralauth-rightslog-entry-setrename,
-   // centralauth-rightslog-entry-setnewtype, 
centralauth-rightslog-entry-setchange,
-   // centralauth-rightslog-entry-deleteset
-   $msg = wfMessage( centralauth-rightslog-entry-{$action}, $link 
)-params( $args );
-   if( $skin ) {
-   return $msg-text();
-   } else {
-   return $msg-inContentLanguage()-text();
-   }
-}
-
-/**
- * Format global group rename log entries
- *
- * @param $type
- * @param $action
- * @param $title
- * @param $skin Skin|null If null, we want to use the wiki content language, 
since that will go to the IRC feed.
- * @param $params
- * @param $filterWikilinks bool
- *
- * @return String
- */
-function efHandleGrouprenameLogEntry( $type, $action, $title, $skin, $params, 
$filterWikilinks = false ) {
-   // $params[0] is the new one, $params[1] the old one
-   if ( $skin ) {
-   $params[0] = Linker::link( Title::newFromText( $params[0] ), 
htmlspecialchars( $params[0] ) );
-   $params[1] = Linker::link( Title::newFromText( $params[1] ), 
htmlspecialchars( $params[1] ) );
-   } else {
-   $params[0] = htmlspecialchars( $params[0] );
-   $params[1] = htmlspecialchars( $params[1] );
-   }
-
-   $msg = wfMessage( 'centralauth-rightslog-entry-grouprename' 
)-rawParams( $params[0], $params[1] );
-   if ( $skin ) {
-   return $msg-text();
-   } else {
-   return $msg-inContentLanguage()-text();
-   }
-}
diff --git a/includes/CentralAuthHooks.php b/includes/CentralAuthHooks.php
index d92a7aa..0544cc8 100644
--- a/includes/CentralAuthHooks.php
+++ b/includes/CentralAuthHooks.php
@@ -114,6 +114,82 @@
}
 
   

[MediaWiki-commits] [Gerrit] maintenance: Add --query option in sql.php - change (mediawiki/core)

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

Change subject: maintenance: Add --query option in sql.php
..


maintenance: Add --query option in sql.php

This makes it easier to run a query in a scripted fashion,
e.g. with Wikimedia's foreachwiki.

Change-Id: I5562be2fb0871817ee55f1395b686537069f78dc
---
M maintenance/sql.php
1 file changed, 19 insertions(+), 7 deletions(-)

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



diff --git a/maintenance/sql.php b/maintenance/sql.php
index a7fd827..a93e51f 100644
--- a/maintenance/sql.php
+++ b/maintenance/sql.php
@@ -34,6 +34,7 @@
parent::__construct();
$this-mDescription = Send SQL queries to a MediaWiki 
database.  .
Takes a file name containing SQL as argument 
or runs interactively.;
+   $this-addOption( 'query', 'Run a single query instead of 
running interactively', false, true );
$this-addOption( 'cluster', 'Use an external cluster by name', 
false, true );
$this-addOption( 'wikidb', 'The database wiki ID to use if not 
the current one', false, true );
$this-addOption( 'slave', 'Use a slave server (either any or 
by name)', false, true );
@@ -89,6 +90,13 @@
}
}
 
+   if ( $this-hasOption( 'query' ) ) {
+   $query = $this-getOption( 'query' );
+   $this-sqlDoQuery( $db, $query, /* dieOnError */ true );
+   wfWaitForSlaves();
+   return;
+   }
+
$useReadline = function_exists( 'readline_add_history' )
 Maintenance::posix_isatty( 0 /*STDIN*/ );
 
@@ -102,6 +110,7 @@
$wholeLine = '';
$newPrompt = ' ';
$prompt = $newPrompt;
+   $doDie = !Maintenance::posix_isatty( 0 );
while ( ( $line = Maintenance::readconsole( $prompt ) ) !== 
false ) {
if ( !$line ) {
# User simply pressed return key
@@ -122,19 +131,22 @@
readline_add_history( $wholeLine . 
$db-getDelimiter() );
readline_write_history( $historyFile );
}
-   try {
-   $res = $db-query( $wholeLine );
-   $this-sqlPrintResult( $res, $db );
-   } catch ( DBQueryError $e ) {
-   $doDie = !Maintenance::posix_isatty( 0 );
-   $this-error( $e, $doDie );
-   }
+   $this-sqlDoQuery( $db, $wholeLine, $doDie );
$prompt = $newPrompt;
$wholeLine = '';
}
wfWaitForSlaves();
}
 
+   protected function sqlDoQuery( $db, $line, $dieOnError ) {
+   try {
+   $res = $db-query( $line );
+   $this-sqlPrintResult( $res, $db );
+   } catch ( DBQueryError $e ) {
+   $this-error( $e, $dieOnError );
+   }
+   }
+
/**
 * Print the results, callback for $db-sourceStream()
 * @param ResultWrapper $res The results object

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5562be2fb0871817ee55f1395b686537069f78dc
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.26wmf14
Gerrit-Owner: Krinkle krinklem...@gmail.com
Gerrit-Reviewer: Krinkle krinklem...@gmail.com
Gerrit-Reviewer: Parent5446 tylerro...@gmail.com
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Don't try to use isAnon on non-object - change (mediawiki...GoogleLogin)

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

Change subject: Don't try to use isAnon on non-object
..


Don't try to use isAnon on non-object

User::newFromName() can return a boolean instead of an user object, too.

Change-Id: Ia1b9028f59f678d6acf4ca82e7a8fca09d02bb54
---
M includes/specials/SpecialManageGoogleLogin.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/includes/specials/SpecialManageGoogleLogin.php 
b/includes/specials/SpecialManageGoogleLogin.php
index bab2a92..134be45 100644
--- a/includes/specials/SpecialManageGoogleLogin.php
+++ b/includes/specials/SpecialManageGoogleLogin.php
@@ -68,7 +68,7 @@
return false;
}
$checkUser = User::newFromName( $data['username'] );
-   if ( $checkUser-isAnon() ) {
+   if ( !$checkUser || $checkUser-isAnon() ) {
return wfMessage( 
'googlelogin-manage-notexist', $data['username'] );
}
self::$manageableUser = $checkUser;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia1b9028f59f678d6acf4ca82e7a8fca09d02bb54
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/GoogleLogin
Gerrit-Branch: master
Gerrit-Owner: Florianschmidtwelzow florian.schmidt.stargatewis...@gmail.com
Gerrit-Reviewer: Umherirrender umherirrender_de...@web.de
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] [BREAKING CHANGE] Rename SurfaceWidget to TargetWidget - change (VisualEditor/VisualEditor)

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

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

Change subject: [BREAKING CHANGE] Rename SurfaceWidget to TargetWidget
..

[BREAKING CHANGE] Rename SurfaceWidget to TargetWidget

Bug: T94066
Change-Id: Ib019df8bd55b844f1ee381def0c27d5b3f9002fd
---
M build/modules.json
M demos/ve/desktop.html
M demos/ve/mobile.html
M src/themes/apex/widgets.css
M src/themes/mediawiki/widgets.css
D src/ui/styles/widgets/ve.ui.SurfaceWidget.css
A src/ui/styles/widgets/ve.ui.TargetWidget.css
R src/ui/widgets/ve.ui.TargetWidget.js
M tests/index.html
9 files changed, 43 insertions(+), 43 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor 
refs/changes/48/225648/1

diff --git a/build/modules.json b/build/modules.json
index 7d9a397..daebcce 100644
--- a/build/modules.json
+++ b/build/modules.json
@@ -428,7 +428,7 @@
src/ui/widgets/ve.ui.LanguageResultWidget.js,
src/ui/dialogs/ve.ui.LanguageSearchDialog.js,
src/ui/widgets/ve.ui.LanguageInputWidget.js,
-   src/ui/widgets/ve.ui.SurfaceWidget.js,
+   src/ui/widgets/ve.ui.TargetWidget.js,
src/ui/widgets/ve.ui.LinkAnnotationWidget.js,
src/ui/widgets/ve.ui.ContextSelectWidget.js,
src/ui/widgets/ve.ui.ContextOptionWidget.js,
@@ -492,7 +492,7 @@
src/ui/styles/contextitems/ve.ui.TableContextItem.css,
src/ui/styles/ve.ui.Overlay.css,
src/ui/styles/ve.ui.Surface.css,
-   src/ui/styles/widgets/ve.ui.SurfaceWidget.css,
+   src/ui/styles/widgets/ve.ui.TargetWidget.css,
src/ui/styles/ve.ui.TableContext.css,
src/ui/styles/ve.ui.Toolbar.css
],
diff --git a/demos/ve/desktop.html b/demos/ve/desktop.html
index 008a26c..2652f23 100644
--- a/demos/ve/desktop.html
+++ b/demos/ve/desktop.html
@@ -64,7 +64,7 @@
link rel=stylesheet 
href=../../src/ui/styles/contextitems/ve.ui.TableContextItem.css 
class=stylesheet-ve
link rel=stylesheet 
href=../../src/ui/styles/ve.ui.Overlay.css class=stylesheet-ve
link rel=stylesheet 
href=../../src/ui/styles/ve.ui.Surface.css class=stylesheet-ve
-   link rel=stylesheet 
href=../../src/ui/styles/widgets/ve.ui.SurfaceWidget.css 
class=stylesheet-ve
+   link rel=stylesheet 
href=../../src/ui/styles/widgets/ve.ui.TargetWidget.css class=stylesheet-ve
link rel=stylesheet 
href=../../src/ui/styles/ve.ui.TableContext.css class=stylesheet-ve
link rel=stylesheet 
href=../../src/ui/styles/ve.ui.Toolbar.css class=stylesheet-ve
 
@@ -389,7 +389,7 @@
script 
src=../../src/ui/widgets/ve.ui.LanguageResultWidget.js/script
script 
src=../../src/ui/dialogs/ve.ui.LanguageSearchDialog.js/script
script 
src=../../src/ui/widgets/ve.ui.LanguageInputWidget.js/script
-   script 
src=../../src/ui/widgets/ve.ui.SurfaceWidget.js/script
+   script 
src=../../src/ui/widgets/ve.ui.TargetWidget.js/script
script 
src=../../src/ui/widgets/ve.ui.LinkAnnotationWidget.js/script
script 
src=../../src/ui/widgets/ve.ui.ContextSelectWidget.js/script
script 
src=../../src/ui/widgets/ve.ui.ContextOptionWidget.js/script
diff --git a/demos/ve/mobile.html b/demos/ve/mobile.html
index d9d0b2a..b79ad53 100644
--- a/demos/ve/mobile.html
+++ b/demos/ve/mobile.html
@@ -64,7 +64,7 @@
link rel=stylesheet 
href=../../src/ui/styles/contextitems/ve.ui.TableContextItem.css 
class=stylesheet-ve
link rel=stylesheet 
href=../../src/ui/styles/ve.ui.Overlay.css class=stylesheet-ve
link rel=stylesheet 
href=../../src/ui/styles/ve.ui.Surface.css class=stylesheet-ve
-   link rel=stylesheet 
href=../../src/ui/styles/widgets/ve.ui.SurfaceWidget.css 
class=stylesheet-ve
+   link rel=stylesheet 
href=../../src/ui/styles/widgets/ve.ui.TargetWidget.css class=stylesheet-ve
link rel=stylesheet 
href=../../src/ui/styles/ve.ui.TableContext.css class=stylesheet-ve
link rel=stylesheet 
href=../../src/ui/styles/ve.ui.Toolbar.css class=stylesheet-ve
 
@@ -390,7 +390,7 @@
script 
src=../../src/ui/widgets/ve.ui.LanguageResultWidget.js/script
script 
src=../../src/ui/dialogs/ve.ui.LanguageSearchDialog.js/script
script 
src=../../src/ui/widgets/ve.ui.LanguageInputWidget.js/script
-   script 
src=../../src/ui/widgets/ve.ui.SurfaceWidget.js/script
+   script 
src=../../src/ui/widgets/ve.ui.TargetWidget.js/script
script 

[MediaWiki-commits] [Gerrit] Set up Norwegian language aliases for remaining sites - change (operations/puppet)

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

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

Change subject: Set up Norwegian language aliases for remaining sites
..

Set up Norwegian language aliases for remaining sites

Wikipedia is literally the centre of the universe.

Bug: T86924
Change-Id: I952011e484954d72a8c4643fa4191ae82c5a51f2
---
M modules/mediawiki/files/apache/sites/redirects.conf
M modules/mediawiki/files/apache/sites/redirects/redirects.dat
2 files changed, 30 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/46/225646/1

diff --git a/modules/mediawiki/files/apache/sites/redirects.conf 
b/modules/mediawiki/files/apache/sites/redirects.conf
index 7745207..3e70eee 100644
--- a/modules/mediawiki/files/apache/sites/redirects.conf
+++ b/modules/mediawiki/files/apache/sites/redirects.conf
@@ -271,6 +271,12 @@
ServerAlias jp.wikipedia.org
ServerAlias jp.wikipedia.com
ServerAlias nb.wikipedia.org
+   ServerAlias nb.wiktionary.org
+   ServerAlias nb.wikiquote.org
+   ServerAlias nb.wikibooks.org
+   ServerAlias nb.wikivoyage.org
+   ServerAlias nb.wikisource.org
+   ServerAlias nb.wikiversity.org
ServerAlias pa.us.wikimedia.org
ServerAlias arbcom.de.wikipedia.org
ServerAlias arbcom.en.wikipedia.org
@@ -634,6 +640,24 @@
# rewrite   nb.wikipedia.org//no.wikipedia.org
RewriteCond %{HTTP_HOST} =nb.wikipedia.org
RewriteRule ^[^\x00-\x1F]* %{ENV:RW_PROTO}://no.wikipedia.org$0 
[R=301,L,NE]
+   # rewrite   nb.wiktionary.org   //no.wiktionary.org
+   RewriteCond %{HTTP_HOST} =nb.wiktionary.org
+   RewriteRule ^[^\x00-\x1F]* %{ENV:RW_PROTO}://no.wiktionary.org$0 
[R=301,L,NE]
+   # rewrite   nb.wikiquote.org//no.wikiquote.org
+   RewriteCond %{HTTP_HOST} =nb.wikiquote.org
+   RewriteRule ^[^\x00-\x1F]* %{ENV:RW_PROTO}://no.wikiquote.org$0 
[R=301,L,NE]
+   # rewrite   nb.wikibooks.org//no.wikibooks.org
+   RewriteCond %{HTTP_HOST} =nb.wikibooks.org
+   RewriteRule ^[^\x00-\x1F]* %{ENV:RW_PROTO}://no.wikibooks.org$0 
[R=301,L,NE]
+   # rewrite   nb.wikivoyage.org   //no.wikivoyage.org
+   RewriteCond %{HTTP_HOST} =nb.wikivoyage.org
+   RewriteRule ^[^\x00-\x1F]* %{ENV:RW_PROTO}://no.wikivoyage.org$0 
[R=301,L,NE]
+   # rewrite   nb.wikisource.org   //no.wikisource.org
+   RewriteCond %{HTTP_HOST} =nb.wikisource.org
+   RewriteRule ^[^\x00-\x1F]* %{ENV:RW_PROTO}://no.wikisource.org$0 
[R=301,L,NE]
+   # rewrite   nb.wikiversity.org  
//beta.wikiversity.org/wiki/Hovedside
+   RewriteCond %{HTTP_HOST} =nb.wikiversity.org
+   RewriteRule ^[^\x00-\x1F]* 
%{ENV:RW_PROTO}://beta.wikiversity.org/wiki/Hovedside$0 [R=301,L,NE]
# rewrite   pa.us.wikimedia.org //pa-us.wikimedia.org
RewriteCond %{HTTP_HOST} =pa.us.wikimedia.org
RewriteRule ^[^\x00-\x1F]* %{ENV:RW_PROTO}://pa-us.wikimedia.org$0 
[R=301,L,NE]
diff --git a/modules/mediawiki/files/apache/sites/redirects/redirects.dat 
b/modules/mediawiki/files/apache/sites/redirects/redirects.dat
index d17de51..c185955 100644
--- a/modules/mediawiki/files/apache/sites/redirects/redirects.dat
+++ b/modules/mediawiki/files/apache/sites/redirects/redirects.dat
@@ -87,6 +87,12 @@
 rewritejp.wikipedia.org//ja.wikipedia.org
 rewritejp.wikipedia.com//ja.wikipedia.org
 rewritenb.wikipedia.org//no.wikipedia.org
+rewritenb.wiktionary.org   //no.wiktionary.org
+rewritenb.wikiquote.org//no.wikiquote.org
+rewritenb.wikibooks.org//no.wikibooks.org
+rewritenb.wikivoyage.org   //no.wikivoyage.org
+rewritenb.wikisource.org   //no.wikisource.org
+rewritenb.wikiversity.org  //beta.wikiversity.org/wiki/Hovedside
 
 # renamed chapter wiki - T40763
 rewritepa.us.wikimedia.org //pa-us.wikimedia.org

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I952011e484954d72a8c4643fa4191ae82c5a51f2
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Alex Monk kren...@gmail.com

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


[MediaWiki-commits] [Gerrit] Add '__version__' and 'USER_AGENT_STRING' - change (operations...pybal)

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

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

Change subject: Add '__version__' and 'USER_AGENT_STRING'
..

Add '__version__' and 'USER_AGENT_STRING'

Define '__version__' so we can incorporate it in the user-agent string. Define
a user-agent string so that we can set one consistently for all HTTP clients
within PyBal.

Change-Id: I2e382cc72148f9023f17c60d1f3e6472e65fef1c
---
M pybal/__init__.py
1 file changed, 6 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/debs/pybal 
refs/changes/47/225647/1

diff --git a/pybal/__init__.py b/pybal/__init__.py
index 0a76536..2bc6fd0 100644
--- a/pybal/__init__.py
+++ b/pybal/__init__.py
@@ -6,4 +6,9 @@
 
 import test
 
-__all__ = [ 'ipvs', 'monitor', 'pybal', 'util', 'monitors', 'bgp' ]
+__version__ = '1.6'
+
+USER_AGENT_STRING = 'PyBal/%s' % __version__
+
+__all__ = ('ipvs', 'monitor', 'pybal', 'util', 'monitors', 'bgp',
+   'USER_AGENT_STRING')

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2e382cc72148f9023f17c60d1f3e6472e65fef1c
Gerrit-PatchSet: 1
Gerrit-Project: operations/debs/pybal
Gerrit-Branch: master
Gerrit-Owner: Ori.livneh o...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Support command whitelist feature - change (mediawiki...VisualEditor)

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

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

Change subject: Support command whitelist feature
..

Support command whitelist feature

Depends on I87d8aa3 in core.

Bug: T106061
Change-Id: I694e4e5a83f281da92380a895b72611141838f42
---
M modules/ve-mw/init/targets/ve.init.mw.MobileViewTarget.js
M modules/ve-mw/ui/dialogs/ve.ui.MWMediaDialog.js
M modules/ve-mw/ui/dialogs/ve.ui.MWReferenceDialog.js
3 files changed, 6 insertions(+), 2 deletions(-)


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

diff --git a/modules/ve-mw/init/targets/ve.init.mw.MobileViewTarget.js 
b/modules/ve-mw/init/targets/ve.init.mw.MobileViewTarget.js
index 992c087..8834183 100644
--- a/modules/ve-mw/init/targets/ve.init.mw.MobileViewTarget.js
+++ b/modules/ve-mw/init/targets/ve.init.mw.MobileViewTarget.js
@@ -56,8 +56,6 @@
}
 ];
 
-ve.init.mw.MobileViewTarget.static.excludeCommands = [];
-
 ve.init.mw.MobileViewTarget.static.name = 'mobile';
 
 /* Methods */
diff --git a/modules/ve-mw/ui/dialogs/ve.ui.MWMediaDialog.js 
b/modules/ve-mw/ui/dialogs/ve.ui.MWMediaDialog.js
index cd50a11..7de407e 100644
--- a/modules/ve-mw/ui/dialogs/ve.ui.MWMediaDialog.js
+++ b/modules/ve-mw/ui/dialogs/ve.ui.MWMediaDialog.js
@@ -91,6 +91,8 @@
 
 ve.ui.MWMediaDialog.static.modelClasses = [ ve.dm.MWBlockImageNode, 
ve.dm.MWInlineImageNode ];
 
+ve.ui.MWMediaDialog.static.includeCommands = null;
+
 ve.ui.MWMediaDialog.static.excludeCommands = [
// No formatting
'paragraph',
@@ -1149,6 +1151,7 @@
captionDocument,
{
tools: ve.init.target.constructor.static.toolbarGroups,
+   includeCommands: 
this.constructor.static.includeCommands,
excludeCommands: 
this.constructor.static.excludeCommands,
importRules: this.constructor.static.getImportRules()
}
diff --git a/modules/ve-mw/ui/dialogs/ve.ui.MWReferenceDialog.js 
b/modules/ve-mw/ui/dialogs/ve.ui.MWReferenceDialog.js
index 2929bf2..625a8a9 100644
--- a/modules/ve-mw/ui/dialogs/ve.ui.MWReferenceDialog.js
+++ b/modules/ve-mw/ui/dialogs/ve.ui.MWReferenceDialog.js
@@ -69,6 +69,8 @@
 
 ve.ui.MWReferenceDialog.static.modelClasses = [ ve.dm.MWReferenceNode ];
 
+ve.ui.MWReferenceDialog.static.includeCommands = null;
+
 ve.ui.MWReferenceDialog.static.excludeCommands = [
// No formatting
'paragraph',
@@ -245,6 +247,7 @@
this.referenceModel.getDocument(),
{
tools: ve.copy( ve.init.mw.Target.static.toolbarGroups 
),
+   includeCommands: 
this.constructor.static.includeCommands,
excludeCommands: 
this.constructor.static.excludeCommands,
importRules: this.constructor.static.getImportRules(),
inDialog: this.constructor.static.name

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I694e4e5a83f281da92380a895b72611141838f42
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Esanders esand...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] [BREAKING CHANGE] Rename SurfaceWidget to TargetWidget - change (VisualEditor/VisualEditor)

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

Change subject: [BREAKING CHANGE] Rename SurfaceWidget to TargetWidget
..


[BREAKING CHANGE] Rename SurfaceWidget to TargetWidget

Bug: T94066
Change-Id: Ib019df8bd55b844f1ee381def0c27d5b3f9002fd
---
M build/modules.json
M demos/ve/desktop.html
M demos/ve/mobile.html
M src/themes/apex/widgets.css
M src/themes/mediawiki/widgets.css
D src/ui/styles/widgets/ve.ui.SurfaceWidget.css
A src/ui/styles/widgets/ve.ui.TargetWidget.css
R src/ui/widgets/ve.ui.TargetWidget.js
M tests/index.html
9 files changed, 43 insertions(+), 43 deletions(-)

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



diff --git a/build/modules.json b/build/modules.json
index 7d9a397..daebcce 100644
--- a/build/modules.json
+++ b/build/modules.json
@@ -428,7 +428,7 @@
src/ui/widgets/ve.ui.LanguageResultWidget.js,
src/ui/dialogs/ve.ui.LanguageSearchDialog.js,
src/ui/widgets/ve.ui.LanguageInputWidget.js,
-   src/ui/widgets/ve.ui.SurfaceWidget.js,
+   src/ui/widgets/ve.ui.TargetWidget.js,
src/ui/widgets/ve.ui.LinkAnnotationWidget.js,
src/ui/widgets/ve.ui.ContextSelectWidget.js,
src/ui/widgets/ve.ui.ContextOptionWidget.js,
@@ -492,7 +492,7 @@
src/ui/styles/contextitems/ve.ui.TableContextItem.css,
src/ui/styles/ve.ui.Overlay.css,
src/ui/styles/ve.ui.Surface.css,
-   src/ui/styles/widgets/ve.ui.SurfaceWidget.css,
+   src/ui/styles/widgets/ve.ui.TargetWidget.css,
src/ui/styles/ve.ui.TableContext.css,
src/ui/styles/ve.ui.Toolbar.css
],
diff --git a/demos/ve/desktop.html b/demos/ve/desktop.html
index 008a26c..2652f23 100644
--- a/demos/ve/desktop.html
+++ b/demos/ve/desktop.html
@@ -64,7 +64,7 @@
link rel=stylesheet 
href=../../src/ui/styles/contextitems/ve.ui.TableContextItem.css 
class=stylesheet-ve
link rel=stylesheet 
href=../../src/ui/styles/ve.ui.Overlay.css class=stylesheet-ve
link rel=stylesheet 
href=../../src/ui/styles/ve.ui.Surface.css class=stylesheet-ve
-   link rel=stylesheet 
href=../../src/ui/styles/widgets/ve.ui.SurfaceWidget.css 
class=stylesheet-ve
+   link rel=stylesheet 
href=../../src/ui/styles/widgets/ve.ui.TargetWidget.css class=stylesheet-ve
link rel=stylesheet 
href=../../src/ui/styles/ve.ui.TableContext.css class=stylesheet-ve
link rel=stylesheet 
href=../../src/ui/styles/ve.ui.Toolbar.css class=stylesheet-ve
 
@@ -389,7 +389,7 @@
script 
src=../../src/ui/widgets/ve.ui.LanguageResultWidget.js/script
script 
src=../../src/ui/dialogs/ve.ui.LanguageSearchDialog.js/script
script 
src=../../src/ui/widgets/ve.ui.LanguageInputWidget.js/script
-   script 
src=../../src/ui/widgets/ve.ui.SurfaceWidget.js/script
+   script 
src=../../src/ui/widgets/ve.ui.TargetWidget.js/script
script 
src=../../src/ui/widgets/ve.ui.LinkAnnotationWidget.js/script
script 
src=../../src/ui/widgets/ve.ui.ContextSelectWidget.js/script
script 
src=../../src/ui/widgets/ve.ui.ContextOptionWidget.js/script
diff --git a/demos/ve/mobile.html b/demos/ve/mobile.html
index d9d0b2a..b79ad53 100644
--- a/demos/ve/mobile.html
+++ b/demos/ve/mobile.html
@@ -64,7 +64,7 @@
link rel=stylesheet 
href=../../src/ui/styles/contextitems/ve.ui.TableContextItem.css 
class=stylesheet-ve
link rel=stylesheet 
href=../../src/ui/styles/ve.ui.Overlay.css class=stylesheet-ve
link rel=stylesheet 
href=../../src/ui/styles/ve.ui.Surface.css class=stylesheet-ve
-   link rel=stylesheet 
href=../../src/ui/styles/widgets/ve.ui.SurfaceWidget.css 
class=stylesheet-ve
+   link rel=stylesheet 
href=../../src/ui/styles/widgets/ve.ui.TargetWidget.css class=stylesheet-ve
link rel=stylesheet 
href=../../src/ui/styles/ve.ui.TableContext.css class=stylesheet-ve
link rel=stylesheet 
href=../../src/ui/styles/ve.ui.Toolbar.css class=stylesheet-ve
 
@@ -390,7 +390,7 @@
script 
src=../../src/ui/widgets/ve.ui.LanguageResultWidget.js/script
script 
src=../../src/ui/dialogs/ve.ui.LanguageSearchDialog.js/script
script 
src=../../src/ui/widgets/ve.ui.LanguageInputWidget.js/script
-   script 
src=../../src/ui/widgets/ve.ui.SurfaceWidget.js/script
+   script 
src=../../src/ui/widgets/ve.ui.TargetWidget.js/script
script 
src=../../src/ui/widgets/ve.ui.LinkAnnotationWidget.js/script

[MediaWiki-commits] [Gerrit] findHooks: Exit with a status code of 1 if issues are found - change (mediawiki/core)

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

Change subject: findHooks: Exit with a status code of 1 if issues are found
..


findHooks: Exit with a status code of 1 if issues are found

This will make it easier to have something automated run
the script since it can check the exit code of the script
so see if any issues were found.

Also fixed the printing of Looks good!, which wasn't happening
if a hook was being ignored. The check for ignoring was moved up
and out of the print logic.

Change-Id: I683a131a804d4fac9a21f386b2756e050219d392
---
M maintenance/findHooks.php
1 file changed, 6 insertions(+), 6 deletions(-)

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



diff --git a/maintenance/findHooks.php b/maintenance/findHooks.php
index 3414679..114366b 100644
--- a/maintenance/findHooks.php
+++ b/maintenance/findHooks.php
@@ -122,9 +122,9 @@
}
 
$potential = array_unique( $potential );
-   $bad = array_unique( $bad );
-   $todo = array_diff( $potential, $documented );
-   $deprecated = array_diff( $documented, $potential );
+   $bad = array_diff( array_unique( $bad ), self::$ignore );
+   $todo = array_diff( $potential, $documented, self::$ignore );
+   $deprecated = array_diff( $documented, $potential, 
self::$ignore );
 
// let's show the results:
$this-printArray( 'Undocumented', $todo );
@@ -133,6 +133,8 @@
 
if ( count( $todo ) == 0  count( $deprecated ) == 0  count( 
$bad ) == 0 ) {
$this-output( Looks good!\n );
+   } else {
+   $this-error( 'The script finished with errors.', 1 );
}
}
 
@@ -290,9 +292,7 @@
}
 
foreach ( $arr as $v ) {
-   if ( !in_array( $v, self::$ignore ) ) {
-   $this-output( $msg: $v\n );
-   }
+   $this-output( $msg: $v\n );
}
}
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I683a131a804d4fac9a21f386b2756e050219d392
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Legoktm legoktm.wikipe...@gmail.com
Gerrit-Reviewer: Addshore addshorew...@gmail.com
Gerrit-Reviewer: Parent5446 tylerro...@gmail.com
Gerrit-Reviewer: PleaseStand pleasest...@live.com
Gerrit-Reviewer: jenkins-bot 

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


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

2015-07-18 Thread Jenkins-mwext-sync (Code Review)
Jenkins-mwext-sync has uploaded a new change for review.

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

Change subject: Syncronize VisualEditor: fb78225..bb46c34
..

Syncronize VisualEditor: fb78225..bb46c34

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


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions 
refs/changes/58/225658/1

diff --git a/VisualEditor b/VisualEditor
index fb78225..bb46c34 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit fb78225f763a371a0fcfd8410d0eaa63589dbacf
+Subproject commit bb46c342556b8ca690b72090b08f22c161bbbe8a

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie2c55da09b540955e57a6083b5e12aafd4bf408b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions
Gerrit-Branch: master
Gerrit-Owner: Jenkins-mwext-sync jenkins-...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Update VE core submodule to master (edaa19b) - change (mediawiki...VisualEditor)

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

Change subject: Update VE core submodule to master (edaa19b)
..


Update VE core submodule to master (edaa19b)

New changes:
aab2e90 Localisation updates from https://translatewiki.net.
826055a [BREAKING CHANGE] Rename SurfaceWidget to TargetWidget

Local changes:
* [PULL THROUGH] Rename MWSurfaceWidget to MWTargetWidget

Bug: T94066
Change-Id: If578e15c1ee7effd5ca1d6073521a6c59caac255
---
M .jsduck/eg-iframe.html
M extension.json
M lib/ve
M modules/ve-mw/ui/dialogs/ve.ui.MWMediaDialog.js
M modules/ve-mw/ui/dialogs/ve.ui.MWReferenceDialog.js
D modules/ve-mw/ui/widgets/ve.ui.MWSurfaceWidget.js
A modules/ve-mw/ui/widgets/ve.ui.MWTargetWidget.js
7 files changed, 61 insertions(+), 61 deletions(-)

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



diff --git a/.jsduck/eg-iframe.html b/.jsduck/eg-iframe.html
index d184564..cd1f4fc 100644
--- a/.jsduck/eg-iframe.html
+++ b/.jsduck/eg-iframe.html
@@ -48,7 +48,7 @@
link rel=stylesheet 
href=lib/ve/src/ui/styles/contextitems/ve.ui.TableContextItem.css 
class=stylesheet-ve
link rel=stylesheet 
href=lib/ve/src/ui/styles/ve.ui.Overlay.css class=stylesheet-ve
link rel=stylesheet 
href=lib/ve/src/ui/styles/ve.ui.Surface.css class=stylesheet-ve
-   link rel=stylesheet 
href=lib/ve/src/ui/styles/widgets/ve.ui.SurfaceWidget.css 
class=stylesheet-ve
+   link rel=stylesheet 
href=lib/ve/src/ui/styles/widgets/ve.ui.TargetWidget.css 
class=stylesheet-ve
link rel=stylesheet 
href=lib/ve/src/ui/styles/ve.ui.TableContext.css class=stylesheet-ve
link rel=stylesheet 
href=lib/ve/src/ui/styles/ve.ui.Toolbar.css class=stylesheet-ve
 
@@ -367,7 +367,7 @@
script 
src=lib/ve/src/ui/widgets/ve.ui.LanguageResultWidget.js/script
script 
src=lib/ve/src/ui/dialogs/ve.ui.LanguageSearchDialog.js/script
script 
src=lib/ve/src/ui/widgets/ve.ui.LanguageInputWidget.js/script
-   script 
src=lib/ve/src/ui/widgets/ve.ui.SurfaceWidget.js/script
+   script 
src=lib/ve/src/ui/widgets/ve.ui.TargetWidget.js/script
script 
src=lib/ve/src/ui/widgets/ve.ui.LinkAnnotationWidget.js/script
script 
src=lib/ve/src/ui/widgets/ve.ui.ContextSelectWidget.js/script
script 
src=lib/ve/src/ui/widgets/ve.ui.ContextOptionWidget.js/script
diff --git a/extension.json b/extension.json
index 9cf6e2a..b7f52aa 100644
--- a/extension.json
+++ b/extension.json
@@ -679,7 +679,7 @@

lib/ve/src/ui/datatransferhandlers/ve.ui.HTMLFileTransferHandler.js,

lib/ve/src/ui/windowmanagers/ve.ui.ToolbarDialogWindowManager.js,
lib/ve/src/ui/widgets/ve.ui.AlignWidget.js,
-   lib/ve/src/ui/widgets/ve.ui.SurfaceWidget.js,
+   lib/ve/src/ui/widgets/ve.ui.TargetWidget.js,

lib/ve/src/ui/widgets/ve.ui.LinkAnnotationWidget.js,

lib/ve/src/ui/widgets/ve.ui.ContextSelectWidget.js,

lib/ve/src/ui/widgets/ve.ui.ContextOptionWidget.js,
@@ -733,7 +733,7 @@

lib/ve/src/ui/styles/widgets/ve.ui.MediaSizeWidget.css,

lib/ve/src/ui/styles/inspectors/ve.ui.CommentInspector.css,

lib/ve/src/ui/styles/inspectors/ve.ui.FragmentInspector.css,
-   
lib/ve/src/ui/styles/widgets/ve.ui.SurfaceWidget.css,
+   
lib/ve/src/ui/styles/widgets/ve.ui.TargetWidget.css,
lib/ve/src/ui/styles/ve.ui.ContextItem.css,

lib/ve/src/ui/styles/contextitems/ve.ui.AlignableContextItem.css,

lib/ve/src/ui/styles/contextitems/ve.ui.CommentContextItem.css,
@@ -915,7 +915,7 @@
modules/ve-mw/ui/ve.ui.MWCommandRegistry.js,
modules/ve-mw/ui/ve.ui.MWSequenceRegistry.js,

modules/ve-mw/ui/commands/ve.ui.MWWikitextWarningCommand.js,
-   
modules/ve-mw/ui/widgets/ve.ui.MWSurfaceWidget.js,
+   
modules/ve-mw/ui/widgets/ve.ui.MWTargetWidget.js,

modules/ve-mw/ui/widgets/ve.ui.MWTocItemWidget.js,
modules/ve-mw/ui/widgets/ve.ui.MWTocWidget.js,

modules/ve-mw/ui/dialogs/ve.ui.MWSaveDialog.js,
diff --git a/lib/ve b/lib/ve
index 67936f9..edaa19b 16
--- a/lib/ve
+++ b/lib/ve
-Subproject commit 67936f9520c394f4e31ab2abc7334dffe3318245
+Subproject commit edaa19b0add476d4bded9da498fb6998cf30c508
diff 

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

2015-07-18 Thread Jenkins-mwext-sync (Code Review)
Jenkins-mwext-sync has submitted this change and it was merged.

Change subject: Syncronize VisualEditor: fb78225..bb46c34
..


Syncronize VisualEditor: fb78225..bb46c34

Change-Id: Ie2c55da09b540955e57a6083b5e12aafd4bf408b
---
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 fb78225..bb46c34 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit fb78225f763a371a0fcfd8410d0eaa63589dbacf
+Subproject commit bb46c342556b8ca690b72090b08f22c161bbbe8a

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie2c55da09b540955e57a6083b5e12aafd4bf408b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions
Gerrit-Branch: master
Gerrit-Owner: Jenkins-mwext-sync jenkins-...@wikimedia.org
Gerrit-Reviewer: Jenkins-mwext-sync jenkins-...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] maps: Tune postgresql - change (operations/puppet)

2015-07-18 Thread Alexandros Kosiaris (Code Review)
Alexandros Kosiaris has uploaded a new change for review.

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

Change subject: maps: Tune postgresql
..

maps: Tune postgresql

Use tuning.conf to tune postgresql

Change-Id: Ib524273aeffd929ed58292205f6977f95c4cba59
---
M hieradata/role/codfw/maps/master.yaml
M manifests/role/maps.pp
2 files changed, 18 insertions(+), 0 deletions(-)


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

diff --git a/hieradata/role/codfw/maps/master.yaml 
b/hieradata/role/codfw/maps/master.yaml
index 0a95bb5..ea608e2 100644
--- a/hieradata/role/codfw/maps/master.yaml
+++ b/hieradata/role/codfw/maps/master.yaml
@@ -2,6 +2,7 @@
 postgresql::spatialdb::postgis_version: 2.1
 postgresql::master::pgversion: 9.4
 postgresql::master::datadir: /srv/postgresql/9.4/main
+postgresql::master::includes: tuning.conf
 # Defined in the private repo
 #postgresql::master::postgres_slaves:
 #  replication@maps-test2002-v4:
diff --git a/manifests/role/maps.pp b/manifests/role/maps.pp
index 626f337..9f36644 100644
--- a/manifests/role/maps.pp
+++ b/manifests/role/maps.pp
@@ -13,6 +13,23 @@
 description = 'Maps Postgres master',
 }
 
+# Tuning
+file { '/etc/postgresql/9.4/main/tuning.conf':
+ensure = 'present',
+owner  = 'root',
+group  = 'root',
+mode   = '0444',
+source = 'puppet:///files/postgres/tuning.conf',
+}
+sysctl::parameters { 'postgres_shmem':
+values = {
+# That is derived after tuning postgresql, deriving automatically 
is
+# not the safest idea yet.
+'kernel.shmmax' = 8388608000,
+},
+}
+
+# Replication
 $postgres_slaves = hiera('postgresql::master::postgres_slaves', undef)
 if $postgres_slaves {
 create_resources(postgresql::user, $postgres_slaves)

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib524273aeffd929ed58292205f6977f95c4cba59
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Alexandros Kosiaris akosia...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Enable PHPCS sniff Squiz.Scope.MethodScope - change (mediawiki...Wikibase)

2015-07-18 Thread WMDE
Thiemo Mättig (WMDE) has uploaded a new change for review.

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

Change subject: Enable PHPCS sniff Squiz.Scope.MethodScope
..

Enable PHPCS sniff Squiz.Scope.MethodScope

This is about missing visibility keywords, which is quite basic and
really should be enforced in my opinion, but needs exceptions because
there is still a lot of code with no visibility keywords in core.

Change-Id: I6f64016addd9af39fdb092797d6f54f3ddc59979
---
M phpcs.xml
M purtle/src/RdfWriterBase.php
2 files changed, 6 insertions(+), 1 deletion(-)


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

diff --git a/phpcs.xml b/phpcs.xml
index c547890..f473eb4 100644
--- a/phpcs.xml
+++ b/phpcs.xml
@@ -65,6 +65,7 @@
rule ref=PSR2.Namespaces.NamespaceDeclaration /
rule ref=PSR2.Namespaces.UseDeclaration /
 
+   !-- This sniff is included in PSR1 but needs an exception. --
rule ref=Squiz.Classes.ValidClassName.NotCamelCaps

exclude-patternDataAccess*Scribunto*Scribunto_LuaWikibase*Library/exclude-pattern
/rule
@@ -73,6 +74,10 @@
rule ref=Squiz.ControlStructures.ControlSignature.SpaceAfterKeyword
severity0/severity
/rule
+   rule ref=Squiz.Scope.MethodScope
+   !-- FIXME: This indicates an error in the QueryPage base class 
that should be fixed. --
+   exclude-patternSpecialUnconnectedPages\.php/exclude-pattern
+   /rule
rule ref=Squiz.WhiteSpace.FunctionSpacing
properties
property name=spacing value=1 /
diff --git a/purtle/src/RdfWriterBase.php b/purtle/src/RdfWriterBase.php
index 60940bd..d2d2635 100644
--- a/purtle/src/RdfWriterBase.php
+++ b/purtle/src/RdfWriterBase.php
@@ -103,7 +103,7 @@
 *
 * @throws InvalidArgumentException
 */
-   function __construct( $role, BNodeLabeler $labeler = null ) {
+   public function __construct( $role, BNodeLabeler $labeler = null ) {
if ( !is_string( $role ) ) {
throw new InvalidArgumentException( '$role must be a 
string' );
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6f64016addd9af39fdb092797d6f54f3ddc59979
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Thiemo Mättig (WMDE) thiemo.maet...@wikimedia.de

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


[MediaWiki-commits] [Gerrit] Don't try to use isAnon on non-pbject - change (mediawiki...GoogleLogin)

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

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

Change subject: Don't try to use isAnon on non-pbject
..

Don't try to use isAnon on non-pbject

Change-Id: Ia1b9028f59f678d6acf4ca82e7a8fca09d02bb54
User::newFromName() can return a boolean instead of an user object, too.
---
M includes/specials/SpecialManageGoogleLogin.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/GoogleLogin 
refs/changes/03/225603/1

diff --git a/includes/specials/SpecialManageGoogleLogin.php 
b/includes/specials/SpecialManageGoogleLogin.php
index bab2a92..134be45 100644
--- a/includes/specials/SpecialManageGoogleLogin.php
+++ b/includes/specials/SpecialManageGoogleLogin.php
@@ -68,7 +68,7 @@
return false;
}
$checkUser = User::newFromName( $data['username'] );
-   if ( $checkUser-isAnon() ) {
+   if ( !$checkUser || $checkUser-isAnon() ) {
return wfMessage( 
'googlelogin-manage-notexist', $data['username'] );
}
self::$manageableUser = $checkUser;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia1b9028f59f678d6acf4ca82e7a8fca09d02bb54
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/GoogleLogin
Gerrit-Branch: master
Gerrit-Owner: Florianschmidtwelzow florian.schmidt.stargatewis...@gmail.com

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


[MediaWiki-commits] [Gerrit] maintenance: Add -q option in sql.php - change (mediawiki/core)

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

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

Change subject: maintenance: Add -q option in sql.php
..

maintenance: Add -q option in sql.php

This makes it easier to run a query in a scripted fashion,
e.g. with Wikimedia's foreachwiki.

Change-Id: I5562be2fb0871817ee55f1395b686537069f78dc
---
M maintenance/sql.php
1 file changed, 19 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/39/225639/1

diff --git a/maintenance/sql.php b/maintenance/sql.php
index a7fd827..929e1eb 100644
--- a/maintenance/sql.php
+++ b/maintenance/sql.php
@@ -34,6 +34,7 @@
parent::__construct();
$this-mDescription = Send SQL queries to a MediaWiki 
database.  .
Takes a file name containing SQL as argument 
or runs interactively.;
+   $this-addOption( 'q', 'Run a single query instead of running 
interactively', false, true );
$this-addOption( 'cluster', 'Use an external cluster by name', 
false, true );
$this-addOption( 'wikidb', 'The database wiki ID to use if not 
the current one', false, true );
$this-addOption( 'slave', 'Use a slave server (either any or 
by name)', false, true );
@@ -89,6 +90,13 @@
}
}
 
+   if ( $this-hasOption( 'q' ) ) {
+   $q = $this-getOption( 'q' );
+   $this-sqlDoQuery( $db, $q, /* dieOnError */ true );
+   wfWaitForSlaves();
+   return;
+   }
+
$useReadline = function_exists( 'readline_add_history' )
 Maintenance::posix_isatty( 0 /*STDIN*/ );
 
@@ -102,6 +110,7 @@
$wholeLine = '';
$newPrompt = ' ';
$prompt = $newPrompt;
+   $doDie = !Maintenance::posix_isatty( 0 );
while ( ( $line = Maintenance::readconsole( $prompt ) ) !== 
false ) {
if ( !$line ) {
# User simply pressed return key
@@ -122,19 +131,22 @@
readline_add_history( $wholeLine . 
$db-getDelimiter() );
readline_write_history( $historyFile );
}
-   try {
-   $res = $db-query( $wholeLine );
-   $this-sqlPrintResult( $res, $db );
-   } catch ( DBQueryError $e ) {
-   $doDie = !Maintenance::posix_isatty( 0 );
-   $this-error( $e, $doDie );
-   }
+   $this-sqlDoQuery( $db, $wholeLine, $doDie );
$prompt = $newPrompt;
$wholeLine = '';
}
wfWaitForSlaves();
}
 
+   protected function sqlDoQuery( $db, $line, $dieOnError ) {
+   try {
+   $res = $db-query( $line );
+   $this-sqlPrintResult( $res, $db );
+   } catch ( DBQueryError $e ) {
+   $this-error( $e, $dieOnError );
+   }
+   }
+
/**
 * Print the results, callback for $db-sourceStream()
 * @param ResultWrapper $res The results object

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5562be2fb0871817ee55f1395b686537069f78dc
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Krinkle krinklem...@gmail.com

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


[MediaWiki-commits] [Gerrit] tests: refactor test_repos_have_required_jobs - change (integration/config)

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

Change subject: tests: refactor test_repos_have_required_jobs
..


tests: refactor test_repos_have_required_jobs

The test would iterated over:

 pipelines,
 repos regex
 projects,
 via getProjectDef():
   pipelines
   projects
 ..

That makes the test to use up to 50 seconds on my machine.

Refactor the whole test to only load the pipelines and projects job tree
once with the introduciont of getProjectsDefs(). It yields a map of
projects - pipelines - jobs (using names, not objects). That then
makes it way fast to run assertion against that single preloaded tree.

Skip asserting check-only and check-voter are in the requirements
pipelines since we detects the requirement by actually looking whether
the project has them.
Slightly refactor the check/test requirements, moving the assertIn
there.

Change-Id: I4a83736fbc43c5b46659ff654add6e38a40ae23a
---
M tests/test_zuul_layout.py
1 file changed, 52 insertions(+), 22 deletions(-)

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



diff --git a/tests/test_zuul_layout.py b/tests/test_zuul_layout.py
index ea44948..faecba4 100644
--- a/tests/test_zuul_layout.py
+++ b/tests/test_zuul_layout.py
@@ -88,6 +88,24 @@
 ret[pipeline.name] = [job.name for job in tree[0].getJobs()]
 return ret
 
+def getProjectsDefs(self):
+Map projects, pipelines and their jobs (as strings, not objects)
+ret = {}
+for pipeline in self.sched.layout.pipelines.values():
+for (project, tree) in pipeline.job_trees.iteritems():
+ret.setdefault(project.name, {})[pipeline.name] = \
+[job.name for job in tree.getJobs()]
+return ret
+
+def getProjectsPipelines(self):
+Map of projects - pipelines names
+projects_pipelines = {}
+for pipeline in self.getPipelines():
+for project in self.getPipelineProjectsNames(pipeline.name):
+projects_pipelines.setdefault(project, []) \
+  .append(pipeline.name)
+return projects_pipelines
+
 # Tests
 
 def assertProjectHasComposerValidate(self, name, definition, pipeline):
@@ -136,32 +154,44 @@
 repos_compiled[re.compile(regex)] = assertions
 del repos
 
-for pipeline in self.getPipelines():
+# Dict of projects - assertions
+mediawiki_projects = {}
+for project_name in self.getProjectsPipelines().keys():
+project_assertions = None
 for regex_compiled, assertions in repos_compiled.items():
-for name in self.getPipelineProjectsNames(pipeline.name):
-if regex_compiled.match(name):
-project_def = self.getProjectDef(name)
+if regex_compiled.match(project_name):
+project_assertions = assertions
+break
+# Project did not match
+if project_assertions is None:
+continue
+mediawiki_projects[project_name] = assertions
 
-requirements = set()
-requirements.add('gate-and-submit')
+all_defs = self.getProjectsDefs()
+for (project_name, assertions) in mediawiki_projects.iteritems():
 
-if 'check-only' in project_def.keys():
-requirements.add('check-only')
-elif 'check-voter' in project_def.keys():
-# Skins uses a different check pipeline
-requirements.add('check-voter')
-else:
-requirements.add('check')
-requirements.add('test')
+project_def = all_defs[project_name]
 
-for req_pipeline in requirements:
-# Should be caught by another test:
-self.assertIn(req_pipeline, project_def.keys(),
-  'Project %s lacks %s pipeline' %
-  (name, req_pipeline))
-for func in assertions:
-func(name,
- project_def[req_pipeline], req_pipeline)
+# Pipelines that must be set
+requirements = set()
+requirements.add('gate-and-submit')
+if 'check-only' in project_def.keys():
+requirements.add('check-only')
+elif 'check-voter' in project_def.keys():
+# Skins uses a different check pipeline
+requirements.add('check-voter')
+else:
+for default_requirement in ['check', 'test']:
+requirements.add(default_requirement)
+   

[MediaWiki-commits] [Gerrit] Allow whitespace between indent and table start tag - change (mediawiki/core)

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

Change subject: Allow whitespace between indent and table start tag
..


Allow whitespace between indent and table start tag

 * \s matches the trim on the line.

 * Since leading space is ok for table start tags, and you can use them
   in : context, you should be able to compose the two together.

Bug: T105238
Change-Id: Id08e24e5dd2bb8ca09453adec87b21225df4a840
---
M includes/parser/Parser.php
M tests/parser/parserTests.txt
2 files changed, 14 insertions(+), 8 deletions(-)

Approvals:
  Subramanya Sastry: Looks good to me, but someone else must approve
  Umherirrender: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php
index 83c2b0c..65d8182 100644
--- a/includes/parser/Parser.php
+++ b/includes/parser/Parser.php
@@ -1026,7 +1026,7 @@
$first_two = substr( $line, 0, 2 );
$matches = array();
 
-   if ( preg_match( '/^(:*)\{\|(.*)$/', $line, $matches ) 
) {
+   if ( preg_match( '/^(:*)\s*\{\|(.*)$/', $line, $matches 
) ) {
# First check if we are starting a new table
$indent_level = strlen( $matches[1] );
 
diff --git a/tests/parser/parserTests.txt b/tests/parser/parserTests.txt
index 766db1e..ab33d89 100644
--- a/tests/parser/parserTests.txt
+++ b/tests/parser/parserTests.txt
@@ -3677,20 +3677,26 @@
 /tr/table/dd/dl/dd/dl
 !! end
 
-# Bug 52473
+# The trailing whitespace in this test is to catch a regression in
+# Parsoid after T54473.
 !! test
 Definition Lists: Hacky use to indent tables (WS-insensitive)
-!! options
-parsoid
 !! wikitext
 : {|
 |a
 |} 
-!! html
-dl
-dd tabletrtda/td/tr/table /dd
-/dl
+!! html/php
+dlddtable
+tr
+tda
+/td/tr/table/dd/dl
+
+!! html/parsoid
+dldd table
+tbodytrtda/td/tr
+/tbody/table /dd/dl
 !! end
+
 ## The PHP parser treats : items (dd) without a corresponding ; item (dt)
 ## as an empty dt item.  It also ignores all but the last ; when followed
 ## by : later on.  So, ; are not ignored in ;;;t3 but are ignored  in

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id08e24e5dd2bb8ca09453adec87b21225df4a840
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Arlolra abrea...@wikimedia.org
Gerrit-Reviewer: Anomie bjor...@wikimedia.org
Gerrit-Reviewer: Arlolra abrea...@wikimedia.org
Gerrit-Reviewer: Cscott canan...@wikimedia.org
Gerrit-Reviewer: Jackmcbarn jackmcb...@gmail.com
Gerrit-Reviewer: Subramanya Sastry ssas...@wikimedia.org
Gerrit-Reviewer: Tim Starling tstarl...@wikimedia.org
Gerrit-Reviewer: Umherirrender umherirrender_de...@web.de
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Hygiene: Main return as root structure (handle errors early) - change (mediawiki...Cite)

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

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

Change subject: Hygiene: Main return as root structure (handle errors early)
..

Hygiene: Main return as root structure (handle errors early)

Restructure code to return early for errors instead of nesting
conditionals. This leaves the outer tree of the function as
the natural flow of the primary purpose.

Makes code more resilient by ensuring that new code added to the
function will not execute under error conditions by removing the
need to keep everything encapsulated in the various levels of
error conditionals.

Change-Id: I1b4a67d344fd9843ca088d008487914f87b1c640
---
M Cite_body.php
1 file changed, 63 insertions(+), 65 deletions(-)


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

diff --git a/Cite_body.php b/Cite_body.php
index 9763555..0db37fd 100644
--- a/Cite_body.php
+++ b/Cite_body.php
@@ -394,7 +394,6 @@
if ( !isset( $this-mGroupCnt[$group] ) ) {
$this-mGroupCnt[$group] = 0;
}
-
if ( $follow != null ) {
if ( isset( $this-mRefs[$group][$follow] )  
is_array( $this-mRefs[$group][$follow] ) ) {
// add text to the note that is being followed
@@ -418,6 +417,7 @@
// return an empty string : this is not a reference
return '';
}
+
if ( $key === null ) {
// No key
// $this-mRefs[$group][] = $str;
@@ -425,49 +425,48 @@
$this-mRefCallStack[] = array( 'new', $call, $str, 
$key, $group, $this-mOutCnt );
 
return $this-linkRef( $group, $this-mOutCnt );
-   } elseif ( is_string( $key ) ) {
-   // Valid key
-   if ( !isset( $this-mRefs[$group][$key] ) || !is_array( 
$this-mRefs[$group][$key] ) ) {
-   // First occurrence
-   $this-mRefs[$group][$key] = array(
-   'text' = $str,
-   'count' = 0,
-   'key' = ++$this-mOutCnt,
-   'number' = ++$this-mGroupCnt[$group]
-   );
-   $this-mRefCallStack[] = array( 'new', $call, 
$str, $key, $group, $this-mOutCnt );
-
-   return
-   $this-linkRef(
-   $group,
-   $key,
-   
$this-mRefs[$group][$key]['key'] . - . $this-mRefs[$group][$key]['count'],
-   
$this-mRefs[$group][$key]['number'],
-   - . 
$this-mRefs[$group][$key]['key']
-   );
-   } else {
-   // We've been here before
-   if ( $this-mRefs[$group][$key]['text'] === 
null  $str !== '' ) {
-   // If no text found before, use this 
text
-   $this-mRefs[$group][$key]['text'] = 
$str;
-   $this-mRefCallStack[] = array( 
'assign', $call, $str, $key, $group,
-   
$this-mRefs[$group][$key]['key'] );
-   } else {
-   $this-mRefCallStack[] = array( 
'increment', $call, $str, $key, $group,
-   
$this-mRefs[$group][$key]['key'] );
-   }
-   return
-   $this-linkRef(
-   $group,
-   $key,
-   
$this-mRefs[$group][$key]['key'] . - . ++$this-mRefs[$group][$key]['count'],
-   
$this-mRefs[$group][$key]['number'],
-   - . 
$this-mRefs[$group][$key]['key']
-   );
-   }
-   } else {
+   }
+   if ( !is_string( $key ) ) {
throw new Exception( 'Invalid stack key: ' . serialize( 
$key ) );
}
+
+   // Valid key
+   if ( !isset( $this-mRefs[$group][$key] ) || !is_array( 
$this-mRefs[$group][$key] ) ) {
+   // First occurrence
+   $this-mRefs[$group][$key] = array(
+ 

[MediaWiki-commits] [Gerrit] Set $wgVectorResponsive = true on all beta cluster wikis - change (operations/mediawiki-config)

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

Change subject: Set $wgVectorResponsive = true on all beta cluster wikis
..


Set $wgVectorResponsive = true on all beta cluster wikis

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

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



diff --git a/wmf-config/InitialiseSettings-labs.php 
b/wmf-config/InitialiseSettings-labs.php
index 7ed88c1..a4093cf 100644
--- a/wmf-config/InitialiseSettings-labs.php
+++ b/wmf-config/InitialiseSettings-labs.php
@@ -208,6 +208,10 @@
'dewiki' = 
'http://upload.wikimedia.org/wikipedia/commons/1/14/Favicon-beta-wikipedia.png',
),
 
+   'wgVectorResponsive' = array(
+   'default' = true,
+   ),
+
// Editor Engagement stuff
'-wmfUseArticleCreationWorkflow' = array(
'default' = false,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I88531c747bc23e006c636f832a382faff7cfa029
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Legoktm legoktm.wikipe...@gmail.com
Gerrit-Reviewer: Legoktm legoktm.wikipe...@gmail.com
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] maintenance: Add --query option in sql.php - change (mediawiki/core)

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

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

Change subject: maintenance: Add --query option in sql.php
..

maintenance: Add --query option in sql.php

This makes it easier to run a query in a scripted fashion,
e.g. with Wikimedia's foreachwiki.

Change-Id: I5562be2fb0871817ee55f1395b686537069f78dc
---
M maintenance/sql.php
1 file changed, 19 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/45/225645/1

diff --git a/maintenance/sql.php b/maintenance/sql.php
index a7fd827..a93e51f 100644
--- a/maintenance/sql.php
+++ b/maintenance/sql.php
@@ -34,6 +34,7 @@
parent::__construct();
$this-mDescription = Send SQL queries to a MediaWiki 
database.  .
Takes a file name containing SQL as argument 
or runs interactively.;
+   $this-addOption( 'query', 'Run a single query instead of 
running interactively', false, true );
$this-addOption( 'cluster', 'Use an external cluster by name', 
false, true );
$this-addOption( 'wikidb', 'The database wiki ID to use if not 
the current one', false, true );
$this-addOption( 'slave', 'Use a slave server (either any or 
by name)', false, true );
@@ -89,6 +90,13 @@
}
}
 
+   if ( $this-hasOption( 'query' ) ) {
+   $query = $this-getOption( 'query' );
+   $this-sqlDoQuery( $db, $query, /* dieOnError */ true );
+   wfWaitForSlaves();
+   return;
+   }
+
$useReadline = function_exists( 'readline_add_history' )
 Maintenance::posix_isatty( 0 /*STDIN*/ );
 
@@ -102,6 +110,7 @@
$wholeLine = '';
$newPrompt = ' ';
$prompt = $newPrompt;
+   $doDie = !Maintenance::posix_isatty( 0 );
while ( ( $line = Maintenance::readconsole( $prompt ) ) !== 
false ) {
if ( !$line ) {
# User simply pressed return key
@@ -122,19 +131,22 @@
readline_add_history( $wholeLine . 
$db-getDelimiter() );
readline_write_history( $historyFile );
}
-   try {
-   $res = $db-query( $wholeLine );
-   $this-sqlPrintResult( $res, $db );
-   } catch ( DBQueryError $e ) {
-   $doDie = !Maintenance::posix_isatty( 0 );
-   $this-error( $e, $doDie );
-   }
+   $this-sqlDoQuery( $db, $wholeLine, $doDie );
$prompt = $newPrompt;
$wholeLine = '';
}
wfWaitForSlaves();
}
 
+   protected function sqlDoQuery( $db, $line, $dieOnError ) {
+   try {
+   $res = $db-query( $line );
+   $this-sqlPrintResult( $res, $db );
+   } catch ( DBQueryError $e ) {
+   $this-error( $e, $dieOnError );
+   }
+   }
+
/**
 * Print the results, callback for $db-sourceStream()
 * @param ResultWrapper $res The results object

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5562be2fb0871817ee55f1395b686537069f78dc
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.26wmf14
Gerrit-Owner: Krinkle krinklem...@gmail.com

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


[MediaWiki-commits] [Gerrit] Rework getter into provider in ResultBuilderTest - change (mediawiki...Wikibase)

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

Change subject: Rework getter into provider in ResultBuilderTest
..


Rework getter into provider in ResultBuilderTest

Change-Id: I20e8bdc758e881d7a4d978b3dd55f269472b5524
---
M repo/tests/phpunit/includes/api/ResultBuilderTest.php
1 file changed, 24 insertions(+), 13 deletions(-)

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



diff --git a/repo/tests/phpunit/includes/api/ResultBuilderTest.php 
b/repo/tests/phpunit/includes/api/ResultBuilderTest.php
index b1af381..21d4f63 100644
--- a/repo/tests/phpunit/includes/api/ResultBuilderTest.php
+++ b/repo/tests/phpunit/includes/api/ResultBuilderTest.php
@@ -622,17 +622,18 @@
$this-assertEquals( $expected, $data );
}
 
-   public function testAddClaims() {
+   /**
+* @dataProvider statementSerializationProvider
+*/
+   public function testAddClaims( Statement $statement, 
$statementSerialization ) {
$result = $this-getDefaultResult();
-   list( $statement, $expectedStatementSerialization ) = 
$this-getClaimAndExpectedSerialization();
-   $claims = array( $statement );
$path = array( 'entities', 'Q1' );
$expected = array(
'entities' = array(
'Q1' = array(
'claims' = array(
'P12' = array(
-   
$expectedStatementSerialization
+   $statementSerialization
),
),
),
@@ -640,17 +641,19 @@
);
 
$resultBuilder = $this-getResultBuilder( $result );
-   $resultBuilder-addClaims( $claims, $path );
+   $resultBuilder-addClaims( array( $statement ), $path );
 
$data = $result-getResultData();
$this-removeElementsWithKeysRecursively( $data, array( '_type' 
) );
$this-assertEquals( $expected, $data );
}
 
-   public function testAddClaim() {
+   /**
+* @dataProvider statementSerializationProvider
+*/
+   public function testAddClaim( Statement $statement, 
$statementSerialization ) {
$result = $this-getDefaultResult();
-   list( $statement, $expectedStatementSerialization ) = 
$this-getClaimAndExpectedSerialization();
-   $expected = array( 'claim' = $expectedStatementSerialization );
+   $expected = array( 'claim' = $statementSerialization );
 
$resultBuilder = $this-getResultBuilder( $result );
$resultBuilder-addClaim( $statement );
@@ -660,13 +663,19 @@
$this-assertEquals( $expected, $data );
}
 
-   private function getClaimAndExpectedSerialization() {
+   public function statementSerializationProvider() {
$statement = new Statement(
new PropertyValueSnak( new PropertyId( 'P12' ), new 
StringValue( 'stringVal' ) ),
-   new SnakList( array( new PropertyValueSnak( new 
PropertyId( 'P12' ), new StringValue( 'qualiferVal' ) ) ) ),
-   new Referencelist( array( new Reference( array( new 
PropertyValueSnak( new PropertyId( 'P12' ), new StringValue( 'refSnakVal' ) ) ) 
) ) )
+   new SnakList( array(
+   new PropertyValueSnak( new PropertyId( 'P12' ), 
new StringValue( 'qualiferVal' ) ),
+   ) ),
+   new Referencelist( array(
+   new Reference( array(
+   new PropertyValueSnak( new PropertyId( 
'P12' ), new StringValue( 'refSnakVal' ) ),
+   ) ),
+   ) ),
+   'fooguidbar'
);
-   $statement-setGuid( 'fooguidbar' );
 
$expectedSerialization = array(
'id' = 'fooguidbar',
@@ -717,7 +726,9 @@
),
);
 
-   return array( $statement, $expectedSerialization );
+   return array(
+   array( $statement, $expectedSerialization ),
+   );
}
 
public function testAddReference() {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I20e8bdc758e881d7a4d978b3dd55f269472b5524
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Thiemo Mättig (WMDE) thiemo.maet...@wikimedia.de

[MediaWiki-commits] [Gerrit] WIP: Add etcd configuration client - change (operations...pybal)

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

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

Change subject: WIP: Add etcd configuration client
..

WIP: Add etcd configuration client

Add a simple etcd client implementation that can watch a key for changes, using
the etcd API's wait / waitIndex parameters to ensure consistency.

Change-Id: Ia6d898df142ebd17384ff50beadf63e0a2bbcfca
---
M pybal/__init__.py
A pybal/etcd.py
2 files changed, 115 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/debs/pybal 
refs/changes/49/225649/1

diff --git a/pybal/__init__.py b/pybal/__init__.py
index 2bc6fd0..b810ba6 100644
--- a/pybal/__init__.py
+++ b/pybal/__init__.py
@@ -11,4 +11,4 @@
 USER_AGENT_STRING = 'PyBal/%s' % __version__
 
 __all__ = ('ipvs', 'monitor', 'pybal', 'util', 'monitors', 'bgp',
-   'USER_AGENT_STRING')
+   'etcd', 'USER_AGENT_STRING')
diff --git a/pybal/etcd.py b/pybal/etcd.py
new file mode 100644
index 000..bef37ea
--- /dev/null
+++ b/pybal/etcd.py
@@ -0,0 +1,114 @@
+# -*- coding: utf-8 -*-
+
+  PyBal etcd client
+  ~
+
+  This module allows PyBal to be configured via etcd.
+
+
+import json
+import urllib
+
+from twisted.internet import defer, reactor, ssl
+from twisted.python import failure
+from twisted.web import client, error, http
+
+from pybal import USER_AGENT_STRING
+
+
+class EtcdClient(http.HTTPClient):
+Represents a client for the etcd HTTP API.
+
+def __init__(self):
+self.waitIndex = None
+
+def connectionMade(self):
+self.sendCommand('GET', self.factory.getPath())
+self.sendHeader('Host', self.factory.host)
+self.sendHeader('User-Agent', self.factory.agent)
+self.endHeaders()
+
+def handleHeader(self, key, value):
+if key == 'X-Etcd-Index':
+self.waitIndex = value
+
+def handleStatus(self, version, status, message):
+self.version = version
+self.status = status
+self.message = message
+
+def handleResponse(self, response):
+if self.status != '200':
+error = error.Error(self.status, self.message, response)
+self.factory.onFailure(failure.Failure(error))
+else:
+try:
+update = json.loads(response)
+except Exception:
+self.factory.onFailure(failure.Failure())
+else:
+self.factory.onUpdate(update, self.waitIndex)
+self.transport.loseConnection()
+
+def timeout(self):
+error = defer.TimeoutError(
+'Retrieving key %s from %s took longer than %s seconds.' %
+(self.factory.key, self.factory.host, self.factory.timeout))
+self.factory.onFailure(error)
+self.transport.loseConnection()
+
+
+class EtcdClientFactory(client.HTTPClientFactory):
+A factory that will continuously monitor an etcd key for changes.
+
+protocol = EtcdClient
+agent = USER_AGENT_STRING
+method = 'GET'
+afterFoundGet = False
+followRedirect = False
+scheme = 'https'  # FIXME: Make this compatible with both http and https.
+timeout = 10  # FIXME: Make sure timeout and wait=true play nice.
+
+def __init__(self, host, port, key, recursive=True, waitIndex=None):
+self.host = host
+self.key = key
+self.port = port
+self.recursive = recursive
+self.waitIndex = None
+self.deferred = defer.Deferred()
+
+def getPath(self):
+path = '/v2/keys/%s' % self.key
+params = {}
+if self.waitIndex is not None:
+params['waitIndex'] = self.waitIndex
+params['wait'] = 'true'
+if self.recursive:
+params['recursive'] = 'true'
+if params:
+path = '%s?%s' % (path, urllib.urlencode(params))
+return path
+
+def clientConnectionFailed(self, connector, reason):
+connector.connect()
+
+def clientConnectionLost(self, connector, unused_reason):
+connector.connect()
+
+def onUpdate(self, update, waitIndex):
+self.waitIndex = waitIndex
+# TODO: Notify PyBal.
+print(update)
+
+def onFailure(self, reason):
+# TODO: Log.
+pass
+
+
+if __name__ == '__main__':
+HOST = 'etcd1001.eqiad.wmnet'
+PORT = 2379
+KEY = 'conftool'
+factory = EtcdClientFactory(host=HOST, port=PORT, key=KEY)
+reactor.connectSSL(HOST, PORT, factory, ssl.ClientContextFactory())
+reactor.run()

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia6d898df142ebd17384ff50beadf63e0a2bbcfca
Gerrit-PatchSet: 1
Gerrit-Project: operations/debs/pybal
Gerrit-Branch: master
Gerrit-Owner: Ori.livneh o...@wikimedia.org

___
MediaWiki-commits mailing list

[MediaWiki-commits] [Gerrit] Avoid ip fallback in User::getName - change (mediawiki/core)

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

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

Change subject: Avoid ip fallback in User::getName
..

Avoid ip fallback in User::getName

A user was seeing his own ip address in recent changes for new creation
log instead of the new user name. The ip fallback in User::getName is a
possible cause for that.

Set the ip as name for anon in loadDefaults to have the name set, when
User::getName is called for anon users. In case there was really no user
loaded from the database due to slave lags, throw an exception to avoid
returning false, which can give errors in the further processing.

Change-Id: I97d4558a6b9afa5a7a8683cbcb931e8cce0ed341
---
M includes/User.php
1 file changed, 2 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/52/225652/1

diff --git a/includes/User.php b/includes/User.php
index d627a6d..2e6d36d 100644
--- a/includes/User.php
+++ b/includes/User.php
@@ -1044,7 +1044,7 @@
$passwordFactory = self::getPasswordFactory();
 
$this-mId = 0;
-   $this-mName = $name;
+   $this-mName = $name ?: IP::sanitizeIP( 
$this-getRequest()-getIP() );
$this-mRealName = '';
$this-mPassword = $passwordFactory-newFromCiphertext( null );
$this-mNewpassword = $passwordFactory-newFromCiphertext( null 
);
@@ -2044,8 +2044,7 @@
} else {
$this-load();
if ( $this-mName === false ) {
-   // Clean up IPs
-   $this-mName = IP::sanitizeIP( 
$this-getRequest()-getIP() );
+   throw new Exception( 'Could not find user name 
for ' . $this-mId . ' in ' . __METHOD__ );
}
return $this-mName;
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I97d4558a6b9afa5a7a8683cbcb931e8cce0ed341
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Umherirrender umherirrender_de...@web.de

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


[MediaWiki-commits] [Gerrit] Converted \r\n to \n\n in the i18n file - change (mediawiki...Bouquet)

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

Change subject: Converted \r\n to \n\n in the i18n file
..


Converted \r\n to \n\n in the i18n file

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

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



diff --git a/i18n/en.json b/i18n/en.json
index 8d48719..ff2ee69 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -2,5 +2,5 @@
@metadata: {
authors: []
},
-   bouquet-navigation: * mainpage|mainpage-description\r\n** 
recentchanges-url|recentchanges\r\n** randompage-url|randompage\r\n* 
faqpage|FAQ\r\n* helppage|help\r\n* portal-url|portal\r\n* 
currentevents-url|currentevents
+   bouquet-navigation: * mainpage|mainpage-description\n\n** 
recentchanges-url|recentchanges\n\n** randompage-url|randompage\n\n* 
faqpage|FAQ\n\n* helppage|help\n\n* portal-url|portal\n\n* 
currentevents-url|currentevents
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If83ff82d95b829c42bdf06769694d8cfcf2faf7e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/Bouquet
Gerrit-Branch: master
Gerrit-Owner: Jack Phoenix j...@countervandalism.net
Gerrit-Reviewer: Jack Phoenix j...@countervandalism.net
Gerrit-Reviewer: Siebrand siebr...@kitano.nl
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Fixed reference issue in AkismetKlik::Filter() signature - change (mediawiki...AkismetKlik)

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

Change subject: Fixed reference issue in AkismetKlik::Filter() signature
..


Fixed reference issue in AkismetKlik::Filter() signature

The AkismetKlik::Filter() $title parameter were set by reference, but:
 - this method doesn't edit the parameter value
 - this method is called with $spamObj-filter( 
$editPage-getArticle()-getTitle(), ...)

Bug: T105480
Change-Id: Iec1d894285f3a462878dbd8250f875a769bf2dbc
---
M AkismetKlik.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/AkismetKlik.php b/AkismetKlik.php
index d938b24..5dcfce0 100644
--- a/AkismetKlik.php
+++ b/AkismetKlik.php
@@ -82,7 +82,7 @@
 * @return bool True if the edit should not be allowed, false otherwise
 * If the return value is true, an error will have been sent to $wgOut
 */
-   function filter( $title, $text, $section, $editPage ) {
+   function filter( $title, $text, $section, $editPage ) {
global $wgParser, $wgUser, $wgAKSiteUrl, $wgAKkey, $IP;
 
if ( strlen( $wgAKkey ) == 0 ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iec1d894285f3a462878dbd8250f875a769bf2dbc
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/AkismetKlik
Gerrit-Branch: master
Gerrit-Owner: Dereckson dereck...@espace-win.org
Gerrit-Reviewer: Addshore addshorew...@gmail.com
Gerrit-Reviewer: Carlb ca...@kingston.net
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Converted \r\n to \n\n and removed one useless \r in the Fin... - change (mediawiki...DeskMessMirrored)

2015-07-18 Thread Jack Phoenix (Code Review)
Jack Phoenix has uploaded a new change for review.

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

Change subject: Converted \r\n to \n\n and removed one useless \r in the 
Finnish i18n file
..

Converted \r\n to \n\n and removed one useless \r in the Finnish i18n file

Change-Id: Ib40cfe3f32ea1633cf8f950a4a84ed46d7ecae4b
---
M i18n/en.json
M i18n/fi.json
2 files changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/DeskMessMirrored 
refs/changes/55/225655/1

diff --git a/i18n/en.json b/i18n/en.json
index 8f42afb..2f4e4c1 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -3,5 +3,5 @@
authors: []
},
deskmessmirrored-skin-desc: Marble desktop covered with a mix of old 
and new items, such as some vintage papers, a stainless steel pen, and, a hot 
cup of coffee!,
-   deskmessmirrored-navigation: * Espresso\r\n** Level 2\r\n*** Level 
3\r\n* Coffee\r\n** Level 2\r\n*** Level 3\r\n* Tea\r\n** Level 2\r\n*** Level 
3\r\n* Cakes\r\n** Level 2\r\n*** Level 3\r\n* Cookies\r\n** Level 2\r\n*** 
Level 3
+   deskmessmirrored-navigation: * Espresso\n\n** Level 2\n\n*** Level 
3\n\n* Coffee\n\n** Level 2\n\n*** Level 3\n\n* Tea\n\n** Level 2\n\n*** Level 
3\n\n* Cakes\n\n** Level 2\n\n*** Level 3\n\n* Cookies\n\n** Level 2\n\n*** 
Level 3
 }
diff --git a/i18n/fi.json b/i18n/fi.json
index 3542965..b5b7158 100644
--- a/i18n/fi.json
+++ b/i18n/fi.json
@@ -1,7 +1,7 @@
 {
@metadata: {
authors: [
-   Jack Phoenix j...@countervandalism.net\r
+   Jack Phoenix j...@countervandalism.net
]
},
deskmessmirrored-skin-desc: Marmorinen pöytä, jonka päällä on 
sekoitus erinäisiä uusia ja vanhoja esineitä, kuten vanhoja papereita, 
ruostumattomasta teräksestä valmistettu kynä ja kuppi kuumaa kahvia!

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib40cfe3f32ea1633cf8f950a4a84ed46d7ecae4b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/DeskMessMirrored
Gerrit-Branch: master
Gerrit-Owner: Jack Phoenix j...@countervandalism.net

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


[MediaWiki-commits] [Gerrit] Fix exception message when wgAKkey is unset. - change (mediawiki...AkismetKlik)

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

Change subject: Fix exception message when wgAKkey is unset.
..


Fix exception message when wgAKkey is unset.

Bug: T105479
Change-Id: I189346bc5f404fcf391a082a8386d85d49e6
---
M AkismetKlik.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/AkismetKlik.php b/AkismetKlik.php
index 5dcfce0..cf1000e 100644
--- a/AkismetKlik.php
+++ b/AkismetKlik.php
@@ -86,7 +86,7 @@
global $wgParser, $wgUser, $wgAKSiteUrl, $wgAKkey, $IP;
 
if ( strlen( $wgAKkey ) == 0 ) {
-   throw new MWException( Set $wgAKkey );
+   throw new MWException( 'Set $wgAKkey in 
LocalSettings.php or relevant configuration file.' );
}
 
wfProfileIn( __METHOD__ );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I189346bc5f404fcf391a082a8386d85d49e6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/AkismetKlik
Gerrit-Branch: master
Gerrit-Owner: Dereckson dereck...@espace-win.org
Gerrit-Reviewer: Addshore addshorew...@gmail.com
Gerrit-Reviewer: Carlb ca...@kingston.net
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Converted \r\n to \n\n and removed one useless \r in the Fin... - change (mediawiki...DeskMessMirrored)

2015-07-18 Thread Jack Phoenix (Code Review)
Jack Phoenix has submitted this change and it was merged.

Change subject: Converted \r\n to \n\n and removed one useless \r in the 
Finnish i18n file
..


Converted \r\n to \n\n and removed one useless \r in the Finnish i18n file

Change-Id: Ib40cfe3f32ea1633cf8f950a4a84ed46d7ecae4b
---
M i18n/en.json
M i18n/fi.json
2 files changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Jack Phoenix: Looks good to me, approved



diff --git a/i18n/en.json b/i18n/en.json
index 8f42afb..2f4e4c1 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -3,5 +3,5 @@
authors: []
},
deskmessmirrored-skin-desc: Marble desktop covered with a mix of old 
and new items, such as some vintage papers, a stainless steel pen, and, a hot 
cup of coffee!,
-   deskmessmirrored-navigation: * Espresso\r\n** Level 2\r\n*** Level 
3\r\n* Coffee\r\n** Level 2\r\n*** Level 3\r\n* Tea\r\n** Level 2\r\n*** Level 
3\r\n* Cakes\r\n** Level 2\r\n*** Level 3\r\n* Cookies\r\n** Level 2\r\n*** 
Level 3
+   deskmessmirrored-navigation: * Espresso\n\n** Level 2\n\n*** Level 
3\n\n* Coffee\n\n** Level 2\n\n*** Level 3\n\n* Tea\n\n** Level 2\n\n*** Level 
3\n\n* Cakes\n\n** Level 2\n\n*** Level 3\n\n* Cookies\n\n** Level 2\n\n*** 
Level 3
 }
diff --git a/i18n/fi.json b/i18n/fi.json
index 3542965..b5b7158 100644
--- a/i18n/fi.json
+++ b/i18n/fi.json
@@ -1,7 +1,7 @@
 {
@metadata: {
authors: [
-   Jack Phoenix j...@countervandalism.net\r
+   Jack Phoenix j...@countervandalism.net
]
},
deskmessmirrored-skin-desc: Marmorinen pöytä, jonka päällä on 
sekoitus erinäisiä uusia ja vanhoja esineitä, kuten vanhoja papereita, 
ruostumattomasta teräksestä valmistettu kynä ja kuppi kuumaa kahvia!

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib40cfe3f32ea1633cf8f950a4a84ed46d7ecae4b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/DeskMessMirrored
Gerrit-Branch: master
Gerrit-Owner: Jack Phoenix j...@countervandalism.net
Gerrit-Reviewer: Jack Phoenix j...@countervandalism.net
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Converted \r\n to \n\n and removed one useless \r from the F... - change (mediawiki...Gamepress)

2015-07-18 Thread Jack Phoenix (Code Review)
Jack Phoenix has submitted this change and it was merged.

Change subject: Converted \r\n to \n\n and removed one useless \r from the 
Finnish i18n file
..


Converted \r\n to \n\n and removed one useless \r from the Finnish i18n file

Change-Id: I0ddf62b330443676b0ba0b80a2dfcd250b90bce7
---
M i18n/en.json
M i18n/fi.json
2 files changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/i18n/en.json b/i18n/en.json
index 2a92b84..95ee620 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -3,7 +3,7 @@
authors: []
},
gamepress-back-to-top: Back to top uarr;,
-   gamepress-navigation: * mainpage|mainpage-description\r\n** 
faqpage|faq\r\n** recentchanges-url|recentchanges,
+   gamepress-navigation: * mainpage|mainpage-description\n\n** 
faqpage|faq\n\n** recentchanges-url|recentchanges,
gamepress-prefooter-1: ,
gamepress-prefooter-2: ,
gamepress-prefooter-3: 
diff --git a/i18n/fi.json b/i18n/fi.json
index dcbf3d3..48ec2a6 100644
--- a/i18n/fi.json
+++ b/i18n/fi.json
@@ -1,7 +1,7 @@
 {
@metadata: {
authors: [
-   Jack Phoenix j...@countervandalism.net\r
+   Jack Phoenix j...@countervandalism.net
]
},
gamepress-back-to-top: Palaa alkuun uarr;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0ddf62b330443676b0ba0b80a2dfcd250b90bce7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/Gamepress
Gerrit-Branch: master
Gerrit-Owner: Jack Phoenix j...@countervandalism.net
Gerrit-Reviewer: Jack Phoenix j...@countervandalism.net
Gerrit-Reviewer: Siebrand siebr...@kitano.nl
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 ability to apply tint colors to SVGs with 'color=' - change (mediawiki/core)

2015-07-18 Thread Brion VIBBER (Code Review)
Brion VIBBER has uploaded a new change for review.

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

Change subject: Add ability to apply tint colors to SVGs with 'color='
..

Add ability to apply tint colors to SVGs with 'color='

\o/

Bug: T106240
Change-Id: I39bb6d47d3304f8ea6b5fb43ddc24a9d0f99e6b9
---
M includes/media/SVG.php
M languages/messages/MessagesEn.php
2 files changed, 116 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/57/225657/1

diff --git a/includes/media/SVG.php b/includes/media/SVG.php
index 1118598..3959385 100644
--- a/includes/media/SVG.php
+++ b/includes/media/SVG.php
@@ -170,6 +170,7 @@
$physicalWidth = $params['physicalWidth'];
$physicalHeight = $params['physicalHeight'];
$lang = isset( $params['lang'] ) ? $params['lang'] : 
$this-getDefaultRenderLanguage( $image );
+   $color = isset( $params['color'] ) ? $params['color'] : false;
 
if ( $flags  self::TRANSFORM_LATER ) {
return new ThumbnailImage( $image, $dstUrl, $dstPath, 
$params );
@@ -204,7 +205,18 @@
// 
https://git.gnome.org/browse/librsvg/commit/?id=f01aded72c38f0e18bc7ff67dee800e380251c8e
$tmpDir = wfTempDir() . '/svg_' . wfRandomString( 24 );
$lnPath = $tmpDir/ . basename( $srcPath );
-   $ok = mkdir( $tmpDir, 0771 )  symlink( $srcPath, $lnPath );
+   $ok = mkdir( $tmpDir, 0771 );
+
+   if ( $color === false ) {
+   // symlink away
+   $ok = $ok  symlink( $srcPath, $lnPath );
+   } else {
+   // We have to modify the file to add a tint color, so 
make a modified copy instead
+   $srcXml = file_get_contents( $srcPath );
+   $dstXml = self::applyTintColor( $srcXml, $color );
+   $ok = $ok  (file_put_contents( $lnPath, $dstXml ) !== 
false);
+   }
+
/** @noinspection PhpUnusedLocalVariableInspection */
$cleaner = new ScopedCallback( function () use ( $tmpDir, 
$lnPath ) {
MediaWiki\suppressWarnings();
@@ -227,6 +239,84 @@
return new ThumbnailImage( $image, $dstUrl, $dstPath, 
$params );
} else {
return $status; // MediaTransformError
+   }
+   }
+
+   /**
+* Take SVG source string and add a filter layer to tint to the given 
color.
+* Useful for icons that need to be used in different color schemes.
+*
+* @return string
+*/
+   public static function applyTintColor( $xmlSource, $color ) {
+   $color = self::validateColor( $color );
+   $alpha = hexdec( substr( $color, 7, 2 ) ) / 255;
+   $color = substr( $color, 0, 7 );
+
+   /*
+ svg  filter=url(#mw-svg-tint-filter)
+   defs
+ filter id=mw-svg-tint-filter
+   feFlood flood-color=#8090f0 flood-opacity=1/
+   feComposite in2=SourceAlpha operator=in/
+ /filter
+   /defs
+ ..
+ /svg
+   */
+
+   $dom = new DomDocument();
+   MediaWiki\suppressWarnings();
+   $result = $dom-loadXML( $xmlSource );
+   MediaWiki\restoreWarnings();
+   if ( !$result ) {
+   // unable to tint! give up
+   return $xmlSource;
+   }
+
+   $svgns = 'http://www.w3.org/2000/svg';
+
+   $defs = $dom-documentElement-getElementsByTagNameNS( $svgns, 
'defs' );
+   if ( $defs-length == 0 ) {
+   $def = $dom-createElementNS( $svgns, 'defs' );
+   $dom-documentElement-insertBefore( $def, 
$dom-documentElement-firstChild );
+   } else {
+   $def = $defs-get(0);
+   }
+
+   $filter = $dom-createElementNS( $svgns, 'filter' );
+   $filter-setAttribute( 'id', 'mw-svg-tint-filter' );
+   $feFlood = $dom-createElementNS( $svgns, 'feFlood' );
+   $feFlood-setAttribute( 'flood-color', $color );
+   $feFlood-setAttribute( 'flood-opacity', $alpha );
+   $filter-appendChild( $feFlood );
+   $feComposite = $dom-createElementNS( $svgns, 'feComposite' );
+   $feComposite-setAttribute( 'in2', 'SourceAlpha' );
+   $feComposite-setAttribute( 'operator', 'in' );
+   $filter-appendChild( $feComposite );
+   $def-appendChild( $filter );
+
+   // @todo is there a way to apply multiple filters in case one 

[MediaWiki-commits] [Gerrit] Move all images to resources/images - change (mediawiki...Popups)

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

Change subject: Move all images to resources/images
..


Move all images to resources/images

Change-Id: Iac712668baf8cefedf036c4d479687e3f5da5a46
---
M Popups.hooks.php
M resources/ext.popups.core.less
M resources/ext.popups.settings.js
M resources/ext.popups.settings.less
R resources/images/cog.png
R resources/images/cog.svg
R resources/images/footer-ltr.png
R resources/images/footer-ltr.svg
R resources/images/footer-rtl.png
R resources/images/footer-rtl.svg
R resources/images/horn-ltr.png
R resources/images/horn-ltr.svg
R resources/images/horn-rtl.png
R resources/images/horn-rtl.svg
R resources/images/hovercard.svg
R resources/images/navpop.svg
R resources/images/popups-ltr.svg
R resources/images/popups-rtl.svg
18 files changed, 8 insertions(+), 8 deletions(-)

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



diff --git a/Popups.hooks.php b/Popups.hooks.php
index 5a6a92e..63277c9 100644
--- a/Popups.hooks.php
+++ b/Popups.hooks.php
@@ -32,8 +32,8 @@
'label-message' = 'popups-message',
'desc-message' = 'popups-desc',
'screenshot' = array(
-   'ltr' = 
$wgExtensionAssetsPath/Popups/popups-ltr.svg,
-   'rtl' = 
$wgExtensionAssetsPath/Popups/popups-rtl.svg,
+   'ltr' = 
$wgExtensionAssetsPath/Popups/resources/images/popups-ltr.svg,
+   'rtl' = 
$wgExtensionAssetsPath/Popups/resources/images/popups-rtl.svg,
),
'info-link' = 
'https://www.mediawiki.org/wiki/Beta_Features/Hovercards',
'discussion-link' = 
'https://www.mediawiki.org/wiki/Talk:Beta_Features/Hovercards',
diff --git a/resources/ext.popups.core.less b/resources/ext.popups.core.less
index fee1f8e..9105e49 100644
--- a/resources/ext.popups.core.less
+++ b/resources/ext.popups.core.less
@@ -121,11 +121,11 @@
}
 
.mwe-popups-settings-icon {
-   .background-image-svg( cog.svg, cog.png );
+   .background-image-svg( images/cog.svg, 
images/cog.png );
}
 
.mwe-popups-survey-icon {
-   .background-image-svg( horn-ltr.svg, horn-ltr.png );
+   .background-image-svg( images/horn-ltr.svg, 
images/horn-ltr.png );
}
}
 
diff --git a/resources/ext.popups.settings.js b/resources/ext.popups.settings.js
index 7759e6f..447faa2 100644
--- a/resources/ext.popups.settings.js
+++ b/resources/ext.popups.settings.js
@@ -61,12 +61,12 @@
'simple': [
mw.message( 
'popups-settings-option-simple' ).text(),
mw.message( 
'popups-settings-option-simple-description' ).text(),
-   'hovercard.svg'
+   'images/hovercard.svg'
],
'advanced': [
mw.message( 
'popups-settings-option-advanced' ).text(),
mw.message( 
'popups-settings-option-advanced-description' ).text(),
-   'navpop.svg'
+   'images/navpop.svg'
],
'off': [
mw.message( 
'popups-settings-option-off' ).text(),
diff --git a/resources/ext.popups.settings.less 
b/resources/ext.popups.settings.less
index 0b5692b..8ae8f42 100644
--- a/resources/ext.popups.settings.less
+++ b/resources/ext.popups.settings.less
@@ -116,14 +116,14 @@
background: #eee;
height: 65px;
width: 450px;
-   .background-image-svg( footer-ltr.svg, footer-ltr.png );
+   .background-image-svg( images/footer-ltr.svg, 
images/footer-ltr.png );
background-position: center;
background-repeat: no-repeat;
}
 }
 
 .rtl #mwe-popups-settings-help div.mwe-popups-settings-help-image {
-   .background-image-svg( footer-rtl.svg, footer-rtl.png );
+   .background-image-svg( images/footer-rtl.svg, images/footer-rtl.png 
);
 }
 
 .mwe-popups-settings-actions {
diff --git a/resources/cog.png b/resources/images/cog.png
similarity index 100%
rename from resources/cog.png
rename to resources/images/cog.png
Binary files differ
diff --git a/resources/cog.svg b/resources/images/cog.svg
similarity index 100%
rename from resources/cog.svg
rename to resources/images/cog.svg
diff --git a/resources/footer-ltr.png b/resources/images/footer-ltr.png
similarity index 100%
rename from resources/footer-ltr.png
rename 

[MediaWiki-commits] [Gerrit] Add '__version__' and 'USER_AGENT_STRING' - change (operations...pybal)

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

Change subject: Add '__version__' and 'USER_AGENT_STRING'
..


Add '__version__' and 'USER_AGENT_STRING'

Define '__version__' so we can incorporate it in the user-agent string. Define
a user-agent string so that we can set one consistently for all HTTP clients
within PyBal.

Change-Id: I2e382cc72148f9023f17c60d1f3e6472e65fef1c
---
M pybal/__init__.py
1 file changed, 6 insertions(+), 1 deletion(-)

Approvals:
  Ori.livneh: Looks good to me, approved
  Faidon Liambotis: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/pybal/__init__.py b/pybal/__init__.py
index 0a76536..2bc6fd0 100644
--- a/pybal/__init__.py
+++ b/pybal/__init__.py
@@ -6,4 +6,9 @@
 
 import test
 
-__all__ = [ 'ipvs', 'monitor', 'pybal', 'util', 'monitors', 'bgp' ]
+__version__ = '1.6'
+
+USER_AGENT_STRING = 'PyBal/%s' % __version__
+
+__all__ = ('ipvs', 'monitor', 'pybal', 'util', 'monitors', 'bgp',
+   'USER_AGENT_STRING')

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2e382cc72148f9023f17c60d1f3e6472e65fef1c
Gerrit-PatchSet: 1
Gerrit-Project: operations/debs/pybal
Gerrit-Branch: master
Gerrit-Owner: Ori.livneh o...@wikimedia.org
Gerrit-Reviewer: Faidon Liambotis fai...@wikimedia.org
Gerrit-Reviewer: Ori.livneh o...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Provide a command whitelist feature for targets - change (VisualEditor/VisualEditor)

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

Change subject: Provide a command whitelist feature for targets
..


Provide a command whitelist feature for targets

Bug: T106061
Change-Id: I87d8aa3d37d00a266c3efd2b88e31fd697678d9a
---
M src/init/sa/ve.init.sa.Target.js
M src/init/ve.init.Target.js
M src/ui/ve.ui.Surface.js
M src/ui/widgets/ve.ui.TargetWidget.js
4 files changed, 15 insertions(+), 1 deletion(-)

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



diff --git a/src/init/sa/ve.init.sa.Target.js b/src/init/sa/ve.init.sa.Target.js
index 382bb30..a351702 100644
--- a/src/init/sa/ve.init.sa.Target.js
+++ b/src/init/sa/ve.init.sa.Target.js
@@ -91,6 +91,7 @@
  */
 ve.init.sa.Target.prototype.createSurface = function ( dmDoc, config ) {
config = ve.extendObject( {
+   includeCommands: this.constructor.static.includeCommands,
excludeCommands: OO.simpleArrayUnion(
this.constructor.static.excludeCommands,
this.constructor.static.documentCommands,
diff --git a/src/init/ve.init.Target.js b/src/init/ve.init.Target.js
index 3162eb3..76e26c6 100644
--- a/src/init/ve.init.Target.js
+++ b/src/init/ve.init.Target.js
@@ -131,6 +131,15 @@
 ve.init.Target.static.targetCommands = [ 'findAndReplace', 'findNext', 
'findPrevious' ];
 
 /**
+ * List of commands to include in the target
+ *
+ * Null means all commands in the registry are used (excluding excludeCommands)
+ *
+ * @type {string[]|null} List of command names
+ */
+ve.init.Target.static.includeCommands = null;
+
+/**
  * List of commands to exclude from the target entirely
  *
  * @type {string[]} List of command names
@@ -230,6 +239,7 @@
  */
 ve.init.Target.prototype.createSurface = function ( dmDoc, config ) {
config = ve.extendObject( {
+   includeCommands: this.constructor.static.includeCommands,
excludeCommands: OO.simpleArrayUnion(
this.constructor.static.excludeCommands,
this.constructor.static.documentCommands,
diff --git a/src/ui/ve.ui.Surface.js b/src/ui/ve.ui.Surface.js
index 3e410d3..7d2aef1 100644
--- a/src/ui/ve.ui.Surface.js
+++ b/src/ui/ve.ui.Surface.js
@@ -15,6 +15,7 @@
  * @constructor
  * @param {HTMLDocument|Array|ve.dm.LinearData|ve.dm.Document} dataOrDoc 
Document data to edit
  * @param {Object} [config] Configuration options
+ * @cfg {string[]|null} [includeCommands] List of commands to include, null 
for all registered commands
  * @cfg {string[]} [excludeCommands] List of commands to exclude
  * @cfg {Object} [importRules] Import rules
  * @cfg {string} [placeholder] Placeholder text to display when the surface is 
empty
@@ -41,7 +42,7 @@
this.$menus = $( 'div' );
this.$placeholder = $( 'div' ).addClass( 've-ui-surface-placeholder' 
);
this.triggerListener = new ve.TriggerListener( OO.simpleArrayDifference(
-   Object.keys( ve.ui.commandRegistry.registry ), 
config.excludeCommands || []
+   config.includeCommands || Object.keys( 
ve.ui.commandRegistry.registry ), config.excludeCommands || []
) );
if ( dataOrDoc instanceof ve.dm.Document ) {
// ve.dm.Document
diff --git a/src/ui/widgets/ve.ui.TargetWidget.js 
b/src/ui/widgets/ve.ui.TargetWidget.js
index d46b5c1..bd6647e 100644
--- a/src/ui/widgets/ve.ui.TargetWidget.js
+++ b/src/ui/widgets/ve.ui.TargetWidget.js
@@ -15,6 +15,7 @@
  * @param {ve.dm.Document} doc Document model
  * @param {Object} [config] Configuration options
  * @cfg {Object[]} [tools] Toolbar configuration
+ * @cfg {string[]|null} [includeCommands] List of commands to include, null 
for all registered commands
  * @cfg {string[]} [excludeCommands] List of commands to exclude
  * @cfg {Object} [importRules] Import rules
  * @cfg {string} [inDialog] The name of the dialog this surface widget is in
@@ -28,6 +29,7 @@
 
// Properties
this.surface = ve.init.target.createSurface( doc, {
+   includeCommands: config.includeCommands,
excludeCommands: config.excludeCommands,
importRules: config.importRules,
inDialog: config.inDialog

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I87d8aa3d37d00a266c3efd2b88e31fd697678d9a
Gerrit-PatchSet: 2
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Esanders esand...@wikimedia.org
Gerrit-Reviewer: Alex Monk kren...@gmail.com
Gerrit-Reviewer: Catrope roan.katt...@gmail.com
Gerrit-Reviewer: Jforrester jforres...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org

[MediaWiki-commits] [Gerrit] [BrowserTest] Added screenshots scenarios for links and cate... - change (mediawiki...VisualEditor)

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

Change subject: [BrowserTest] Added screenshots scenarios for links and 
categories
..


[BrowserTest] Added screenshots scenarios for links and categories

Also minor cleanup of rspec old should syntax, changed all occurences to
expect syntax.

Change-Id: I0c2dfc18d06812ed9da2f6c0056c95b7755e5afd
---
M modules/ve-mw/tests/browser/features/language_screenshot.feature
M 
modules/ve-mw/tests/browser/features/step_definitions/language_screenshot_steps.rb
M 
modules/ve-mw/tests/browser/features/step_definitions/verify_production_wikis_steps.rb
M modules/ve-mw/tests/browser/features/support/pages/visual_editor_page.rb
M modules/ve-mw/tests/browser/i18n/en.json
M modules/ve-mw/tests/browser/i18n/qqq.json
M modules/ve-mw/ui/inspectors/ve.ui.MWLinkAnnotationInspector.js
7 files changed, 128 insertions(+), 37 deletions(-)

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



diff --git a/modules/ve-mw/tests/browser/features/language_screenshot.feature 
b/modules/ve-mw/tests/browser/features/language_screenshot.feature
index 95ed896..988b0ea 100644
--- a/modules/ve-mw/tests/browser/features/language_screenshot.feature
+++ b/modules/ve-mw/tests/browser/features/language_screenshot.feature
@@ -60,6 +60,25 @@
   And I click the Link button
 Then I should see link Content box with dropdown options
 
+  @language_screenshot
+  Scenario: VisualEditor_External_link
+Given I go to the Links VisualEditor Screenshot page with source content 
Hello World for language screenshot
+  And I click in the editable part
+  And I select World in editable part
+  And I click the Link button
+  And I click the External link button in the panel
+  When I enter external link http://www.example.com; into external link 
Content box
+Then I should see link Content box with dropdown options
+
+  @language_screenshot
+  Scenario: VisualEditor_Internal_selected_link
+Given I go to the Links VisualEditor Screenshot page with source content 
Hello World for language screenshot
+  And I click in the editable part
+  And I select World in editable part
+  And I click the Link button
+  When I click on search pages in panel
+Then I should see link Content box with dropdown options
+
   Scenario: VisualEditor_Link_editing_inline
 Given I go to the Links VisualEditor Screenshot page with source content 
Links VisualEditor Screenshot
   And I click in the editable part
@@ -128,10 +147,18 @@
 Then I should see the VisualEditor tool-bar
 
   @language_screenshot
-  Scenario: VisualEditor_category_editing
-Given I am editing the language screenshots page
+  Scenario: VisualEditor_category_addition
+Given I am editing the language screenshots page with category Earth
+And I click on category in hamburger menu
+When I add Category World in category dialog box
+Then I should see category recommendation drop down
+
+  @language_screenshot
+  Scenario: VisualEditor_category_deletion
+Given I am editing the language screenshots page with category Earth
 When I click on category in hamburger menu
-Then I should see category dialog box
+When I click on first category
+Then I should see delete button in category info box
 
   @language_screenshot
   Scenario: VisualEditor_formula
diff --git 
a/modules/ve-mw/tests/browser/features/step_definitions/language_screenshot_steps.rb
 
b/modules/ve-mw/tests/browser/features/step_definitions/language_screenshot_steps.rb
index f916040..01033fb 100644
--- 
a/modules/ve-mw/tests/browser/features/step_definitions/language_screenshot_steps.rb
+++ 
b/modules/ve-mw/tests/browser/features/step_definitions/language_screenshot_steps.rb
@@ -58,6 +58,11 @@
   step I go to the \#{page}\ page with source content 
\#{translate(content)}\
 end
 
+Given(/^I am editing the language screenshots page with category (.*?)$/) do 
|category|
+  translate_text = category #{category}
+  step I go to the \Language Screenshot\ page with source content 
\[[#{translate(translate_text)}]]\
+end
+
 When(/^I click on the Insert menu$/) do
   on(VisualEditorPage).insert_indicator_down_element.when_present.click
 end
@@ -141,18 +146,57 @@
   on(VisualEditorPage).ve_references_element.when_present.click
 end
 
-Then(/^I should see category dialog box$/) do
-  on(VisualEditorPage).window_frame_element.when_present.should be_visible
+When(/^I click the External link button in the panel$/) do
+  on(VisualEditorPage).external_link_element.when_present.click
+end
+
+When(/^I enter external link (.*?) into external link Content box$/) do 
|external_url|
+  on(VisualEditorPage).external_link_field_element.value = ''
+  
on(VisualEditorPage).external_link_field_element.when_present.send_keys(external_url)
+end
+
+When(/^I click on search pages in panel$/) do
+  

[MediaWiki-commits] [Gerrit] Add debug fields - change (mediawiki...MathSearch)

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

Change subject: Add debug fields
..


Add debug fields

Change-Id: Ic7ee7967b4aab756d2f58e54e2703f58b6eb5a44
---
M MathObject.php
1 file changed, 216 insertions(+), 156 deletions(-)

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



diff --git a/MathObject.php b/MathObject.php
index 3b25a68..57f161b 100644
--- a/MathObject.php
+++ b/MathObject.php
@@ -2,70 +2,25 @@
 use MediaWiki\Logger\LoggerFactory;
 
 class MathObject extends MathMathML {
-
+   // DEBUG VARIABLES
+   // Available, if Math extension runs in debug mode ($wgMathDebug = 
true) only.
+   /** @var int LaTeXML return code (will be available in future Mathoid 
versions as well) */
+   protected $statusCode = 0;
+   /** @var timestamp of the last modification of the database entry */
+   protected $timestamp;
+   /** @var log messages generated during conversion of mathematical 
content */
+   protected $log = '';
protected $anchorID = 0;
protected $revisionID = 0;
protected $index_timestamp = null;
protected $dbLoadTime= 0;
protected $mathTableName = null;
 
-   public function getAnchorID() {
-   return $this-anchorID;
-   }
-
-   public function setAnchorID( $ID ) {
-   $this-anchorID = $ID;
-   }
-
-   public function getRevisionID() {
-   return $this-revisionID;
-   }
-
-   public function setRevisionID( $ID ) {
-   $this-revisionID = $ID;
-   }
-
-   public function getIndexTimestamp() {
-   return $this-index_timestamp;
-   }
-
-   public function getInputHash() {
-   if ( $this-inputHash ) {
-   return $this-inputHash;
-   } else {
-   return parent::getInputHash();
-   }
-   }
-
public static function hash2md5( $hash ){
//TODO: make MathRenderer::dbHash2md5 public
$dbr = wfGetDB( DB_SLAVE );
$xhash = unpack( 'H32md5', $dbr-decodeBlob( $hash ) . 
 );
return $xhash['md5'];
-   }
-   /**
-*
-* @global boolean $wgMathDebug
-* @param stdClass $res
-* @return boolean|\self
-*/
-   public static function constructformpagerow( $res ) {
-   global $wgMathDebug;
-   if ( $res  $res-mathindex_revision_id  0 ) {
-   $class = get_called_class();
-   /** @type MathObject $instance */
-   $instance = new $class;
-   $instance-setRevisionID( $res-mathindex_revision_id );
-   $instance-setAnchorID( $res-mathindex_anchor );
-   if ( $wgMathDebug  isset($res-mathindex_timestamp) ) 
{
-   $instance-index_timestamp = 
$res-mathindex_timestamp;
-   }
-   $instance-inputHash = $res-mathindex_inputhash;
-   $instance-readFromDatabase();
-   return $instance;
-   } else {
-   return false;
-   }
}
 
public static function findSimilarPages( $pid ) {
@@ -92,6 +47,156 @@
} catch ( Exception $e ) {
return DatabaseProblem;
}
+   }
+
+   public static function cloneFromRenderer(MathRenderer $renderer){
+   $instance = new MathObject( $renderer-getTex() );
+   $instance-setMathml( $renderer-getMathml() );
+   $instance-setSvg( $renderer-getSvg() );
+   $instance-setMode( $renderer-getMode() );
+   $instance-setMathStyle( $renderer-getMathStyle() );
+   return $instance;
+   }
+
+   /**
+*
+* @param int $pid
+* @param int $eid
+* @return self instance
+*/
+   public static function constructformpage( $pid, $eid ) {
+   $dbr = wfGetDB( DB_SLAVE );
+   $res = $dbr-selectRow(
+   array( 'mathindex' ), self::dbIndexFieldsArray(), 
'mathindex_revision_id = ' . $pid
+   . ' AND mathindex_anchor= ' . $eid . '' );
+   $start = microtime(true);
+   $o = self::constructformpagerow( $res );
+   LoggerFactory::getInstance( 'MathSearch' )-warning( 'Fetched 
in '. microtime( true ) - $start );
+   return $o;
+   }
+
+   /**
+* @return array
+*/
+   private static function dbIndexFieldsArray() {
+   global $wgMathDebug;
+   $in = array(
+   'mathindex_revision_id',
+   'mathindex_anchor',
+   'mathindex_inputhash' );
+

[MediaWiki-commits] [Gerrit] Serve material-design-icons from cdnjs - change (labs...crosswatch)

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

Change subject: Serve material-design-icons from cdnjs
..


Serve material-design-icons from cdnjs

Bug: T105980

Change-Id: Ie7768b827314dcc46013b88bdf86cea3924ec473
---
M README.md
M frontend/bower.json
M frontend/src/app/index.css
3 files changed, 6 insertions(+), 6 deletions(-)

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



diff --git a/README.md b/README.md
index 456f67d..ea5ad0e 100644
--- a/README.md
+++ b/README.md
@@ -16,7 +16,7 @@
 sudo npm install -g gulp bower
 cd frontend
 npm install
-bower install
+bower install --production
 ```
 
 While developing use `gulp serve` to preview changes and `gulp build` to
diff --git a/frontend/bower.json b/frontend/bower.json
index 65f8510..4db058a 100644
--- a/frontend/bower.json
+++ b/frontend/bower.json
@@ -15,10 +15,10 @@
 angular-local-storage: 0.2.x,
 angular-motion: ~0.4.2,
 angular-material: ~0.10.0,
-material-design-icons: ~2.0.0,
 ngInfiniteScroll: ~1.2.1
   },
   devDependencies: {
+material-design-icons: ~2.0.0,
 angular-mocks: ~1.4.0
   },
   resolutions: {
diff --git a/frontend/src/app/index.css b/frontend/src/app/index.css
index a7538bd..c9bbbf5 100644
--- a/frontend/src/app/index.css
+++ b/frontend/src/app/index.css
@@ -268,12 +268,12 @@
   font-family: 'Material Icons';
   font-style: normal;
   font-weight: 400;
-  src: url(//tools.wmflabs.org/crosswatch/fonts/MaterialIcons-Regular.eot); /* 
For IE6-8 */
+  src: 
url(//tools-static.wmflabs.org/cdnjs/ajax/libs/material-design-icons/2.0.0/iconfont/MaterialIcons-Regular.eot);
 /* For IE6-8 */
   src: local('Material Icons'),
   local('MaterialIcons-Regular'),
-  url(//tools.wmflabs.org/crosswatch/fonts/MaterialIcons-Regular.woff2) 
format('woff2'),
-  url(//tools.wmflabs.org/crosswatch/fonts/MaterialIcons-Regular.woff) 
format('woff'),
-  url(//tools.wmflabs.org/crosswatch/fonts/MaterialIcons-Regular.ttf) 
format('truetype');
+  
url(//tools-static.wmflabs.org/cdnjs/ajax/libs/material-design-icons/2.0.0/iconfont/MaterialIcons-Regular.woff2)
 format('woff2'),
+  
url(//tools-static.wmflabs.org/cdnjs/ajax/libs/material-design-icons/2.0.0/iconfont/MaterialIcons-Regular.woff)
 format('woff'),
+  
url(//tools-static.wmflabs.org/cdnjs/ajax/libs/material-design-icons/2.0.0/iconfont/MaterialIcons-Regular.ttf)
 format('truetype');
 }
 
 .material-icons {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie7768b827314dcc46013b88bdf86cea3924ec473
Gerrit-PatchSet: 1
Gerrit-Project: labs/tools/crosswatch
Gerrit-Branch: master
Gerrit-Owner: Sitic jan.leb...@online.de
Gerrit-Reviewer: Sitic jan.leb...@online.de

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


  1   2   >