[MediaWiki-commits] [Gerrit] build: Updating development dependencies - change (AhoCorasick)

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

Change subject: build: Updating development dependencies
..


build: Updating development dependencies

* mediawiki/mediawiki-codesniffer: 0.3.0 → 0.5.0

Change-Id: Id2ed15ab3713f750dd483fafc44587fe37b0c314
---
M composer.json
M src/MultiStringMatcher.php
M tests/AhoCorasickTest.php
3 files changed, 12 insertions(+), 4 deletions(-)

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



diff --git a/composer.json b/composer.json
index 0bbf629..56a383d 100644
--- a/composer.json
+++ b/composer.json
@@ -20,7 +20,7 @@
"require-dev": {
"jakub-onderka/php-parallel-lint": "0.9",
"phpunit/phpunit": "4.6.*",
-   "mediawiki/mediawiki-codesniffer": "0.3.0"
+   "mediawiki/mediawiki-codesniffer": "0.5.0"
},
"scripts": {
"test": [
diff --git a/src/MultiStringMatcher.php b/src/MultiStringMatcher.php
index 9a549ee..150bef0 100644
--- a/src/MultiStringMatcher.php
+++ b/src/MultiStringMatcher.php
@@ -206,7 +206,11 @@
$this->noTransitions[$toState] = 0;
}
 
-   while ( ( $fromState = array_shift( $queue ) ) !== null ) {
+   while ( true ) {
+   $fromState = array_shift( $queue );
+   if ( $fromState === null ) {
+   break;
+   }
foreach ( $this->yesTransitions[$fromState] as $ch => 
$toState ) {
$queue[] = $toState;
$state = $this->noTransitions[$fromState];
diff --git a/tests/AhoCorasickTest.php b/tests/AhoCorasickTest.php
index 14b225f..7269b3e 100644
--- a/tests/AhoCorasickTest.php
+++ b/tests/AhoCorasickTest.php
@@ -44,7 +44,11 @@
$matches = array();
foreach ( $this->searchKeywords as $keyword => $length ) {
$offset = 0;
-   while ( ( $offset = strpos( $text, $keyword, $offset ) 
) !== false ) {
+   while ( true ) {
+   $offset = strpos( $text, $keyword, $offset );
+   if ( $offset === false ) {
+   break;
+   }
$matches[] = array( $offset, $keyword );
$offset = $offset + $length;
}
@@ -63,7 +67,7 @@
 *
 * Helps us assert equivalence.
 *
-* @param &$matches Results array.
+* @param &$matches array Results array.
 */
public function sortMatcherResults( &$matches ) {
// Sort the results by match offset, then by match length,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id2ed15ab3713f750dd483fafc44587fe37b0c314
Gerrit-PatchSet: 3
Gerrit-Project: AhoCorasick
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: Paladox 
Gerrit-Reviewer: Umherirrender 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] git-ssh.wm.o IPv6 reservation - change (operations/dns)

2015-11-23 Thread Rush (Code Review)
Rush has submitted this change and it was merged.

Change subject: git-ssh.wm.o IPv6 reservation
..


git-ssh.wm.o IPv6 reservation

Change-Id: Iaa329a76b41d9e9a0538ff45a68700f7a7bfd327
---
M templates/1.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa
M templates/wikimedia.org
2 files changed, 3 insertions(+), 0 deletions(-)

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



diff --git a/templates/1.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa 
b/templates/1.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa
index 14c8ff3..9fbb146 100644
--- a/templates/1.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa
+++ b/templates/1.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa
@@ -243,6 +243,7 @@
 
 4.1.0.0 1H IN PTR   parsoid-lb.eqiad.wikimedia.org.
 5.1.0.0 1H IN PTR   stream-lb.eqiad.wikimedia.org.
+6.1.0.0 1H IN PTR   git-ssh.eqiad.wikimedia.org.
 e.f.0.0 1H IN PTR   dns-rec-lb.eqiad.wikimedia.org.
 
 ; Neighbor blocks
diff --git a/templates/wikimedia.org b/templates/wikimedia.org
index f6f3688..54b722b 100644
--- a/templates/wikimedia.org
+++ b/templates/wikimedia.org
@@ -238,7 +238,9 @@
 restbase1H  IN CNAME restbase.eqiad
 rest1H  IN CNAME restbase.eqiad
 git-ssh.eqiad   1H  IN A208.80.154.250
+1H  IN  2620:0:861:ed1a::3:16
 git-ssh 1H  IN A208.80.154.250
+1H  IN  2620:0:861:ed1a::3:16
 
 ;;; ulsfo
 text-lb.ulsfo   600 IN DYNA geoip!text-addrs/ulsfo

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iaa329a76b41d9e9a0538ff45a68700f7a7bfd327
Gerrit-PatchSet: 2
Gerrit-Project: operations/dns
Gerrit-Branch: master
Gerrit-Owner: Rush 
Gerrit-Reviewer: BBlack 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: Rush 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Use enableModuleContentVersion() instead of tracking getScri... - change (mediawiki...Citoid)

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

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

Change subject: Use enableModuleContentVersion() instead of tracking 
getScript() manually
..

Use enableModuleContentVersion() instead of tracking getScript() manually

See also 4613449b6561d18e8e59ebe52a162a735a2e12a6

Change-Id: I33b40c3879696d8e09dfa16123d338b9340139e0
---
M CitoidDataModule.php
1 file changed, 2 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Citoid 
refs/changes/49/255049/1

diff --git a/CitoidDataModule.php b/CitoidDataModule.php
index 7fefd86..912aa88 100644
--- a/CitoidDataModule.php
+++ b/CitoidDataModule.php
@@ -36,11 +36,7 @@
);
}
 
-   public function getDefinitionSummary( ResourceLoaderContext $context ) {
-   $summary = parent::getDefinitionSummary( $context );
-   $summary[] = array(
-   'script' => $this->getScript( $context ),
-   );
-   return $summary;
+   public function enableModuleContentVersion() {
+   return true;
}
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I33b40c3879696d8e09dfa16123d338b9340139e0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Citoid
Gerrit-Branch: master
Gerrit-Owner: Krinkle 

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


[MediaWiki-commits] [Gerrit] Require a User object to be passed to EchoEvent::userCan() - change (mediawiki...Echo)

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

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

Change subject: Require a User object to be passed to EchoEvent::userCan()
..

Require a User object to be passed to EchoEvent::userCan()

All callers were already doing this.

Change-Id: If9e20e3d4740bcdb8842592e4cd988f8b35e1300
---
M includes/model/Event.php
1 file changed, 2 insertions(+), 7 deletions(-)


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

diff --git a/includes/model/Event.php b/includes/model/Event.php
index 4aff388..0f36efa 100644
--- a/includes/model/Event.php
+++ b/includes/model/Event.php
@@ -356,10 +356,10 @@
 * @param $field Integer:one of Revision::DELETED_TEXT,
 *  Revision::DELETED_COMMENT,
 *  Revision::DELETED_USER
-* @param $user User object to check, or null to use $wgUser
+* @param $user User object to check
 * @return Boolean
 */
-   public function userCan( $field, User $user = null ) {
+   public function userCan( $field, User $user ) {
$revision = $this->getRevision();
// User is handled specially
if ( $field === Revision::DELETED_USER ) {
@@ -374,11 +374,6 @@
return $revision->userCan( $field, $user );
} else {
// Use User::isHidden()
-   if ( !$user ) {
-   // @FIXME Require a user object for 
this function
-   global $wgUser;
-   $user = $wgUser;
-   }
return $user->isAllowedAny( 'viewsuppressed', 
'hideuser' ) || !$agent->isHidden();
}
} elseif ( $revision ) {

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

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

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


[MediaWiki-commits] [Gerrit] Disallow associative arguments in ObjectFactory - change (mediawiki/core)

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

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

Change subject: Disallow associative arguments in ObjectFactory
..

Disallow associative arguments in ObjectFactory

There is no strong use case for associative "decoration"
of constructor arguments (the documentation benefits
mentioned in I43aa085 are outweighed by the confusion
caused by not failing loudly when someone passes an
associative argument by accident, e.g. by omitting an
array nesting level), so disallow them but make sure
they fail nicely, not with an invalid offset error.

Change-Id: I09e4af85ded6a1497b0db0265d2ee6707f91f5e3
---
M includes/libs/ObjectFactory.php
M tests/phpunit/includes/libs/ObjectFactoryTest.php
2 files changed, 7 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/52/255052/1

diff --git a/includes/libs/ObjectFactory.php b/includes/libs/ObjectFactory.php
index bd0da57..2ffc1d3 100644
--- a/includes/libs/ObjectFactory.php
+++ b/includes/libs/ObjectFactory.php
@@ -128,8 +128,10 @@
 * @return mixed Constructed instance
 */
public static function constructClassInstance( $clazz, $args ) {
-   // args are sometimes specified in a 'name' => $value format 
for readability
-   $args = array_values( $args );
+   // $args should be a non-associative array; show nice error if 
that's not the case
+   if ( $args && array_keys( $args ) !== range( 0, count( $args ) 
- 1 ) ) {
+   throw new InvalidArgumentException( __METHOD__ . ': 
$args cannot be an associative array' );
+   }
 
// TODO: when PHP min version supported is >=5.6.0 replace this
// with `return new $clazz( ... $args );`.
diff --git a/tests/phpunit/includes/libs/ObjectFactoryTest.php 
b/tests/phpunit/includes/libs/ObjectFactoryTest.php
index 6337210..f338633 100644
--- a/tests/phpunit/includes/libs/ObjectFactoryTest.php
+++ b/tests/phpunit/includes/libs/ObjectFactoryTest.php
@@ -109,12 +109,14 @@
);
}
 
+   /**
+* @expectedException InvalidArgumentException
+*/
public function testNamedArgs() {
$args = array( 'foo' => 1, 'bar' => 2, 'baz' => 3 );
$obj = ObjectFactory::constructClassInstance(
'ObjectFactoryTestFixture', $args
);
-   $this->assertSame( array( 1, 2, 3 ), $obj->args );
}
 }
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I09e4af85ded6a1497b0db0265d2ee6707f91f5e3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Gergő Tisza 

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


[MediaWiki-commits] [Gerrit] Enable wikidatawiki for es labs replica - change (operations/mediawiki-config)

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

Change subject: Enable wikidatawiki for es labs replica
..


Enable wikidatawiki for es labs replica

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

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



diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 96c4907..44fc9b5 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -15377,6 +15377,7 @@
'default' => array( 'eqiad', 'codfw' ),
'enwiki' => array( 'eqiad', 'codfw', 'labsearch' ),
'dewiki' => array( 'eqiad', 'codfw', 'labsearch' ),
+   'wikidatawiki' => array( 'eqiad', 'codfw', 'labsearch' ),
'testwiki' => array( 'eqiad', 'codfw', 'labsearch' )
 ),
 

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

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

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


[MediaWiki-commits] [Gerrit] Add documentation to setupOutlineItem in SpecialCharacterPage - change (VisualEditor/VisualEditor)

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

Change subject: Add documentation to setupOutlineItem in SpecialCharacterPage
..


Add documentation to setupOutlineItem in SpecialCharacterPage

Change-Id: I540b828d0660c7f1985f1cd1c5a3a23b65a5e4b8
---
M src/ui/pages/ve.ui.SpecialCharacterPage.js
1 file changed, 3 insertions(+), 0 deletions(-)

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



diff --git a/src/ui/pages/ve.ui.SpecialCharacterPage.js 
b/src/ui/pages/ve.ui.SpecialCharacterPage.js
index 8c77614..63eeb52 100644
--- a/src/ui/pages/ve.ui.SpecialCharacterPage.js
+++ b/src/ui/pages/ve.ui.SpecialCharacterPage.js
@@ -52,6 +52,9 @@
 
 /* Methods */
 
+/**
+ * @inheritdoc
+ */
 ve.ui.SpecialCharacterPage.prototype.setupOutlineItem = function ( outlineItem 
) {
ve.ui.SpecialCharacterPage.super.prototype.setupOutlineItem.call( this, 
outlineItem );
this.outlineItem.setLabel( this.label );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I540b828d0660c7f1985f1cd1c5a3a23b65a5e4b8
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Tchanders 
Gerrit-Reviewer: Esanders 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Disallow associative arguments in ObjectFactory - change (mediawiki/core)

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

Change subject: Disallow associative arguments in ObjectFactory
..


Disallow associative arguments in ObjectFactory

There is no strong use case for associative "decoration"
of constructor arguments (the documentation benefits
mentioned in I43aa085 are outweighed by the confusion
caused by not failing loudly when someone passes an
associative argument by accident, e.g. by omitting an
array nesting level), so disallow them but make sure
they fail nicely, not with an invalid offset error.

Change-Id: I09e4af85ded6a1497b0db0265d2ee6707f91f5e3
---
M includes/libs/ObjectFactory.php
M tests/phpunit/includes/libs/ObjectFactoryTest.php
2 files changed, 7 insertions(+), 3 deletions(-)

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



diff --git a/includes/libs/ObjectFactory.php b/includes/libs/ObjectFactory.php
index bd0da57..2ffc1d3 100644
--- a/includes/libs/ObjectFactory.php
+++ b/includes/libs/ObjectFactory.php
@@ -128,8 +128,10 @@
 * @return mixed Constructed instance
 */
public static function constructClassInstance( $clazz, $args ) {
-   // args are sometimes specified in a 'name' => $value format 
for readability
-   $args = array_values( $args );
+   // $args should be a non-associative array; show nice error if 
that's not the case
+   if ( $args && array_keys( $args ) !== range( 0, count( $args ) 
- 1 ) ) {
+   throw new InvalidArgumentException( __METHOD__ . ': 
$args cannot be an associative array' );
+   }
 
// TODO: when PHP min version supported is >=5.6.0 replace this
// with `return new $clazz( ... $args );`.
diff --git a/tests/phpunit/includes/libs/ObjectFactoryTest.php 
b/tests/phpunit/includes/libs/ObjectFactoryTest.php
index 6337210..f338633 100644
--- a/tests/phpunit/includes/libs/ObjectFactoryTest.php
+++ b/tests/phpunit/includes/libs/ObjectFactoryTest.php
@@ -109,12 +109,14 @@
);
}
 
+   /**
+* @expectedException InvalidArgumentException
+*/
public function testNamedArgs() {
$args = array( 'foo' => 1, 'bar' => 2, 'baz' => 3 );
$obj = ObjectFactory::constructClassInstance(
'ObjectFactoryTestFixture', $args
);
-   $this->assertSame( array( 1, 2, 3 ), $obj->args );
}
 }
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I09e4af85ded6a1497b0db0265d2ee6707f91f5e3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Gergő Tisza 
Gerrit-Reviewer: Anomie 
Gerrit-Reviewer: BryanDavis 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Add parameter to SpecialCharacterDialog onListClick document... - change (VisualEditor/VisualEditor)

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

Change subject: Add parameter to SpecialCharacterDialog onListClick 
documentation
..


Add parameter to SpecialCharacterDialog onListClick documentation

Change-Id: Ib6c3964336565f7539d429e71c66a677c29b2050
---
M src/ui/dialogs/ve.ui.SpecialCharacterDialog.js
1 file changed, 2 insertions(+), 0 deletions(-)

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



diff --git a/src/ui/dialogs/ve.ui.SpecialCharacterDialog.js 
b/src/ui/dialogs/ve.ui.SpecialCharacterDialog.js
index 24ccf75..74c0f6a 100644
--- a/src/ui/dialogs/ve.ui.SpecialCharacterDialog.js
+++ b/src/ui/dialogs/ve.ui.SpecialCharacterDialog.js
@@ -150,6 +150,8 @@
 
 /**
  * Handle the click event on the list
+ *
+ * @param {jQuery.Event} e Mouse click event
  */
 ve.ui.SpecialCharacterDialog.prototype.onListClick = function ( e ) {
var

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib6c3964336565f7539d429e71c66a677c29b2050
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Tchanders 
Gerrit-Reviewer: Esanders 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Add nsp - change (mediawiki...deploy)

2015-11-23 Thread Arlolra (Code Review)
Arlolra has uploaded a new change for review.

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

Change subject: Add nsp
..

Add nsp

 * For I669b66457d55803c972f126bd98717616835173f

Change-Id: I46081cd8915a50b69a87a179618d49050d1471da
---
A node_modules/.bin/nsp
D 
node_modules/express-handlebars/node_modules/handlebars/node_modules/.bin/uglifyjs
D 
node_modules/express-handlebars/node_modules/handlebars/node_modules/uglify-js/.npmignore
D 
node_modules/express-handlebars/node_modules/handlebars/node_modules/uglify-js/.travis.yml
D 
node_modules/express-handlebars/node_modules/handlebars/node_modules/uglify-js/LICENSE
D 
node_modules/express-handlebars/node_modules/handlebars/node_modules/uglify-js/README.md
D 
node_modules/express-handlebars/node_modules/handlebars/node_modules/uglify-js/bin/uglifyjs
D 
node_modules/express-handlebars/node_modules/handlebars/node_modules/uglify-js/lib/ast.js
D 
node_modules/express-handlebars/node_modules/handlebars/node_modules/uglify-js/lib/compress.js
D 
node_modules/express-handlebars/node_modules/handlebars/node_modules/uglify-js/lib/mozilla-ast.js
D 
node_modules/express-handlebars/node_modules/handlebars/node_modules/uglify-js/lib/output.js
D 
node_modules/express-handlebars/node_modules/handlebars/node_modules/uglify-js/lib/parse.js
D 
node_modules/express-handlebars/node_modules/handlebars/node_modules/uglify-js/lib/scope.js
D 
node_modules/express-handlebars/node_modules/handlebars/node_modules/uglify-js/lib/sourcemap.js
D 
node_modules/express-handlebars/node_modules/handlebars/node_modules/uglify-js/lib/transform.js
D 
node_modules/express-handlebars/node_modules/handlebars/node_modules/uglify-js/lib/utils.js
D 
node_modules/express-handlebars/node_modules/handlebars/node_modules/uglify-js/node_modules/async/LICENSE
D 
node_modules/express-handlebars/node_modules/handlebars/node_modules/uglify-js/node_modules/async/README.md
D 
node_modules/express-handlebars/node_modules/handlebars/node_modules/uglify-js/node_modules/async/component.json
D 
node_modules/express-handlebars/node_modules/handlebars/node_modules/uglify-js/node_modules/async/lib/async.js
D 
node_modules/express-handlebars/node_modules/handlebars/node_modules/uglify-js/node_modules/async/package.json
D 
node_modules/express-handlebars/node_modules/handlebars/node_modules/uglify-js/node_modules/optimist/example/bool.js
D 
node_modules/express-handlebars/node_modules/handlebars/node_modules/uglify-js/node_modules/optimist/example/boolean_double.js
D 
node_modules/express-handlebars/node_modules/handlebars/node_modules/uglify-js/node_modules/optimist/example/boolean_single.js
D 
node_modules/express-handlebars/node_modules/handlebars/node_modules/uglify-js/node_modules/optimist/example/default_hash.js
D 
node_modules/express-handlebars/node_modules/handlebars/node_modules/uglify-js/node_modules/optimist/example/default_singles.js
D 
node_modules/express-handlebars/node_modules/handlebars/node_modules/uglify-js/node_modules/optimist/example/divide.js
D 
node_modules/express-handlebars/node_modules/handlebars/node_modules/uglify-js/node_modules/optimist/example/line_count.js
D 
node_modules/express-handlebars/node_modules/handlebars/node_modules/uglify-js/node_modules/optimist/example/line_count_options.js
D 
node_modules/express-handlebars/node_modules/handlebars/node_modules/uglify-js/node_modules/optimist/example/line_count_wrap.js
D 
node_modules/express-handlebars/node_modules/handlebars/node_modules/uglify-js/node_modules/optimist/example/nonopt.js
D 
node_modules/express-handlebars/node_modules/handlebars/node_modules/uglify-js/node_modules/optimist/example/reflect.js
D 
node_modules/express-handlebars/node_modules/handlebars/node_modules/uglify-js/node_modules/optimist/example/short.js
D 
node_modules/express-handlebars/node_modules/handlebars/node_modules/uglify-js/node_modules/optimist/example/string.js
D 
node_modules/express-handlebars/node_modules/handlebars/node_modules/uglify-js/node_modules/optimist/example/usage-options.js
D 
node_modules/express-handlebars/node_modules/handlebars/node_modules/uglify-js/node_modules/optimist/example/xup.js
D 
node_modules/express-handlebars/node_modules/handlebars/node_modules/uglify-js/node_modules/optimist/index.js
D 
node_modules/express-handlebars/node_modules/handlebars/node_modules/uglify-js/node_modules/optimist/node_modules/wordwrap/README.markdown
D 
node_modules/express-handlebars/node_modules/handlebars/node_modules/uglify-js/node_modules/optimist/node_modules/wordwrap/example/center.js
D 
node_modules/express-handlebars/node_modules/handlebars/node_modules/uglify-js/node_modules/optimist/node_modules/wordwrap/example/meat.js
D 
node_modules/express-handlebars/node_modules/handlebars/node_modules/uglify-js/node_modules/optimist/node_modules/wordwrap/index.js
D 

[MediaWiki-commits] [Gerrit] Rename holmium to labservices1002. - change (operations/dns)

2015-11-23 Thread Andrew Bogott (Code Review)
Andrew Bogott has uploaded a new change for review.

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

Change subject: Rename holmium to labservices1002.
..

Rename holmium to labservices1002.

Bug: T106303
Change-Id: I88d74bcc13d0cf6fb765f1332bd59addf596302e
---
M templates/10.in-addr.arpa
M templates/154.80.208.in-addr.arpa
M templates/wikimedia.org
M templates/wmnet
4 files changed, 4 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/dns 
refs/changes/47/255047/1

diff --git a/templates/10.in-addr.arpa b/templates/10.in-addr.arpa
index cf0fcbf..9a28985 100644
--- a/templates/10.in-addr.arpa
+++ b/templates/10.in-addr.arpa
@@ -1877,7 +1877,7 @@
 118 1H  IN PTR  tin.mgmt.eqiad.wmnet.
 119 1H  IN PTR  wmf4074.mgmt.eqiad.wmnet.
 119 1H  IN PTR  antimony.mgmt.eqiad.wmnet.
-120 1H  IN PTR  holmium.mgmt.eqiad.wmnet.
+120 1H  IN PTR  labservices1002.mgmt.eqiad.wmnet.
 120 1H  IN PTR  wmf4075.mgmt.eqiad.wmnet.
 121 1H  IN PTR  barium.mgmt.eqiad.wmnet.
 121 1H  IN PTR  wmf4076.mgmt.eqiad.wmnet.
diff --git a/templates/154.80.208.in-addr.arpa 
b/templates/154.80.208.in-addr.arpa
index db0cbb0..c4e78c1 100644
--- a/templates/154.80.208.in-addr.arpa
+++ b/templates/154.80.208.in-addr.arpa
@@ -25,7 +25,7 @@
 7   1H  IN PTR  antimony.wikimedia.org.
 10  1H  IN PTR  carbon.wikimedia.org.
 11  1H  IN PTR  dataset1001.wikimedia.org.
-12  1H  IN PTR  holmium.wikimedia.org.
+12  1H  IN PTR  labservices1002.wikimedia.org.
 13  1H  IN PTR  protactinium.wikimedia.org.
 14  1H  IN PTR  neon.wikimedia.org.
 16  1H  IN PTR  ms1001.wikimedia.org.
diff --git a/templates/wikimedia.org b/templates/wikimedia.org
index f6f3688..967c40d 100644
--- a/templates/wikimedia.org
+++ b/templates/wikimedia.org
@@ -121,7 +121,7 @@
 
 gadolinium  1H  IN A208.80.154.73
 gallium 1H  IN A208.80.154.135
-holmium 1H  IN A208.80.154.12
+labservices1002 1H  IN A208.80.154.12
 hydrogen1H  IN A208.80.154.50
 1H  IN  2620:0:861:1:208:80:154:50
 install2001 1H  IN A208.80.153.4
diff --git a/templates/wmnet b/templates/wmnet
index 3a44457..3844b39 100644
--- a/templates/wmnet
+++ b/templates/wmnet
@@ -1914,7 +1914,7 @@
 WMF4074 1H  IN A10.65.3.119
 antimony1H  IN A10.65.3.119
 WMF4075 1H  IN A10.65.3.120
-holmium 1H  IN A10.65.3.120
+labservices1002 1H  IN A10.65.3.120
 WMF4076 1H  IN A10.65.3.121
 barium  1H  IN A10.65.3.121
 WMF4077 1H  IN A10.65.3.122

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I88d74bcc13d0cf6fb765f1332bd59addf596302e
Gerrit-PatchSet: 1
Gerrit-Project: operations/dns
Gerrit-Branch: master
Gerrit-Owner: Andrew Bogott 

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


[MediaWiki-commits] [Gerrit] Various improvements and fixes - change (mediawiki...Timeless)

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

Change subject: Various improvements and fixes
..


Various improvements and fixes

* Consistent dark colours stolen from wikimediadc.org, probably stolen from
  that header template
* More consistent colours for headers
* Fixes for extension:templatesandbox
* pre and center rules, which for some reason aren't in core
* Fix for anchor offset issues caused by the fixed header
* Fixes for the personal dropdown menu
* Update font stack to use only ones with known consistent metrics

Change-Id: I88350e837b96de812c9d5f1308ae83703da6d0b4
---
M resources/forms.less
M resources/screen-common.less
M resources/screen-desktop.less
M resources/variables.less
4 files changed, 66 insertions(+), 26 deletions(-)

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



diff --git a/resources/forms.less b/resources/forms.less
index d5879f8..cb31b11 100644
--- a/resources/forms.less
+++ b/resources/forms.less
@@ -189,6 +189,25 @@
label {
margin-right: 1.5em;
}
+
+   // For Extension:TemplateSandbox and the like
+   fieldset,
+   legend {
+   background: inherit;
+   border: none;
+   box-shadow: none;
+   padding: 0;
+   margin-top: 2em;
+   }
+}
+
+
+/* Extension:TemplateSandbox stuff */
+.mw-templatesandbox-page label {
+   padding: 0;
+}
+#wpTemplateSandboxPreview {
+   margin-left: .5em;
 }
 
 /* Recent changes and watchlist options */
diff --git a/resources/screen-common.less b/resources/screen-common.less
index af07e7d..54def45 100644
--- a/resources/screen-common.less
+++ b/resources/screen-common.less
@@ -82,7 +82,7 @@
}
 
h1, h2 {
-   border-bottom: solid 2px @blue-bright;
+   border-bottom: solid 2px @blue;
 
}
 
@@ -120,6 +120,17 @@
}
 }
 
+pre {
+   overflow: auto;
+   white-space: pre-wrap;
+}
+
+.center,
+.center * {
+   margin: auto;
+   text-align: center;
+}
+
 /* Thumbnails */
 .tright {
margin: 0 0 .5em .5em;
diff --git a/resources/screen-desktop.less b/resources/screen-desktop.less
index a0ac638..b5acdb0 100644
--- a/resources/screen-desktop.less
+++ b/resources/screen-desktop.less
@@ -32,27 +32,36 @@
background: @background;
color: @text;
padding: 0.5em 0 0;
-   box-shadow: 0 2px 2px rgba(0, 0, 0, 0.1), 0 0 1px rgba(0, 0, 0, 0.5);
+   box-shadow: 0 3px 3px 2px rgba(0, 0, 0, 0.075), 0 0 2px rgba(0, 0, 0, 
0.2);
+   min-height: 2.85em;
+}
+
+/* Add offset to make anchor links work with the fixed header */
+:target:before {
+   content: "";
+   display: block;
+   height: 2.85em;
+   margin: -2.85em 0 0;
 }
 
 @color-height: 4px;
 .color-left {
float:left;
height: @color-height;
-   background: @red;
+   background: @red-dark;
width: 50%;
 }
 .color-right {
display: inline-block;
height: @color-height;
-   background: @green;
+   background: @green-dark;
width: 50%;
float:right;
 }
 .color-middle {
height: @color-height;
-   background: @blue;
-   margin-top: .3em;
+   background: @blue-dark;
+   margin-top: .4em;
margin-bottom: -@color-height;
position: relative;
 }
@@ -69,8 +78,8 @@
line-height: 1;
 }
 #p-personal h3 {
-   margin: 0;
-   padding: .7em 0 .55em 25px;
+   margin: 0 0 -1em;
+   padding: .7em 0 1.25em 25px;
font-family: @fonts-secondary;
font-weight: normal;
font-size: 1.1em;
@@ -158,7 +167,7 @@
position: absolute;
padding: 20px 2em 0;
min-width: 6em;
-   top: 2.45em;
+   top: 2.95em;
right: 0;
overflow: visible;
line-height: 1.1;
diff --git a/resources/variables.less b/resources/variables.less
index 8bbe005..5ea87bc 100644
--- a/resources/variables.less
+++ b/resources/variables.less
@@ -12,43 +12,44 @@
 @link: @blue;
 @link-red: @red;
 
-@grey: #ddd;
+@grey: #ccc;
 @grey-bright: #eee;
-@grey-dark: #aaa;
+@grey-dark: #666;
 
-@red: #b22;
-@red-bright: #f44;
-@red-dark: #800;
+@red: #d44;
+@red-bright: #f55;
+@red-dark: #900;
 
-@green: #194;
-@green-bright: #4c7;
-@green-dark: #071;
+@green: #3b7;
+@green-bright: #4c8;
+@green-dark: #396;
 
-@blue: #07c;
-@blue-bright: #08d;
-@blue-dark: #047;
+@blue: #08d;
+@blue-bright: #2af;
+@blue-dark: #069;
 
 @link: @blue;
 @link-red: @red;
 
 
-/* Flair */
-
-@fonts-secondary: 'Linux Libertine', 'Georgia', serif;
-@fonts: 'Open Sans', 'Helvetica Neue', 'Arial', sans-serif;
+// Flair
+// Fonts are chosen for consistent metrics, not necessarily overall prettiness.
+// This will NEED fixes for different languages.
+@fonts-secondary: 'Linux Libertine', 'Times New Roman', serif;
+@fonts: 'Helvetica Neue', 'Nimbus Sans L', 'Arial', sans-serif;
 @border: .2em;

[MediaWiki-commits] [Gerrit] minor adyen iframe css changes - change (mediawiki...DonationInterface)

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

Change subject: minor adyen iframe css changes
..


minor adyen iframe css changes

diff is noisy cause file is full of windows newlines

Change-Id: I65c62c2446f3513afd53e98d48f666bb99f1570c
---
M adyen_gateway/forms/css/iframe.screen.css
1 file changed, 60 insertions(+), 46 deletions(-)

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



diff --git a/adyen_gateway/forms/css/iframe.screen.css 
b/adyen_gateway/forms/css/iframe.screen.css
index 690c9ec..ba45697 100644
--- a/adyen_gateway/forms/css/iframe.screen.css
+++ b/adyen_gateway/forms/css/iframe.screen.css
@@ -6,9 +6,24 @@
 }
 
 /* Match input styling */
-input[type="text"] {
-   border: 1px solid #C0C0C0;
-   padding: 3px;
+input[type="text"], select {
+   background-color: #f6f6f6;
+   padding: 1em !important;
+   -moz-box-shadow: 0 1px 1px rgba(0, 0, 0, .2), inset 0 0 0 1px rgba(0, 
0, 0, .1);
+   -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, .2), inset 0 0 0 1px 
rgba(0, 0, 0, .1);
+   box-shadow: 0 1px 1px rgba(0, 0, 0, .2), inset 0 0 0 1px rgba(0, 0, 0, 
.1);
+   -moz-border-radius: 4px;
+   -webkit-border-radius: 4px;
+   border-radius: 4px;
+   border: 0 !important;
+   color: #006699;
+   cursor: pointer;
+   margin-bottom: .2em;
+   -webkit-transition: all .3s ease-in-out;
+   -moz-transition:all .3s ease-in-out;
+   -o-transition:  all .3s ease-in-out;
+   -ms-transition: all .3s ease-in-out;
+   transition: all .3s ease-in-out;
 }
 
 #card\.cardNumber, #card\.cardHolderName {
@@ -40,7 +55,6 @@
font-size: 80%;
 }
 
-
 html {
height: 100%;
max-height: 100%;
@@ -49,8 +63,8 @@
 }
 
 body {
-   color: #00;
-   background-color: #CCE7CD;
+   color: #7c7c7c;
+   padding: 2%;
 }
 
 /* Main Elements */
@@ -523,59 +537,59 @@
 /* ivr specific css */
 
 .ivricon {
-display: block;
-margin-right: 10px;
-float: left;
+   display: block;
+   margin-right: 10px;
+   float: left;
 }
 .ivrmessage {
-display: block;
-font-weight: bold;
+   display: block;
+   font-weight: bold;
 }
 .ivrdetail {
-display: block;
-margin-top: 5px;
-font-weight: bold;
-font-family: arial, sans-serif;
+   display: block;
+   margin-top: 5px;
+   font-weight: bold;
+   font-family: arial, sans-serif;
 }
 
 
 #phoneNumber .ivrdetail {
-color: #57A022;
-font-size: 2.4em;
+   color: #57A022;
+   font-size: 2.4em;
 }
 
 #payCode .ivrdetail {
-color: #1F5F98;
-font-size: 2.4em;
+   color: #1F5F98;
+   font-size: 2.4em;
 }
 #timeToCall .ivrmessage {
-font-weight: normal;
-line-height: 1.1em;
+   font-weight: normal;
+   line-height: 1.1em;
 }
 
 #timeToCall .ivrmessage .phoneDetails, #timeLeft {
-font-weight: bold;
-color:  #57A022;
-font-family: arial, sans-serif;
+   font-weight: bold;
+   color:  #57A022;
+   font-family: arial, sans-serif;
 }
 
 
 .progressW {
-width: 400px; 
-margin-left: 50px; 
-padding: 1px;
-border: 1px solid #666;
-background-color: transparent
+   width: 400px; 
+   margin-left: 50px; 
+   padding: 1px;
+   border: 1px solid #666;
+   background-color: transparent
 }
 .progress {
-width: 0px;
-font-size: 1px;
-height: 14px;
-margin: 0px;
-padding:0px;
-background-color: #66C931;
-background-image: url(/hpp/img/progress3.png);
-background-repeat: repeat-x;
+   width: 0px;
+   font-size: 1px;
+   height: 14px;
+   margin: 0px;
+   padding:0px;
+   background-color: #66C931;
+   background-image: url(/hpp/img/progress3.png);
+   background-repeat: repeat-x;
 }
 
 .ebanking_FIFrame {
@@ -584,21 +598,21 @@
 }
 
 .ebanking_FIHeader {
-font-weight:bold;
-margin-bottom:  5px;
-margin-top: 5px;
-color:  #1678A5;
+   font-weight:bold;
+   margin-bottom:  5px;
+   margin-top: 5px;
+   color:  #1678A5;
 }
 
 .ebanking_FIText {
-padding:5px;
+   padding:5px;
 }
 
 .invoicestat {
-width: 55%;
-border: 2px solid black;
-font-family: courier, monospace;
-padding: 17px 10px 17px 61px;
+   width: 55%;
+   border: 2px solid black;
+   font-family: courier, monospace;
+   padding: 17px 10px 17px 61px;
 }
 
 .invoicestatPaid  { border-color: green; background-color: #efe; }  

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I65c62c2446f3513afd53e98d48f666bb99f1570c
Gerrit-PatchSet: 2

[MediaWiki-commits] [Gerrit] Use downloader from https://github.com/rndme/download - change (wikidata...rdf)

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

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

Change subject: Use downloader from https://github.com/rndme/download
..

Use downloader from https://github.com/rndme/download

This should allow us dealing with larger result sets
Bug: T119239

Change-Id: I5fb654bd1358f92af69bad5c501633b7a93dec86
---
A gui/download.min.js
M gui/gui.js
M gui/index.html
3 files changed, 4 insertions(+), 22 deletions(-)


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

diff --git a/gui/download.min.js b/gui/download.min.js
new file mode 100644
index 000..082fc20
--- /dev/null
+++ b/gui/download.min.js
@@ -0,0 +1,2 @@
+//download.js v3.1, by dandavis; 2008-2015. [CCBY2] see 
http://danml.com/download.html for tests/usage
+(function(f,a){"function"==typeof 
define&?define([],a):"object"==typeof 
exports?module.exports=a():f.download=a()})(this,function(){return 
function(f,a,b){function n(l){var a=l.split(/[:;,]/);l=a[1];var 
a=("base64"==a[2]?atob:decodeURIComponent)(a.pop()),c=a.length,b=0,d=new 
Uint8Array(c);for(b;b

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


[MediaWiki-commits] [Gerrit] Enable commonswiki writes for ES labs replica - change (operations/mediawiki-config)

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

Change subject: Enable commonswiki writes for ES labs replica
..


Enable commonswiki writes for ES labs replica

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

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



diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 44fc9b5..91a7b03 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -15378,6 +15378,7 @@
'enwiki' => array( 'eqiad', 'codfw', 'labsearch' ),
'dewiki' => array( 'eqiad', 'codfw', 'labsearch' ),
'wikidatawiki' => array( 'eqiad', 'codfw', 'labsearch' ),
+   'commonswiki' => array( 'eqiad', 'codfw', 'labsearch' ),
'testwiki' => array( 'eqiad', 'codfw', 'labsearch' )
 ),
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I64cb867b5b13a1cf22552ddd7412c21a4308ec13
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: EBernhardson 
Gerrit-Reviewer: Chad 
Gerrit-Reviewer: EBernhardson 
Gerrit-Reviewer: Florianschmidtwelzow 
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 DonationInterface submodule - change (mediawiki/core)

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

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

Change subject: Update DonationInterface submodule
..

Update DonationInterface submodule

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


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

diff --git a/extensions/DonationInterface b/extensions/DonationInterface
index 5630b74..583d6bf 16
--- a/extensions/DonationInterface
+++ b/extensions/DonationInterface
-Subproject commit 5630b749388391c44193359abbf17336317f4e1d
+Subproject commit 583d6bf85c0c49aa9fc850b58f43b7d519579c60

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iebe28053235d675f195f06e6e0454589b5602e36
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: fundraising/REL1_25
Gerrit-Owner: Ejegg 

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


[MediaWiki-commits] [Gerrit] Tweak title pronunciation icon appearance - change (apps...wikipedia)

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

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

Change subject: Tweak title pronunciation icon appearance
..

Tweak title pronunciation icon appearance

* Reduce the size of the icon[0] and increase the hit area.
* Seperate the view and collision concerns.

[0] https://veuwer.com/i/3e7s,3e7t

Bug: T114524
Change-Id: I5d506c96069584bc861441fd6612e04d17d58067
---
M app/src/main/java/org/wikipedia/richtext/AudioUrlSpan.java
M app/src/main/java/org/wikipedia/richtext/ClickSpan.java
A app/src/main/java/org/wikipedia/richtext/DefaultClickSpan.java
M app/src/main/java/org/wikipedia/richtext/DrawableSpan.java
M app/src/main/java/org/wikipedia/richtext/TextViewSpanOnTouchListener.java
M app/src/main/res/values/dimens.xml
6 files changed, 170 insertions(+), 68 deletions(-)


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

diff --git a/app/src/main/java/org/wikipedia/richtext/AudioUrlSpan.java 
b/app/src/main/java/org/wikipedia/richtext/AudioUrlSpan.java
index b7ec392..35c0972 100644
--- a/app/src/main/java/org/wikipedia/richtext/AudioUrlSpan.java
+++ b/app/src/main/java/org/wikipedia/richtext/AudioUrlSpan.java
@@ -1,7 +1,11 @@
 package org.wikipedia.richtext;
 
 import android.content.Context;
+import android.content.res.Resources;
+import android.graphics.Canvas;
 import android.graphics.Color;
+import android.graphics.Paint;
+import android.graphics.PointF;
 import android.graphics.drawable.Drawable;
 import android.graphics.drawable.LevelListDrawable;
 import android.support.annotation.ColorInt;
@@ -18,6 +22,7 @@
 import org.wikipedia.media.AvPlayer;
 
 public class AudioUrlSpan extends AnimatedImageSpan implements ClickSpan {
+
 private static final int STOP_ICON_LEVEL = 0;
 private static final int PLAY_ICON_LEVEL = 1;
 
@@ -30,6 +35,9 @@
 @NonNull
 private final String path;
 
+@NonNull
+private final DefaultClickSpan clickSpan;
+
 public AudioUrlSpan(@NonNull View view,
 @NonNull AvPlayer player,
 @NonNull String path,
@@ -37,6 +45,7 @@
 super(view, drawable(view.getContext()), verticalAlignment);
 this.player = player;
 this.path = path;
+clickSpan = clickSpan(view.getResources());
 }
 
 public void setTint(@ColorInt int color) {
@@ -44,8 +53,13 @@
 }
 
 @Override
-public void onClick(TextView textView) {
+public void onClick(@NonNull TextView textView) {
 toggle();
+}
+
+@Override
+public boolean contains(@NonNull PointF point) {
+return clickSpan.contains(point);
 }
 
 @Override
@@ -74,6 +88,28 @@
 return super.getDrawable();
 }
 
+@Override
+@SuppressWarnings("checkstyle:parameternumber")
+public void draw(Canvas canvas,
+ CharSequence text,
+ int start,
+ int end,
+ float x,
+ int top,
+ int y,
+ int bottom,
+ Paint paint) {
+super.draw(canvas, text, start, end, x, top, y, bottom, paint);
+
+clickSpan.setOriginX(x + getDrawable().getBounds().centerX());
+clickSpan.setOriginY(drawY(y, bottom) + 
getDrawable().getBounds().centerY());
+
+final boolean debugClickBounds = false;
+if (debugClickBounds) {
+clickSpan.draw(canvas);
+}
+}
+
 private void showIcon(int level) {
 getDrawable().setLevel(level);
 }
@@ -82,23 +118,37 @@
 return getDrawable().getLevel();
 }
 
+@NonNull
 private static Drawable drawable(Context context) {
 LevelListDrawable levels = new AppLevelListDrawable();
 levels.addLevel(PLAY_ICON_LEVEL, PLAY_ICON_LEVEL, 
spinnerDrawable(context));
 levels.addLevel(STOP_ICON_LEVEL, STOP_ICON_LEVEL, 
speakerDrawable(context));
+int radius = getDimensionPixelSize(context, 
R.dimen.audio_url_span_loading_spinner_radius);
+levels.setBounds(0, 0, radius * 2, radius * 2);
 return levels;
 }
 
+@NonNull
 private static Drawable speakerDrawable(Context context) {
 return getDrawable(context, R.drawable.ic_volume_up_black_24dp);
 }
 
+@NonNull
 private static Drawable spinnerDrawable(Context context) {
 return new CircularProgressDrawable(Color.WHITE,
 getDimensionPixelSize(context, 
R.dimen.audio_url_span_loading_spinner_border_thickness),
 getDimensionPixelSize(context, 
R.dimen.audio_url_span_loading_spinner_radius));
 }
 
+@NonNull
+private DefaultClickSpan clickSpan(Resources resources) {
+DefaultClickSpan span = new DefaultClickSpan();
+float leg = resources.getDimension(R.dimen.audio_url_span_click_size);
+span.setWidth(leg);
+

[MediaWiki-commits] [Gerrit] Removed support for unnamed params for #forminput - change (mediawiki...SemanticForms)

2015-11-23 Thread Yaron Koren (Code Review)
Yaron Koren has submitted this change and it was merged.

Change subject: Removed support for unnamed params for #forminput
..


Removed support for unnamed params for #forminput

Also made some general improvements to the code.

Change-Id: Ia1f99f66527ae916a41c31a090796704ed10c801
---
M includes/SF_ParserFunctions.php
1 file changed, 44 insertions(+), 65 deletions(-)

Approvals:
  Yaron Koren: Checked; Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/SF_ParserFunctions.php b/includes/SF_ParserFunctions.php
index 57f8773..60edde6 100644
--- a/includes/SF_ParserFunctions.php
+++ b/includes/SF_ParserFunctions.php
@@ -236,42 +236,40 @@
 
$params = func_get_args();
array_shift( $params ); // don't need the parser
-   // set defaults
+
+   // Set defaults.
$inFormName = $inValue = $inButtonStr = $inQueryStr = '';
$inQueryArr = array();
-   $positionalParameters = false;
$inAutocompletionSource = '';
$inRemoteAutocompletion = false;
$inSize = 25;
$classStr = "sfFormInput";
$inPlaceholder = "";
$inAutofocus = true; // Only evaluated if $wgHtml5 is true.
-   // assign params - support unlabelled params, for backwards 
compatibility
+
+   // Assign params.
foreach ( $params as $i => $param ) {
$elements = explode( '=', $param, 2 );
 
-   // set param_name and value
-   if ( count( $elements ) > 1 && !$positionalParameters ) 
{
-   $param_name = trim( $elements[0] );
-
-   // parse (and sanitize) parameter values
+   // Set param name and value.
+   if ( count( $elements ) > 1 ) {
+   $paramName = trim( $elements[0] );
+   // Parse (and sanitize) parameter values.
$value = trim( $parser->recursiveTagParse( 
$elements[1] ) );
} else {
-   $param_name = null;
-
-   // parse (and sanitize) parameter values
-   $value = trim( $parser->recursiveTagParse( 
$param ) );
+   $paramName = trim( $param );
+   $value = null;
}
 
-   if ( $param_name == 'form' )
+   if ( $paramName == 'form' ) {
$inFormName = $value;
-   elseif ( $param_name == 'size' )
+   } elseif ( $paramName == 'size' ) {
$inSize = $value;
-   elseif ( $param_name == 'default value' )
+   } elseif ( $paramName == 'default value' ) {
$inValue = $value;
-   elseif ( $param_name == 'button text' )
+   } elseif ( $paramName == 'button text' ) {
$inButtonStr = $value;
-   elseif ( $param_name == 'query string' ) {
+   } elseif ( $paramName == 'query string' ) {
// Change HTML-encoded ampersands directly to
// URL-encoded ampersands, so that the string
// doesn't get split up on the '&'.
@@ -281,43 +279,24 @@
 
parse_str($inQueryStr, $arr);
$inQueryArr = 
SFUtils::array_merge_recursive_distinct( $inQueryArr, $arr );
-   } elseif ( $param_name == 'autocomplete on category' ) {
+   } elseif ( $paramName == 'autocomplete on category' ) {
$inAutocompletionSource = $value;
-   $autocompletion_type = 'category';
-   } elseif ( $param_name == 'autocomplete on namespace' ) 
{
+   $autocompletionType = 'category';
+   } elseif ( $paramName == 'autocomplete on namespace' ) {
$inAutocompletionSource = $value;
-   $autocompletion_type = 'namespace';
-   } elseif ( $param_name == 'remote autocompletion' ) {
+   $autocompletionType = 'namespace';
+   } elseif ( $paramName == 'remote autocompletion' ) {
$inRemoteAutocompletion = true;
-   } elseif ( $param_name == 'placeholder' ) {
+   } elseif ( $paramName == 'placeholder' ) {
$inPlaceholder = $value;
-  

[MediaWiki-commits] [Gerrit] Enable wikidatawiki for es labs replica - change (operations/mediawiki-config)

2015-11-23 Thread EBernhardson (Code Review)
EBernhardson has uploaded a new change for review.

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

Change subject: Enable wikidatawiki for es labs replica
..

Enable wikidatawiki for es labs replica

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


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 96c4907..44fc9b5 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -15377,6 +15377,7 @@
'default' => array( 'eqiad', 'codfw' ),
'enwiki' => array( 'eqiad', 'codfw', 'labsearch' ),
'dewiki' => array( 'eqiad', 'codfw', 'labsearch' ),
+   'wikidatawiki' => array( 'eqiad', 'codfw', 'labsearch' ),
'testwiki' => array( 'eqiad', 'codfw', 'labsearch' )
 ),
 

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

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

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


[MediaWiki-commits] [Gerrit] Update VisualEditor for Iee9ae2bb - change (mediawiki/core)

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

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

Change subject: Update VisualEditor for Iee9ae2bb
..

Update VisualEditor for Iee9ae2bb

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


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/53/255053/1

diff --git a/extensions/VisualEditor b/extensions/VisualEditor
index 79a388a..8951a7b 16
--- a/extensions/VisualEditor
+++ b/extensions/VisualEditor
-Subproject commit 79a388aa2351271ef9148b61777d5a69d9b7c0de
+Subproject commit 8951a7ba73518e6eff97ae16e778a54224b579d2

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iaaac212b3299ceba3601e06f9baf0c44a05db2d9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.27.0-wmf.7
Gerrit-Owner: Alex Monk 

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


[MediaWiki-commits] [Gerrit] Enable commonswiki writes for ES labs replica - change (operations/mediawiki-config)

2015-11-23 Thread EBernhardson (Code Review)
EBernhardson has uploaded a new change for review.

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

Change subject: Enable commonswiki writes for ES labs replica
..

Enable commonswiki writes for ES labs replica

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


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 44fc9b5..91a7b03 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -15378,6 +15378,7 @@
'enwiki' => array( 'eqiad', 'codfw', 'labsearch' ),
'dewiki' => array( 'eqiad', 'codfw', 'labsearch' ),
'wikidatawiki' => array( 'eqiad', 'codfw', 'labsearch' ),
+   'commonswiki' => array( 'eqiad', 'codfw', 'labsearch' ),
'testwiki' => array( 'eqiad', 'codfw', 'labsearch' )
 ),
 

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

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

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


[MediaWiki-commits] [Gerrit] Update VisualEditor for Iee9ae2bb - change (mediawiki/core)

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

Change subject: Update VisualEditor for Iee9ae2bb
..


Update VisualEditor for Iee9ae2bb

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

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



diff --git a/extensions/VisualEditor b/extensions/VisualEditor
index 79a388a..8951a7b 16
--- a/extensions/VisualEditor
+++ b/extensions/VisualEditor
-Subproject commit 79a388aa2351271ef9148b61777d5a69d9b7c0de
+Subproject commit 8951a7ba73518e6eff97ae16e778a54224b579d2

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iaaac212b3299ceba3601e06f9baf0c44a05db2d9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.27.0-wmf.7
Gerrit-Owner: Alex Monk 
Gerrit-Reviewer: Alex Monk 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Update DonationInterface submodule - change (mediawiki/core)

2015-11-23 Thread Ejegg (Code Review)
Ejegg has submitted this change and it was merged.

Change subject: Update DonationInterface submodule
..


Update DonationInterface submodule

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

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



diff --git a/extensions/DonationInterface b/extensions/DonationInterface
index 5630b74..583d6bf 16
--- a/extensions/DonationInterface
+++ b/extensions/DonationInterface
-Subproject commit 5630b749388391c44193359abbf17336317f4e1d
+Subproject commit 583d6bf85c0c49aa9fc850b58f43b7d519579c60

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iebe28053235d675f195f06e6e0454589b5602e36
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: fundraising/REL1_25
Gerrit-Owner: Ejegg 
Gerrit-Reviewer: Ejegg 

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


[MediaWiki-commits] [Gerrit] Update the privacy policy - change (wikimedia/iegreview)

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

Change subject: Update the privacy policy
..


Update the privacy policy

Bug: T96882
Change-Id: I38f8c46ba32a3d2c76c7be1a019c924135eafba7
---
M data/i18n/en.json
M data/i18n/qqq.json
M data/templates/privacy.html
3 files changed, 86 insertions(+), 3 deletions(-)

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



diff --git a/data/i18n/en.json b/data/i18n/en.json
index fd7d5db..78aa775 100644
--- a/data/i18n/en.json
+++ b/data/i18n/en.json
@@ -34,7 +34,6 @@
"credits-page-logo": "The https://commons.wikimedia.org/wiki/File%3AIEG_glasses_lightblue.png\;>glasses
 logo is by Wikimedia Commons user Heatherawalls and used under the 
Creative Commons CC0 1.0 Universal Public Domain Dedication license.",
 
"privacy": "Privacy",
-   "privacy-page": "All personal information will be held strictly 
confidential by the grants reviewers and the http://wikimediafoundation.org\;>Wikimedia Foundation, in accordance 
to the Wikimedia Foundation http://wikimediafoundation.org/wiki/Privacy_policy\;>privacy 
policy.",
 
"footer-credits": "credits",
"footer-privacy": "privacy",
diff --git a/data/i18n/qqq.json b/data/i18n/qqq.json
index 35b20c5..adecd8e 100644
--- a/data/i18n/qqq.json
+++ b/data/i18n/qqq.json
@@ -123,7 +123,6 @@
"password": "Input label, followed by text 
box.\n{{Identical|Password}}",
"password-username": "Input label, followed by authenticated user's 
username.\n{{Identical|Username}}",
"privacy": "Privacy page title",
-   "privacy-page": "Privacy policy page content.",
"proposal-summary": "Section title",
"proposals-edit-amount": "Input label, followed by text box.",
"proposals-edit-amount-placeholder": "Placeholder for input text box",
diff --git a/data/templates/privacy.html b/data/templates/privacy.html
index ce6e2ad..fc35e1e 100644
--- a/data/templates/privacy.html
+++ b/data/templates/privacy.html
@@ -8,7 +8,92 @@
 
   
 {{ 'privacy'|message }}
-{{ 'privacy-page'|message|raw }}
+  
+  
+Welcome!
+Welcome to the Wikimedia Foundation’s grant review application. The 
grant review app is a flexible scoring system for grant administrators and 
volunteers to review and score grant proposals.
+
+Definitions
+For the sake of clarity, "WMF", "us", "we", and "our" refer to the http://www.wikimediafoundation.org/;>Wikimedia Foundation; the "app" 
refers to the grant review application, and the "app privacy policy" refers to 
this document.
+"Personal information" means information you provide us or information 
we collect from you that could be used to personally identify you. To be clear, 
while we do not necessarily collect all of the following types of information, 
we consider at least the following to be "personal information" if it is 
otherwise nonpublic and can be used to identify you: (a) your real name, 
address, phone number, email address, password, identification number on 
government-issued ID, IP address, user-agent information, credit card number; 
(b) when associated with one of the items in subsection (a), any sensitive data 
such as date of birth, gender, sexual orientation, racial or ethnic origins, 
marital or familial status, medical conditions or disabilities, political 
affiliation, and religion; and (c) any of the items in subsections (a) or (b) 
when associated with your user account.
+
+Important Information
+
+By using the app, you agree to the terms of this grant review app 
privacy policy and the WMF https://wikimediafoundation.org/wiki/Terms_of_Use;>terms of use. 
Furthermore, by using the app, you consent to the collection, transfer, 
processing, storage, disclosure, and use of your information as described in 
this app privacy policy.
+
+If you do not agree to these terms, you may not use this app.
+
+If you have any questions or suggestions about the app privacy policy 
or WMF terms of use, please https://wikimediafoundation.org/wiki/Contact_us;>contact us.
+
+What This Policy Covers
+
+This app privacy policy applies to our collection and handling of 
information about you that we receive as a result of your use of the app. As a 
http://www.mediawiki.org/wiki/Wikimedia_Labs;>Wikimedia Labs 
project, the grant review app is http://wikimediafoundation.org/wiki/Privacy_policy#What_This_Privacy_Policy_Does_.26_Doesn.27t_Cover;>not
 covered by the general http://wikimediafoundation.org/wiki/Privacy_policy;>Wikimedia Privacy 
Policy. This app privacy policy only applies to use of this Wikimedia grant 
review application and does not cover use of any other Wikimedia projects, 
sites, or services.
+
+What Info We Collect
+We may collect information, including but not limited to:
+
+  User account information
+  User-submitted information
+  Information we collect related to 

[MediaWiki-commits] [Gerrit] phab: strip spaces around addresses - change (operations/puppet)

2015-11-23 Thread Rush (Code Review)
Rush has uploaded a new change for review.

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

Change subject: phab: strip spaces around addresses
..

phab: strip spaces around addresses

Change-Id: I2f8990b5e030a726fdec3d13380fcabc610cd5dd
---
M modules/phabricator/files/phab_epipe.py
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/43/255043/1

diff --git a/modules/phabricator/files/phab_epipe.py 
b/modules/phabricator/files/phab_epipe.py
index 12999f0..81c9ba5 100644
--- a/modules/phabricator/files/phab_epipe.py
+++ b/modules/phabricator/files/phab_epipe.py
@@ -59,8 +59,8 @@
 :param list_of_dests: list of dest email strings
 :returns: string
 """
-for dest in list_of_dests:
-task = re.match('^T(\d+)@', dest)
+for dest in [m.strip() for m in list_of_dests]:
+task = re.match('^[T|t](\d+)@', dest)
 if task:
 return int(task.group(1))
 return ''

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

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

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


[MediaWiki-commits] [Gerrit] Prevent switching from unedited section directly into VE - change (mediawiki...VisualEditor)

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

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

Change subject: Prevent switching from unedited section directly into VE
..

Prevent switching from unedited section directly into VE

Bug: T117713
Change-Id: Iee9ae2bbe4757cb07e9aa2bd5f41a46c0ebb391a
(cherry picked from commit 67a51aee9b8ce440807bd3bcc9d787a793e3aec8)
---
M modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.init.js
1 file changed, 4 insertions(+), 1 deletion(-)


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

diff --git a/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.init.js 
b/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.init.js
index 468ce54..9eb732e 100644
--- a/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.init.js
+++ b/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.init.js
@@ -535,7 +535,10 @@
 
if (
mw.config.get( 'wgAction' ) === 'submit' ||
-   ( mw.config.get( 'wgAction' ) === 'edit' && 
wikitextModified )
+   ( mw.config.get( 'wgAction' ) === 'edit' && 
wikitextModified ) ||
+   // switching from section editing must prompt 
because we can't
+   // keep changes from that (yet?)
+   $( 'input[name=wpSection]' ).val()
) {
mw.loader.using( 'ext.visualEditor.switching' )
.done( function () {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iee9ae2bbe4757cb07e9aa2bd5f41a46c0ebb391a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: wmf/1.27.0-wmf.7
Gerrit-Owner: Jforrester 
Gerrit-Reviewer: Alex Monk 

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


[MediaWiki-commits] [Gerrit] CRM-17464 remove deadlock inducing query - change (wikimedia...civicrm)

2015-11-23 Thread Eileen (Code Review)
Eileen has uploaded a new change for review.

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

Change subject: CRM-17464 remove deadlock inducing query
..

CRM-17464 remove deadlock inducing query

Note this removes an instance where a subquery is used when deleting from the 
acl_contact_cache - the subquery would lock the entire table
and could be to blame for the failmail we have been seeing

The patch is in 4.7 & involves more limited clearing. The only risk is in 
deleted contacts
maybe possibly being viewable if the cache is in some way not being managed 
correctly still
and the calling query does not specify this status adequately.

This code is a bit complex and ... in need of rework but I think scary fallout 
from this change
is unlikely. (We have deployed this patch to Fuzion customers)

Bug: T119447
Change-Id: I6c430af088cd04e8af71f41da85eeadeccaff185
---
M CRM/Contact/BAO/Contact.php
M CRM/Contact/BAO/Contact/Permission.php
2 files changed, 27 insertions(+), 9 deletions(-)


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

diff --git a/CRM/Contact/BAO/Contact.php b/CRM/Contact/BAO/Contact.php
index 7c92761..bacdc17 100644
--- a/CRM/Contact/BAO/Contact.php
+++ b/CRM/Contact/BAO/Contact.php
@@ -880,14 +880,7 @@
 
 //delete the contact id from recently view
 CRM_Utils_Recent::delContact($id);
-
-// Update the group contact cache
-if ($restore) {
-  CRM_Contact_BAO_GroupContactCache::remove();
-}
-else {
-  CRM_Contact_BAO_GroupContactCache::removeContact($id);
-}
+self::updateContactCache($id, empty($restore));
 
 // delete any dupe cache entry
 CRM_Core_BAO_PrevNextCache::deleteItem($id);
@@ -906,6 +899,32 @@
   }
 
   /**
+   * Action to update any caches relating to a recently update contact.
+   *
+   * I was going to call this from delete as well as from create to ensure the 
delete is being
+   * done whenever a contact is set to is_deleted=1 BUT I found create is 
already over-aggressive in
+   * that regard so adding it to delete seems to be enough to remove it from 
CRM_Contact_BAO_Contact_Permission
+   * where the call involved a subquery that was locking the table.
+   *
+   * @param int $contactID
+   * @param bool $isTrashed
+   */
+  public static function updateContactCache($contactID, $isTrashed = FALSE) {
+
+if ($isTrashed) {
+  CRM_Contact_BAO_GroupContactCache::removeContact($contactID);
+  // This has been moved to here from CRM_Contact_BAO_Contact_Permission 
as that was causing
+  // a table-locking query. It still seems a bit inadequate as it assumes 
the acl users can't see deleted
+  // but this should not cause any change as long as contacts are not 
being trashed outside the
+  // main functions for that.
+  CRM_Core_DAO::executeQuery('DELETE FROM civicrm_acl_contact_cache WHERE 
contact_id = %1', array(1 => array($contactID, 'Integer')));
+}
+else {
+  CRM_Contact_BAO_GroupContactCache::remove();
+}
+  }
+
+  /**
* Delete the image of a contact.
*
* @param int $id
diff --git a/CRM/Contact/BAO/Contact/Permission.php 
b/CRM/Contact/BAO/Contact/Permission.php
index 2d42840..3a326ca 100644
--- a/CRM/Contact/BAO/Contact/Permission.php
+++ b/CRM/Contact/BAO/Contact/Permission.php
@@ -141,7 +141,6 @@
  operation=VALUES(operation)"
 );
 
-CRM_Core_DAO::executeQuery('DELETE FROM civicrm_acl_contact_cache WHERE 
contact_id IN (SELECT id FROM civicrm_contact WHERE is_deleted = 1)');
 $_processed[$userID] = 1;
   }
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6c430af088cd04e8af71f41da85eeadeccaff185
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm/civicrm
Gerrit-Branch: master
Gerrit-Owner: Eileen 

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


[MediaWiki-commits] [Gerrit] CRM-17464 remove deadlock inducing query - change (wikimedia...civicrm)

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

Change subject: CRM-17464 remove deadlock inducing query
..


CRM-17464 remove deadlock inducing query

Note this removes an instance where a subquery is used when deleting from the 
acl_contact_cache - the subquery would lock the entire table
and could be to blame for the failmail we have been seeing

The patch is in 4.7 & involves more limited clearing. The only risk is in 
deleted contacts
maybe possibly being viewable if the cache is in some way not being managed 
correctly still
and the calling query does not specify this status adequately.

This code is a bit complex and ... in need of rework but I think scary fallout 
from this change
is unlikely. (We have deployed this patch to Fuzion customers)

Bug: T119447
Change-Id: I6c430af088cd04e8af71f41da85eeadeccaff185
---
M CRM/Contact/BAO/Contact.php
M CRM/Contact/BAO/Contact/Permission.php
2 files changed, 27 insertions(+), 9 deletions(-)

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



diff --git a/CRM/Contact/BAO/Contact.php b/CRM/Contact/BAO/Contact.php
index 7c92761..bacdc17 100644
--- a/CRM/Contact/BAO/Contact.php
+++ b/CRM/Contact/BAO/Contact.php
@@ -880,14 +880,7 @@
 
 //delete the contact id from recently view
 CRM_Utils_Recent::delContact($id);
-
-// Update the group contact cache
-if ($restore) {
-  CRM_Contact_BAO_GroupContactCache::remove();
-}
-else {
-  CRM_Contact_BAO_GroupContactCache::removeContact($id);
-}
+self::updateContactCache($id, empty($restore));
 
 // delete any dupe cache entry
 CRM_Core_BAO_PrevNextCache::deleteItem($id);
@@ -906,6 +899,32 @@
   }
 
   /**
+   * Action to update any caches relating to a recently update contact.
+   *
+   * I was going to call this from delete as well as from create to ensure the 
delete is being
+   * done whenever a contact is set to is_deleted=1 BUT I found create is 
already over-aggressive in
+   * that regard so adding it to delete seems to be enough to remove it from 
CRM_Contact_BAO_Contact_Permission
+   * where the call involved a subquery that was locking the table.
+   *
+   * @param int $contactID
+   * @param bool $isTrashed
+   */
+  public static function updateContactCache($contactID, $isTrashed = FALSE) {
+
+if ($isTrashed) {
+  CRM_Contact_BAO_GroupContactCache::removeContact($contactID);
+  // This has been moved to here from CRM_Contact_BAO_Contact_Permission 
as that was causing
+  // a table-locking query. It still seems a bit inadequate as it assumes 
the acl users can't see deleted
+  // but this should not cause any change as long as contacts are not 
being trashed outside the
+  // main functions for that.
+  CRM_Core_DAO::executeQuery('DELETE FROM civicrm_acl_contact_cache WHERE 
contact_id = %1', array(1 => array($contactID, 'Integer')));
+}
+else {
+  CRM_Contact_BAO_GroupContactCache::remove();
+}
+  }
+
+  /**
* Delete the image of a contact.
*
* @param int $id
diff --git a/CRM/Contact/BAO/Contact/Permission.php 
b/CRM/Contact/BAO/Contact/Permission.php
index 2d42840..3a326ca 100644
--- a/CRM/Contact/BAO/Contact/Permission.php
+++ b/CRM/Contact/BAO/Contact/Permission.php
@@ -141,7 +141,6 @@
  operation=VALUES(operation)"
 );
 
-CRM_Core_DAO::executeQuery('DELETE FROM civicrm_acl_contact_cache WHERE 
contact_id IN (SELECT id FROM civicrm_contact WHERE is_deleted = 1)');
 $_processed[$userID] = 1;
   }
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6c430af088cd04e8af71f41da85eeadeccaff185
Gerrit-PatchSet: 2
Gerrit-Project: wikimedia/fundraising/crm/civicrm
Gerrit-Branch: master
Gerrit-Owner: Eileen 
Gerrit-Reviewer: Awight 
Gerrit-Reviewer: Ejegg 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Return from function after redirect - change (mediawiki...DonationInterface)

2015-11-23 Thread Ejegg (Code Review)
Ejegg has submitted this change and it was merged.

Change subject: Return from function after redirect
..


Return from function after redirect

Prevents unintended fallthrough to fail page redirect, which was
superceding the intended one.

Bug: T118349
Change-Id: Ib25877badb79c1ab1c097fc4fc085d8f9b40e576
---
M globalcollect_gateway/globalcollect_resultswitcher.body.php
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/globalcollect_gateway/globalcollect_resultswitcher.body.php 
b/globalcollect_gateway/globalcollect_resultswitcher.body.php
index c194cb9..d1355e4 100644
--- a/globalcollect_gateway/globalcollect_resultswitcher.body.php
+++ b/globalcollect_gateway/globalcollect_resultswitcher.body.php
@@ -142,6 +142,7 @@
if ( $go ) {
$this->getOutput()->addHTML( 
"Redirecting to page $go" );
$this->getOutput()->redirect( 
$go );
+   return;
} else {
$this->logger->error( 
"Resultswitcher: No redirect defined. Order ID: $oid" );
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib25877badb79c1ab1c097fc4fc085d8f9b40e576
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DonationInterface
Gerrit-Branch: deployment
Gerrit-Owner: Ejegg 
Gerrit-Reviewer: AndyRussG 
Gerrit-Reviewer: Awight 
Gerrit-Reviewer: Cdentinger 
Gerrit-Reviewer: Ejegg 
Gerrit-Reviewer: Ssmith 
Gerrit-Reviewer: XenoRyet 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Use enableModuleContentVersion() instead of tracking getScri... - change (mediawiki...Citoid)

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

Change subject: Use enableModuleContentVersion() instead of tracking 
getScript() manually
..


Use enableModuleContentVersion() instead of tracking getScript() manually

See also 4613449b6561d18e8e59ebe52a162a735a2e12a6

Change-Id: I33b40c3879696d8e09dfa16123d338b9340139e0
---
M CitoidDataModule.php
1 file changed, 2 insertions(+), 6 deletions(-)

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



diff --git a/CitoidDataModule.php b/CitoidDataModule.php
index 7fefd86..912aa88 100644
--- a/CitoidDataModule.php
+++ b/CitoidDataModule.php
@@ -36,11 +36,7 @@
);
}
 
-   public function getDefinitionSummary( ResourceLoaderContext $context ) {
-   $summary = parent::getDefinitionSummary( $context );
-   $summary[] = array(
-   'script' => $this->getScript( $context ),
-   );
-   return $summary;
+   public function enableModuleContentVersion() {
+   return true;
}
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I33b40c3879696d8e09dfa16123d338b9340139e0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Citoid
Gerrit-Branch: master
Gerrit-Owner: Krinkle 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Prevent switching from unedited section directly into VE - change (mediawiki...VisualEditor)

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

Change subject: Prevent switching from unedited section directly into VE
..


Prevent switching from unedited section directly into VE

Bug: T117713
Change-Id: Iee9ae2bbe4757cb07e9aa2bd5f41a46c0ebb391a
(cherry picked from commit 67a51aee9b8ce440807bd3bcc9d787a793e3aec8)
---
M modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.init.js
1 file changed, 4 insertions(+), 1 deletion(-)

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



diff --git a/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.init.js 
b/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.init.js
index 468ce54..9eb732e 100644
--- a/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.init.js
+++ b/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.init.js
@@ -535,7 +535,10 @@
 
if (
mw.config.get( 'wgAction' ) === 'submit' ||
-   ( mw.config.get( 'wgAction' ) === 'edit' && 
wikitextModified )
+   ( mw.config.get( 'wgAction' ) === 'edit' && 
wikitextModified ) ||
+   // switching from section editing must prompt 
because we can't
+   // keep changes from that (yet?)
+   $( 'input[name=wpSection]' ).val()
) {
mw.loader.using( 'ext.visualEditor.switching' )
.done( function () {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iee9ae2bbe4757cb07e9aa2bd5f41a46c0ebb391a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: wmf/1.27.0-wmf.7
Gerrit-Owner: Jforrester 
Gerrit-Reviewer: Alex Monk 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Require a User object to be passed to EchoEvent::userCan() - change (mediawiki...Echo)

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

Change subject: Require a User object to be passed to EchoEvent::userCan()
..


Require a User object to be passed to EchoEvent::userCan()

All callers were already doing this.

Change-Id: If9e20e3d4740bcdb8842592e4cd988f8b35e1300
---
M includes/model/Event.php
1 file changed, 2 insertions(+), 7 deletions(-)

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



diff --git a/includes/model/Event.php b/includes/model/Event.php
index 4aff388..0f36efa 100644
--- a/includes/model/Event.php
+++ b/includes/model/Event.php
@@ -356,10 +356,10 @@
 * @param $field Integer:one of Revision::DELETED_TEXT,
 *  Revision::DELETED_COMMENT,
 *  Revision::DELETED_USER
-* @param $user User object to check, or null to use $wgUser
+* @param $user User object to check
 * @return Boolean
 */
-   public function userCan( $field, User $user = null ) {
+   public function userCan( $field, User $user ) {
$revision = $this->getRevision();
// User is handled specially
if ( $field === Revision::DELETED_USER ) {
@@ -374,11 +374,6 @@
return $revision->userCan( $field, $user );
} else {
// Use User::isHidden()
-   if ( !$user ) {
-   // @FIXME Require a user object for 
this function
-   global $wgUser;
-   $user = $wgUser;
-   }
return $user->isAllowedAny( 'viewsuppressed', 
'hideuser' ) || !$agent->isHidden();
}
} elseif ( $revision ) {

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

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

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


[MediaWiki-commits] [Gerrit] Reset adapter account config in test setup - change (mediawiki...DonationInterface)

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

Change subject: Reset adapter account config in test setup
..


Reset adapter account config in test setup

Hadn't been resetting account config for some gateways, leading to
tests using LocalSettings configuration instead of config from
TestConfiguration.php.  Also moves Amazon test config to that file.

Change-Id: I589d17c51acbaaa47dfb34c78c9074a4c1b49d7b
---
M tests/Adapter/Amazon/AmazonTest.php
M tests/TestConfiguration.php
2 files changed, 13 insertions(+), 15 deletions(-)

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



diff --git a/tests/Adapter/Amazon/AmazonTest.php 
b/tests/Adapter/Amazon/AmazonTest.php
index 3e439a0..d60084b 100644
--- a/tests/Adapter/Amazon/AmazonTest.php
+++ b/tests/Adapter/Amazon/AmazonTest.php
@@ -53,16 +53,6 @@
'recurring',
),
),
-   'wgAmazonGatewayAccountInfo' => array( 'test' => array(
-   'SellerID' => 'ABCDEFGHIJKL',
-   'ClientID' => 
'amzn1.application-oa2-client.1a2b3c4d5e',
-   'ClientSecret' => 
'12432g134e3421a41234b1341c324123d',
-   'MWSAccessKey' => 'N0NSENSEXYZ',
-   'MWSSecretKey' => 
'iuasd/2jhaslk2j49lkaALksdJLsJLas+',
-   'Region' => 'us',
-   'WidgetScriptURL' => 
'https://static-na.payments-amazon.com/OffAmazonPayments/us/sandbox/js/Widgets.js',
-   'ReturnURL' => 
"https://example.org/index.php/Special:AmazonGateway?debug=true;,
-   ) ),
) );
}
 
diff --git a/tests/TestConfiguration.php b/tests/TestConfiguration.php
index b35945d..fb7c288 100644
--- a/tests/TestConfiguration.php
+++ b/tests/TestConfiguration.php
@@ -99,7 +99,7 @@
 
 
 /** Paypal **/
-$wgPaypalGatewayAccountInfo = array ( );
+$wgPaypalGatewayAccountInfo = array ();
 $wgPaypalGatewayAccountInfo['testing'] = array (
'AccountEmail' => 'phpunittest...@wikimedia.org',
 );
@@ -108,15 +108,21 @@
 
 /** Amazon **/
 $wgAmazonGatewayReturnURL = 
'https://payments.wikimedia.org/index.php/Special:AmazonGateway';
+$wgAmazonGatewayAccountInfo = array();
 $wgAmazonGatewayAccountInfo['test'] = array (
-   'AccessKey' => 'testkey',
-   'SecretKey' => 'testsecret',
-   'PaymentsAccountID' => 'testaccountid',
-   'IpnOverride' => 'https://test.wikimedia.org/amazon',
+   'SellerID' => 'ABCDEFGHIJKL',
+   'ClientID' => 'amzn1.application-oa2-client.1a2b3c4d5e',
+   'ClientSecret' => '12432g134e3421a41234b1341c324123d',
+   'MWSAccessKey' => 'N0NSENSEXYZ',
+   'MWSSecretKey' => 'iuasd/2jhaslk2j49lkaALksdJLsJLas+',
+   'Region' => 'us',
+   'WidgetScriptURL' => 
'https://static-na.payments-amazon.com/OffAmazonPayments/us/sandbox/js/Widgets.js',
+   'ReturnURL' => 
"https://example.org/index.php/Special:AmazonGateway?debug=true;,
 );
 
 /** Adyen **/
 $wgAdyenGatewayBaseURL = 'https://testorwhatever.adyen.com';
+$wgAdyenGatewayAccountInfo = array();
 $wgAdyenGatewayAccountInfo['test'] = array (
'AccountName' => 'wikitest',
'SharedSecret' => 'long-cat-is-long',
@@ -126,6 +132,7 @@
 /** Astropay **/
 $wgAstropayGatewayURL = 'https://astropay.example.com/';
 $wgAstropayGatewayTestingURL = 'https://sandbox.astropay.example.com/';
+$wgAstropayGatewayAccountInfo = array();
 $wgAstropayGatewayAccountInfo['test'] = array (
'Create' => array(
'Login' => 'createlogin',
@@ -138,6 +145,7 @@
'SecretKey' => 'NanananananananananananananananaBatman',
 );
 
+$wgWorldpayGatewayAccountInfo = array();
 /** Worldpay **/
 $wgWorldpayGatewayAccountInfo['test'] = array (
'Username' => 'testname',

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

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

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


[MediaWiki-commits] [Gerrit] Run nsp check when testing - change (mediawiki...parsoid)

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

Change subject: Run nsp check when testing
..


Run nsp check when testing

 * nodesecurity/nsp helps you keep your node applications secure.

 * Removes the handlebars optional deps on uglify-js since those have a
   vulnerability and aren't being used.

 * Upgrade mocha to eliminate a vulnerability in one of its deps' deps.

Change-Id: I669b66457d55803c972f126bd98717616835173f
---
M npm-shrinkwrap.json
M package.json
2 files changed, 631 insertions(+), 60 deletions(-)

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



diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json
index 5802302..e27c96c 100644
--- a/npm-shrinkwrap.json
+++ b/npm-shrinkwrap.json
@@ -838,30 +838,6 @@
   "resolved": 
"https://registry.npmjs.org/amdefine/-/amdefine-1.0.0.tgz;
 }
   }
-},
-"uglify-js": {
-  "version": "2.3.6",
-  "from": 
"https://registry.npmjs.org/uglify-js/-/uglify-js-2.3.6.tgz;,
-  "resolved": 
"https://registry.npmjs.org/uglify-js/-/uglify-js-2.3.6.tgz;,
-  "dependencies": {
-"async": {
-  "version": "0.2.10",
-  "from": 
"https://registry.npmjs.org/async/-/async-0.2.10.tgz;,
-  "resolved": 
"https://registry.npmjs.org/async/-/async-0.2.10.tgz;
-},
-"optimist": {
-  "version": "0.3.7",
-  "from": 
"https://registry.npmjs.org/optimist/-/optimist-0.3.7.tgz;,
-  "resolved": 
"https://registry.npmjs.org/optimist/-/optimist-0.3.7.tgz;,
-  "dependencies": {
-"wordwrap": {
-  "version": "0.0.3",
-  "from": 
"https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz;,
-  "resolved": 
"https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz;
-}
-  }
-}
-  }
 }
   }
 },
@@ -1063,23 +1039,6 @@
   "version": "0.1.1",
   "from": 
"https://registry.npmjs.org/amdefine/-/amdefine-0.1.1.tgz;,
   "resolved": 
"https://registry.npmjs.org/amdefine/-/amdefine-0.1.1.tgz;
-}
-  }
-},
-"uglify-js": {
-  "version": "2.3.6",
-  "from": 
"https://registry.npmjs.org/uglify-js/-/uglify-js-2.3.6.tgz;,
-  "resolved": 
"https://registry.npmjs.org/uglify-js/-/uglify-js-2.3.6.tgz;,
-  "dependencies": {
-"async": {
-  "version": "0.2.10",
-  "from": 
"https://registry.npmjs.org/async/-/async-0.2.10.tgz;,
-  "resolved": 
"https://registry.npmjs.org/async/-/async-0.2.10.tgz;
-},
-"optimist": {
-  "version": "0.3.7",
-  "from": 
"https://registry.npmjs.org/optimist/-/optimist-0.3.7.tgz;,
-  "resolved": 
"https://registry.npmjs.org/optimist/-/optimist-0.3.7.tgz;
 }
   }
 }
@@ -2606,9 +2565,9 @@
   }
 },
 "mocha": {
-  "version": "2.2.5",
-  "from": "https://registry.npmjs.org/mocha/-/mocha-2.2.5.tgz;,
-  "resolved": "https://registry.npmjs.org/mocha/-/mocha-2.2.5.tgz;,
+  "version": "2.3.4",
+  "from": "https://registry.npmjs.org/mocha/-/mocha-2.3.4.tgz;,
+  "resolved": "https://registry.npmjs.org/mocha/-/mocha-2.3.4.tgz;,
   "dependencies": {
 "commander": {
   "version": "2.3.0",
@@ -2616,14 +2575,14 @@
   "resolved": 
"https://registry.npmjs.org/commander/-/commander-2.3.0.tgz;
 },
 "debug": {
-  "version": "2.0.0",
-  "from": "https://registry.npmjs.org/debug/-/debug-2.0.0.tgz;,
-  "resolved": "https://registry.npmjs.org/debug/-/debug-2.0.0.tgz;,
+  "version": "2.2.0",
+  "from": "https://registry.npmjs.org/debug/-/debug-2.2.0.tgz;,
+  "resolved": "https://registry.npmjs.org/debug/-/debug-2.2.0.tgz;,
   "dependencies": {
 "ms": {
-  "version": "0.6.2",
-  "from": "https://registry.npmjs.org/ms/-/ms-0.6.2.tgz;,
-  "resolved": "https://registry.npmjs.org/ms/-/ms-0.6.2.tgz;
+  "version": "0.7.1",
+  "from": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz;,
+  "resolved": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz;
 }
   }
 },
@@ -2648,9 +2607,9 @@
   "resolved": 
"https://registry.npmjs.org/minimatch/-/minimatch-0.2.14.tgz;,
   "dependencies": {
 "lru-cache": {
-  "version": "2.6.5",
-  "from": 

[MediaWiki-commits] [Gerrit] Removed support for unnamed params for #forminput - change (mediawiki...SemanticForms)

2015-11-23 Thread Yaron Koren (Code Review)
Yaron Koren has uploaded a new change for review.

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

Change subject: Removed support for unnamed params for #forminput
..

Removed support for unnamed params for #forminput

Also made some general improvements to the code.

Change-Id: Ia1f99f66527ae916a41c31a090796704ed10c801
---
M includes/SF_ParserFunctions.php
1 file changed, 44 insertions(+), 65 deletions(-)


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

diff --git a/includes/SF_ParserFunctions.php b/includes/SF_ParserFunctions.php
index 57f8773..60edde6 100644
--- a/includes/SF_ParserFunctions.php
+++ b/includes/SF_ParserFunctions.php
@@ -236,42 +236,40 @@
 
$params = func_get_args();
array_shift( $params ); // don't need the parser
-   // set defaults
+
+   // Set defaults.
$inFormName = $inValue = $inButtonStr = $inQueryStr = '';
$inQueryArr = array();
-   $positionalParameters = false;
$inAutocompletionSource = '';
$inRemoteAutocompletion = false;
$inSize = 25;
$classStr = "sfFormInput";
$inPlaceholder = "";
$inAutofocus = true; // Only evaluated if $wgHtml5 is true.
-   // assign params - support unlabelled params, for backwards 
compatibility
+
+   // Assign params.
foreach ( $params as $i => $param ) {
$elements = explode( '=', $param, 2 );
 
-   // set param_name and value
-   if ( count( $elements ) > 1 && !$positionalParameters ) 
{
-   $param_name = trim( $elements[0] );
-
-   // parse (and sanitize) parameter values
+   // Set param name and value.
+   if ( count( $elements ) > 1 ) {
+   $paramName = trim( $elements[0] );
+   // Parse (and sanitize) parameter values.
$value = trim( $parser->recursiveTagParse( 
$elements[1] ) );
} else {
-   $param_name = null;
-
-   // parse (and sanitize) parameter values
-   $value = trim( $parser->recursiveTagParse( 
$param ) );
+   $paramName = trim( $param );
+   $value = null;
}
 
-   if ( $param_name == 'form' )
+   if ( $paramName == 'form' ) {
$inFormName = $value;
-   elseif ( $param_name == 'size' )
+   } elseif ( $paramName == 'size' ) {
$inSize = $value;
-   elseif ( $param_name == 'default value' )
+   } elseif ( $paramName == 'default value' ) {
$inValue = $value;
-   elseif ( $param_name == 'button text' )
+   } elseif ( $paramName == 'button text' ) {
$inButtonStr = $value;
-   elseif ( $param_name == 'query string' ) {
+   } elseif ( $paramName == 'query string' ) {
// Change HTML-encoded ampersands directly to
// URL-encoded ampersands, so that the string
// doesn't get split up on the '&'.
@@ -281,43 +279,24 @@
 
parse_str($inQueryStr, $arr);
$inQueryArr = 
SFUtils::array_merge_recursive_distinct( $inQueryArr, $arr );
-   } elseif ( $param_name == 'autocomplete on category' ) {
+   } elseif ( $paramName == 'autocomplete on category' ) {
$inAutocompletionSource = $value;
-   $autocompletion_type = 'category';
-   } elseif ( $param_name == 'autocomplete on namespace' ) 
{
+   $autocompletionType = 'category';
+   } elseif ( $paramName == 'autocomplete on namespace' ) {
$inAutocompletionSource = $value;
-   $autocompletion_type = 'namespace';
-   } elseif ( $param_name == 'remote autocompletion' ) {
+   $autocompletionType = 'namespace';
+   } elseif ( $paramName == 'remote autocompletion' ) {
$inRemoteAutocompletion = true;
-   } elseif ( $param_name == 'placeholder' ) {
+   } elseif ( $paramName == 'placeholder' ) {
 

[MediaWiki-commits] [Gerrit] WIP: publishing for visibility, don't merge this - change (mediawiki...DonationInterface)

2015-11-23 Thread Cdentinger (Code Review)
Cdentinger has uploaded a new change for review.

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

Change subject: WIP: publishing for visibility, don't merge this
..

WIP: publishing for visibility, don't merge this

only one test fails with this patch instead of a bunch but i have to
investiage further. php bails when array_key_exists gets a "needle" that
is false (null is fine), because php, and that cascades in weird ways
here.

as far as the remaining test failure we'll see if it happens on jenkins
or not.  was related to server IP in wgRequest

Change-Id: I20b2461d22185cc1950b6844d7be9fcb526c15e1
---
M gateway_common/DonationData.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/gateway_common/DonationData.php b/gateway_common/DonationData.php
index dcae0fa..075f3a8 100644
--- a/gateway_common/DonationData.php
+++ b/gateway_common/DonationData.php
@@ -469,7 +469,7 @@
$currency = strtoupper( $currency );
}
// If it's blank or not a currency code, guess it from the 
country.
-   if ( !array_key_exists( $currency, 
CurrencyRates::getCurrencyRates() ) ) {
+   if ( $currency && !array_key_exists( $currency, 
CurrencyRates::getCurrencyRates() ) ) {
//TODO: This is going to fail miserably if there's no 
country yet.
$currency = NationalCurrencies::getNationalCurrency( 
$this->getVal( 'country' ) );
$this->logger->debug( "Got currency from 'country', 
now: $currency" );

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

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

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


[MediaWiki-commits] [Gerrit] sudo journalctl: make missing restrictions obvious - change (operations/puppet)

2015-11-23 Thread Dzahn (Code Review)
Dzahn has submitted this change and it was merged.

Change subject: sudo journalctl: make missing restrictions obvious
..


sudo journalctl: make missing restrictions obvious

sudoers command argument wildcard '*' does not restrict anthing. journalctl
allows multiple -u arguments, thus this does not restrict invoking journalctl
on one unit.

Bug: T115067
Change-Id: I941fd1f797c3b57fb97fdfbf1c9cd27ece0e9daa
---
M modules/admin/data/data.yaml
1 file changed, 2 insertions(+), 3 deletions(-)

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



diff --git a/modules/admin/data/data.yaml b/modules/admin/data/data.yaml
index 80c28cd..428d59a 100644
--- a/modules/admin/data/data.yaml
+++ b/modules/admin/data/data.yaml
@@ -359,7 +359,7 @@
  'ALL = NOPASSWD: /bin/systemctl mask kartotherian.service',
  'ALL = NOPASSWD: /bin/systemctl unmask kartotherian.service',
  'ALL = (kartotherian) NOPASSWD: ALL',
- 'ALL = NOPASSWD: /bin/journalctl -u kartotherian *']
+ 'ALL = NOPASSWD: /bin/journalctl *']
   wdqs-admins:
 gid: 755
 description: Admins for the WikiData Query Service project
@@ -383,12 +383,11 @@
  'ALL = NOPASSWD: /bin/systemctl mask tilerator.service',
  'ALL = NOPASSWD: /bin/systemctl unmask tilerator.service',
  'ALL = (tilerator) NOPASSWD: ALL',
- 'ALL = NOPASSWD: /bin/journalctl -u tilerator *',
  'ALL = NOPASSWD: /usr/sbin/service tileratorui *',
  'ALL = NOPASSWD: /bin/systemctl mask tileratorui.service',
  'ALL = NOPASSWD: /bin/systemctl unmask tileratorui.service',
  'ALL = (tileratorui) NOPASSWD: ALL',
- 'ALL = NOPASSWD: /bin/journalctl -u tileratorui *']
+ 'ALL = NOPASSWD: /bin/journalctl *']
   mobileapps-admin:
 description: Group of mobileapps admins
 gid: 759

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I941fd1f797c3b57fb97fdfbf1c9cd27ece0e9daa
Gerrit-PatchSet: 7
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: JanZerebecki 
Gerrit-Reviewer: Alexandros Kosiaris 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Enable data access for wikinews, meta-wiki, mediawiki.org an... - change (operations/mediawiki-config)

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

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

Change subject: Enable data access for wikinews, meta-wiki, mediawiki.org and 
wikispecies
..

Enable data access for wikinews, meta-wiki, mediawiki.org and wikispecies

this is tentatively scheduled for December 2, if such deployment
is allowed for that time.

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


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 91a7b03..201b39e 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -15110,10 +15110,6 @@
 
 'wmgWikibaseEnableData' => array(
'default' => true,
-   'wikinews' => false,
-   'mediawikiwiki' => false,
-   'metawiki' => false,
-   'specieswiki' => false
 ),
 
 'wmgWikibaseEnableArbitraryAccess' => array(

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

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

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


[MediaWiki-commits] [Gerrit] WIP use SHA-256 HMAC for Adyen - change (mediawiki...DonationInterface)

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

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

Change subject: WIP use SHA-256 HMAC for Adyen
..

WIP use SHA-256 HMAC for Adyen

SHA-1 is broken and deprecated, and can't be used with new accounts.
Request signature docs:
https://docs.adyen.com/pages/viewpage.action?pageId=5376964
Response signature docs:
https://docs.adyen.com/display/TD/HPP+payment+response

Bug: T116679
Change-Id: I2fd32ea915c6c3f7502c128973d8fb3df85b5ff7
---
M adyen_gateway/adyen.adapter.php
1 file changed, 37 insertions(+), 75 deletions(-)


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

diff --git a/adyen_gateway/adyen.adapter.php b/adyen_gateway/adyen.adapter.php
index d85e182..ffe3def 100644
--- a/adyen_gateway/adyen.adapter.php
+++ b/adyen_gateway/adyen.adapter.php
@@ -64,7 +64,6 @@
'street',
'zip',
'risk_score',
-   'billing_signature',
'hpp_signature',
);
}
@@ -78,7 +77,6 @@
'billingAddress.city' => 'city',
'billingAddress.country' => 'country',
'billingAddress.postalCode' => 'zip',
-   'billingAddressSig' => 'billing_signature',
'billingAddress.stateOrProvince' => 'state',
'billingAddress.street' => 'street',
'billingAddressType' => 'billing_address_type',
@@ -109,7 +107,9 @@
'authResult' => 'result',
'merchantReference' => 'order_id',
'merchantReturnData' => 'return_data',
+   'paymentMethod' => 'payment_method',
'pspReference' => 'gateway_txn_id',
+   'shopperLocale' => 'language',
'skinCode' => 'skin_code',
);
}
@@ -145,7 +145,6 @@
'billingAddress.postalCode',
'billingAddress.stateOrProvince',
'billingAddress.country',
-   'billingAddressSig',
'billingAddressType',
'currencyCode',
'merchantAccount',
@@ -563,88 +562,51 @@
}
 
protected function stage_hpp_signature() {
-   $keys = array(
-   'amount',
-   'currency_code',
-   'expiration',
-   'order_id',
-   'skin_code',
-   'merchant_account',
-   'session_expiration',
-   'email',
-   'customer_id',
-   'recurring_type',
-   'allowed_methods',
-   'blocked_methods',
-   'statement_template',
-   'return_data',
-   'billing_address_type',
-   'delivery_address_type',
-   'risk_score',
-   );
-   $sig_values = $this->getStagedValues( $this->getGatewayKeys( 
$keys ) );
-   $this->staged_data['hpp_signature'] = 
$this->calculateSignature( $sig_values );
+   $this->staged_data['hpp_signature'] = 
$this->calculateSignature( $this->buildRequestParams() );
}
 
-   protected function stage_billing_signature() {
-   $keys = array(
-   'street',
-   'city',
-   'zip',
-   'state',
-   'country',
-   );
-   $sig_values = $this->getStagedValues( $this->getGatewayKeys( 
$keys ) );
-   $this->staged_data['billing_signature'] = 
$this->calculateSignature( $sig_values );
+   /**
+* Overriding @see GatewayAdapter::getTransactionSpecificValue to strip
+* newlines.
+* @param string $gateway_field_name
+* @param boolean $token
+* @return mixed
+*/
+   protected function getTransactionSpecificValue( $gateway_field_name, 
$token = false ) {
+   $value = parent::getTransactionSpecificValue( 
$gateway_field_name, $token );
+   return str_replace( '\n', '', $value );
}
 
-   // TODO: make the signature code more reusable.  Generalize the idea of
-   // mapping keys and fetching matching values.
-   protected function getGatewayKeys( $keys ) {
-   $staged = array();
-   $staging_map = array_flip( $this->var_map );
-   foreach ( $keys as $normal_form_key ) {
-   $staged[] = $staging_map[ $normal_form_key ];
+   

[MediaWiki-commits] [Gerrit] Make redisdb role conform to autolayout - change (operations/puppet)

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

Change subject: Make redisdb role conform to autolayout
..


Make redisdb role conform to autolayout

Change-Id: I24b196d2a1e4ff0566ae7bfae5e9fa8a2546a6b9
---
D hieradata/role/codfw/db/redis.yaml
A hieradata/role/codfw/redisdb.yaml
D hieradata/role/common/db/redis.yaml
A hieradata/role/common/redisdb.yaml
R hieradata/role/eqiad/redisdb.yaml
M manifests/role/redisdb.pp
M manifests/site.pp
7 files changed, 17 insertions(+), 17 deletions(-)

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



diff --git a/hieradata/role/codfw/db/redis.yaml 
b/hieradata/role/codfw/db/redis.yaml
deleted file mode 100644
index 72c3e20..000
--- a/hieradata/role/codfw/db/redis.yaml
+++ /dev/null
@@ -1,8 +0,0 @@
-role::db::redis::redis_replication:
-  rdb2003: rdb2001
-  rdb2004: rdb2002
-role::db::redis::dir: "/srv/redis"
-debdeploy::grains:
-  debdeploy-redis-codfw:
-value: standard
-
diff --git a/hieradata/role/codfw/redisdb.yaml 
b/hieradata/role/codfw/redisdb.yaml
new file mode 100644
index 000..56c5bbb
--- /dev/null
+++ b/hieradata/role/codfw/redisdb.yaml
@@ -0,0 +1,8 @@
+role::redisdb::redis_replication:
+  rdb2003: rdb2001
+  rdb2004: rdb2002
+role::redisdb::dir: "/srv/redis"
+debdeploy::grains:
+  debdeploy-redis-codfw:
+value: standard
+
diff --git a/hieradata/role/common/db/redis.yaml 
b/hieradata/role/common/db/redis.yaml
deleted file mode 100644
index 4e6f695..000
--- a/hieradata/role/common/db/redis.yaml
+++ /dev/null
@@ -1,6 +0,0 @@
-cluster: redis
-role::db::redis::redis_replication:
-  rdb1002: rdb1001
-  rdb1004: rdb1003
-  rdb1008: rdb1007
-role::db::redis::dir: "/a/redis"
diff --git a/hieradata/role/common/redisdb.yaml 
b/hieradata/role/common/redisdb.yaml
new file mode 100644
index 000..cc32c78
--- /dev/null
+++ b/hieradata/role/common/redisdb.yaml
@@ -0,0 +1,6 @@
+cluster: redis
+role::redisdb::redis_replication:
+  rdb1002: rdb1001
+  rdb1004: rdb1003
+  rdb1008: rdb1007
+role::redisdb::dir: "/a/redis"
diff --git a/hieradata/role/eqiad/db/redis.yaml 
b/hieradata/role/eqiad/redisdb.yaml
similarity index 100%
rename from hieradata/role/eqiad/db/redis.yaml
rename to hieradata/role/eqiad/redisdb.yaml
diff --git a/manifests/role/redisdb.pp b/manifests/role/redisdb.pp
index 60dd86e..6089270 100644
--- a/manifests/role/redisdb.pp
+++ b/manifests/role/redisdb.pp
@@ -10,7 +10,7 @@
 description => 'codfw Redis',
 }
 
-class role::db::redis (
+class role::redisdb (
 $maxmemory = inline_template('<%= (Float(@memorysize.split[0]) * 
0.82).round %>Gb'),
 $redis_replication = undef,
 $dir   = '/srv/redis'
diff --git a/manifests/site.pp b/manifests/site.pp
index 54b0ca1..ca17275 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -2172,11 +2172,11 @@
 }
 
 node /^rdb100[0-9]\.eqiad\.wmnet/ {
-role db::redis
+role redisdb
 }
 
 node /^rdb200[1-4]\.codfw\.wmnet/ {
-role db::redis
+role redisdb
 }
 
 # restbase eqiad cluster

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I24b196d2a1e4ff0566ae7bfae5e9fa8a2546a6b9
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Yuvipanda 
Gerrit-Reviewer: Yuvipanda 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] labs: Move labmon role to labs::graphite role - change (operations/puppet)

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

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

Change subject: labs: Move labmon role to labs::graphite role
..

labs: Move labmon role to labs::graphite role

And some small misc cleanup and consolidation

Change-Id: Ida0ee5059350853684abd859bd0fcf2a051947ba
---
R hieradata/role/common/labs/graphite.pp
M manifests/role/graphite.pp
D manifests/role/labmon.pp
M manifests/site.pp
A modules/role/manifests/labs/graphite.pp
5 files changed, 24 insertions(+), 32 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/67/255067/1

diff --git a/hieradata/role/common/labmon.yaml 
b/hieradata/role/common/labs/graphite.pp
similarity index 100%
rename from hieradata/role/common/labmon.yaml
rename to hieradata/role/common/labs/graphite.pp
diff --git a/manifests/role/graphite.pp b/manifests/role/graphite.pp
index ada0f35..665cbf9 100644
--- a/manifests/role/graphite.pp
+++ b/manifests/role/graphite.pp
@@ -316,17 +316,3 @@
 }
 
 }
-
-# == Class: role::graphite::labmon
-#
-# Sets up graphite instance for monitoring labs, running on production 
hardware.
-# Instance is open to all, no password required to see metrics
-class role::graphite::labmon {
-class { 'role::graphite::base':
-storage_dir => '/srv/carbon',
-auth=> false,
-hostname=> 'graphite.wmflabs.org',
-}
-
-include graphite::labs::archiver
-}
diff --git a/manifests/role/labmon.pp b/manifests/role/labmon.pp
deleted file mode 100644
index 1b38836..000
--- a/manifests/role/labmon.pp
+++ /dev/null
@@ -1,17 +0,0 @@
-# = Class: labmon
-# Role for misc. setup of labs monitoring
-
-class role::labmon {
-
-class { 'role::graphite::labmon': }
-
-file { '/var/lib/carbon':
-ensure  => link,
-target  => '/srv/carbon',
-owner   => '_graphite',
-group   => '_graphite',
-require => Class['role::graphite::labmon']
-}
-
-include role::statsite
-}
diff --git a/manifests/site.pp b/manifests/site.pp
index ca17275..c3f2b34 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -1195,7 +1195,7 @@
 
 # Labs Graphite and StatsD host
 node 'labmon1001.eqiad.wmnet' {
-role labmon
+role labs::graphite
 include standard
 }
 
diff --git a/modules/role/manifests/labs/graphite.pp 
b/modules/role/manifests/labs/graphite.pp
new file mode 100644
index 000..2bf3ce1
--- /dev/null
+++ b/modules/role/manifests/labs/graphite.pp
@@ -0,0 +1,23 @@
+# = Class: role::labs::graphite
+# Sets up graphite instance for monitoring labs, running on production 
hardware.
+# Instance is open to all, no password required to see metrics
+class role::labs::graphite {
+
+class { 'role::graphite::base':
+storage_dir => '/srv/carbon',
+auth=> false,
+hostname=> 'graphite.wmflabs.org',
+}
+
+include graphite::labs::archiver
+
+file { '/var/lib/carbon':
+ensure  => link,
+target  => '/srv/carbon',
+owner   => '_graphite',
+group   => '_graphite',
+require => Class['role::graphite::base']
+}
+
+include role::statsite
+}

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

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

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


[MediaWiki-commits] [Gerrit] Fix undefined var - change (wikimedia...SmashPig)

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

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

Change subject: Fix undefined var
..

Fix undefined var

*sigh*

Change-Id: I6449092c564cb9a438fba873e9c70ba9a421ed02
---
M Core/Logging/LogEvent.php
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/SmashPig 
refs/changes/62/255062/1

diff --git a/Core/Logging/LogEvent.php b/Core/Logging/LogEvent.php
index 49e7019..34454d2 100644
--- a/Core/Logging/LogEvent.php
+++ b/Core/Logging/LogEvent.php
@@ -49,6 +49,7 @@
$this->exception = $exception;
 
if ( !is_null( $data ) ) {
+   $jdata = false;
if ( $data instanceof JsonSerializableObject ) {
try {
$jdata = $data->toJson();

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

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

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


[MediaWiki-commits] [Gerrit] Move debdeploy role into autolayout compatible names - change (operations/puppet)

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

Change subject: Move debdeploy role into autolayout compatible names
..


Move debdeploy role into autolayout compatible names

Change-Id: I1e2c86b96cc0789f6b11438a4bcebbf46e3166ee
---
M manifests/role/debdeploy.pp
M manifests/site.pp
2 files changed, 7 insertions(+), 5 deletions(-)

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



diff --git a/manifests/role/debdeploy.pp b/manifests/role/debdeploy.pp
index 303f046..cbcdcc4 100644
--- a/manifests/role/debdeploy.pp
+++ b/manifests/role/debdeploy.pp
@@ -1,7 +1,9 @@
-class role::debdeploymaster {
+class role::debdeploy::master {
 include standard
 
-system::role { 'role::debdeploymaster': description => 'debdeploy master' }
+system::role { 'role::debdeploymaster':
+description => 'debdeploy master',
+}
 
-include debdeploy::master
+include ::debdeploy::master
 }
diff --git a/manifests/site.pp b/manifests/site.pp
index a0f3074..54b0ca1 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -2015,7 +2015,7 @@
 
 # secondary salt master
 node 'neodymium.eqiad.wmnet' {
-#role salt::masters::production, deployment::salt_masters, debdeploymaster
+#role salt::masters::production, deployment::salt_masters, 
debdeploy::master
 role salt::masters::production
 include standard
 }
@@ -2092,7 +2092,7 @@
 
 # primary puppet master
 node 'palladium.eqiad.wmnet' {
-role ipmi, salt::masters::production, deployment::salt_masters, 
access_new_install, puppetmaster::frontend, pybal_config, debdeploymaster
+role ipmi, salt::masters::production, deployment::salt_masters, 
access_new_install, puppetmaster::frontend, pybal_config, debdeploy::master
 include standard
 include role::conftool::master
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1e2c86b96cc0789f6b11438a4bcebbf46e3166ee
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Yuvipanda 
Gerrit-Reviewer: Yuvipanda 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] extdist: Make role name autolayout compatible - change (operations/puppet)

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

Change subject: extdist: Make role name autolayout compatible
..


extdist: Make role name autolayout compatible

Change-Id: I2f730d1c1b748bd8a653dd2a48a8091ccec72839
---
M manifests/role/extdist.pp
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/manifests/role/extdist.pp b/manifests/role/extdist.pp
index a73f0b8..eda9066 100644
--- a/manifests/role/extdist.pp
+++ b/manifests/role/extdist.pp
@@ -3,7 +3,7 @@
 # This class sets up a tarball generator for the Extension Distributor
 # extension enabled on mediawiki.org.
 #
-class role::labs::extdist {
+class role::extdist {
 
 include role::labs::lvm::srv
 

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

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

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


[MediaWiki-commits] [Gerrit] Move labs::dns role's hiera file to proper location - change (operations/puppet)

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

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

Change subject: Move labs::dns role's hiera file to proper location
..

Move labs::dns role's hiera file to proper location

Change-Id: Ifd003527c50cb59f469e16f8746b373ac4edd7b0
---
R hieradata/role/common/labs/dns.yaml
1 file changed, 0 insertions(+), 0 deletions(-)


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

diff --git a/hieradata/role/common/labsdns.yaml 
b/hieradata/role/common/labs/dns.yaml
similarity index 100%
rename from hieradata/role/common/labsdns.yaml
rename to hieradata/role/common/labs/dns.yaml

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

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

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


[MediaWiki-commits] [Gerrit] Catch exceptions in LogEvent constructor - change (wikimedia...SmashPig)

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

Change subject: Catch exceptions in LogEvent constructor
..


Catch exceptions in LogEvent constructor

In the real world, logging is a very dangerous occupation.  In
programming, it should be safe as houses.

FIXME: relegate custom logging framework to slag heap

Change-Id: Id3fd469f9e4459599f58446bcf84d3f1e73292c7
---
M Core/Logging/LogEvent.php
1 file changed, 5 insertions(+), 1 deletion(-)

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



diff --git a/Core/Logging/LogEvent.php b/Core/Logging/LogEvent.php
index f8c3047..49e7019 100644
--- a/Core/Logging/LogEvent.php
+++ b/Core/Logging/LogEvent.php
@@ -1,5 +1,6 @@
 toJson();
+   try {
+   $jdata = $data->toJson();
+   }
+   catch( DataSerializationException $ex ) {}
} else {
$jdata = json_encode( $data );
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id3fd469f9e4459599f58446bcf84d3f1e73292c7
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/SmashPig
Gerrit-Branch: master
Gerrit-Owner: Ejegg 
Gerrit-Reviewer: AndyRussG 
Gerrit-Reviewer: Awight 
Gerrit-Reviewer: Cdentinger 
Gerrit-Reviewer: Eileen 
Gerrit-Reviewer: Ejegg 
Gerrit-Reviewer: Katie Horn 
Gerrit-Reviewer: Pcoombe 
Gerrit-Reviewer: XenoRyet 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] EventPresentationModel: Cache the result of getBundledEvents() - change (mediawiki...Echo)

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

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

Change subject: EventPresentationModel: Cache the result of getBundledEvents()
..

EventPresentationModel: Cache the result of getBundledEvents()

Change-Id: I83ce3b7754055dd494fcde41f043144294da2f3f
---
M includes/formatters/EventPresentationModel.php
1 file changed, 5 insertions(+), 2 deletions(-)


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

diff --git a/includes/formatters/EventPresentationModel.php 
b/includes/formatters/EventPresentationModel.php
index a7a4110..7cb523e 100644
--- a/includes/formatters/EventPresentationModel.php
+++ b/includes/formatters/EventPresentationModel.php
@@ -88,17 +88,20 @@
if ( !$this->event->getBundleHash() ) {
return array();
}
+   if ( isset( $this->bundledEvents ) ) {
+   return $this->bundledEvents;
+   }
 
// FIXME: We really shouldn't be making db queries like this
// in the presentation model
$eventMapper = new EchoEventMapper();
-   $events = $eventMapper->fetchByUserBundleHash(
+   $this->bundledEvents = $eventMapper->fetchByUserBundleHash(
$this->user,
$this->event->getBundleHash()
// default params: web, DESC, limit=250
);
 
-   return $events;
+   return $this->bundledEvents;
}
 
/**

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I83ce3b7754055dd494fcde41f043144294da2f3f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: Catrope 

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


[MediaWiki-commits] [Gerrit] CRM-17454 fix slow dedupe query - change (wikimedia...civicrm)

2015-11-23 Thread Eileen (Code Review)
Eileen has uploaded a new change for review.

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

Change subject: CRM-17454 fix slow dedupe query
..

CRM-17454 fix slow dedupe query

See https://github.com/civicrm/civicrm-core/pull/7282/ for the unit test for 
this
Note I have submitted against 4.6 & 4.7 upstream but not sure about whether it 
will go
into 4.6 upstream - my comments are on 
https://github.com/civicrm/civicrm-core/pull/7283
and more discussion on https://issues.civicrm.org/jira/browse/CRM-17454

Bug: T116886
Change-Id: Ifc2de89521ab60b7b424fe04ee39e6c322106cb9
---
M CRM/Dedupe/Merger.php
1 file changed, 44 insertions(+), 23 deletions(-)


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

diff --git a/CRM/Dedupe/Merger.php b/CRM/Dedupe/Merger.php
index 4ae5018..3310878 100644
--- a/CRM/Dedupe/Merger.php
+++ b/CRM/Dedupe/Merger.php
@@ -195,33 +195,34 @@
   }
 
   /**
-   * Return tables and their fields referencing civicrm_contact.contact_id 
explicitly
+   * Get array tables and fields that reference civicrm_contact.id.
+   *
+   * This includes core tables, custom group tables, tables added by the merge
+   * hook and (somewhat randomly) the entity_tag table.
+   *
+   * Refer to CRM-17454 for information on the danger of querying the 
information
+   * schema to derive this.
+   *
+   * @todo create an 'entity hook' to allow entities to be registered to 
CiviCRM
+   * including all info that is normally in the DAO.
*/
   public static function cidRefs() {
-static $cidRefs;
-if (!$cidRefs) {
-  $sql = "
-SELECT
-table_name,
-column_name
-FROM information_schema.key_column_usage
-WHERE
-referenced_table_schema = database() AND
-referenced_table_name = 'civicrm_contact' AND
-referenced_column_name = 'id';
-  ";
-  $dao = CRM_Core_DAO::executeQuery($sql);
-  while ($dao->fetch()) {
-$cidRefs[$dao->table_name][] = $dao->column_name;
+$cidRefs = array();
+$coreReferences = CRM_Core_DAO::getReferencesToTable('civicrm_contact');
+foreach ($coreReferences as $coreReference) {
+  if (!is_a($coreReference, 'CRM_Core_Reference_Dynamic')) {
+$cidRefs[$coreReference->getReferenceTable()][] = 
$coreReference->getReferenceKey();
   }
-
-  // FixME for time being adding below line statically as no Foreign key 
constraint defined for table 'civicrm_entity_tag'
-  $cidRefs['civicrm_entity_tag'][] = 'entity_id';
-  $dao->free();
-
-  // Allow hook_civicrm_merge() to adjust $cidRefs
-  CRM_Utils_Hook::merge('cidRefs', $cidRefs);
 }
+self::addCustomTablesExtendingContactsToCidRefs($cidRefs);
+
+// FixME for time being adding below line statically as no Foreign key 
constraint defined for table 'civicrm_entity_tag'
+$cidRefs['civicrm_entity_tag'][] = 'entity_id';
+
+// Allow hook_civicrm_merge() to adjust $cidRefs.
+// @todo consider adding a way to register entities and have them
+// automatically added to this list.
+CRM_Utils_Hook::merge('cidRefs', $cidRefs);
 return $cidRefs;
   }
 
@@ -1663,4 +1664,24 @@
 }
   }
 
+  /**
+   * Add custom tables that extend contacts to the list of contact references.
+   *
+   * CRM_Core_BAO_CustomGroup::getAllCustomGroupsByBaseEntity seems like a 
safe-ish
+   * function to be sure all are retrieved & we don't miss subtypes or 
inactive or multiples
+   * - the down side is it is not cached.
+   *
+   * Further changes should be include tests in the CRM_Core_MergerTest class
+   * to ensure that disabled, subtype, multiple etc groups are still captured.
+   *
+   * @param array $cidRefs
+   */
+  public static function addCustomTablesExtendingContactsToCidRefs(&$cidRefs) {
+$customValueTables = 
CRM_Core_BAO_CustomGroup::getAllCustomGroupsByBaseEntity('Contact');
+$customValueTables->find();
+while ($customValueTables->fetch()) {
+  $cidRefs[$customValueTables->table_name] = array('entity_id');
+}
+  }
+
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifc2de89521ab60b7b424fe04ee39e6c322106cb9
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm/civicrm
Gerrit-Branch: master
Gerrit-Owner: Eileen 

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


[MediaWiki-commits] [Gerrit] Rename phragile role and mark it as labs-only - change (operations/puppet)

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

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

Change subject: Rename phragile role and mark it as labs-only
..

Rename phragile role and mark it as labs-only

Change-Id: I5f9dd8e00900d05791d72de96f8e21c85eec19ca
---
D manifests/role/labsphragile.pp
A manifests/role/phragile.pp
2 files changed, 6 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/66/255066/1

diff --git a/manifests/role/labsphragile.pp b/manifests/role/labsphragile.pp
deleted file mode 100644
index 7e49a09..000
--- a/manifests/role/labsphragile.pp
+++ /dev/null
@@ -1,3 +0,0 @@
-class role::labsphragile {
-include ::phragile
-}
diff --git a/manifests/role/phragile.pp b/manifests/role/phragile.pp
new file mode 100644
index 000..bb240be
--- /dev/null
+++ b/manifests/role/phragile.pp
@@ -0,0 +1,6 @@
+class role::phragile {
+# Only on labs!
+requires_realm('labs')
+
+include ::phragile
+}

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

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

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


[MediaWiki-commits] [Gerrit] Rename phragile role and mark it as labs-only - change (operations/puppet)

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

Change subject: Rename phragile role and mark it as labs-only
..


Rename phragile role and mark it as labs-only

Change-Id: I5f9dd8e00900d05791d72de96f8e21c85eec19ca
---
D manifests/role/labsphragile.pp
A manifests/role/phragile.pp
2 files changed, 6 insertions(+), 3 deletions(-)

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



diff --git a/manifests/role/labsphragile.pp b/manifests/role/labsphragile.pp
deleted file mode 100644
index 7e49a09..000
--- a/manifests/role/labsphragile.pp
+++ /dev/null
@@ -1,3 +0,0 @@
-class role::labsphragile {
-include ::phragile
-}
diff --git a/manifests/role/phragile.pp b/manifests/role/phragile.pp
new file mode 100644
index 000..bb240be
--- /dev/null
+++ b/manifests/role/phragile.pp
@@ -0,0 +1,6 @@
+class role::phragile {
+# Only on labs!
+requires_realm('labs')
+
+include ::phragile
+}

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

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

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


[MediaWiki-commits] [Gerrit] CX: Fix article-recommender campaign - change (operations/mediawiki-config)

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

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

Change subject: CX: Fix article-recommender campaign
..

CX: Fix article-recommender campaign

* Fix article-recommender-1 campaign.
* Merge defaults.

Change-Id: I3afb8dcc5b43e0931ad179b5cdc8f21dfcb32561
Follow-up: Change-Id: I549df847194d469f1b87b6dc00a05d2bae6e93ba
---
M wmf-config/InitialiseSettings.php
1 file changed, 4 insertions(+), 20 deletions(-)


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 91a7b03..1d078a5 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -14910,47 +14910,31 @@
'newarticle' => true,
'staff-recommender' => true
),
-   'cawiki' => array(
-   'newarticle' => true,
-   'cxstats' => true,
-   'staff-recommender' => true
-   ),
'dewiki' => array(
+   'article-recommender-1' => true,
'cxstats' => true,
'newarticle' => false,
'staff-recommender' => true
),
'enwiki' => array(
+   'article-recommender-1' => true,
'cxstats' => true,
'newarticle' => false,
'staff-recommender' => true
),
'eswiki' => array(
+   'article-recommender-1' => true,
'newarticle' => true,
'cxstats' => true,
'staff-recommender' => true,
'eswiki-recommender' => true
),
-   'fawiki' => array(
-   'newarticle' => true,
-   'cxstats' => true,
-   'staff-recommender' => true
-   ),
'frwiki' => array(
+   'article-recommender-1' => true,
'newarticle' => true,
'cxstats' => true,
'staff-recommender' => true,
'frwiki-recommender' => true
-   ),
-   'itwiki' => array(
-   'cxstats' => true,
-   'newarticle' => true,
-   'staff-recommender' => true
-   ),
-   'swwiki' => array(
-   'newarticle' => true,
-   'cxstats' => true,
-   'staff-recommender' => true
),
 ),
 

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

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

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


[MediaWiki-commits] [Gerrit] labs: Move labmon role to labs::graphite role - change (operations/puppet)

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

Change subject: labs: Move labmon role to labs::graphite role
..


labs: Move labmon role to labs::graphite role

And some small misc cleanup and consolidation

Change-Id: Ida0ee5059350853684abd859bd0fcf2a051947ba
---
R hieradata/role/common/labs/graphite.yaml
M manifests/role/graphite.pp
D manifests/role/labmon.pp
M manifests/site.pp
A modules/role/manifests/labs/graphite.pp
5 files changed, 24 insertions(+), 32 deletions(-)

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



diff --git a/hieradata/role/common/labmon.yaml 
b/hieradata/role/common/labs/graphite.yaml
similarity index 100%
rename from hieradata/role/common/labmon.yaml
rename to hieradata/role/common/labs/graphite.yaml
diff --git a/manifests/role/graphite.pp b/manifests/role/graphite.pp
index ada0f35..665cbf9 100644
--- a/manifests/role/graphite.pp
+++ b/manifests/role/graphite.pp
@@ -316,17 +316,3 @@
 }
 
 }
-
-# == Class: role::graphite::labmon
-#
-# Sets up graphite instance for monitoring labs, running on production 
hardware.
-# Instance is open to all, no password required to see metrics
-class role::graphite::labmon {
-class { 'role::graphite::base':
-storage_dir => '/srv/carbon',
-auth=> false,
-hostname=> 'graphite.wmflabs.org',
-}
-
-include graphite::labs::archiver
-}
diff --git a/manifests/role/labmon.pp b/manifests/role/labmon.pp
deleted file mode 100644
index 1b38836..000
--- a/manifests/role/labmon.pp
+++ /dev/null
@@ -1,17 +0,0 @@
-# = Class: labmon
-# Role for misc. setup of labs monitoring
-
-class role::labmon {
-
-class { 'role::graphite::labmon': }
-
-file { '/var/lib/carbon':
-ensure  => link,
-target  => '/srv/carbon',
-owner   => '_graphite',
-group   => '_graphite',
-require => Class['role::graphite::labmon']
-}
-
-include role::statsite
-}
diff --git a/manifests/site.pp b/manifests/site.pp
index ca17275..c3f2b34 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -1195,7 +1195,7 @@
 
 # Labs Graphite and StatsD host
 node 'labmon1001.eqiad.wmnet' {
-role labmon
+role labs::graphite
 include standard
 }
 
diff --git a/modules/role/manifests/labs/graphite.pp 
b/modules/role/manifests/labs/graphite.pp
new file mode 100644
index 000..2bf3ce1
--- /dev/null
+++ b/modules/role/manifests/labs/graphite.pp
@@ -0,0 +1,23 @@
+# = Class: role::labs::graphite
+# Sets up graphite instance for monitoring labs, running on production 
hardware.
+# Instance is open to all, no password required to see metrics
+class role::labs::graphite {
+
+class { 'role::graphite::base':
+storage_dir => '/srv/carbon',
+auth=> false,
+hostname=> 'graphite.wmflabs.org',
+}
+
+include graphite::labs::archiver
+
+file { '/var/lib/carbon':
+ensure  => link,
+target  => '/srv/carbon',
+owner   => '_graphite',
+group   => '_graphite',
+require => Class['role::graphite::base']
+}
+
+include role::statsite
+}

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

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

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


[MediaWiki-commits] [Gerrit] k8s: Remove standalone role - change (operations/puppet)

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

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

Change subject: k8s: Remove standalone role
..

k8s: Remove standalone role

Isn't really used anywhere - All the actual roles are in tools.pp

Change-Id: I8734f6535b6f57090fe7b9e717dc19ba145a8e15
---
D manifests/role/labsk8s.pp
1 file changed, 0 insertions(+), 32 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/81/255081/1

diff --git a/manifests/role/labsk8s.pp b/manifests/role/labsk8s.pp
deleted file mode 100644
index 9aca91c..000
--- a/manifests/role/labsk8s.pp
+++ /dev/null
@@ -1,32 +0,0 @@
-class role::labs::k8s::master {
-$master_host = hiera('k8s_master', $::fqdn)
-$etcd_servers = hiera('etcd_servers')
-
-class { 'k8s::apiserver':
-master_host => $master_host,
-etcd_servers => $etcd_servers,
-
-}
-
-class { 'k8s::scheduler':
-master_host => $master_host,
-}
-
-class { 'k8s::controller':
-master_host => $master_host,
-}
-}
-
-class role::labs::k8s::worker {
-include k8s::docker
-
-$master_host = hiera('k8s_master', $::fqdn)
-
-class { 'k8s::proxy':
-master_host => $master_host,
-}
-
-class { 'k8s::kubelet':
-master_host => $master_host,
-}
-}

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

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

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


[MediaWiki-commits] [Gerrit] role: Move quarry to use autolayout - change (operations/puppet)

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

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

Change subject: role: Move quarry to use autolayout
..

role: Move quarry to use autolayout

Change-Id: If3ebe3c804de25029e0f176dae6d7b24fb4f8eda
---
D manifests/role/labsquarry.pp
A manifests/role/quarry.pp
2 files changed, 43 insertions(+), 39 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/82/255082/1

diff --git a/manifests/role/labsquarry.pp b/manifests/role/labsquarry.pp
deleted file mode 100644
index 7fb90c0..000
--- a/manifests/role/labsquarry.pp
+++ /dev/null
@@ -1,39 +0,0 @@
-class role::labs::quarry::web {
-include role::labs::lvm::srv
-include ::labs_debrepo
-
-class { '::quarry::web':
-require => [Mount['/srv'], Class['::labs_debrepo']],
-}
-}
-
-class role::labs::quarry::celeryrunner {
-include role::labs::lvm::srv
-include ::labs_debrepo
-
-class { '::quarry::celeryrunner':
-require => [Mount['/srv'], Class['::labs_debrepo']],
-}
-}
-
-class role::labs::quarry::database {
-include role::labs::lvm::srv
-
-class { '::quarry::database':
-require => Mount['/srv']
-}
-}
-
-class role::labs::quarry::redis {
-include role::labs::lvm::srv
-
-class { '::quarry::redis':
-require => Mount['/srv']
-}
-}
-
-# Should be included on an instance that already has
-# a Quarry install (celery or web) setup
-class role::labs::quarry::killer {
-include quarry::querykiller
-}
diff --git a/manifests/role/quarry.pp b/manifests/role/quarry.pp
new file mode 100644
index 000..46845a1
--- /dev/null
+++ b/manifests/role/quarry.pp
@@ -0,0 +1,43 @@
+class role::quarry::web {
+include ::labs_debrepo
+
+requires_realm('labs')
+
+class { '::quarry::web':
+require => Class['::labs_debrepo'],
+}
+}
+
+class role::quarry::celeryrunner {
+include ::labs_debrepo
+
+requires_realm('labs')
+
+class { '::quarry::celeryrunner':
+require => Class['::labs_debrepo'],
+}
+}
+
+class role::quarry::database {
+
+requires_realm('labs')
+
+class { '::quarry::database':
+}
+}
+
+class role::quarry::redis {
+include role::labs::lvm::srv
+
+requires_realm('labs')
+
+class { '::quarry::redis':
+require => Mount['/srv']
+}
+}
+
+# Should be included on an instance that already has
+# a Quarry install (celery or web) setup
+class role::quarry::killer {
+include quarry::querykiller
+}

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

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

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


[MediaWiki-commits] [Gerrit] Import Flow data dump - change (mediawiki...Flow)

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

Change subject: Import Flow data dump
..


Import Flow data dump

Meanwhile also changes some Models to allow empty values as well
for nullable columns.

Bug: T114703
Change-Id: Ieae618d4aaa4b21a4eb8fe8d1f0627ee8bd1ff8d
---
M Flow.php
M Hooks.php
M autoload.php
M includes/Data/Listener/ReferenceRecorder.php
A includes/Dump/Importer.php
M includes/Model/AbstractRevision.php
M includes/Model/PostRevision.php
7 files changed, 303 insertions(+), 6 deletions(-)

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



diff --git a/Flow.php b/Flow.php
index 925b372..000d7be 100644
--- a/Flow.php
+++ b/Flow.php
@@ -154,6 +154,7 @@
 $wgHooks['ArticleDeleteComplete'][] = 'FlowHooks::onArticleDeleteComplete';
 $wgHooks['ArticleUndelete'][] = 'FlowHooks::onArticleUndelete';
 $wgHooks['SearchableNamespaces'][] = 'FlowHooks::onSearchableNamespaces';
+$wgHooks['ImportHandleToplevelXMLTag'][] = 
'FlowHooks::onImportHandleToplevelXMLTag';
 
 // Extension:UserMerge support
 $wgHooks['UserMergeAccountFields'][] = 'FlowHooks::onUserMergeAccountFields';
diff --git a/Hooks.php b/Hooks.php
index 7fbca28..4aa7289 100644
--- a/Hooks.php
+++ b/Hooks.php
@@ -1768,4 +1768,61 @@
return true;
}
 
+   /**
+* @param WikiImporter $importer
+* @return bool
+*/
+   public static function onImportHandleToplevelXMLTag( WikiImporter 
$importer ) {
+   // only init Flow's importer once, then re-use it
+   static $flowImporter = null;
+   if ( $flowImporter === null ) {
+   // importer can be dry-run (= parse, but don't store), 
but we can only
+   // derive that from mPageOutCallback. I'll set a new 
value (which will
+   // return the existing value) to see if it's in dry-run 
mode (= null)
+   $callback = $importer->setPageOutCallback( null );
+   // restore previous mPageOutCallback value
+   $importer->setPageOutCallback( $callback );
+
+   $flowImporter = new \Flow\Dump\Importer( $importer );
+   if ( $callback !== null ) {
+   // not in dry-run mode
+   $flowImporter->setStorage( Container::get( 
'storage' ) );
+   }
+   }
+
+   $reader = $importer->getReader();
+   $tag = $reader->localName;
+   $type = $reader->nodeType;
+
+   if ( $tag == 'board' ) {
+   if ( $type === XMLReader::ELEMENT ) {
+   $flowImporter->handleBoard();
+   }
+   return false;
+   } elseif ( $tag == 'description' ) {
+   if ( $type === XMLReader::ELEMENT ) {
+   $flowImporter->handleHeader();
+   }
+   return false;
+   } elseif ( $tag == 'topic' ) {
+   if ( $type === XMLReader::ELEMENT ) {
+   $flowImporter->handleTopic();
+   }
+   return false;
+   } elseif ( $tag == 'post' ) {
+   if ( $type === XMLReader::ELEMENT ) {
+   $flowImporter->handlePost();
+   }
+   return false;
+   } elseif ( $tag == 'summary' ) {
+   if ( $type === XMLReader::ELEMENT ) {
+   $flowImporter->handleSummary();
+   }
+   return false;
+   } elseif ( $tag == 'children' ) {
+   return false;
+   }
+
+   return true;
+   }
 }
diff --git a/autoload.php b/autoload.php
index 5dfa95f..583baf3 100644
--- a/autoload.php
+++ b/autoload.php
@@ -115,6 +115,7 @@
'Flow\\Data\\Utils\\UserMerger' => __DIR__ . 
'/includes/Data/Utils/UserMerger.php',
'Flow\\DbFactory' => __DIR__ . '/includes/DbFactory.php',
'Flow\\Dump\\Exporter' => __DIR__ . '/includes/Dump/Exporter.php',
+   'Flow\\Dump\\Importer' => __DIR__ . '/includes/Dump/Importer.php',
'Flow\\Exception\\CatchableFatalErrorException' => __DIR__ . 
'/includes/Exception/CatchableFatalErrorException.php',
'Flow\\Exception\\CrossWikiException' => __DIR__ . 
'/includes/Exception/ExceptionHandling.php',
'Flow\\Exception\\DataModelException' => __DIR__ . 
'/includes/Exception/ExceptionHandling.php',
diff --git a/includes/Data/Listener/ReferenceRecorder.php 
b/includes/Data/Listener/ReferenceRecorder.php
index 358ec64..95baa62 100644
--- a/includes/Data/Listener/ReferenceRecorder.php
+++ b/includes/Data/Listener/ReferenceRecorder.php

[MediaWiki-commits] [Gerrit] Convert autoloader to PSR-4 - change (wikimedia/wikimania-scholarships)

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

Change subject: Convert autoloader to PSR-4
..


Convert autoloader to PSR-4

Change-Id: If74ba93656c1ef2000d909783b2cd5fd6a3bc19f
---
M composer.json
R src/App.php
R src/Auth/AuthManager.php
R src/Auth/UserData.php
R src/Communities.php
R src/Controllers/Admin/Settings.php
R src/Controllers/Admin/User.php
R src/Controllers/Admin/Users.php
R src/Controllers/Login.php
R src/Controllers/RevalidateCsrf.php
R src/Controllers/Review/Application.php
R src/Controllers/Review/Communities.php
R src/Controllers/Review/Countries.php
R src/Controllers/Review/Phase1List.php
R src/Controllers/Review/Phase2List.php
R src/Controllers/Review/PhaseGrid.php
R src/Controllers/Review/Regions.php
R src/Controllers/Review/Scores.php
R src/Controllers/Review/Search.php
R src/Controllers/ScholarshipApplication.php
R src/Controllers/User/ChangePassword.php
R src/Countries.php
R src/Dao/Apply.php
R src/Dao/Settings.php
R src/Dao/User.php
R src/Forms/Apply.php
R src/Wikis.php
R tests/CountriesTest.php
M vendor/composer/autoload_classmap.php
M vendor/composer/autoload_namespaces.php
M vendor/composer/autoload_psr4.php
31 files changed, 34 insertions(+), 28 deletions(-)

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



diff --git a/composer.json b/composer.json
index 3a15e9b..aaf6414 100644
--- a/composer.json
+++ b/composer.json
@@ -8,10 +8,15 @@
"wikimedia/slimapp": "0.6.0"
},
"autoload": {
-   "psr-0": {
+   "psr-4": {
"Wikimania\\Scholarship\\": "src/"
}
},
+   "autoload-dev": {
+   "psr-4": {
+   "Wikimania\\Scholarship\\": "tests/"
+   }
+   },
"config": {
"optimize-autoloader": true,
"preferred-install": "dist"
diff --git a/src/Wikimania/Scholarship/App.php b/src/App.php
similarity index 100%
rename from src/Wikimania/Scholarship/App.php
rename to src/App.php
diff --git a/src/Wikimania/Scholarship/Auth/AuthManager.php 
b/src/Auth/AuthManager.php
similarity index 100%
rename from src/Wikimania/Scholarship/Auth/AuthManager.php
rename to src/Auth/AuthManager.php
diff --git a/src/Wikimania/Scholarship/Auth/UserData.php b/src/Auth/UserData.php
similarity index 100%
rename from src/Wikimania/Scholarship/Auth/UserData.php
rename to src/Auth/UserData.php
diff --git a/src/Wikimania/Scholarship/Communities.php b/src/Communities.php
similarity index 100%
rename from src/Wikimania/Scholarship/Communities.php
rename to src/Communities.php
diff --git a/src/Wikimania/Scholarship/Controllers/Admin/Settings.php 
b/src/Controllers/Admin/Settings.php
similarity index 100%
rename from src/Wikimania/Scholarship/Controllers/Admin/Settings.php
rename to src/Controllers/Admin/Settings.php
diff --git a/src/Wikimania/Scholarship/Controllers/Admin/User.php 
b/src/Controllers/Admin/User.php
similarity index 100%
rename from src/Wikimania/Scholarship/Controllers/Admin/User.php
rename to src/Controllers/Admin/User.php
diff --git a/src/Wikimania/Scholarship/Controllers/Admin/Users.php 
b/src/Controllers/Admin/Users.php
similarity index 100%
rename from src/Wikimania/Scholarship/Controllers/Admin/Users.php
rename to src/Controllers/Admin/Users.php
diff --git a/src/Wikimania/Scholarship/Controllers/Login.php 
b/src/Controllers/Login.php
similarity index 100%
rename from src/Wikimania/Scholarship/Controllers/Login.php
rename to src/Controllers/Login.php
diff --git a/src/Wikimania/Scholarship/Controllers/RevalidateCsrf.php 
b/src/Controllers/RevalidateCsrf.php
similarity index 100%
rename from src/Wikimania/Scholarship/Controllers/RevalidateCsrf.php
rename to src/Controllers/RevalidateCsrf.php
diff --git a/src/Wikimania/Scholarship/Controllers/Review/Application.php 
b/src/Controllers/Review/Application.php
similarity index 100%
rename from src/Wikimania/Scholarship/Controllers/Review/Application.php
rename to src/Controllers/Review/Application.php
diff --git a/src/Wikimania/Scholarship/Controllers/Review/Communities.php 
b/src/Controllers/Review/Communities.php
similarity index 100%
rename from src/Wikimania/Scholarship/Controllers/Review/Communities.php
rename to src/Controllers/Review/Communities.php
diff --git a/src/Wikimania/Scholarship/Controllers/Review/Countries.php 
b/src/Controllers/Review/Countries.php
similarity index 100%
rename from src/Wikimania/Scholarship/Controllers/Review/Countries.php
rename to src/Controllers/Review/Countries.php
diff --git a/src/Wikimania/Scholarship/Controllers/Review/Phase1List.php 
b/src/Controllers/Review/Phase1List.php
similarity index 100%
rename from src/Wikimania/Scholarship/Controllers/Review/Phase1List.php
rename to src/Controllers/Review/Phase1List.php
diff --git a/src/Wikimania/Scholarship/Controllers/Review/Phase2List.php 
b/src/Controllers/Review/Phase2List.php

[MediaWiki-commits] [Gerrit] Improve snippet generation - change (mediawiki...MathSearch)

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

Change subject: Improve snippet generation
..


Improve snippet generation

Change-Id: Ib201ba5a2693f516ac377ac28df6cb100bb6a93e
---
M includes/special/SpecialMlpEval.php
1 file changed, 48 insertions(+), 7 deletions(-)

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



diff --git a/includes/special/SpecialMlpEval.php 
b/includes/special/SpecialMlpEval.php
index a2dc2fe..7b1eaba 100644
--- a/includes/special/SpecialMlpEval.php
+++ b/includes/special/SpecialMlpEval.php
@@ -13,13 +13,14 @@
  */
 class SpecialMlpEval extends SpecialPage {
const MAX_ATTEMPTS = 10;
-   const WINDOW_SIZE = 500;
+   const WINDOW_SIZE = 1200;
private $step = 1;
/**
 * @var Title
 */
private $title;
private $wikitext;
+   private $snippet;
private $mathTags;
private $revison;
private $lastError = false;
@@ -179,6 +180,7 @@
return LoggerFactory::getInstance( 'MathSearch' );
}
 
+
/**
 * @return array
 * @throws MWException
@@ -190,23 +192,62 @@
$tag = $this->mathTags[$unique];
$formDescriptor = array();
$this->getOutput()->addWikiText( $tag[3] );
-
$tagPos = strpos( $this->wikitext, $unique );
$wikiText = $this->wikitext;
-   $wikiText = substr( $wikiText,
-   max( $tagPos - self::WINDOW_SIZE, 0 ),
-   min( 2 * self::WINDOW_SIZE, strlen( $wikiText ) - 
$tagPos ) );
+   $startPos = $this->getStartPos( $tagPos, $wikiText );
+   $length = $this->getEndPos( $tagPos, $wikiText ) - $startPos;
+   $wikiText = substr( $wikiText, $startPos, $length );
$wikiText = str_replace( $unique,
'' . $tag[3] . '',
$wikiText );
foreach ( $this->mathTags as $key => $content ) {
$wikiText = str_replace( $key, $content[3], $wikiText );
}
-
-   $this->getOutput()->addWikiText( "== Extract 
==\n...\n$wikiText\n..." );
+   $this->snippet = "== Extract ==\nStart of the 
extract...\n\n$wikiText\n\n...end of the extract";
+   $this->getOutput()->addWikiText( $this->snippet );
$url = $this->title->getLinkURL();
$this->getOutput()
->addHTML( "Full 
article (new Window)" );
return array( $tagCount, $formDescriptor, $wikiText );
}
+
+   /**
+* @param $tagPos
+* @param $wikiText
+* @return array
+*/
+   private function getStartPos( $tagPos, $wikiText ) {
+   $startPos = max( $tagPos - round( self::WINDOW_SIZE / 2 ), 0 );
+   if ( $startPos > 0 ) {
+   // Heuristics to find a reasonable cutting point
+   $newPos = strpos( $wikiText, "\n", $startPos );
+   if ( $newPos !== false && ( $newPos - $startPos ) < 
round( self::WINDOW_SIZE / 4 ) ) {
+   // only change startPos, if it seems reasonable
+   $startPos = $newPos;
+   }
+   }
+   return $startPos;
+   }
+
+   /**
+* @param $wikiText
+* @param $tagPos
+* @return bool|int|mixed
+*/
+   private function getEndPos( $tagPos, $wikiText ) {
+   $halfWindow = round( self::WINDOW_SIZE / 2 );
+   $distance2End = strlen( $wikiText ) - $tagPos;
+   if ( $distance2End > $halfWindow ) {
+   $newPos = strpos( $wikiText, "\n", $tagPos + 
$halfWindow );
+   if ( $newPos !== false && ( $newPos - $tagPos ) < 
round( 3 / 4 * self::WINDOW_SIZE ) ) {
+   // only change startPos, if it seems reasonable
+   return $newPos;
+   } else {
+   return $tagPos + $halfWindow;
+   }
+   } else {
+   return strlen( $wikiText );
+   }
+   }
+
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib201ba5a2693f516ac377ac28df6cb100bb6a93e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MathSearch
Gerrit-Branch: master
Gerrit-Owner: Physikerwelt 
Gerrit-Reviewer: Dyiop 
Gerrit-Reviewer: Hcohl 
Gerrit-Reviewer: Physikerwelt 
Gerrit-Reviewer: Whyameri 
Gerrit-Reviewer: jenkins-bot <>

___

[MediaWiki-commits] [Gerrit] Update firebase/php-jwt to 3.0.0 - change (mediawiki/vendor)

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

Change subject: Update firebase/php-jwt to 3.0.0
..


Update firebase/php-jwt to 3.0.0

Bug: T119294
Change-Id: I0abdddb3716fb585528fd01d9aaf6050b1b8b659
---
M composer.json
M composer.lock
M composer/autoload_classmap.php
M composer/autoload_psr4.php
M composer/installed.json
M firebase/php-jwt/.gitignore
D firebase/php-jwt/Exceptions/BeforeValidException.php
D firebase/php-jwt/Exceptions/ExpiredException.php
D firebase/php-jwt/Exceptions/SignatureInvalidException.php
M firebase/php-jwt/README.md
M firebase/php-jwt/composer.json
A firebase/php-jwt/composer.lock
M firebase/php-jwt/package.xml
A firebase/php-jwt/src/BeforeValidException.php
A firebase/php-jwt/src/ExpiredException.php
R firebase/php-jwt/src/JWT.php
A firebase/php-jwt/src/SignatureInvalidException.php
M firebase/php-jwt/tests/JWTTest.php
18 files changed, 256 insertions(+), 155 deletions(-)

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



diff --git a/composer.json b/composer.json
index badf00a..0b88736 100644
--- a/composer.json
+++ b/composer.json
@@ -11,7 +11,7 @@
"require": {
"composer/semver": "1.2.0",
"cssjanus/cssjanus": "1.1.1",
-   "firebase/php-jwt": "2.1.0",
+   "firebase/php-jwt": "3.0.0",
"kzykhys/pygments": "1.0",
"liuggio/statsd-php-client": "1.0.16",
"mediawiki/at-ease": "1.1.0",
diff --git a/composer.lock b/composer.lock
index e975304..715e1cc 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,8 +4,8 @@
 "Read more about it at 
https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file;,
 "This file is @generated automatically"
 ],
-"hash": "2ee039fecd20f1c1039e1e81db0343ef",
-"content-hash": "a8f89a030e0ee24078766f8f467769a4",
+"hash": "e5cc6ed39a0396942cb1bd9447a12204",
+"content-hash": "35145185a983e3c784e513b7c3533149",
 "packages": [
 {
 "name": "composer/semver",
@@ -106,27 +106,26 @@
 },
 {
 "name": "firebase/php-jwt",
-"version": "v2.1.0",
+"version": "v3.0.0",
 "source": {
 "type": "git",
 "url": "https://github.com/firebase/php-jwt.git;,
-"reference": "fb219727e199dd80a72d5274ebb5c8b24d58dd9b"
+"reference": "fa8a06e96526eb7c0eeaa47e4f39be59d21f16e1"
 },
 "dist": {
 "type": "zip",
-"url": 
"https://api.github.com/repos/firebase/php-jwt/zipball/fb219727e199dd80a72d5274ebb5c8b24d58dd9b;,
-"reference": "fb219727e199dd80a72d5274ebb5c8b24d58dd9b",
+"url": 
"https://api.github.com/repos/firebase/php-jwt/zipball/fa8a06e96526eb7c0eeaa47e4f39be59d21f16e1;,
+"reference": "fa8a06e96526eb7c0eeaa47e4f39be59d21f16e1",
 "shasum": ""
 },
 "require": {
-"php": ">=5.2.0"
+"php": ">=5.3.0"
 },
 "type": "library",
 "autoload": {
-"classmap": [
-"Authentication/",
-"Exceptions/"
-]
+"psr-4": {
+"Firebase\\JWT\\": "src"
+}
 },
 "notification-url": "https://packagist.org/downloads/;,
 "license": [
@@ -146,7 +145,7 @@
 ],
 "description": "A simple library to encode and decode JSON Web 
Tokens (JWT) in PHP. Should conform to the current spec.",
 "homepage": "https://github.com/firebase/php-jwt;,
-"time": "2015-05-20 19:16:04"
+"time": "2015-07-22 18:31:08"
 },
 {
 "name": "kzykhys/pygments",
diff --git a/composer/autoload_classmap.php b/composer/autoload_classmap.php
index c76a51a..ed971b5 100644
--- a/composer/autoload_classmap.php
+++ b/composer/autoload_classmap.php
@@ -41,7 +41,6 @@
 'AvroStringIO' => $vendorDir . '/wikimedia/avro/lib/avro/io.php',
 'AvroUnionSchema' => $vendorDir . '/wikimedia/avro/lib/avro/schema.php',
 'AvroUtil' => $vendorDir . '/wikimedia/avro/lib/avro/util.php',
-'BeforeValidException' => $vendorDir . 
'/firebase/php-jwt/Exceptions/BeforeValidException.php',
 'CLDRPluralRuleParser\\Converter' => $vendorDir . 
'/wikimedia/cldr-plural-rule-parser/src/Converter.php',
 'CLDRPluralRuleParser\\Converter\\Expression' => $vendorDir . 
'/wikimedia/cldr-plural-rule-parser/src/Converter/Expression.php',
 'CLDRPluralRuleParser\\Converter\\Fragment' => $vendorDir . 
'/wikimedia/cldr-plural-rule-parser/src/Converter/Fragment.php',
@@ -282,9 +281,11 @@
 'Elastica\\Type\\AbstractType' => $vendorDir . 
'/ruflin/elastica/lib/Elastica/Type/AbstractType.php',
 

[MediaWiki-commits] [Gerrit] Dump Flow data - change (mediawiki...Flow)

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

Change subject: Dump Flow data
..


Dump Flow data

A big chunk of this patch is a refactoring of the search updaters.
I wanted to reuse the code that already iterators over all header
& topics, but it was unwieldly. I split that into separate classes
that are now Iterator objects.

Other changes:
* Fixed Flow\Search\Connection, which could no longer call
parent::__construct since that no longer exists
* Flow\Container couldn’t be autoloaded from maintenance
script's constructor (autoload not yet initialized, I assume)
* FlowFixWorkflowLastUpdateTimestamp.php was failing because
getBinary now returns a UUIDBlob instead of the plain binary string

Bug: T89398
Change-Id: I52bc7c0ce7813a78f9006ca4b7d931a905726c05
---
M autoload.php
M container.php
A includes/Dump/Exporter.php
A includes/Search/Iterators/AbstractIterator.php
A includes/Search/Iterators/HeaderIterator.php
A includes/Search/Iterators/TopicIterator.php
D includes/Search/TopicUpdater.php
D includes/Search/Updater.php
A includes/Search/Updaters/AbstractUpdater.php
R includes/Search/Updaters/HeaderUpdater.php
A includes/Search/Updaters/TopicUpdater.php
M maintenance/FlowFixWorkflowLastUpdateTimestamp.php
M maintenance/FlowForceSearchIndex.php
A maintenance/dumpBackup.php
14 files changed, 1,133 insertions(+), 482 deletions(-)

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



diff --git a/autoload.php b/autoload.php
index 91d368e..5dfa95f 100644
--- a/autoload.php
+++ b/autoload.php
@@ -114,6 +114,7 @@
'Flow\\Data\\Utils\\SortRevisionsByRevisionId' => __DIR__ . 
'/includes/Data/Utils/SortRevisionsByRevisionId.php',
'Flow\\Data\\Utils\\UserMerger' => __DIR__ . 
'/includes/Data/Utils/UserMerger.php',
'Flow\\DbFactory' => __DIR__ . '/includes/DbFactory.php',
+   'Flow\\Dump\\Exporter' => __DIR__ . '/includes/Dump/Exporter.php',
'Flow\\Exception\\CatchableFatalErrorException' => __DIR__ . 
'/includes/Exception/CatchableFatalErrorException.php',
'Flow\\Exception\\CrossWikiException' => __DIR__ . 
'/includes/Exception/ExceptionHandling.php',
'Flow\\Exception\\DataModelException' => __DIR__ . 
'/includes/Exception/ExceptionHandling.php',
@@ -279,12 +280,15 @@
'Flow\\Repository\\UserName\\UserNameQuery' => __DIR__ . 
'/includes/Repository/UserName/UserNameQuery.php',
'Flow\\RevisionActionPermissions' => __DIR__ . 
'/includes/RevisionActionPermissions.php',
'Flow\\Search\\Connection' => __DIR__ . 
'/includes/Search/Connection.php',
-   'Flow\\Search\\HeaderUpdater' => __DIR__ . 
'/includes/Search/HeaderUpdater.php',
+   'Flow\\Search\\Iterators\\AbstractIterator' => __DIR__ . 
'/includes/Search/Iterators/AbstractIterator.php',
+   'Flow\\Search\\Iterators\\HeaderIterator' => __DIR__ . 
'/includes/Search/Iterators/HeaderIterator.php',
+   'Flow\\Search\\Iterators\\TopicIterator' => __DIR__ . 
'/includes/Search/Iterators/TopicIterator.php',
'Flow\\Search\\Maintenance\\MappingConfigBuilder' => __DIR__ . 
'/includes/Search/maintenance/MappingConfigBuilder.php',
'Flow\\Search\\SearchEngine' => __DIR__ . 
'/includes/Search/SearchEngine.php',
'Flow\\Search\\Searcher' => __DIR__ . '/includes/Search/Searcher.php',
-   'Flow\\Search\\TopicUpdater' => __DIR__ . 
'/includes/Search/TopicUpdater.php',
-   'Flow\\Search\\Updater' => __DIR__ . '/includes/Search/Updater.php',
+   'Flow\\Search\\Updaters\\AbstractUpdater' => __DIR__ . 
'/includes/Search/Updaters/AbstractUpdater.php',
+   'Flow\\Search\\Updaters\\HeaderUpdater' => __DIR__ . 
'/includes/Search/Updaters/HeaderUpdater.php',
+   'Flow\\Search\\Updaters\\TopicUpdater' => __DIR__ . 
'/includes/Search/Updaters/TopicUpdater.php',
'Flow\\SpamFilter\\AbuseFilter' => __DIR__ . 
'/includes/SpamFilter/AbuseFilter.php',
'Flow\\SpamFilter\\ConfirmEdit' => __DIR__ . 
'/includes/SpamFilter/ConfirmEdit.php',
'Flow\\SpamFilter\\ContentLengthFilter' => __DIR__ . 
'/includes/SpamFilter/ContentLengthFilter.php',
diff --git a/container.php b/container.php
index 31dabde..6eb11b0 100644
--- a/container.php
+++ b/container.php
@@ -1032,12 +1032,18 @@
global $wgFlowSearchServers, $wgFlowSearchConnectionAttempts;
return new Flow\Search\Connection( $wgFlowSearchServers, 
$wgFlowSearchConnectionAttempts );
 };
+$c['search.index.iterators.header'] = function( $c ) {
+   return new \Flow\Search\Iterators\HeaderIterator( $c['db.factory'] );
+};
+$c['search.index.iterators.topic'] = function( $c ) {
+   return new \Flow\Search\Iterators\TopicIterator( $c['db.factory'], 
$c['loader.root_post'] );
+};
 $c['search.index.updaters'] = function( $c ) {
// permissions for anon user
$anonPermissions = new Flow\RevisionActionPermissions( 
$c['flow_actions'], new User );
return array(
- 

[MediaWiki-commits] [Gerrit] Remove gadolinium related udp2log and varnishncsa stuff - change (operations/puppet)

2015-11-23 Thread Ottomata (Code Review)
Ottomata has uploaded a new change for review.

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

Change subject: Remove gadolinium related udp2log and varnishncsa stuff
..

Remove gadolinium related udp2log and varnishncsa stuff

Bug: T84062
Bug: T118325
Bug: T97294
Change-Id: I85c32f7e88c02ce5848028b8e68611660de62989
---
M manifests/misc/monitoring.pp
M manifests/site.pp
M modules/role/manifests/cache/logging.pp
3 files changed, 7 insertions(+), 10 deletions(-)


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

diff --git a/manifests/misc/monitoring.pp b/manifests/misc/monitoring.pp
index a3996e1..c48d223 100644
--- a/manifests/misc/monitoring.pp
+++ b/manifests/misc/monitoring.pp
@@ -5,10 +5,6 @@
 class misc::monitoring::views {
 include role::analytics::kafka::config
 
-misc::monitoring::view::udp2log { 'udp2log':
-host_regex => 'gadolinium',
-}
-
 $kafka_log_disks_regex = 
join($::role::analytics::kafka::config::log_disks, '|')
 $kafka_broker_host_regex = 
join($::role::analytics::kafka::config::brokers_array, '|')
 misc::monitoring::view::kafka { 'kafka':
@@ -17,9 +13,6 @@
 }
 misc::monitoring::view::varnishkafka { 'webrequest':
 topic_regex => 'webrequest_.+',
-}
-class { 'misc::monitoring::view::kafkatee':
-kafkatee_host_regex => '',
 }
 
 class { 'misc::monitoring::view::hadoop':
diff --git a/manifests/site.pp b/manifests/site.pp
index 1754e56..1ad8f0f 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -949,10 +949,10 @@
 include admin
 }
 
-# gadolinium is the webrequest socat multicast relay.
-# base_analytics_logging_node is defined in role/logging.pp
+# gadolinium  was previously the eventlogging and webrequest
+# multicast relay, it is now a spare.
 node 'gadolinium.wikimedia.org' {
-role logging, logging::relay::webrequest-multicast, 
logging::relay::eventlogging
+role spare
 include standard
 }
 
diff --git a/modules/role/manifests/cache/logging.pp 
b/modules/role/manifests/cache/logging.pp
index 4360730..8ff783b 100644
--- a/modules/role/manifests/cache/logging.pp
+++ b/modules/role/manifests/cache/logging.pp
@@ -1,3 +1,6 @@
+# NOTE: This class is no longer being used and may be removed
+# as soon as varnishncsa instances are ensure absent on cache hosts
+
 class role::cache::logging {
 if $::realm == 'production' {
 $webrequest_multicast_relay_host = '208.80.154.73' # gadoinium
@@ -7,6 +10,7 @@
 listener_address => $webrequest_multicast_relay_host,
 port => '8419',
 cli_args => $cliargs,
+ensure   => 'absent',
 }
 
 varnish::logging { 'erbium':

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

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

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


[MediaWiki-commits] [Gerrit] uw.CategoriesDetailsWidget: Use the warning system for non-e... - change (mediawiki...UploadWizard)

2015-11-23 Thread Code Review
Bartosz Dziewoński has uploaded a new change for review.

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

Change subject: uw.CategoriesDetailsWidget: Use the warning system for 
non-existent category warning
..

uw.CategoriesDetailsWidget: Use the warning system for non-existent category 
warning

Depends on I647af4dee947a6572f0202cf6b8b28777bbdc17e in MediaWiki core.

Bug: T117119
Bug: T119166
Change-Id: I322778303b7427464745bcb02abb780491ce6a97
---
M i18n/en.json
M resources/details/uw.CategoriesDetailsWidget.js
2 files changed, 7 insertions(+), 28 deletions(-)


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

diff --git a/i18n/en.json b/i18n/en.json
index cf88219..983cc07 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -294,7 +294,7 @@
"mwe-upwiz-url-invalid": "The URL entered is unsupported or points to 
an invalid or restricted $1 image or photoset and cannot be used.",
"mwe-upwiz-user-blacklisted": "Unfortunately, no images from this $1 
account can be uploaded on this site.",
"mwe-upwiz-categories": "Categories",
-   "mwe-upwiz-categories-missing": "This category lacks a description 
page. Are you sure you typed the name correctly?",
+   "mwe-upwiz-categories-missing": "One of the categories lacks a 
description page. Are you sure you typed the name correctly?",
"mwe-upwiz-thumbnail-failed": "The upload succeeded, but the server 
could not get a preview thumbnail.",
"mwe-upwiz-unparseable-filename": "Could not understand the filename 
\"$1\".",
"mwe-upwiz-unparseable-title": "This title is invalid. Make sure to 
remove characters like square brackets, colons, comparison operators, pipes and 
curly brackets.",
diff --git a/resources/details/uw.CategoriesDetailsWidget.js 
b/resources/details/uw.CategoriesDetailsWidget.js
index 35c2181..85632a8 100644
--- a/resources/details/uw.CategoriesDetailsWidget.js
+++ b/resources/details/uw.CategoriesDetailsWidget.js
@@ -6,7 +6,7 @@
 * @extends uw.DetailsWidget
 */
uw.CategoriesDetailsWidget = function UWCategoriesDetailsWidget() {
-   var categories;
+   var categories, catDetails = this;
 
uw.CategoriesDetailsWidget.parent.call( this );
 
@@ -16,14 +16,8 @@
var widget = 
this.constructor.prototype.createItemWidget.call( this, data );
widget.setMissing = function ( missing ) {
this.constructor.prototype.setMissing.call( 
this, missing );
-   if ( !missing ) {
-   this.$element.removeAttr( 'title' );
-   } else {
-   this.$element
-   .attr( 'title', mw.msg( 
'mwe-upwiz-categories-missing' ) )
-   .tipsy()
-   .tipsy( 'show' );
-   }
+   // Aggregate 'change' event
+   catDetails.emit( 'change' );
};
return widget;
};
@@ -33,16 +27,6 @@
return !!mw.Title.newFromText( 'Category:' + cat );
} );
this.categoriesWidget.setItemsFromData( categories );
-
-   this.categoriesWidgetPrevItems = 
this.categoriesWidget.getItems();
-   this.categoriesWidget.on( 'change', function () {
-   var i;
-   // Kill any active tipsies, they like to get stuck
-   for ( i = 0; i < this.categoriesWidgetPrevItems.length; 
i++ ) {
-   this.categoriesWidgetPrevItems[ i 
].$element.tipsy( 'hide' );
-   }
-   this.categoriesWidgetPrevItems = 
this.categoriesWidget.getItems();
-   }.bind( this ) );
 
this.$element.addClass( 'mwe-upwiz-categoriesDetailsWidget' );
this.$element.append( this.categoriesWidget.$element );
@@ -56,14 +40,6 @@
 * @inheritdoc
 */
uw.CategoriesDetailsWidget.prototype.getErrors = function () {
-   var i;
-   // Kill any active tipsies, they like to get stuck.
-   // TODO This is a really stupid place to put this.
-   // It's here to ensure we clear them when we advance to next 
step.
-   for ( i = 0; i < this.categoriesWidgetPrevItems.length; i++ ) {
-   this.categoriesWidgetPrevItems[ i ].$element.tipsy( 
'hide' );
-   }
-
return $.Deferred().resolve( [] ).promise();
};
 
@@ -75,6 +51,9 @@
if ( mw.UploadWizard.config.enableCategoryCheck && 

[MediaWiki-commits] [Gerrit] CategoriesDetailsWidget: Unhide warnings about no categories... - change (mediawiki...UploadWizard)

2015-11-23 Thread Code Review
Bartosz Dziewoński has uploaded a new change for review.

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

Change subject: CategoriesDetailsWidget: Unhide warnings about no categories 
being selected
..

CategoriesDetailsWidget: Unhide warnings about no categories being selected

Change-Id: Ia325312e60616bd99a28cc097da55dbb31342a13
---
M UploadWizardHooks.php
D resources/details/uw.CategoriesDetailsWidget.less
2 files changed, 0 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UploadWizard 
refs/changes/67/254867/1

diff --git a/UploadWizardHooks.php b/UploadWizardHooks.php
index 731ccaf..e183b13 100644
--- a/UploadWizardHooks.php
+++ b/UploadWizardHooks.php
@@ -120,7 +120,6 @@
// OOjs UI interface elements
'resources/uw.FieldLayout.less',
'resources/details/uw.DateDetailsWidget.less',
-   
'resources/details/uw.CategoriesDetailsWidget.less',

'resources/details/uw.DescriptionDetailsWidget.less',

'resources/details/uw.DescriptionsDetailsWidget.less',

'resources/details/uw.LocationDetailsWidget.less',
diff --git a/resources/details/uw.CategoriesDetailsWidget.less 
b/resources/details/uw.CategoriesDetailsWidget.less
deleted file mode 100644
index f68f1e1..000
--- a/resources/details/uw.CategoriesDetailsWidget.less
+++ /dev/null
@@ -1,4 +0,0 @@
-// Hide the warning message until we switch to using this style consistently
-.oo-ui-fieldLayout-messages > 
.mwe-upwiz-fieldLayout-notice-mwe-upwiz-warning-categories-missing {
-   display: none;
-}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia325312e60616bd99a28cc097da55dbb31342a13
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UploadWizard
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński 

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


[MediaWiki-commits] [Gerrit] diamond: use upstream StatsdHandler - change (operations/puppet)

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

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

Change subject: diamond: use upstream StatsdHandler
..

diamond: use upstream StatsdHandler

since diamond 3.5-3 internally we have been shipping a transitional copy
of upstream diamond stats_d module as dastatsd. Explicitly move to it
and away from dastatsd.

Bug:T116033
Change-Id: I8ca4d238be189bcb355c2035f6ba7c32b33d2b67
---
M modules/diamond/manifests/init.pp
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/72/254872/1

diff --git a/modules/diamond/manifests/init.pp 
b/modules/diamond/manifests/init.pp
index b993ca6..4354c9a 100644
--- a/modules/diamond/manifests/init.pp
+++ b/modules/diamond/manifests/init.pp
@@ -53,7 +53,7 @@
 #
 
 class diamond(
-$handler   = 'diamond.handler.dastatsd.StatsHandler',
+$handler   = 'diamond.handler.stats_d.StatsdHandler',
 $interval  = '60',
 $path_prefix   = 'servers',
 $keep_logs_for = '5',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8ca4d238be189bcb355c2035f6ba7c32b33d2b67
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Filippo Giunchedi 

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


[MediaWiki-commits] [Gerrit] SaferEdit: SomeOneIsEditing - warning works again - change (mediawiki...BlueSpiceExtensions)

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

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

Change subject: SaferEdit: SomeOneIsEditing - warning works again
..

SaferEdit: SomeOneIsEditing - warning works again

* Reverted: "small fix, now checks for unsaved changes in ajax ping"

Change-Id: Ia09cc0fb9eb1bea05b77811c985151425eadf92a
---
M SaferEdit/SaferEdit.class.php
1 file changed, 1 insertion(+), 2 deletions(-)


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

diff --git a/SaferEdit/SaferEdit.class.php b/SaferEdit/SaferEdit.class.php
index b39b7bf..eafe9c5 100644
--- a/SaferEdit/SaferEdit.class.php
+++ b/SaferEdit/SaferEdit.class.php
@@ -378,8 +378,7 @@
case 'SaferEditIsSomeoneEditing':
$aSingleResult['success'] = true;
$aIntermediateEdits = 
$this->getIntermediateEditsForCurrentTitle( $oTitle );
-   $bHasUnsavedChanges = empty( 
$aData[0]['bUnsavedChanges'] ) || $aData[0]['bUnsavedChanges'] == false ? false 
: true;
-   if ( empty( $aIntermediateEdits ) || 
!$bHasUnsavedChanges ) {
+   if ( empty( $aIntermediateEdits ) ) {
return true;
}
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia09cc0fb9eb1bea05b77811c985151425eadf92a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions
Gerrit-Branch: master
Gerrit-Owner: Pwirth 

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


[MediaWiki-commits] [Gerrit] Add scripts for daily production metrics collection - change (mediawiki...ContentTranslation)

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

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

Change subject: Add scripts for daily production metrics collection
..

Add scripts for daily production metrics collection

Change-Id: Ib15845088cf4ca179bb9d2f51d034b8fad2b8bd9
---
A scripts/daily-stats/count_deletion.sh
A scripts/daily-stats/count_deletion_range.sh
A scripts/daily-stats/count_pairs_on_a_day.sh
3 files changed, 82 insertions(+), 0 deletions(-)


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

diff --git a/scripts/daily-stats/count_deletion.sh 
b/scripts/daily-stats/count_deletion.sh
new file mode 100755
index 000..6e9a17d
--- /dev/null
+++ b/scripts/daily-stats/count_deletion.sh
@@ -0,0 +1,38 @@
+#!/bin/bash
+date=$1
+if [ -z $date ]; then
+   date=`date --date=yesterday +%Y%m%d`
+fi
+
+echo "Deletions on $date"
+
+query="SELECT count(ar_id) FROM \`change_tag\`, \`archive\`, \`user\` WHERE 
ar_timestamp like '$date%' AND ar_namespace = 0 AND ct_tag = 
'contenttranslation' AND ar_rev_id = ct_rev_id AND ar_user = user_id ORDER BY 
NULL;"
+
+total_deletions=0
+
+for language in aa ab ace af ak als am ang an arbcom_de arbcom_en arbcom_fi 
arbcom_nl arc ar arz ast as av ay az azb bar bat_smg ba bcl be_x_old be bg bh 
bi bjn bm bn bo bpy br bs bug bxr ca cbk_zam cdo ceb ce cho chr ch chy ckb co 
crh cr csb cs cu cv cy da de diq dsb dv dz ee el eml en eo es et eu ext fa ff 
fiu_vro fi fj fo frp frr fr fur fy gag gan ga gd glk gl gn gom got gu gv hak ha 
haw he hif hi ho hr hsb ht hu hy hz ia id ie ig ii ik ilo io is it iu ja jbo jv 
kaa kab ka kbd kg ki kj kk kl km kn koi ko krc kr ksh ks ku kv kw ky lad la lbe 
lb lez lg lij li lmo ln lo lrc ltg lt lv mai map_bms mdf mg mhr mh min mi mk ml 
mn mo mrj mr ms mt mus mwl myv my mzn nah nap na nds_nl nds ne new ng nl nn nov 
no nrm nso nv ny oc om or os pag pam pap pa pcd pdc pfl pih pi pl pms pnb pnt 
ps pt qu rm rmy rn roa_rup roa_tara ro rue ru rw sah sa scn sco sc sd se sg sh 
simple si sk sl sm sn so sq srn sr ss stq st su sv sw szl ta ten test test2 tet 
te tg th ti tk tl tn to tpi tr ts tt tum tw tyv ty udm ug uk ur uz vec vep ve 
vi vls vo war wa wg_en wo wuu xal xh xmf yi yo za zea zh_classical zh_min_nan 
zh_yue zh zu
+do
+   db="${language}wiki"
+
+   # Read configuration.
+   . /etc/profile.d/mediawiki.sh
+   MWMULTIDIR=$MEDIAWIKI_DEPLOYMENT_DIR/multiversion
+
+   host=`echo 'echo wfGetLB()->getServerName(0);' | 
/usr/local/bin/mwscript eval.php --wiki="$db"`
+
+   # MySQL user credentials.
+   MU=wikiadmin
+   #MP=`wikiadmin_pass`
+   MP=`echo 'echo \$wgDBadminpassword;' | /usr/local/bin/mwscript eval.php 
--wiki="$db"`
+
+   # Execute mysql.
+   result=`mysql -u $MU -p$MP -h $host -D $db -e "$query" | grep "[0-9]"`
+   if [ $result -ne 0 ]
+   then
+   printf "%-20s %d\n" $db $result
+   ((total_deletions = total_deletions + result))
+   fi
+done
+
+echo "Total deletions for $date: $total_deletions"
+
diff --git a/scripts/daily-stats/count_deletion_range.sh 
b/scripts/daily-stats/count_deletion_range.sh
new file mode 100755
index 000..cb34c3b
--- /dev/null
+++ b/scripts/daily-stats/count_deletion_range.sh
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+firstDay=$1
+lastDay=$2
+
+for date in $(eval echo "{$firstDay..$lastDay}")
+do
+   ./count_deletion.sh $date
+done
+
diff --git a/scripts/daily-stats/count_pairs_on_a_day.sh 
b/scripts/daily-stats/count_pairs_on_a_day.sh
new file mode 100755
index 000..604ea28
--- /dev/null
+++ b/scripts/daily-stats/count_pairs_on_a_day.sh
@@ -0,0 +1,34 @@
+#!/bin/bash
+source_lang=$1
+target_lang=$2
+
+if [ -z $source_lang ] || [ -z $target_lang  ]; then
+   echo "You must specify source and target languages."
+   exit
+fi
+
+date=$3
+if [ -z $date ]; then
+   date=`date --date=yesterday +%Y%m%d`
+fi
+
+echo "Translations from $source_lang to $target_lang on $date"
+
+query_beginning="select count(*) from cx_translations where"
+query_published_cond="(translation_status = 'published' or 
translation_target_url is not null)"
+query_end="translation_source_language = '$source_lang' and 
translation_target_language = '$target_lang' and translation_start_timestamp 
like '$date%';"
+
+published_query="$query_beginning $query_published_cond and $query_end"
+all_query="$query_beginning $query_end"
+
+# MySQL user credentials
+MU=wikiadmin
+MP=`echo 'echo \$wgDBadminpassword;' | /usr/local/bin/mwscript eval.php 
--wiki="enwiki"`
+
+# Execute mysql
+echo "Published:"
+mysql -u $MU -p$MP -h db1029 -D wikishared -e "$published_query"
+
+echo "All:"
+mysql -u $MU -p$MP -h db1029 -D wikishared -e "$all_query"
+

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: 

[MediaWiki-commits] [Gerrit] Avoid superfluous warning - change (wikimedia...golden)

2015-11-23 Thread OliverKeyes (Code Review)
OliverKeyes has uploaded a new change for review.

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

Change subject: Avoid superfluous warning
..

Avoid superfluous warning

With data.tables you can use setnames(x, y_old, y_new) rather than 
names(x[y_old])<-y_new
which is far more efficient. Most importantly, though, it doesn't shout at you.

Change-Id: I8523bbe4502a19f8312c0208354387dda940
---
M search/LDN.R
1 file changed, 3 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/discovery/golden 
refs/changes/63/254863/1

diff --git a/search/LDN.R b/search/LDN.R
index 2c5bdef..e9be3ce 100644
--- a/search/LDN.R
+++ b/search/LDN.R
@@ -23,10 +23,12 @@
   # Get data and format:
   data <- query_func(fields = "SELECT * ", date = date, table = table)
   data$timestamp <- lubridate::ymd_hms(data$timestamp)
+  
   # Backwards-compatibility:
   if ( table == "TestSearchSatisfaction2_14098806" ) {
-names(data) <- sub('event_pageViewId', 'event_pageId', names(data))
+setnames(data, "event_pageViewId", "event_pageId")
   }
+  
   # Treat each individual search session as its own thing, rather than 
belonging
   #   to a set of other search sessions by the same user.
   page_visits <- ddply(data, .(event_searchSessionId, event_pageId),

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8523bbe4502a19f8312c0208354387dda940
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/discovery/golden
Gerrit-Branch: master
Gerrit-Owner: OliverKeyes 

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


[MediaWiki-commits] [Gerrit] Change default time frame for KPI to 30 days - change (wikimedia...rainbow)

2015-11-23 Thread OliverKeyes (Code Review)
OliverKeyes has submitted this change and it was merged.

Change subject: Change default time frame for KPI to 30 days
..


Change default time frame for KPI to 30 days

Change-Id: Ic3890e6aee52ec739f6b6aebb813f33603cc054e
---
M ui.R
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/ui.R b/ui.R
index 26e8de0..ac32202 100644
--- a/ui.R
+++ b/ui.R
@@ -14,7 +14,7 @@
   sidebarMenu(
 menuItem(text = "KPIs",
  div(selectInput("kpi_summary_date_range_selector",
- label = "KPI data range", multiple = FALSE, 
selected = "weekly",
+ label = "KPI data range", multiple = FALSE, 
selected = "monthly",
  choices = list("Yesterday" = "daily", "Last 7 
days" = "weekly",
 "Last 30 days" = "monthly", "Last 
90 days" = "quarterly")),
  style = "margin-bottom:-10px;"),

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic3890e6aee52ec739f6b6aebb813f33603cc054e
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/discovery/rainbow
Gerrit-Branch: master
Gerrit-Owner: Bearloga 
Gerrit-Reviewer: OliverKeyes 

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


[MediaWiki-commits] [Gerrit] Special:Watchlist: Add user preference to "Show last" option... - change (mediawiki/core)

2015-11-23 Thread Code Review
Bartosz Dziewoński has uploaded a new change for review.

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

Change subject: Special:Watchlist: Add user preference to "Show last" options, 
fix float comparison
..

Special:Watchlist: Add user preference to "Show last" options, fix float 
comparison

Also, simplified the "selected" check:
if ( $a == $b ) {
return true;
} else {
return false;
}

doesn't make sense, if you can use:
return $a == $b;

Bug: T119172
Bug: T119181
Change-Id: I16e1713bcd6519695961fcaf094a214954e7769c
(cherry picked from commit b9fbbba4af3e56b504240fc32d1c9199f212)
---
M includes/specials/SpecialWatchlist.php
1 file changed, 19 insertions(+), 4 deletions(-)


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

diff --git a/includes/specials/SpecialWatchlist.php 
b/includes/specials/SpecialWatchlist.php
index 7cc7d5f..3903ee0 100644
--- a/includes/specials/SpecialWatchlist.php
+++ b/includes/specials/SpecialWatchlist.php
@@ -507,21 +507,36 @@
}
 
function cutoffselector( $options ) {
+   $userWatchlistOption = $this->getUser()->getOption( 
'watchlistdays' );
+
$list = array();
$selectOptions = '';
$hours = array( 1, 2, 6, 12 );
$days = array( 1, 3, 7 );
+   // add the user preference, if it isn't available already
+   if ( $userWatchlistOption >= 1 && !in_array( 
$userWatchlistOption, $days ) ) {
+   $days[] = $userWatchlistOption;
+   asort( $days );
+   } elseif ( $userWatchlistOption < 1 && !in_array( 
$userWatchlistOption * 24, $hours ) ) {
+   $hours[] = $userWatchlistOption * 24;
+   asort( $hours );
+   }
foreach ( $hours as $h ) {
-   $name = $this->msg( 'hours', $h );
+   $name = $this->msg( 'hours' )->numParams( $h );
$value = $h / 24;
-   $selected = ( $value == $options['days'] ) ? true : 
false;
+   // due to the possible addition of a user value, it's 
possible, that both
+   // values ($value and $options['days']) are floats with 
unexpected comparison
+   // behaviour. Comparing them directly can result in a 
"not equality" result,
+   // even if the "visible" floats would be the same (e.g. 
if the user value is
+   // float(0.4)). See PHP docs about Comparing floats.
+   $selected = abs( $value - $options['days'] ) < 0.1;
 
$selectOptions .= Xml::option( $name, $value, $selected 
);
}
foreach ( $days as $d ) {
-   $name = $this->msg( 'days', $d );
+   $name = $this->msg( 'days' )->numParams( $d );
$value = $d;
-   $selected = ( $value == $options['days'] ) ? true : 
false;
+   $selected = $value == $options['days'];
 
$selectOptions .= Xml::option( $name, $value, $selected 
);
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I16e1713bcd6519695961fcaf094a214954e7769c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.27.0-wmf.7
Gerrit-Owner: Bartosz Dziewoński 
Gerrit-Reviewer: Florianschmidtwelzow 

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


[MediaWiki-commits] [Gerrit] Labs: Have fileservers no longer nsswitch to LDAP - change (operations/puppet)

2015-11-23 Thread coren (Code Review)
coren has uploaded a new change for review.

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

Change subject: Labs: Have fileservers no longer nsswitch to LDAP
..

Labs: Have fileservers no longer nsswitch to LDAP

This adds a minor tweak to ldap::manifests::client so that a
hiera value can force the system nsswitch.conf to be the distro
default (rather than ours which adds the ldap source); and
sets that variable to true for the labstores.

Bug: T87870
Change-Id: I76d7365e54c63f0668ebda4d7f9a252043be4438
---
M hieradata/eqiad/labstore/fileserver.yaml
M modules/ldap/manifests/client/nss.pp
2 files changed, 9 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/81/254881/1

diff --git a/hieradata/eqiad/labstore/fileserver.yaml 
b/hieradata/eqiad/labstore/fileserver.yaml
index 09e3390..620e069 100644
--- a/hieradata/eqiad/labstore/fileserver.yaml
+++ b/hieradata/eqiad/labstore/fileserver.yaml
@@ -1 +1,2 @@
 use_ldap: true
+nsswitch_use_default: true
diff --git a/modules/ldap/manifests/client/nss.pp 
b/modules/ldap/manifests/client/nss.pp
index 2007e3f..7f5731f 100644
--- a/modules/ldap/manifests/client/nss.pp
+++ b/modules/ldap/manifests/client/nss.pp
@@ -38,9 +38,16 @@
 source  => $nscd_conf,
 }
 
+# Allow hiera to prevent systemwide nsswitch.conf change
+# (more specifically, force the distro default)
+$default_nsswitch = hiera('nsswitch_use_default', false)
+
 file { '/etc/nsswitch.conf':
 notify => Service['nscd'],
-source => 'puppet:///modules/ldap/nsswitch.conf',
+source => $default_nsswitch ? {
+true=> 'file:///usr/share/base-files/nsswitch.conf',
+default => 'puppet:///modules/ldap/nsswitch.conf',
+}
 }
 
 # Allow labs projects to give people custom shells

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

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

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


[MediaWiki-commits] [Gerrit] Add UI to evaluate MLP results - change (mediawiki...MathSearch)

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

Change subject: Add UI to evaluate MLP results
..


Add UI to evaluate MLP results

* Step 1 select a page to evaluate

Change-Id: I81f6b3f756e03ecd85d0505f32748d787d11238b
---
M MathSearch.alias.php
M extension.json
M i18n/en.json
M i18n/qqq.json
A includes/special/SpecialMlpEval.php
A modules/ext.MathSearch.autocomplete.js
R modules/ext.mathsearch.css
7 files changed, 128 insertions(+), 2 deletions(-)

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



diff --git a/MathSearch.alias.php b/MathSearch.alias.php
index 81b4c58..2d11542 100644
--- a/MathSearch.alias.php
+++ b/MathSearch.alias.php
@@ -12,6 +12,7 @@
 /** English (English) */
 $specialPageAliases['en'] = array(
'MathSearch' => array( 'MathSearch', 'Math Search' ),
+   'MlpEval' => array( 'MlpEval', 'Mathematical Language Processing 
Evaluation' ),
'MathDebug' => array( 'MathDebug', 'Math Debug' ),
'FormulaInfo' => array( 'FormulaInfo', 'Formula Info' ),
'GetEquationsByQuery' => array( 'GetEquationsByQuery', 'Get Formulae by 
Query' ),
diff --git a/extension.json b/extension.json
index c304f5a..3975535 100644
--- a/extension.json
+++ b/extension.json
@@ -9,6 +9,7 @@
"AutoloadClasses": {
"MathSearchHooks": "MathSearch.hooks.php",
"SpecialMathSearch": "includes/special/SpecialMathSearch.php",
+   "SpecialMlpEval": "includes/special/SpecialMlpEval.php",
"FormulaInfo": "FormulaInfo.php",
"MathObject": "MathObject.php",
"MathQueryObject": "MathQueryObject.php",
@@ -84,14 +85,24 @@
"desktop",
"mobile"
]
+   },
+   "ext.MathSearch.special": {
+   "scripts": [
+   "ext.MathSearch.autocomplete.js"
+   ],
+   "dependencies": [
+   "jquery.ui.autocomplete"
+   ]
}
+
},
"ResourceFileModulePaths": {
-   "localBasePath": "",
-   "remoteExtPath": "MathSearch"
+   "localBasePath": "modules",
+   "remoteExtPath": "MathSearch/modules"
},
"SpecialPages": {
"MathSearch": "SpecialMathSearch",
+   "MlpEval": "SpecialMlpEval",
"FormulaInfo": "FormulaInfo",
"GetEquationsByQuery": "GetEquationsByQuery",
"MathDebug": "SpecialMathDebug",
diff --git a/i18n/en.json b/i18n/en.json
index 27fe3c1..478f9b3 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -5,6 +5,7 @@
]
},
"mathsearch": "Math search",
+   "mlpeval": "Mathematical Language Processing evaluation",
"formulainfo": "Formula info",
"mathdownload": "Download math search results",
"mathindex": "Math index",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 8b33c9c..7955cd3 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -10,6 +10,7 @@
]
},
"mathsearch": "{{doc-special|MathSearch}}\n\"Math Search\" is the name 
of the MediaWiki extension which integrates the [http://search.mathweb.org/ 
MathWeb Search] engine.\n\nMath Search is used to search for a formula based on 
their MathML representation.\n{{Identical|Math search}}",
+   "mlpeval": "{{doc-special|MlpEval}}\nThe special page \"Mathematical 
Language Processing evaluation\" provides an interface to evaluate the results 
of the MLP tool.",
"formulainfo": "{{doc-special|FormulaInfo}}\nThe special page displays 
technical information about the formula, e.g. the variables it contains and 
information about rendering etc.",
"mathdownload": "{{doc-special|MathDownload}}\nUsers and admins can 
download submissions to the wmc math search search challenge for archival.",
"mathindex": "{{doc-special|MathIndex}}\nThe special page provides a 
user interface to the maintenance scripts to maintain the index for 
mathematical formulae.",
diff --git a/includes/special/SpecialMlpEval.php 
b/includes/special/SpecialMlpEval.php
new file mode 100644
index 000..bea58c6
--- /dev/null
+++ b/includes/special/SpecialMlpEval.php
@@ -0,0 +1,86 @@
+getRequest();
+   $this->setHeaders();
+   $this->selectPageForm()->show();
+   }
+
+   /**
+* Generates the search input form
+*/
+   private function selectPageForm() {
+   $this->getOutput()->addModules( 'ext.MathSearch.special' );
+   $formDescriptor = array(
+   'evalPage' => array(
+   'label' => 'Page to evaluate', # What's the 
label 

[MediaWiki-commits] [Gerrit] Count WD query triples - change (analytics/limn-wikidata-data)

2015-11-23 Thread Addshore (Code Review)
Addshore has uploaded a new change for review.

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

Change subject: Count WD query triples
..

Count WD query triples

Change-Id: Ib1f80d4cedae53e3ad2e0b3ffc7f0b8f4e2ed739
---
M cron
A graphite/sparql/triples.php
2 files changed, 30 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/analytics/limn-wikidata-data 
refs/changes/62/254862/1

diff --git a/cron b/cron
index 73b96e6..8bfe753 100644
--- a/cron
+++ b/cron
@@ -5,6 +5,7 @@
 
 # Run every minuite
 * * * * * php ~/wikidata-data/graphite/dispatch.php
+* * * * * php ~/wikidata-data/graphite/sparql/triples.php
 
 # Daily
 0 5 * * * php ~/wikidata-data/graphite/entityUsage.php
diff --git a/graphite/sparql/triples.php b/graphite/sparql/triples.php
new file mode 100644
index 000..2ee5b95
--- /dev/null
+++ b/graphite/sparql/triples.php
@@ -0,0 +1,29 @@
+execute();
+
+class WikidataSparqlTriples{
+
+   public function execute() {
+   // WDQS currently caches for 120 seconds, avoid this by adding 
whitespace
+   $whiteSpace = str_repeat( ' ', date( 'i' ) );
+
+   $query = "SELECT ( COUNT( * ) AS ?no ) { ?s ?p ?o $whiteSpace}";
+   $response = file_get_contents( 
"https://query.wikidata.org/bigdata/namespace/wdq/sparql?format=json=; . 
urlencode( $query ) );
+
+   if( $response === false ) {
+   throw new RuntimeException( "The request failed!" );
+   }
+
+   $data = json_decode( $response, true );
+   $value = $data['results']['bindings'][0]['no']['value'];
+
+   exec( "echo \"wikidata.query.triples $value `date +%s`\" | nc 
-q0 graphite.eqiad.wmnet 2003" );
+   }
+
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib1f80d4cedae53e3ad2e0b3ffc7f0b8f4e2ed739
Gerrit-PatchSet: 1
Gerrit-Project: analytics/limn-wikidata-data
Gerrit-Branch: master
Gerrit-Owner: Addshore 

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


[MediaWiki-commits] [Gerrit] Factor test presence into augmented clickthrough calculations. - change (wikimedia...golden)

2015-11-23 Thread OliverKeyes (Code Review)
OliverKeyes has uploaded a new change for review.

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

Change subject: Factor test presence into augmented clickthrough calculations.
..

Factor test presence into augmented clickthrough calculations.

What it says on the tin.

Change-Id: I1a9f8550dd4f802095d2ef81cf57cfbb5d7189dd
---
M search/dwelltime.R
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/discovery/golden 
refs/changes/70/254870/1

diff --git a/search/dwelltime.R b/search/dwelltime.R
index 8b15f00..8eaf023 100644
--- a/search/dwelltime.R
+++ b/search/dwelltime.R
@@ -9,7 +9,7 @@
 timestamp",
 date = date,
 table = table,
-conditionals = "event_action 
IN('searchResultPage','visitPage')"))
+conditionals = "event_action 
IN('searchResultPage','visitPage') AND event_subTest IS NULL"))
   data$timestamp <- lubridate::ymd_hms(data$timestamp)
   
   # Generate the data

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1a9f8550dd4f802095d2ef81cf57cfbb5d7189dd
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/discovery/golden
Gerrit-Branch: master
Gerrit-Owner: OliverKeyes 

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


[MediaWiki-commits] [Gerrit] Convert some fields to local variables - change (apps...wikipedia)

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

Change subject: Convert some fields to local variables
..


Convert some fields to local variables

This patch converts some fields to local variables where appropriate, as this
generally improves performance and helps code style and readability.

Change-Id: Ibda77087b2d349c2e1f63450afe6d71c61521cf5
---
M app/src/main/java/org/wikipedia/nearby/NearbyFragment.java
M app/src/main/java/org/wikipedia/page/PageActivity.java
2 files changed, 2 insertions(+), 5 deletions(-)

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



diff --git a/app/src/main/java/org/wikipedia/nearby/NearbyFragment.java 
b/app/src/main/java/org/wikipedia/nearby/NearbyFragment.java
index 222b4ed..c1e9d76 100644
--- a/app/src/main/java/org/wikipedia/nearby/NearbyFragment.java
+++ b/app/src/main/java/org/wikipedia/nearby/NearbyFragment.java
@@ -50,7 +50,6 @@
 
 private Sprite markerIconPassive;
 
-private WikipediaApp app;
 private Site site;
 private NearbyResult lastResult;
 @Nullable private Location currentLocation;
@@ -60,8 +59,7 @@
 @Override
 public void onCreate(Bundle savedInstanceState) {
 super.onCreate(savedInstanceState);
-app = WikipediaApp.getInstance();
-site = app.getPrimarySite();
+site = WikipediaApp.getInstance().getPrimarySite();
 }
 
 @Override
diff --git a/app/src/main/java/org/wikipedia/page/PageActivity.java 
b/app/src/main/java/org/wikipedia/page/PageActivity.java
index 5152b71..e116c13 100644
--- a/app/src/main/java/org/wikipedia/page/PageActivity.java
+++ b/app/src/main/java/org/wikipedia/page/PageActivity.java
@@ -108,7 +108,6 @@
 private View fragmentContainerView;
 private View tabsContainerView;
 private WikiDrawerLayout drawerLayout;
-private NavigationView navDrawer;
 private Menu navMenu;
 private SearchArticlesFragment searchFragment;
 private TextView searchHintText;
@@ -210,7 +209,7 @@
 if (!ApiUtil.hasLollipop()) {
 drawerLayout.setDrawerShadow(R.drawable.nav_drawer_shadow, 
GravityCompat.START);
 }
-navDrawer = (NavigationView) findViewById(R.id.navdrawer);
+NavigationView navDrawer = (NavigationView) 
findViewById(R.id.navdrawer);
 navMenu = navDrawer.getMenu();
 navDrawerHelper = new NavDrawerHelper(this, 
navDrawer.getHeaderView(0));
 
navDrawer.setNavigationItemSelectedListener(navDrawerHelper.getNewListener());

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibda77087b2d349c2e1f63450afe6d71c61521cf5
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Deskana 
Gerrit-Reviewer: BearND 
Gerrit-Reviewer: Brion VIBBER 
Gerrit-Reviewer: Dbrant 
Gerrit-Reviewer: Mholloway 
Gerrit-Reviewer: Niedzielski 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] dib: add zuul to nodepool instances - change (integration/config)

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

Change subject: dib: add zuul to nodepool instances
..


dib: add zuul to nodepool instances

We have a Jessie package for zuul now (T117223) install it in Nodepool
instances so we can start using zuul-cloner.

Bug: T117223
Change-Id: I81379cb264aa590ccd7862480ba7e9805a2d8c27
---
M dib/puppet/ciimage.pp
1 file changed, 4 insertions(+), 0 deletions(-)

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



diff --git a/dib/puppet/ciimage.pp b/dib/puppet/ciimage.pp
index 75e35e7..dd7ad71 100644
--- a/dib/puppet/ciimage.pp
+++ b/dib/puppet/ciimage.pp
@@ -15,6 +15,10 @@
 include contint::packages::python
 include contint::packages::ruby
 
+package { 'zuul':
+  ensure => present,
+}
+
 # Should be include contint::packages::ops once GeoIP is installable
 package { 'etcd':
 ensure => present,

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

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

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


[MediaWiki-commits] [Gerrit] diamond: send statsd metrics in batches - change (operations/puppet)

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

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

Change subject: diamond: send statsd metrics in batches
..

diamond: send statsd metrics in batches

use 'batch' argument to StatsdHandler to send multiple metrics per UDP packet,
see also https://github.com/python-diamond/Diamond/pull/327 which will be
shipped in our internal diamond debian package

Bug: T116033
Change-Id: I9730cd2ff364f638377be42aa681ce4c32ba9efe
---
M modules/diamond/manifests/init.pp
1 file changed, 3 insertions(+), 2 deletions(-)


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

diff --git a/modules/diamond/manifests/init.pp 
b/modules/diamond/manifests/init.pp
index 4354c9a..07b1dfe 100644
--- a/modules/diamond/manifests/init.pp
+++ b/modules/diamond/manifests/init.pp
@@ -59,8 +59,9 @@
 $keep_logs_for = '5',
 $service   = running,
 $settings  = {
-host => 'localhost',
-port => '8125',
+host  => 'localhost',
+port  => '8125',
+batch => '20',
 },
 ) {
 require_package('python-statsd')

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9730cd2ff364f638377be42aa681ce4c32ba9efe
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Filippo Giunchedi 

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


[MediaWiki-commits] [Gerrit] Return from function after redirect - change (mediawiki...DonationInterface)

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

Change subject: Return from function after redirect
..


Return from function after redirect

Prevents unintended fallthrough to fail page redirect, which was
superceding the intended one.

Bug: T118349
Change-Id: Ib25877badb79c1ab1c097fc4fc085d8f9b40e576
---
M globalcollect_gateway/globalcollect_resultswitcher.body.php
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/globalcollect_gateway/globalcollect_resultswitcher.body.php 
b/globalcollect_gateway/globalcollect_resultswitcher.body.php
index c194cb9..d1355e4 100644
--- a/globalcollect_gateway/globalcollect_resultswitcher.body.php
+++ b/globalcollect_gateway/globalcollect_resultswitcher.body.php
@@ -142,6 +142,7 @@
if ( $go ) {
$this->getOutput()->addHTML( 
"Redirecting to page $go" );
$this->getOutput()->redirect( 
$go );
+   return;
} else {
$this->logger->error( 
"Resultswitcher: No redirect defined. Order ID: $oid" );
}

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

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

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


[MediaWiki-commits] [Gerrit] Replace search results on query result, not query request - change (apps...wikipedia)

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

Change subject: Replace search results on query result, not query request
..


Replace search results on query result, not query request

Wait until query results are returned before updating the UI in order
to provide a smoother user experience.

Bug: T113967
Change-Id: I7d84e276df00b9efd1449305d90945c467936347
---
M app/src/main/java/org/wikipedia/search/SearchResultsFragment.java
1 file changed, 3 insertions(+), 6 deletions(-)

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



diff --git a/app/src/main/java/org/wikipedia/search/SearchResultsFragment.java 
b/app/src/main/java/org/wikipedia/search/SearchResultsFragment.java
index 599ce7a..6969c48 100644
--- a/app/src/main/java/org/wikipedia/search/SearchResultsFragment.java
+++ b/app/src/main/java/org/wikipedia/search/SearchResultsFragment.java
@@ -170,8 +170,6 @@
 return;
 }
 
-clearResults();
-
 currentSearchTerm = term;
 
 if (term.isEmpty()) {
@@ -202,7 +200,6 @@
 if (!isAdded()) {
 return true;
 }
-clearResults();
 final String mySearchTerm = (String) msg.obj;
 doTitlePrefixSearch(mySearchTerm);
 return true;
@@ -385,10 +382,10 @@
  * @param results List of results to display. If null, clears the list of 
suggestions & hides it.
  */
 private void displayResults(List results) {
+clearResults();
+
 for (PageTitle newResult : results) {
-if (!totalResults.contains(newResult)) {
-totalResults.add(newResult);
-}
+totalResults.add(newResult);
 }
 
 searchResultsContainer.setVisibility(View.VISIBLE);

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7d84e276df00b9efd1449305d90945c467936347
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Mholloway 
Gerrit-Reviewer: BearND 
Gerrit-Reviewer: Brion VIBBER 
Gerrit-Reviewer: Dbrant 
Gerrit-Reviewer: Niedzielski 
Gerrit-Reviewer: Sniedzielski 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] CX: Enable article-recommender-1 campaign as default - change (operations/mediawiki-config)

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

Change subject: CX: Enable article-recommender-1 campaign as default
..


CX: Enable article-recommender-1 campaign as default

Bug: T118033
Change-Id: I549df847194d469f1b87b6dc00a05d2bae6e93ba
---
M wmf-config/InitialiseSettings.php
1 file changed, 9 insertions(+), 15 deletions(-)

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



diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 0af89e7..bf284bd 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -14904,15 +14904,15 @@
 // CX Campaigns
 'wmgContentTranslationCampaigns' => array(
'default' => array(
-   'newarticle' => true,
+   'article-recommender-1' => true,
'cxstats' => true,
+   'newarticle' => true,
'staff-recommender' => true
),
'cawiki' => array(
'newarticle' => true,
'cxstats' => true,
-   'staff-recommender' => true,
-   'article-recommender-1' => true
+   'staff-recommender' => true
),
'dewiki' => array(
'cxstats' => true,
@@ -14922,40 +14922,34 @@
'enwiki' => array(
'cxstats' => true,
'newarticle' => false,
-   'staff-recommender' => true,
-   'article-recommender-1' => true
+   'staff-recommender' => true
),
'eswiki' => array(
'newarticle' => true,
'cxstats' => true,
'staff-recommender' => true,
-   'eswiki-recommender' => true,
-   'article-recommender-1' => true
+   'eswiki-recommender' => true
),
'fawiki' => array(
'newarticle' => true,
'cxstats' => true,
-   'staff-recommender' => true,
-   'article-recommender-1' => true
+   'staff-recommender' => true
),
'frwiki' => array(
'newarticle' => true,
'cxstats' => true,
'staff-recommender' => true,
-   'frwiki-recommender' => true,
-   'article-recommender-1' => true
+   'frwiki-recommender' => true
),
'itwiki' => array(
'cxstats' => true,
'newarticle' => true,
-   'staff-recommender' => true,
-   'article-recommender-1' => true
+   'staff-recommender' => true
),
'swwiki' => array(
'newarticle' => true,
'cxstats' => true,
-   'staff-recommender' => true,
-   'article-recommender-1' => true
+   'staff-recommender' => true
),
 ),
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I549df847194d469f1b87b6dc00a05d2bae6e93ba
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: KartikMistry 
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: Santhosh 
Gerrit-Reviewer: Thcipriani 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Special:Watchlist: Add user preference to "Show last" option... - change (mediawiki/core)

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

Change subject: Special:Watchlist: Add user preference to "Show last" options, 
fix float comparison
..


Special:Watchlist: Add user preference to "Show last" options, fix float 
comparison

Also, simplified the "selected" check:
if ( $a == $b ) {
return true;
} else {
return false;
}

doesn't make sense, if you can use:
return $a == $b;

Bug: T119172
Bug: T119181
Change-Id: I16e1713bcd6519695961fcaf094a214954e7769c
---
M includes/specials/SpecialWatchlist.php
1 file changed, 19 insertions(+), 4 deletions(-)

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



diff --git a/includes/specials/SpecialWatchlist.php 
b/includes/specials/SpecialWatchlist.php
index 2feaa9e..1d6bfb3 100644
--- a/includes/specials/SpecialWatchlist.php
+++ b/includes/specials/SpecialWatchlist.php
@@ -507,21 +507,36 @@
}
 
function cutoffselector( $options ) {
+   $userWatchlistOption = $this->getUser()->getOption( 
'watchlistdays' );
+
$list = array();
$selectOptions = '';
$hours = array( 1, 2, 6, 12 );
$days = array( 1, 3, 7 );
+   // add the user preference, if it isn't available already
+   if ( $userWatchlistOption >= 1 && !in_array( 
$userWatchlistOption, $days ) ) {
+   $days[] = $userWatchlistOption;
+   asort( $days );
+   } elseif ( $userWatchlistOption < 1 && !in_array( 
$userWatchlistOption * 24, $hours ) ) {
+   $hours[] = $userWatchlistOption * 24;
+   asort( $hours );
+   }
foreach ( $hours as $h ) {
-   $name = $this->msg( 'hours', $h );
+   $name = $this->msg( 'hours' )->numParams( $h );
$value = $h / 24;
-   $selected = ( $value == $options['days'] ) ? true : 
false;
+   // due to the possible addition of a user value, it's 
possible, that both
+   // values ($value and $options['days']) are floats with 
unexpected comparison
+   // behaviour. Comparing them directly can result in a 
"not equality" result,
+   // even if the "visible" floats would be the same (e.g. 
if the user value is
+   // float(0.4)). See PHP docs about Comparing floats.
+   $selected = abs( $value - $options['days'] ) < 0.1;
 
$selectOptions .= Xml::option( $name, $value, $selected 
);
}
foreach ( $days as $d ) {
-   $name = $this->msg( 'days', $d );
+   $name = $this->msg( 'days' )->numParams( $d );
$value = $d;
-   $selected = ( $value == $options['days'] ) ? true : 
false;
+   $selected = $value == $options['days'];
 
$selectOptions .= Xml::option( $name, $value, $selected 
);
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I16e1713bcd6519695961fcaf094a214954e7769c
Gerrit-PatchSet: 6
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Florianschmidtwelzow 
Gerrit-Reviewer: Bartosz Dziewoński 
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: Umherirrender 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Merge branch 'master' into wmf_deploy - change (mediawiki...CentralNotice)

2015-11-23 Thread AndyRussG (Code Review)
AndyRussG has uploaded a new change for review.

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

Change subject: Merge branch 'master' into wmf_deploy
..

Merge branch 'master' into wmf_deploy

Change-Id: I788a7e18ba3d1b70cc07fe6c8ea7904af9cc4c7a
---
0 files changed, 0 insertions(+), 0 deletions(-)


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


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

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

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


[MediaWiki-commits] [Gerrit] Remove more erbium related udp2log stuff - change (operations/puppet)

2015-11-23 Thread Ottomata (Code Review)
Ottomata has submitted this change and it was merged.

Change subject: Remove more erbium related udp2log stuff
..


Remove more erbium related udp2log stuff

Bug: T84062
Bug: T118325
Bug: T97294
Change-Id: I0fd0f200884f5480cc669ca8f6d7c8a676416899
---
M modules/role/manifests/cache/logging.pp
M modules/statistics/manifests/rsync/webrequest.pp
M modules/varnish/manifests/logging.pp
3 files changed, 2 insertions(+), 30 deletions(-)

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



diff --git a/modules/role/manifests/cache/logging.pp 
b/modules/role/manifests/cache/logging.pp
index 4362ee8..4360730 100644
--- a/modules/role/manifests/cache/logging.pp
+++ b/modules/role/manifests/cache/logging.pp
@@ -13,6 +13,7 @@
 listener_address => '10.64.32.135',
 port => '8419',
 cli_args => $cliargs,
+ensure   => 'absent',
 }
 }
 }
diff --git a/modules/statistics/manifests/rsync/webrequest.pp 
b/modules/statistics/manifests/rsync/webrequest.pp
index efd90fc..c9d2f83 100644
--- a/modules/statistics/manifests/rsync/webrequest.pp
+++ b/modules/statistics/manifests/rsync/webrequest.pp
@@ -47,34 +47,4 @@
 destination=> "${working_path}/log/webrequest/archive",
 retention_days => 90, # Pruning after 90 days as those logs contain 
private data.
 }
-
-
-# NOTE: The following jobs may be removed once they are all
-#   ensured to be absent.
-
-
-# The following logs can be
-# API logs from erbium
-statistics::rsync_job { 'api':
-source  => 
'erbium.eqiad.wmnet::udp2log/webrequest/archive/api-usage*.gz',
-destination => "${working_path}/squid/archive/api",
-# udp2log on eribum has been disabled
-ensure  => 'absent'
-}
-
-# sampled-1000 logs from erbium
-statistics::rsync_job { 'sampled_1000':
-source  => 
'erbium.eqiad.wmnet::udp2log/webrequest/archive/sampled-1000*.gz',
-destination => "${working_path}/squid/archive/sampled",
-# udp2log on eribum has been disabled
-ensure  => 'absent'
-}
-
-# glam_nara logs from erbium
-statistics::rsync_job { 'glam_nara':
-source  => 
'erbium.eqiad.wmnet::udp2log/webrequest/archive/glam_nara*.gz',
-destination => "${working_path}/squid/archive/glam_nara",
-# udp2log on eribum has been disabled
-ensure  => 'absent'
-}
 }
diff --git a/modules/varnish/manifests/logging.pp 
b/modules/varnish/manifests/logging.pp
index 30a556a..aa59774 100644
--- a/modules/varnish/manifests/logging.pp
+++ b/modules/varnish/manifests/logging.pp
@@ -33,6 +33,7 @@
 nrpe::monitor_service { "varnishncsa-${name}":
 description  => "Varnish traffic logger - ${name}",
 nrpe_command => "/usr/lib/nagios/plugins/check_procs -c 1:1 -a 
varnishncsa-${name}.pid -u varnishlog",
+ensure => $ensure
 }
 }
 }

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

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

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


[MediaWiki-commits] [Gerrit] Merge branch 'master' into wmf_deploy - change (mediawiki...CentralNotice)

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

Change subject: Merge branch 'master' into wmf_deploy
..


Merge branch 'master' into wmf_deploy

Change-Id: I788a7e18ba3d1b70cc07fe6c8ea7904af9cc4c7a
---
0 files changed, 0 insertions(+), 0 deletions(-)

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




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

Gerrit-MessageType: merged
Gerrit-Change-Id: I788a7e18ba3d1b70cc07fe6c8ea7904af9cc4c7a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CentralNotice
Gerrit-Branch: wmf_deploy
Gerrit-Owner: AndyRussG 
Gerrit-Reviewer: AndyRussG 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Labs: switch labstore NFS server to explicit LDAP - change (operations/puppet)

2015-11-23 Thread coren (Code Review)
coren has submitted this change and it was merged.

Change subject: Labs: switch labstore NFS server to explicit LDAP
..


Labs: switch labstore NFS server to explicit LDAP

In the expectation that LDAP can be removed from  the systemwide
config.

Change-Id: Ib49489ab31ec61b582ed4070a6124c43db7cd19b
---
M modules/labstore/manifests/fileserver.pp
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/modules/labstore/manifests/fileserver.pp 
b/modules/labstore/manifests/fileserver.pp
index 84fcf64..24eae6e 100644
--- a/modules/labstore/manifests/fileserver.pp
+++ b/modules/labstore/manifests/fileserver.pp
@@ -23,6 +23,7 @@
 require_package('lvm2')
 require_package('python3-paramiko')
 require_package('python3-pymysql')
+require_package('nfsd-ldap')
 
 file { '/etc/replication-rsync.conf':
 source => 'puppet:///modules/labstore/replication-rsync.conf',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib49489ab31ec61b582ed4070a6124c43db7cd19b
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: coren 
Gerrit-Reviewer: ArielGlenn 
Gerrit-Reviewer: coren 
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 OOjs UI PopupElement for "Skip tutorial" checkbox - change (mediawiki...UploadWizard)

2015-11-23 Thread Code Review
Bartosz Dziewoński has uploaded a new change for review.

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

Change subject: Use OOjs UI PopupElement for "Skip tutorial" checkbox
..

Use OOjs UI PopupElement for "Skip tutorial" checkbox

Bug: T119385
Change-Id: I1f091e91aea925d4c82521238fb801a19c29b9ed
---
M UploadWizardHooks.php
A resources/ui/uw.ui.Tutorial.css
M resources/ui/uw.ui.Tutorial.js
3 files changed, 57 insertions(+), 28 deletions(-)


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

diff --git a/UploadWizardHooks.php b/UploadWizardHooks.php
index e183b13..6281a17 100644
--- a/UploadWizardHooks.php
+++ b/UploadWizardHooks.php
@@ -671,6 +671,9 @@
'scripts' => array(
'resources/ui/uw.ui.Tutorial.js',
),
+   'styles' => array(
+   'resources/ui/uw.ui.Tutorial.css',
+   ),
 
'dependencies' => array(
'oojs',
diff --git a/resources/ui/uw.ui.Tutorial.css b/resources/ui/uw.ui.Tutorial.css
new file mode 100644
index 000..ba35604
--- /dev/null
+++ b/resources/ui/uw.ui.Tutorial.css
@@ -0,0 +1,16 @@
+/* Position the popup */
+#mwe-upwiz-skip {
+   position: relative;
+}
+
+#mwe-upwiz-skip .oo-ui-popupWidget {
+   position: absolute;
+   left: 50%;
+}
+
+/* Override some silly styles */
+#mwe-upwiz-skip .oo-ui-popupWidget,
+#mwe-upwiz-skip .oo-ui-popupWidget * {
+   white-space: normal;
+   text-align: left;
+}
diff --git a/resources/ui/uw.ui.Tutorial.js b/resources/ui/uw.ui.Tutorial.js
index 72bad60..9d187f6 100644
--- a/resources/ui/uw.ui.Tutorial.js
+++ b/resources/ui/uw.ui.Tutorial.js
@@ -17,6 +17,31 @@
 
 ( function ( mw, $, uw, OO ) {
/**
+* Checkbox with popup information.
+*/
+   function PopupCheckboxInputWidget( config ) {
+   // Parent constructor
+   PopupCheckboxInputWidget.parent.call( this, config );
+
+   // Mixin constructors
+   OO.ui.mixin.PopupElement.call( this, config );
+
+   // Events
+   this.connect( this, { change: 'onChange' } );
+
+   // Initialization
+   this.$element
+   .addClass( 'oo-ui-popupCheckboxInputWidget' )
+   .attr( 'aria-haspopup', 'true' )
+   .append( this.popup.$element );
+   }
+   OO.inheritClass( PopupCheckboxInputWidget, OO.ui.CheckboxInputWidget );
+   OO.mixinClass( PopupCheckboxInputWidget, OO.ui.mixin.PopupElement );
+   PopupCheckboxInputWidget.prototype.onChange = function () {
+   this.popup.toggle( this.isSelected() );
+   };
+   
+   /**
 * Represents the UI for the wizard's Tutorial step.
 *
 * @class uw.ui.Tutorial
@@ -33,38 +58,27 @@
);
 
// 'Skip tutorial' checkbox
-   this.skipCheckbox = new OO.ui.CheckboxInputWidget( {
-   id: 'mwe-upwiz-skip'
+   this.skipCheckbox = new PopupCheckboxInputWidget( {
+   id: 'mwe-upwiz-skip',
+   // Add a friendly "Here's how to get it back" tooltip 
for users who check the "Skip next time" checkbox
+   popup: {
+   $content: $( '' ).msg(
+   'mwe-upwiz-tooltip-skiptutorial',
+   mw.config.get( 'wgServer' ) + 
mw.util.getUrl( 'Special:Preferences' ) + '#mw-prefsection-uploads',
+   mw.message( 'prefs-uploads' ).escaped(),
+   mw.message( 'prefs-upwiz-interface' 
).escaped()
+   ),
+   autoClose: false,
+   padded: true
+   }
} );
this.skipCheckboxLabel = new OO.ui.LabelWidget( {
input: this.skipCheckbox,
label: mw.message( 'mwe-upwiz-skip-tutorial-future' 
).text()
} );
 
-   this.skipCheckbox.$element
-   // Add a friendly "Here's how to get it back" tooltip 
for users who check the "Skip next time" checkbox
-   .tipsy( {
-   title: function () {
-   return mw.message(
-   
'mwe-upwiz-tooltip-skiptutorial',
-   mw.config.get( 'wgServer' ) + 
mw.util.getUrl( 'Special:Preferences' ) + '#mw-prefsection-uploads',
-   mw.message( 'prefs-uploads' 
).escaped(),
-   

[MediaWiki-commits] [Gerrit] Remove dependency on jquery.tipsy - change (mediawiki...UploadWizard)

2015-11-23 Thread Code Review
Bartosz Dziewoński has uploaded a new change for review.

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

Change subject: Remove dependency on jquery.tipsy
..

Remove dependency on jquery.tipsy

No longer used.

Bug: T115637
Change-Id: Ie36b464cd5232eb53a90261b8aa1e9270697363e
---
M UploadWizardHooks.php
1 file changed, 0 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UploadWizard 
refs/changes/69/254869/1

diff --git a/UploadWizardHooks.php b/UploadWizardHooks.php
index 6281a17..2f2362f 100644
--- a/UploadWizardHooks.php
+++ b/UploadWizardHooks.php
@@ -21,7 +21,6 @@
'jquery.spinner',
'jquery.ui.selectable',
'jquery.placeholder',
-   'jquery.tipsy',
'jquery.makeCollapsible',
'mediawiki.Uri',
'mediawiki.util',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie36b464cd5232eb53a90261b8aa1e9270697363e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UploadWizard
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński 

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


[MediaWiki-commits] [Gerrit] Change default time frame for KPI to 30 days - change (wikimedia...rainbow)

2015-11-23 Thread Bearloga (Code Review)
Bearloga has uploaded a new change for review.

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

Change subject: Change default time frame for KPI to 30 days
..

Change default time frame for KPI to 30 days

Change-Id: Ic3890e6aee52ec739f6b6aebb813f33603cc054e
---
M ui.R
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/discovery/rainbow 
refs/changes/79/254879/1

diff --git a/ui.R b/ui.R
index 26e8de0..ac32202 100644
--- a/ui.R
+++ b/ui.R
@@ -14,7 +14,7 @@
   sidebarMenu(
 menuItem(text = "KPIs",
  div(selectInput("kpi_summary_date_range_selector",
- label = "KPI data range", multiple = FALSE, 
selected = "weekly",
+ label = "KPI data range", multiple = FALSE, 
selected = "monthly",
  choices = list("Yesterday" = "daily", "Last 7 
days" = "weekly",
 "Last 30 days" = "monthly", "Last 
90 days" = "quarterly")),
  style = "margin-bottom:-10px;"),

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic3890e6aee52ec739f6b6aebb813f33603cc054e
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/discovery/rainbow
Gerrit-Branch: master
Gerrit-Owner: Bearloga 

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


[MediaWiki-commits] [Gerrit] Update CentralNotice - change (mediawiki/core)

2015-11-23 Thread AndyRussG (Code Review)
AndyRussG has uploaded a new change for review.

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

Change subject: Update CentralNotice
..

Update CentralNotice

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


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/65/254865/1

diff --git a/extensions/CentralNotice b/extensions/CentralNotice
index fb922ed..dac9dd3 16
--- a/extensions/CentralNotice
+++ b/extensions/CentralNotice
-Subproject commit fb922edfae7c550c34bfcd6b227faf5bd51c0d6c
+Subproject commit dac9dd324e22eb67a0ada98fa84d6cdc1f2cd065

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I807986b1561f13735e80a5b80070969cddd145d8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.27.0-wmf.7
Gerrit-Owner: AndyRussG 

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


[MediaWiki-commits] [Gerrit] dib: add zuul to nodepool instances - change (integration/config)

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

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

Change subject: dib: add zuul to nodepool instances
..

dib: add zuul to nodepool instances

We have a Jessie package for zuul now (T117223) install it in Nodepool
instances so we can start using zuul-cloner.

Bug: T117223
Change-Id: I81379cb264aa590ccd7862480ba7e9805a2d8c27
---
M dib/puppet/ciimage.pp
1 file changed, 4 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/71/254871/1

diff --git a/dib/puppet/ciimage.pp b/dib/puppet/ciimage.pp
index 75e35e7..dd7ad71 100644
--- a/dib/puppet/ciimage.pp
+++ b/dib/puppet/ciimage.pp
@@ -15,6 +15,10 @@
 include contint::packages::python
 include contint::packages::ruby
 
+package { 'zuul':
+  ensure => present,
+}
+
 # Should be include contint::packages::ops once GeoIP is installable
 package { 'etcd':
 ensure => present,

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

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

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


[MediaWiki-commits] [Gerrit] minor adyen iframe css changes - change (mediawiki...DonationInterface)

2015-11-23 Thread Cdentinger (Code Review)
Cdentinger has uploaded a new change for review.

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

Change subject: minor adyen iframe css changes
..

minor adyen iframe css changes

diff is noisy cause file is full of windows newlines

Change-Id: I65c62c2446f3513afd53e98d48f666bb99f1570c
---
M adyen_gateway/forms/css/iframe.screen.css
1 file changed, 60 insertions(+), 46 deletions(-)


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

diff --git a/adyen_gateway/forms/css/iframe.screen.css 
b/adyen_gateway/forms/css/iframe.screen.css
index 690c9ec..ba45697 100644
--- a/adyen_gateway/forms/css/iframe.screen.css
+++ b/adyen_gateway/forms/css/iframe.screen.css
@@ -6,9 +6,24 @@
 }
 
 /* Match input styling */
-input[type="text"] {
-   border: 1px solid #C0C0C0;
-   padding: 3px;
+input[type="text"], select {
+   background-color: #f6f6f6;
+   padding: 1em !important;
+   -moz-box-shadow: 0 1px 1px rgba(0, 0, 0, .2), inset 0 0 0 1px rgba(0, 
0, 0, .1);
+   -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, .2), inset 0 0 0 1px 
rgba(0, 0, 0, .1);
+   box-shadow: 0 1px 1px rgba(0, 0, 0, .2), inset 0 0 0 1px rgba(0, 0, 0, 
.1);
+   -moz-border-radius: 4px;
+   -webkit-border-radius: 4px;
+   border-radius: 4px;
+   border: 0 !important;
+   color: #006699;
+   cursor: pointer;
+   margin-bottom: .2em;
+   -webkit-transition: all .3s ease-in-out;
+   -moz-transition:all .3s ease-in-out;
+   -o-transition:  all .3s ease-in-out;
+   -ms-transition: all .3s ease-in-out;
+   transition: all .3s ease-in-out;
 }
 
 #card\.cardNumber, #card\.cardHolderName {
@@ -40,7 +55,6 @@
font-size: 80%;
 }
 
-
 html {
height: 100%;
max-height: 100%;
@@ -49,8 +63,8 @@
 }
 
 body {
-   color: #00;
-   background-color: #CCE7CD;
+   color: #7c7c7c;
+   padding: 2%;
 }
 
 /* Main Elements */
@@ -523,59 +537,59 @@
 /* ivr specific css */
 
 .ivricon {
-display: block;
-margin-right: 10px;
-float: left;
+   display: block;
+   margin-right: 10px;
+   float: left;
 }
 .ivrmessage {
-display: block;
-font-weight: bold;
+   display: block;
+   font-weight: bold;
 }
 .ivrdetail {
-display: block;
-margin-top: 5px;
-font-weight: bold;
-font-family: arial, sans-serif;
+   display: block;
+   margin-top: 5px;
+   font-weight: bold;
+   font-family: arial, sans-serif;
 }
 
 
 #phoneNumber .ivrdetail {
-color: #57A022;
-font-size: 2.4em;
+   color: #57A022;
+   font-size: 2.4em;
 }
 
 #payCode .ivrdetail {
-color: #1F5F98;
-font-size: 2.4em;
+   color: #1F5F98;
+   font-size: 2.4em;
 }
 #timeToCall .ivrmessage {
-font-weight: normal;
-line-height: 1.1em;
+   font-weight: normal;
+   line-height: 1.1em;
 }
 
 #timeToCall .ivrmessage .phoneDetails, #timeLeft {
-font-weight: bold;
-color:  #57A022;
-font-family: arial, sans-serif;
+   font-weight: bold;
+   color:  #57A022;
+   font-family: arial, sans-serif;
 }
 
 
 .progressW {
-width: 400px; 
-margin-left: 50px; 
-padding: 1px;
-border: 1px solid #666;
-background-color: transparent
+   width: 400px; 
+   margin-left: 50px; 
+   padding: 1px;
+   border: 1px solid #666;
+   background-color: transparent
 }
 .progress {
-width: 0px;
-font-size: 1px;
-height: 14px;
-margin: 0px;
-padding:0px;
-background-color: #66C931;
-background-image: url(/hpp/img/progress3.png);
-background-repeat: repeat-x;
+   width: 0px;
+   font-size: 1px;
+   height: 14px;
+   margin: 0px;
+   padding:0px;
+   background-color: #66C931;
+   background-image: url(/hpp/img/progress3.png);
+   background-repeat: repeat-x;
 }
 
 .ebanking_FIFrame {
@@ -584,21 +598,21 @@
 }
 
 .ebanking_FIHeader {
-font-weight:bold;
-margin-bottom:  5px;
-margin-top: 5px;
-color:  #1678A5;
+   font-weight:bold;
+   margin-bottom:  5px;
+   margin-top: 5px;
+   color:  #1678A5;
 }
 
 .ebanking_FIText {
-padding:5px;
+   padding:5px;
 }
 
 .invoicestat {
-width: 55%;
-border: 2px solid black;
-font-family: courier, monospace;
-padding: 17px 10px 17px 61px;
+   width: 55%;
+   border: 2px solid black;
+   font-family: courier, monospace;
+   padding: 17px 10px 17px 61px;
 }
 
 .invoicestatPaid  { border-color: green; background-color: #efe; }  

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: 

[MediaWiki-commits] [Gerrit] Avoid superfluous warning - change (wikimedia...golden)

2015-11-23 Thread Bearloga (Code Review)
Bearloga has submitted this change and it was merged.

Change subject: Avoid superfluous warning
..


Avoid superfluous warning

With data.tables you can use setnames(x, y_old, y_new) rather than 
names(x[y_old])<-y_new
which is far more efficient. Most importantly, though, it doesn't shout at you.

Change-Id: I8523bbe4502a19f8312c0208354387dda940
---
M search/LDN.R
1 file changed, 3 insertions(+), 1 deletion(-)

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



diff --git a/search/LDN.R b/search/LDN.R
index 2c5bdef..e9be3ce 100644
--- a/search/LDN.R
+++ b/search/LDN.R
@@ -23,10 +23,12 @@
   # Get data and format:
   data <- query_func(fields = "SELECT * ", date = date, table = table)
   data$timestamp <- lubridate::ymd_hms(data$timestamp)
+  
   # Backwards-compatibility:
   if ( table == "TestSearchSatisfaction2_14098806" ) {
-names(data) <- sub('event_pageViewId', 'event_pageId', names(data))
+setnames(data, "event_pageViewId", "event_pageId")
   }
+  
   # Treat each individual search session as its own thing, rather than 
belonging
   #   to a set of other search sessions by the same user.
   page_visits <- ddply(data, .(event_searchSessionId, event_pageId),

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8523bbe4502a19f8312c0208354387dda940
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/discovery/golden
Gerrit-Branch: master
Gerrit-Owner: OliverKeyes 
Gerrit-Reviewer: Bearloga 

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


[MediaWiki-commits] [Gerrit] Add sparql lag to metrics - change (analytics/limn-wikidata-data)

2015-11-23 Thread Addshore (Code Review)
Addshore has uploaded a new change for review.

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

Change subject: Add sparql lag to metrics
..

Add sparql lag to metrics

Change-Id: I896987ae92826e5d4a9b14d9e77a442a2f71aae1
---
M cron
A graphite/sparql/minutely.php
D graphite/sparql/triples.php
3 files changed, 57 insertions(+), 30 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/analytics/limn-wikidata-data 
refs/changes/76/254876/1

diff --git a/cron b/cron
index 8bfe753..a3b5b76 100644
--- a/cron
+++ b/cron
@@ -5,7 +5,7 @@
 
 # Run every minuite
 * * * * * php ~/wikidata-data/graphite/dispatch.php
-* * * * * php ~/wikidata-data/graphite/sparql/triples.php
+* * * * * php ~/wikidata-data/graphite/sparql/minutely.php
 
 # Daily
 0 5 * * * php ~/wikidata-data/graphite/entityUsage.php
diff --git a/graphite/sparql/minutely.php b/graphite/sparql/minutely.php
new file mode 100644
index 000..7b0940e
--- /dev/null
+++ b/graphite/sparql/minutely.php
@@ -0,0 +1,56 @@
+execute();
+
+class WikidataSparqlTriples{
+
+   public function execute() {
+   // WDQS currently caches for 120 seconds, avoid this by adding 
whitespace
+   $whitespace = str_repeat( ' ', date( 'i' ) );
+
+   $query = "prefix schema: ";
+   $query .= "SELECT * WHERE { {";
+   $query .= "SELECT ( COUNT( * ) AS ?count ) { ?s ?p ?o } ";
+   $query .= "} UNION {";
+   $query .= "SELECT * WHERE {  
schema:dateModified ?y }";
+   $query .= "} $whitespace }";
+
+   $response = $this->file_get_contents( 
"https://query.wikidata.org/bigdata/namespace/wdq/sparql?format=json=; . 
urlencode( $query ) );
+
+   if( $response === false ) {
+   throw new RuntimeException( "The request failed!" );
+   }
+
+   $data = json_decode( $response, true );
+
+   $tripleCount = 
$data['results']['bindings'][0]['count']['value'];
+   exec( "echo \"wikidata.query.triples $tripleCount `date +%s`\" 
| nc -q0 graphite.eqiad.wmnet 2003" );
+
+   $lastUpdated = $data['results']['bindings'][1]['y']['value'];
+   $lag = time() - strtotime( $lastUpdated );
+   exec( "echo \"wikidata.query.lag $lag `date +%s`\" | nc -q0 
graphite.eqiad.wmnet 2003" );
+   }
+
+   private function file_get_contents( $filename ) {
+   $opts = array(
+   'http' => array(
+   'method' => "GET",
+   'header' => "User-Agent: WMDE Wikidata metrics 
gathering\r\n",
+   ),
+   );
+
+   $context = stream_context_create( $opts );
+
+   return file_get_contents( $filename, false, $context );
+   }
+
+}
diff --git a/graphite/sparql/triples.php b/graphite/sparql/triples.php
deleted file mode 100644
index 2ee5b95..000
--- a/graphite/sparql/triples.php
+++ /dev/null
@@ -1,29 +0,0 @@
-execute();
-
-class WikidataSparqlTriples{
-
-   public function execute() {
-   // WDQS currently caches for 120 seconds, avoid this by adding 
whitespace
-   $whiteSpace = str_repeat( ' ', date( 'i' ) );
-
-   $query = "SELECT ( COUNT( * ) AS ?no ) { ?s ?p ?o $whiteSpace}";
-   $response = file_get_contents( 
"https://query.wikidata.org/bigdata/namespace/wdq/sparql?format=json=; . 
urlencode( $query ) );
-
-   if( $response === false ) {
-   throw new RuntimeException( "The request failed!" );
-   }
-
-   $data = json_decode( $response, true );
-   $value = $data['results']['bindings'][0]['no']['value'];
-
-   exec( "echo \"wikidata.query.triples $value `date +%s`\" | nc 
-q0 graphite.eqiad.wmnet 2003" );
-   }
-
-}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I896987ae92826e5d4a9b14d9e77a442a2f71aae1
Gerrit-PatchSet: 1
Gerrit-Project: analytics/limn-wikidata-data
Gerrit-Branch: master
Gerrit-Owner: Addshore 

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


[MediaWiki-commits] [Gerrit] Add sparql lag to metrics - change (analytics/limn-wikidata-data)

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

Change subject: Add sparql lag to metrics
..


Add sparql lag to metrics

Change-Id: I896987ae92826e5d4a9b14d9e77a442a2f71aae1
---
M cron
A graphite/sparql/minutely.php
D graphite/sparql/triples.php
3 files changed, 57 insertions(+), 30 deletions(-)

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



diff --git a/cron b/cron
index 8bfe753..a3b5b76 100644
--- a/cron
+++ b/cron
@@ -5,7 +5,7 @@
 
 # Run every minuite
 * * * * * php ~/wikidata-data/graphite/dispatch.php
-* * * * * php ~/wikidata-data/graphite/sparql/triples.php
+* * * * * php ~/wikidata-data/graphite/sparql/minutely.php
 
 # Daily
 0 5 * * * php ~/wikidata-data/graphite/entityUsage.php
diff --git a/graphite/sparql/minutely.php b/graphite/sparql/minutely.php
new file mode 100644
index 000..7b0940e
--- /dev/null
+++ b/graphite/sparql/minutely.php
@@ -0,0 +1,56 @@
+execute();
+
+class WikidataSparqlTriples{
+
+   public function execute() {
+   // WDQS currently caches for 120 seconds, avoid this by adding 
whitespace
+   $whitespace = str_repeat( ' ', date( 'i' ) );
+
+   $query = "prefix schema: ";
+   $query .= "SELECT * WHERE { {";
+   $query .= "SELECT ( COUNT( * ) AS ?count ) { ?s ?p ?o } ";
+   $query .= "} UNION {";
+   $query .= "SELECT * WHERE {  
schema:dateModified ?y }";
+   $query .= "} $whitespace }";
+
+   $response = $this->file_get_contents( 
"https://query.wikidata.org/bigdata/namespace/wdq/sparql?format=json=; . 
urlencode( $query ) );
+
+   if( $response === false ) {
+   throw new RuntimeException( "The request failed!" );
+   }
+
+   $data = json_decode( $response, true );
+
+   $tripleCount = 
$data['results']['bindings'][0]['count']['value'];
+   exec( "echo \"wikidata.query.triples $tripleCount `date +%s`\" 
| nc -q0 graphite.eqiad.wmnet 2003" );
+
+   $lastUpdated = $data['results']['bindings'][1]['y']['value'];
+   $lag = time() - strtotime( $lastUpdated );
+   exec( "echo \"wikidata.query.lag $lag `date +%s`\" | nc -q0 
graphite.eqiad.wmnet 2003" );
+   }
+
+   private function file_get_contents( $filename ) {
+   $opts = array(
+   'http' => array(
+   'method' => "GET",
+   'header' => "User-Agent: WMDE Wikidata metrics 
gathering\r\n",
+   ),
+   );
+
+   $context = stream_context_create( $opts );
+
+   return file_get_contents( $filename, false, $context );
+   }
+
+}
diff --git a/graphite/sparql/triples.php b/graphite/sparql/triples.php
deleted file mode 100644
index 2ee5b95..000
--- a/graphite/sparql/triples.php
+++ /dev/null
@@ -1,29 +0,0 @@
-execute();
-
-class WikidataSparqlTriples{
-
-   public function execute() {
-   // WDQS currently caches for 120 seconds, avoid this by adding 
whitespace
-   $whiteSpace = str_repeat( ' ', date( 'i' ) );
-
-   $query = "SELECT ( COUNT( * ) AS ?no ) { ?s ?p ?o $whiteSpace}";
-   $response = file_get_contents( 
"https://query.wikidata.org/bigdata/namespace/wdq/sparql?format=json=; . 
urlencode( $query ) );
-
-   if( $response === false ) {
-   throw new RuntimeException( "The request failed!" );
-   }
-
-   $data = json_decode( $response, true );
-   $value = $data['results']['bindings'][0]['no']['value'];
-
-   exec( "echo \"wikidata.query.triples $value `date +%s`\" | nc 
-q0 graphite.eqiad.wmnet 2003" );
-   }
-
-}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I896987ae92826e5d4a9b14d9e77a442a2f71aae1
Gerrit-PatchSet: 1
Gerrit-Project: analytics/limn-wikidata-data
Gerrit-Branch: master
Gerrit-Owner: Addshore 
Gerrit-Reviewer: Addshore 

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


[MediaWiki-commits] [Gerrit] Fix nsswitch_use_default to a string - change (operations/puppet)

2015-11-23 Thread coren (Code Review)
coren has uploaded a new change for review.

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

Change subject: Fix nsswitch_use_default to a string
..

Fix nsswitch_use_default to a string

hiera() returns strings unconditionally so comparisons to true
fails.  Because it would be extra confusing if we compared to 'true'
we switch the required value to 'yes' instead.

Bug: T87870
Change-Id: Iad63049f8ccfab1a1c2c68b1daceb90b1ed67844
---
M hieradata/eqiad/labstore/fileserver.yaml
M modules/ldap/manifests/client/nss.pp
2 files changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/hieradata/eqiad/labstore/fileserver.yaml 
b/hieradata/eqiad/labstore/fileserver.yaml
index 620e069..e696130 100644
--- a/hieradata/eqiad/labstore/fileserver.yaml
+++ b/hieradata/eqiad/labstore/fileserver.yaml
@@ -1,2 +1,2 @@
 use_ldap: true
-nsswitch_use_default: true
+nsswitch_use_default: yes
diff --git a/modules/ldap/manifests/client/nss.pp 
b/modules/ldap/manifests/client/nss.pp
index 7988237..6f85bce 100644
--- a/modules/ldap/manifests/client/nss.pp
+++ b/modules/ldap/manifests/client/nss.pp
@@ -41,7 +41,7 @@
 # Allow hiera to prevent systemwide nsswitch.conf change
 # (more specifically, force the distro default)
 $nsswitch_source = hiera('nsswitch_use_default', false)? {
-true=> 'file:///usr/share/base-files/nsswitch.conf',
+'yes'   => 'file:///usr/share/base-files/nsswitch.conf',
 default => 'puppet:///modules/ldap/nsswitch.conf',
 }
 

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

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

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


[MediaWiki-commits] [Gerrit] [WIP] Add new form for launching the global metrics report - change (analytics/wikimetrics)

2015-11-23 Thread Madhuvishy (Code Review)
Madhuvishy has uploaded a new change for review.

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

Change subject: [WIP] Add new form for launching the global metrics report
..

[WIP] Add new form for launching the global metrics report

Change-Id: I58091cc0c8f41a26d8021e4b3a5a8595993fca31
---
A wikimetrics/forms/global_metrics_form.py
A wikimetrics/static/js/globalReportUpload.js
M wikimetrics/static/js/reportCreate.js
M wikimetrics/static/js/site.js
A wikimetrics/templates/forms/global_report_upload.html
A wikimetrics/templates/global_reports.html
6 files changed, 144 insertions(+), 17 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/analytics/wikimetrics 
refs/changes/87/254887/1

diff --git a/wikimetrics/forms/global_metrics_form.py 
b/wikimetrics/forms/global_metrics_form.py
new file mode 100644
index 000..d5dcfce
--- /dev/null
+++ b/wikimetrics/forms/global_metrics_form.py
@@ -0,0 +1,26 @@
+import uuid
+
+from flask import g
+from wikimetrics.configurables import db
+from wtforms import HiddenField
+from wikimetrics.forms.fields import BetterBooleanField, BetterDateTimeField
+from wtforms.validators import Required
+from wikimetrics.forms.validators import NotGreater
+from wikimetrics.utils import parse_username, thirty_days_ago, today, 
format_pretty_date
+from cohort_upload import CohortUpload
+from validators import (
+CohortNameUnused, CohortNameLegalCharacters, ProjectExists, RequiredIfNot
+)
+
+
+class GlobalMetricsForm(CohortUpload):
+"""
+Defines the fields necessary to upload inputs to calculate
+the global metrics
+"""
+# Override cohort name, validate_as_user_ids and centralauth
+# The user for the Global API doesn't have to define these
+name = HiddenField(default='GlobalCohort_' + str(uuid.uuid1()))
+start_date  = BetterDateTimeField(
+default=thirty_days_ago, validators=[NotGreater('end_date')])
+end_date= BetterDateTimeField(default=today)
diff --git a/wikimetrics/static/js/globalReportUpload.js 
b/wikimetrics/static/js/globalReportUpload.js
new file mode 100644
index 000..f1693f7
--- /dev/null
+++ b/wikimetrics/static/js/globalReportUpload.js
@@ -0,0 +1,8 @@
+$(document).ready(function(){
+
+ko.applyBindings({
+// Timezone list and defaults
+availableTimezones : ko.observableArray(site.availableTimezones),
+timezone: ko.observable(site.utcTimezone),
+});
+});
diff --git a/wikimetrics/static/js/reportCreate.js 
b/wikimetrics/static/js/reportCreate.js
index 2f9fb46..941a43c 100644
--- a/wikimetrics/static/js/reportCreate.js
+++ b/wikimetrics/static/js/reportCreate.js
@@ -51,8 +51,7 @@
 });
 }
 
-var utcTimezone = {name: 'UTC', value: '+00:00'},
-viewModel = {
+var viewModel = {
 
 filter: ko.observable(''),
 cohorts: ko.observableArray([]),
@@ -69,20 +68,9 @@
 return true;
 },
 
-// Add more timezones as necessary
-availableTimezones : ko.observableArray([
-{name: 'Central European Time', value: '+01:00'},
-{name: 'Eastern European Time', value: '+02:00'},
-{name: 'East Australian Standard Time', value: '+10:00'},
-utcTimezone,
-{name: 'Atlantic Standard Time', value: '-04:00'},
-{name: 'Eastern Standard Time', value: '-05:00'},
-{name: 'Central Standard Time', value: '-06:00'},
-{name: 'Mountain Standard Time', value: '-07:00'},
-{name: 'Pacific Standard Time', value: '-08:00'},
-{name: 'Hawaii Standard Time', value: '-10:00'}
-]),
-timezone: ko.observable(utcTimezone),
+// Timezone list and defaults
+availableTimezones : ko.observableArray(site.availableTimezones),
+timezone: ko.observable(site.utcTimezone),
 
 // global metric defaults, by property
 defaults: {
diff --git a/wikimetrics/static/js/site.js b/wikimetrics/static/js/site.js
index f1f8c38..9326663 100644
--- a/wikimetrics/static/js/site.js
+++ b/wikimetrics/static/js/site.js
@@ -176,7 +176,26 @@
 isEmpty: function(obj){
 var empty = JSON.stringify(obj) === "{}";
 return empty
-}
+},
+
+// ***
+// List of timezones and default timezone
+// ***
+utcTimezone: {name: 'UTC', value: '+00:00'},
+
+// Add more timezones as necessary
+availableTimezones : [
+{name: 'Central European Time', value: '+01:00'},
+{name: 'Eastern European Time', value: '+02:00'},
+{name: 'East Australian Standard Time', value: '+10:00'},
+{name: 'UTC', value: '+00:00'},
+{name: 'Atlantic Standard Time', value: '-04:00'},
+{name: 'Eastern Standard Time', value: '-05:00'},
+{name: 'Central Standard Time', value: '-06:00'},
+   

[MediaWiki-commits] [Gerrit] SpecialWatchlist: Rewrite cutoffselector() using XmlSelect - change (mediawiki/core)

2015-11-23 Thread Code Review
Bartosz Dziewoński has uploaded a new change for review.

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

Change subject: SpecialWatchlist: Rewrite cutoffselector() using XmlSelect
..

SpecialWatchlist: Rewrite cutoffselector() using XmlSelect

Also:
* Include the current value in the dropdown (it's possible to input
  something manually in the URL).
* Do correct float comparison for the value from user preferences too.

Change-Id: I9a7a3a56e80c9f18afc866b9e98e2137b6845508
---
M includes/specials/SpecialWatchlist.php
1 file changed, 30 insertions(+), 40 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/88/254888/1

diff --git a/includes/specials/SpecialWatchlist.php 
b/includes/specials/SpecialWatchlist.php
index 1d6bfb3..32d4552 100644
--- a/includes/specials/SpecialWatchlist.php
+++ b/includes/specials/SpecialWatchlist.php
@@ -507,53 +507,43 @@
}
 
function cutoffselector( $options ) {
-   $userWatchlistOption = $this->getUser()->getOption( 
'watchlistdays' );
+   // Cast everything to strings immediately, so that we know all 
of the values have the same
+   // precision, and can be compared with '==='. 2/24 has a few 
more decimal places than its
+   // default string representation, for example, and would 
confuse comparisons.
 
-   $list = array();
-   $selectOptions = '';
-   $hours = array( 1, 2, 6, 12 );
-   $days = array( 1, 3, 7 );
+   // Misleadingly, the 'days' option supports hours too.
+   $days = array_map( 'strval', array( 1/24, 2/24, 6/24, 12/24, 1, 
3, 7 ) );
+
+   $userWatchlistOption = (string)$this->getUser()->getOption( 
'watchlistdays' );
// add the user preference, if it isn't available already
-   if ( $userWatchlistOption >= 1 && !in_array( 
$userWatchlistOption, $days ) ) {
+   if ( !in_array( $userWatchlistOption, $days ) ) {
$days[] = $userWatchlistOption;
-   asort( $days );
-   } elseif ( $userWatchlistOption < 1 && !in_array( 
$userWatchlistOption * 24, $hours ) ) {
-   $hours[] = $userWatchlistOption * 24;
-   asort( $hours );
-   }
-   foreach ( $hours as $h ) {
-   $name = $this->msg( 'hours' )->numParams( $h );
-   $value = $h / 24;
-   // due to the possible addition of a user value, it's 
possible, that both
-   // values ($value and $options['days']) are floats with 
unexpected comparison
-   // behaviour. Comparing them directly can result in a 
"not equality" result,
-   // even if the "visible" floats would be the same (e.g. 
if the user value is
-   // float(0.4)). See PHP docs about Comparing floats.
-   $selected = abs( $value - $options['days'] ) < 0.1;
-
-   $selectOptions .= Xml::option( $name, $value, $selected 
);
-   }
-   foreach ( $days as $d ) {
-   $name = $this->msg( 'days' )->numParams( $d );
-   $value = $d;
-   $selected = $value == $options['days'];
-
-   $selectOptions .= Xml::option( $name, $value, $selected 
);
}
 
-   // all option
-   $name = $this->msg( 'watchlistall2' );
+   $selected = (string)$options['days'];
+   // add the currently selected value, if it isn't available 
already
+   if ( !in_array( $selected, $days ) ) {
+   $days[] = $selected;
+   }
+
+   $select = new XmlSelect( 'days', 'days', $selected );
+
+   asort( $days );
+   foreach ( $days as $value ) {
+   if ( $value < 1 ) {
+   $name = $this->msg( 'hours' )->numParams( 
$value * 24 )->text();
+   } else {
+   $name = $this->msg( 'days' )->numParams( $value 
)->text();
+   }
+   $select->addOption( $name, $value );
+   }
+
+   // 'all' option
+   $name = $this->msg( 'watchlistall2' )->text();
$value = 0;
-   $selected = ( $value == $options['days'] ) ? true : false;
-   $selectOptions .= Xml::option( $name, $value, $selected );
+   $select->addOption( $name, $value );
 
-   $attribs = array( "name" => "days", "id" => "days" );
-   return Xml::openElement( 'select', $attribs )
-   . "\n"
-   . $selectOptions
-   . "\n"
-   . 

[MediaWiki-commits] [Gerrit] Use OOjs UI PopupElement for "Skip tutorial" checkbox - change (mediawiki...UploadWizard)

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

Change subject: Use OOjs UI PopupElement for "Skip tutorial" checkbox
..


Use OOjs UI PopupElement for "Skip tutorial" checkbox

Bug: T119385
Change-Id: I1f091e91aea925d4c82521238fb801a19c29b9ed
---
M UploadWizardHooks.php
A resources/ui/uw.ui.Tutorial.css
M resources/ui/uw.ui.Tutorial.js
3 files changed, 57 insertions(+), 28 deletions(-)

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



diff --git a/UploadWizardHooks.php b/UploadWizardHooks.php
index e183b13..6281a17 100644
--- a/UploadWizardHooks.php
+++ b/UploadWizardHooks.php
@@ -671,6 +671,9 @@
'scripts' => array(
'resources/ui/uw.ui.Tutorial.js',
),
+   'styles' => array(
+   'resources/ui/uw.ui.Tutorial.css',
+   ),
 
'dependencies' => array(
'oojs',
diff --git a/resources/ui/uw.ui.Tutorial.css b/resources/ui/uw.ui.Tutorial.css
new file mode 100644
index 000..ba35604
--- /dev/null
+++ b/resources/ui/uw.ui.Tutorial.css
@@ -0,0 +1,16 @@
+/* Position the popup */
+#mwe-upwiz-skip {
+   position: relative;
+}
+
+#mwe-upwiz-skip .oo-ui-popupWidget {
+   position: absolute;
+   left: 50%;
+}
+
+/* Override some silly styles */
+#mwe-upwiz-skip .oo-ui-popupWidget,
+#mwe-upwiz-skip .oo-ui-popupWidget * {
+   white-space: normal;
+   text-align: left;
+}
diff --git a/resources/ui/uw.ui.Tutorial.js b/resources/ui/uw.ui.Tutorial.js
index 72bad60..96ff98e 100644
--- a/resources/ui/uw.ui.Tutorial.js
+++ b/resources/ui/uw.ui.Tutorial.js
@@ -17,6 +17,31 @@
 
 ( function ( mw, $, uw, OO ) {
/**
+* Checkbox with popup information.
+*/
+   function PopupCheckboxInputWidget( config ) {
+   // Parent constructor
+   PopupCheckboxInputWidget.parent.call( this, config );
+
+   // Mixin constructors
+   OO.ui.mixin.PopupElement.call( this, config );
+
+   // Events
+   this.connect( this, { change: 'onChange' } );
+
+   // Initialization
+   this.$element
+   .addClass( 'oo-ui-popupCheckboxInputWidget' )
+   .attr( 'aria-haspopup', 'true' )
+   .append( this.popup.$element );
+   }
+   OO.inheritClass( PopupCheckboxInputWidget, OO.ui.CheckboxInputWidget );
+   OO.mixinClass( PopupCheckboxInputWidget, OO.ui.mixin.PopupElement );
+   PopupCheckboxInputWidget.prototype.onChange = function () {
+   this.popup.toggle( this.isSelected() );
+   };
+
+   /**
 * Represents the UI for the wizard's Tutorial step.
 *
 * @class uw.ui.Tutorial
@@ -33,38 +58,27 @@
);
 
// 'Skip tutorial' checkbox
-   this.skipCheckbox = new OO.ui.CheckboxInputWidget( {
-   id: 'mwe-upwiz-skip'
+   this.skipCheckbox = new PopupCheckboxInputWidget( {
+   id: 'mwe-upwiz-skip',
+   // Add a friendly "Here's how to get it back" tooltip 
for users who check the "Skip next time" checkbox
+   popup: {
+   $content: $( '' ).msg(
+   'mwe-upwiz-tooltip-skiptutorial',
+   mw.config.get( 'wgServer' ) + 
mw.util.getUrl( 'Special:Preferences' ) + '#mw-prefsection-uploads',
+   mw.message( 'prefs-uploads' ).escaped(),
+   mw.message( 'prefs-upwiz-interface' 
).escaped()
+   ),
+   autoClose: false,
+   padded: true
+   }
} );
this.skipCheckboxLabel = new OO.ui.LabelWidget( {
input: this.skipCheckbox,
label: mw.message( 'mwe-upwiz-skip-tutorial-future' 
).text()
} );
 
-   this.skipCheckbox.$element
-   // Add a friendly "Here's how to get it back" tooltip 
for users who check the "Skip next time" checkbox
-   .tipsy( {
-   title: function () {
-   return mw.message(
-   
'mwe-upwiz-tooltip-skiptutorial',
-   mw.config.get( 'wgServer' ) + 
mw.util.getUrl( 'Special:Preferences' ) + '#mw-prefsection-uploads',
-   mw.message( 'prefs-uploads' 
).escaped(),
-   mw.message( 
'prefs-upwiz-interface' ).escaped()
-   

[MediaWiki-commits] [Gerrit] make iframe behave more like worldpay - change (mediawiki...DonationInterface)

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

Change subject: make iframe behave more like worldpay
..


make iframe behave more like worldpay

append and blind down instead of replace contents.
also make it bigger for upcoming css changes with larger inputs

Change-Id: I0c8d60b2957bede5ab53f5f110001468b8eb1284
---
M adyen_gateway/forms/js/adyen.js
1 file changed, 6 insertions(+), 5 deletions(-)

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



diff --git a/adyen_gateway/forms/js/adyen.js b/adyen_gateway/forms/js/adyen.js
index 81613fd..ca1d7a1 100644
--- a/adyen_gateway/forms/js/adyen.js
+++ b/adyen_gateway/forms/js/adyen.js
@@ -59,12 +59,12 @@
$payment = $( '#payment-form' );
 
// Empty the div; add the 
target iframe; then submit the request for the iframe contents
-   $payment.empty();
$payment.append( $( 
'', {
-   width: 400,
-   height: 225,
+   style: 'display: none; 
width: 100%;',
+   height: 400,
frameborder: 0,
-   name: 'adyen-iframe'
+   name: 'adyen-iframe',
+   id: 'adyen-iframe'
} ) );
 
$pForm = $( '', {
@@ -79,6 +79,8 @@
$payment.append( $pForm );
 
$payment.find( 
'#fetch-iframe-form' ).submit();
+
+   $( '#adyen-iframe' ).show( 
'blind' );
}
}
}
@@ -107,7 +109,6 @@
 
$( '#paymentContinueBtn' ).on( 'click', function () {
if ( window.validate_form( document.payment ) ) {
-   $( '#payment-form' ).animate( { height: '250px' }, 1000 
);
window.displayCreditCardForm();
// hide the continue button so that people don't get 
confused with two of them
$( '#paymentContinue' ).hide();

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

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

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


[MediaWiki-commits] [Gerrit] arbcomlist.php: add '--mainspace-only' option - change (mediawiki...SecurePoll)

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

Change subject: arbcomlist.php: add '--mainspace-only' option
..


arbcomlist.php: add '--mainspace-only' option

Allow the edit count requirement to be limited to mainspace edits (or not) via
the '--mainspace-only' command line argument. This allows us to consolidate
makeSimpleList.php and arbcomlist.php, which I will do in a follow-up patch.

Change-Id: I2a557198d573913db4f9e700313198026bff1376
---
M cli/wm-scripts/arbcomlist.php
1 file changed, 5 insertions(+), 2 deletions(-)

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



diff --git a/cli/wm-scripts/arbcomlist.php b/cli/wm-scripts/arbcomlist.php
index 8d43c88..0597d44 100644
--- a/cli/wm-scripts/arbcomlist.php
+++ b/cli/wm-scripts/arbcomlist.php
@@ -16,7 +16,8 @@
 if ( !isset( $args[0] ) ) {
echo <<]
-  [--edits=num] [--start-from=] 
+  [--edits=num] [--mainspace-only]
+  [--start-from=] 
 EOD;
exit( 1 );
 }
@@ -64,7 +65,9 @@
if ( $before !== false ) {
$conds[] = 'rev_timestamp < ' . $dbr->addQuotes( 
$before );
}
-   $conds['page_namespace'] = 0;
+   if ( isset( $options['mainspace-only'] ) ) {
+   $conds['page_namespace'] = 0;
+   }
 
$edits = $dbr->selectRowCount(
array( 'revision', 'page' ),

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2a557198d573913db4f9e700313198026bff1376
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SecurePoll
Gerrit-Branch: master
Gerrit-Owner: Ori.livneh 
Gerrit-Reviewer: Anomie 
Gerrit-Reviewer: BryanDavis 
Gerrit-Reviewer: Gergő Tisza 
Gerrit-Reviewer: Jalexander 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Import EventLoggingService in test properly, don't use setde... - change (eventlogging)

2015-11-23 Thread Ottomata (Code Review)
Ottomata has submitted this change and it was merged.

Change subject: Import EventLoggingService in test properly, don't use 
setdefault for caching validator
..


Import EventLoggingService in test properly, don't use setdefault for caching 
validator

Change-Id: I2c163f3b36fde85889214e75ad568e6b58301800
---
M bin/eventlogging-service
M eventlogging/schema.py
M tests/test_service.py
3 files changed, 9 insertions(+), 6 deletions(-)

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



diff --git a/bin/eventlogging-service b/bin/eventlogging-service
index 8e59c0c..bd688c0 100755
--- a/bin/eventlogging-service
+++ b/bin/eventlogging-service
@@ -13,7 +13,7 @@
 if EventLoggingService.__doc__:
 argparse_doc = EventLoggingService.__doc__
 else:
-argparse_doc=''
+argparse_doc = ''
 
 ap = argparse.ArgumentParser(
 description=textwrap.dedent(argparse_doc),
diff --git a/eventlogging/schema.py b/eventlogging/schema.py
index 9f14c63..8636c9a 100644
--- a/eventlogging/schema.py
+++ b/eventlogging/schema.py
@@ -209,10 +209,13 @@
 
 # Get validator for this schema out of the cache, or
 # create a new validator and save it in the cache.
-schema_validator_cache.setdefault(
-scid,
-get_validator(schema)(schema)
-).validate(event)
+if scid in schema_validator_cache:
+validator = schema_validator_cache[scid]
+else:
+validator = get_validator(schema)(schema)
+schema_validator_cache[scid] = validator
+
+validator.validate(event)
 
 
 def get_validator(schema):
diff --git a/tests/test_service.py b/tests/test_service.py
index dd83ea2..f16df0d 100644
--- a/tests/test_service.py
+++ b/tests/test_service.py
@@ -8,7 +8,7 @@
 
 import copy
 from tornado.testing import AsyncHTTPTestCase
-from eventlogging import EventLoggingService
+from eventlogging.service import EventLoggingService
 
 import json
 from .fixtures import SchemaTestMixin

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2c163f3b36fde85889214e75ad568e6b58301800
Gerrit-PatchSet: 3
Gerrit-Project: eventlogging
Gerrit-Branch: service
Gerrit-Owner: Ottomata 
Gerrit-Reviewer: Ottomata 
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 VE core submodule to master (0e19dde) - change (mediawiki...VisualEditor)

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

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

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

Update VE core submodule to master (0e19dde)

New changes:
1298615 ElementLinearData: Sanitize away plain text linebreak characters
a7be116 Localisation updates from https://translatewiki.net.
654a908 Add ve.ce.Surface selectActiveLinkContents

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


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

diff --git a/lib/ve b/lib/ve
index e8c6f7d..0e19dde 16
--- a/lib/ve
+++ b/lib/ve
-Subproject commit e8c6f7dc98a57453f2293421145cf51697893745
+Subproject commit 0e19dde01de640caf7807aa6826933ce941c398b

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3d1172b4c43a627058da587250bae731c25890cc
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Jforrester 

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


<    1   2   3   4   5   >