[MediaWiki-commits] [Gerrit] API: Work around wfMangleFlashPolicy() - change (mediawiki/core)

2014-11-26 Thread Mglaser (Code Review)
Mglaser has uploaded a new change for review.

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

Change subject: API: Work around wfMangleFlashPolicy()
..

API: Work around wfMangleFlashPolicy()

The things wfMangleFlashPolicy() does to the output break things in the
API. For JSON we can work around it, while for PHP we just have to error
out. XML isn't affected because  are escaped anyway (unless something
somehow uses 'cross-domain-policy' as a tag name), and the rest are
going away soon so they're not worth the trouble.

Backport, originally committed by Brad Jorsch

Bug: 66776
Change-Id: Idc5f37bd778288a9cde572f081dc753d681ec354
---
M includes/api/ApiFormatJson.php
M includes/api/ApiFormatPhp.php
2 files changed, 27 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/56/175956/1

diff --git a/includes/api/ApiFormatJson.php b/includes/api/ApiFormatJson.php
index 6c5ad38..d9f9d46 100644
--- a/includes/api/ApiFormatJson.php
+++ b/includes/api/ApiFormatJson.php
@@ -63,6 +63,16 @@
$this-getIsHtml(),
$params['utf8'] ? FormatJson::ALL_OK : 
FormatJson::XMLMETA_OK
);
+
+   // Bug 66776: wfMangleFlashPolicy() is needed to avoid a nasty 
bug in
+   // Flash, but what it does isn't friendly for the API, so we 
need to
+   // work around it.
+   if ( preg_match( '/\\s*cross-domain-policy\s*\/i', $json ) ) {
+   $json = preg_replace(
+   '/\(\s*cross-domain-policy\s*)\/i', 
'\\u003C$1\\u003E', $json
+   );
+   }
+
$callback = $params['callback'];
if ( $callback !== null ) {
$callback = preg_replace( /[^][.\\'\\\_A-Za-z0-9]/, 
'', $callback );
diff --git a/includes/api/ApiFormatPhp.php b/includes/api/ApiFormatPhp.php
index b2d1f04..73ce80e 100644
--- a/includes/api/ApiFormatPhp.php
+++ b/includes/api/ApiFormatPhp.php
@@ -35,7 +35,23 @@
}
 
public function execute() {
-   $this-printText( serialize( $this-getResultData() ) );
+   $text = serialize( $this-getResultData() );
+
+   // Bug 66776: wfMangleFlashPolicy() is needed to avoid a nasty 
bug in
+   // Flash, but what it does isn't friendly for the API. There's 
nothing
+   // we can do here that isn't actively broken in some manner, so 
let's
+   // just be broken in a useful manner.
+   if ( $this-getConfig()-get( 'MangleFlashPolicy' ) 
+   in_array( 'wfOutputHandler', ob_list_handlers(), true ) 

+   preg_match( '/\\s*cross-domain-policy\s*\/i', $text )
+   ) {
+   $this-dieUsage(
+   'This response cannot be represented using 
format=php. See https://bugzilla.wikimedia.org/show_bug.cgi?id=66776',
+   'internalerror'
+   );
+   }
+
+   $this-printText( $text );
}
 
public function getDescription() {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idc5f37bd778288a9cde572f081dc753d681ec354
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: REL1_24
Gerrit-Owner: Mglaser gla...@hallowelt.biz

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


[MediaWiki-commits] [Gerrit] API: Work around wfMangleFlashPolicy() - change (mediawiki/core)

2014-11-26 Thread Mglaser (Code Review)
Mglaser has uploaded a new change for review.

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

Change subject: API: Work around wfMangleFlashPolicy()
..

API: Work around wfMangleFlashPolicy()

The things wfMangleFlashPolicy() does to the output break things in the
API. For JSON we can work around it, while for PHP we just have to error
out. XML isn't affected because  are escaped anyway (unless something
somehow uses 'cross-domain-policy' as a tag name), and the rest are
going away soon so they're not worth the trouble.

Backport, originally committed by Brad Jorsch

Bug: 66776
Change-Id: Idc5f37bd778288a9cde572f081dc753d681ec354
---
M includes/api/ApiFormatJson.php
M includes/api/ApiFormatPhp.php
2 files changed, 27 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/57/175957/1

diff --git a/includes/api/ApiFormatJson.php b/includes/api/ApiFormatJson.php
index 9673d6f..b222f74 100644
--- a/includes/api/ApiFormatJson.php
+++ b/includes/api/ApiFormatJson.php
@@ -63,6 +63,16 @@
$this-getIsHtml(),
$params['utf8'] ? FormatJson::ALL_OK : 
FormatJson::XMLMETA_OK
);
+
+   // Bug 66776: wfMangleFlashPolicy() is needed to avoid a nasty 
bug in
+   // Flash, but what it does isn't friendly for the API, so we 
need to
+   // work around it.
+   if ( preg_match( '/\\s*cross-domain-policy\s*\/i', $json ) ) {
+   $json = preg_replace(
+   '/\(\s*cross-domain-policy\s*)\/i', 
'\\u003C$1\\u003E', $json
+   );
+   }
+
$callback = $params['callback'];
if ( $callback !== null ) {
$callback = preg_replace( /[^][.\\'\\\_A-Za-z0-9]/, 
'', $callback );
diff --git a/includes/api/ApiFormatPhp.php b/includes/api/ApiFormatPhp.php
index b2d1f04..73ce80e 100644
--- a/includes/api/ApiFormatPhp.php
+++ b/includes/api/ApiFormatPhp.php
@@ -35,7 +35,23 @@
}
 
public function execute() {
-   $this-printText( serialize( $this-getResultData() ) );
+   $text = serialize( $this-getResultData() );
+
+   // Bug 66776: wfMangleFlashPolicy() is needed to avoid a nasty 
bug in
+   // Flash, but what it does isn't friendly for the API. There's 
nothing
+   // we can do here that isn't actively broken in some manner, so 
let's
+   // just be broken in a useful manner.
+   if ( $this-getConfig()-get( 'MangleFlashPolicy' ) 
+   in_array( 'wfOutputHandler', ob_list_handlers(), true ) 

+   preg_match( '/\\s*cross-domain-policy\s*\/i', $text )
+   ) {
+   $this-dieUsage(
+   'This response cannot be represented using 
format=php. See https://bugzilla.wikimedia.org/show_bug.cgi?id=66776',
+   'internalerror'
+   );
+   }
+
+   $this-printText( $text );
}
 
public function getDescription() {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idc5f37bd778288a9cde572f081dc753d681ec354
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: REL1_23
Gerrit-Owner: Mglaser gla...@hallowelt.biz

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


[MediaWiki-commits] [Gerrit] API: Work around wfMangleFlashPolicy() - change (mediawiki/core)

2014-11-26 Thread Mglaser (Code Review)
Mglaser has uploaded a new change for review.

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

Change subject: API: Work around wfMangleFlashPolicy()
..

API: Work around wfMangleFlashPolicy()

The things wfMangleFlashPolicy() does to the output break things in the
API. For JSON we can work around it, while for PHP we just have to error
out. XML isn't affected because  are escaped anyway (unless something
somehow uses 'cross-domain-policy' as a tag name), and the rest are
going away soon so they're not worth the trouble.

Backport, originally committed by Brad Jorsch

Bug: 66776
Change-Id: Idc5f37bd778288a9cde572f081dc753d681ec354
---
M includes/api/ApiFormatJson.php
M includes/api/ApiFormatPhp.php
2 files changed, 28 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/58/175958/1

diff --git a/includes/api/ApiFormatJson.php b/includes/api/ApiFormatJson.php
index 4140583..47d8212 100644
--- a/includes/api/ApiFormatJson.php
+++ b/includes/api/ApiFormatJson.php
@@ -62,6 +62,16 @@
$this-getIsHtml(),
$params['utf8'] ? FormatJson::ALL_OK : 
FormatJson::XMLMETA_OK
);
+
+   // Bug 66776: wfMangleFlashPolicy() is needed to avoid a nasty 
bug in
+   // Flash, but what it does isn't friendly for the API, so we 
need to
+   // work around it.
+   if ( preg_match( '/\\s*cross-domain-policy\s*\/i', $json ) ) {
+   $json = preg_replace(
+   '/\(\s*cross-domain-policy\s*)\/i', 
'\\u003C$1\\u003E', $json
+   );
+   }
+
$callback = $params['callback'];
if ( $callback !== null ) {
$callback = preg_replace( /[^][.\\'\\\_A-Za-z0-9]/, 
'', $callback );
diff --git a/includes/api/ApiFormatPhp.php b/includes/api/ApiFormatPhp.php
index b2d1f04..bda1c18 100644
--- a/includes/api/ApiFormatPhp.php
+++ b/includes/api/ApiFormatPhp.php
@@ -35,7 +35,24 @@
}
 
public function execute() {
-   $this-printText( serialize( $this-getResultData() ) );
+   global $wgMangleFlashPolicy;
+   $text = serialize( $this-getResultData() );
+
+   // Bug 66776: wfMangleFlashPolicy() is needed to avoid a nasty 
bug in
+   // Flash, but what it does isn't friendly for the API. There's 
nothing
+   // we can do here that isn't actively broken in some manner, so 
let's
+   // just be broken in a useful manner.
+   if ( $wgMangleFlashPolicy 
+   in_array( 'wfOutputHandler', ob_list_handlers(), true ) 

+   preg_match( '/\\s*cross-domain-policy\s*\/i', $text )
+   ) {
+   $this-dieUsage(
+   'This response cannot be represented using 
format=php. See https://bugzilla.wikimedia.org/show_bug.cgi?id=66776',
+   'internalerror'
+   );
+   }
+
+   $this-printText( $text );
}
 
public function getDescription() {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idc5f37bd778288a9cde572f081dc753d681ec354
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: REL1_22
Gerrit-Owner: Mglaser gla...@hallowelt.biz

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


[MediaWiki-commits] [Gerrit] Remove '@section LICENSE' - change (mediawiki/core)

2014-11-26 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Remove '@section LICENSE'
..


Remove '@section LICENSE'

This was used in 2 special classes, the logger classes and spread
to a few other random classes.

Afaik this has no meaning. Is for something we don't use, and
goes against the meaning of '@section' in Doxygen, which we do
use.

In Doxygen output, all LICENSE references became links to
ProfilerXhprof (the one Doxygen encoutered first).

Bug: T72328
Change-Id: Icc7c443245c70bc0f549bee7d105eef5691c864d
---
M includes/debug/logger/Logger.php
M includes/debug/logger/NullSpi.php
M includes/debug/logger/Spi.php
M includes/debug/logger/legacy/Logger.php
M includes/debug/logger/legacy/Spi.php
M includes/debug/logger/monolog/Handler.php
M includes/debug/logger/monolog/LegacyFormatter.php
M includes/debug/logger/monolog/Processor.php
M includes/debug/logger/monolog/Spi.php
M includes/libs/IPSet.php
M includes/libs/ObjectFactory.php
M includes/libs/Xhprof.php
M includes/profiler/ProfilerXhprof.php
M includes/specials/SpecialFilepath.php
M includes/specials/SpecialRedirect.php
M maintenance/purgeChangedFiles.php
M maintenance/purgeChangedPages.php
M tests/phpunit/includes/db/DatabaseMysqlBaseTest.php
M tests/phpunit/includes/db/LBFactoryTest.php
M tests/phpunit/includes/debug/logging/legacy/LoggerTest.php
M tests/phpunit/includes/libs/ObjectFactoryTest.php
M tests/phpunit/includes/libs/XhprofTest.php
22 files changed, 0 insertions(+), 24 deletions(-)

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



diff --git a/includes/debug/logger/Logger.php b/includes/debug/logger/Logger.php
index f5d2445..7417c6b 100644
--- a/includes/debug/logger/Logger.php
+++ b/includes/debug/logger/Logger.php
@@ -1,6 +1,5 @@
 ?php
 /**
- * @section LICENSE
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
diff --git a/includes/debug/logger/NullSpi.php 
b/includes/debug/logger/NullSpi.php
index 33304fc..f725b64 100644
--- a/includes/debug/logger/NullSpi.php
+++ b/includes/debug/logger/NullSpi.php
@@ -1,6 +1,5 @@
 ?php
 /**
- * @section LICENSE
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
diff --git a/includes/debug/logger/Spi.php b/includes/debug/logger/Spi.php
index 7139856..cd4af9c 100644
--- a/includes/debug/logger/Spi.php
+++ b/includes/debug/logger/Spi.php
@@ -1,6 +1,5 @@
 ?php
 /**
- * @section LICENSE
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
diff --git a/includes/debug/logger/legacy/Logger.php 
b/includes/debug/logger/legacy/Logger.php
index c67bd7b..e7c69b8 100644
--- a/includes/debug/logger/legacy/Logger.php
+++ b/includes/debug/logger/legacy/Logger.php
@@ -1,6 +1,5 @@
 ?php
 /**
- * @section LICENSE
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
diff --git a/includes/debug/logger/legacy/Spi.php 
b/includes/debug/logger/legacy/Spi.php
index a3d34fa..b8813aa 100644
--- a/includes/debug/logger/legacy/Spi.php
+++ b/includes/debug/logger/legacy/Spi.php
@@ -1,6 +1,5 @@
 ?php
 /**
- * @section LICENSE
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
diff --git a/includes/debug/logger/monolog/Handler.php 
b/includes/debug/logger/monolog/Handler.php
index b2e3012..42ab797 100644
--- a/includes/debug/logger/monolog/Handler.php
+++ b/includes/debug/logger/monolog/Handler.php
@@ -1,6 +1,5 @@
 ?php
 /**
- * @section LICENSE
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
diff --git a/includes/debug/logger/monolog/LegacyFormatter.php 
b/includes/debug/logger/monolog/LegacyFormatter.php
index 11dbc82..c9545fa 100644
--- a/includes/debug/logger/monolog/LegacyFormatter.php
+++ b/includes/debug/logger/monolog/LegacyFormatter.php
@@ -1,6 +1,5 @@
 ?php
 /**
- * @section LICENSE
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of 

[MediaWiki-commits] [Gerrit] Pass TermLookup, not EntityLookup into WikibaseValueFormatte... - change (mediawiki...Wikibase)

2014-11-26 Thread Adrian Lang (Code Review)
Adrian Lang has uploaded a new change for review.

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

Change subject: Pass TermLookup, not EntityLookup into 
WikibaseValueFormattersBuilders
..

Pass TermLookup, not EntityLookup into WikibaseValueFormattersBuilders

Change-Id: I5ff3d9f96f9496866a4026939b01cf59e9cd5592
---
M client/includes/WikibaseClient.php
M lib/includes/formatters/WikibaseValueFormatterBuilders.php
M lib/tests/phpunit/formatters/WikibaseSnakFormatterBuildersTest.php
M lib/tests/phpunit/formatters/WikibaseValueFormatterBuildersTest.php
M repo/includes/WikibaseRepo.php
5 files changed, 45 insertions(+), 28 deletions(-)


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

diff --git a/client/includes/WikibaseClient.php 
b/client/includes/WikibaseClient.php
index 7c3ebd1..97d6764 100644
--- a/client/includes/WikibaseClient.php
+++ b/client/includes/WikibaseClient.php
@@ -45,6 +45,7 @@
 use Wikibase\Lib\Serializers\ForbiddenSerializer;
 use Wikibase\Lib\Store\EntityContentDataCodec;
 use Wikibase\Lib\Store\EntityLookup;
+use Wikibase\Lib\Store\EntityRetrievingTermLookup;
 use Wikibase\Lib\WikibaseDataTypeBuilders;
 use Wikibase\Lib\WikibaseSnakFormatterBuilders;
 use Wikibase\Lib\WikibaseValueFormatterBuilders;
@@ -200,6 +201,13 @@
 */
private function getEntityLookup() {
return $this-getStore()-getEntityLookup();
+   }
+
+   /**
+* @return TermLookup
+*/
+   private function getTermLookup() {
+   return new EntityRetrievingTermLookup( $this-getEntityLookup() 
);
}
 
/**
@@ -465,7 +473,7 @@
 */
private function newSnakFormatterFactory() {
$valueFormatterBuilders = new WikibaseValueFormatterBuilders(
-   $this-getEntityLookup(),
+   $this-getTermLookup(),
$this-contentLanguage
);
 
@@ -497,7 +505,7 @@
 */
private function newValueFormatterFactory() {
$builders = new WikibaseValueFormatterBuilders(
-   $this-getEntityLookup(),
+   $this-getTermLookup(),
$this-contentLanguage
);
 
diff --git a/lib/includes/formatters/WikibaseValueFormatterBuilders.php 
b/lib/includes/formatters/WikibaseValueFormatterBuilders.php
index 5596a21..df49be9 100644
--- a/lib/includes/formatters/WikibaseValueFormatterBuilders.php
+++ b/lib/includes/formatters/WikibaseValueFormatterBuilders.php
@@ -13,8 +13,7 @@
 use ValueFormatters\ValueFormatter;
 use Wikibase\LanguageFallbackChain;
 use Wikibase\LanguageFallbackChainFactory;
-use Wikibase\Lib\Store\EntityLookup;
-use Wikibase\Lib\Store\EntityRetrievingTermLookup;
+use Wikibase\Lib\Store\TermLookup;
 use Wikibase\Lib\Store\EntityTitleLookup;
 use Wikibase\Lib\Store\LanguageFallbackLabelLookup;
 use Wikibase\Lib\Store\LanguageLabelLookup;
@@ -30,9 +29,9 @@
 class WikibaseValueFormatterBuilders {
 
/**
-* @var EntityLookup
+* @var TermLookup
 */
-   private $entityLookup;
+   private $termLookup;
 
/**
 * @var Language
@@ -112,11 +111,11 @@
);
 
public function __construct(
-   EntityLookup $entityLookup,
+   TermLookup $termLookup,
Language $defaultLanguage,
EntityTitleLookup $entityTitleLookup = null
) {
-   $this-entityLookup = $entityLookup;
+   $this-termLookup = $termLookup;
$this-defaultLanguage = $defaultLanguage;
$this-entityTitleLookup = $entityTitleLookup;
}
@@ -509,7 +508,7 @@
FormatterOptions $options,
WikibaseValueFormatterBuilders $builders
) {
-   $termLookup = new EntityRetrievingTermLookup( 
$builders-entityLookup );
+   $termLookup = $builders-termLookup;
 
// @fixme inject the label lookup
if ( $options-hasOption( 'languages' ) ) {
diff --git a/lib/tests/phpunit/formatters/WikibaseSnakFormatterBuildersTest.php 
b/lib/tests/phpunit/formatters/WikibaseSnakFormatterBuildersTest.php
index 073e35d..b31e20e 100644
--- a/lib/tests/phpunit/formatters/WikibaseSnakFormatterBuildersTest.php
+++ b/lib/tests/phpunit/formatters/WikibaseSnakFormatterBuildersTest.php
@@ -57,18 +57,14 @@
return new DataType( $id, $typeMap[$id], 
array() );
} ) );
 
-   $entity = EntityFactory::singleton()-newEmpty( 
$entityId-getEntityType() );
-   $entity-setId( $entityId );
-   $entity-setLabel( 'en', 'Label for ' . 
$entityId-getSerialization() );
-
-   $entityLookup = $this-getMock( 
'Wikibase\Lib\Store\EntityLookup' );
-   $entityLookup-expects( $this-any() )
-   

[MediaWiki-commits] [Gerrit] API: Work around wfMangleFlashPolicy() - change (mediawiki/core)

2014-11-26 Thread Mglaser (Code Review)
Mglaser has uploaded a new change for review.

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

Change subject: API: Work around wfMangleFlashPolicy()
..

API: Work around wfMangleFlashPolicy()

The things wfMangleFlashPolicy() does to the output break things in the
API. For JSON we can work around it, while for PHP we just have to error
out. XML isn't affected because  are escaped anyway (unless something
somehow uses 'cross-domain-policy' as a tag name), and the rest are
going away soon so they're not worth the trouble.

Backport, originally committed by Brad Jorsch

Bug: 66776
Change-Id: Idc5f37bd778288a9cde572f081dc753d681ec354
---
M includes/api/ApiFormatJson.php
M includes/api/ApiFormatPhp.php
2 files changed, 31 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/60/175960/1

diff --git a/includes/api/ApiFormatJson.php b/includes/api/ApiFormatJson.php
index 6a13fa1..6f50526 100644
--- a/includes/api/ApiFormatJson.php
+++ b/includes/api/ApiFormatJson.php
@@ -67,9 +67,21 @@
$prefix = ( /**/$prefix );
$suffix = ')';
}
+
+   $json = FormatJson::encode( $this-getResultData(), 
$this-getIsHtml() );
+
+   // Bug 66776: wfMangleFlashPolicy() is needed to avoid a nasty 
bug in
+   // Flash, but what it does isn't friendly for the API, so we 
need to
+   // work around it.
+   if ( preg_match( '/\\s*cross-domain-policy\s*\/i', $json ) ) {
+   $json = preg_replace(
+   '/\(\s*cross-domain-policy\s*)\/i', 
'\\u003C$1\\u003E', $json
+   );
+   }
+
$this-printText(
$prefix .
-   FormatJson::encode( $this-getResultData(), 
$this-getIsHtml() ) .
+   $json .
$suffix
);
}
diff --git a/includes/api/ApiFormatPhp.php b/includes/api/ApiFormatPhp.php
index 60552c4..67ed6ad 100644
--- a/includes/api/ApiFormatPhp.php
+++ b/includes/api/ApiFormatPhp.php
@@ -39,7 +39,24 @@
}
 
public function execute() {
-   $this-printText( serialize( $this-getResultData() ) );
+   global $wgMangleFlashPolicy;
+   $text = serialize( $this-getResultData() );
+
+   // Bug 66776: wfMangleFlashPolicy() is needed to avoid a nasty 
bug in
+   // Flash, but what it does isn't friendly for the API. There's 
nothing
+   // we can do here that isn't actively broken in some manner, so 
let's
+   // just be broken in a useful manner.
+   if ( $wgMangleFlashPolicy 
+   in_array( 'wfOutputHandler', ob_list_handlers(), true ) 

+   preg_match( '/\\s*cross-domain-policy\s*\/i', $text )
+   ) {
+   $this-dieUsage(
+   'This response cannot be represented using 
format=php. See https://bugzilla.wikimedia.org/show_bug.cgi?id=66776',
+   'internalerror'
+   );
+   }
+
+   $this-printText( $text );
}
 
public function getDescription() {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idc5f37bd778288a9cde572f081dc753d681ec354
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: REL1_19
Gerrit-Owner: Mglaser gla...@hallowelt.biz

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


[MediaWiki-commits] [Gerrit] Add leafo/lessphp to match master - change (translatewiki)

2014-11-26 Thread Nikerabbit (Code Review)
Nikerabbit has uploaded a new change for review.

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

Change subject: Add leafo/lessphp to match master
..

Add leafo/lessphp to match master

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


  git pull ssh://gerrit.wikimedia.org:29418/translatewiki 
refs/changes/61/175961/1

diff --git a/composer.json b/composer.json
index bc90346..d48873a 100644
--- a/composer.json
+++ b/composer.json
@@ -2,6 +2,7 @@
require: {
cdb/cdb: ~1.0,
cssjanus/cssjanus: ~1.1,
+   leafo/lessphp: ~0.5,
psr/log: 1.0.0,
mediawiki/semantic-media-wiki: @dev,
mediawiki/semantic-maps: @dev

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I47c1e0f32f5c647c326138f5653cd5829f430e17
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
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] Add leafo/lessphp to match master - change (translatewiki)

2014-11-26 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Add leafo/lessphp to match master
..


Add leafo/lessphp to match master

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

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



diff --git a/composer.json b/composer.json
index bc90346..d48873a 100644
--- a/composer.json
+++ b/composer.json
@@ -2,6 +2,7 @@
require: {
cdb/cdb: ~1.0,
cssjanus/cssjanus: ~1.1,
+   leafo/lessphp: ~0.5,
psr/log: 1.0.0,
mediawiki/semantic-media-wiki: @dev,
mediawiki/semantic-maps: @dev

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I47c1e0f32f5c647c326138f5653cd5829f430e17
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Nikerabbit niklas.laxst...@gmail.com
Gerrit-Reviewer: Nikerabbit niklas.laxst...@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] realm: remove pmtpa, add codfw - change (operations/puppet)

2014-11-26 Thread Faidon Liambotis (Code Review)
Faidon Liambotis has submitted this change and it was merged.

Change subject: realm: remove pmtpa, add codfw
..


realm: remove pmtpa, add codfw

208.80.152.0/24 is codfw now and pmtpa's private address space is gone.

Change-Id: If6c4dbb88704cd4aa336027bf2fee0daf4b55e3e
---
M manifests/realm.pp
1 file changed, 2 insertions(+), 3 deletions(-)

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



diff --git a/manifests/realm.pp b/manifests/realm.pp
index 01bbc47..add52af 100644
--- a/manifests/realm.pp
+++ b/manifests/realm.pp
@@ -24,10 +24,9 @@
 }
 
 $site = $main_ipaddress ? {
-/^208\.80\.152\./ = 'pmtpa',
+/^208\.80\.152\./ = 'codfw',
 /^208\.80\.153\./ = 'codfw',
 /^208\.80\.15[45]\./  = 'eqiad',
-/^10\.[0-4]\./= 'pmtpa',
 /^10\.6[48]\./= 'eqiad',
 /^10\.192\./  = 'codfw',
 /^91\.198\.174\./ = 'esams',
@@ -55,7 +54,7 @@
 'codfw' = [ '208.80.153.254', '208.80.154.239' ], # codfw - codfw, eqiad
 'ulsfo' = [ '208.80.154.239', '208.80.153.254' ], # ulsfo - eqiad, codfw
 'esams' = [ '91.198.174.6',   '208.80.154.239' ], # esams - esams 
(nescio, not LVS), eqiad
-default = [ '208.80.154.239', '208.80.153.254' ], # pmtpa? - eqiad, codfw
+default = [ '208.80.154.239', '208.80.153.254' ], #   - eqiad, codfw
 }
 $domain_search = $domain
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If6c4dbb88704cd4aa336027bf2fee0daf4b55e3e
Gerrit-PatchSet: 5
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn dz...@wikimedia.org
Gerrit-Reviewer: BBlack bbl...@wikimedia.org
Gerrit-Reviewer: Dzahn dz...@wikimedia.org
Gerrit-Reviewer: Faidon Liambotis fai...@wikimedia.org
Gerrit-Reviewer: John F. Lewis johnflewi...@gmail.com
Gerrit-Reviewer: Matanya mata...@foss.co.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] geoip: kill geoliteupdate in favor of geoipupdate - change (operations/puppet)

2014-11-26 Thread Faidon Liambotis (Code Review)
Faidon Liambotis has submitted this change and it was merged.

Change subject: geoip: kill geoliteupdate in favor of geoipupdate
..


geoip: kill geoliteupdate in favor of geoipupdate

MaxMind's geoipupdate mechanism has a hidden feature that MaxMind
themselves pointed me to: GeoLite databases have their own
updates.maxmind.com product codes and there is a special UserID of
99 with a LicenseKey of  that has privileges to download
them.

Kill geoliteupdate in favor of using geoipupdate across the board. This
brings us a similar update mechanism for production  Labs, plus a
better program to fetch updates, as this one also does MD5 checks etc.

Change-Id: I34fb5b2d5253a9161d3c86c2e92375049c241775
---
D modules/geoip/files/geoliteupdate
D modules/geoip/manifests/data/lite.pp
M modules/geoip/manifests/data/maxmind.pp
M modules/puppet/manifests/self/geoip.pp
M modules/puppetmaster/manifests/geoip.pp
5 files changed, 47 insertions(+), 149 deletions(-)

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



diff --git a/modules/geoip/files/geoliteupdate 
b/modules/geoip/files/geoliteupdate
deleted file mode 100644
index a5e1792..000
--- a/modules/geoip/files/geoliteupdate
+++ /dev/null
@@ -1,72 +0,0 @@
-#!/bin/sh
-
-# This is based on geoip-database-contrib_update from Debian's
-# geoip-database-contrib package. The original source can be found at
-# http://git.debian.org/?p=collab-maint/geoip-database-contrib.git
-# and is
-# Copyright: 2010/2013, Ludovico Cavedon cave...@debian.org
-#   Patrick Matthäi pmatth...@debian.org
-# License: GPL-2+
-#
-# It was modified by Faidon Liambotis for use by the Wikimedia Foundation
-
-DESTDIR=$1
-if [ ! -d $DESTDIR ]; then
-   echo Usage: $0 destdir
-   exit 1
-fi
-
-GEOIP_URL=http://geolite.maxmind.com/download/geoip/database;
-
-FAILED=0
-
-for url in \
-$GEOIP_URL/GeoLiteCountry/GeoIP.dat.gz \
-$GEOIP_URL/GeoIPv6.dat.gz \
-$GEOIP_URL/GeoLiteCity.dat.gz \
-$GEOIP_URL/GeoLiteCityv6-beta/GeoLiteCityv6.dat.gz \
-$GEOIP_URL/asnum/GeoIPASNum.dat.gz \
-$GEOIP_URL/asnum/GeoIPASNumv6.dat.gz \
-$GEOIP_URL/GeoLite2-Country \
-$GEOIP_URL/GeoLite2-City.mmdb.gz
-do
-echo Downloading: $url
-
-# Download file in the same directory as the final one so that the mv
-# below can be atomic.
-TEMPGZ=$(mktemp --tmpdir=$DESTDIR/ --suffix=.gz)
-TEMP=${TEMPGZ%.gz}
-FILEGZ=$(basename $url)
-FILE=${FILEGZ%.gz}
-
-# MaxMind is being totally inconsistent and names both GeoIP Country and
-# GeoLite Country with the same file. Explicitly rename this to
-# GeoLite.dat, so that we can happily coexist with geoipupdate.
-case $FILE in
-GeoIP.dat)
-FILE=GeoLite.dat
-;;
-esac
-
-/usr/bin/wget -q -t3 -T15 $url -O $TEMPGZ
-
-if [ $? != 0 ]
-then
-echo Failed to download $url
-else
-/bin/gunzip -f $TEMPGZ
-
-if [ $? != 0 ]
-then
-echo Failed to decompress $FILEGZ
-else
-rm -f $DESTDIR/$FILE
-mv $TEMP $DESTDIR/$FILE
-chmod 644 $DESTDIR/$FILE
-fi
-fi
-
-rm -f $TEMP $TEMPGZ
-done
-
-exit 0
diff --git a/modules/geoip/manifests/data/lite.pp 
b/modules/geoip/manifests/data/lite.pp
deleted file mode 100644
index e78ad21..000
--- a/modules/geoip/manifests/data/lite.pp
+++ /dev/null
@@ -1,55 +0,0 @@
-# == Class geoip::data::lite
-# Installs Maxmind GeoLite database files by downloading them from Maxmind with
-# a wget wrapper script. This also installs a cron job to do this weekly.
-#
-# == Parameters
-# $data_directory - Where the data files should live.
-# $environment- The environment parameter to pass to exec and cron for the
-#   geoliteupdate download command. default: undef
-
-class geoip::data::lite(
-  $data_directory = '/usr/share/GeoIP',
-  $environment= undef)
-{
-  if ! defined(File[$data_directory]) {
-file { $data_directory:
-  ensure = directory,
-}
-  }
-
-  file { '/usr/local/bin/geoliteupdate':
-ensure = present,
-mode   = '0555',
-owner  = 'root',
-group  = 'root',
-source = 'puppet:///modules/geoip/geoliteupdate',
-  }
-
-  $geoliteupdate_command = /usr/local/bin/geoliteupdate ${data_directory}
-
-  # run once on the first instantiation of this class
-  exec { 'geoliteupdate':
-command = $geoliteupdate_command,
-refreshonly = true,
-subscribe   = File['/usr/local/bin/geoliteupdate'],
-require = File[$data_directory],
-  }
-
-  # Set up a cron to run geoliteupdate weekly.
-  cron { 'geoliteupdate':
-ensure  = present,
-command = ${geoliteupdate_command}  /dev/null,
-user= 'root',
-weekday = 0,
-hour= 3,
-minute  = 30,
-require = File[$data_directory],
-  }
-
-  # if $environment was 

[MediaWiki-commits] [Gerrit] add mw_json_encode and mw_json_decode functions (v 3.3.3) - change (mediawiki...PhpTagsFunctions)

2014-11-26 Thread Pastakhov (Code Review)
Pastakhov has uploaded a new change for review.

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

Change subject: add mw_json_encode and mw_json_decode functions (v 3.3.3)
..

add mw_json_encode and mw_json_decode functions (v 3.3.3)

Change-Id: I2e73a93ddb9d31a241dc3822bee571e4e59a8562
---
M PhpTagsFunctions.init.php
M PhpTagsFunctions.php
M includes/PhpTagsFuncUseful.php
M tests/phpunit/PhpTagsFunctions_Array_Test.php
M tests/phpunit/PhpTagsFunctions_Useful_Test.php
5 files changed, 71 insertions(+), 1 deletion(-)


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

diff --git a/PhpTagsFunctions.init.php b/PhpTagsFunctions.init.php
index 6630c49..2eb1ed0 100644
--- a/PhpTagsFunctions.init.php
+++ b/PhpTagsFunctions.init.php
@@ -604,6 +604,8 @@
private static function getFuncUseful() {
return array(
'uuid_create',
+   'mw_json_decode',
+   'mw_json_encode',
);
}
 
diff --git a/PhpTagsFunctions.php b/PhpTagsFunctions.php
index b87d823..6946137 100644
--- a/PhpTagsFunctions.php
+++ b/PhpTagsFunctions.php
@@ -33,7 +33,7 @@
);
 }
 
-const PHPTAGS_FUNCTIONS_VERSION = '3.3.2';
+const PHPTAGS_FUNCTIONS_VERSION = '3.3.3';
 
 // Register this extension on Special:Version
 $wgExtensionCredits['phptags'][] = array(
diff --git a/includes/PhpTagsFuncUseful.php b/includes/PhpTagsFuncUseful.php
index 02e30e3..a12135d 100644
--- a/includes/PhpTagsFuncUseful.php
+++ b/includes/PhpTagsFuncUseful.php
@@ -32,4 +32,12 @@
mt_rand( 0, 0x ), mt_rand( 0, 0x ), 
mt_rand( 0, 0x )
);
}
+
+   public static function f_mw_json_decode( $value ) {
+   return \FormatJson::decode( $value, true );
+   }
+
+   public static function f_mw_json_encode( $value ) {
+   return \FormatJson::encode( $value, false, \FormatJson::UTF8_OK 
);
+   }
 }
diff --git a/tests/phpunit/PhpTagsFunctions_Array_Test.php 
b/tests/phpunit/PhpTagsFunctions_Array_Test.php
index 62867e6..529a963 100644
--- a/tests/phpunit/PhpTagsFunctions_Array_Test.php
+++ b/tests/phpunit/PhpTagsFunctions_Array_Test.php
@@ -717,6 +717,15 @@
array('fruit1br /', 'fruit4br /', 
'fruit5br /')
);
}
+   public function testRun_echo_while_function_1() {
+   $this-assertEquals(
+   Runtime::runSource('
+$foo = [1,2];
+while ( count($foo)  4 ) array_push($foo, 8);
+echo $foo == [1,2,8,8] ? true : false;'),
+   array('true')
+   );
+   }
 
public function testRun_in_array_1() {
$this-assertEquals(
@@ -838,4 +847,41 @@
);
}
 
+   public function testRun_echo_if_else_simple_function_1() {
+   $this-assertEquals(
+   Runtime::runSource('$foo = [1,2,3]; if ( true ) 
array_pop($foo); else array_push($foo, 4); echo  $foo == [1,2] ? true : 
false;'),
+   array('true')
+   );
+   }
+   public function testRun_echo_if_else_simple_function__2() {
+   $this-assertEquals(
+   Runtime::runSource('$foo = [1,2,3]; if ( false 
) array_pop($foo); else array_push($foo, 4); echo  $foo == [1,2,3,4] ? true : 
false;'),
+   array('true')
+   );
+   }
+   public function testRun_echo_if_else_simple_function__3() {
+   $this-assertEquals(
+   Runtime::runSource('$foo = [1,2,3]; if ( true ) 
array_pop($foo); else array_push($foo, 4); echo  $foo == [1,2] ? true : 
false; echo  always!;'),
+   array('true', ' always!')
+   );
+   }
+   public function testRun_echo_if_else_simple_function__4() {
+   $this-assertEquals(
+   Runtime::runSource('$foo = [1,2,3]; if ( false 
) array_pop($foo); else array_push($foo, 4); echo  $foo == [1,2,3,4] ? true : 
false; echo  always!;'),
+   array('true', ' always!')
+   );
+   }
+   public function testRun_echo_if_else_simple_variable_1() {
+   $this-assertEquals(
+   Runtime::runSource('if ( true ) $foo=true; 
else $foo=false; echo  $foo;'),
+   array('true')
+   );
+   }
+   public function testRun_echo_if_else_simple_variable_2() {
+   $this-assertEquals(
+   Runtime::runSource('if ( false ) $foo=true; 
else $foo=false; echo  $foo;'),
+  

[MediaWiki-commits] [Gerrit] add mw_json_encode and mw_json_decode functions (v 3.3.3) - change (mediawiki...PhpTagsFunctions)

2014-11-26 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: add mw_json_encode and mw_json_decode functions (v 3.3.3)
..


add mw_json_encode and mw_json_decode functions (v 3.3.3)

Change-Id: I2e73a93ddb9d31a241dc3822bee571e4e59a8562
---
M PhpTagsFunctions.init.php
M PhpTagsFunctions.php
M includes/PhpTagsFuncUseful.php
M tests/phpunit/PhpTagsFunctions_Array_Test.php
M tests/phpunit/PhpTagsFunctions_Useful_Test.php
5 files changed, 71 insertions(+), 1 deletion(-)

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



diff --git a/PhpTagsFunctions.init.php b/PhpTagsFunctions.init.php
index 6630c49..2eb1ed0 100644
--- a/PhpTagsFunctions.init.php
+++ b/PhpTagsFunctions.init.php
@@ -604,6 +604,8 @@
private static function getFuncUseful() {
return array(
'uuid_create',
+   'mw_json_decode',
+   'mw_json_encode',
);
}
 
diff --git a/PhpTagsFunctions.php b/PhpTagsFunctions.php
index b87d823..6946137 100644
--- a/PhpTagsFunctions.php
+++ b/PhpTagsFunctions.php
@@ -33,7 +33,7 @@
);
 }
 
-const PHPTAGS_FUNCTIONS_VERSION = '3.3.2';
+const PHPTAGS_FUNCTIONS_VERSION = '3.3.3';
 
 // Register this extension on Special:Version
 $wgExtensionCredits['phptags'][] = array(
diff --git a/includes/PhpTagsFuncUseful.php b/includes/PhpTagsFuncUseful.php
index 02e30e3..a12135d 100644
--- a/includes/PhpTagsFuncUseful.php
+++ b/includes/PhpTagsFuncUseful.php
@@ -32,4 +32,12 @@
mt_rand( 0, 0x ), mt_rand( 0, 0x ), 
mt_rand( 0, 0x )
);
}
+
+   public static function f_mw_json_decode( $value ) {
+   return \FormatJson::decode( $value, true );
+   }
+
+   public static function f_mw_json_encode( $value ) {
+   return \FormatJson::encode( $value, false, \FormatJson::UTF8_OK 
);
+   }
 }
diff --git a/tests/phpunit/PhpTagsFunctions_Array_Test.php 
b/tests/phpunit/PhpTagsFunctions_Array_Test.php
index 62867e6..529a963 100644
--- a/tests/phpunit/PhpTagsFunctions_Array_Test.php
+++ b/tests/phpunit/PhpTagsFunctions_Array_Test.php
@@ -717,6 +717,15 @@
array('fruit1br /', 'fruit4br /', 
'fruit5br /')
);
}
+   public function testRun_echo_while_function_1() {
+   $this-assertEquals(
+   Runtime::runSource('
+$foo = [1,2];
+while ( count($foo)  4 ) array_push($foo, 8);
+echo $foo == [1,2,8,8] ? true : false;'),
+   array('true')
+   );
+   }
 
public function testRun_in_array_1() {
$this-assertEquals(
@@ -838,4 +847,41 @@
);
}
 
+   public function testRun_echo_if_else_simple_function_1() {
+   $this-assertEquals(
+   Runtime::runSource('$foo = [1,2,3]; if ( true ) 
array_pop($foo); else array_push($foo, 4); echo  $foo == [1,2] ? true : 
false;'),
+   array('true')
+   );
+   }
+   public function testRun_echo_if_else_simple_function__2() {
+   $this-assertEquals(
+   Runtime::runSource('$foo = [1,2,3]; if ( false 
) array_pop($foo); else array_push($foo, 4); echo  $foo == [1,2,3,4] ? true : 
false;'),
+   array('true')
+   );
+   }
+   public function testRun_echo_if_else_simple_function__3() {
+   $this-assertEquals(
+   Runtime::runSource('$foo = [1,2,3]; if ( true ) 
array_pop($foo); else array_push($foo, 4); echo  $foo == [1,2] ? true : 
false; echo  always!;'),
+   array('true', ' always!')
+   );
+   }
+   public function testRun_echo_if_else_simple_function__4() {
+   $this-assertEquals(
+   Runtime::runSource('$foo = [1,2,3]; if ( false 
) array_pop($foo); else array_push($foo, 4); echo  $foo == [1,2,3,4] ? true : 
false; echo  always!;'),
+   array('true', ' always!')
+   );
+   }
+   public function testRun_echo_if_else_simple_variable_1() {
+   $this-assertEquals(
+   Runtime::runSource('if ( true ) $foo=true; 
else $foo=false; echo  $foo;'),
+   array('true')
+   );
+   }
+   public function testRun_echo_if_else_simple_variable_2() {
+   $this-assertEquals(
+   Runtime::runSource('if ( false ) $foo=true; 
else $foo=false; echo  $foo;'),
+   array('false')
+   );
+   

[MediaWiki-commits] [Gerrit] Request csrf tokens in JS when supported - change (mediawiki...Translate)

2014-11-26 Thread Nikerabbit (Code Review)
Nikerabbit has uploaded a new change for review.

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

Change subject: Request csrf tokens in JS when supported
..

Request csrf tokens in JS when supported

Change-Id: I4a7d027f16ef56808748cfa83c6e9cad12e4b669
---
M Translate.php
M resources/js/ext.translate.proofread.js
M resources/js/ext.translate.special.managetranslatorsandbox.js
M resources/js/ext.translate.translationstashstorage.js
4 files changed, 23 insertions(+), 11 deletions(-)


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

diff --git a/Translate.php b/Translate.php
index b30d609..5596a53 100644
--- a/Translate.php
+++ b/Translate.php
@@ -179,6 +179,10 @@
'TranslateHooks::hideRestrictedFromStats';
 
 $GLOBALS['wgHooks']['MakeGlobalVariablesScript'][] = 
'TranslateHooks::addConfig';
+// BC for = MW 1.23
+$GLOBALS['wgHooks']['ResourceLoaderGetConfigVars'][] = function ( $vars ) {
+   $vars['wgTranslateSupportsCsrfToken'] = class_exists( 'ApiQueryTokens' 
);
+};
 
 // Sandbox
 $GLOBALS['wgDefaultUserOptions']['translate-sandbox'] = '';
diff --git a/resources/js/ext.translate.proofread.js 
b/resources/js/ext.translate.proofread.js
index cac69e6..c5579c2 100644
--- a/resources/js/ext.translate.proofread.js
+++ b/resources/js/ext.translate.proofread.js
@@ -186,7 +186,7 @@
 * Mark this message as proofread.
 */
proofread: function () {
-   var reviews, counter, params,
+   var reviews, counter, params, token,
message = this.message,
$message = this.$message;
 
@@ -199,7 +199,9 @@
params.assert = 'user';
}
 
-   new mw.Api().postWithToken( 'translationreview', params 
).done( function () {
+   token = mw.config.get( 'wgTranslateSupportsCsrfToken' ) 
? 'csrf' : 'translationreview';
+
+   new mw.Api().postWithToken( token, params ).done( 
function () {
$message.find( '.tux-proofread-action' 
).addClass( 'accepted' );
 
counter = $message.find( '.tux-proofread-count' 
);
diff --git a/resources/js/ext.translate.special.managetranslatorsandbox.js 
b/resources/js/ext.translate.special.managetranslatorsandbox.js
index 3607ea9..00b1479 100644
--- a/resources/js/ext.translate.special.managetranslatorsandbox.js
+++ b/resources/js/ext.translate.special.managetranslatorsandbox.js
@@ -26,12 +26,12 @@
}
 
function doApiAction( options ) {
-   var api = new mw.Api();
+   var token;
 
+   token = mw.config.get( 'wgTranslateSupportsCsrfToken' ) ? 
'csrf' : 'translatesandbox';
options = $.extend( {}, { action: 'translatesandbox' }, options 
);
 
-   return api.postWithToken( 'translatesandbox', options )
-   .promise();
+   return (new mw.Api()).postWithToken( token, options ).promise();
}
 
function removeSelectedRequests() {
diff --git a/resources/js/ext.translate.translationstashstorage.js 
b/resources/js/ext.translate.translationstashstorage.js
index fb24b36..1c3ed67 100644
--- a/resources/js/ext.translate.translationstashstorage.js
+++ b/resources/js/ext.translate.translationstashstorage.js
@@ -20,14 +20,17 @@
 * @return {jQuery.Promise}
 */
save: function ( title, translation ) {
-   var deferred = new mw.Api().postWithToken( 
'translationstash', {
+   var token;
+
+   token = mw.config.get( 'wgTranslateSupportsCsrfToken' ) 
? 'csrf' : 'translationstash';
+   options = {
action: 'translationstash',
subaction: 'add',
title: title,
translation: translation
-   } );
+   };
 
-   return deferred.promise();
+   return (new mw.Api()).postWithToken( token, options 
).promise();
},
 
/**
@@ -35,13 +38,16 @@
 * @return {jQuery.Promise}
 */
getUserTranslations: function ( user ) {
-   var deferred = new mw.Api().postWithToken( 
'translationstash', {
+   var token;
+
+   token = mw.config.get( 'wgTranslateSupportsCsrfToken' ) 
? 'csrf' : 'translationstash';
+   options = {
action: 'translationstash',
subaction: 'query',
username: user
-   } );
+ 

[MediaWiki-commits] [Gerrit] shinken: Add checks for labs infrastructure - change (operations/puppet)

2014-11-26 Thread Yuvipanda (Code Review)
Yuvipanda has uploaded a new change for review.

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

Change subject: shinken: Add checks for labs infrastructure
..

shinken: Add checks for labs infrastructure

Change-Id: I208fd3a67c5c3064bfd6fa2757fee2a6d290f07f
---
M manifests/role/labsshinken.pp
M modules/shinken/files/contactgroups.cfg
A modules/shinken/files/labs/basic-infra-checks.cfg
R modules/shinken/files/labs/basic-instance-checks.cfg
4 files changed, 37 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/64/175964/1

diff --git a/manifests/role/labsshinken.pp b/manifests/role/labsshinken.pp
index ff4595f..4fe3545 100644
--- a/manifests/role/labsshinken.pp
+++ b/manifests/role/labsshinken.pp
@@ -6,9 +6,12 @@
 auth_secret = 'This is insecure, should switch to using private repo',
 }
 
-# Basic labs monitoring
-shinken::services { 'basic-checks':
-source = 'puppet:///modules/shinken/basic-checks.cfg',
+# Basic labs instance  infrastructure monitoring
+shinken::services { 'basic-infra-checks':
+source = 'puppet:///modules/shinken/labs/basic-infra-checks.cfg',
+}
+shinken::services { 'basic-instance-checks':
+source = 'puppet:///modules/shinken/labs/basic-instance-checks.cfg',
 }
 
 include beta::monitoring::shinken
diff --git a/modules/shinken/files/contactgroups.cfg 
b/modules/shinken/files/contactgroups.cfg
index 891998c..ac19c2b 100644
--- a/modules/shinken/files/contactgroups.cfg
+++ b/modules/shinken/files/contactgroups.cfg
@@ -8,6 +8,12 @@
 }
 
 define contactgroup {
+contactgroup_name   labs-infra
+alias   Wikimedia Labs Infrastructure Administrators
+members guest,yuvipanda
+}
+
+define contactgroup {
 contactgroup_name   deployment-prep
 alias   Beta Cluster Administrators
 members 
guest,yuvipanda,greg_g,cmcmahon,amusso,twentyafterfour,betacluster-alerts-list
diff --git a/modules/shinken/files/labs/basic-infra-checks.cfg 
b/modules/shinken/files/labs/basic-infra-checks.cfg
new file mode 100644
index 000..790d706
--- /dev/null
+++ b/modules/shinken/files/labs/basic-infra-checks.cfg
@@ -0,0 +1,25 @@
+define host {
+host_name   labs-puppetmaster
+address virt1000.wikimedia.org
+alias   Wikimedia Labs puppetmaster
+check_period24x7
+max_check_attempts  3
+notification_interval   0
+retry_interval  1
+check_interval  5
+contact_groups  labs-infra
+}
+
+define service {
+check_command   check_https_port_status!8140!400
+host_name   labs-puppetmaster
+service_description Labs Puppetmaster HTTPS
+use generic-service
+}
+
+define service {
+check_command   check_https_port_status!8141!400
+host_name   labs-puppetmaster
+service_description Labs Puppetmaster Backend HTTPS
+use generic-service
+}
diff --git a/modules/shinken/files/basic-checks.cfg 
b/modules/shinken/files/labs/basic-instance-checks.cfg
similarity index 100%
rename from modules/shinken/files/basic-checks.cfg
rename to modules/shinken/files/labs/basic-instance-checks.cfg

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I208fd3a67c5c3064bfd6fa2757fee2a6d290f07f
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Yuvipanda yuvipa...@gmail.com

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


[MediaWiki-commits] [Gerrit] reimage: add a few configs, beautify output - change (operations/puppet)

2014-11-26 Thread Giuseppe Lavagetto (Code Review)
Giuseppe Lavagetto has uploaded a new change for review.

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

Change subject: reimage: add a few configs, beautify output
..

reimage: add a few configs, beautify output

Change-Id: I255e94564efcd2fe8c481c3ecbf3d4a949f4cb2b
Signed-off-by: Giuseppe Lavagetto glavage...@wikimedia.org
---
M modules/puppetmaster/files/reimage.sh
1 file changed, 24 insertions(+), 9 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/65/175965/1

diff --git a/modules/puppetmaster/files/reimage.sh 
b/modules/puppetmaster/files/reimage.sh
index faec1f2..07efdcb 100755
--- a/modules/puppetmaster/files/reimage.sh
+++ b/modules/puppetmaster/files/reimage.sh
@@ -6,6 +6,8 @@
 set -u
 SLEEPTIME=60
 FORCE=0
+NOCLEAN=0
+NOREBOOT=0
 
 function log  {
 echo $@
@@ -18,6 +20,7 @@
 # An additional, paranoid check.
 if puppet cert list --all | fgrep -q ${nodename}; then
 log unable to clean puppet cert, please check manually
+log Maybe you need to use the -n switch?
 exit 1
 fi
 log cleaning puppet facts cache for ${nodename}
@@ -40,6 +43,7 @@
 # salt-key --delete above exits 0 regardless, double check
 if salt-key --list accepted | fgrep -q ${nodename}; then
 log unable to clean salt key, please check manually
+log Maybe you need to use the -n switch?
 exit 1
 fi
 }
@@ -47,15 +51,16 @@
 function sign_puppet {
 nodename=${1}
 force_yes=${2}
+log Seeking the Puppet certificate to sign
 while true; do
-log Seeking the node cert to sign
 res=$(puppet cert list | sed -ne s/\$nodename\//p)
 if [ x${res} == x ]; then
-log cert not found, sleeping for ${SLEEPTIME}s
+#log cert not found, sleeping for ${SLEEPTIME}s
+echo -n .
 sleep $SLEEPTIME
 continue
 fi
-
+echo +
 if [ ${force_yes} -eq 0 ]; then
 echo We have found a key for ${nodename}  \
  with the following fingerprint:
@@ -76,13 +81,15 @@
 function sign_salt {
 nodename=${1}
 force_yes=${2}
+log Seeking the SALT node key to add
+log This is the time to start a puppet run on the host.
 while true; do
-log Seeking the node key to add
 if ! salt-key --list unaccepted | fgrep -q ${nodename}; then
-log key not found, sleeping for ${SLEEPTIME}s
+echo -n .
 sleep $SLEEPTIME
 continue
 fi;
+echo +
 if [ ${force_yes} -eq 1 ]; then
 salt-key -y -a ${nodename}
 else
@@ -113,10 +120,16 @@
 
 ## Main script
 
-while getopts ys: option; do
+while getopts yrns: option; do
 case $option in
 y)
 FORCE=1
+;;
+r)
+NOREBOOT=1
+;;
+n)
+NOCLEAN=1
 ;;
 s)
 SLEEPTIME=${OPTARG}
@@ -133,9 +146,11 @@
 test -z ${mgmtname}  usage
 log Preparing reimaging of node ${nodename}
 
-clean_puppet $nodename
-clean_salt $nodename $FORCE
-set_pxe_and_reboot $mgmtname
+if [ $NOSIGN -eq 0 ]; then
+clean_puppet $nodename
+clean_salt $nodename $FORCE
+fi;
+test $NOREBOOT -eq 0  set_pxe_and_reboot $mgmtname
 sign_puppet $nodename $FORCE
 sign_salt $nodename $FORCE
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I255e94564efcd2fe8c481c3ecbf3d4a949f4cb2b
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Giuseppe Lavagetto glavage...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Update Wikidata to wmf/1.25wmf10 branch - change (mediawiki...release)

2014-11-26 Thread Hoo man (Code Review)
Hoo man has uploaded a new change for review.

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

Change subject: Update Wikidata to wmf/1.25wmf10 branch
..

Update Wikidata to wmf/1.25wmf10 branch

Change-Id: I23e3b9857d6fd46a298a83556ce05f56a59d7d84
---
M make-wmf-branch/default.conf
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/make-wmf-branch/default.conf b/make-wmf-branch/default.conf
index 9376c74..93c1c1c 100644
--- a/make-wmf-branch/default.conf
+++ b/make-wmf-branch/default.conf
@@ -177,7 +177,7 @@
'DonationInterface' = 'deployment',
 
// to use instead of the above
-   'Wikidata' = 'wmf/1.25wmf8',
+   'Wikidata' = 'wmf/1.25wmf10',
 
// For wikitech use only!
'SemanticMediaWiki' = '1.8.x',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I23e3b9857d6fd46a298a83556ce05f56a59d7d84
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/tools/release
Gerrit-Branch: master
Gerrit-Owner: Hoo man h...@online.de

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


[MediaWiki-commits] [Gerrit] Rework and clean up MockRepository and related - change (mediawiki...Wikibase)

2014-11-26 Thread WMDE
Thiemo Mättig (WMDE) has uploaded a new change for review.

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

Change subject: Rework and clean up MockRepository and related
..

Rework and clean up MockRepository and related

Change-Id: Ieac330e5c1a6c99af27cc288f602cac6456ea079
---
M lib/includes/store/EntityInfoBuilderFactory.php
M lib/includes/store/SiteLinkLookup.php
M lib/includes/store/sql/SiteLinkTable.php
M lib/includes/store/sql/SqlEntityInfoBuilderFactory.php
M lib/tests/phpunit/MockRepository.php
5 files changed, 202 insertions(+), 229 deletions(-)


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

diff --git a/lib/includes/store/EntityInfoBuilderFactory.php 
b/lib/includes/store/EntityInfoBuilderFactory.php
index 56b41b5..6ce254c 100644
--- a/lib/includes/store/EntityInfoBuilderFactory.php
+++ b/lib/includes/store/EntityInfoBuilderFactory.php
@@ -20,9 +20,10 @@
 * Returns a new EntityInfoBuilder for gathering information about the
 * Entities specified by the given IDs.
 *
-* @param EntityId[] $ids
+* @param EntityId[] $entityIds
 *
 * @return EntityInfoBuilder
 */
-   public function newEntityInfoBuilder( array $ids );
+   public function newEntityInfoBuilder( array $entityIds );
+
 }
diff --git a/lib/includes/store/SiteLinkLookup.php 
b/lib/includes/store/SiteLinkLookup.php
index 9af6623..5a79e38 100644
--- a/lib/includes/store/SiteLinkLookup.php
+++ b/lib/includes/store/SiteLinkLookup.php
@@ -2,6 +2,7 @@
 
 namespace Wikibase\Lib\Store;
 
+use DatabaseBase;
 use Wikibase\DataModel\Entity\Item;
 use Wikibase\DataModel\Entity\ItemId;
 use Wikibase\DataModel\SiteLink;
@@ -21,14 +22,14 @@
 * currently in the store. The array is empty if there are no such 
conflicts.
 *
 * The items in the return array are arrays with the following elements:
-* - integer itemId
+* - int itemId
 * - string siteId
 * - string sitePage
 *
 * @since 0.1
 *
 * @param Item  $item
-* @param \DatabaseBase|null $db The database object to use (optional).
+* @param DatabaseBase|null $db The database object to use (optional).
 *If conflict checking is performed as part of a save operation,
 *this should be used to provide the master DB connection that 
will
 *also be used for saving. This will preserve transactional 
integrity
@@ -36,7 +37,7 @@
 *
 * @return array of array
 */
-   public function getConflictsForItem( Item $item, \DatabaseBase $db = 
null );
+   public function getConflictsForItem( Item $item, DatabaseBase $db = 
null );
 
/**
 * Returns the id of the item that is equivalent to the
@@ -59,11 +60,11 @@
 *
 * @since 0.3
 *
-* @param array $itemIds
-* @param array $siteIds
-* @param array $pageNames
+* @param int[] $itemIds
+* @param string[] $siteIds
+* @param string[] $pageNames
 *
-* @return integer
+* @return int
 */
public function countLinks( array $itemIds, array $siteIds = array(), 
array $pageNames = array() );
 
@@ -79,9 +80,9 @@
 *
 * @since 0.3
 *
-* @param array $itemIds
-* @param array $siteIds
-* @param array $pageNames
+* @param int[] $itemIds
+* @param string[] $siteIds
+* @param string[] $pageNames
 *
 * @return array[]
 */
diff --git a/lib/includes/store/sql/SiteLinkTable.php 
b/lib/includes/store/sql/SiteLinkTable.php
index 06eb099..f9afb6e 100644
--- a/lib/includes/store/sql/SiteLinkTable.php
+++ b/lib/includes/store/sql/SiteLinkTable.php
@@ -383,13 +383,11 @@
/**
 * @see SiteLinkLookup::countLinks
 *
-* @since 0.3
+* @param int[] $itemIds
+* @param string[] $siteIds
+* @param string[] $pageNames
 *
-* @param array $itemIds
-* @param array $siteIds
-* @param array $pageNames
-*
-* @return integer
+* @return int
 */
public function countLinks( array $itemIds, array $siteIds = array(), 
array $pageNames = array() ) {
$dbr = $this-getConnection( DB_SLAVE );
@@ -422,15 +420,12 @@
/**
 * @see SiteLinkLookup::getLinks
 *
-* @note: SiteLink objects returned from this method will not contain 
badges!
-*
-* @since 0.3
-*
-* @param array $itemIds
-* @param array $siteIds
-* @param array $pageNames
+* @param int[] $itemIds
+* @param string[] $siteIds
+* @param string[] $pageNames
 *
 * @return array[]
+* @note The arrays returned by this method do 

[MediaWiki-commits] [Gerrit] add privacy disclaimer - change (labs/private)

2014-11-26 Thread Filippo Giunchedi (Code Review)
Filippo Giunchedi has uploaded a new change for review.

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

Change subject: add privacy disclaimer
..

add privacy disclaimer

Change-Id: I44efbae205fdc7a9a9babf55e75ac9953b9e9d40
---
A THIS_REPOSITORY_IS_NOT_PRIVATE
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/private 
refs/changes/69/175969/1

diff --git a/THIS_REPOSITORY_IS_NOT_PRIVATE b/THIS_REPOSITORY_IS_NOT_PRIVATE
new file mode 12
index 000..100b938
--- /dev/null
+++ b/THIS_REPOSITORY_IS_NOT_PRIVATE
@@ -0,0 +1 @@
+README
\ No newline at end of file

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I44efbae205fdc7a9a9babf55e75ac9953b9e9d40
Gerrit-PatchSet: 1
Gerrit-Project: labs/private
Gerrit-Branch: master
Gerrit-Owner: Filippo Giunchedi fgiunch...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Use mw.Api.postWithToken( 'edit' ) when possible - change (mediawiki...Translate)

2014-11-26 Thread Nikerabbit (Code Review)
Nikerabbit has uploaded a new change for review.

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

Change subject: Use mw.Api.postWithToken( 'edit' ) when possible
..

Use mw.Api.postWithToken( 'edit' ) when possible

Saves us the trouble of getting the edit token ourselves, or when
replacing mw.Api.postWithEditToken, we don't need to load extra
module just for wrapper function which does exactly the same.

Additionally, added parenthesis to scope new operator where used
in the lines I touched.

Change-Id: Ic540e5a1f1a38fc41823b8d50340b57f12d1c482
---
M Resources.php
M resources/js/ext.translate.editor.helpers.js
M resources/js/ext.translate.editor.js
M resources/js/ext.translate.special.pagemigration.js
M resources/js/ext.translate.special.pagepreparation.js
M resources/js/ext.translate.storage.js
6 files changed, 8 insertions(+), 12 deletions(-)


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

diff --git a/Resources.php b/Resources.php
index 1c5a293..6d3b1d0 100644
--- a/Resources.php
+++ b/Resources.php
@@ -59,7 +59,6 @@
'mediawiki.util',
'mediawiki.Uri',
'mediawiki.api',
-   'mediawiki.api.edit',
'mediawiki.api.parse',
'mediawiki.user',
'mediawiki.jqueryMsg',
@@ -349,7 +348,7 @@
'styles' = 'resources/css/ext.translate.special.pagemigration.css',
'scripts' = 'resources/js/ext.translate.special.pagemigration.js',
'dependencies' = array(
-   'mediawiki.api.edit',
+   'mediawiki.api',
'mediawiki.ui.button',
'jquery.ajaxdispatcher',
),
@@ -378,7 +377,6 @@
'dependencies' = array(
'mediawiki.ui',
'mediawiki.api',
-   'mediawiki.api.edit',
'jquery.mwExtension',
'mediawiki.action.history.diff',
'mediawiki.jqueryMsg',
diff --git a/resources/js/ext.translate.editor.helpers.js 
b/resources/js/ext.translate.editor.helpers.js
index a58f415..9c08552 100644
--- a/resources/js/ext.translate.editor.helpers.js
+++ b/resources/js/ext.translate.editor.helpers.js
@@ -56,12 +56,11 @@
deferred = new $.Deferred(),
newDocumentation = 
translateEditor.$editor.find( '.tux-textarea-documentation' ).val();
 
-   deferred = api.post( {
+   deferred = api.postWithToken( 'edit', {
action: 'edit',
title: translateEditor.message.title
.replace( /\/[a-z\-]+$/, '/' + 
mw.config.get( 'wgTranslateDocumentationLanguageCode' ) ),
-   text: newDocumentation,
-   token: mw.user.tokens.get( 'editToken' )
+   text: newDocumentation
} ).done( function ( response ) {
var $messageDesc = 
translateEditor.$editor.find( '.infocolumn-block .message-desc' );
 
diff --git a/resources/js/ext.translate.editor.js 
b/resources/js/ext.translate.editor.js
index 1a61c0d..4bae5a1 100644
--- a/resources/js/ext.translate.editor.js
+++ b/resources/js/ext.translate.editor.js
@@ -270,10 +270,9 @@
// @TODO devise better algorithm
if ( this.$messageItem.is( '.fuzzy, .untranslated' ) ) {
// We can just ignore the result even if it 
fails
-   new mw.Api().post( {
+   (new mw.Api()).postWithToken( 'edit', {
action: 'hardmessages',
-   title: this.message.title,
-   token: mw.user.tokens.get( 'editToken' )
+   title: this.message.title
} );
}
},
diff --git a/resources/js/ext.translate.special.pagemigration.js 
b/resources/js/ext.translate.special.pagemigration.js
index 90def74..7b72bae 100644
--- a/resources/js/ext.translate.special.pagemigration.js
+++ b/resources/js/ext.translate.special.pagemigration.js
@@ -20,7 +20,7 @@
title = 'Translations:' + pageName + '/' + identifier + 
'/' + langCode;
summary = $( '#pm-summary' ).val();
 
-   deferred = api.postWithEditToken( {
+   deferred = api.postWithToken( 'edit', {
action: 'edit',
format: 'json',
watchlist: 'nochange',
diff --git a/resources/js/ext.translate.special.pagepreparation.js 
b/resources/js/ext.translate.special.pagepreparation.js
index 

[MediaWiki-commits] [Gerrit] add Vega widget (v 1.3.0) - change (mediawiki...PhpTagsWidgets)

2014-11-26 Thread Pastakhov (Code Review)
Pastakhov has uploaded a new change for review.

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

Change subject: add Vega widget (v 1.3.0)
..

add Vega widget (v 1.3.0)

* refactor GenericWidget
** refactor onReady.js
** fix WidgetSlick
** fix WidgetFontAwesome

Change-Id: Idcb6aec6a663173bca26609a729c7d8139f1f229
---
A .gitignore
M PhpTagsWidgets.init.php
M PhpTagsWidgets.php
M includes/GenericWidget.php
M includes/WidgetFontAwesomeIcon.php
M includes/WidgetSlick.php
A includes/WidgetVega.php
M resources/ext.pw.onReady.js
A resources/ext.pw.vega.js
A resources/libs/d3/CONTRIBUTING.md
A resources/libs/d3/LICENSE
A resources/libs/d3/README.md
A resources/libs/d3/d3.js
A resources/libs/topojson/LICENSE
A resources/libs/topojson/README.md
A resources/libs/topojson/topojson.js
A resources/libs/vega/LICENSE
A resources/libs/vega/README.md
A resources/libs/vega/vega.js
M tests/parser/PhpTagsWidgetsTests.txt
20 files changed, 17,422 insertions(+), 53 deletions(-)


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


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idcb6aec6a663173bca26609a729c7d8139f1f229
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/PhpTagsWidgets
Gerrit-Branch: master
Gerrit-Owner: Pastakhov pastak...@yandex.ru

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


[MediaWiki-commits] [Gerrit] Pass TermLookup, not EntityLookup into WikibaseValueFormatte... - change (mediawiki...Wikibase)

2014-11-26 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Pass TermLookup, not EntityLookup into 
WikibaseValueFormattersBuilders
..


Pass TermLookup, not EntityLookup into WikibaseValueFormattersBuilders

Change-Id: I5ff3d9f96f9496866a4026939b01cf59e9cd5592
---
M client/includes/WikibaseClient.php
M lib/includes/formatters/WikibaseValueFormatterBuilders.php
M lib/tests/phpunit/formatters/WikibaseSnakFormatterBuildersTest.php
M lib/tests/phpunit/formatters/WikibaseValueFormatterBuildersTest.php
M repo/includes/WikibaseRepo.php
5 files changed, 45 insertions(+), 28 deletions(-)

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



diff --git a/client/includes/WikibaseClient.php 
b/client/includes/WikibaseClient.php
index 5c1cbcf..7ed0f92 100644
--- a/client/includes/WikibaseClient.php
+++ b/client/includes/WikibaseClient.php
@@ -45,6 +45,7 @@
 use Wikibase\Lib\Serializers\ForbiddenSerializer;
 use Wikibase\Lib\Store\EntityContentDataCodec;
 use Wikibase\Lib\Store\EntityLookup;
+use Wikibase\Lib\Store\EntityRetrievingTermLookup;
 use Wikibase\Lib\WikibaseDataTypeBuilders;
 use Wikibase\Lib\WikibaseSnakFormatterBuilders;
 use Wikibase\Lib\WikibaseValueFormatterBuilders;
@@ -200,6 +201,13 @@
 */
private function getEntityLookup() {
return $this-getStore()-getEntityLookup();
+   }
+
+   /**
+* @return TermLookup
+*/
+   private function getTermLookup() {
+   return new EntityRetrievingTermLookup( $this-getEntityLookup() 
);
}
 
/**
@@ -465,7 +473,7 @@
 */
private function newSnakFormatterFactory() {
$valueFormatterBuilders = new WikibaseValueFormatterBuilders(
-   $this-getEntityLookup(),
+   $this-getTermLookup(),
$this-contentLanguage
);
 
@@ -497,7 +505,7 @@
 */
private function newValueFormatterFactory() {
$builders = new WikibaseValueFormatterBuilders(
-   $this-getEntityLookup(),
+   $this-getTermLookup(),
$this-contentLanguage
);
 
diff --git a/lib/includes/formatters/WikibaseValueFormatterBuilders.php 
b/lib/includes/formatters/WikibaseValueFormatterBuilders.php
index 5596a21..df49be9 100644
--- a/lib/includes/formatters/WikibaseValueFormatterBuilders.php
+++ b/lib/includes/formatters/WikibaseValueFormatterBuilders.php
@@ -13,8 +13,7 @@
 use ValueFormatters\ValueFormatter;
 use Wikibase\LanguageFallbackChain;
 use Wikibase\LanguageFallbackChainFactory;
-use Wikibase\Lib\Store\EntityLookup;
-use Wikibase\Lib\Store\EntityRetrievingTermLookup;
+use Wikibase\Lib\Store\TermLookup;
 use Wikibase\Lib\Store\EntityTitleLookup;
 use Wikibase\Lib\Store\LanguageFallbackLabelLookup;
 use Wikibase\Lib\Store\LanguageLabelLookup;
@@ -30,9 +29,9 @@
 class WikibaseValueFormatterBuilders {
 
/**
-* @var EntityLookup
+* @var TermLookup
 */
-   private $entityLookup;
+   private $termLookup;
 
/**
 * @var Language
@@ -112,11 +111,11 @@
);
 
public function __construct(
-   EntityLookup $entityLookup,
+   TermLookup $termLookup,
Language $defaultLanguage,
EntityTitleLookup $entityTitleLookup = null
) {
-   $this-entityLookup = $entityLookup;
+   $this-termLookup = $termLookup;
$this-defaultLanguage = $defaultLanguage;
$this-entityTitleLookup = $entityTitleLookup;
}
@@ -509,7 +508,7 @@
FormatterOptions $options,
WikibaseValueFormatterBuilders $builders
) {
-   $termLookup = new EntityRetrievingTermLookup( 
$builders-entityLookup );
+   $termLookup = $builders-termLookup;
 
// @fixme inject the label lookup
if ( $options-hasOption( 'languages' ) ) {
diff --git a/lib/tests/phpunit/formatters/WikibaseSnakFormatterBuildersTest.php 
b/lib/tests/phpunit/formatters/WikibaseSnakFormatterBuildersTest.php
index 073e35d..b31e20e 100644
--- a/lib/tests/phpunit/formatters/WikibaseSnakFormatterBuildersTest.php
+++ b/lib/tests/phpunit/formatters/WikibaseSnakFormatterBuildersTest.php
@@ -57,18 +57,14 @@
return new DataType( $id, $typeMap[$id], 
array() );
} ) );
 
-   $entity = EntityFactory::singleton()-newEmpty( 
$entityId-getEntityType() );
-   $entity-setId( $entityId );
-   $entity-setLabel( 'en', 'Label for ' . 
$entityId-getSerialization() );
-
-   $entityLookup = $this-getMock( 
'Wikibase\Lib\Store\EntityLookup' );
-   $entityLookup-expects( $this-any() )
-   -method( 'getEntity' )
-

[MediaWiki-commits] [Gerrit] Pass original event with TextInputWidget#enter - change (oojs/ui)

2014-11-26 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Pass original event with TextInputWidget#enter
..


Pass original event with TextInputWidget#enter

So listeners can distinguish between enter and shift-enter.

Change-Id: I078874a6315e4e4fa3c2cba0ca2c53aac86471ff
---
M src/widgets/TextInputWidget.js
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/src/widgets/TextInputWidget.js b/src/widgets/TextInputWidget.js
index 34825ab..70d194b 100644
--- a/src/widgets/TextInputWidget.js
+++ b/src/widgets/TextInputWidget.js
@@ -133,7 +133,7 @@
  */
 OO.ui.TextInputWidget.prototype.onKeyPress = function ( e ) {
if ( e.which === OO.ui.Keys.ENTER  !this.multiline ) {
-   this.emit( 'enter' );
+   this.emit( 'enter', e );
}
 };
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I078874a6315e4e4fa3c2cba0ca2c53aac86471ff
Gerrit-PatchSet: 1
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: Esanders esand...@wikimedia.org
Gerrit-Reviewer: Bartosz Dziewoński matma@gmail.com
Gerrit-Reviewer: Trevor Parscal tpars...@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] Change smn to lowercase like other Sami languages - change (translatewiki)

2014-11-26 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Change smn to lowercase like other Sami languages
..


Change smn to lowercase like other Sami languages

Addresses comments in I700444f34c36f6583bdf79e1bfcd4b34de288ff0

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

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



diff --git a/LanguageSettings.php b/LanguageSettings.php
index 68691d2..0b4b37b 100644
--- a/LanguageSettings.php
+++ b/LanguageSettings.php
@@ -82,7 +82,7 @@
 $wgExtraLanguageNames['jdt-cyrl'] = 'жугьури'; # Judeo-Tat / Siebrand 
2014-06-17
 $wgExtraLanguageNames['kjh'] = 'хакас'; # Khakas / Amire80 2014-06-17
 $wgExtraLanguageNames['cnh'] = 'Lai holh'; # Haka Chin / Siebrand 2014-08-06
-$wgExtraLanguageNames['smn'] = 'Anarâškielâ'; # Inari Saami / Siebrand 
2014-10-06
+$wgExtraLanguageNames['smn'] = 'anarâškielâ'; # Inari Saami / Siebrand 
2014-10-06
 $wgExtraLanguageNames['bgn'] = 'بلوچی رخشانی'; # Western Balochi / Siebrand 
2014-11-15
 $wgExtraLanguageNames['dty'] = 'डोटेली'; # Dotyali / Siebrand 2014-11-16
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I504fc3b9db3e5f20adb8d13d4d26b50884821bec
Gerrit-PatchSet: 2
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Amire80 amir.ahar...@mail.huji.ac.il
Gerrit-Reviewer: Nikerabbit niklas.laxst...@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] Improve variable naming - change (mediawiki...Wikibase)

2014-11-26 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Improve variable naming
..


Improve variable naming

Change-Id: I1f92bf8b5e013898a49c1ea4ff63c7ce9172e427
---
M lib/includes/store/EntityRetrievingTermLookup.php
1 file changed, 4 insertions(+), 4 deletions(-)

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



diff --git a/lib/includes/store/EntityRetrievingTermLookup.php 
b/lib/includes/store/EntityRetrievingTermLookup.php
index 5f65d1d..2f60efe 100644
--- a/lib/includes/store/EntityRetrievingTermLookup.php
+++ b/lib/includes/store/EntityRetrievingTermLookup.php
@@ -91,13 +91,13 @@
 * @return Fingerprint
 */
private function getFingerprint( EntityId $entityId ) {
-   $prefixedId = $entityId-getSerialization();
+   $idSerialization = $entityId-getSerialization();
 
-   if ( !isset( $this-fingerprints[$prefixedId] ) ) {
-   $this-fingerprints[$prefixedId] = 
$this-fetchFingerprint( $entityId );
+   if ( !isset( $this-fingerprints[$idSerialization] ) ) {
+   $this-fingerprints[$idSerialization] = 
$this-fetchFingerprint( $entityId );
}
 
-   return $this-fingerprints[$prefixedId];
+   return $this-fingerprints[$idSerialization];
}
 
/**

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1f92bf8b5e013898a49c1ea4ff63c7ce9172e427
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Jeroen De Dauw jeroended...@gmail.com
Gerrit-Reviewer: Tobias Gritschacher tobias.gritschac...@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] Update the autonym for aeb in Names.php - change (mediawiki/core)

2014-11-26 Thread Amire80 (Code Review)
Amire80 has uploaded a new change for review.

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

Change subject: Update the autonym for aeb in Names.php
..

Update the autonym for aeb in Names.php

The new name was suggested by Wikimedia's Language committee,
and as far as I know Arabic, it looks correct to me as well.

A Latin script autonym is being discussed separately and will be
added if and when there will be a decision about it.

The Arabic script autonym should be changed already now
because the current one is definitely wrong.

Change-Id: Ib07d2b49a47fb7f349a2cd70b7acfd88f9bf66ca
---
M languages/Names.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/languages/Names.php b/languages/Names.php
index 4a41b42..4e4d103 100644
--- a/languages/Names.php
+++ b/languages/Names.php
@@ -41,7 +41,7 @@
'aa' = 'Qafár af', # Afar
'ab' = 'Аҧсшәа',   # Abkhaz
'ace' = 'Acèh',# Aceh
-   'aeb' = 'زَوُن',   # Tunisian Arabic
+   'aeb' = 'تونسي',   # Tunisian Arabic
'af' = 'Afrikaans',# Afrikaans
'ak' = 'Akan', # Akan
'aln' = 'Gegë',# Gheg Albanian

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib07d2b49a47fb7f349a2cd70b7acfd88f9bf66ca
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
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] Add unique sessionIDs - change (mediawiki...citoid)

2014-11-26 Thread Mvolz (Code Review)
Mvolz has uploaded a new change for review.

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

Change subject: Add unique sessionIDs
..

Add unique sessionIDs

Zotero requests require sessionIDs. Previously
was using the same string for all requests; now
using a different string for each request to the
citoid app (but the same string for multiple
zotero requests in the same request).

Change-Id: I2406e9ada1ec208a5ea9fc6158ad42b2dff8652b
---
M server.js
1 file changed, 7 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/citoid 
refs/changes/74/175974/1

diff --git a/server.js b/server.js
index 4d48c55..18ad095 100644
--- a/server.js
+++ b/server.js
@@ -17,7 +17,9 @@
})
.alias( 'c', 'config' );
 var argv = opts.argv;
+var crypto = require('crypto');
 
+/*Local modules*/
 var distinguish = require('./lib/distinguish.js').distinguish;
 var requestFromURL = require('./lib/requests.js').requestFromURL;
 
@@ -80,7 +82,7 @@
var opts, parsedURL,
format = req.body.format,
requestedURL = req.body.url,
-   sessionID = 123abc;
+   sessionID = crypto.randomBytes(20).toString('hex');
 
log.info(req);
 
@@ -138,9 +140,11 @@
 
dSearch = decodeURIComponent(search); //decode urlencoded 
search string
 
+   sessionID = crypto.randomBytes(20).toString('hex'); //required 
zotero- not terribly important for this to be secure
+
opts = {
zoteroURL:zoteroURL,
-   sessionID:123abc,
+   sessionID:sessionID,
format:format
};
 
@@ -152,7 +156,7 @@
res.send(body);
}
else {
-   res.statusCode = 520; //Server at 
requested location not available
+   res.statusCode = 520; //TODO: Server at 
requested location not available, not valid for non-urls
res.send(body);
}
});

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2406e9ada1ec208a5ea9fc6158ad42b2dff8652b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/citoid
Gerrit-Branch: master
Gerrit-Owner: Mvolz mv...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Drop unused code from EntityViewTest - change (mediawiki...Wikibase)

2014-11-26 Thread WMDE
Thiemo Mättig (WMDE) has uploaded a new change for review.

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

Change subject: Drop unused code from EntityViewTest
..

Drop unused code from EntityViewTest

If all tests succeed this can not be wrong, right?

This is split from I04767f2 to make it easier to review.

Change-Id: I4a30f59d62b662e1a32db865acacf401ec619300
---
M repo/tests/phpunit/includes/EntityViewTest.php
1 file changed, 0 insertions(+), 230 deletions(-)


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

diff --git a/repo/tests/phpunit/includes/EntityViewTest.php 
b/repo/tests/phpunit/includes/EntityViewTest.php
index 65917c9..fa4d544 100644
--- a/repo/tests/phpunit/includes/EntityViewTest.php
+++ b/repo/tests/phpunit/includes/EntityViewTest.php
@@ -2,35 +2,14 @@
 
 namespace Wikibase\Test;
 
-use IContextSource;
-use InvalidArgumentException;
-use Language;
-use RequestContext;
-use Title;
 use ValueFormatters\FormatterOptions;
-use Wikibase\DataModel\Claim\Claim;
-use Wikibase\DataModel\Entity\BasicEntityIdParser;
 use Wikibase\DataModel\Entity\Entity;
 use Wikibase\DataModel\Entity\EntityId;
-use Wikibase\DataModel\Entity\EntityIdValue;
 use Wikibase\DataModel\Entity\Item;
 use Wikibase\DataModel\Entity\ItemId;
 use Wikibase\DataModel\Entity\Property;
 use Wikibase\DataModel\Entity\PropertyId;
-use Wikibase\DataModel\Snak\PropertyValueSnak;
-use Wikibase\DataModel\Snak\Snak;
 use Wikibase\DataModel\Statement\Statement;
-use Wikibase\EntityRevision;
-use Wikibase\EntityView;
-use Wikibase\LanguageFallbackChain;
-use Wikibase\Lib\Serializers\SerializationOptions;
-use Wikibase\Lib\SnakFormatter;
-use Wikibase\Lib\Store\EntityInfoBuilderFactory;
-use Wikibase\Lib\Store\EntityTitleLookup;
-use Wikibase\ParserOutputJsConfigBuilder;
-use Wikibase\ReferencedEntitiesFinder;
-use Wikibase\Repo\WikibaseRepo;
-use Wikibase\Utils;
 
 /**
  * @covers Wikibase\EntityView
@@ -47,161 +26,6 @@
  * @author Daniel Kinzler
  */
 abstract class EntityViewTest extends \MediaWikiLangTestCase {
-
-   /**
-* @var MockRepository
-*/
-   private $mockRepository;
-
-   protected function newEntityIdParser() {
-   // The data provides use P123 and Q123 IDs, so the parser needs 
to understand these.
-   return new BasicEntityIdParser();
-   }
-
-   public function getTitleForId( EntityId $id ) {
-   $name = $id-getEntityType() . ':' . $id-getSerialization();
-   return Title::makeTitle( NS_MAIN, $name );
-   }
-
-   /**
-* @return EntityTitleLookup
-*/
-   protected function getEntityTitleLookupMock() {
-   $lookup = $this-getMock( 
'Wikibase\Lib\Store\EntityTitleLookup' );
-   $lookup-expects( $this-any() )
-   -method( 'getTitleForId' )
-   -will( $this-returnCallback( array( $this, 
'getTitleForId' ) ) );
-
-   return $lookup;
-   }
-
-   /**
-* @return SnakFormatter
-*/
-   protected function newSnakFormatterMock() {
-   $snakFormatter = $this-getMock( 'Wikibase\Lib\SnakFormatter' );
-
-   $snakFormatter-expects( $this-any() )-method( 'formatSnak' )
-   -will( $this-returnValue( '(value)' ) );
-
-   $snakFormatter-expects( $this-any() )-method( 'getFormat' )
-   -will( $this-returnValue( 
SnakFormatter::FORMAT_HTML_WIDGET ) );
-
-   $snakFormatter-expects( $this-any() )-method( 
'canFormatSnak' )
-   -will( $this-returnValue( true ) );
-
-   return $snakFormatter;
-   }
-
-   /**
-* @param string $entityType
-* @param EntityInfoBuilderFactory $entityInfoBuilderFactory
-* @param EntityTitleLookup $entityTitleLookup
-* @param IContextSource $context
-* @param LanguageFallbackChain $languageFallbackChain
-*
-* @throws InvalidArgumentException
-* @return EntityView
-*/
-   protected function newEntityView(
-   $entityType,
-   EntityInfoBuilderFactory $entityInfoBuilderFactory = null,
-   EntityTitleLookup $entityTitleLookup = null,
-   IContextSource $context = null,
-   LanguageFallbackChain $languageFallbackChain = null
-   ) {
-   if ( !is_string( $entityType ) ) {
-   throw new InvalidArgumentException( '$entityType must 
be a string!' );
-   }
-
-   $langCode = 'en';
-
-   if ( $context === null ) {
-   $context = new RequestContext();
-   $context-setLanguage( $langCode );
-   }
-
-   if ( $languageFallbackChain === null ) {
-   $factory = 

[MediaWiki-commits] [Gerrit] mediawiki: fix content-type and content-length in fcgi - change (operations/puppet)

2014-11-26 Thread Giuseppe Lavagetto (Code Review)
Giuseppe Lavagetto has uploaded a new change for review.

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

Change subject: mediawiki: fix content-type and content-length in fcgi
..

mediawiki: fix content-type and content-length in fcgi

Change-Id: I232138e62d31ca734eb30ba2e34262a134a2d615
Signed-off-by: Giuseppe Lavagetto glavage...@wikimedia.org
---
M modules/mediawiki/files/apache/configs/fcgi_headers.conf
1 file changed, 4 insertions(+), 2 deletions(-)


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

diff --git a/modules/mediawiki/files/apache/configs/fcgi_headers.conf 
b/modules/mediawiki/files/apache/configs/fcgi_headers.conf
index dc87937..53d152f 100644
--- a/modules/mediawiki/files/apache/configs/fcgi_headers.conf
+++ b/modules/mediawiki/files/apache/configs/fcgi_headers.conf
@@ -1,3 +1,5 @@
-# Apache with mod_proxy_fcgi does _not_ pass the Authorization header to the 
-# fastcgi server, which broke OAUTH
+# Apache with mod_proxy_fcgi and apache_get_headers() do not play well 
toghether
+# So this is a hack to make that function work as expected.
 SetEnvIf Authorization (.*) HTTP_AUTHORIZATION=$1
+SetEnvIf Content-Type (.*) HTTP_CONTENT_TYPE=$1
+SetEnvIf Content-Length (.*) HTTP_CONTENT_LENGTH=$1

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I232138e62d31ca734eb30ba2e34262a134a2d615
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Giuseppe Lavagetto glavage...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] mediawiki: fix content-type and content-length in fcgi - change (operations/puppet)

2014-11-26 Thread Giuseppe Lavagetto (Code Review)
Giuseppe Lavagetto has submitted this change and it was merged.

Change subject: mediawiki: fix content-type and content-length in fcgi
..


mediawiki: fix content-type and content-length in fcgi

Change-Id: I232138e62d31ca734eb30ba2e34262a134a2d615
Signed-off-by: Giuseppe Lavagetto glavage...@wikimedia.org
---
M modules/mediawiki/files/apache/configs/fcgi_headers.conf
1 file changed, 4 insertions(+), 2 deletions(-)

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



diff --git a/modules/mediawiki/files/apache/configs/fcgi_headers.conf 
b/modules/mediawiki/files/apache/configs/fcgi_headers.conf
index dc87937..53d152f 100644
--- a/modules/mediawiki/files/apache/configs/fcgi_headers.conf
+++ b/modules/mediawiki/files/apache/configs/fcgi_headers.conf
@@ -1,3 +1,5 @@
-# Apache with mod_proxy_fcgi does _not_ pass the Authorization header to the 
-# fastcgi server, which broke OAUTH
+# Apache with mod_proxy_fcgi and apache_get_headers() do not play well 
toghether
+# So this is a hack to make that function work as expected.
 SetEnvIf Authorization (.*) HTTP_AUTHORIZATION=$1
+SetEnvIf Content-Type (.*) HTTP_CONTENT_TYPE=$1
+SetEnvIf Content-Length (.*) HTTP_CONTENT_LENGTH=$1

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I232138e62d31ca734eb30ba2e34262a134a2d615
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Giuseppe Lavagetto glavage...@wikimedia.org
Gerrit-Reviewer: Giuseppe Lavagetto glavage...@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] Drop unused code from SpecialEntityDataTest - change (mediawiki...Wikibase)

2014-11-26 Thread WMDE
Thiemo Mättig (WMDE) has uploaded a new change for review.

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

Change subject: Drop unused code from SpecialEntityDataTest
..

Drop unused code from SpecialEntityDataTest

If all tests succeed this can not be wrong, right?

This is split from I04767f2 to make it easier to review.

Change-Id: I1a6db4290f361e5c202a63031c6d3946c96be961
---
M repo/tests/phpunit/includes/specials/SpecialEntityDataTest.php
1 file changed, 4 insertions(+), 30 deletions(-)


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

diff --git a/repo/tests/phpunit/includes/specials/SpecialEntityDataTest.php 
b/repo/tests/phpunit/includes/specials/SpecialEntityDataTest.php
index c43d7bf..0a1e5c0 100644
--- a/repo/tests/phpunit/includes/specials/SpecialEntityDataTest.php
+++ b/repo/tests/phpunit/includes/specials/SpecialEntityDataTest.php
@@ -11,7 +11,6 @@
 use Title;
 use Wikibase\DataModel\Entity\BasicEntityIdParser;
 use Wikibase\DataModel\Entity\EntityId;
-use Wikibase\DataModel\Entity\Item;
 use Wikibase\EntityFactory;
 use Wikibase\Lib\Serializers\SerializationOptions;
 use Wikibase\Lib\Serializers\SerializerFactory;
@@ -19,7 +18,6 @@
 use Wikibase\Repo\LinkedData\EntityDataSerializationService;
 use Wikibase\Repo\LinkedData\EntityDataUriManager;
 use Wikibase\Repo\Specials\SpecialEntityData;
-use Wikibase\Repo\WikibaseRepo;
 
 /**
  * @covers Wikibase\Repo\Specials\SpecialEntityData
@@ -40,28 +38,6 @@
const URI_BASE = 'http://acme.test/';
const URI_DATA = 'http://data.acme.test/';
 
-   protected function saveItem( Item $item ) {
-   //TODO: Same as in EntityDataRequestHandlerTest. Factor out.
-
-   $store = WikibaseRepo::getDefaultInstance()-getEntityStore();
-   $store-saveEntity( $item, testing, $GLOBALS['wgUser'], 
EDIT_NEW );
-   }
-
-   public function getTestItem() {
-   //TODO: Same as in EntityDataRequestHandlerTest. Factor out.
-
-   $prefix = get_class( $this ) . '/';
-   static $item;
-
-   if ( $item === null ) {
-   $item = Item::newEmpty();
-   $item-setLabel( 'en', $prefix . 'Raarrr' );
-   $this-saveItem( $item );
-   }
-
-   return $item;
-   }
-
protected function newSpecialPage() {
$page = new SpecialEntityData();
 
@@ -73,10 +49,8 @@
return $page;
}
 
-   protected function newRequestHandler() {
-   $mockRepo = EntityDataTestProvider::getMockRepository();
-
-   $entityRevisionLookup = $mockRepo;
+   private function newRequestHandler() {
+   $mockRepository = EntityDataTestProvider::getMockRepository();
 
$titleLookup = $this-getMock( 
'Wikibase\Lib\Store\EntityTitleLookup' );
$titleLookup-expects( $this-any() )
@@ -102,7 +76,7 @@
$serializationService = new EntityDataSerializationService(
self::URI_BASE,
self::URI_DATA,
-   $mockRepo,
+   $mockRepository,
$titleLookup,
$serializerFactory,
new SiteList()
@@ -130,7 +104,7 @@
$uriManager,
$titleLookup,
$idParser,
-   $entityRevisionLookup,
+   $mockRepository,
$serializationService,
$defaultFormat,
$maxAge,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1a6db4290f361e5c202a63031c6d3946c96be961
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] Soften branch filter for publish jobs - change (integration/config)

2014-11-26 Thread Hashar (Code Review)
Hashar has uploaded a new change for review.

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

Change subject: Soften branch filter for publish jobs
..

Soften branch filter for publish jobs

To be able to reuse the exact same job in postmerge and publish
pipeline, we need tweak the branch filter which is usually set to
'^master$', the reason is that the event for a new tag lack a branch and
Zuul fallback to matching the ref (ex: refs/tags/1.24.0).

Lot of publish jobs have branch: '^master$', that can be removed as we
add them to their projects publish: pipeline.

T75991

Change-Id: I3f06f8f9101a29949741171dfdce0d7585c90dc5
---
M zuul/layout.yaml
1 file changed, 4 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/77/175977/1

diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index ca5c69e..8449351 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -331,6 +331,10 @@
 
   - name: ^.*-publish$
 parameter-function: set_doc_subpath
+# Only build master for merged change (postmerge) and allow tags (publish)
+# ref-updated events are matched by the branch: filter as well:
+# https://review.openstack.org/14096  T75991
+branch: ^(master|refs/tags/.*)$
 
   # Experiment for analytics/kraken repository
   - name: analytics-kraken

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3f06f8f9101a29949741171dfdce0d7585c90dc5
Gerrit-PatchSet: 1
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Hashar has...@free.fr

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


[MediaWiki-commits] [Gerrit] Generate mw/core doxygen on new release - change (integration/config)

2014-11-26 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Generate mw/core doxygen on new release
..


Generate mw/core doxygen on new release

Add mediawiki-core-doxygen-publish to the `publish` pipeline which
should generate doxygen documentation for a new MediaWiki release.

Adjust the job branch: filter to accept tags ref-updates events
according to source code https://review.openstack.org/14096

Change-Id: I90f044ea78c1f87cd1720ace04c63ccbc88a7a41
---
M zuul/layout.yaml
1 file changed, 2 insertions(+), 1 deletion(-)

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



diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index ca5c69e..179da76 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -1616,7 +1616,7 @@
 voting: false
 
   - name: mediawiki-core-doxygen-publish
-branch: ^(master|REL.*)$ # bug 50325
+branch: ^(master|REL.*|refs/tags/.*)$ # REL is bug 50325
 
   - name: mediawiki-phpunit
 queue-name: mediawiki
@@ -1945,6 +1945,7 @@
   #- mediawiki-core-regression-phpcs-HEAD
   - mediawiki-core-doxygen-publish
 publish:
+  - mediawiki-core-doxygen-publish
   - mediawiki-core-release
 
   - name: mediawiki/vendor

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I90f044ea78c1f87cd1720ace04c63ccbc88a7a41
Gerrit-PatchSet: 4
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Hashar has...@free.fr
Gerrit-Reviewer: Hashar has...@free.fr
Gerrit-Reviewer: MarkAHershberger m...@nichework.com
Gerrit-Reviewer: Mglaser gla...@hallowelt.biz
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 tests - change (phabricator...Sprint)

2014-11-26 Thread Christopher Johnson (WMDE) (Code Review)
Christopher Johnson (WMDE) has uploaded a new change for review.

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

Change subject: fix tests
..

fix tests

Change-Id: I38883e697fdd18a060216648a4ac6822ddbd5d32
---
M src/__phutil_library_map__.php
D src/tests/BurndownControllerTest.php
R src/tests/SprintApplicationTest.php
A src/tests/SprintControllerTest.php
4 files changed, 15 insertions(+), 15 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/phabricator/extensions/Sprint 
refs/changes/78/175978/1

diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php
index 6794f00..e5cd7a1 100644
--- a/src/__phutil_library_map__.php
+++ b/src/__phutil_library_map__.php
@@ -11,8 +11,6 @@
   'class' = array(
 'AutoLoader' = 'tests/Autoloader.php',
 'BurndownActionMenuEventListener' = 
'events/BurndownActionMenuEventListener.php',
-'BurndownApplicationTest' = 'tests/BurndownApplicationTest.php',
-'BurndownControllerTest' = 'tests/BurndownControllerTest.php',
 'BurndownDataDate' = 'util/BurndownDataDate.php',
 'BurndownDataDateTest' = 'tests/BurndownDataDateTest.php',
 'BurndownDataView' = 'view/BurndownDataView.php',
@@ -25,6 +23,7 @@
 'OpenTasksView' = 'view/OpenTasksView.php',
 'ProjectOpenTasksView' = 'view/ProjectOpenTasksView.php',
 'SprintApplication' = 'application/SprintApplication.php',
+'SprintApplicationTest' = 'tests/SprintApplicationTest.php',
 'SprintBeginDateField' = 'customfield/SprintBeginDateField.php',
 'SprintBoardColumnDetailController' = 
'controller/SprintBoardColumnDetailController.php',
 'SprintBoardColumnEditController' = 
'controller/SprintBoardColumnEditController.php',
@@ -40,6 +39,7 @@
 'SprintBuildStatsTest' = 'tests/SprintBuildStatsTest.php',
 'SprintConstants' = 'constants/SprintConstants.php',
 'SprintController' = 'controller/SprintController.php',
+'SprintControllerTest' = 'tests/SprintControllerTest.php',
 'SprintEndDateField' = 'customfield/SprintEndDateField.php',
 'SprintProjectCustomField' = 'customfield/SprintProjectCustomField.php',
 'SprintProjectProfileController' = 
'controller/SprintProjectProfileController.php',
@@ -61,8 +61,6 @@
   'function' = array(),
   'xmap' = array(
 'BurndownActionMenuEventListener' = 'PhabricatorEventListener',
-'BurndownApplicationTest' = 'SprintTestCase',
-'BurndownControllerTest' = 'SprintTestCase',
 'BurndownDataDateTest' = 'SprintTestCase',
 'BurndownDataView' = 'SprintView',
 'BurndownDataViewController' = 'SprintController',
@@ -72,6 +70,7 @@
 'DateIterator' = 'Iterator',
 'ProjectOpenTasksView' = 'OpenTasksView',
 'SprintApplication' = 'PhabricatorApplication',
+'SprintApplicationTest' = 'SprintTestCase',
 'SprintBeginDateField' = 'SprintProjectCustomField',
 'SprintBoardColumnDetailController' = 'SprintBoardController',
 'SprintBoardColumnEditController' = 'SprintBoardController',
@@ -84,6 +83,7 @@
 'SprintBoardViewController' = 'SprintBoardController',
 'SprintBuildStatsTest' = 'SprintTestCase',
 'SprintController' = 'PhabricatorController',
+'SprintControllerTest' = 'SprintTestCase',
 'SprintEndDateField' = 'SprintProjectCustomField',
 'SprintProjectCustomField' = array(
   'PhabricatorProjectCustomField',
diff --git a/src/tests/BurndownControllerTest.php 
b/src/tests/BurndownControllerTest.php
deleted file mode 100644
index 1b9f681..000
--- a/src/tests/BurndownControllerTest.php
+++ /dev/null
@@ -1,4 +0,0 @@
-?php
-final class BurndownControllerTest extends SprintTestCase {
-
-}
\ No newline at end of file
diff --git a/src/tests/BurndownApplicationTest.php 
b/src/tests/SprintApplicationTest.php
similarity index 77%
rename from src/tests/BurndownApplicationTest.php
rename to src/tests/SprintApplicationTest.php
index b25052d..115b662 100644
--- a/src/tests/BurndownApplicationTest.php
+++ b/src/tests/SprintApplicationTest.php
@@ -1,38 +1,38 @@
 ?php
-final class BurndownApplicationTest extends SprintTestCase {
+final class SprintApplicationTest extends SprintTestCase {
 
   public function testGetName () {
-$burndown_application = new BurndownApplication;
+$burndown_application = new SprintApplication;
 $name = $burndown_application-getName();
 $this-assertEquals('Sprint', $name);
   }
 
   public function testBaseURI () {
-$burndown_application = new BurndownApplication;
+$burndown_application = new SprintApplication;
 $baseURI = $burndown_application-getBaseURI();
 $this-assertEquals('/sprint/report/', $baseURI);
   }
 
   public function testgetIconName() {
-$burndown_application = new BurndownApplication;
+$burndown_application = new SprintApplication;
 $icon_name = $burndown_application-getIconName();
 $this-assertEquals('slowvote', $icon_name);
   }
 
   public function testgetShortDescription() {
-$burndown_application = new 

[MediaWiki-commits] [Gerrit] fix tests - change (phabricator...Sprint)

2014-11-26 Thread Christopher Johnson (WMDE) (Code Review)
Christopher Johnson (WMDE) has submitted this change and it was merged.

Change subject: fix tests
..


fix tests

Change-Id: I38883e697fdd18a060216648a4ac6822ddbd5d32
---
M src/__phutil_library_map__.php
D src/tests/BurndownControllerTest.php
R src/tests/SprintApplicationTest.php
A src/tests/SprintControllerTest.php
4 files changed, 15 insertions(+), 15 deletions(-)

Approvals:
  Christopher Johnson (WMDE): Verified; Looks good to me, approved



diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php
index 6794f00..e5cd7a1 100644
--- a/src/__phutil_library_map__.php
+++ b/src/__phutil_library_map__.php
@@ -11,8 +11,6 @@
   'class' = array(
 'AutoLoader' = 'tests/Autoloader.php',
 'BurndownActionMenuEventListener' = 
'events/BurndownActionMenuEventListener.php',
-'BurndownApplicationTest' = 'tests/BurndownApplicationTest.php',
-'BurndownControllerTest' = 'tests/BurndownControllerTest.php',
 'BurndownDataDate' = 'util/BurndownDataDate.php',
 'BurndownDataDateTest' = 'tests/BurndownDataDateTest.php',
 'BurndownDataView' = 'view/BurndownDataView.php',
@@ -25,6 +23,7 @@
 'OpenTasksView' = 'view/OpenTasksView.php',
 'ProjectOpenTasksView' = 'view/ProjectOpenTasksView.php',
 'SprintApplication' = 'application/SprintApplication.php',
+'SprintApplicationTest' = 'tests/SprintApplicationTest.php',
 'SprintBeginDateField' = 'customfield/SprintBeginDateField.php',
 'SprintBoardColumnDetailController' = 
'controller/SprintBoardColumnDetailController.php',
 'SprintBoardColumnEditController' = 
'controller/SprintBoardColumnEditController.php',
@@ -40,6 +39,7 @@
 'SprintBuildStatsTest' = 'tests/SprintBuildStatsTest.php',
 'SprintConstants' = 'constants/SprintConstants.php',
 'SprintController' = 'controller/SprintController.php',
+'SprintControllerTest' = 'tests/SprintControllerTest.php',
 'SprintEndDateField' = 'customfield/SprintEndDateField.php',
 'SprintProjectCustomField' = 'customfield/SprintProjectCustomField.php',
 'SprintProjectProfileController' = 
'controller/SprintProjectProfileController.php',
@@ -61,8 +61,6 @@
   'function' = array(),
   'xmap' = array(
 'BurndownActionMenuEventListener' = 'PhabricatorEventListener',
-'BurndownApplicationTest' = 'SprintTestCase',
-'BurndownControllerTest' = 'SprintTestCase',
 'BurndownDataDateTest' = 'SprintTestCase',
 'BurndownDataView' = 'SprintView',
 'BurndownDataViewController' = 'SprintController',
@@ -72,6 +70,7 @@
 'DateIterator' = 'Iterator',
 'ProjectOpenTasksView' = 'OpenTasksView',
 'SprintApplication' = 'PhabricatorApplication',
+'SprintApplicationTest' = 'SprintTestCase',
 'SprintBeginDateField' = 'SprintProjectCustomField',
 'SprintBoardColumnDetailController' = 'SprintBoardController',
 'SprintBoardColumnEditController' = 'SprintBoardController',
@@ -84,6 +83,7 @@
 'SprintBoardViewController' = 'SprintBoardController',
 'SprintBuildStatsTest' = 'SprintTestCase',
 'SprintController' = 'PhabricatorController',
+'SprintControllerTest' = 'SprintTestCase',
 'SprintEndDateField' = 'SprintProjectCustomField',
 'SprintProjectCustomField' = array(
   'PhabricatorProjectCustomField',
diff --git a/src/tests/BurndownControllerTest.php 
b/src/tests/BurndownControllerTest.php
deleted file mode 100644
index 1b9f681..000
--- a/src/tests/BurndownControllerTest.php
+++ /dev/null
@@ -1,4 +0,0 @@
-?php
-final class BurndownControllerTest extends SprintTestCase {
-
-}
\ No newline at end of file
diff --git a/src/tests/BurndownApplicationTest.php 
b/src/tests/SprintApplicationTest.php
similarity index 77%
rename from src/tests/BurndownApplicationTest.php
rename to src/tests/SprintApplicationTest.php
index b25052d..115b662 100644
--- a/src/tests/BurndownApplicationTest.php
+++ b/src/tests/SprintApplicationTest.php
@@ -1,38 +1,38 @@
 ?php
-final class BurndownApplicationTest extends SprintTestCase {
+final class SprintApplicationTest extends SprintTestCase {
 
   public function testGetName () {
-$burndown_application = new BurndownApplication;
+$burndown_application = new SprintApplication;
 $name = $burndown_application-getName();
 $this-assertEquals('Sprint', $name);
   }
 
   public function testBaseURI () {
-$burndown_application = new BurndownApplication;
+$burndown_application = new SprintApplication;
 $baseURI = $burndown_application-getBaseURI();
 $this-assertEquals('/sprint/report/', $baseURI);
   }
 
   public function testgetIconName() {
-$burndown_application = new BurndownApplication;
+$burndown_application = new SprintApplication;
 $icon_name = $burndown_application-getIconName();
 $this-assertEquals('slowvote', $icon_name);
   }
 
   public function testgetShortDescription() {
-$burndown_application = new BurndownApplication;
+$burndown_application = new 

[MediaWiki-commits] [Gerrit] Make stuff in CachingEntityRevisionLookup private - change (mediawiki...Wikibase)

2014-11-26 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Make stuff in CachingEntityRevisionLookup private
..


Make stuff in CachingEntityRevisionLookup private

Change-Id: I4aa42518308c641b2d90c775c0c5c39afbdd01cb
---
M lib/includes/store/CachingEntityRevisionLookup.php
1 file changed, 6 insertions(+), 6 deletions(-)

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



diff --git a/lib/includes/store/CachingEntityRevisionLookup.php 
b/lib/includes/store/CachingEntityRevisionLookup.php
index cc512bf..968e403 100644
--- a/lib/includes/store/CachingEntityRevisionLookup.php
+++ b/lib/includes/store/CachingEntityRevisionLookup.php
@@ -19,31 +19,31 @@
/**
 * @var EntityRevisionLookup
 */
-   protected $lookup;
+   private $lookup;
 
/**
 * The cache to use for caching entities.
 *
 * @var BagOStuff
 */
-   protected $cache;
+   private $cache;
 
/**
 * @var int $cacheTimeout
 */
-   protected $cacheTimeout;
+   private $cacheTimeout;
 
/**
 * The key prefix to use when caching entities in memory.
 *
 * @var $cacheKeyPrefix
 */
-   protected $cacheKeyPrefix;
+   private $cacheKeyPrefix;
 
/**
 * @var bool $shouldVerifyRevision
 */
-   protected $shouldVerifyRevision;
+   private $shouldVerifyRevision;
 
/**
 * @param EntityRevisionLookup $entityRevisionLookup The lookup to use
@@ -81,7 +81,7 @@
 *
 * @return String
 */
-   protected function getCacheKey( EntityId $entityId ) {
+   private function getCacheKey( EntityId $entityId ) {
$cacheKey = $this-cacheKeyPrefix . ':' . 
$entityId-getSerialization();
 
return $cacheKey;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4aa42518308c641b2d90c775c0c5c39afbdd01cb
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Thiemo Mättig (WMDE) thiemo.maet...@wikimedia.de
Gerrit-Reviewer: Jeroen De Dauw jeroended...@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] Act on TODO: rename getRevision to getRevisionId - change (mediawiki...Wikibase)

2014-11-26 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Act on TODO: rename getRevision to getRevisionId
..


Act on TODO: rename getRevision to getRevisionId

Change-Id: Ifd2885d5991dd93ee47a7212e635545b3962163a
---
M lib/includes/store/CachingEntityRevisionLookup.php
M lib/includes/store/EntityRevision.php
M lib/tests/phpunit/MockRepository.php
M lib/tests/phpunit/MockRepositoryTest.php
M lib/tests/phpunit/store/CachingEntityRevisionLookupTest.php
M repo/includes/EditEntity.php
M repo/includes/EntityView.php
M repo/includes/api/MergeItems.php
M repo/includes/api/ModifyEntity.php
M repo/includes/api/ResultBuilder.php
M repo/includes/rdf/RdfSerializer.php
M repo/includes/specials/SpecialMergeItems.php
M repo/tests/phpunit/includes/ContentRetrieverTest.php
M repo/tests/phpunit/includes/LinkedData/EntityDataTestProvider.php
M repo/tests/phpunit/includes/actions/ActionTestCase.php
M repo/tests/phpunit/includes/api/SetClaimTest.php
M repo/tests/phpunit/includes/rdf/RdfBuilderTest.php
M repo/tests/phpunit/includes/store/WikiPageEntityRevisionLookupTest.php
M repo/tests/phpunit/includes/store/sql/WikiPageEntityStoreTest.php
19 files changed, 49 insertions(+), 47 deletions(-)

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



diff --git a/lib/includes/store/CachingEntityRevisionLookup.php 
b/lib/includes/store/CachingEntityRevisionLookup.php
index 8db4bef..cc512bf 100644
--- a/lib/includes/store/CachingEntityRevisionLookup.php
+++ b/lib/includes/store/CachingEntityRevisionLookup.php
@@ -104,6 +104,7 @@
wfProfileIn( __METHOD__ );
$key = $this-getCacheKey( $entityId );
 
+   /** @var EntityRevision $entityRevision */
$entityRevision = $this-cache-get( $key );
 
if ( $entityRevision !== false ) {
@@ -117,7 +118,7 @@
}
}
 
-   if ( $revisionId !== 0  
$entityRevision-getRevision() !== $revisionId ) {
+   if ( $revisionId !== 0  
$entityRevision-getRevisionId() !== $revisionId ) {
$entityRevision = false;
}
}
@@ -174,10 +175,11 @@
public function getLatestRevisionId( EntityId $entityId ) {
if ( !$this-shouldVerifyRevision ) {
$key = $this-getCacheKey( $entityId );
+   /** @var EntityRevision $entityRevision */
$entityRevision = $this-cache-get( $key );
 
if ( $entityRevision ) {
-   return $entityRevision-getRevision();
+   return $entityRevision-getRevisionId();
}
}
 
diff --git a/lib/includes/store/EntityRevision.php 
b/lib/includes/store/EntityRevision.php
index cffb4fa..7c4cc45 100644
--- a/lib/includes/store/EntityRevision.php
+++ b/lib/includes/store/EntityRevision.php
@@ -60,11 +60,10 @@
 
/**
 * @see Revision::getId
-* @todo Rename to getRevisionId, it does not return a Revision.
 *
 * @return int
 */
-   public function getRevision() {
+   public function getRevisionId() {
return $this-revisionId;
}
 
diff --git a/lib/tests/phpunit/MockRepository.php 
b/lib/tests/phpunit/MockRepository.php
index c82a5f8..2bf3b96 100644
--- a/lib/tests/phpunit/MockRepository.php
+++ b/lib/tests/phpunit/MockRepository.php
@@ -145,7 +145,7 @@
$entityRev = $revisions[$revision];
$entityRev = new EntityRevision( // return a copy!
$entityRev-getEntity()-copy(), // return a copy!
-   $entityRev-getRevision(),
+   $entityRev-getRevisionId(),
$entityRev-getTimestamp()
);
 
@@ -629,7 +629,7 @@
public function getLatestRevisionId( EntityId $entityId ) {
$rev = $this-getEntityRevision( $entityId );
 
-   return $rev === null ? false : $rev-getRevision();
+   return $rev === null ? false : $rev-getRevisionId();
}
 
/**
@@ -666,7 +666,7 @@
throw new StorageException( 'No base revision found for 
' . $id-getSerialization() );
}
 
-   if ( $baseRevId !== false  $this-getEntityRevision( $id 
)-getRevision() !== $baseRevId ) {
+   if ( $baseRevId !== false  $this-getEntityRevision( $id 
)-getRevisionId() !== $baseRevId ) {
$status-fatal( 'edit-conflict' );
}
 
@@ -676,7 +676,7 @@
 
$entityRevision = $this-putEntity( $entity, 0, 0, $user );
 
-   $this-putLog( $entityRevision-getRevision(), 
$entity-getId(), $summary, $user-getName() );
+   $this-putLog( 

[MediaWiki-commits] [Gerrit] Use the same EntityInfo for JS and PHP - change (mediawiki...Wikibase)

2014-11-26 Thread Adrian Lang (Code Review)
Adrian Lang has submitted this change and it was merged.

Change subject: Use the same EntityInfo for JS and PHP
..


Use the same EntityInfo for JS and PHP

Change-Id: I8d315d039cd1145b430cc3bc108f5b9b6e1c5533
---
M repo/includes/EntityParserOutputGenerator.php
1 file changed, 5 insertions(+), 27 deletions(-)

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



diff --git a/repo/includes/EntityParserOutputGenerator.php 
b/repo/includes/EntityParserOutputGenerator.php
index 1223fdf..8ef03f7 100644
--- a/repo/includes/EntityParserOutputGenerator.php
+++ b/repo/includes/EntityParserOutputGenerator.php
@@ -118,7 +118,7 @@
}
 
$usedEntityIds = 
$this-referencedEntitiesFinder-findSnakLinks( $snaks );
-   $entityInfo = $this-getEntityInfoForJsConfig( $usedEntityIds );
+   $entityInfo = $this-getEntityInfo( $usedEntityIds );
 
$configVars = $this-configBuilder-build( $entity, $entityInfo 
);
$parserOutput-addJsConfigVars( $configVars );
@@ -210,13 +210,12 @@
}
 
/**
-* Fetches some basic entity information required for the entity view 
in JavaScript from a
-* set of entity IDs.
+* Fetches some basic entity information from a set of entity IDs.
 *
 * @param EntityId[] $entityIds
 * @return array obtained from EntityInfoBuilder::getEntityInfo
 */
-   private function getEntityInfoForJsConfig( array $entityIds ) {
+   private function getEntityInfo( array $entityIds ) {
wfProfileIn( __METHOD__ );
 
// @todo: use same instance of entity info, as for the view 
(see below)
@@ -243,27 +242,6 @@
}
 
/**
-* @param EntityId[] $entityIds
-* @return array obtained from EntityInfoBuilder::getEntityInfo
-*/
-   private function getEntityInfoForView( array $entityIds ) {
-   $propertyIds = array_filter( $entityIds, function ( EntityId 
$id ) {
-   return $id-getEntityType() === Property::ENTITY_TYPE;
-   } );
-
-   $entityInfoBuilder = 
$this-entityInfoBuilderFactory-newEntityInfoBuilder( $propertyIds );
-
-   $entityInfoBuilder-removeMissing();
-
-   $entityInfoBuilder-collectTerms(
-   array( 'label', 'description' ),
-   array( $this-languageCode )
-   );
-
-   return $entityInfoBuilder-getEntityInfo();
-   }
-
-   /**
 * @param ParserOutput $parserOutput
 * @param SiteLinkList $siteLinkList
 */
@@ -287,13 +265,13 @@
array $entityIds,
$editable
) {
+   $entityInfo = $this-getEntityInfo( $entityIds );
+
$entityView = $this-entityViewFactory-newEntityView(
$this-languageFallbackChain,
$this-languageCode,
$entityRevision-getEntity()-getType()
);
-
-   $entityInfo = $this-getEntityInfoForView( $entityIds );
 
$html = $entityView-getHtml( $entityRevision, $entityInfo, 
$editable );
$parserOutput-setText( $html );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8d315d039cd1145b430cc3bc108f5b9b6e1c5533
Gerrit-PatchSet: 5
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Adrian Lang adrian.l...@wikimedia.de
Gerrit-Reviewer: Adrian Lang adrian.l...@wikimedia.de
Gerrit-Reviewer: Daniel Kinzler daniel.kinz...@wikimedia.de
Gerrit-Reviewer: Jeroen De Dauw jeroended...@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] WIP: Add ContentTranslation in wikishared DB - change (operations/mediawiki-config)

2014-11-26 Thread KartikMistry (Code Review)
KartikMistry has uploaded a new change for review.

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

Change subject: WIP: Add ContentTranslation in wikishared DB
..

WIP: Add ContentTranslation in wikishared DB

Depends on: https://gerrit.wikimedia.org/r/175955

Change-Id: Ia1151462fcf2d4831ffef5146dd90573cc0b831f
---
M wmf-config/CommonSettings-labs.php
1 file changed, 6 insertions(+), 1 deletion(-)


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

diff --git a/wmf-config/CommonSettings-labs.php 
b/wmf-config/CommonSettings-labs.php
index c5c9af7..b41dfb0 100644
--- a/wmf-config/CommonSettings-labs.php
+++ b/wmf-config/CommonSettings-labs.php
@@ -89,7 +89,7 @@
 }
 
 if ( $wmgUseContentTranslation ) {
-   require_once( 
$IP/extensions/ContentTranslation/ContentTranslation.php );
+   require_once $IP/extensions/ContentTranslation/ContentTranslation.php;
$wgContentTranslationServerURL = 'https://cxserver-beta.wmflabs.org';
$wgContentTranslationSiteTemplates['cx'] = 
'https://cxserver-beta.wmflabs.org/page/$1/$2';
// Used for html2wikitext when publishing
@@ -100,7 +100,12 @@
);
 
$wgContentTranslationEventLogging = $wmgContentTranslationEventLogging;
+}
 
+if ( $wmgUseContentTranslationCluster ) {
+   require_once $IP/extensions/ContentTranslation/ContentTranslation.php;
+   $wgContentTranslationCluster = 'extension1';
+   $wgContentTranslationDatabase = 'wikishared';
 }
 
 if ( $wmgUseCentralNotice ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia1151462fcf2d4831ffef5146dd90573cc0b831f
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: KartikMistry kartik.mis...@gmail.com

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


[MediaWiki-commits] [Gerrit] Move window managers to sub folder - change (VisualEditor/VisualEditor)

2014-11-26 Thread Esanders (Code Review)
Esanders has uploaded a new change for review.

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

Change subject: Move window managers to sub folder
..

Move window managers to sub folder

Also rename DesktopInspectorManager to DesktopInspectorWindowManager

Change-Id: I3d8179f9f34e7b7598a58141c4af06fb5bd3cfad
---
M .docs/categories.json
M .docs/eg-iframe.html
M build/modules.json
M demos/ve/desktop.html
M demos/ve/mobile.html
M src/ui/ve.ui.DesktopContext.js
D src/ui/ve.ui.DesktopInspectorManager.js
M src/ui/ve.ui.WindowManager.js
A src/ui/windowmanagers/ve.ui.DesktopInspectorWindowManager.js
R src/ui/windowmanagers/ve.ui.MobileWindowManager.js
M tests/index.html
11 files changed, 86 insertions(+), 90 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor 
refs/changes/80/175980/1

diff --git a/.docs/categories.json b/.docs/categories.json
index 4b06ec1..2d5707e 100644
--- a/.docs/categories.json
+++ b/.docs/categories.json
@@ -151,10 +151,6 @@
classes: [ve.ui.*Tool]
},
{
-   name: Inspectors,
-   classes: [ve.ui.*Inspector]
-   },
-   {
name: Widgets,
classes: [ve.ui.*Widget]
},
@@ -162,8 +158,8 @@
name: Windows,
classes: [
ve.ui.*WindowManager,
-   ve.ui.*InspectorManager,
-   ve.ui.*Dialog
+   ve.ui.*Dialog,
+   ve.ui.*Inspector
]
}
]
diff --git a/.docs/eg-iframe.html b/.docs/eg-iframe.html
index c33798f..c6170a1 100644
--- a/.docs/eg-iframe.html
+++ b/.docs/eg-iframe.html
@@ -348,7 +348,7 @@
!-- visualEditor.desktop.build --
script src=../src/ui/ve.ui.DesktopSurface.js/script
script src=../src/ui/ve.ui.DesktopContext.js/script
-   script 
src=../src/ui/ve.ui.DesktopInspectorManager.js/script
+   script 
src=../src/ui/windowmanagers/ve.ui.DesktopInspectorWindowManager.js/script
 
script
ve.init.platform.addMessagePath( '../i18n/' );
diff --git a/build/modules.json b/build/modules.json
index bf1ca70..2edf6ca 100644
--- a/build/modules.json
+++ b/build/modules.json
@@ -506,7 +506,7 @@
scripts: [
src/ui/ve.ui.DesktopSurface.js,
src/ui/ve.ui.DesktopContext.js,
-   src/ui/ve.ui.DesktopInspectorManager.js
+   
src/ui/windowmanagers/ve.ui.DesktopInspectorWindowManager.js
],
styles: [
src/ui/styles/ve.ui.DesktopContext.css
@@ -526,7 +526,7 @@
scripts: [
src/ui/ve.ui.MobileSurface.js,
src/ui/ve.ui.MobileContext.js,
-   src/ui/ve.ui.MobileWindowManager.js,
+   src/ui/windowmanagers/ve.ui.MobileWindowManager.js,
src/ui/widgets/ve.ui.MobileContextOptionWidget.js
],
styles: [
diff --git a/demos/ve/desktop.html b/demos/ve/desktop.html
index c10a1d8..31e8a72 100644
--- a/demos/ve/desktop.html
+++ b/demos/ve/desktop.html
@@ -361,7 +361,7 @@
!-- visualEditor.desktop.build --
script src=../../src/ui/ve.ui.DesktopSurface.js/script
script src=../../src/ui/ve.ui.DesktopContext.js/script
-   script 
src=../../src/ui/ve.ui.DesktopInspectorManager.js/script
+   script 
src=../../src/ui/windowmanagers/ve.ui.DesktopInspectorWindowManager.js/script
 
!-- visualEditor.standalone.demo --
script src=../../demos/ve/demo.js/script
diff --git a/demos/ve/mobile.html b/demos/ve/mobile.html
index ab9312c..501b96b 100644
--- a/demos/ve/mobile.html
+++ b/demos/ve/mobile.html
@@ -362,7 +362,7 @@
!-- visualEditor.mobile.build --
script src=../../src/ui/ve.ui.MobileSurface.js/script
script src=../../src/ui/ve.ui.MobileContext.js/script
-   script 
src=../../src/ui/ve.ui.MobileWindowManager.js/script
+   script 
src=../../src/ui/windowmanagers/ve.ui.MobileWindowManager.js/script
script 
src=../../src/ui/widgets/ve.ui.MobileContextOptionWidget.js/script
 
!-- visualEditor.standalone.demo --
diff --git a/src/ui/ve.ui.DesktopContext.js b/src/ui/ve.ui.DesktopContext.js
index 4ad991c..efd8e25 100644
--- a/src/ui/ve.ui.DesktopContext.js
+++ 

[MediaWiki-commits] [Gerrit] Remove @todo in phpunit tests - change (mediawiki...Wikibase)

2014-11-26 Thread Adrian Lang (Code Review)
Adrian Lang has uploaded a new change for review.

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

Change subject: Remove @todo in phpunit tests
..

Remove @todo in phpunit tests

Change-Id: Id1f3b2a0372b46a7bf7f0d70b142af227e5a393e
---
M repo/tests/phpunit/includes/api/GetEntitiesTest.php
M repo/tests/phpunit/includes/api/SetReferenceTest.php
2 files changed, 51 insertions(+), 23 deletions(-)


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

diff --git a/repo/tests/phpunit/includes/api/GetEntitiesTest.php 
b/repo/tests/phpunit/includes/api/GetEntitiesTest.php
index df854e3..38f957b 100644
--- a/repo/tests/phpunit/includes/api/GetEntitiesTest.php
+++ b/repo/tests/phpunit/includes/api/GetEntitiesTest.php
@@ -521,7 +521,6 @@
 
/**
 * @dataProvider provideLanguageFallback
-* @todo factor this into the main test method
 */
public function testLanguageFallback( $handle, $languages, 
$expectedLabels, $expectedDescriptions ) {
$id = EntityTestHelper::getId( $handle );
diff --git a/repo/tests/phpunit/includes/api/SetReferenceTest.php 
b/repo/tests/phpunit/includes/api/SetReferenceTest.php
index 69c4aff..6d64f39 100644
--- a/repo/tests/phpunit/includes/api/SetReferenceTest.php
+++ b/repo/tests/phpunit/includes/api/SetReferenceTest.php
@@ -310,37 +310,66 @@
}
 
/**
-* Currently tests bad calender model
-* @todo test more bad serializations...
+* @dataProvider provideInvalidSerializations
 */
-   public function testInvalidSerialization() {
+   public function testInvalidSerialization( $snaksSerialization ) {
$this-setExpectedException( 'UsageException' );
$params = array(
'action' = 'wbsetreference',
'statement' = 'Foo$Guid',
-   'snaks' = '{
-   P813:[
-  {
- snaktype:value,
- property:P813,
- datavalue:{
-value:{
-   time:+0002013-10-05T00:00:00Z,
-   timezone:0,
-   before:0,
-   after:0,
-   precision:11,
-   calendarmodel:FOOBAR :D
-},
-type:time
- }
-  }
-   ]
-}',
+   'snaks' = $snaksSerialization
);
$this-doApiRequestWithToken( $params );
}
 
+   public function provideInvalidSerializations() {
+   return array(
+   array(
+   '{
+P813:[
+   {
+snaktype:value,
+property:P813,
+datavalue:{
+   
value:{
+   
 time:+0002013-10-05T00:00:00Z,
+   
 timezone:0,
+   
 before:0,
+   
 after:0,
+   
 precision:11,
+   
 calendarmodel:FOOBAR :D
+   },
+   
type:time
+}
+   }
+]
+   }'
+   ),
+   array(
+   '{
+P813:[
+   {
+
snaktype:wubbledubble,
+property:P813,
+datavalue:{
+   
value:{
+   
 time:+0002013-10-05T00:00:00Z,
+   
 timezone:0,
+   
 before:0,
+   
 after:0,
+   
 precision:11,
+  

[MediaWiki-commits] [Gerrit] Added compatibility with non-BsBaseTemplate skins - change (mediawiki...BlueSpiceFoundation)

2014-11-26 Thread Smuggli (Code Review)
Smuggli has submitted this change and it was merged.

Change subject: Added compatibility with non-BsBaseTemplate skins
..


Added compatibility with non-BsBaseTemplate skins

... plus: Added some Vector specific styles

Change-Id: Ie9aca4417b9808f60d7ea3be184fdc29ff7945a5
---
M BlueSpice.hooks.php
M includes/CoreHooks.php
M resources/Resources.php
A resources/bluespice.compat/bluespice.compat.vector.fixes.css
4 files changed, 44 insertions(+), 2 deletions(-)

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



diff --git a/BlueSpice.hooks.php b/BlueSpice.hooks.php
index 6d6a654..b22a30b 100644
--- a/BlueSpice.hooks.php
+++ b/BlueSpice.hooks.php
@@ -10,7 +10,7 @@
 $wgHooks['userCan'][] = 'BsCoreHooks::onUserCan';
 $wgHooks['UploadVerification'][] = 'BsCoreHooks::onUploadVerification';
 $wgHooks['SkinTemplateOutputPageBeforeExec'][] = 
'BsCoreHooks::onSkinTemplateOutputPageBeforeExec';
-
+$wgHooks['SkinAfterContent'][] = 'BsCoreHooks::onSkinAfterContent';
 $wgHooks['UserAddGroup'][] = 'BsGroupHelper::addTemporaryGroupToUserHelper';
 
 // START cache invalidation hooks
diff --git a/includes/CoreHooks.php b/includes/CoreHooks.php
index e87a5b9..de06c38 100755
--- a/includes/CoreHooks.php
+++ b/includes/CoreHooks.php
@@ -68,6 +68,7 @@
$out-addModuleMessages( 'ext.bluespice.messages' );
$out-addModules( 'ext.bluespice.extjs' );
$out-addModuleStyles( 'ext.bluespice.extjs.styles' );
+   $out-addModuleStyles( 'ext.bluespice.compat.vector.styles' );
 
$wgFavicon = BsConfig::get( 'MW::FaviconPath' );
 
@@ -469,6 +470,37 @@
self::addDownloadTitleAction($skin, $template);
self::addProfilePageSettings($skin, $template);
 
+   //Compatibility to non-BsBaseTemplate skins
+   //This is pretty hacky because Skin-object won't expose 
Template-object
+   //in 'SkinAfterContent' hook (see below)
+   if( $template instanceof BsBaseTemplate === false ) {
+   self::$oCurrentTemplate = $template; //save for later 
use
+   }
+
+   return true;
+   }
+
+   protected static $oCurrentTemplate = null;
+
+   /**
+* At the moment this is just for compatibility to MediaWiki default
+* Vector skin. Unfortunately this is too late to add ResourceLoader
+* modules. Therefore the ext.bluespice.compat.vector.styles module 
get's
+* always added in BeforePageDisplay
+* @param string $data
+* @param Skin $skin
+* @return boolean
+*/
+   public static function onSkinAfterContent(  $data, $skin ) {
+   if( self::$oCurrentTemplate == null ) {
+   return false;
+   }
+
+   foreach( self::$oCurrentTemplate-data['bs_dataAfterContent'] 
as $sExtKey = $aData ) {
+   $data .= '!-- '.$sExtKey.' BEGIN --';
+   $data .= $aData['content'];
+   $data .= '!-- '.$sExtKey.' END --';
+   }
return true;
}
 
@@ -558,7 +590,7 @@
$template-data['bs_dataAfterContent']['profilepagesettings'] = 
array(
'position' = 5,
'label' = $sLabel,
-   'content' =  $oProfilePageSettingsView
+   'content' = $oProfilePageSettingsView
);
}
 }
\ No newline at end of file
diff --git a/resources/Resources.php b/resources/Resources.php
index f47177e..ebc791c 100644
--- a/resources/Resources.php
+++ b/resources/Resources.php
@@ -170,4 +170,10 @@
)
 ) + $aResourceModuleTemplate;
 
+$wgResourceModules['ext.bluespice.compat.vector.styles'] = array(
+   'styles' = array(
+   'bluespice.compat/bluespice.compat.vector.fixes.css'
+   )
+) + $aResourceModuleTemplate;
+
 unset( $aResourceModuleTemplate );
diff --git a/resources/bluespice.compat/bluespice.compat.vector.fixes.css 
b/resources/bluespice.compat/bluespice.compat.vector.fixes.css
new file mode 100644
index 000..d53def2
--- /dev/null
+++ b/resources/bluespice.compat/bluespice.compat.vector.fixes.css
@@ -0,0 +1,4 @@
+.skin-vector h5.bs-widget-title {
+   font-size: 80%;
+   border-bottom: 1px solid;
+}
\ No newline at end of file

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie9aca4417b9808f60d7ea3be184fdc29ff7945a5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceFoundation
Gerrit-Branch: master
Gerrit-Owner: Robert Vogel vo...@hallowelt.biz
Gerrit-Reviewer: Mglaser gla...@hallowelt.biz
Gerrit-Reviewer: Pigpen reym...@hallowelt.biz
Gerrit-Reviewer: Smuggli mug...@hallowelt.biz
Gerrit-Reviewer: jenkins-bot 


[MediaWiki-commits] [Gerrit] Removed some BsBaseTemplate switches - change (mediawiki...BlueSpiceExtensions)

2014-11-26 Thread Smuggli (Code Review)
Smuggli has submitted this change and it was merged.

Change subject: Removed some BsBaseTemplate switches
..


Removed some BsBaseTemplate switches

... that get unnecessary with https://gerrit.wikimedia.org/r/#/c/175674/

NOTE: There are still such switches for left navigation in code that
should be removed too!

Change-Id: Iede97c37c8c7e4b354a0fb2abcf4558a63a38a76
---
M Authors/Authors.class.php
M Readers/Readers.class.php
M ShoutBox/ShoutBox.class.php
3 files changed, 2 insertions(+), 7 deletions(-)

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



diff --git a/Authors/Authors.class.php b/Authors/Authors.class.php
index 63580c8..8dc5186 100644
--- a/Authors/Authors.class.php
+++ b/Authors/Authors.class.php
@@ -163,10 +163,6 @@
return true;
}
 
-   if ( !( $tpl instanceof BsBaseTemplate ) ) {
-   return true;
-   }
-
$aDetails = array();
$oAuthorsView = $this-getAuthorsViewForAfterContent( 
$sktemplate, $aDetails );
$tpl-data['bs_dataAfterContent']['bs-authors'] = array(
diff --git a/Readers/Readers.class.php b/Readers/Readers.class.php
index 4769f27..6c5607c 100644
--- a/Readers/Readers.class.php
+++ b/Readers/Readers.class.php
@@ -199,8 +199,7 @@
 */
public function onSkinTemplateOutputPageBeforeExec( $sktemplate, $tpl 
) {
if ( $this-checkContext() === false ||
-   !$sktemplate-getTitle()-userCan( 
'viewreaders' ) ||
-   !( $tpl instanceof BsBaseTemplate ) ) {
+   !$sktemplate-getTitle()-userCan( 
'viewreaders' ) ) {
return true;
}
if ( !$sktemplate-getTitle()-userCan( 'viewreaders' ) ) {
diff --git a/ShoutBox/ShoutBox.class.php b/ShoutBox/ShoutBox.class.php
index 2ae258e..ad53595 100644
--- a/ShoutBox/ShoutBox.class.php
+++ b/ShoutBox/ShoutBox.class.php
@@ -229,7 +229,7 @@
 * @return bool always true
 */
public function onSkinTemplateOutputPageBeforeExec( $sktemplate, $tpl 
) {
-   if ( !BsExtensionManager::isContextActive( 'MW::ShoutboxShow' ) 
|| !( $tpl instanceof BsBaseTemplate ) ) {
+   if ( !BsExtensionManager::isContextActive( 'MW::ShoutboxShow' ) 
) {
return true;
}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iede97c37c8c7e4b354a0fb2abcf4558a63a38a76
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions
Gerrit-Branch: master
Gerrit-Owner: Robert Vogel vo...@hallowelt.biz
Gerrit-Reviewer: Mglaser gla...@hallowelt.biz
Gerrit-Reviewer: Pigpen reym...@hallowelt.biz
Gerrit-Reviewer: Smuggli mug...@hallowelt.biz
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Use selected annotations when replacing content - change (VisualEditor/VisualEditor)

2014-11-26 Thread Esanders (Code Review)
Esanders has uploaded a new change for review.

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

Change subject: Use selected annotations when replacing content
..

Use selected annotations when replacing content

If you select some content which is consistently annotated
and replace it you'd expect your replacement to maintain
those annotations.

Change-Id: I6f6b0af1fd548bd5c20f7ba03f8c769c99bec999
---
M src/dm/ve.dm.SurfaceFragment.js
1 file changed, 9 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor 
refs/changes/82/175982/1

diff --git a/src/dm/ve.dm.SurfaceFragment.js b/src/dm/ve.dm.SurfaceFragment.js
index 37f4c19..d3e0b2a 100644
--- a/src/dm/ve.dm.SurfaceFragment.js
+++ b/src/dm/ve.dm.SurfaceFragment.js
@@ -707,11 +707,14 @@
return this;
}
 
+   var annotations, tx, offset, newRange;
+
if ( !this.getSelection( true ).isCollapsed() ) {
+   // If we're replacing content, use the annotations selected
+   // instead of continuing from the left
+   annotations = this.getAnnotations();
this.removeContent();
}
-
-   var annotations, tx, offset, newRange;
 
offset = this.getSelection( true ).getRange().start;
// Auto-convert content to array of plain text characters
@@ -719,15 +722,15 @@
content = content.split( '' );
}
if ( content.length ) {
-   if ( annotate ) {
+   if ( annotate  !annotations ) {
// TODO: Don't reach into properties of document
// FIXME: the logic we actually need for annotating 
inserted content correctly
// is MUCH more complicated
annotations = this.document.data
.getAnnotationsFromOffset( offset === 0 ? 0 : 
offset - 1 );
-   if ( annotations.getLength()  0 ) {
-   ve.dm.Document.static.addAnnotationsToData( 
content, annotations );
-   }
+   }
+   if ( annotations  annotations.getLength()  0 ) {
+   ve.dm.Document.static.addAnnotationsToData( content, 
annotations );
}
tx = ve.dm.Transaction.newFromInsertion(
this.document,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6f6b0af1fd548bd5c20f7ba03f8c769c99bec999
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/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] Remove static from WikibaseValueFormatterBuilders - change (mediawiki...Wikibase)

2014-11-26 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Remove static from WikibaseValueFormatterBuilders
..


Remove static from WikibaseValueFormatterBuilders

Change-Id: I20423bd8495a80988cc70f4790e095888bb2c41e
---
M lib/includes/formatters/WikibaseValueFormatterBuilders.php
1 file changed, 23 insertions(+), 40 deletions(-)

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



diff --git a/lib/includes/formatters/WikibaseValueFormatterBuilders.php 
b/lib/includes/formatters/WikibaseValueFormatterBuilders.php
index df49be9..cee71f6 100644
--- a/lib/includes/formatters/WikibaseValueFormatterBuilders.php
+++ b/lib/includes/formatters/WikibaseValueFormatterBuilders.php
@@ -2,6 +2,7 @@
 
 namespace Wikibase\Lib;
 
+use Closure;
 use DataValues\Geo\Formatters\GeoCoordinateFormatter;
 use DataValues\Geo\Formatters\GlobeCoordinateFormatter;
 use InvalidArgumentException;
@@ -70,10 +71,10 @@
// formatters to use for plain text output
SnakFormatter::FORMAT_PLAIN = array(
'VT:string' = 'ValueFormatters\StringFormatter',
-   'VT:globecoordinate' = array( 
'Wikibase\Lib\WikibaseValueFormatterBuilders', 'newGlobeCoordinateFormatter' ),
-   'VT:quantity' =  array( 
'Wikibase\Lib\WikibaseValueFormatterBuilders', 'newQuantityFormatter' ),
+   'VT:globecoordinate' = array( 'this', 
'newGlobeCoordinateFormatter' ),
+   'VT:quantity' =  array( 'this', 'newQuantityFormatter' 
),
'VT:time' = 'Wikibase\Lib\MwTimeIsoFormatter',
-   'VT:wikibase-entityid' = array( 
'Wikibase\Lib\WikibaseValueFormatterBuilders', 'newEntityIdFormatter' ),
+   'VT:wikibase-entityid' = array( 'this', 
'newEntityIdFormatter' ),
'VT:bad' = 
'Wikibase\Lib\UnDeserializableValueFormatter',
'VT:monolingualtext' = 
'Wikibase\Formatters\MonolingualTextFormatter',
),
@@ -91,8 +92,8 @@
SnakFormatter::FORMAT_HTML = array(
'PT:url' = 'Wikibase\Lib\HtmlUrlFormatter',
'PT:commonsMedia' = 
'Wikibase\Lib\CommonsLinkFormatter',
-   'PT:wikibase-item' =  array( 
'Wikibase\Lib\WikibaseValueFormatterBuilders', 'newEntityIdHtmlLinkFormatter' ),
-   'VT:time' = array( 
'Wikibase\Lib\WikibaseValueFormatterBuilders', 'newHtmlTimeFormatter' ),
+   'PT:wikibase-item' =  array( 'this', 
'newEntityIdHtmlLinkFormatter' ),
+   'VT:time' = array( 'this', 'newHtmlTimeFormatter' ),
'VT:monolingualtext' = 
'Wikibase\Formatters\MonolingualHtmlFormatter',
),
 
@@ -484,8 +485,14 @@
$obj = $spec;
} elseif ( is_string( $spec ) ) {
$obj = new $spec( $options );
-   } else {
+   } elseif ( $spec instanceof Closure ) {
$obj = call_user_func( $spec, $options, $this );
+   } elseif ( $spec instanceof ValueFormatter ) {
+   $obj = $spec;
+   } elseif ( is_array( $spec )  $spec[0] === 'this' ) {
+   $obj = call_user_func( array( $this, $spec[1] ), 
$options );
+   } else {
+   throw new RuntimeException( 'Unknown spec for 
ValueFormatter construction' );
}
 
if ( !( $obj instanceof ValueFormatter ) ) {
@@ -499,16 +506,12 @@
 
/**
 * @param FormatterOptions $options
-* @param WikibaseValueFormatterBuilders $builders
 *
 * @throws InvalidArgumentException
 * @return LabelLookup
 */
-   private static function newLabelLookup(
-   FormatterOptions $options,
-   WikibaseValueFormatterBuilders $builders
-   ) {
-   $termLookup = $builders-termLookup;
+   private function newLabelLookup( FormatterOptions $options ) {
+   $termLookup = $this-termLookup;
 
// @fixme inject the label lookup
if ( $options-hasOption( 'languages' ) ) {
@@ -534,15 +537,11 @@
 * Used to inject services into the EntityIdLabelFormatter.
 *
 * @param FormatterOptions $options
-* @param WikibaseValueFormatterBuilders $builders
 *
 * @return EntityIdLabelFormatter
 */
-   protected static function newEntityIdFormatter(
-   FormatterOptions $options,
-   WikibaseValueFormatterBuilders $builders
-   ) {
-   $labelLookup = self::newLabelLookup( $options, $builders );
+   private function newEntityIdFormatter( FormatterOptions $options ) {
+   $labelLookup = $this-newLabelLookup( 

[MediaWiki-commits] [Gerrit] Use the same EntityInfo for JS and HTML - change (mediawiki...Wikibase)

2014-11-26 Thread Adrian Lang (Code Review)
Adrian Lang has submitted this change and it was merged.

Change subject: Use the same EntityInfo for JS and HTML
..


Use the same EntityInfo for JS and HTML

Change-Id: I5feac8e2a8a4e33c7187fef6a88fd2517ad3b14f
---
M repo/includes/EntityParserOutputGenerator.php
M repo/includes/View/EntityViewFactory.php
2 files changed, 6 insertions(+), 16 deletions(-)

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



diff --git a/repo/includes/EntityParserOutputGenerator.php 
b/repo/includes/EntityParserOutputGenerator.php
index 8ef03f7..d8aa25b 100644
--- a/repo/includes/EntityParserOutputGenerator.php
+++ b/repo/includes/EntityParserOutputGenerator.php
@@ -2,11 +2,9 @@
 
 namespace Wikibase;
 
-use Language;
 use ParserOutput;
 use ValueFormatters\FormatterOptions;
 use ValueFormatters\ValueFormatter;
-use Wikibase\DataModel\Entity\Entity;
 use Wikibase\DataModel\Entity\EntityId;
 use Wikibase\DataModel\Entity\Item;
 use Wikibase\DataModel\Entity\Property;
@@ -134,7 +132,7 @@
$this-addHtmlToParserOutput(
$parserOutput,
$entityRevision,
-   $usedEntityIds,
+   $entityInfo,
$editable
);
}
@@ -218,9 +216,6 @@
private function getEntityInfo( array $entityIds ) {
wfProfileIn( __METHOD__ );
 
-   // @todo: use same instance of entity info, as for the view 
(see below)
-   // but appears there are some differences in what is collected 
for each.
-
// @todo: apply language fallback!
$entityInfoBuilder = 
$this-entityInfoBuilderFactory-newEntityInfoBuilder( $entityIds );
 
@@ -256,17 +251,15 @@
/**
 * @param ParserOutput $parserOutput
 * @param EntityRevision $entityRevision
-* @param array $entityIds obtained from 
EntityInfoBuilder::getEntityInfo
-* $param boolean $editable
+* @param array $entityInfo obtained from 
EntityInfoBuilder::getEntityInfo
+* @param boolean $editable
 */
private function addHtmlToParserOutput(
ParserOutput $parserOutput,
EntityRevision $entityRevision,
-   array $entityIds,
+   array $entityInfo,
$editable
) {
-   $entityInfo = $this-getEntityInfo( $entityIds );
-
$entityView = $this-entityViewFactory-newEntityView(
$this-languageFallbackChain,
$this-languageCode,
diff --git a/repo/includes/View/EntityViewFactory.php 
b/repo/includes/View/EntityViewFactory.php
index 89e3759..9866484 100644
--- a/repo/includes/View/EntityViewFactory.php
+++ b/repo/includes/View/EntityViewFactory.php
@@ -7,20 +7,16 @@
 use ValueFormatters\FormatterOptions;
 use ValueFormatters\ValueFormatter;
 use Wikibase\ClaimHtmlGenerator;
+use Wikibase\EntityView;
 use Wikibase\ItemView;
 use Wikibase\LanguageFallbackChain;
 use Wikibase\Lib\OutputFormatSnakFormatterFactory;
 use Wikibase\Lib\SnakFormatter;
-use Wikibase\Lib\Store\EntityInfoBuilderFactory;
 use Wikibase\Lib\Store\EntityLookup;
 use Wikibase\Lib\Store\EntityRetrievingTermLookup;
 use Wikibase\Lib\Store\EntityTitleLookup;
 use Wikibase\Lib\Store\LanguageLabelLookup;
 use Wikibase\PropertyView;
-use Wikibase\Repo\View\ClaimsView;
-use Wikibase\Repo\View\FingerprintView;
-use Wikibase\Repo\View\SectionEditLinkGenerator;
-use Wikibase\Repo\View\SnakHtmlGenerator;
 
 /**
  * @since 0.5
@@ -68,6 +64,7 @@
 * @param string $languageCode
 * @param string $entityType
 *
+* @throws InvalidArgumentException
 * @return EntityView
 */
public function newEntityView(

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5feac8e2a8a4e33c7187fef6a88fd2517ad3b14f
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Daniel Kinzler daniel.kinz...@wikimedia.de
Gerrit-Reviewer: Adrian Lang adrian.l...@wikimedia.de
Gerrit-Reviewer: Tobias Gritschacher tobias.gritschac...@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] Corrected the domain whitelist link request - change (mediawiki...GWToolset)

2014-11-26 Thread Dan-nl (Code Review)
Dan-nl has uploaded a new change for review.

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

Change subject: Corrected the domain whitelist link request
..

Corrected the domain whitelist link request

Bug: T75732
Change-Id: Ibcb4c0a66173662b5956b4b8ef275d19756f5cbc
---
M includes/Forms/MetadataDetectForm.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/includes/Forms/MetadataDetectForm.php 
b/includes/Forms/MetadataDetectForm.php
index 08e976d..6c0afb6 100644
--- a/includes/Forms/MetadataDetectForm.php
+++ b/includes/Forms/MetadataDetectForm.php
@@ -39,7 +39,7 @@
array(),
wfMessage(
'gwtoolset-step-1-instructions-3',
-   
'https://bugzilla.wikimedia.org/enter_bug.cgi?assigned_to=wikibug...@lists.wikimedia.orgattach_text=blocked=58224bug_file_loc=http://bug_severity=normalbug_status=NEWcf_browser=---cf_platform=---comment=please+add+the+following+domain(s)+to+the+wgCopyUploadsDomains+whitelist:component=Site+requestscontenttypeentry=contenttypemethod=autodetectcontenttypeselection=text/plaindata=dependson=description=flag_type-3=Xform_name=enter_bugkeywords=maketemplate=Remember+values+as+bookmarkable+templateop_sys=Allproduct=Wikimediarep_platform=Allshort_desc=target_milestone=---version=wmf-deployment'
+   
'https://phabricator.wikimedia.org/maniphest/task/create/?projects=operationspriority=50title=Whitelist+a+Domaindescription=Please+add+the+following+domain+to+the+wgCopyUploadsDomains+whitelist,+so+that+I+can+use+GWToolset+to+upload+media+files+from+that+domain.+I+have+provided+at+least+3+example+URLs+to+media+files+that+will+be+uploaded+with+GWToolset.%0A%0A%3Cdomain+name%3E%0A%0A%3Cexample+URL%3E%0A%3Cexample+URL%3E%0A%3Cexample+URL%3E'
)-parse()
);
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibcb4c0a66173662b5956b4b8ef275d19756f5cbc
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/GWToolset
Gerrit-Branch: master
Gerrit-Owner: Dan-nl d_ent...@yahoo.com

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


[MediaWiki-commits] [Gerrit] Add info about puppet classes to instance list API - change (mediawiki...OpenStackManager)

2014-11-26 Thread Yuvipanda (Code Review)
Yuvipanda has uploaded a new change for review.

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

Change subject: Add info about puppet classes to instance list API
..

Add info about puppet classes to instance list API

Change-Id: Id6da1934759cbfa2e370d43b5943ac18772bda85
---
M api/ApiListNovaInstances.php
1 file changed, 3 insertions(+), 0 deletions(-)


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

diff --git a/api/ApiListNovaInstances.php b/api/ApiListNovaInstances.php
index 5350a20..f00ca01 100644
--- a/api/ApiListNovaInstances.php
+++ b/api/ApiListNovaInstances.php
@@ -39,6 +39,7 @@
$instances = $userNova-getInstances();
$instancesInfo = array();
foreach ( $instances as $instance ) {
+   $puppetConfig = 
$instance-getHost()-getPuppetConfiguration();
$instancesInfo[ ] = array(
'name' = $instance-getInstanceName(),
'state' = 
$instance-getInstanceState(),
@@ -47,6 +48,7 @@
'floatingip' = 
$instance-getInstancePublicIPs(),
'securitygroups' = 
$instance-getSecurityGroups(),
'imageid' = $instance-getImageId(),
+   'puppetclasses' = 
$puppetConfig['puppetclass'],
);
}
}
@@ -59,6 +61,7 @@
$this-getResult()-setIndexedTagName( 
$info['securitygroups'], 'group' );
$this-getResult()-setIndexedTagName( $info['ip'], 
'ip' );
$this-getResult()-setIndexedTagName( 
$info['floatingip'], 'floatingip' );
+   $this-getResult()-setIndexedTagName( 
$info['puppetclasses'], 'puppetclasses' );
 
$this-getResult()-addValue( array( 'query', 
$this-getModuleName() ), null, $info );
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id6da1934759cbfa2e370d43b5943ac18772bda85
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/OpenStackManager
Gerrit-Branch: master
Gerrit-Owner: Yuvipanda yuvipa...@gmail.com

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


[MediaWiki-commits] [Gerrit] Change Clear translation to Clear paragraph - change (mediawiki...ContentTranslation)

2014-11-26 Thread Amire80 (Code Review)
Amire80 has uploaded a new change for review.

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

Change subject: Change Clear translation to Clear paragraph
..

Change Clear translation to Clear paragraph

Suggested by Pau, based on user feedback.

Phab task T75981.

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


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

diff --git a/i18n/en.json b/i18n/en.json
index 3293619..e1aac84 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -58,7 +58,7 @@
cx-tools-link-remove: Remove link,
cx-tools-mt-title: Machine translation,
cx-tools-mt-use-source: Use source text,
-   cx-tools-mt-clear-translation: Clear translation,
+   cx-tools-mt-clear-translation: Clear paragraph,
cx-tools-mt-restore: Restore,
cx-tools-mt-provider-title: From $1,
cx-tools-mt-not-available: Not available for $1,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibf672e3516c7c76f340aa62abfead950750d801f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ContentTranslation
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] Change Clear translation to Clear paragraph - change (mediawiki...ContentTranslation)

2014-11-26 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Change Clear translation to Clear paragraph
..


Change Clear translation to Clear paragraph

Suggested by Pau, based on user feedback.

Phab task T75981.

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

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



diff --git a/i18n/en.json b/i18n/en.json
index 3293619..e1aac84 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -58,7 +58,7 @@
cx-tools-link-remove: Remove link,
cx-tools-mt-title: Machine translation,
cx-tools-mt-use-source: Use source text,
-   cx-tools-mt-clear-translation: Clear translation,
+   cx-tools-mt-clear-translation: Clear paragraph,
cx-tools-mt-restore: Restore,
cx-tools-mt-provider-title: From $1,
cx-tools-mt-not-available: Not available for $1,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibf672e3516c7c76f340aa62abfead950750d801f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ContentTranslation
Gerrit-Branch: master
Gerrit-Owner: Amire80 amir.ahar...@mail.huji.ac.il
Gerrit-Reviewer: Santhosh santhosh.thottin...@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] Update the autonym for aeb in Names.php - change (mediawiki/core)

2014-11-26 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Update the autonym for aeb in Names.php
..


Update the autonym for aeb in Names.php

The new name was suggested by Wikimedia's Language committee,
and as far as I know Arabic, it looks correct to me as well.

A Latin script autonym is being discussed separately and will be
added if and when there will be a decision about it.

The Arabic script autonym should be changed already now
because the current one is definitely wrong.

See also https://github.com/wikimedia/jquery.uls/pull/167 .

Change-Id: Ib07d2b49a47fb7f349a2cd70b7acfd88f9bf66ca
---
M languages/Names.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/languages/Names.php b/languages/Names.php
index 4a41b42..4e4d103 100644
--- a/languages/Names.php
+++ b/languages/Names.php
@@ -41,7 +41,7 @@
'aa' = 'Qafár af', # Afar
'ab' = 'Аҧсшәа',   # Abkhaz
'ace' = 'Acèh',# Aceh
-   'aeb' = 'زَوُن',   # Tunisian Arabic
+   'aeb' = 'تونسي',   # Tunisian Arabic
'af' = 'Afrikaans',# Afrikaans
'ak' = 'Akan', # Akan
'aln' = 'Gegë',# Gheg Albanian

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib07d2b49a47fb7f349a2cd70b7acfd88f9bf66ca
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Amire80 amir.ahar...@mail.huji.ac.il
Gerrit-Reviewer: Santhosh santhosh.thottin...@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] Inject LabelLookup got use by Formatters. - change (mediawiki...Wikibase)

2014-11-26 Thread Hoo man (Code Review)
Hoo man has submitted this change and it was merged.

Change subject: Inject LabelLookup got use by Formatters.
..


Inject LabelLookup got use by Formatters.

This allows the LabelLookup used by ValueFormatters to be
overwritten via the FormatterOptions. The idea is that
under some cirsumstances, the code creating a formatter via
a factory function may want to override otherwise application-
scope services, like the LabelLookup.

Point in case is providing an EntityInfoLabelLookup that makes
use of pre-fetched labels, providing a performance boost over
the default behaviour of looking up each label individually
in the database.

The rationale for using the amorphous FormatterObect for
injecting a context specific service is as follows:

* The use-case code knows that it can provide a specialized
version of some servies used by some formatters. It does not
know which formatters.

* The factory that creates the ValueFormatter (e.g. the
factory functions provided by WikibaseValueFormatterBuilders)
knows which ValueFormatter can make use of which service.

* The use-case code may not create or access value formatters
directly, but create and use higher level formatters, such as
SnakFormatters or an ClaimHtmlGenerator.

* Factories for the higher level formatters, e.g. the functions
provided by WikibaseSnakFormatterBuilders, should not know or
care about what services can be injected into which formatter,
and how.

* Thus, we need a mechanism for passing the specialized service
instances provided by the use-case-level code to the low-level
ValueFormatter factories, without requireing the intermediate,
higher level factories to know about such services (or other
options the low level formatters may use).

* An amorphous container for arbitrary services appears to be
the simplest mechanism. Re-using the FormatterOptions object
that is already used to convey options such as the user
language to the ValueFormatters seems to be the obvious choice.
This can be done with minimal additional code, and without
adding unneccessary dependencies.

Change-Id: I3c6ead36f501d61e7627722aea5f93b42574d7a4
---
M lib/includes/formatters/WikibaseValueFormatterBuilders.php
M lib/tests/phpunit/formatters/WikibaseValueFormatterBuildersTest.php
M repo/includes/EntityParserOutputGenerator.php
M repo/includes/View/ClaimsView.php
M repo/includes/View/EntityViewFactory.php
M repo/tests/phpunit/includes/View/EntityViewFactoryTest.php
6 files changed, 139 insertions(+), 45 deletions(-)

Approvals:
  Hoo man: Verified; Looks good to me, approved



diff --git a/lib/includes/formatters/WikibaseValueFormatterBuilders.php 
b/lib/includes/formatters/WikibaseValueFormatterBuilders.php
index cee71f6..734f8c5 100644
--- a/lib/includes/formatters/WikibaseValueFormatterBuilders.php
+++ b/lib/includes/formatters/WikibaseValueFormatterBuilders.php
@@ -16,6 +16,7 @@
 use Wikibase\LanguageFallbackChainFactory;
 use Wikibase\Lib\Store\TermLookup;
 use Wikibase\Lib\Store\EntityTitleLookup;
+use Wikibase\Lib\Store\LabelLookup;
 use Wikibase\Lib\Store\LanguageFallbackLabelLookup;
 use Wikibase\Lib\Store\LanguageLabelLookup;
 
@@ -513,8 +514,14 @@
private function newLabelLookup( FormatterOptions $options ) {
$termLookup = $this-termLookup;
 
-   // @fixme inject the label lookup
-   if ( $options-hasOption( 'languages' ) ) {
+   if ( $options-hasOption( 'LabelLookup' ) ) {
+   $labelLookup = $options-getOption( 'LabelLookup' );
+
+   if ( !( $labelLookup instanceof LabelLookup ) ) {
+   throw new InvalidArgumentException( 'Option 
LabelLookup must be used ' .
+   'with an instance of LabelLookup.' );
+   }
+   } elseif ( $options-hasOption( 'languages' ) ) {
$labelLookup = new LanguageFallbackLabelLookup(
$termLookup,
$options-getOption( 'languages' )
diff --git 
a/lib/tests/phpunit/formatters/WikibaseValueFormatterBuildersTest.php 
b/lib/tests/phpunit/formatters/WikibaseValueFormatterBuildersTest.php
index 4b36810..4fe740f 100644
--- a/lib/tests/phpunit/formatters/WikibaseValueFormatterBuildersTest.php
+++ b/lib/tests/phpunit/formatters/WikibaseValueFormatterBuildersTest.php
@@ -14,7 +14,6 @@
 use Wikibase\DataModel\Entity\EntityId;
 use Wikibase\DataModel\Entity\EntityIdValue;
 use Wikibase\DataModel\Entity\ItemId;
-use Wikibase\EntityFactory;
 use Wikibase\LanguageFallbackChain;
 use Wikibase\LanguageFallbackChainFactory;
 use Wikibase\Lib\EntityIdFormatter;
@@ -44,11 +43,28 @@
 * @param EntityId $entityId The Id of an entity to use for all entity 
lookups
 * @return WikibaseValueFormatterBuilders
 */
-   private function newWikibaseValueFormatterBuilders( EntityId $entityId 
) {
+  

[MediaWiki-commits] [Gerrit] Add missing test resources - change (mediawiki...WikibaseJavaScriptApi)

2014-11-26 Thread Adrian Lang (Code Review)
Adrian Lang has uploaded a new change for review.

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

Change subject: Add missing test resources
..

Add missing test resources

Change-Id: I8b3309efce1602a1901072b869c59167638c3a1b
---
A tests/resources.php
1 file changed, 47 insertions(+), 0 deletions(-)


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

diff --git a/tests/resources.php b/tests/resources.php
new file mode 100644
index 000..64eeb1d
--- /dev/null
+++ b/tests/resources.php
@@ -0,0 +1,47 @@
+?php
+
+/**
+ * @licence GNU GPL v2+
+ * @author H. Snater  mediaw...@snater.com 
+ *
+ * @codeCoverageIgnoreStart
+ */
+return call_user_func( function() {
+
+   preg_match( '+^(.*?)' . DIRECTORY_SEPARATOR . '(vendor|extensions)' . 
DIRECTORY_SEPARATOR . '(.*)$+', __DIR__, $remoteExtPathParts );
+   $moduleTemplate = array(
+   'localBasePath' = __DIR__,
+   'remoteExtPath' = '../' . $remoteExtPathParts[2] . 
DIRECTORY_SEPARATOR . $remoteExtPathParts[3],
+   );
+
+   $modules = array(
+   'wikibase.api.RepoApi.tests' = $moduleBase + array(
+   'scripts' = array(
+   'RepoApi.tests.js',
+   ),
+   'dependencies' = array(
+   'wikibase',
+   'wikibase.api.getLocationAgnosticMwApi',
+   'wikibase.api.RepoApi',
+   ),
+   ),
+
+   'wikibase.api.RepoApiError.tests' = $moduleBase + array(
+   'scripts' = array(
+   'RepoApiError.tests.js',
+   ),
+   'dependencies' = array(
+   'wikibase',
+   'wikibase.api.RepoApiError',
+   ),
+   'messages' = array(
+   'wikibase-error-unexpected',
+   'wikibase-error-remove-timeout',
+   'wikibase-error-ui-client-error',
+   ),
+   ),
+   );
+
+   return $modules;
+
+} );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8b3309efce1602a1901072b869c59167638c3a1b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikibaseJavaScriptApi
Gerrit-Branch: master
Gerrit-Owner: Adrian Lang adrian.l...@wikimedia.de

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


[MediaWiki-commits] [Gerrit] move wikibase.api into own module - change (mediawiki...Wikibase)

2014-11-26 Thread Adrian Lang (Code Review)
Adrian Lang has uploaded a new change for review.

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

Change subject: move wikibase.api into own module
..

move wikibase.api into own module

Change-Id: I97ceba76ba17bfe266dd4541520ef47ed457d1dc
---
M composer.json
M lib/resources/Resources.php
D lib/resources/api/FormatValueCaller.js
D lib/resources/api/ParseValueCaller.js
D lib/resources/api/RepoApi.js
D lib/resources/api/RepoApiError.js
D lib/resources/api/getLocationAgnosticMwApi.js
D lib/resources/api/namespace.js
D lib/resources/api/resources.php
D lib/tests/qunit/api/RepoApi.tests.js
D lib/tests/qunit/api/RepoApiError.tests.js
M lib/tests/qunit/resources.php
12 files changed, 1 insertion(+), 1,663 deletions(-)


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

diff --git a/composer.json b/composer.json
index 063d098..ba34747 100644
--- a/composer.json
+++ b/composer.json
@@ -38,6 +38,7 @@
wikibase/data-model: ~2.4,
wikibase/data-model-javascript: ~1.0,
wikibase/data-model-serialization: ~1.2,
+   wikibase/javascript-api: ~1.0,
wikibase/internal-serialization: ~1.3,
wikibase/serialization-javascript: ~2.0,
 
diff --git a/lib/resources/Resources.php b/lib/resources/Resources.php
index 61eeceb..fd3e2ec 100644
--- a/lib/resources/Resources.php
+++ b/lib/resources/Resources.php
@@ -83,7 +83,6 @@
 
$modules = array_merge(
$modules,
-   include( __DIR__ . '/api/resources.php' ),
include( __DIR__ . '/deprecated/resources.php' ),
include( __DIR__ . '/jquery.wikibase/resources.php' ),
include( __DIR__ . '/jquery.wikibase-shared/resources.php' )
diff --git a/lib/resources/api/FormatValueCaller.js 
b/lib/resources/api/FormatValueCaller.js
deleted file mode 100644
index 9836a1f..000
--- a/lib/resources/api/FormatValueCaller.js
+++ /dev/null
@@ -1,95 +0,0 @@
-/**
- * @licence GNU GPL v2+
- * @author H. Snater  mediaw...@snater.com 
- */
-( function( wb, $ ) {
-   'use strict';
-
-   var MODULE = wb.api;
-
-   /**
-* @constructor
-*
-* @param {wikibase.api.RepoApi} api
-* @param {dataTypes.DataTypeStore} dataTypeStore
-*/
-   var SELF = MODULE.FormatValueCaller = function( api, dataTypeStore ) {
-   this._api = api;
-   this._dataTypeStore = dataTypeStore;
-   };
-
-   $.extend( SELF.prototype, {
-
-   /**
-* @type {wikibase.api.RepoApi}
-*/
-   _api: null,
-
-   /**
-* @type {dataTypes.DataTypeStore}
-*/
-   _dataTypeStore: null,
-
-   /**
-* Makes a request to the API to format values on the server 
side. Will return a jQuery.Promise
-* which will be resolved if formatting is successful or 
rejected if it fails or the API cannot
-* be reached.
-* @since 0.5
-*
-* @param {dataValues.DataValue} dataValue
-* @param {string} [dataType]
-* @param {string} [outputFormat]
-* @param {Object} [options]
-* @return {jQuery.Promise}
-* Resolved parameters:
-* - {string} Formatted DataValue.
-* Rejected parameters:
-* - {wikibase.api.RepoApiError}
-*/
-   formatValue: function( dataValue, dataType, outputFormat, 
options ) {
-
-   // Evaluate optional arguments:
-   if( outputFormat === undefined ) {
-   if( $.isPlainObject( dataType ) ) {
-   options = dataType;
-   dataType = undefined;
-   } else if( !this._dataTypeStore.hasDataType( 
dataType ) ) {
-   outputFormat = dataType;
-   dataType = undefined;
-   }
-   } else if( options === undefined ) {
-   if( $.isPlainObject( outputFormat ) ) {
-   options = outputFormat;
-   outputFormat = undefined;
-   }
-   }
-
-   var deferred = $.Deferred();
-
-   this._api.formatValue(
-   {
-   value: dataValue.toJSON(),
-   type: dataValue.getType()
-   },
-   options,
-   

[MediaWiki-commits] [Gerrit] SprintControllerTest - change (phabricator...Sprint)

2014-11-26 Thread Christopher Johnson (WMDE) (Code Review)
Christopher Johnson (WMDE) has submitted this change and it was merged.

Change subject: SprintControllerTest
..


SprintControllerTest

Change-Id: Ia5261e6072574989d318aa0a37c7425fc5a4c8cd
---
M .gitignore
M scrutinizer.yml
M src/controller/SprintController.php
M src/tests/BurndownDataDateTest.php
M src/tests/SprintApplicationTest.php
M src/tests/SprintControllerTest.php
D src/tests/clover.xml
M src/tests/phpunit.xml
8 files changed, 88 insertions(+), 1,866 deletions(-)

Approvals:
  Christopher Johnson (WMDE): Verified; Looks good to me, approved



diff --git a/.gitignore b/.gitignore
index 365b3ce..e2c639d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,3 @@
 .phutil_module_cache
 vendor/
+/src/tests/clover.xml
diff --git a/scrutinizer.yml b/scrutinizer.yml
index c54e44c..79f74e6 100644
--- a/scrutinizer.yml
+++ b/scrutinizer.yml
@@ -44,4 +44,6 @@
 - '\bimplement(?:s|ed)?\b'
 filter:
 paths: {  }
-excluded_paths: {  }
\ No newline at end of file
+excluded_paths:
+- src/tests/*
+- vendor/*
diff --git a/src/controller/SprintController.php 
b/src/controller/SprintController.php
index fc1d5f9..b8f0a46 100644
--- a/src/controller/SprintController.php
+++ b/src/controller/SprintController.php
@@ -7,36 +7,42 @@
 abstract class SprintController extends PhabricatorController {
 
   public function shouldAllowPublic() {
-return true;
+return true;
}
 
   public function getProjectsURI() {
 return '/project/';
   }
 
+  public function getUser() {
+return $user = $this-getRequest()-getUser();
+  }
+
+  public function setApplicationURI() {
+return $uri= new PhutilURI($this-getApplicationURI());
+  }
+
   public function buildApplicationMenu() {
-return $this-buildSideNavView(true)-getMenu();
+return $this-buildSideNavView(true, 
$this-getUser(),$this-setApplicationURI())-getMenu();
   }
 
   public function buildNavMenu() {
-$nav = new AphrontSideNavFilterView();
-$nav-setBaseURI(new PhutilURI('/sprint/report/'));
-$nav-addLabel(pht('Sprint Projects'));
-$nav-addFilter('list', pht('List'));
-$nav-addLabel(pht('Open Tasks'));
-$nav-addFilter('project', pht('By Project'));
-$nav-addFilter('user', pht('By User'));
-$nav-addLabel(pht('Burndown'));
-$nav-addFilter('burn', pht('Burndown Rate'));
-
+$nav = id(new AphrontSideNavFilterView())
+-setBaseURI(new PhutilURI('/sprint/report/'))
+-addLabel(pht('Sprint Projects'))
+-addFilter('list', pht('List'))
+-addLabel(pht('Open Tasks'))
+-addFilter('project', pht('By Project'))
+-addFilter('user', pht('By User'))
+-addLabel(pht('Burndown'))
+-addFilter('burn', pht('Burndown Rate'));
 return $nav;
   }
 
-  public function buildSideNavView($for_app = false) {
-$user = $this-getRequest()-getUser();
+  public function buildSideNavView($for_app = false, $user, $uri) {
 
 $nav = new AphrontSideNavFilterView();
-$nav-setBaseURI(new PhutilURI($this-getApplicationURI()));
+$nav-setBaseURI($uri);
 
 if ($for_app) {
   $nav-addFilter('create', pht('Create Task'));
diff --git a/src/tests/BurndownDataDateTest.php 
b/src/tests/BurndownDataDateTest.php
index 022fcfb..c50d5b2 100644
--- a/src/tests/BurndownDataDateTest.php
+++ b/src/tests/BurndownDataDateTest.php
@@ -25,14 +25,10 @@
 $date = new BurndownDataDate('test date');
 $previous = id(new BurndownDataDate('monday'));
 $previous-setTasksRemaining('5');
-var_dump($previous);
 $current = id(new BurndownDataDate('tuesday'));
-for ($i=0;$i2; $i++) {
-  $current-setTasksClosedToday();
-}
-   // var_dump($current-getTasksClosedToday());
+$current-setTasksRemaining('2');
 $total = $date-sumTasksRemaining($current, $previous);
-$this-assertEquals(3, $total);
+$this-assertEquals(7, $total);
   }
 
   public function testSumPointsRemaining() {
@@ -40,8 +36,8 @@
 $previous = id(new BurndownDataDate('monday'));
 $previous-setPointsRemaining('5');
 $current = id(new BurndownDataDate('tuesday'));
-$current-setPointsClosedToday('2');
+$current-setPointsRemaining('2');
 $total = $date-sumPointsRemaining($current, $previous);
-$this-assertEquals(3, $total);
+$this-assertEquals(7, $total);
   }
 }
\ No newline at end of file
diff --git a/src/tests/SprintApplicationTest.php 
b/src/tests/SprintApplicationTest.php
index 115b662..b505789 100644
--- a/src/tests/SprintApplicationTest.php
+++ b/src/tests/SprintApplicationTest.php
@@ -10,7 +10,7 @@
   public function testBaseURI () {
 $burndown_application = new SprintApplication;
 $baseURI = $burndown_application-getBaseURI();
-$this-assertEquals('/sprint/report/', $baseURI);
+$this-assertEquals('/sprint/', $baseURI);
   }
 
   public function testgetIconName() {
@@ -35,13 +35,56 @@
 

[MediaWiki-commits] [Gerrit] Assign IPs for pfw1-codfw/pfw2-codfw - change (operations/dns)

2014-11-26 Thread Faidon Liambotis (Code Review)
Faidon Liambotis has uploaded a new change for review.

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

Change subject: Assign IPs for pfw1-codfw/pfw2-codfw
..

Assign IPs for pfw1-codfw/pfw2-codfw

Change-Id: Ibdbd215e6179ba80c91dfc9c6410c36efc953ca6
---
M templates/10.in-addr.arpa
M templates/153.80.208.in-addr.arpa
M templates/wikimedia.org
M templates/wmnet
4 files changed, 21 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/dns 
refs/changes/89/175989/1

diff --git a/templates/10.in-addr.arpa b/templates/10.in-addr.arpa
index adf0d7f..53aa256 100644
--- a/templates/10.in-addr.arpa
+++ b/templates/10.in-addr.arpa
@@ -1043,7 +1043,6 @@
 23  1H IN PTR   asw-c-eqiad.mgmt.eqiad.wmnet.
 24  1H IN PTR   asw-d-eqiad.mgmt.eqiad.wmnet.
 
-; TEMP pfw mgmt - lcarr 2012/07
 25  1H IN PTR   pfw1-eqiad.mgmt.eqiad.wmnet.
 26  1H IN PTR   pfw2-eqiad.mgmt.eqiad.wmnet.
 
@@ -2552,6 +2551,8 @@
 18  1H IN PTR  asw-c-codfw.mgmt.codfw.wmnet.
 19  1H IN PTR  asw-d-codfw.mgmt.codfw.wmnet.
 20  1H IN PTR  scs-c8-codfw.mgmt.codfw.wmnet.
+21  1H IN PTR  pfw1-codfw.mgmt.codfw.wmnet.
+22  1H IN PTR  pfw2-codfw.mgmt.codfw.wmnet.
 
 25  1H IN PTR  ps1-a1-codfw.mgmt.codfw.wmnet.
 26  1H IN PTR  ps1-a2-codfw.mgmt.codfw.wmnet.
diff --git a/templates/153.80.208.in-addr.arpa 
b/templates/153.80.208.in-addr.arpa
index d2bb9a7..d94b961 100644
--- a/templates/153.80.208.in-addr.arpa
+++ b/templates/153.80.208.in-addr.arpa
@@ -85,6 +85,18 @@
 222 1H  IN PTR  xe-4-2-0.cr2-eqiad.wikimedia.org.
 223 1H  IN PTR  xe-5-2-1.cr2-codfw.wikimedia.org.
 
+; 208.80.153.224/31 (cr1-codfw -- pfw1-codfw)
+224 1H  IN PTR  xe-5-0-3.cr1-codfw.wikimedia.org.
+225 1H  IN PTR  xe-6-0-0.pfw1-codfw.wikimedia.org.
+
+; 208.80.153.226 - 227 (loopbacks)
+226 1H  IN PTR  pfw1-codfw.wikimedia.org.
+227 1H  IN PTR  pfw2-codfw.wikimedia.org.
+
+; 208.80.153.228/31 (cr2-codfw -- pfw2-codfw)
+228 1H  IN PTR  xe-5-0-3.cr2-codfw.wikimedia.org.
+229 1H  IN PTR  xe-15-0-0.pfw2-codfw.wikimedia.org.
+
 ; LVS out-of-subnet service IPs (208.80.153.224/27)
 
 ; Desktop Text  Assets  208.80.153.224 - .231 (208.80.153.224/29)
diff --git a/templates/wikimedia.org b/templates/wikimedia.org
index cfee5c3..1f0dc97 100644
--- a/templates/wikimedia.org
+++ b/templates/wikimedia.org
@@ -414,6 +414,9 @@
 pfw1-eqiad  1H  IN A208.80.154.218
 pfw2-eqiad  1H  IN A208.80.154.219
 
+pfw1-codfw  1H  IN A208.80.153.226
+pfw2-codfw  1H  IN A208.80.153.227
+
 mr1-ulsfo.oob.wikimedia.org.1H  IN A209.237.234.242
 
 ; Cams
diff --git a/templates/wmnet b/templates/wmnet
index df7aa63..adff8b6 100644
--- a/templates/wmnet
+++ b/templates/wmnet
@@ -2186,10 +2186,14 @@
 re1.cr1-codfw   1H  IN A10.193.0.11
 re0.cr2-codfw   1H  IN A10.193.0.12
 re1.cr2-codfw   1H  IN A10.193.0.13
+
 scs-a1-codfw1H  IN A10.193.0.14
 scs-c1-codfw1H  IN A10.193.0.15
 scs-c8-codfw1H  IN A10.193.0.20
 
+pfw1-codfw  1H  IN A10.193.0.21
+pfw2-codfw  1H  IN A10.193.0.22
+
 ps1-a1-codfw1H  IN A10.193.0.25
 ps1-a2-codfw1H  IN A10.193.0.26
 ps1-a3-codfw1H  IN A10.193.0.27

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibdbd215e6179ba80c91dfc9c6410c36efc953ca6
Gerrit-PatchSet: 1
Gerrit-Project: operations/dns
Gerrit-Branch: master
Gerrit-Owner: Faidon Liambotis fai...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Add missing test resources - change (mediawiki...WikibaseJavaScriptApi)

2014-11-26 Thread WMDE
Thiemo Mättig (WMDE) has submitted this change and it was merged.

Change subject: Add missing test resources
..


Add missing test resources

Change-Id: I8b3309efce1602a1901072b869c59167638c3a1b
---
M resources.php
A tests/resources.php
2 files changed, 49 insertions(+), 1 deletion(-)

Approvals:
  Thiemo Mättig (WMDE): Verified; Looks good to me, approved



diff --git a/resources.php b/resources.php
index a3be346..143b2aa 100644
--- a/resources.php
+++ b/resources.php
@@ -9,7 +9,9 @@
  */
 return call_user_func( function() {
global $wgResourceModules;
+
$wgResourceModules = array_merge(
$wgResourceModules,
-   include 'src/resources.php'
+   include( __DIR__ . '/src/resources.php' )
);
+} );
diff --git a/tests/resources.php b/tests/resources.php
new file mode 100644
index 000..dabdcc7
--- /dev/null
+++ b/tests/resources.php
@@ -0,0 +1,46 @@
+?php
+
+/**
+ * @licence GNU GPL v2+
+ * @author H. Snater  mediaw...@snater.com 
+ *
+ * @codeCoverageIgnoreStart
+ */
+return call_user_func( function() {
+   preg_match( '+' . preg_quote( DIRECTORY_SEPARATOR ) . 
'(?:vendor|extensions)'
+   . preg_quote( DIRECTORY_SEPARATOR ) . '.*+', __DIR__, 
$remoteExtPath );
+
+   $moduleTemplate = array(
+   'localBasePath' = __DIR__,
+   'remoteExtPath' = '..' . $remoteExtPath[0],
+   );
+
+   return array(
+   'wikibase.api.RepoApi.tests' = $moduleTemplate + array(
+   'scripts' = array(
+   'RepoApi.tests.js',
+   ),
+   'dependencies' = array(
+   'wikibase',
+   'wikibase.api.getLocationAgnosticMwApi',
+   'wikibase.api.RepoApi',
+   ),
+   ),
+
+   'wikibase.api.RepoApiError.tests' = $moduleTemplate + array(
+   'scripts' = array(
+   'RepoApiError.tests.js',
+   ),
+   'dependencies' = array(
+   'wikibase',
+   'wikibase.api.RepoApiError',
+   ),
+   'messages' = array(
+   'wikibase-error-unexpected',
+   'wikibase-error-remove-timeout',
+   'wikibase-error-ui-client-error',
+   ),
+   ),
+   );
+
+} );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8b3309efce1602a1901072b869c59167638c3a1b
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/WikibaseJavaScriptApi
Gerrit-Branch: master
Gerrit-Owner: Adrian Lang adrian.l...@wikimedia.de
Gerrit-Reviewer: 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] Fixed issue that an user password could not be changed - change (mediawiki...BlueSpiceExtensions)

2014-11-26 Thread Smuggli (Code Review)
Smuggli has uploaded a new change for review.

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

Change subject: Fixed issue that an user password could not be changed
..

Fixed issue that an user password could not be changed

A logical error was the problem. If a password was valid, an error message
was returned and not further processed.

Change-Id: I738a9d4bb288f89e38a7fd62370f0cf9ad36e7ec
---
M UserManager/UserManager.class.php
1 file changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/UserManager/UserManager.class.php 
b/UserManager/UserManager.class.php
index 96bfdbe..9a6ff62 100644
--- a/UserManager/UserManager.class.php
+++ b/UserManager/UserManager.class.php
@@ -373,12 +373,12 @@
$aAnswer['success'] = false;
$aAnswer['message'][] = wfMessage( 
'bs-usermanager-idnotexist' )-plain(); // id_noexist = 'This user ID does not 
exist'
}
-   if ( $oUser-isValidPassword( $sPassword ) ) {
+   if ( !$oUser-isValidPassword( $sPassword ) ) {
$aAnswer['success'] = false;
$aAnswer['errors'][] = array(
'id' = 'pass',
'message' = wfMessage( 
'bs-usermanager-invalid-pwd' )-plain()
-   ); // 'invalid_pwd' = 'The supplied password is 
invalid. Please do not use apostrophes or backslashes.'
+   );
}
if ( $sPassword !== $sRePassword ) {
$aAnswer['success'] = false;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I738a9d4bb288f89e38a7fd62370f0cf9ad36e7ec
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions
Gerrit-Branch: master
Gerrit-Owner: Smuggli mug...@hallowelt.biz

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


[MediaWiki-commits] [Gerrit] Corrected the domain whitelist link request - change (mediawiki...GWToolset)

2014-11-26 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Corrected the domain whitelist link request
..


Corrected the domain whitelist link request

Bug: T75732
Change-Id: Ibcb4c0a66173662b5956b4b8ef275d19756f5cbc
---
M includes/Forms/MetadataDetectForm.php
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Gergő Tisza: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/Forms/MetadataDetectForm.php 
b/includes/Forms/MetadataDetectForm.php
index 08e976d..6c0afb6 100644
--- a/includes/Forms/MetadataDetectForm.php
+++ b/includes/Forms/MetadataDetectForm.php
@@ -39,7 +39,7 @@
array(),
wfMessage(
'gwtoolset-step-1-instructions-3',
-   
'https://bugzilla.wikimedia.org/enter_bug.cgi?assigned_to=wikibug...@lists.wikimedia.orgattach_text=blocked=58224bug_file_loc=http://bug_severity=normalbug_status=NEWcf_browser=---cf_platform=---comment=please+add+the+following+domain(s)+to+the+wgCopyUploadsDomains+whitelist:component=Site+requestscontenttypeentry=contenttypemethod=autodetectcontenttypeselection=text/plaindata=dependson=description=flag_type-3=Xform_name=enter_bugkeywords=maketemplate=Remember+values+as+bookmarkable+templateop_sys=Allproduct=Wikimediarep_platform=Allshort_desc=target_milestone=---version=wmf-deployment'
+   
'https://phabricator.wikimedia.org/maniphest/task/create/?projects=operationspriority=50title=Whitelist+a+Domaindescription=Please+add+the+following+domain+to+the+wgCopyUploadsDomains+whitelist,+so+that+I+can+use+GWToolset+to+upload+media+files+from+that+domain.+I+have+provided+at+least+3+example+URLs+to+media+files+that+will+be+uploaded+with+GWToolset.%0A%0A%3Cdomain+name%3E%0A%0A%3Cexample+URL%3E%0A%3Cexample+URL%3E%0A%3Cexample+URL%3E'
)-parse()
);
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibcb4c0a66173662b5956b4b8ef275d19756f5cbc
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/GWToolset
Gerrit-Branch: master
Gerrit-Owner: Dan-nl d_ent...@yahoo.com
Gerrit-Reviewer: Gergő Tisza gti...@wikimedia.org
Gerrit-Reviewer: Gilles gdu...@wikimedia.org
Gerrit-Reviewer: MarkTraceur mtrac...@member.fsf.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] Bump data-values/javascript dependency to match Wikibase.git's - change (mediawiki...WikibaseJavaScriptApi)

2014-11-26 Thread Adrian Lang (Code Review)
Adrian Lang has uploaded a new change for review.

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

Change subject: Bump data-values/javascript dependency to match Wikibase.git's
..

Bump data-values/javascript dependency to match Wikibase.git's

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


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

diff --git a/composer.json b/composer.json
index 9f00d97..a01d814 100644
--- a/composer.json
+++ b/composer.json
@@ -2,7 +2,7 @@
name: wikibase/javascript-api,
description: Wikibase API client in JavaScript,
require: {
-   data-values/javascript: ~0.5.0
+   data-values/javascript: ~0.6.0
},
license: GPL-2.0+,
authors: [

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1af31b10940abd59482756b15fddc8593a1280ef
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikibaseJavaScriptApi
Gerrit-Branch: master
Gerrit-Owner: Adrian Lang adrian.l...@wikimedia.de

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


[MediaWiki-commits] [Gerrit] Fix registry/README.md - change (mediawiki...cxserver)

2014-11-26 Thread KartikMistry (Code Review)
KartikMistry has uploaded a new change for review.

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

Change subject: Fix registry/README.md
..

Fix registry/README.md

Change-Id: I23e1f187d6f63da6e16f396fd695b1b0ed43041a
---
M registry/README.md
1 file changed, 18 insertions(+), 13 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/cxserver 
refs/changes/92/175992/1

diff --git a/registry/README.md b/registry/README.md
index 00cf2bf..0c3e4a9 100644
--- a/registry/README.md
+++ b/registry/README.md
@@ -1,22 +1,22 @@
-The ContentTranslation registry specifies the different language services
-that this server instance provides.
+The ContentTranslation registry specifies the different language services that
+this server instance provides.
 
 The default registry includes all the services that cxserver is able to 
support.
-You can tweak it for your site by having a different value in your config.js 
file.
-The value in config.js completely overrides the defaults.
+You can tweak it for your site by having a different value in your config.js
+file. The value in config.js completely overrides the defaults.
 
 Format
-
-The registry works according to language pairs. The main keys are source 
languages.
-Under them you'll find target languages. Under the target language key you'll 
find
-the services provided for that language.
+--
+The registry works according to language pairs. The main keys are source
+languages. Under them you'll find target languages. Under the target language
+key you'll find the services provided for that language.
 
 Currently the supported service types are:
 * dictionary: word dictionary
 * mt: machine translation
 
-Under the service types you'll find the providers key, which holds
-an array of service names.
+Under the service types you'll find the providers key, which holds an array of
+service names.
 
 Example:
 ```
@@ -38,9 +38,14 @@
 }
 ```
 
-Format
-
+Query
+-
 The services can be queried by using the list method. For example,
 to get the dictionary services that translate words from Spanish to Catalan,
 use a URL like this:
-http://example.com:8000/list/dictionary/es/ca
+
+ http://example.com:8000/list/dictionary/es/ca
+
+Machine translation can be queried by using,
+
+ http://example.com:8000/list/mt/es/pt

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I23e1f187d6f63da6e16f396fd695b1b0ed43041a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/cxserver
Gerrit-Branch: master
Gerrit-Owner: KartikMistry kartik.mis...@gmail.com

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


[MediaWiki-commits] [Gerrit] Allow APISite randompages to yield indefinitely - change (pywikibot/core)

2014-11-26 Thread John Vandenberg (Code Review)
John Vandenberg has uploaded a new change for review.

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

Change subject: Allow APISite randompages to yield indefinitely
..

Allow APISite randompages to yield indefinitely

randompages currently supplies a default limit of 10,
and will stop after the first batch if limit is None.

Change-Id: I67066d587f70978f33bb48d341f3e90b4f17bdd3
---
M pywikibot/data/api.py
M tests/site_tests.py
2 files changed, 23 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/93/175993/1

diff --git a/pywikibot/data/api.py b/pywikibot/data/api.py
index 0400f5d..c0b6e2a 100644
--- a/pywikibot/data/api.py
+++ b/pywikibot/data/api.py
@@ -1519,7 +1519,7 @@
 # self.resultkey not in data in last request.submit()
 # only (query-)continue was retrieved.
 previous_result_had_data = False
-if self.modules[0] == random and self.limit:
+if self.modules[0] == random:
 # random module does not return (query-)continue
 # now we loop for a new random query
 del self.data  # a new request is needed
diff --git a/tests/site_tests.py b/tests/site_tests.py
index e738859..ae2c17f 100644
--- a/tests/site_tests.py
+++ b/tests/site_tests.py
@@ -1166,17 +1166,37 @@
 
 Test random methods of a site.
 
-def testRandompages(self):
-Test the site.randompages() method.
+def test_unlimited_small_step(self):
+Test site.randompages() without limit.
+mysite = self.get_site()
+pages = []
+for rndpage in mysite.randompages(step=5, total=None):
+self.assertIsInstance(rndpage, pywikibot.Page)
+self.assertNotIn(rndpage, pages)
+pages.append(rndpage)
+if len(pages) == 11:
+break
+self.assertEqual(len(pages), 11)
+
+def test_limit_10(self):
+Test site.randompages() with limit.
 mysite = self.get_site()
 rn = list(mysite.randompages(total=10))
 self.assertLessEqual(len(rn), 10)
 self.assertTrue(all(isinstance(a_page, pywikibot.Page)
 for a_page in rn))
 self.assertFalse(all(a_page.isRedirectPage() for a_page in rn))
+
+def test_redirects(self):
+Test site.randompages() with redirects.
+mysite = self.get_site()
 for rndpage in mysite.randompages(total=5, redirects=True):
 self.assertIsInstance(rndpage, pywikibot.Page)
 self.assertTrue(rndpage.isRedirectPage())
+
+def test_namespaces(self):
+Test site.randompages() with namespaces.
+mysite = self.get_site()
 for rndpage in mysite.randompages(total=5, namespaces=[6, 7]):
 self.assertIsInstance(rndpage, pywikibot.Page)
 self.assertIn(rndpage.namespace(), [6, 7])

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I67066d587f70978f33bb48d341f3e90b4f17bdd3
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
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] Assign IPs for pfw1-codfw/pfw2-codfw - change (operations/dns)

2014-11-26 Thread Faidon Liambotis (Code Review)
Faidon Liambotis has submitted this change and it was merged.

Change subject: Assign IPs for pfw1-codfw/pfw2-codfw
..


Assign IPs for pfw1-codfw/pfw2-codfw

Change-Id: Ibdbd215e6179ba80c91dfc9c6410c36efc953ca6
---
M templates/10.in-addr.arpa
M templates/153.80.208.in-addr.arpa
M templates/wikimedia.org
M templates/wmnet
4 files changed, 24 insertions(+), 1 deletion(-)

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



diff --git a/templates/10.in-addr.arpa b/templates/10.in-addr.arpa
index adf0d7f..53aa256 100644
--- a/templates/10.in-addr.arpa
+++ b/templates/10.in-addr.arpa
@@ -1043,7 +1043,6 @@
 23  1H IN PTR   asw-c-eqiad.mgmt.eqiad.wmnet.
 24  1H IN PTR   asw-d-eqiad.mgmt.eqiad.wmnet.
 
-; TEMP pfw mgmt - lcarr 2012/07
 25  1H IN PTR   pfw1-eqiad.mgmt.eqiad.wmnet.
 26  1H IN PTR   pfw2-eqiad.mgmt.eqiad.wmnet.
 
@@ -2552,6 +2551,8 @@
 18  1H IN PTR  asw-c-codfw.mgmt.codfw.wmnet.
 19  1H IN PTR  asw-d-codfw.mgmt.codfw.wmnet.
 20  1H IN PTR  scs-c8-codfw.mgmt.codfw.wmnet.
+21  1H IN PTR  pfw1-codfw.mgmt.codfw.wmnet.
+22  1H IN PTR  pfw2-codfw.mgmt.codfw.wmnet.
 
 25  1H IN PTR  ps1-a1-codfw.mgmt.codfw.wmnet.
 26  1H IN PTR  ps1-a2-codfw.mgmt.codfw.wmnet.
diff --git a/templates/153.80.208.in-addr.arpa 
b/templates/153.80.208.in-addr.arpa
index d2bb9a7..184c4c0 100644
--- a/templates/153.80.208.in-addr.arpa
+++ b/templates/153.80.208.in-addr.arpa
@@ -69,10 +69,25 @@
 
 ; Neighbor blocks  loopbacks (208.80.153.192/27)
 
+; loopbacks
+
 192 1H  IN PTR  cr1-codfw.wikimedia.org.
 193 1H  IN PTR  cr2-codfw.wikimedia.org.
 194 1H  IN PTR  pim-rp.wikimedia.org.
 
+195 1H  IN PTR  pfw1-codfw.wikimedia.org.
+196 1H  IN PTR  pfw2-codfw.wikimedia.org.
+
+; neighbor blocks
+
+; 208.80.153.214/31 (cr1-codfw -- pfw1-codfw)
+214 1H  IN PTR  xe-5-0-3.cr1-codfw.wikimedia.org.
+215 1H  IN PTR  xe-6-0-0.pfw1-codfw.wikimedia.org.
+
+; 208.80.153.216/31 (cr2-codfw -- pfw2-codfw)
+216 1H  IN PTR  xe-5-0-3.cr2-codfw.wikimedia.org.
+217 1H  IN PTR  xe-15-0-0.pfw2-codfw.wikimedia.org.
+
 ; 208.80.153.218/31 (cr1-codfw -- cr2-codfw)
 218 1H  IN PTR  ae0.cr1-codfw.wikimedia.org.
 219 1H  IN PTR  ae0.cr2-codfw.wikimedia.org.
diff --git a/templates/wikimedia.org b/templates/wikimedia.org
index cfee5c3..998bf89 100644
--- a/templates/wikimedia.org
+++ b/templates/wikimedia.org
@@ -414,6 +414,9 @@
 pfw1-eqiad  1H  IN A208.80.154.218
 pfw2-eqiad  1H  IN A208.80.154.219
 
+pfw1-codfw  1H  IN A208.80.153.195
+pfw2-codfw  1H  IN A208.80.153.196
+
 mr1-ulsfo.oob.wikimedia.org.1H  IN A209.237.234.242
 
 ; Cams
diff --git a/templates/wmnet b/templates/wmnet
index df7aa63..adff8b6 100644
--- a/templates/wmnet
+++ b/templates/wmnet
@@ -2186,10 +2186,14 @@
 re1.cr1-codfw   1H  IN A10.193.0.11
 re0.cr2-codfw   1H  IN A10.193.0.12
 re1.cr2-codfw   1H  IN A10.193.0.13
+
 scs-a1-codfw1H  IN A10.193.0.14
 scs-c1-codfw1H  IN A10.193.0.15
 scs-c8-codfw1H  IN A10.193.0.20
 
+pfw1-codfw  1H  IN A10.193.0.21
+pfw2-codfw  1H  IN A10.193.0.22
+
 ps1-a1-codfw1H  IN A10.193.0.25
 ps1-a2-codfw1H  IN A10.193.0.26
 ps1-a3-codfw1H  IN A10.193.0.27

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibdbd215e6179ba80c91dfc9c6410c36efc953ca6
Gerrit-PatchSet: 2
Gerrit-Project: operations/dns
Gerrit-Branch: master
Gerrit-Owner: Faidon Liambotis fai...@wikimedia.org
Gerrit-Reviewer: Faidon Liambotis fai...@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] Remove dependency on wikibase resource loader module - change (mediawiki...WikibaseJavaScriptApi)

2014-11-26 Thread Adrian Lang (Code Review)
Adrian Lang has uploaded a new change for review.

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

Change subject: Remove dependency on wikibase resource loader module
..

Remove dependency on wikibase resource loader module

Change-Id: Ie0da9c09def233acc7fb08a3ccbe712146eb08f4
---
M src/namespace.js
M src/resources.php
M tests/resources.php
3 files changed, 4 insertions(+), 6 deletions(-)


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

diff --git a/src/namespace.js b/src/namespace.js
index 3991d16..bf080a4 100644
--- a/src/namespace.js
+++ b/src/namespace.js
@@ -1,5 +1,6 @@
-( function( wb ) {
+( function( global ) {
'use strict';
 
-   wb.api = {};
-}( wikibase ) );
+   global.wikibase = global.wikibase || {};
+   global.wikibase.api = global.wikibase.api || {};
+}( this ) );
diff --git a/src/resources.php b/src/resources.php
index 86ddd23..7dcde07 100644
--- a/src/resources.php
+++ b/src/resources.php
@@ -19,7 +19,6 @@
'namespace.js'
),
'dependencies' = array(
-   'wikibase' // For the namespace
)
),
 
diff --git a/tests/resources.php b/tests/resources.php
index dabdcc7..9a787a5 100644
--- a/tests/resources.php
+++ b/tests/resources.php
@@ -21,7 +21,6 @@
'RepoApi.tests.js',
),
'dependencies' = array(
-   'wikibase',
'wikibase.api.getLocationAgnosticMwApi',
'wikibase.api.RepoApi',
),
@@ -32,7 +31,6 @@
'RepoApiError.tests.js',
),
'dependencies' = array(
-   'wikibase',
'wikibase.api.RepoApiError',
),
'messages' = array(

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie0da9c09def233acc7fb08a3ccbe712146eb08f4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikibaseJavaScriptApi
Gerrit-Branch: master
Gerrit-Owner: Adrian Lang adrian.l...@wikimedia.de

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


[MediaWiki-commits] [Gerrit] BSFileSystemHelper: Added small BS_CACHE_DIR support - change (mediawiki...BlueSpiceFoundation)

2014-11-26 Thread Pwirth (Code Review)
Pwirth has uploaded a new change for review.

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

Change subject: BSFileSystemHelper: Added small BS_CACHE_DIR support
..

BSFileSystemHelper: Added small BS_CACHE_DIR support

* Added missing wgProfileOut
* Used DS instead of '/'
* Fixed DataDir/DataPath/CacheDir getter
* Added/Fixed some descriptions
* Added getCacheFileContent method
* Added path check for cache directory to hasTraversal method

BsFileSystemHelper is still limited

Change-Id: I005419f5ecdcb7a9d6192b3d85eddd4119b8585b
---
M includes/utility/FileSystemHelper.class.php
1 file changed, 49 insertions(+), 27 deletions(-)


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

diff --git a/includes/utility/FileSystemHelper.class.php 
b/includes/utility/FileSystemHelper.class.php
index 98a741f..33656d4 100644
--- a/includes/utility/FileSystemHelper.class.php
+++ b/includes/utility/FileSystemHelper.class.php
@@ -24,17 +24,18 @@
if (empty($sSubDirName)) {
wfProfileOut(__METHOD__);
return Status::newGood(BS_CACHE_DIR);
-   } elseif (is_dir(BS_CACHE_DIR . '/' . $sSubDirName)) {
+   } elseif (is_dir(BS_CACHE_DIR . DS . $sSubDirName)) {
wfProfileOut(__METHOD__);
-   return Status::newGood(BS_CACHE_DIR . '/' . 
$sSubDirName);
+   return Status::newGood(BS_CACHE_DIR . DS . 
$sSubDirName);
}
 
-   if (!mkdir(BS_CACHE_DIR . '/' . $sSubDirName, 0777, true)) {
+   if (!mkdir(BS_CACHE_DIR . DS . $sSubDirName, 0777, true)) {
wfProfileOut(__METHOD__);
return Status::newFatal(BS_CACHE_DIR . ' is not 
accessible');
}
 
-   return Status::newGood(BS_CACHE_DIR . '/' . $sSubDirName);
+   wfProfileOut(__METHOD__);
+   return Status::newGood(BS_CACHE_DIR . DS . $sSubDirName);
}
 
/**
@@ -60,17 +61,17 @@
if (empty($sSubDirName)) {
wfProfileOut(__METHOD__);
return Status::newGood(BS_DATA_DIR);
-   } elseif (is_dir(BS_DATA_DIR . '/' . $sSubDirName)) {
+   } elseif (is_dir(BS_DATA_DIR . DS . $sSubDirName)) {
wfProfileOut(__METHOD__);
-   return Status::newGood(BS_DATA_DIR . '/' . 
$sSubDirName);
+   return Status::newGood(BS_DATA_DIR . DS . $sSubDirName);
}
-   if (!mkdir(BS_DATA_DIR . '/' . $sSubDirName, 0777, true)) {
+   if (!mkdir(BS_DATA_DIR . DS . $sSubDirName, 0777, true)) {
wfProfileOut(__METHOD__);
return Status::newFatal(BS_DATA_DIR . ' is not 
accessible');
}
 
wfProfileOut(__METHOD__);
-   return Status::newGood(BS_DATA_DIR . '/' . $sSubDirName);
+   return Status::newGood(BS_DATA_DIR . DS . $sSubDirName);
}
 
/**
@@ -91,7 +92,7 @@
 
if (!file_put_contents($oStatus-getValue() . DS . $sFileName, 
$data)) {
wfProfileOut(__METHOD__);
-   return Status::newFatal('could not save ' . $sFileName 
. ' to location: ' . $oStatus-getValue() . '/' . $sFileName);
+   return Status::newFatal('could not save ' . $sFileName 
. ' to location: ' . $oStatus-getValue() . DS . $sFileName);
}
 
wfProfileOut(__METHOD__);
@@ -117,7 +118,7 @@
//todo: via FileRepo
if (!file_put_contents($oStatus-getValue() . DS . $sFileName, 
$data)) {
wfProfileOut(__METHOD__);
-   return Status::newFatal('could not save ' . $sFileName 
. ' to location: ' . $oStatus-getValue() . '/' . $sFileName);
+   return Status::newFatal('could not save ' . $sFileName 
. ' to location: ' . $oStatus-getValue() . DS . $sFileName);
}
 
wfProfileOut(__METHOD__);
@@ -130,8 +131,7 @@
 * @return string Filepath
 */
public static function getDataDirectory($sSubDirName = '') {
-   $sDataDir = ( $sSubDirName ) ? BS_DATA_DIR . DS . $sSubDirName 
: BS_DATA_DIR;
-   return $sDataDir;
+   return empty( $sSubDirName ) ? BS_DATA_DIR : BS_DATA_DIR . DS . 
$sSubDirName;
}
 
/**
@@ -139,9 +139,8 @@
 * @param string $sSubDirName
 * @return string URL
 */
-   public static function getDataPath($sSubDirName = '') {
-   $sDataPath = ( $sSubDirName ) ? BS_DATA_PATH . '/' . 
$sSubDirName : BS_DATA_PATH;
-   return $sDataPath;
+   public static function getDataPath( $sSubDirName = '' ) {
+   

[MediaWiki-commits] [Gerrit] Rename dataTypes to dataTypeStore - change (mediawiki...Wikibase)

2014-11-26 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Rename dataTypes to dataTypeStore
..


Rename dataTypes to dataTypeStore

wbDataTypes is the settings array. This is not an array but a store
object. I hope I did not forget something. Please double check.

Change-Id: Ib885aeafe03e7ac9e3319416273fa5ceed30630e
---
M repo/resources/Resources.php
R repo/resources/dataTypes/wikibase.dataTypeStore.js
M repo/resources/wikibase.ui.entityViewInit.js
R repo/tests/qunit/dataTypes/wikibase.dataTypeStore.tests.js
M repo/tests/qunit/resources.php
5 files changed, 15 insertions(+), 15 deletions(-)

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



diff --git a/repo/resources/Resources.php b/repo/resources/Resources.php
index 2ba824c..9c071f6 100644
--- a/repo/resources/Resources.php
+++ b/repo/resources/Resources.php
@@ -108,9 +108,9 @@
'datatypesconfigvarname' = 'wbDataTypes',
),
 
-   'wikibase.dataTypes' = $moduleTemplate + array(
+   'wikibase.dataTypeStore' = $moduleTemplate + array(
'scripts' = array(
-   'dataTypes/wikibase.dataTypes.js',
+   'dataTypes/wikibase.dataTypeStore.js',
),
'dependencies' = array(
'dataTypes.DataType',
@@ -167,7 +167,7 @@
'jquery.wikibase.claimgrouplabelscroll',
'jquery.wikibase.sitelinkgroupview',
'wikibase.api.getLocationAgnosticMwApi',
-   'wikibase.dataTypes',
+   'wikibase.dataTypeStore',
'wikibase.entityChangers.EntityChangersFactory',
'wikibase.experts.getStore',
'wikibase.formatters.getStore',
diff --git a/repo/resources/dataTypes/wikibase.dataTypes.js 
b/repo/resources/dataTypes/wikibase.dataTypeStore.js
similarity index 89%
rename from repo/resources/dataTypes/wikibase.dataTypes.js
rename to repo/resources/dataTypes/wikibase.dataTypeStore.js
index 38204d3..0d93c8e 100644
--- a/repo/resources/dataTypes/wikibase.dataTypes.js
+++ b/repo/resources/dataTypes/wikibase.dataTypeStore.js
@@ -3,7 +3,7 @@
  * @author Daniel Werner  daniel.wer...@wikimedia.de 
  * @author H. Snater  mediaw...@snater.com 
  */
-wikibase.dataTypes = ( function( $, mw, dataTypes ) {
+wikibase.dataTypeStore = ( function( $, mw, dataTypes ) {
'use strict';
 
var dataTypeStore = new dataTypes.DataTypeStore(),
diff --git a/repo/resources/wikibase.ui.entityViewInit.js 
b/repo/resources/wikibase.ui.entityViewInit.js
index f117734..ce73efa 100644
--- a/repo/resources/wikibase.ui.entityViewInit.js
+++ b/repo/resources/wikibase.ui.entityViewInit.js
@@ -4,7 +4,7 @@
  * @author Daniel Werner  daniel.werner at wikimedia.de 
  */
 
-( function( $, mw, wb, dataTypes, getExpertsStore, getFormatterStore, 
getParserStore ) {
+( function( $, mw, wb, dataTypeStore, getExpertsStore, getFormatterStore, 
getParserStore ) {
'use strict';
 
mw.hook( 'wikipage.content' ).add( function() {
@@ -127,13 +127,13 @@
entityChangersFactory: entityChangersFactory,
entityStore: entityStore,
valueViewBuilder: new wb.ValueViewBuilder(
-   getExpertsStore( dataTypes ),
-   getFormatterStore( repoApi, dataTypes ),
+   getExpertsStore( dataTypeStore ),
+   getFormatterStore( repoApi, dataTypeStore ),
getParserStore( repoApi ),
mw.config.get( 'wgUserLanguage' ),
mw
),
-   dataTypeStore: dataTypes,
+   dataTypeStore: dataTypeStore,
languages: getUserLanguages()
} )
.on( 'labelviewchange labelviewafterstopediting', function( 
event ) {
@@ -342,7 +342,7 @@
jQuery,
mediaWiki,
wikibase,
-   wikibase.dataTypes,
+   wikibase.dataTypeStore,
wikibase.experts.getStore,
wikibase.formatters.getStore,
wikibase.parsers.getStore
diff --git a/repo/tests/qunit/dataTypes/wikibase.dataTypes.tests.js 
b/repo/tests/qunit/dataTypes/wikibase.dataTypeStore.tests.js
similarity index 67%
rename from repo/tests/qunit/dataTypes/wikibase.dataTypes.tests.js
rename to repo/tests/qunit/dataTypes/wikibase.dataTypeStore.tests.js
index fb9884f..e5d19f8 100644
--- a/repo/tests/qunit/dataTypes/wikibase.dataTypes.tests.js
+++ b/repo/tests/qunit/dataTypes/wikibase.dataTypeStore.tests.js
@@ -7,13 +7,13 @@
 ( function( QUnit, 

[MediaWiki-commits] [Gerrit] Text changes for better handling of PD and nonfree licenses - change (mediawiki...MultimediaViewer)

2014-11-26 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Text changes for better handling of PD and nonfree licenses
..


Text changes for better handling of PD and nonfree licenses

Bug: T70687
Change-Id: I84e0094559e5b438fcb33b8511dc0184435c1a37
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/1004
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/631
---
M MultimediaViewer.php
M i18n/en.json
M i18n/qqq.json
M resources/mmv/mmv.EmbedFileFormatter.js
M resources/mmv/model/mmv.model.Image.js
M resources/mmv/model/mmv.model.License.js
M resources/mmv/provider/mmv.provider.ImageInfo.js
M resources/mmv/ui/mmv.ui.download.pane.js
M tests/qunit/mmv/mmv.EmbedFileFormatter.test.js
M tests/qunit/mmv/model/mmv.model.Image.test.js
M tests/qunit/mmv/model/mmv.model.License.test.js
M tests/qunit/mmv/provider/mmv.provider.ImageInfo.test.js
M tests/qunit/mmv/ui/mmv.ui.reuse.utils.test.js
13 files changed, 184 insertions(+), 39 deletions(-)

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



diff --git a/MultimediaViewer.php b/MultimediaViewer.php
index 7a47510..2ca3ad0 100644
--- a/MultimediaViewer.php
+++ b/MultimediaViewer.php
@@ -453,6 +453,7 @@
'multimediaviewer-embed-dimensions',
'multimediaviewer-embed-dimensions-with-file-format',
'multimediaviewer-download-attribution-cta-header',
+   
'multimediaviewer-download-optional-attribution-cta-header',
'multimediaviewer-download-attribution-cta',
'multimediaviewer-attr-plain',
'multimediaviewer-attr-html',
@@ -637,20 +638,28 @@
'multimediaviewer-credit',
 
'multimediaviewer-text-embed-credit-text-tbls',
+   'multimediaviewer-text-embed-credit-text-tbls-nonfree',
'multimediaviewer-text-embed-credit-text-tls',
+   'multimediaviewer-text-embed-credit-text-tls-nonfree',
'multimediaviewer-text-embed-credit-text-tbs',
'multimediaviewer-text-embed-credit-text-tbl',
+   'multimediaviewer-text-embed-credit-text-tbl-nonfree',
'multimediaviewer-text-embed-credit-text-tb',
'multimediaviewer-text-embed-credit-text-ts',
'multimediaviewer-text-embed-credit-text-tl',
+   'multimediaviewer-text-embed-credit-text-tl-nonfree',
 
'multimediaviewer-html-embed-credit-text-tbls',
+   'multimediaviewer-html-embed-credit-text-tbls-nonfree',
'multimediaviewer-html-embed-credit-text-tls',
+   'multimediaviewer-html-embed-credit-text-tls-nonfree',
'multimediaviewer-html-embed-credit-text-tbs',
'multimediaviewer-html-embed-credit-text-tbl',
+   'multimediaviewer-html-embed-credit-text-tbl-nonfree',
'multimediaviewer-html-embed-credit-text-tb',
'multimediaviewer-html-embed-credit-text-ts',
'multimediaviewer-html-embed-credit-text-tl',
+   'multimediaviewer-html-embed-credit-text-tl-nonfree',
),
),
 
diff --git a/i18n/en.json b/i18n/en.json
index 8154f9f..4df2ba8 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -70,23 +70,32 @@
multimediaviewer-embed-html: HTML,
multimediaviewer-embed-explanation: Use this code to embed the file,
multimediaviewer-text-embed-credit-text-tbls: \$1\ by $2. Licensed 
under $3 via $4,
+   multimediaviewer-text-embed-credit-text-tbls-nonfree: \$1\ by $2. 
$3 via $4,
multimediaviewer-text-embed-credit-text-tls: \$1\. Licensed under 
$2 via $3,
+   multimediaviewer-text-embed-credit-text-tls-nonfree: \$1\. $2 via 
$3,
multimediaviewer-text-embed-credit-text-tbs: \$1\ by $2. Via $3,
multimediaviewer-text-embed-credit-text-tbl: \$1\ by $2. Licensed 
under $3,
+   multimediaviewer-text-embed-credit-text-tbl-nonfree: \$1\ by $2. 
$3,
multimediaviewer-text-embed-credit-text-tb: \$1\ by $2,
multimediaviewer-text-embed-credit-text-ts: \$1\. Via $2,
multimediaviewer-text-embed-credit-text-tl: \$1\. Licensed under 
$2,
+   multimediaviewer-text-embed-credit-text-tl-nonfree: \$1\. $2,
multimediaviewer-text-embed-credit-text-t: \$1\,
multimediaviewer-html-embed-credit-text-tbls: \$1\ by $2. Licensed 
under $3 via $4.,
+   multimediaviewer-html-embed-credit-text-tbls-nonfree: \$1\ by $2. 
$3 via $4.,
multimediaviewer-html-embed-credit-text-tls: \$1\. Licensed under 
$2 via $3.,
+   

[MediaWiki-commits] [Gerrit] Shorten overly long lines - change (mediawiki...WikibaseJavaScriptApi)

2014-11-26 Thread Adrian Lang (Code Review)
Adrian Lang has uploaded a new change for review.

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

Change subject: Shorten overly long lines
..

Shorten overly long lines

Change-Id: I0dde5d6251420bf43636a1e8e0f19f44592aa7e7
---
M .jshintrc
M src/FormatValueCaller.js
M src/ParseValueCaller.js
M src/RepoApi.js
M tests/RepoApi.tests.js
5 files changed, 19 insertions(+), 11 deletions(-)


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

diff --git a/.jshintrc b/.jshintrc
index e1e7c3e..a5afa4d 100644
--- a/.jshintrc
+++ b/.jshintrc
@@ -50,7 +50,7 @@
 
indent: 4,
quotmark: false,
-   maxlen: 110,
+   maxlen: 100,
maxparams: 7,
maxdepth: 4,
maxstatements: 19,
diff --git a/src/FormatValueCaller.js b/src/FormatValueCaller.js
index 9836a1f..0f44558 100644
--- a/src/FormatValueCaller.js
+++ b/src/FormatValueCaller.js
@@ -31,9 +31,9 @@
_dataTypeStore: null,
 
/**
-* Makes a request to the API to format values on the server 
side. Will return a jQuery.Promise
-* which will be resolved if formatting is successful or 
rejected if it fails or the API cannot
-* be reached.
+* Makes a request to the API to format values on the server 
side. Will return a
+* jQuery.Promise which will be resolved if formatting is 
successful or rejected if it fails
+* or the API cannot be reached.
 * @since 0.5
 *
 * @param {dataValues.DataValue} dataValue
diff --git a/src/ParseValueCaller.js b/src/ParseValueCaller.js
index 07cb134..01f06b4 100644
--- a/src/ParseValueCaller.js
+++ b/src/ParseValueCaller.js
@@ -28,7 +28,8 @@
 
/**
 * Makes a request to the API to parse values on the server side. Will 
return a jQuery.Promise
-* which will be resolved if the call is successful or rejected if the 
API fails or can't be reached.
+* which will be resolved if the call is successful or rejected if the 
API fails or can't be
+* reached.
 * @since 0.5
 *
 * @param {string} parser
@@ -61,8 +62,8 @@
 
if( result.error ) {
// This is a really strange error 
format, and it's not supported by
-   // 
wikibase.api.RepoApiError.newFromApiResponse, so we have to parse it manually 
here.
-   // See bug 72947.
+   // 
wikibase.api.RepoApiError.newFromApiResponse, so we have to parse it manually
+   // here. See bug 72947.
deferred.reject( new 
wb.api.RepoApiError(
result.messages[0].name,
result.messages[0].html['*']
@@ -71,7 +72,10 @@
}
 
if( !( result.value  result.type ) ) {
-   deferred.reject( new 
wb.api.RepoApiError( 'result-unexpected', 'Unknown API error' ) );
+   deferred.reject( new 
wb.api.RepoApiError(
+   'result-unexpected',
+   'Unknown API error'
+   ) );
return;
}
 
diff --git a/src/RepoApi.js b/src/RepoApi.js
index 8b09a27..4baf3f8 100644
--- a/src/RepoApi.js
+++ b/src/RepoApi.js
@@ -316,7 +316,7 @@
/**
 * Removes an existing claim.
 *
-* @param {String} claimGuid The GUID of the Claim to be removed 
(wikibase.datamodel.Claim.getGuid)
+* @param {String} claimGuid The GUID of the Claim to be removed
 * @param {Number} [claimRevisionId]
 * @return {jQuery.Promise}
 */
@@ -356,7 +356,7 @@
/**
 * Changes the Main Snak of an existing claim.
 *
-* @param {string} claimGuid The GUID of the Claim to be changed 
(wikibase.datamodel.Claim.getGuid)
+* @param {string} claimGuid The GUID of the Claim to be changed
 * @param {number} baseRevId
 * @param {string} snakType The type of the snak
 * @param {string} property Id of the snak's property
diff --git a/tests/RepoApi.tests.js b/tests/RepoApi.tests.js
index 0ae19f5..e59aa83 100644
--- a/tests/RepoApi.tests.js
+++ b/tests/RepoApi.tests.js
@@ -454,7 +454,11 @@
 
testrun.queue( qkey, function() {
api.setAliases(
-   entityStack[0].id, entityStack[0].lastrevid, [ 
'alias1', 'alias2' ], [], 'doesnotexist'
+  

[MediaWiki-commits] [Gerrit] Correct wrong jshint config name - change (mediawiki...WikibaseJavaScriptApi)

2014-11-26 Thread Adrian Lang (Code Review)
Adrian Lang has uploaded a new change for review.

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

Change subject: Correct wrong jshint config name
..

Correct wrong jshint config name

Change-Id: Idfff46d04530240e22a8148d38a1621941afbaac
---
M .jshintrc
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/.jshintrc b/.jshintrc
index e1e7c3e..83ca14b 100644
--- a/.jshintrc
+++ b/.jshintrc
@@ -52,7 +52,7 @@
quotmark: false,
maxlen: 110,
maxparams: 7,
-   maxdepth: 4,
+   maxcomplexity: 6,
maxstatements: 19,
predef: [
jQuery,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idfff46d04530240e22a8148d38a1621941afbaac
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikibaseJavaScriptApi
Gerrit-Branch: master
Gerrit-Owner: Adrian Lang adrian.l...@wikimedia.de

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


[MediaWiki-commits] [Gerrit] Couple of string changes spotted while translating - change (mediawiki...ContentTranslation)

2014-11-26 Thread Nikerabbit (Code Review)
Nikerabbit has uploaded a new change for review.

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

Change subject: Couple of string changes spotted while translating
..

Couple of string changes spotted while translating

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


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

diff --git a/i18n/en.json b/i18n/en.json
index e1aac84..144b466 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -43,7 +43,7 @@
cx-entrypoint-dialog-button-create-from-scratch: Create from 
scratch,
cx-entrypoint-dialog-button-translate-from: Translate from $1,
cx-special-login-error: You must be logged in to translate in this 
page. [$1 Login],
-   cx-tools-instructions-text1: {{GENDER:|Add}} paragraphs to 
translate,
+   cx-tools-instructions-text1: {{GENDER:|Click}} paragraphs to 
translate,
cx-tools-instructions-text2: {{GENDER:|You}} don't need to add them 
all,
cx-tools-instructions-text3: {{GENDER:|Make}} text read natural,
cx-tools-instructions-text4: Machine translation is useful but 
{{GENDER:|you'll}} need to revise errors to make it accurate.,
@@ -75,7 +75,7 @@
cx-tools-reference-remove: Remove reference,
cx-tools-link-instruction-shortcut: Shift + click any link to open,
cx-tools-link-hover-tooltip: Click to open,
-   cx-warning-unsaved-translation: You have unsaved translation.,
+   cx-warning-unsaved-translation: You have unsaved translations.,
cx-error-page-not-found: The \$1\ page could not be found in $2 
Wikipedia,
cx-sourceselector-dialog-new-translation: New translation,
cx-sourceselector-dialog-button-start-translation: Start 
translation,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4ebd9bc257c4fb35250f224ad95c822416a87de1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ContentTranslation
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] Bump data-values/javascript dependency to match Wikibase.git's - change (mediawiki...WikibaseJavaScriptApi)

2014-11-26 Thread WMDE
Thiemo Mättig (WMDE) has submitted this change and it was merged.

Change subject: Bump data-values/javascript dependency to match Wikibase.git's
..


Bump data-values/javascript dependency to match Wikibase.git's

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

Approvals:
  Thiemo Mättig (WMDE): Verified; Looks good to me, approved



diff --git a/composer.json b/composer.json
index 9f00d97..a01d814 100644
--- a/composer.json
+++ b/composer.json
@@ -2,7 +2,7 @@
name: wikibase/javascript-api,
description: Wikibase API client in JavaScript,
require: {
-   data-values/javascript: ~0.5.0
+   data-values/javascript: ~0.6.0
},
license: GPL-2.0+,
authors: [

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1af31b10940abd59482756b15fddc8593a1280ef
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikibaseJavaScriptApi
Gerrit-Branch: master
Gerrit-Owner: Adrian Lang adrian.l...@wikimedia.de
Gerrit-Reviewer: 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] Remove dependency on wikibase resource loader module - change (mediawiki...WikibaseJavaScriptApi)

2014-11-26 Thread WMDE
Thiemo Mättig (WMDE) has submitted this change and it was merged.

Change subject: Remove dependency on wikibase resource loader module
..


Remove dependency on wikibase resource loader module

Change-Id: Ie0da9c09def233acc7fb08a3ccbe712146eb08f4
---
M src/namespace.js
M src/resources.php
M tests/resources.php
3 files changed, 4 insertions(+), 6 deletions(-)

Approvals:
  Thiemo Mättig (WMDE): Verified; Looks good to me, approved



diff --git a/src/namespace.js b/src/namespace.js
index 3991d16..bf080a4 100644
--- a/src/namespace.js
+++ b/src/namespace.js
@@ -1,5 +1,6 @@
-( function( wb ) {
+( function( global ) {
'use strict';
 
-   wb.api = {};
-}( wikibase ) );
+   global.wikibase = global.wikibase || {};
+   global.wikibase.api = global.wikibase.api || {};
+}( this ) );
diff --git a/src/resources.php b/src/resources.php
index 86ddd23..7dcde07 100644
--- a/src/resources.php
+++ b/src/resources.php
@@ -19,7 +19,6 @@
'namespace.js'
),
'dependencies' = array(
-   'wikibase' // For the namespace
)
),
 
diff --git a/tests/resources.php b/tests/resources.php
index dabdcc7..9a787a5 100644
--- a/tests/resources.php
+++ b/tests/resources.php
@@ -21,7 +21,6 @@
'RepoApi.tests.js',
),
'dependencies' = array(
-   'wikibase',
'wikibase.api.getLocationAgnosticMwApi',
'wikibase.api.RepoApi',
),
@@ -32,7 +31,6 @@
'RepoApiError.tests.js',
),
'dependencies' = array(
-   'wikibase',
'wikibase.api.RepoApiError',
),
'messages' = array(

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie0da9c09def233acc7fb08a3ccbe712146eb08f4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikibaseJavaScriptApi
Gerrit-Branch: master
Gerrit-Owner: Adrian Lang adrian.l...@wikimedia.de
Gerrit-Reviewer: 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] Shorten overly long lines - change (mediawiki...WikibaseJavaScriptApi)

2014-11-26 Thread WMDE
Thiemo Mättig (WMDE) has submitted this change and it was merged.

Change subject: Shorten overly long lines
..


Shorten overly long lines

Change-Id: I0dde5d6251420bf43636a1e8e0f19f44592aa7e7
---
M .jshintrc
M src/FormatValueCaller.js
M src/ParseValueCaller.js
M src/RepoApi.js
M tests/RepoApi.tests.js
5 files changed, 19 insertions(+), 11 deletions(-)

Approvals:
  Thiemo Mättig (WMDE): Verified; Looks good to me, approved



diff --git a/.jshintrc b/.jshintrc
index e1e7c3e..a5afa4d 100644
--- a/.jshintrc
+++ b/.jshintrc
@@ -50,7 +50,7 @@
 
indent: 4,
quotmark: false,
-   maxlen: 110,
+   maxlen: 100,
maxparams: 7,
maxdepth: 4,
maxstatements: 19,
diff --git a/src/FormatValueCaller.js b/src/FormatValueCaller.js
index 9836a1f..0f44558 100644
--- a/src/FormatValueCaller.js
+++ b/src/FormatValueCaller.js
@@ -31,9 +31,9 @@
_dataTypeStore: null,
 
/**
-* Makes a request to the API to format values on the server 
side. Will return a jQuery.Promise
-* which will be resolved if formatting is successful or 
rejected if it fails or the API cannot
-* be reached.
+* Makes a request to the API to format values on the server 
side. Will return a
+* jQuery.Promise which will be resolved if formatting is 
successful or rejected if it fails
+* or the API cannot be reached.
 * @since 0.5
 *
 * @param {dataValues.DataValue} dataValue
diff --git a/src/ParseValueCaller.js b/src/ParseValueCaller.js
index 07cb134..01f06b4 100644
--- a/src/ParseValueCaller.js
+++ b/src/ParseValueCaller.js
@@ -28,7 +28,8 @@
 
/**
 * Makes a request to the API to parse values on the server side. Will 
return a jQuery.Promise
-* which will be resolved if the call is successful or rejected if the 
API fails or can't be reached.
+* which will be resolved if the call is successful or rejected if the 
API fails or can't be
+* reached.
 * @since 0.5
 *
 * @param {string} parser
@@ -61,8 +62,8 @@
 
if( result.error ) {
// This is a really strange error 
format, and it's not supported by
-   // 
wikibase.api.RepoApiError.newFromApiResponse, so we have to parse it manually 
here.
-   // See bug 72947.
+   // 
wikibase.api.RepoApiError.newFromApiResponse, so we have to parse it manually
+   // here. See bug 72947.
deferred.reject( new 
wb.api.RepoApiError(
result.messages[0].name,
result.messages[0].html['*']
@@ -71,7 +72,10 @@
}
 
if( !( result.value  result.type ) ) {
-   deferred.reject( new 
wb.api.RepoApiError( 'result-unexpected', 'Unknown API error' ) );
+   deferred.reject( new 
wb.api.RepoApiError(
+   'result-unexpected',
+   'Unknown API error'
+   ) );
return;
}
 
diff --git a/src/RepoApi.js b/src/RepoApi.js
index 8b09a27..4baf3f8 100644
--- a/src/RepoApi.js
+++ b/src/RepoApi.js
@@ -316,7 +316,7 @@
/**
 * Removes an existing claim.
 *
-* @param {String} claimGuid The GUID of the Claim to be removed 
(wikibase.datamodel.Claim.getGuid)
+* @param {String} claimGuid The GUID of the Claim to be removed
 * @param {Number} [claimRevisionId]
 * @return {jQuery.Promise}
 */
@@ -356,7 +356,7 @@
/**
 * Changes the Main Snak of an existing claim.
 *
-* @param {string} claimGuid The GUID of the Claim to be changed 
(wikibase.datamodel.Claim.getGuid)
+* @param {string} claimGuid The GUID of the Claim to be changed
 * @param {number} baseRevId
 * @param {string} snakType The type of the snak
 * @param {string} property Id of the snak's property
diff --git a/tests/RepoApi.tests.js b/tests/RepoApi.tests.js
index 0ae19f5..e59aa83 100644
--- a/tests/RepoApi.tests.js
+++ b/tests/RepoApi.tests.js
@@ -454,7 +454,11 @@
 
testrun.queue( qkey, function() {
api.setAliases(
-   entityStack[0].id, entityStack[0].lastrevid, [ 
'alias1', 'alias2' ], [], 'doesnotexist'
+   entityStack[0].id,
+   

[MediaWiki-commits] [Gerrit] add privacy disclaimer - change (labs/private)

2014-11-26 Thread Filippo Giunchedi (Code Review)
Filippo Giunchedi has submitted this change and it was merged.

Change subject: add privacy disclaimer
..


add privacy disclaimer

Change-Id: I44efbae205fdc7a9a9babf55e75ac9953b9e9d40
---
A THIS_REPOSITORY_IS_NOT_PRIVATE
1 file changed, 1 insertion(+), 0 deletions(-)

Approvals:
  Filippo Giunchedi: Verified; Looks good to me, approved
  Hashar: Looks good to me, but someone else must approve
  Alexandros Kosiaris: Looks good to me, approved



diff --git a/THIS_REPOSITORY_IS_NOT_PRIVATE b/THIS_REPOSITORY_IS_NOT_PRIVATE
new file mode 12
index 000..100b938
--- /dev/null
+++ b/THIS_REPOSITORY_IS_NOT_PRIVATE
@@ -0,0 +1 @@
+README
\ No newline at end of file

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I44efbae205fdc7a9a9babf55e75ac9953b9e9d40
Gerrit-PatchSet: 1
Gerrit-Project: labs/private
Gerrit-Branch: master
Gerrit-Owner: Filippo Giunchedi fgiunch...@wikimedia.org
Gerrit-Reviewer: Alexandros Kosiaris akosia...@wikimedia.org
Gerrit-Reviewer: BBlack bbl...@wikimedia.org
Gerrit-Reviewer: Chad ch...@wikimedia.org
Gerrit-Reviewer: Filippo Giunchedi fgiunch...@wikimedia.org
Gerrit-Reviewer: Giuseppe Lavagetto glavage...@wikimedia.org
Gerrit-Reviewer: Hashar has...@free.fr

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


[MediaWiki-commits] [Gerrit] Introduce weblinkchecker-badurl_msg - change (pywikibot/i18n)

2014-11-26 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Introduce weblinkchecker-badurl_msg
..


Introduce weblinkchecker-badurl_msg

We need this message to tell the users
the URL could not be checked at all
due to its incorrect format - as opposed
to 404 or some other error condition

Change-Id: I33c04301685050bc3daced8d6e7599b21e33f7fe
---
M weblinkchecker.py
M weblinkchecker/en.json
M weblinkchecker/qqq.json
3 files changed, 4 insertions(+), 0 deletions(-)

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



diff --git a/weblinkchecker.py b/weblinkchecker.py
index 6b02833..ee41813 100644
--- a/weblinkchecker.py
+++ b/weblinkchecker.py
@@ -2,12 +2,14 @@
 msg = {
 'en': {
 'weblinkchecker-archive_msg': u'The web page has been saved by the 
Internet Archive. Please consider linking to an appropriate archived version: 
[%(URL)s].',
+'weblinkchecker-badurl_msg': u'The link provided does not appear to be 
a valid URL',
 'weblinkchecker-caption': u'Dead link',
 'weblinkchecker-summary': u'Bot: Reporting unavailable external link',
 'weblinkchecker-report': u'During several automated bot runs the 
following external link was found to be unavailable. Please check if the link 
is in fact down and fix or remove it in that case!',
 },
 'qqq': {
 'weblinkchecker-archive_msg': u'weblinkchecker report message for web 
archives',
+'weblinkchecker-badurl_msg': u'weblinkchecker report message if the 
link in the article is not a valid URL',
 'weblinkchecker-caption': u'The weblinkchecker report\'s caption',
 'weblinkchecker-summary': u'Edit summary for weblinkchecker report',
 'weblinkchecker-report': u'The weblinkchecker report',
diff --git a/weblinkchecker/en.json b/weblinkchecker/en.json
index b2b9d36..a322664 100644
--- a/weblinkchecker/en.json
+++ b/weblinkchecker/en.json
@@ -1,5 +1,6 @@
 {
weblinkchecker-archive_msg: The web page has been saved by the 
Internet Archive. Please consider linking to an appropriate archived version: 
[%(URL)s].,
+   weblinkchecker-badurl: The link provided does not seem to be a valid 
URL,
weblinkchecker-caption: Dead link,
weblinkchecker-summary: Bot: Reporting unavailable external link,
weblinkchecker-report: During several automated bot runs the 
following external link was found to be unavailable. Please check if the link 
is in fact down and fix or remove it in that case!
diff --git a/weblinkchecker/qqq.json b/weblinkchecker/qqq.json
index 5df3d60..43d0eb9 100644
--- a/weblinkchecker/qqq.json
+++ b/weblinkchecker/qqq.json
@@ -1,6 +1,7 @@
 {
@metadata: [],
weblinkchecker-archive_msg: weblinkchecker report message for web 
archives,
+   weblinkchecker-badurl_msg: weblinkchecker report message if the link 
in the article is not a valid URL,
weblinkchecker-caption: The weblinkchecker report's caption,
weblinkchecker-summary: Edit summary for weblinkchecker report,
weblinkchecker-report: The weblinkchecker report

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I33c04301685050bc3daced8d6e7599b21e33f7fe
Gerrit-PatchSet: 4
Gerrit-Project: pywikibot/i18n
Gerrit-Branch: master
Gerrit-Owner: saper sa...@saper.info
Gerrit-Reviewer: Merlijn van Deen valhall...@arctus.nl
Gerrit-Reviewer: Siebrand siebr...@kitano.nl
Gerrit-Reviewer: Xqt i...@gno.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] Fix most annoying SVG bug, SVG path data number parsing issue - change (operations...librsvg)

2014-11-26 Thread Alexandros Kosiaris (Code Review)
Alexandros Kosiaris has submitted this change and it was merged.

Change subject: Fix most annoying SVG bug, SVG path data number parsing issue
..


Fix most annoying SVG bug, SVG path data number parsing issue

Hopefully we will get this from upstream on next dist upgrade however
this is most annoying issue of Wikimedia SVG parser, so lets fix it

Cherrypicked from 
https://git.gnome.org/browse/librsvg/commit/?id=5ba4343bccc7e1765f38f87490b3d6a3a500fde1

Change-Id: I5f7cfec14ed4cb3d22197f377d9e26a0c0101c9b
---
M debian/changelog
M rsvg-path.c
2 files changed, 120 insertions(+), 77 deletions(-)

Approvals:
  Alexandros Kosiaris: Verified; Looks good to me, approved



diff --git a/debian/changelog b/debian/changelog
index 2a179fc..6936ae8 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+librsvg (2.36.1-1wm2) precise-wikimedia; urgency=medium
+
+  * Apply patch of https://bugzilla.gnome.org/show_bug.cgi?id=620923
+and fix SVG path data number parsing issue
+
+ -- Ebrahim Byagowi ebra...@gnu.org  Sun, 16 Nov 2014 14:45:22 GMT+0330
+
 librsvg (2.36.1-1wm1) precise-wikimedia; urgency=low
 
   * Added a rewritten version of no-external-files.patch, submitted upstream
diff --git a/rsvg-path.c b/rsvg-path.c
index 604b64c..ce9be42 100644
--- a/rsvg-path.c
+++ b/rsvg-path.c
@@ -210,7 +210,7 @@
 }
 
 /**
- * rsvg_path_arc: Add an RSVG arc to the path context.
+ * rsvg_path_arc:
  * @ctx: Path context.
  * @rx: Radius in x direction (before rotation).
  * @ry: Radius in y direction (before rotation).
@@ -220,6 +220,7 @@
  * @x: New x coordinate.
  * @y: New y coordinate.
  *
+ * Add an RSVG arc to the path context.
  **/
 static void
 rsvg_path_arc (RSVGParsePathCtx * ctx,
@@ -567,100 +568,135 @@
 rsvg_parse_path_do_cmd (ctx, FALSE);
 }
 
+#define RSVGN_IN_PREINTEGER  0
+#define RSVGN_IN_INTEGER 1
+#define RSVGN_IN_FRACTION2
+#define RSVGN_IN_PREEXPONENT 3
+#define RSVGN_IN_EXPONENT4
+
+#define RSVGN_GOT_SIGN  0x1
+#define RSVGN_GOT_EXPONENT_SIGN 0x2
+
+/* Returns the length of the number parsed, so it can be skipped
+ * in rsvg_parse_path_data. Calls rsvg_path_end_number to have the number
+ * processed in its command.
+ */
+static int
+rsvg_parse_number (RSVGParsePathCtx * ctx, const char *data)
+{
+int length = 0;
+int in = RSVGN_IN_PREINTEGER; /* Current location within the number */
+int got = 0x0; /* [bitfield] Having 2 of each of these is an error */
+gboolean end = FALSE; /* Set to true if the number should end after a char 
*/
+gboolean error = FALSE; /* Set to true if the number ended due to an error 
*/
+
+double value = 0.0;
+double fraction = 1.0;
+int sign = +1; /* Presume the INTEGER is positive if it has no sign */
+int exponent = 0;
+int exponent_sign = +1; /* Presume the EXPONENT is positive if it has no 
sign */
+
+while (data[length] != '\0'  !end  !error) {
+char c = data[length];
+switch (in) {
+case RSVGN_IN_PREINTEGER: /* No numbers yet, we're just starting 
out */
+/* LEGAL: + - .-FRACTION DIGIT-INTEGER */
+if (c == '+' || c == '-') {
+if (got  RSVGN_GOT_SIGN) {
+error = TRUE; /* Two signs: not allowed */
+} else {
+sign = c == '+' ? +1 : -1;
+got |= RSVGN_GOT_SIGN;
+}
+} else if (c == '.') {
+in = RSVGN_IN_FRACTION;
+} else if (c = '0'  c = '9') {
+value = c - '0';
+in = RSVGN_IN_INTEGER;
+}
+break;
+case RSVGN_IN_INTEGER: /* Previous character(s) was/were digit(s) 
*/
+/* LEGAL: DIGIT .-FRACTION E-PREEXPONENT */
+if (c = '0'  c = '9') {
+value = value * 10 + (c - '0');
+}
+else if (c == '.') {
+in = RSVGN_IN_FRACTION;
+}
+else if (c == 'e' || c == 'E') {
+in = RSVGN_IN_PREEXPONENT;
+}
+else {
+end = TRUE;
+}
+break;
+case RSVGN_IN_FRACTION: /* Previously, digit(s) in the fractional 
part */
+/* LEGAL: DIGIT E-PREEXPONENT */
+if (c = '0'  c = '9') {
+fraction *= 0.1;
+value += fraction * (c - '0');
+}
+else if (c == 'e' || c == 'E') {
+in = RSVGN_IN_PREEXPONENT;
+}
+else {
+end = TRUE;
+}
+break;
+case RSVGN_IN_PREEXPONENT: /* Right after E */
+/* LEGAL: + - DIGIT-EXPONENT */
+if (c == '+' || c == '-') {
+   

[MediaWiki-commits] [Gerrit] Shut down writer once input is exhausted - change (mediawiki...EventLogging)

2014-11-26 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Shut down writer once input is exhausted
..


Shut down writer once input is exhausted

* Call the close() method on the writer coroutine once the reader has been
  exhausted. This way, writers can catch the GeneratorExit exception and
  perform clean-up work and shut down gracefully.
* Add a stop() method to PeriodicThread which performs a graceful shutdown.
* Make the SQL writer call stop() on the worker when it's shutting down.

Change-Id: I8d589a29db4246ec71f6b2237e908c5b928202a8
---
M server/eventlogging/factory.py
M server/eventlogging/handlers.py
M server/eventlogging/utils.py
3 files changed, 23 insertions(+), 4 deletions(-)

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



diff --git a/server/eventlogging/factory.py b/server/eventlogging/factory.py
index 9c88507..642b4b4 100644
--- a/server/eventlogging/factory.py
+++ b/server/eventlogging/factory.py
@@ -84,3 +84,4 @@
 writer = get_writer(out_url)
 for event in reader:
 writer.send(event)
+writer.close()
diff --git a/server/eventlogging/handlers.py b/server/eventlogging/handlers.py
index 2e2efb3..a01dfdd 100644
--- a/server/eventlogging/handlers.py
+++ b/server/eventlogging/handlers.py
@@ -97,9 +97,22 @@
 args=(meta, events, replace))
 worker.start()
 
-while worker.is_alive():
-event = (yield)
-events.append(event)
+try:
+# Link the main thread to the worker thread to ensure that we don't
+# keep filling the queue if the worker isn't around to drain it.
+while worker.is_alive():
+event = (yield)
+events.append(event)
+except GeneratorExit:
+# Allow the worker to complete any work that is already in progress
+# before shutting down.
+worker.stop()
+worker.join()
+finally:
+# If there are any events remaining in the queue, process them in the
+# main thread before exiting.
+if events:
+store_sql_events(meta, events)
 
 
 @writes('file')
diff --git a/server/eventlogging/utils.py b/server/eventlogging/utils.py
index 6260a09..5fcc5fe 100644
--- a/server/eventlogging/utils.py
+++ b/server/eventlogging/utils.py
@@ -22,10 +22,11 @@
 def __init__(self, interval, *args, **kwargs):
 self.interval = interval
 self.ready = threading.Event()
+self.stopping = threading.Event()
 super(PeriodicThread, self).__init__(*args, **kwargs)
 
 def run(self):
-while 1:
+while not self.stopping.is_set():
 if self.ready.wait(self.interval):
 # If the internal flag of `self.ready` was set, we were
 # interrupted mid-nap to run immediately. But before we
@@ -33,6 +34,10 @@
 self.ready.clear()
 self._Thread__target(*self._Thread__args, **self._Thread__kwargs)
 
+def stop(self):
+Graceful stop: stop once the current iteration is complete.
+self.stopping.set()
+
 
 def uri_delete_query_item(uri, key):
 Delete a key=value pair (specified by key) from a URI's query string.

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8d589a29db4246ec71f6b2237e908c5b928202a8
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/EventLogging
Gerrit-Branch: master
Gerrit-Owner: QChris christ...@quelltextlich.at
Gerrit-Reviewer: Nuria nu...@wikimedia.org
Gerrit-Reviewer: Ori.livneh o...@wikimedia.org
Gerrit-Reviewer: QChris christ...@quelltextlich.at
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Update Wikidata to wmf/1.25wmf10 branch - change (mediawiki...release)

2014-11-26 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Update Wikidata to wmf/1.25wmf10 branch
..


Update Wikidata to wmf/1.25wmf10 branch

Change-Id: I23e3b9857d6fd46a298a83556ce05f56a59d7d84
---
M make-wmf-branch/default.conf
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/make-wmf-branch/default.conf b/make-wmf-branch/default.conf
index 9376c74..93c1c1c 100644
--- a/make-wmf-branch/default.conf
+++ b/make-wmf-branch/default.conf
@@ -177,7 +177,7 @@
'DonationInterface' = 'deployment',
 
// to use instead of the above
-   'Wikidata' = 'wmf/1.25wmf8',
+   'Wikidata' = 'wmf/1.25wmf10',
 
// For wikitech use only!
'SemanticMediaWiki' = '1.8.x',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I23e3b9857d6fd46a298a83556ce05f56a59d7d84
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/tools/release
Gerrit-Branch: master
Gerrit-Owner: Hoo man h...@online.de
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] ToC tweaks: always on ToC - change (apps...wikipedia)

2014-11-26 Thread Dbrant (Code Review)
Dbrant has submitted this change and it was merged.

Change subject: ToC tweaks: always on ToC
..


ToC tweaks: always on ToC

- ToC button is always visible and enabled
- still: ToC opened automatically for all pages except Main page
- if user invokes ToC on Main page the onboarding text could show up
- show progress bar inside ToC drawer if ToC is opened while page is still 
loading

Change-Id: If9371dce97589d1c904fe1ca6c37057e74a433c0
---
M wikipedia/res/menu/menu_page_actions.xml
M wikipedia/src/main/java/org/wikipedia/page/PageViewFragmentInternal.java
M wikipedia/src/main/java/org/wikipedia/page/ToCHandler.java
3 files changed, 14 insertions(+), 24 deletions(-)

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



diff --git a/wikipedia/res/menu/menu_page_actions.xml 
b/wikipedia/res/menu/menu_page_actions.xml
index ece6806..ba0bda1 100644
--- a/wikipedia/res/menu/menu_page_actions.xml
+++ b/wikipedia/res/menu/menu_page_actions.xml
@@ -7,7 +7,6 @@
   android:title=@string/menu_show_toc
   android:icon=@drawable/ic_toc
   app:showAsAction=ifRoom
-  android:visible=false
   /
 item android:id=@+id/menu_other_languages
   android:title=@string/menu_other_languages
diff --git 
a/wikipedia/src/main/java/org/wikipedia/page/PageViewFragmentInternal.java 
b/wikipedia/src/main/java/org/wikipedia/page/PageViewFragmentInternal.java
index 2b9dbc5..fecc895 100644
--- a/wikipedia/src/main/java/org/wikipedia/page/PageViewFragmentInternal.java
+++ b/wikipedia/src/main/java/org/wikipedia/page/PageViewFragmentInternal.java
@@ -319,9 +319,6 @@
 
 app = (WikipediaApp)getActivity().getApplicationContext();
 
-// disable TOC drawer until the page is loaded
-tocDrawer.setSlidingEnabled(false);
-
 savedPagesFunnel = 
app.getFunnelManager().getSavedPagesFunnel(title.getSite());
 
 connectionIssueFunnel = new ConnectionIssueFunnel(app);
@@ -424,6 +421,13 @@
 page = PAGE_CACHE.get(titleOriginal);
 title = page.getTitle();
 state = STATE_COMPLETE_FETCH;
+}
+
+if (tocHandler == null) {
+tocHandler = new ToCHandler(getActivity(),
+tocDrawer,
+bridge,
+title.getSite());
 }
 
 setState(state);
@@ -551,14 +555,7 @@
 
 // FIXME: Move this out into a PageComplete event of sorts
 if (state == STATE_COMPLETE_FETCH) {
-if (tocHandler == null) {
-tocHandler = new ToCHandler(getActivity(),
-tocDrawer,
-bridge);
-}
 tocHandler.setupToC(page);
-
-getActivity().supportInvalidateOptionsMenu();
 
 //add the page to cache!
 PAGE_CACHE.put(titleOriginal, page);
@@ -570,9 +567,6 @@
 
 public void onPrepareOptionsMenu(Menu menu) {
 
app.adjustDrawableToTheme(getResources().getDrawable(R.drawable.ic_toc));
-
-MenuItem tocMenuItem = menu.findItem(R.id.menu_toc);
-tocMenuItem.setVisible(tocDrawer.getSlidingEnabled(Gravity.END));
 
 switch (state) {
 case PageViewFragmentInternal.STATE_NO_FETCH:
@@ -839,8 +833,8 @@
 if (!isAdded()) {
 return;
 }
-// in any case, make sure the TOC drawer is closed and disabled
-tocDrawer.setSlidingEnabled(false);
+// in any case, make sure the TOC drawer is closed
+tocDrawer.closeDrawers();
 getActivity().updateProgressBar(false, true, 0);
 refreshView.setRefreshing(false);
 
diff --git a/wikipedia/src/main/java/org/wikipedia/page/ToCHandler.java 
b/wikipedia/src/main/java/org/wikipedia/page/ToCHandler.java
index 6b2a5df..ef3b0f5 100644
--- a/wikipedia/src/main/java/org/wikipedia/page/ToCHandler.java
+++ b/wikipedia/src/main/java/org/wikipedia/page/ToCHandler.java
@@ -1,6 +1,7 @@
 package org.wikipedia.page;
 
 import org.wikipedia.R;
+import org.wikipedia.Site;
 import org.wikipedia.Utils;
 import org.wikipedia.ViewAnimations;
 import org.wikipedia.WikipediaApp;
@@ -48,10 +49,12 @@
 private boolean openedViaSwipe = true;
 
 public ToCHandler(final ActionBarActivity activity, final 
DisableableDrawerLayout slidingPane,
-  final CommunicationBridge bridge) {
+  final CommunicationBridge bridge, final Site site) {
 this.parentActivity = activity;
 this.bridge = bridge;
 this.slidingPane = slidingPane;
+
+funnel = new 
ToCInteractionFunnel((WikipediaApp)slidingPane.getContext().getApplicationContext(),
 site);
 
 this.tocList = (ListView) slidingPane.findViewById(R.id.page_toc_list);
 this.tocProgress = (ProgressBar) 
slidingPane.findViewById(R.id.page_toc_in_progress);
@@ -152,8 +155,6 @@
 

[MediaWiki-commits] [Gerrit] Update 1.25wmf9 Flow with cherry-pick I5e0490d0 - change (mediawiki/core)

2014-11-26 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Update 1.25wmf9 Flow with cherry-pick I5e0490d0
..


Update 1.25wmf9 Flow with cherry-pick I5e0490d0

Change-Id: Ib4d3fce02e79845e5d985658063870189cf7bc05
---
M extensions/Flow
1 file changed, 0 insertions(+), 0 deletions(-)

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



diff --git a/extensions/Flow b/extensions/Flow
index 16d43af..61ec4d9 16
--- a/extensions/Flow
+++ b/extensions/Flow
-Subproject commit 16d43af1f7742693b06461f06c1466f34ab17c52
+Subproject commit 61ec4d963c4d41af3128c37331423e5d3aefc5bd

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib4d3fce02e79845e5d985658063870189cf7bc05
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.25wmf9
Gerrit-Owner: Spage sp...@wikimedia.org
Gerrit-Reviewer: EBernhardson ebernhard...@wikimedia.org
Gerrit-Reviewer: MarkTraceur mtrac...@member.fsf.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] Move validateAnalyzers code into separate class - change (mediawiki...CirrusSearch)

2014-11-26 Thread Matthias Mullie (Code Review)
Matthias Mullie has uploaded a new change for review.

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

Change subject: Move validateAnalyzers code into separate class
..

Move validateAnalyzers code into separate class

Meanwhile also duplicated checkConfig  related in Validator.php
Meanwhile also removed getSettings method, which is no longer used

Change-Id: I22e132d6698f53c47a243d05141384a675dac7ad
---
M CirrusSearch.php
A includes/Maintenance/Validators/AnalyzersValidator.php
M includes/Maintenance/Validators/Validator.php
M maintenance/updateOneSearchIndexConfig.php
4 files changed, 139 insertions(+), 15 deletions(-)


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

diff --git a/CirrusSearch.php b/CirrusSearch.php
index a612290..7f1b6ff 100644
--- a/CirrusSearch.php
+++ b/CirrusSearch.php
@@ -582,6 +582,7 @@
 
$wgAutoloadClasses['CirrusSearch\Maintenance\Validators\MaxShardsPerNodeValidator']
 = $maintenanceDir . '/Validators/MaxShardsPerNodeValidator.php';
 
$wgAutoloadClasses['CirrusSearch\Maintenance\Validators\NumberOfShardsValidator']
 = $maintenanceDir . '/Validators/NumberOfShardsValidator.php';
 
$wgAutoloadClasses['CirrusSearch\Maintenance\Validators\ReplicaRangeValidator'] 
= $maintenanceDir . '/Validators/ReplicaRangeValidator.php';
+$wgAutoloadClasses['CirrusSearch\Maintenance\Validators\AnalyzersValidator'] = 
$maintenanceDir . '/Validators/AnalyzersValidator.php';
 $wgAutoloadClasses['CirrusSearch\Maintenance\UpdateVersionIndex'] = __DIR__ . 
'/maintenance/updateVersionIndex.php';
 $wgAutoloadClasses['CirrusSearch\NearMatchPicker'] = $includes . 
'NearMatchPicker.php';
 $wgAutoloadClasses['CirrusSearch\OtherIndexes'] = $includes . 
'OtherIndexes.php';
diff --git a/includes/Maintenance/Validators/AnalyzersValidator.php 
b/includes/Maintenance/Validators/AnalyzersValidator.php
new file mode 100644
index 000..85cb59f
--- /dev/null
+++ b/includes/Maintenance/Validators/AnalyzersValidator.php
@@ -0,0 +1,45 @@
+?php
+
+namespace CirrusSearch\Maintenance\Validators;
+
+use CirrusSearch\Maintenance\AnalysisConfigBuilder;
+use CirrusSearch\Maintenance\Maintenance;
+use Elastica\Index;
+
+class AnalyzersValidator extends Validator {
+   /**
+* @var Index
+*/
+   private $index;
+
+   /**
+* @var AnalysisConfigBuilder
+*/
+   private $analysisConfigBuilder;
+
+   /**
+* @param Index $index
+* @param AnalysisConfigBuilder $analysisConfigBuilder
+* @param Maintenance $out
+*/
+   public function __construct( Index $index, AnalysisConfigBuilder 
$analysisConfigBuilder, Maintenance $out = null ) {
+   parent::__construct( $out );
+
+   $this-index = $index;
+   $this-analysisConfigBuilder = $analysisConfigBuilder;
+   }
+
+   public function validate() {
+   $this-outputIndented( Validating analyzers... );
+   $settings = $this-index-getSettings()-get();
+   $requiredAnalyzers = 
$this-analysisConfigBuilder-buildConfig();
+   if ( $this-checkConfig( $settings[ 'analysis' ], 
$requiredAnalyzers ) ) {
+   $this-output( ok\n );
+   } else {
+   $this-output( cannot correct\n );
+   return false;
+   }
+
+   return true;
+   }
+}
diff --git a/includes/Maintenance/Validators/Validator.php 
b/includes/Maintenance/Validators/Validator.php
index d209e76..1665863 100644
--- a/includes/Maintenance/Validators/Validator.php
+++ b/includes/Maintenance/Validators/Validator.php
@@ -11,6 +11,11 @@
protected $out;
 
/**
+* @var bool
+*/
+   protected $printDebugCheckConfig = false;
+
+   /**
 * @param Maintenance $out Maintenance object, to relay output to.
 */
public function __construct( Maintenance $out = null ) {
@@ -23,6 +28,83 @@
abstract public function validate();
 
/**
+* @param bool $print
+*/
+   public function printDebugCheckConfig( $print = true ) {
+   $this-printDebugCheckConfig = (bool) $print;
+   }
+
+   /**
+* @param $actual
+* @param $required array
+* @param string|null $indent
+* @return bool
+*/
+   protected function checkConfig( $actual, $required, $indent = null ) {
+   foreach( $required as $key = $value ) {
+   $this-debugCheckConfig( \n$indent$key:  );
+   if ( !array_key_exists( $key, $actual ) ) {
+   $this-debugCheckConfig( not found... );
+   if ( $key === '_all' ) {
+   // The _all field never comes back so 
we just have to assume it
+   // is set 

[MediaWiki-commits] [Gerrit] Move validateIndexSettings code into 3 separate classes - change (mediawiki...CirrusSearch)

2014-11-26 Thread Matthias Mullie (Code Review)
Matthias Mullie has uploaded a new change for review.

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

Change subject: Move validateIndexSettings code into 3 separate classes
..

Move validateIndexSettings code into 3 separate classes

Change-Id: I027f2d7044237f7a9a9c12d7a7adfb2c94194177
---
M CirrusSearch.php
A includes/Maintenance/Validators/MaxShardsPerNodeValidator.php
A includes/Maintenance/Validators/NumberOfShardsValidator.php
A includes/Maintenance/Validators/ReplicaRangeValidator.php
M maintenance/updateOneSearchIndexConfig.php
5 files changed, 160 insertions(+), 34 deletions(-)


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

diff --git a/CirrusSearch.php b/CirrusSearch.php
index 78aafef..a612290 100644
--- a/CirrusSearch.php
+++ b/CirrusSearch.php
@@ -579,6 +579,9 @@
 $wgAutoloadClasses['CirrusSearch\Maintenance\Validators\Validator'] = 
$maintenanceDir . '/Validators/Validator.php';
 
$wgAutoloadClasses['CirrusSearch\Maintenance\Validators\CacheWarmersValidator'] 
= $maintenanceDir . '/Validators/CacheWarmersValidator.php';
 
$wgAutoloadClasses['CirrusSearch\Maintenance\Validators\ShardAllocationValidator']
 = $maintenanceDir . '/Validators/ShardAllocationValidator.php';
+$wgAutoloadClasses['CirrusSearch\Maintenance\Validators\MaxShardsPerNodeValidator']
 = $maintenanceDir . '/Validators/MaxShardsPerNodeValidator.php';
+$wgAutoloadClasses['CirrusSearch\Maintenance\Validators\NumberOfShardsValidator']
 = $maintenanceDir . '/Validators/NumberOfShardsValidator.php';
+$wgAutoloadClasses['CirrusSearch\Maintenance\Validators\ReplicaRangeValidator']
 = $maintenanceDir . '/Validators/ReplicaRangeValidator.php';
 $wgAutoloadClasses['CirrusSearch\Maintenance\UpdateVersionIndex'] = __DIR__ . 
'/maintenance/updateVersionIndex.php';
 $wgAutoloadClasses['CirrusSearch\NearMatchPicker'] = $includes . 
'NearMatchPicker.php';
 $wgAutoloadClasses['CirrusSearch\OtherIndexes'] = $includes . 
'OtherIndexes.php';
diff --git a/includes/Maintenance/Validators/MaxShardsPerNodeValidator.php 
b/includes/Maintenance/Validators/MaxShardsPerNodeValidator.php
new file mode 100644
index 000..92bd2b6
--- /dev/null
+++ b/includes/Maintenance/Validators/MaxShardsPerNodeValidator.php
@@ -0,0 +1,61 @@
+?php
+
+namespace CirrusSearch\Maintenance\Validators;
+
+use CirrusSearch\Maintenance\Maintenance;
+use Elastica\Index;
+
+class MaxShardsPerNodeValidator extends Validator {
+   /**
+* @var Index
+*/
+   private $index;
+
+   /**
+* @var string
+*/
+   private $indexType;
+
+   /**
+* @var array
+*/
+   private $maxShardsPerNode;
+
+   /**
+* @param Index $index
+* @param string $indexType
+* @param array $maxShardsPerNode
+* @param Maintenance $out
+*/
+   public function __construct( Index $index, $indexType, array 
$maxShardsPerNode, Maintenance $out = null ) {
+   parent::__construct( $out );
+
+   $this-index = $index;
+   $this-indexType = $indexType;
+   $this-maxShardsPerNode = $maxShardsPerNode;
+   }
+
+   public function validate() {
+   $this-outputIndented( \tValidating max shards per node... );
+   $settings = $this-index-getSettings()-get();
+   // Elasticsearch uses negative numbers or an unset value to 
represent unlimited.  We use the word 'unlimited'
+   // because that is easier to read.
+   $actualMaxShardsPerNode = isset( $settings[ 'routing' ][ 
'allocation' ][ 'total_shards_per_node' ] ) ?
+   $settings[ 'routing' ][ 'allocation' ][ 
'total_shards_per_node' ] : 'unlimited';
+   $actualMaxShardsPerNode = $actualMaxShardsPerNode  0 ? 
'unlimited' : $actualMaxShardsPerNode;
+   $expectedMaxShardsPerNode = isset( $this-maxShardsPerNode[ 
$this-indexType ] ) ?
+   $this-maxShardsPerNode[ $this-indexType ] : 
'unlimited';
+   if ( $actualMaxShardsPerNode == $expectedMaxShardsPerNode ) {
+   $this-output( ok\n );
+   } else {
+   $this-output( is $actualMaxShardsPerNode but should 
be $expectedMaxShardsPerNode... );
+   $expectedMaxShardsPerNode = $expectedMaxShardsPerNode 
=== 'unlimited' ? -1 : $expectedMaxShardsPerNode;
+   $this-index-getSettings()-set( array(
+   'routing.allocation.total_shards_per_node' = 
$expectedMaxShardsPerNode
+   ) );
+   $this-output( corrected\n );
+   }
+
+   return true;
+   }
+}
diff --git a/includes/Maintenance/Validators/NumberOfShardsValidator.php 
b/includes/Maintenance/Validators/NumberOfShardsValidator.php
new file mode 100644
index 000..203dc94
--- /dev/null

[MediaWiki-commits] [Gerrit] Enable VisualEditor Beta Feature on other wikis too - change (operations/mediawiki-config)

2014-11-26 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Enable VisualEditor Beta Feature on other wikis too
..


Enable VisualEditor Beta Feature on other wikis too

Change-Id: If7a181449486819a8e93d8f280b3100d3cdb9adb
---
D visualeditor.dblist
M wmf-config/CommonSettings.php
M wmf-config/InitialiseSettings.php
3 files changed, 10 insertions(+), 316 deletions(-)

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



diff --git a/visualeditor.dblist b/visualeditor.dblist
deleted file mode 100644
index 4823c03..000
--- a/visualeditor.dblist
+++ /dev/null
@@ -1,312 +0,0 @@
-testwiki
-test2wiki
-mediawikiwiki
-metawiki
-incubatorwiki
-aawiki
-abwiki
-acewiki
-afwiki
-akwiki
-alswiki
-amwiki
-angwiki
-anwiki
-arcwiki
-arwiki
-arzwiki
-astwiki
-aswiki
-avwiki
-aywiki
-azwiki
-barwiki
-bat_smgwiki
-bawiki
-bclwiki
-be_x_oldwiki
-bewiki
-bgwiki
-bhwiki
-biwiki
-bjnwiki
-bmwiki
-bnwiki
-bowiki
-bpywiki
-brwiki
-bswiki
-bugwiki
-bxrwiki
-cawiki
-cbk_zamwiki
-cdowiki
-cebwiki
-cewiki
-chowiki
-chrwiki
-chwiki
-chywiki
-ckbwiki
-cowiki
-crhwiki
-crwiki
-csbwiki
-cswiki
-cuwiki
-cvwiki
-cywiki
-dawiki
-dewiki
-diqwiki
-dsbwiki
-dvwiki
-dzwiki
-eewiki
-elwiki
-emlwiki
-enwiki
-eowiki
-eswiki
-etwiki
-euwiki
-extwiki
-fawiki
-ffwiki
-fiu_vrowiki
-fiwiki
-fjwiki
-fowiki
-frpwiki
-frrwiki
-frwiki
-furwiki
-fywiki
-gagwiki
-ganwiki
-gawiki
-gdwiki
-glkwiki
-glwiki
-gnwiki
-gotwiki
-guwiki
-gvwiki
-hakwiki
-hawiki
-hawwiki
-hewiki
-hifwiki
-hiwiki
-howiki
-hrwiki
-hsbwiki
-htwiki
-huwiki
-hywiki
-hzwiki
-iawiki
-idwiki
-iewiki
-igwiki
-iiwiki
-ikwiki
-ilowiki
-iowiki
-iswiki
-itwiki
-iuwiki
-jawiki
-jbowiki
-jvwiki
-kaawiki
-kabwiki
-kawiki
-kbdwiki
-kgwiki
-kiwiki
-kjwiki
-kkwiki
-klwiki
-kmwiki
-knwiki
-koiwiki
-kowiki
-krcwiki
-krwiki
-kshwiki
-kswiki
-kuwiki
-kvwiki
-kwwiki
-kywiki
-ladwiki
-lawiki
-lbewiki
-lbwiki
-lezwiki
-lgwiki
-lijwiki
-liwiki
-lmowiki
-lnwiki
-lowiki
-ltgwiki
-ltwiki
-lvwiki
-maiwiki
-map_bmswiki
-mdfwiki
-mgwiki
-mhrwiki
-mhwiki
-minwiki
-miwiki
-mkwiki
-mlwiki
-mnwiki
-mowiki
-mrjwiki
-mrwiki
-mswiki
-mtwiki
-muswiki
-mwlwiki
-myvwiki
-mywiki
-mznwiki
-nahwiki
-napwiki
-nawiki
-nds_nlwiki
-ndswiki
-newiki
-newwiki
-ngwiki
-nlwiki
-nnwiki
-novwiki
-nowiki
-nrmwiki
-nsowiki
-nvwiki
-nywiki
-ocwiki
-omwiki
-orwiki
-oswiki
-pagwiki
-pamwiki
-papwiki
-pawiki
-pcdwiki
-pdcwiki
-pflwiki
-pihwiki
-piwiki
-plwiki
-pmswiki
-pnbwiki
-pntwiki
-pswiki
-ptwiki
-quwiki
-rmwiki
-rmywiki
-rnwiki
-roa_rupwiki
-roa_tarawiki
-rowiki
-ruewiki
-ruwiki
-rwwiki
-sahwiki
-sawiki
-scnwiki
-scowiki
-scwiki
-sdwiki
-sewiki
-sgwiki
-shwiki
-simplewiki
-siwiki
-skwiki
-slwiki
-smwiki
-snwiki
-sowiki
-sqwiki
-srnwiki
-srwiki
-sswiki
-stqwiki
-stwiki
-suwiki
-svwiki
-swwiki
-szlwiki
-tawiki
-tetwiki
-tewiki
-tgwiki
-thwiki
-tiwiki
-tkwiki
-tlwiki
-tnwiki
-towiki
-tpiwiki
-trwiki
-tswiki
-ttwiki
-tumwiki
-twwiki
-tywiki
-tyvwiki
-udmwiki
-ugwiki
-ukwiki
-urwiki
-uzwiki
-vecwiki
-vepwiki
-vewiki
-viwiki
-vlswiki
-vowiki
-warwiki
-wawiki
-wowiki
-wuuwiki
-xalwiki
-xhwiki
-xmfwiki
-yiwiki
-yowiki
-zawiki
-zeawiki
-zh_classicalwiki
-zh_min_nanwiki
-zh_yuewiki
-zhwiki
-zuwiki
-cawikiquote
-frwiktionary
-svwiktionary
-frwikibooks
-ptwikibooks
-commonswiki
-frwikiversity
-ptwikiversity
-frwikinews
-wikimania2014wiki
-wikimania2015wiki
-outreachwiki
-sewikimedia
-boardwiki
-collabwiki
-legalteamwiki
-officewiki
-otrs_wikiwiki
-wikimaniateamwiki
diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index ed0a5c9..a48343b 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -196,8 +196,8 @@
 
$wikiTags = array();
foreach ( array( 'private', 'fishbowl', 'special', 'closed', 
'flaggedrevs', 'small', 'medium',
-   'large', 'wikimania', 'wikidata', 'wikidataclient', 
'mediaviewer', 'visualeditor',
-   'visualeditor-default', 'echowikis', 'commonsuploads', 
'nonbetafeatures' ) as $tag ) {
+   'large', 'wikimania', 'wikidata', 'wikidataclient', 
'mediaviewer', 'visualeditor-default',
+   'echowikis', 'commonsuploads', 'nonbetafeatures' ) as 
$tag ) {
$dblist = array_map( 'trim', file( getRealmSpecificFilename( 
$IP/../$tag.dblist ) ) );
if ( in_array( $wgDBname, $dblist ) ) {
$wikiTags[] = $tag;
diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 80c0f2d..f6879ab 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -11779,8 +11779,13 @@
 // -- VisualEditor start --
 
 'wmgUseVisualEditor' = array(
-   'default' = false,
-   'visualeditor' = true,
+   'default' = true,
+   'nonbetafeatures' = false,
+
+   'wikisource' = false,  # Paused until ProofreadPage integration is 
good to go
+   'wiktionary' = false,  # 

[MediaWiki-commits] [Gerrit] Fix certain links to sections within the current page. - change (apps...wikipedia)

2014-11-26 Thread Dbrant (Code Review)
Dbrant has uploaded a new change for review.

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

Change subject: Fix certain links to sections within the current page.
..

Fix certain links to sections within the current page.

Bug: 71745

Change-Id: I5ad41283bb689aa96770f8c8b460a0fb6e0e47e2
---
M wikipedia/src/main/java/org/wikipedia/page/PageActivity.java
M wikipedia/src/main/java/org/wikipedia/page/PageViewFragmentInternal.java
M wikipedia/src/main/java/org/wikipedia/page/ToCHandler.java
3 files changed, 25 insertions(+), 5 deletions(-)


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

diff --git a/wikipedia/src/main/java/org/wikipedia/page/PageActivity.java 
b/wikipedia/src/main/java/org/wikipedia/page/PageActivity.java
index 853d734..a3192a9 100644
--- a/wikipedia/src/main/java/org/wikipedia/page/PageActivity.java
+++ b/wikipedia/src/main/java/org/wikipedia/page/PageActivity.java
@@ -43,6 +43,7 @@
 import android.support.v7.app.ActionBarDrawerToggle;
 import android.support.v7.widget.Toolbar;
 import android.text.Html;
+import android.text.TextUtils;
 import android.util.Log;
 import android.view.Gravity;
 import android.view.MenuItem;
@@ -443,10 +444,15 @@
 
 //is the new title the same as what's already being displayed?
 if (getTopFragment() instanceof PageViewFragment) {
-if 
(((PageViewFragment)getTopFragment()).getFragment().getTitle().equals(title)) {
+PageViewFragmentInternal frag = getCurPageFragment();
+if (frag.getTitle().equals(title)) {
+//if we have a section to scroll to, then pass it to the 
fragment
+if (!TextUtils.isEmpty(title.getFragment())) {
+frag.scrollToSection(title.getFragment());
+}
 return;
 }
-getCurPageFragment().closeFindInPage();
+frag.closeFindInPage();
 }
 
 pushFragment(PageViewFragment.newInstance(title, entry));
diff --git 
a/wikipedia/src/main/java/org/wikipedia/page/PageViewFragmentInternal.java 
b/wikipedia/src/main/java/org/wikipedia/page/PageViewFragmentInternal.java
index fecc895..1149ac9 100644
--- a/wikipedia/src/main/java/org/wikipedia/page/PageViewFragmentInternal.java
+++ b/wikipedia/src/main/java/org/wikipedia/page/PageViewFragmentInternal.java
@@ -686,6 +686,17 @@
 }
 
 /**
+ * Scroll to a specific section in the WebView.
+ * @param sectionAnchor Anchor link of the section to scroll to.
+ */
+public void scrollToSection(String sectionAnchor) {
+if (!isAdded() || tocHandler == null) {
+return;
+}
+tocHandler.scrollToSection(sectionAnchor);
+}
+
+/**
  * Save the history entry for the specified page.
  */
 private class SaveHistoryTask extends SaneAsyncTaskVoid {
diff --git a/wikipedia/src/main/java/org/wikipedia/page/ToCHandler.java 
b/wikipedia/src/main/java/org/wikipedia/page/ToCHandler.java
index ef3b0f5..a604230 100644
--- a/wikipedia/src/main/java/org/wikipedia/page/ToCHandler.java
+++ b/wikipedia/src/main/java/org/wikipedia/page/ToCHandler.java
@@ -139,18 +139,21 @@
 }
 }
 
-public void scrollToSection(Section section) {
+public void scrollToSection(String sectionAnchor) {
 JSONObject payload = new JSONObject();
 try {
-payload.put(anchor, section.isLead() ? heading_ + 
section.getId() : section.getAnchor());
+payload.put(anchor, sectionAnchor);
 } catch (JSONException e) {
 // This won't happen
 throw new RuntimeException(e);
 }
-
 bridge.sendMessage(scrollToSection, payload);
 }
 
+public void scrollToSection(Section section) {
+scrollToSection(section.isLead() ? heading_ + section.getId() : 
section.getAnchor());
+}
+
 public void setupToC(final Page page) {
 tocProgress.setVisibility(View.GONE);
 tocList.setVisibility(View.VISIBLE);

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5ad41283bb689aa96770f8c8b460a0fb6e0e47e2
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Dbrant dbr...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Phase out hasClaim and newClaim - change (mediawiki...Wikibase)

2014-11-26 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Phase out hasClaim and newClaim
..


Phase out hasClaim and newClaim

I focused on the deprecated methods hasClaim and newClaims in this
patch.

The idea is to make the strange patch
https://github.com/wmde/WikibaseDataModel/pull/280 smaller or at
least get rid of it faster.

Note that I still had to introduce more of these painful
new Statement( new Claim() ). There is no other way. If you see one
that does not make the test setup code explode, please show me.
Also see https://github.com/wmde/WikibaseDataModel/pull/268

Change-Id: I0777c53db88a90c34193545c439d5495fed4d6c6
---
M repo/includes/ChangeOp/ChangeOpMainSnak.php
M repo/includes/content/EntityContent.php
M repo/tests/phpunit/includes/ChangeOp/ChangeOpClaimTest.php
M repo/tests/phpunit/includes/api/ClaimModificationHelperTest.php
M repo/tests/phpunit/includes/api/CreateClaimTest.php
M repo/tests/phpunit/includes/api/GetClaimsTest.php
M repo/tests/phpunit/includes/api/RemoveClaimsTest.php
M repo/tests/phpunit/includes/api/ResultBuilderTest.php
M repo/tests/phpunit/includes/api/SetClaimTest.php
M repo/tests/phpunit/includes/api/SetReferenceTest.php
10 files changed, 109 insertions(+), 98 deletions(-)

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



diff --git a/repo/includes/ChangeOp/ChangeOpMainSnak.php 
b/repo/includes/ChangeOp/ChangeOpMainSnak.php
index 9687a1a..28840cd 100644
--- a/repo/includes/ChangeOp/ChangeOpMainSnak.php
+++ b/repo/includes/ChangeOp/ChangeOpMainSnak.php
@@ -7,6 +7,7 @@
 use Wikibase\DataModel\Claim\Claims;
 use Wikibase\DataModel\Entity\Entity;
 use Wikibase\DataModel\Snak\Snak;
+use Wikibase\DataModel\StatementListProvider;
 use Wikibase\Lib\ClaimGuidGenerator;
 use Wikibase\Summary;
 use Wikibase\Validators\SnakValidator;
@@ -81,44 +82,45 @@
 * - the claim's mainsnak gets set to $snak when $claimGuid and $snak 
are set
 */
public function apply( Entity $entity, Summary $summary = null ) {
-   $claims = new Claims( $entity-getClaims() );
-
-   if ( is_null( $this-claimGuid ) || empty( $this-claimGuid ) ) 
{
-   $this-addClaim( $entity, $claims, $summary );
+   if ( empty( $this-claimGuid ) ) {
+   $this-addClaim( $entity, $summary );
} else {
+   $claims = new Claims( $entity-getClaims() );
$this-setClaim( $claims, $summary );
+   $entity-setClaims( $claims );
}
-
-   $entity-setClaims( $claims );
 
return true;
}
 
/**
-* @since 0.4
-*
 * @param Entity $entity
-* @param Claims $claims
-* @param Summary $summary
+* @param Summary|null $summary
+*
+* @throws ChangeOpException
 */
-   protected function addClaim( Entity $entity, Claims $claims, Summary 
$summary = null ) {
+   private function addClaim( Entity $entity, Summary $summary = null ) {
//TODO: check for claim uniqueness?
-   $claim = $entity-newClaim( $this-snak );
-   $claim-setGuid( $this-guidGenerator-newGuid( 
$entity-getId() ) );
-   $claims-addClaim( $claim );
+   $guid = $this-guidGenerator-newGuid( $entity-getId() );
+
+   if ( !( $entity instanceof StatementListProvider ) ) {
+   throw new ChangeOpException( '$entity must implement 
StatementListProvider' );
+   }
+
+   $entity-getStatements()-addNewStatement( $this-snak, null, 
null, $guid );
$this-updateSummary( $summary, 'create', '', 
$this-getClaimSummaryArgs( $this-snak ) );
-   $this-claimGuid = $claim-getGuid();
+   $this-claimGuid = $guid;
}
 
/**
 * @since 0.4
 *
 * @param Claims $claims
-* @param Summary $summary
+* @param Summary|null $summary
 *
 * @throws ChangeOpException
 */
-   protected function setClaim( Claims $claims, Summary $summary = null ) {
+   private function setClaim( Claims $claims, Summary $summary = null ) {
if( !$claims-hasClaimWithGuid( $this-claimGuid ) ) {
throw new ChangeOpException( Entity does not have 
claim with GUID  . $this-claimGuid );
}
@@ -163,4 +165,5 @@
public function validate( Entity $entity ) {
return $this-snakValidator-validate( $this-snak );
}
+
 }
diff --git a/repo/includes/content/EntityContent.php 
b/repo/includes/content/EntityContent.php
index 58a8767..f1d5109 100644
--- a/repo/includes/content/EntityContent.php
+++ b/repo/includes/content/EntityContent.php
@@ -10,13 +10,11 @@
 use Diff\DiffOp\Diff\Diff;
 use Diff\Patcher\MapPatcher;
 use 

[MediaWiki-commits] [Gerrit] [FIX] Sametitle: Don't discard invalid namespaces - change (pywikibot/core)

2014-11-26 Thread XZise (Code Review)
XZise has uploaded a new change for review.

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

Change subject: [FIX] Sametitle: Don't discard invalid namespaces
..

[FIX] Sametitle: Don't discard invalid namespaces

If the namespace was invalid, sametitle would've still just compared the
text after the 'namespace' so a page title like 'Foo:Bar' would result
in 'namespace main' and 'name is Bar' although it should've been 'name
is Foo:Bar' because 'Foo' is not a valid namespace.

Also modified the tests so this will be more visible in the future.

Change-Id: Idd42d63125fa2470374c0392e26cceac9e49bb30
---
M pywikibot/site.py
M tests/site_tests.py
2 files changed, 24 insertions(+), 15 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/02/176002/1

diff --git a/pywikibot/site.py b/pywikibot/site.py
index 009adeb..d83a098 100644
--- a/pywikibot/site.py
+++ b/pywikibot/site.py
@@ -818,11 +818,13 @@
 
 def ns_split(title):
 Separate the namespace from the name.
-if ':' not in title:
-title = ':' + title
-ns, _, name = title.partition(':')
-ns = Namespace.lookup_name(ns, self.namespaces) or default_ns
-return ns, name
+ns, delim, name = title.partition(':')
+if delim:
+ns = Namespace.lookup_name(ns, self.namespaces)
+if not delim or not ns:
+return default_ns, title
+else:
+return ns, name
 
 if title1 == title2:
 return True
diff --git a/tests/site_tests.py b/tests/site_tests.py
index e738859..82e11f5 100644
--- a/tests/site_tests.py
+++ b/tests/site_tests.py
@@ -1905,7 +1905,7 @@
 self.assertEqual(item.id, 'Q5296')
 
 
-class TestSameTitleSite(TestCase):
+class TestSametitleSite(TestCase):
 
 Test APISite.sametitle on sites with known behaviour.
 
@@ -1924,27 +1924,34 @@
 }
 }
 
-def check(self, site, case_sensitive):
-self.assertEqual(site.sametitle('Foo', 'foo'), not case_sensitive)
-self.assertTrue(site.sametitle('File:Foo', 'Image:Foo'))
-self.assertTrue(site.sametitle(':Foo', 'Foo'))
-self.assertFalse(site.sametitle('User:Foo', 'Foo'))
-
 def test_enwp(self):
-self.check(self.get_site('enwp'), False)
+self.assertTrue(self.get_site('enwp').sametitle('Foo', 'foo'))
 self.assertFalse(self.get_site('enwp').sametitle(
 'Template:Test template', 'Template:Test Template'))
 
 def test_dewp(self):
 site = self.get_site('dewp')
-self.check(site, False)
+self.assertTrue(site.sametitle('Foo', 'foo'))
 self.assertTrue(site.sametitle('Benutzer:Foo', 'User:Foo'))
 self.assertTrue(site.sametitle('Benutzerin:Foo', 'User:Foo'))
 self.assertTrue(site.sametitle('Benutzerin:Foo', 'Benutzer:Foo'))
 
 def test_enwt(self):
-self.check(self.get_site('enwt'), True)
+self.assertFalse(self.get_site('enwt').sametitle('Foo', 'foo'))
 
+def test_general(self, code):
+site = self.get_site(code)
+self.assertTrue(site.sametitle('File:Foo', 'Image:Foo'))
+self.assertTrue(site.sametitle(':Foo', 'Foo'))
+self.assertFalse(site.sametitle('User:Foo', 'Foo'))
+self.assertFalse(site.sametitle('User:Foo', 'Project:Foo'))
+
+self.assertTrue(site.sametitle('Namespace:', 'Namespace:'))
+
+self.assertFalse(site.sametitle('Invalid:Foo', 'Foo'))
+self.assertFalse(site.sametitle('Invalid1:Foo', 'Invalid2:Foo'))
+self.assertFalse(site.sametitle('Invalid:Foo', ':Foo'))
+self.assertFalse(site.sametitle('Invalid:Foo', 'Invalid:foo'))
 
 if __name__ == '__main__':
 try:

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idd42d63125fa2470374c0392e26cceac9e49bb30
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: XZise commodorefabia...@gmx.de

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


[MediaWiki-commits] [Gerrit] Allow falsy values as custom field db defaults - change (wikimedia...civicrm)

2014-11-26 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review.

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

Change subject: Allow falsy values as custom field db defaults
..

Allow falsy values as custom field db defaults

Use isset(val) instead of just if(val) so we can set a custom field
database column's default to zero.

Change-Id: I4abdc4e608abf57b1443916f620b413791fc3d02
---
M CRM/Core/BAO/CustomField.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm/civicrm 
refs/changes/03/176003/1

diff --git a/CRM/Core/BAO/CustomField.php b/CRM/Core/BAO/CustomField.php
index 3f2caf4..f734d65 100644
--- a/CRM/Core/BAO/CustomField.php
+++ b/CRM/Core/BAO/CustomField.php
@@ -1809,7 +1809,7 @@
   $params['fk_field_name'] = 'id';
   $params['fk_attributes'] = 'ON DELETE SET NULL';
 }
-if ($field-default_value) {
+if (isset($field-default_value)) {
   $params['default'] = '{$field-default_value}';
 }
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4abdc4e608abf57b1443916f620b413791fc3d02
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm/civicrm
Gerrit-Branch: master
Gerrit-Owner: Ejegg eeggles...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Validate 'writer' parameter before creating a job object. - change (mediawiki...OfflineContentGenerator)

2014-11-26 Thread Cscott (Code Review)
Cscott has uploaded a new change for review.

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

Change subject: Validate 'writer' parameter before creating a job object.
..

Validate 'writer' parameter before creating a job object.

Change-Id: I6357884792a541f5effd0f83a2c98424fabcc7ce
---
M lib/threads/frontend.js
1 file changed, 8 insertions(+), 0 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Collection/OfflineContentGenerator
 refs/changes/04/176004/1

diff --git a/lib/threads/frontend.js b/lib/threads/frontend.js
index 182ec24..5741825 100644
--- a/lib/threads/frontend.js
+++ b/lib/threads/frontend.js
@@ -467,6 +467,14 @@
writer = config.backend.writer_aliases[ writer ];
}
 
+   // sanity-check writer
+   if ( !( config.backend.writers[ writer ]  config.backend.writers[ 
writer ].bin ) ) {
+   throw new FrontendError(
+   'Bad writer',
+   400
+   );
+   }
+
if ( !collectionId ) {
// Create the SHA hash of this collection request
if ( !metabook ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6357884792a541f5effd0f83a2c98424fabcc7ce
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Collection/OfflineContentGenerator
Gerrit-Branch: master
Gerrit-Owner: Cscott canan...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] [FIX] Sametitle: Don't discard invalid namespaces - change (pywikibot/core)

2014-11-26 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: [FIX] Sametitle: Don't discard invalid namespaces
..


[FIX] Sametitle: Don't discard invalid namespaces

If the namespace was invalid, sametitle would've still just compared the
text after the 'namespace' so a page title like 'Foo:Bar' would result
in 'namespace main' and 'name is Bar' although it should've been 'name
is Foo:Bar' because 'Foo' is not a valid namespace.

Also modified the tests so this will be more visible in the future.

Change-Id: Idd42d63125fa2470374c0392e26cceac9e49bb30
---
M pywikibot/site.py
M tests/site_tests.py
2 files changed, 24 insertions(+), 15 deletions(-)

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



diff --git a/pywikibot/site.py b/pywikibot/site.py
index 009adeb..d83a098 100644
--- a/pywikibot/site.py
+++ b/pywikibot/site.py
@@ -818,11 +818,13 @@
 
 def ns_split(title):
 Separate the namespace from the name.
-if ':' not in title:
-title = ':' + title
-ns, _, name = title.partition(':')
-ns = Namespace.lookup_name(ns, self.namespaces) or default_ns
-return ns, name
+ns, delim, name = title.partition(':')
+if delim:
+ns = Namespace.lookup_name(ns, self.namespaces)
+if not delim or not ns:
+return default_ns, title
+else:
+return ns, name
 
 if title1 == title2:
 return True
diff --git a/tests/site_tests.py b/tests/site_tests.py
index e738859..82e11f5 100644
--- a/tests/site_tests.py
+++ b/tests/site_tests.py
@@ -1905,7 +1905,7 @@
 self.assertEqual(item.id, 'Q5296')
 
 
-class TestSameTitleSite(TestCase):
+class TestSametitleSite(TestCase):
 
 Test APISite.sametitle on sites with known behaviour.
 
@@ -1924,27 +1924,34 @@
 }
 }
 
-def check(self, site, case_sensitive):
-self.assertEqual(site.sametitle('Foo', 'foo'), not case_sensitive)
-self.assertTrue(site.sametitle('File:Foo', 'Image:Foo'))
-self.assertTrue(site.sametitle(':Foo', 'Foo'))
-self.assertFalse(site.sametitle('User:Foo', 'Foo'))
-
 def test_enwp(self):
-self.check(self.get_site('enwp'), False)
+self.assertTrue(self.get_site('enwp').sametitle('Foo', 'foo'))
 self.assertFalse(self.get_site('enwp').sametitle(
 'Template:Test template', 'Template:Test Template'))
 
 def test_dewp(self):
 site = self.get_site('dewp')
-self.check(site, False)
+self.assertTrue(site.sametitle('Foo', 'foo'))
 self.assertTrue(site.sametitle('Benutzer:Foo', 'User:Foo'))
 self.assertTrue(site.sametitle('Benutzerin:Foo', 'User:Foo'))
 self.assertTrue(site.sametitle('Benutzerin:Foo', 'Benutzer:Foo'))
 
 def test_enwt(self):
-self.check(self.get_site('enwt'), True)
+self.assertFalse(self.get_site('enwt').sametitle('Foo', 'foo'))
 
+def test_general(self, code):
+site = self.get_site(code)
+self.assertTrue(site.sametitle('File:Foo', 'Image:Foo'))
+self.assertTrue(site.sametitle(':Foo', 'Foo'))
+self.assertFalse(site.sametitle('User:Foo', 'Foo'))
+self.assertFalse(site.sametitle('User:Foo', 'Project:Foo'))
+
+self.assertTrue(site.sametitle('Namespace:', 'Namespace:'))
+
+self.assertFalse(site.sametitle('Invalid:Foo', 'Foo'))
+self.assertFalse(site.sametitle('Invalid1:Foo', 'Invalid2:Foo'))
+self.assertFalse(site.sametitle('Invalid:Foo', ':Foo'))
+self.assertFalse(site.sametitle('Invalid:Foo', 'Invalid:foo'))
 
 if __name__ == '__main__':
 try:

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Idd42d63125fa2470374c0392e26cceac9e49bb30
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: XZise commodorefabia...@gmx.de
Gerrit-Reviewer: John Vandenberg jay...@gmail.com
Gerrit-Reviewer: Ladsgroup ladsgr...@gmail.com
Gerrit-Reviewer: Merlijn van Deen valhall...@arctus.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] Temporarily remove the 'download as PDF' link from the sidebar. - change (operations/mediawiki-config)

2014-11-26 Thread Cscott (Code Review)
Cscott has uploaded a new change for review.

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

Change subject: Temporarily remove the 'download as PDF' link from the sidebar.
..

Temporarily remove the 'download as PDF' link from the sidebar.

Change-Id: I7269f45ce773026398cde215986f49bd02b5277b
---
M wmf-config/CommonSettings.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index cbc9664..852c979 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -1611,7 +1611,7 @@
$wgEnableSidebarCache = false;
 
$wgCollectionFormats = array(
-   'rdf2latex' = 'PDF',
+   //'rdf2latex' = 'PDF', // temporarily disabled 26 Nov 2014
// The following formats used the old mwlib renderer
// which was shut down Oct 3, 2014.
// They may eventually be reinstated when new OCG backends

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7269f45ce773026398cde215986f49bd02b5277b
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Cscott canan...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Temporarily remove the 'download as PDF' link from the sidebar. - change (operations/mediawiki-config)

2014-11-26 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Temporarily remove the 'download as PDF' link from the sidebar.
..


Temporarily remove the 'download as PDF' link from the sidebar.

Change-Id: I7269f45ce773026398cde215986f49bd02b5277b
---
M wmf-config/CommonSettings.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index cbc9664..852c979 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -1611,7 +1611,7 @@
$wgEnableSidebarCache = false;
 
$wgCollectionFormats = array(
-   'rdf2latex' = 'PDF',
+   //'rdf2latex' = 'PDF', // temporarily disabled 26 Nov 2014
// The following formats used the old mwlib renderer
// which was shut down Oct 3, 2014.
// They may eventually be reinstated when new OCG backends

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7269f45ce773026398cde215986f49bd02b5277b
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Cscott canan...@wikimedia.org
Gerrit-Reviewer: GWicke gwi...@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] Move restbase config to regex.yaml - change (operations/puppet)

2014-11-26 Thread Giuseppe Lavagetto (Code Review)
Giuseppe Lavagetto has submitted this change and it was merged.

Change subject: Move restbase config to regex.yaml
..


Move restbase config to regex.yaml

This targets the restbase and cassandra config to the test hosts, and should
work with the new hiera setup as per
https://gerrit.wikimedia.org/r/#/c/174694/ and
https://wikitech.wikimedia.org/wiki/Puppet_Hiera#Practical_example.

Bug: T1228

Change-Id: I8d157b5757df898e16172ec88e657edf6c132a9c
---
M hieradata/eqiad.yaml
A hieradata/mainrole/restbase.yaml
M hieradata/regex.yaml
3 files changed, 23 insertions(+), 19 deletions(-)

Approvals:
  Giuseppe Lavagetto: Looks good to me, approved
  GWicke: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/hieradata/eqiad.yaml b/hieradata/eqiad.yaml
index 61b2143..ab0dd5a 100644
--- a/hieradata/eqiad.yaml
+++ b/hieradata/eqiad.yaml
@@ -16,22 +16,3 @@
   - '10.64.0.194:11211:1'
   - '10.64.0.195:11211:1'
 
-#
-# Cassandra test cluster for RESTBase
-cassandra::seeds:
-- xenon.eqiad.wmnet
-- cerium.eqiad.wmnet
-- praseodymium.eqiad.wmnet
-
-#
-# RESTBase
-#
-# TODO: figure out a way to reference a cassandra cluster definition (see
-# above) directly without repeating it
-#
-restbase::seeds:
-- xenon.eqiad.wmnet
-- cerium.eqiad.wmnet
-- praseodymium.eqiad.wmnet
-restbase::logstash_host: logstash1002.eqiad.wmnet
-restbase::cassandra_defaultConsistency: localQuorum
diff --git a/hieradata/mainrole/restbase.yaml b/hieradata/mainrole/restbase.yaml
new file mode 100644
index 000..11ea3cc
--- /dev/null
+++ b/hieradata/mainrole/restbase.yaml
@@ -0,0 +1,19 @@
+# TODO: set up a cluster variable similar to MySQL clusters to share
+# cassandra cluster configs between cassandra  clients
+
+#
+# Cassandra test cluster for RESTBase
+cassandra::seeds:
+- xenon.eqiad.wmnet
+- cerium.eqiad.wmnet
+- praseodymium.eqiad.wmnet
+
+#
+# RESTBase
+#
+restbase::seeds:
+- xenon.eqiad.wmnet
+- cerium.eqiad.wmnet
+- praseodymium.eqiad.wmnet
+restbase::logstash_host: logstash1002.eqiad.wmnet
+restbase::cassandra_defaultConsistency: localQuorum
diff --git a/hieradata/regex.yaml b/hieradata/regex.yaml
index 2df9e30..0fa309f 100644
--- a/hieradata/regex.yaml
+++ b/hieradata/regex.yaml
@@ -114,3 +114,7 @@
 rcs_eqiad:
   __regex: !ruby/regexp /^rcs100[0-9]\.eqiad\.wmnet/
   cluster: rcstream
+
+restbase_eqiad:
+  __regex: !ruby/regexp /^(cerium|praseodymium|xenon)\.eqiad\.wmnet$/
+  mainrole: restbase

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8d157b5757df898e16172ec88e657edf6c132a9c
Gerrit-PatchSet: 4
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: GWicke gwi...@wikimedia.org
Gerrit-Reviewer: Faidon Liambotis fai...@wikimedia.org
Gerrit-Reviewer: Filippo Giunchedi fgiunch...@wikimedia.org
Gerrit-Reviewer: GWicke gwi...@wikimedia.org
Gerrit-Reviewer: Gage jger...@wikimedia.org
Gerrit-Reviewer: Giuseppe Lavagetto glavage...@wikimedia.org
Gerrit-Reviewer: Mark Bergsma m...@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] Improve infobox/edit-pencil alignment. - change (apps...wikipedia)

2014-11-26 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Improve infobox/edit-pencil alignment.
..


Improve infobox/edit-pencil alignment.

The real issue was that some infoboxes were not properly moved to the
bottom of the lead paragraph. This patch moves any tables (including
infoboxes) inside the lead section to the bottom of the first paragraph,
which effectively leaves the edit pencil aligned with the first two lines
of the paragraph.

Change-Id: Iaf9ec6beec7bfd5bdcd00934371577a117475d00
---
M wikipedia/assets/bundle.js
M www/js/transforms.js
2 files changed, 45 insertions(+), 45 deletions(-)

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



diff --git a/wikipedia/assets/bundle.js b/wikipedia/assets/bundle.js
index 35af7d2..86010b6 100644
--- a/wikipedia/assets/bundle.js
+++ b/wikipedia/assets/bundle.js
@@ -645,47 +645,47 @@
 var night = require(./night);
 var bridge = require( ./bridge );
 
-// Move infobox to the bottom of the lead section
+// Move any tables to the bottom of the lead section
 transformer.register( leadSection, function( leadContent ) {
-var infobox = leadContent.querySelector( table.infobox );
-var pTags;
-if ( infobox ) {
-
+var leadTables = leadContent.querySelectorAll( table );
+var pTags, i;
+for ( i = 0; i  leadTables.length; i++ ) {
 /*
-If the infobox table itself sits within a table or series of tables,
-move the most distant ancestor table instead of just moving the
-infobox. Otherwise you end up with table(s) with a hole where the
-infobox had been. World War II article on enWiki has this issue.
+If the table itself sits within a table or series of tables,
+move the most distant ancestor table instead of just moving this
+table. Otherwise you end up with table(s) with a hole where the
+child table had been. World War II article on enWiki has this issue.
 Note that we need to stop checking ancestor tables when we hit
 content_block_0.
 */
-var infoboxParentTable = null;
-var el = infobox;
-while (el.parentNode) {
-el = el.parentNode;
-if (el.id === 'content_block_0') {
+var tableEl = leadTables[i];
+var parentTable = null;
+var tempEl = tableEl;
+while (tempEl.parentNode) {
+tempEl = tempEl.parentNode;
+if (tempEl.id === 'content_block_0') {
 break;
 }
-if (el.tagName === 'TABLE') {
-infoboxParentTable = el;
+if (tempEl.tagName === 'TABLE') {
+parentTable = tempEl;
 }
 }
-if (infoboxParentTable) {
-infobox = infoboxParentTable;
+if (parentTable) {
+tableEl = parentTable;
 }
 
-infobox.parentNode.removeChild( infobox );
+tableEl.parentNode.removeChild( tableEl );
 pTags = leadContent.getElementsByTagName( p );
 if ( pTags.length ) {
-pTags[0].appendChild( infobox );
+pTags[0].appendChild( tableEl );
 } else {
-leadContent.appendChild( infobox );
+leadContent.appendChild( tableEl );
 }
 }
 //also move any thumbnail images to the bottom of the section,
 //since we have a lead image, and we want the content to appear at the 
very beginning.
 var thumbs = leadContent.querySelectorAll( div.thumb );
-for ( var i = 0; i  thumbs.length; i++ ) {
+for ( i = 0; i  thumbs.length; i++ ) {
 thumbs[i].parentNode.removeChild( thumbs[i] );
 pTags = leadContent.getElementsByTagName( p );
 if ( pTags.length ) {
@@ -1210,4 +1210,4 @@
 
 try { module.exports = parseCSSColor } catch(e) { }
 
-},{}]},{},[6,14,7,8,11,12,2,1,4,5,3,10,9,13])
\ No newline at end of file
+},{}]},{},[6,14,7,8,11,12,2,1,4,5,3,10,9,13])
diff --git a/www/js/transforms.js b/www/js/transforms.js
index 5acce6c..b4e2890 100644
--- a/www/js/transforms.js
+++ b/www/js/transforms.js
@@ -2,47 +2,47 @@
 var night = require(./night);
 var bridge = require( ./bridge );
 
-// Move infobox to the bottom of the lead section
+// Move any tables to the bottom of the lead section
 transformer.register( leadSection, function( leadContent ) {
-var infobox = leadContent.querySelector( table.infobox );
-var pTags;
-if ( infobox ) {
-
+var leadTables = leadContent.querySelectorAll( table );
+var pTags, i;
+for ( i = 0; i  leadTables.length; i++ ) {
 /*
-If the infobox table itself sits within a table or series of tables,
-move the most distant ancestor table instead of just moving the
-infobox. Otherwise you end up with table(s) with a hole where the
-infobox had been. World War II article on enWiki has this issue.
+If the table itself sits within a 

[MediaWiki-commits] [Gerrit] WMF LYBUNT uses wmf_donor instead of silverpop - change (wikimedia...crm)

2014-11-26 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review.

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

Change subject: WMF LYBUNT uses wmf_donor instead of silverpop
..

WMF LYBUNT uses wmf_donor instead of silverpop

Many of the major donors we care about in the LYBUNT report do not
have email addresses on file, so we can't depend on the silverpop
export table to filter them.  De-duping by email address is also
less necessary for these donors since their records are usually not
generated by the QC.

Change-Id: I0acdc24273a1b5339cc144e737a899a04bf176f6
---
D sites/all/modules/wmf_reports/CRM/BAO/SilverpopExport.php
M sites/all/modules/wmf_reports/CRM/BAO/WmfDonor.php
M sites/all/modules/wmf_reports/CRM/Report/Form/Contribute/WmfLybunt.php
3 files changed, 23 insertions(+), 38 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/06/176006/1

diff --git a/sites/all/modules/wmf_reports/CRM/BAO/SilverpopExport.php 
b/sites/all/modules/wmf_reports/CRM/BAO/SilverpopExport.php
deleted file mode 100644
index a029313..000
--- a/sites/all/modules/wmf_reports/CRM/BAO/SilverpopExport.php
+++ /dev/null
@@ -1,20 +0,0 @@
-?php
-
-class CRM_BAO_SilverpopExport {
-static function exportableFields() {
-return array(
-'latest_donation' = array(
-'title' = 'Last donation',
-'data_type' = CRM_Utils_Type::T_DATE,
-),
-'latest_usd_amount' = array(
-'title' = 'Last donation amount (USD)',
-'data_type' = CRM_Utils_Type::T_MONEY,
-),
-'lifetime_usd_total' = array(
-'title' = 'Lifetime donations (USD)',
-'data_type' = CRM_Utils_Type::T_MONEY,
-),
-);
-}
-}
diff --git a/sites/all/modules/wmf_reports/CRM/BAO/WmfDonor.php 
b/sites/all/modules/wmf_reports/CRM/BAO/WmfDonor.php
index 812dcfa..a0de2ae 100644
--- a/sites/all/modules/wmf_reports/CRM/BAO/WmfDonor.php
+++ b/sites/all/modules/wmf_reports/CRM/BAO/WmfDonor.php
@@ -7,6 +7,18 @@
 'title' = 'Do not solicit',
 'data_type' = CRM_Utils_Type::T_BOOLEAN,
 ),
+   'last_donation_date' = array(
+'title' = 'Last donation',
+'data_type' = CRM_Utils_Type::T_DATE,
+),
+'last_donation_usd' = array(
+'title' = 'Last donation amount (USD)',
+'data_type' = CRM_Utils_Type::T_MONEY,
+),
+'lifetime_usd_total' = array(
+'title' = 'Lifetime donations (USD)',
+'data_type' = CRM_Utils_Type::T_MONEY,
+),
 );
 }
 }
diff --git 
a/sites/all/modules/wmf_reports/CRM/Report/Form/Contribute/WmfLybunt.php 
b/sites/all/modules/wmf_reports/CRM/Report/Form/Contribute/WmfLybunt.php
index 4fdc5ea..c526ed9 100644
--- a/sites/all/modules/wmf_reports/CRM/Report/Form/Contribute/WmfLybunt.php
+++ b/sites/all/modules/wmf_reports/CRM/Report/Form/Contribute/WmfLybunt.php
@@ -200,24 +200,19 @@
   ),
 ),
   ),
-  'silverpop.silverpop_export' = array(
-'bao' = 'CRM_BAO_SilverpopExport',
-'fields' = array(
-  'lifetime_usd_total' = array(
-'default' = true,
-  ),
-  'latest_donation' = array(
-'default' = true,
-  ),
-  'latest_usd_amount' = array(
-'default' = true,
-  ),
-),
-  ),
   'wmf_donor' = array(
 'bao' = 'CRM_BAO_WmfDonor',
 'fields' = array(
   'do_not_solicit' = array(
+'default' = true,
+  ),
+  'lifetime_usd_total' = array(
+'default' = true,
+  ),
+  'last_donation_date' = array(
+'default' = true,
+  ),
+  'last_donation_usd' = array(
 'default' = true,
   ),
 ),
@@ -296,8 +291,6 @@
   LEFT JOIN civicrm_country {$this-_aliases['civicrm_country']}
   ON {$this-_aliases['civicrm_address']}.country_id = 
{$this-_aliases['civicrm_country']}.id AND
  {$this-_aliases['civicrm_address']}.is_primary = 1
-  LEFT JOIN silverpop.silverpop_export 
{$this-_aliases['silverpop.silverpop_export']}
-  ON 
{$this-_aliases['silverpop.silverpop_export']}.contact_id = 
{$this-_aliases['civicrm_contact']}.id
   LEFT JOIN wmf_donor {$this-_aliases['wmf_donor']}
   ON {$this-_aliases['wmf_donor']}.entity_id = 
{$this-_aliases['civicrm_contact']}.id ;
   }
@@ -313,8 +306,8 @@
 foreach ($table['filters'] as $fieldName = $field) {
   $clause = NULL;
   if ($fieldName == 'yid') {
-$clause = 
{$this-_aliases['silverpop.silverpop_export']}.is_{$current_year}_donor = 0
-   AND 

[MediaWiki-commits] [Gerrit] Validate 'writer' parameter before creating a job object. - change (mediawiki...OfflineContentGenerator)

2014-11-26 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Validate 'writer' parameter before creating a job object.
..


Validate 'writer' parameter before creating a job object.

Change-Id: I6357884792a541f5effd0f83a2c98424fabcc7ce
---
M lib/threads/frontend.js
1 file changed, 8 insertions(+), 0 deletions(-)

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



diff --git a/lib/threads/frontend.js b/lib/threads/frontend.js
index 182ec24..5741825 100644
--- a/lib/threads/frontend.js
+++ b/lib/threads/frontend.js
@@ -467,6 +467,14 @@
writer = config.backend.writer_aliases[ writer ];
}
 
+   // sanity-check writer
+   if ( !( config.backend.writers[ writer ]  config.backend.writers[ 
writer ].bin ) ) {
+   throw new FrontendError(
+   'Bad writer',
+   400
+   );
+   }
+
if ( !collectionId ) {
// Create the SHA hash of this collection request
if ( !metabook ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6357884792a541f5effd0f83a2c98424fabcc7ce
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Collection/OfflineContentGenerator
Gerrit-Branch: master
Gerrit-Owner: Cscott canan...@wikimedia.org
Gerrit-Reviewer: Arlolra abrea...@wikimedia.org
Gerrit-Reviewer: GWicke gwi...@wikimedia.org
Gerrit-Reviewer: Mark Bergsma m...@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] Make allowing site-wide styles on restricted special pages a... - change (mediawiki/core)

2014-11-26 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Make allowing site-wide styles on restricted special pages a 
config option
..


Make allowing site-wide styles on restricted special pages a config option

This mostly reverts commit 614d7e5c274d927f99bfc52ac3a1e6c7e5902408.

Many wikis use MediaWiki:Common.css and associated pages to create a
custom theme for their wiki, which would no longer load on login
or preference pages, creating an inconsistent UI.

This re-adds the difference in module origin for different types
(styles, scripts, etc.), and now OutputPage::disallowUserJs()
checks the value of the AllowSiteCSSOnRestrictedPages config setting
to determine whether to allow site-wide CSS styles or not.

By default this feature is disabled to be secure by default.

Bug: 71621
Change-Id: I1bf4dd1845b6952c3985e179fbea48181ffb8907
---
M includes/DefaultSettings.php
M includes/OutputPage.php
2 files changed, 62 insertions(+), 36 deletions(-)

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



diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php
index fe73044..4960ab6 100644
--- a/includes/DefaultSettings.php
+++ b/includes/DefaultSettings.php
@@ -2688,6 +2688,19 @@
  */
 $wgResourceLoaderExperimentalAsyncLoading = false;
 
+/**
+ * Whether to allow site-wide CSS (MediaWiki:Common.css and friends) on
+ * restricted pages like Special:UserLogin or Special:Preferences where
+ * JavaScript is disabled for security reasons. As it is possible to
+ * execute JavaScript through CSS, setting this to true opens up a
+ * potential security hole. Some sites may skin their wiki by using
+ * site-wide CSS, causing restricted pages to look unstyled and different
+ * from the rest of the site.
+ *
+ * @since 1.25
+ */
+$wgAllowSiteCSSOnRestrictedPages = false;
+
 /** @} */ # End of resource loader settings }
 
 
diff --git a/includes/OutputPage.php b/includes/OutputPage.php
index 869a265..00a9c1a 100644
--- a/includes/OutputPage.php
+++ b/includes/OutputPage.php
@@ -137,11 +137,14 @@
var $mFeedLinksAppendQuery = null;
 
/**
-* @var int
-* The level of 'untrustworthiness' allowed for modules loaded on this 
page.
+* @var array
+* What level of 'untrustworthiness' is allowed in CSS/JS modules 
loaded on this page?
 * @see ResourceLoaderModule::$origin
+* ResourceLoaderModule::ORIGIN_ALL is assumed unless overridden;
 */
-   protected $mAllowedModuleOrigin = ResourceLoaderModule::ORIGIN_ALL;
+   protected $mAllowedModules = array(
+   ResourceLoaderModule::TYPE_COMBINED = 
ResourceLoaderModule::ORIGIN_ALL,
+   );
 
/**
 * @EasterEgg I just love the name for this self documenting variable.
@@ -1194,13 +1197,31 @@
}
 
/**
-* Restrict the page to loading modules bundled the software.
+* Do not allow scripts which can be modified by wiki users to load on 
this page;
+* only allow scripts bundled with, or generated by, the software.
+* Site-wide styles are controlled by a config setting, since they can 
be
+* used to create a custom skin/theme, but not user-specific ones.
 *
-* Disallows the queue to contain any modules which can be modified by 
wiki
-* users to load on this page.
+* @todo this should be given a more accurate name
 */
public function disallowUserJs() {
-   $this-reduceAllowedModuleOrigin( 
ResourceLoaderModule::ORIGIN_CORE_INDIVIDUAL );
+   global $wgAllowSiteCSSOnRestrictedPages;
+   $this-reduceAllowedModules(
+   ResourceLoaderModule::TYPE_SCRIPTS,
+   ResourceLoaderModule::ORIGIN_CORE_INDIVIDUAL
+   );
+
+   // Site-wide styles are controlled by a config setting, see bug 
71621
+   // for background on why. User styles are never allowed.
+   if (  $wgAllowSiteCSSOnRestrictedPages ) {
+   $styleOrigin = 
ResourceLoaderModule::ORIGIN_USER_SITEWIDE;
+   } else {
+   $styleOrigin = 
ResourceLoaderModule::ORIGIN_CORE_INDIVIDUAL;
+   }
+   $this-reduceAllowedModules(
+   ResourceLoaderModule::TYPE_STYLES,
+   $styleOrigin
+   );
}
 
/**
@@ -1219,40 +1240,31 @@
 * Get the level of JavaScript / CSS untrustworthiness allowed on this 
page.
 *
 * @see ResourceLoaderModule::$origin
-* @param string $type Unused: Module origin allowance used to be 
fragmented by
-*  ResourceLoaderModule TYPE_ constants.
-* @return Int ResourceLoaderModule ORIGIN_ class constant
+* @param string $type ResourceLoaderModule TYPE_ constant
+* @return nt 

[MediaWiki-commits] [Gerrit] Allow APISite randompages to yield indefinitely - change (pywikibot/core)

2014-11-26 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Allow APISite randompages to yield indefinitely
..


Allow APISite randompages to yield indefinitely

randompages currently supplies a default limit of 10,
and will stop after the first batch if limit is None.

Change-Id: I67066d587f70978f33bb48d341f3e90b4f17bdd3
---
M pywikibot/data/api.py
M tests/site_tests.py
2 files changed, 23 insertions(+), 3 deletions(-)

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



diff --git a/pywikibot/data/api.py b/pywikibot/data/api.py
index 0400f5d..c0b6e2a 100644
--- a/pywikibot/data/api.py
+++ b/pywikibot/data/api.py
@@ -1519,7 +1519,7 @@
 # self.resultkey not in data in last request.submit()
 # only (query-)continue was retrieved.
 previous_result_had_data = False
-if self.modules[0] == random and self.limit:
+if self.modules[0] == random:
 # random module does not return (query-)continue
 # now we loop for a new random query
 del self.data  # a new request is needed
diff --git a/tests/site_tests.py b/tests/site_tests.py
index e738859..ae2c17f 100644
--- a/tests/site_tests.py
+++ b/tests/site_tests.py
@@ -1166,17 +1166,37 @@
 
 Test random methods of a site.
 
-def testRandompages(self):
-Test the site.randompages() method.
+def test_unlimited_small_step(self):
+Test site.randompages() without limit.
+mysite = self.get_site()
+pages = []
+for rndpage in mysite.randompages(step=5, total=None):
+self.assertIsInstance(rndpage, pywikibot.Page)
+self.assertNotIn(rndpage, pages)
+pages.append(rndpage)
+if len(pages) == 11:
+break
+self.assertEqual(len(pages), 11)
+
+def test_limit_10(self):
+Test site.randompages() with limit.
 mysite = self.get_site()
 rn = list(mysite.randompages(total=10))
 self.assertLessEqual(len(rn), 10)
 self.assertTrue(all(isinstance(a_page, pywikibot.Page)
 for a_page in rn))
 self.assertFalse(all(a_page.isRedirectPage() for a_page in rn))
+
+def test_redirects(self):
+Test site.randompages() with redirects.
+mysite = self.get_site()
 for rndpage in mysite.randompages(total=5, redirects=True):
 self.assertIsInstance(rndpage, pywikibot.Page)
 self.assertTrue(rndpage.isRedirectPage())
+
+def test_namespaces(self):
+Test site.randompages() with namespaces.
+mysite = self.get_site()
 for rndpage in mysite.randompages(total=5, namespaces=[6, 7]):
 self.assertIsInstance(rndpage, pywikibot.Page)
 self.assertIn(rndpage.namespace(), [6, 7])

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I67066d587f70978f33bb48d341f3e90b4f17bdd3
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: John Vandenberg jay...@gmail.com
Gerrit-Reviewer: John Vandenberg jay...@gmail.com
Gerrit-Reviewer: Ladsgroup ladsgr...@gmail.com
Gerrit-Reviewer: Merlijn van Deen valhall...@arctus.nl
Gerrit-Reviewer: XZise commodorefabia...@gmx.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] mediawiki_messages reuses QueryGenerator - change (pywikibot/core)

2014-11-26 Thread John Vandenberg (Code Review)
John Vandenberg has uploaded a new change for review.

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

Change subject: mediawiki_messages reuses QueryGenerator
..

mediawiki_messages reuses QueryGenerator

When mediawiki_messages is called with a specific set of keys requested,
it inefficiently and incorrectly iterates the generator for each key.
This breaks a fundamental assumption of a 'generator' - that it can not
be re-used.  It is assuming that QueryGenerator was able to fetch all
the requested messages without continuation, as only the last fetch
will exist in QueryGenerator.data after the first iteration is complete.

Change-Id: Ia50ec73d33caa548227dfcbd52119117720787dc
---
M pywikibot/site.py
1 file changed, 9 insertions(+), 12 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/07/176007/1

diff --git a/pywikibot/site.py b/pywikibot/site.py
index d83a098..bca8612 100644
--- a/pywikibot/site.py
+++ b/pywikibot/site.py
@@ -1831,22 +1831,19 @@
 amlang=self.lang,
 )
 
+for msg in msg_query:
+if 'missing' not in msg:
+self._msgcache[msg['name']] = msg['*']
+
 # Return all messages
 if keys == u'*' or keys == [u'*']:
-for msg in msg_query:
-if 'missing' not in msg:
-self._msgcache[msg['name']] = msg['*']
 return self._msgcache
-# Return only given keys
 else:
-for _key in keys:
-for msg in msg_query:
-if msg['name'] == _key and 'missing' not in msg:
-self._msgcache[_key] = msg['*']
-break
-else:
-raise KeyError(Site %(self)s has no message 
'%(_key)s'
-   % locals())
+# Check requested keys
+for key in keys:
+if key not in self._msgcache:
+raise KeyError(Site %s has no message '%s'
+   % (self, key))
 
 return dict((_key, self._msgcache[_key]) for _key in keys)
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia50ec73d33caa548227dfcbd52119117720787dc
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
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] Language fallback for labels of referenced items. - change (mediawiki...Wikibase)

2014-11-26 Thread Daniel Kinzler (Code Review)
Daniel Kinzler has uploaded a new change for review.

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

Change subject: Language fallback for labels of referenced items.
..

Language fallback for labels of referenced items.

Change-Id: I3973b059ec9ea03cd3cbcdd672ee1a0c8432d262
---
M lib/includes/LanguageFallbackChain.php
M lib/tests/phpunit/LanguageFallbackChainTest.php
M repo/includes/EntityParserOutputGenerator.php
M repo/includes/EntityParserOutputGeneratorFactory.php
4 files changed, 36 insertions(+), 8 deletions(-)


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

diff --git a/lib/includes/LanguageFallbackChain.php 
b/lib/includes/LanguageFallbackChain.php
index 4bd2f7d..27f8a76 100644
--- a/lib/includes/LanguageFallbackChain.php
+++ b/lib/includes/LanguageFallbackChain.php
@@ -39,6 +39,21 @@
}
 
/**
+* Returns the language codes of the languages in the fallback chain.
+*
+* @return string[]
+*/
+   public function getLanguageCodes() {
+   $codes = array();
+
+   foreach ( $this-chain as $language ) {
+   $codes[] = $language-getLanguageCode();
+   }
+
+   return $codes;
+   }
+
+   /**
 * Try to fetch the best value in a multilingual data array.
 *
 * @param string[]|array[] $data Multilingual data with language codes 
as keys
diff --git a/lib/tests/phpunit/LanguageFallbackChainTest.php 
b/lib/tests/phpunit/LanguageFallbackChainTest.php
index e1294d5..ff56411 100644
--- a/lib/tests/phpunit/LanguageFallbackChainTest.php
+++ b/lib/tests/phpunit/LanguageFallbackChainTest.php
@@ -3,7 +3,9 @@
 namespace Wikibase\Test;
 
 use Language;
+use Wikibase\LanguageFallbackChain;
 use Wikibase\LanguageFallbackChainFactory;
+use Wikibase\LanguageWithConversion;
 
 /**
  * @covers Wikibase\LanguageFallbackChain
@@ -198,4 +200,19 @@
);
}
 
+   /**
+*/
+   public function testGetLanguageCodes() {
+   $chain = new LanguageFallbackChain( array(
+   LanguageWithConversion::factory( 'de-ch' ),
+   LanguageWithConversion::factory( 'de' ),
+   LanguageWithConversion::factory( 'en' ),
+   ) );
+
+   $codes = $chain-getLanguageCodes();
+
+   $expected = array( 'de-ch', 'de', 'en' );
+   $this-assertEquals( $expected, $codes );
+   }
+
 }
diff --git a/repo/includes/EntityParserOutputGenerator.php 
b/repo/includes/EntityParserOutputGenerator.php
index 767a319..9f85098 100644
--- a/repo/includes/EntityParserOutputGenerator.php
+++ b/repo/includes/EntityParserOutputGenerator.php
@@ -7,7 +7,6 @@
 use ValueFormatters\ValueFormatter;
 use Wikibase\DataModel\Entity\EntityId;
 use Wikibase\DataModel\Entity\Item;
-use Wikibase\DataModel\Entity\Property;
 use Wikibase\DataModel\SiteLinkList;
 use Wikibase\DataModel\StatementListProvider;
 use Wikibase\Lib\Store\EntityInfoBuilderFactory;
@@ -221,10 +220,9 @@
$entityInfoBuilder-resolveRedirects();
$entityInfoBuilder-removeMissing();
 
-   // @todo: apply language fallback!
$entityInfoBuilder-collectTerms(
array( 'label', 'description' ),
-   array( $this-languageCode )
+   $this-languageFallbackChain-getLanguageCodes()
);
 
$entityInfoBuilder-collectDataTypes();
diff --git a/repo/includes/EntityParserOutputGeneratorFactory.php 
b/repo/includes/EntityParserOutputGeneratorFactory.php
index 1efa6cc..bdb1463 100644
--- a/repo/includes/EntityParserOutputGeneratorFactory.php
+++ b/repo/includes/EntityParserOutputGeneratorFactory.php
@@ -131,11 +131,9 @@
 * @return LanguageFallbackChain
 */
private function getLanguageFallbackChain( $languageCode ) {
-   // @fixme inject User
-   $context = RequestContext::getMain();
-
-   return 
$this-languageFallbackChainFactory-newFromUserAndLanguageCodeForPageView(
-   $context-getUser(),
+   // Language fallback must depend ONLY on the target language,
+   // so we don't confuse the parser cache with user specific HTML.
+   return $this-languageFallbackChainFactory-newFromLanguageCode(
$languageCode
);
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3973b059ec9ea03cd3cbcdd672ee1a0c8432d262
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Daniel Kinzler daniel.kinz...@wikimedia.de

___
MediaWiki-commits 

[MediaWiki-commits] [Gerrit] Allow falsy values as custom field db defaults - change (wikimedia...civicrm)

2014-11-26 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Allow falsy values as custom field db defaults
..


Allow falsy values as custom field db defaults

Use isset(val) instead of just if(val) so we can set a custom field
database column's default to zero.

Change-Id: I4abdc4e608abf57b1443916f620b413791fc3d02
---
M CRM/Core/BAO/CustomField.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/CRM/Core/BAO/CustomField.php b/CRM/Core/BAO/CustomField.php
index 3f2caf4..f734d65 100644
--- a/CRM/Core/BAO/CustomField.php
+++ b/CRM/Core/BAO/CustomField.php
@@ -1809,7 +1809,7 @@
   $params['fk_field_name'] = 'id';
   $params['fk_attributes'] = 'ON DELETE SET NULL';
 }
-if ($field-default_value) {
+if (isset($field-default_value)) {
   $params['default'] = '{$field-default_value}';
 }
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4abdc4e608abf57b1443916f620b413791fc3d02
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm/civicrm
Gerrit-Branch: master
Gerrit-Owner: Ejegg eeggles...@wikimedia.org
Gerrit-Reviewer: Awight awi...@wikimedia.org
Gerrit-Reviewer: Ejegg eeggles...@wikimedia.org
Gerrit-Reviewer: Katie Horn kh...@wikimedia.org
Gerrit-Reviewer: Ssmith ssm...@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] Don't use the writer as part of the renderTempDir. - change (mediawiki...OfflineContentGenerator)

2014-11-26 Thread Cscott (Code Review)
Cscott has uploaded a new change for review.

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

Change subject: Don't use the writer as part of the renderTempDir.
..

Don't use the writer as part of the renderTempDir.

This was an artifact of when we thought we could reuse the same collection
id for multiple different writers.  But the writer is part of the collection
id hash now, so we don't need to distinguish their temp dirs.

Change-Id: Idb98db5849aa2e092698c6a772999fcb6b049141
---
M lib/threads/backend.js
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Collection/OfflineContentGenerator
 refs/changes/10/176010/1

diff --git a/lib/threads/backend.js b/lib/threads/backend.js
index 51a9203..b826616 100644
--- a/lib/threads/backend.js
+++ b/lib/threads/backend.js
@@ -218,7 +218,7 @@
.then( function() {
renderTempDir = path.join(
config.backend.temp_dir,
-   jobDetails.collectionId + '.' + 
jobDetails.writer
+   jobDetails.collectionId
);
return Promise.promisify( fs.mkdir, false, fs )( 
renderTempDir ).
then(function() {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idb98db5849aa2e092698c6a772999fcb6b049141
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Collection/OfflineContentGenerator
Gerrit-Branch: master
Gerrit-Owner: Cscott canan...@wikimedia.org

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


  1   2   3   4   5   >