[MediaWiki-commits] [Gerrit] mediawiki/core[master]: benchmarks: Report more metrics (min/max/median)

2017-04-19 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/349123 )

Change subject: benchmarks: Report more metrics (min/max/median)
..


benchmarks: Report more metrics (min/max/median)

Add minimum, maximum, median to the report in addition to the mean (average)
which was already there. Based on benchmarkTidy.php from I254793fc5.

Example output:

> Delete
>times: 10
>total:   7.47ms
>  min:   0.53ms
>   median:   0.74ms
> mean:   0.75ms
>  max:   1.21ms
>
> Truncate
>times: 10
>total:  72.38ms
>  min:   1.37ms
>   median:   8.32ms
> mean:   7.24ms
>  max:  15.73ms

Change-Id: Ifd3064a3621e07f55505490403189cb47022c6c7
---
M maintenance/benchmarks/Benchmarker.php
M maintenance/benchmarks/bench_HTTP_HTTPS.php
M maintenance/benchmarks/bench_Wikimedia_base_convert.php
M maintenance/benchmarks/bench_delete_truncate.php
M maintenance/benchmarks/bench_if_switch.php
M maintenance/benchmarks/bench_strtr_str_replace.php
M maintenance/benchmarks/bench_utf8_title_check.php
M maintenance/benchmarks/bench_wfIsWindows.php
8 files changed, 48 insertions(+), 34 deletions(-)

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



diff --git a/maintenance/benchmarks/Benchmarker.php 
b/maintenance/benchmarks/Benchmarker.php
index 7d8280d..638e47e 100644
--- a/maintenance/benchmarks/Benchmarker.php
+++ b/maintenance/benchmarks/Benchmarker.php
@@ -34,7 +34,6 @@
  * @ingroup Benchmark
  */
 abstract class Benchmarker extends Maintenance {
-   private $results;
protected $defaultCount = 100;
 
public function __construct() {
@@ -43,6 +42,7 @@
}
 
public function bench( array $benchs ) {
+   $this->startBench();
$count = $this->getOption( 'count', $this->defaultCount );
foreach ( $benchs as $key => $bench ) {
// Default to no arguments
@@ -54,11 +54,27 @@
if ( isset( $bench['setup'] ) ) {
call_user_func( $bench['setup'] );
}
-   $start = microtime( true );
+
+   // Run benchmarks
+   $times = [];
for ( $i = 0; $i < $count; $i++ ) {
+   $t = microtime( true );
call_user_func_array( $bench['function'], 
$bench['args'] );
+   $t = ( microtime( true ) - $t ) * 1000;
+   $times[] = $t;
}
-   $delta = microtime( true ) - $start;
+
+   // Collect metrics
+   sort( $times, SORT_NUMERIC );
+   $min = $times[0];
+   $max = end( $times );
+   if ( $count % 2 ) {
+   $median = $times[ ( $count - 1 ) / 2 ];
+   } else {
+   $median = ( $times[$count / 2] + $times[$count 
/ 2 - 1] ) / 2;
+   }
+   $total = array_sum( $times );
+   $mean = $total / $count;
 
// Name defaults to name of called function
if ( is_string( $key ) ) {
@@ -75,35 +91,42 @@
);
}
 
-   $this->results[] = [
+   $this->addResult( [
'name' => $name,
'count' => $count,
-   'total' => $delta,
-   'average' => $delta / $count,
-   ];
+   'total' => $total,
+   'min' => $min,
+   'median' => $median,
+   'mean' => $mean,
+   'max' => $max,
+   ] );
}
}
 
-   public function getFormattedResults() {
-   $ret = sprintf( "Running PHP version %s (%s) on %s %s %s\n\n",
-   phpversion(),
-   php_uname( 'm' ),
-   php_uname( 's' ),
-   php_uname( 'r' ),
-   php_uname( 'v' )
+   public function startBench() {
+   $this->output(
+   sprintf( "Running PHP version %s (%s) on %s %s %s\n\n",
+   phpversion(),
+   php_uname( 'm' ),
+   php_uname( 's' ),
+   php_uname( 'r' ),
+   php_uname( 'v' )
+   )
);
-   foreach ( $this->results as $res ) {
-   // show function 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: benchmarks: Add setup, bench naming, and custom count default

2017-04-19 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/349122 )

Change subject: benchmarks: Add setup, bench naming, and custom count default
..


benchmarks: Add setup, bench naming, and custom count default

* bench(): Add support for setup function.
  Demonstrated by converting bench_delete_truncate.php to use Benchmarker.

* bench(): Allow benchmarks to be named. Default remains (fn + args).
  Useful for closures.

* Benchmarker: Support overriding the default count of 100.
  Demonstrated in bench_delete_truncate.php to run 10x instead of
  100x (previous: 1x).

Change-Id: Iac182eaf3053f5bf0e811cd23082f530629d8a4e
---
M maintenance/benchmarks/Benchmarker.php
M maintenance/benchmarks/bench_delete_truncate.php
2 files changed, 48 insertions(+), 38 deletions(-)

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



diff --git a/maintenance/benchmarks/Benchmarker.php 
b/maintenance/benchmarks/Benchmarker.php
index 70dc1f4..7d8280d 100644
--- a/maintenance/benchmarks/Benchmarker.php
+++ b/maintenance/benchmarks/Benchmarker.php
@@ -35,6 +35,7 @@
  */
 abstract class Benchmarker extends Maintenance {
private $results;
+   protected $defaultCount = 100;
 
public function __construct() {
parent::__construct();
@@ -42,31 +43,40 @@
}
 
public function bench( array $benchs ) {
-   $bench_number = 0;
-   $count = $this->getOption( 'count', 100 );
-
-   foreach ( $benchs as $bench ) {
-   // handle empty args
-   if ( !array_key_exists( 'args', $bench ) ) {
+   $count = $this->getOption( 'count', $this->defaultCount );
+   foreach ( $benchs as $key => $bench ) {
+   // Default to no arguments
+   if ( !isset( $bench['args'] ) ) {
$bench['args'] = [];
}
 
-   $bench_number++;
+   // Optional setup called outside time measure
+   if ( isset( $bench['setup'] ) ) {
+   call_user_func( $bench['setup'] );
+   }
$start = microtime( true );
for ( $i = 0; $i < $count; $i++ ) {
call_user_func_array( $bench['function'], 
$bench['args'] );
}
$delta = microtime( true ) - $start;
 
-   // function passed as a callback
-   if ( is_array( $bench['function'] ) ) {
-   $ret = get_class( $bench['function'][0] ) . 
'->' . $bench['function'][1];
-   $bench['function'] = $ret;
+   // Name defaults to name of called function
+   if ( is_string( $key ) ) {
+   $name = $key;
+   } else {
+   if ( is_array( $bench['function'] ) ) {
+   $name = get_class( 
$bench['function'][0] ) . '::' . $bench['function'][1];
+   } else {
+   $name = strval( $bench['function'] );
+   }
+   $name = sprintf( "%s(%s)",
+   $name,
+   implode( ', ', $bench['args'] )
+   );
}
 
-   $this->results[$bench_number] = [
-   'function' => $bench['function'],
-   'arguments' => $bench['args'],
+   $this->results[] = [
+   'name' => $name,
'count' => $count,
'total' => $delta,
'average' => $delta / $count,
@@ -84,10 +94,9 @@
);
foreach ( $this->results as $res ) {
// show function with args
-   $ret .= sprintf( "%s times: function %s(%s) :\n",
+   $ret .= sprintf( "%s times: %s\n",
$res['count'],
-   $res['function'],
-   implode( ', ', $res['arguments'] )
+   $res['name']
);
$ret .= sprintf( "   %6.2fms (%6.4fms each)\n",
$res['total'] * 1e3,
diff --git a/maintenance/benchmarks/bench_delete_truncate.php 
b/maintenance/benchmarks/bench_delete_truncate.php
index 042f8bd..de655b1 100644
--- a/maintenance/benchmarks/bench_delete_truncate.php
+++ 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: benchmarks: Minor clean up

2017-04-19 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/349121 )

Change subject: benchmarks: Minor clean up
..


benchmarks: Minor clean up

Change-Id: I446ae1a9d9cdb6b26a6bb62367a432cea082f343
---
M maintenance/benchmarks/Benchmarker.php
M maintenance/benchmarks/bench_HTTP_HTTPS.php
M maintenance/benchmarks/bench_Wikimedia_base_convert.php
M maintenance/benchmarks/bench_delete_truncate.php
M maintenance/benchmarks/bench_if_switch.php
M maintenance/benchmarks/bench_strtr_str_replace.php
M maintenance/benchmarks/bench_utf8_title_check.php
M maintenance/benchmarks/bench_wfIsWindows.php
8 files changed, 30 insertions(+), 30 deletions(-)

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



diff --git a/maintenance/benchmarks/Benchmarker.php 
b/maintenance/benchmarks/Benchmarker.php
index 5fab082..70dc1f4 100644
--- a/maintenance/benchmarks/Benchmarker.php
+++ b/maintenance/benchmarks/Benchmarker.php
@@ -38,7 +38,7 @@
 
public function __construct() {
parent::__construct();
-   $this->addOption( 'count', "How many times to run a benchmark", 
false, true );
+   $this->addOption( 'count', 'How many times to run a benchmark', 
false, true );
}
 
public function bench( array $benchs ) {
@@ -68,7 +68,7 @@
'function' => $bench['function'],
'arguments' => $bench['args'],
'count' => $count,
-   'delta' => $delta,
+   'total' => $delta,
'average' => $delta / $count,
];
}
@@ -89,9 +89,9 @@
$res['function'],
implode( ', ', $res['arguments'] )
);
-   $ret .= sprintf( "   %6.2fms (%6.2fms each)\n",
-   $res['delta'] * 1000,
-   $res['average'] * 1000
+   $ret .= sprintf( "   %6.2fms (%6.4fms each)\n",
+   $res['total'] * 1e3,
+   $res['average'] * 1e3
);
}
 
diff --git a/maintenance/benchmarks/bench_HTTP_HTTPS.php 
b/maintenance/benchmarks/bench_HTTP_HTTPS.php
index 5b64bee..1be50bd 100644
--- a/maintenance/benchmarks/bench_HTTP_HTTPS.php
+++ b/maintenance/benchmarks/bench_HTTP_HTTPS.php
@@ -42,20 +42,20 @@
[ 'function' => [ $this, 'getHTTP' ] ],
[ 'function' => [ $this, 'getHTTPS' ] ],
] );
-   print $this->getFormattedResults();
+   $this->output( $this->getFormattedResults() );
}
 
-   static function doRequest( $proto ) {
+   private function doRequest( $proto ) {
Http::get( "$proto://localhost/", [], __METHOD__ );
}
 
// bench function 1
-   function getHTTP() {
+   protected function getHTTP() {
$this->doRequest( 'http' );
}
 
// bench function 2
-   function getHTTPS() {
+   protected function getHTTPS() {
$this->doRequest( 'https' );
}
 }
diff --git a/maintenance/benchmarks/bench_Wikimedia_base_convert.php 
b/maintenance/benchmarks/bench_Wikimedia_base_convert.php
index c8a9055..bc83a24 100644
--- a/maintenance/benchmarks/bench_Wikimedia_base_convert.php
+++ b/maintenance/benchmarks/bench_Wikimedia_base_convert.php
@@ -65,8 +65,8 @@
}
 
protected static function makeRandomNumber( $base, $length ) {
-   $baseChars = "0123456789abcdefghijklmnopqrstuvwxyz";
-   $res = "";
+   $baseChars = '0123456789abcdefghijklmnopqrstuvwxyz';
+   $res = '';
for ( $i = 0; $i < $length; $i++ ) {
$res .= $baseChars[mt_rand( 0, $base - 1 )];
}
diff --git a/maintenance/benchmarks/bench_delete_truncate.php 
b/maintenance/benchmarks/bench_delete_truncate.php
index 2369d99..042f8bd 100644
--- a/maintenance/benchmarks/bench_delete_truncate.php
+++ b/maintenance/benchmarks/bench_delete_truncate.php
@@ -102,5 +102,5 @@
}
 }
 
-$maintClass = "BenchmarkDeleteTruncate";
+$maintClass = 'BenchmarkDeleteTruncate';
 require_once RUN_MAINTENANCE_IF_MAIN;
diff --git a/maintenance/benchmarks/bench_if_switch.php 
b/maintenance/benchmarks/bench_if_switch.php
index 46c9d39..32c3932 100644
--- a/maintenance/benchmarks/bench_if_switch.php
+++ b/maintenance/benchmarks/bench_if_switch.php
@@ -42,11 +42,11 @@
[ 'function' => [ $this, 'doElseIf' ] ],
[ 'function' => [ $this, 'doSwitch' ] ],
] );
-   print $this->getFormattedResults();
+   $this->output( 

[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Set ORES thresholds in new format for all enabled wikis

2017-04-19 Thread Catrope (Code Review)
Catrope has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349146 )

Change subject: Set ORES thresholds in new format for all enabled wikis
..

Set ORES thresholds in new format for all enabled wikis

Bug: T162760
Change-Id: Ifb80b5f39f62061191f9854a534cac6be6a6d1cc
---
M wmf-config/InitialiseSettings.php
1 file changed, 100 insertions(+), 43 deletions(-)


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index c8467b2..55b70d7 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -18053,80 +18053,137 @@
'default' => [],
'enwiki' => [
'damaging' => [
-   'likelygood' => [ 'min' => 0, 'max' => 0.398 ], // ~99% 
precision
-   'maybebad' => [ 'min' => 0.280, 'max' => 1 ], // ~15% 
precision
-   'likelybad' => [ 'min' => 0.879, 'max' => 1 ], // ~60% 
precision
-   'verylikelybad' => [ 'min' => 0.938, 'max' => 1 ], // 
~90% precision
+   'likelygood' => [ 'min' => 0, 'max' => 
'recall_at_precision(min_precision=0.99)' ],
+   'maybebad' => [ 'min' => 
'recall_at_precision(min_precision=0.15)', 'max' => 1 ],
+   // likelybad and verylikelybad use defaults
],
'goodfaith' => [
-   'good' => [ 'min' => 0.86, 'max' => 1 ], // ~99.5% 
precision
-   'maybebad' => [ 'min' => 0, 'max' => 0.663 ], // ~15% 
precision
-   'bad' => [ 'min' => 0, 'max' => 0.115 ], // ~60% 
precision
+   // likelygood uses default
+   'maybebad' => [ 'min' => 0, 'max' => 
'recall_at_precision(min_precision=0.15)' ],
+   // likelybad uses default
+   'verylikelybad' => [ 'min' => 0, 'max' => 
'recall_at_precision(min_precision=0.9)' ],
],
],
'plwiki' => [
'damaging' => [
-   'likelygood' => [ 'min' => 0, 'max' => 0.472 ], // 
~99.5% precision
-   'maybebad' => [ 'min' => 0.392, 'max' => 1 ], // ~45% 
precision
-   'likelybad' => [ 'min' => 0.75, 'max' => 1 ], // ~90% 
precision
-   'verylikelybad' => [ 'min' => 0.852, 'max' => 1 ], // 
~98% precision
+   // likelygood uses default
+   'maybebad' => false,
+   'likelybad' => [ 'min' => 
'recall_at_precision(min_precision=0.75)', 'max' => 1 ],
+   'verylikelybad' => [ 'min' => 
'recall_at_precision(min_precision=0.98)', 'max' => 1 ],
],
'goodfaith' => [
-   'good' => [ 'min' => 0.587, 'max' => 1 ], // ~99.5% 
precision
-   'maybebad' => [ 'min' => 0, 'max' => 0.909 ], // ~70% 
precision
-   'bad' => [ 'min' => 0, 'max' => 0.46 ], // ~99% 
precision
+   // likelygood uses default
+   'maybebad' => false,
+   'likelybad' => false,
+   'verylikelybad' => [ 'min' => 0, 'max' => 
'recall_at_precision(min_precision=0.98)' ],
],
],
'ptwiki' => [
'damaging' => [
-   'likelygood' => [ 'min' => 0, 'max' => 0.303 ], // ~99% 
precision
-   'maybebad' => [ 'min' => 0.294, 'max' => 1 ], // ~90% 
recall
-   'likelybad' => [ 'min' => 0.734, 'max' => 1 ], // ~45% 
precision
-   'verylikelybad' => [ 'min' => 0.956, 'max' => 1 ], // 
~90% precision
+   'likelygood' => [ 'min' => 0, 'max' => 
'recall_at_precision(min_precision=0.99)' ],
+   // maybebad, likelybad, verylikelybad use defaults
],
'goodfaith' => [
-   'good' => [ 'min' => 0.400, 'max' => 1 ], // ~98% 
precision
-   'maybebad' => [ 'min' => 0, 'max' => 0.715 ], // ~90% 
recall
-   'bad' => [ 'min' => 0, 'max' => 0.256 ], // ~45% 
precision
+   // likelygood, maybebad, likelybad use defaults
+   'verylikelybad' => [ 'min' => 0, 'max' => 
'recall_at_precision(min_precision=0.9)' ],
+   ],
+   ],
+   'cswiki' => [
+   'damaging' => [
+   // likelygood, maybebad, likelybad use defaults
+   'verylikelybad' => [ 'min' => 
'recall_at_precision(min_precision=0.98)', 'max' => 1 ],
+   ],
+   'goodfaith' => [
+   // likelygood, maybebad, likelybad use defaults
+   

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Fix bogus field reference in Category::getCountMessage() cal...

2017-04-19 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/349144 )

Change subject: Fix bogus field reference in Category::getCountMessage() 
callback
..


Fix bogus field reference in Category::getCountMessage() callback

Follows-up 922e68f739f143. (T162121)

Bug: T162941
Change-Id: I40623203e97f7155c2af171a37b1128a59415315
---
M includes/Category.php
M includes/CategoryViewer.php
2 files changed, 8 insertions(+), 10 deletions(-)

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



diff --git a/includes/Category.php b/includes/Category.php
index ece32ea..50ffeec 100644
--- a/includes/Category.php
+++ b/includes/Category.php
@@ -321,6 +321,13 @@
}
 
$dbw = wfGetDB( DB_MASTER );
+   # Avoid excess contention on the same category (T162121)
+   $name = __METHOD__ . ':' . md5( $this->mName );
+   $scopedLock = $dbw->getScopedLockAndFlush( $name, __METHOD__, 1 
);
+   if ( !$scopedLock ) {
+   return;
+   }
+
$dbw->startAtomic( __METHOD__ );
 
$cond1 = $dbw->conditional( [ 'page_namespace' => NS_CATEGORY 
], 1, 'NULL' );
diff --git a/includes/CategoryViewer.php b/includes/CategoryViewer.php
index 0205d70..7086a48 100644
--- a/includes/CategoryViewer.php
+++ b/includes/CategoryViewer.php
@@ -740,16 +740,7 @@
// to refresh the incorrect category table entry -- 
which should be
// quick due to the small number of entries.
$totalcnt = $rescnt;
-   $category = $this->cat;
-   DeferredUpdates::addCallableUpdate( function () use ( 
$category ) {
-   # Avoid excess contention on the same category 
(T162121)
-   $dbw = wfGetDB( DB_MASTER );
-   $name = __METHOD__ . ':' . md5( $this->mName );
-   $scopedLock = $dbw->getScopedLockAndFlush( 
$name, __METHOD__, 1 );
-   if ( $scopedLock ) {
-   $category->refreshCounts();
-   }
-   } );
+   DeferredUpdates::addCallableUpdate( [ $this->cat, 
'refreshCounts' ] );
} else {
// Case 3: hopeless.  Don't give a total count at all.
// Messages: category-subcat-count-limited, 
category-article-count-limited,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I40623203e97f7155c2af171a37b1128a59415315
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz 
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] mediawiki/core[master]: Fix bogus field reference in Category::getCountMessage() cal...

2017-04-19 Thread Aaron Schulz (Code Review)
Aaron Schulz has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349144 )

Change subject: Fix bogus field reference in Category::getCountMessage() 
callback
..

Fix bogus field reference in Category::getCountMessage() callback

Bug: T162941
Change-Id: I40623203e97f7155c2af171a37b1128a59415315
---
M includes/CategoryViewer.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/44/349144/1

diff --git a/includes/CategoryViewer.php b/includes/CategoryViewer.php
index 0205d70..7d3ba74 100644
--- a/includes/CategoryViewer.php
+++ b/includes/CategoryViewer.php
@@ -744,7 +744,7 @@
DeferredUpdates::addCallableUpdate( function () use ( 
$category ) {
# Avoid excess contention on the same category 
(T162121)
$dbw = wfGetDB( DB_MASTER );
-   $name = __METHOD__ . ':' . md5( $this->mName );
+   $name = __METHOD__ . ':' . md5( 
$category->getName() );
$scopedLock = $dbw->getScopedLockAndFlush( 
$name, __METHOD__, 1 );
if ( $scopedLock ) {
$category->refreshCounts();

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I40623203e97f7155c2af171a37b1128a59415315
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz 

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


[MediaWiki-commits] [Gerrit] pywikibot/core[master]: Cleanup empty __init__.py files

2017-04-19 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/348949 )

Change subject: Cleanup empty __init__.py files
..


Cleanup empty __init__.py files

Change-Id: I1db5ab6bae9d9d9121483a17845d8b9bdd7624d6
---
M pywikibot/comms/__init__.py
M pywikibot/data/__init__.py
M pywikibot/families/__init__.py
M pywikibot/userinterfaces/__init__.py
4 files changed, 0 insertions(+), 32 deletions(-)

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



diff --git a/pywikibot/comms/__init__.py b/pywikibot/comms/__init__.py
index f3313f5..89d3d31 100644
--- a/pywikibot/comms/__init__.py
+++ b/pywikibot/comms/__init__.py
@@ -1,10 +1,2 @@
 # -*- coding: utf-8 -*-
 """Communication layer."""
-#
-# (C) Pywikibot team, 2007-2008
-#
-# Distributed under the terms of the MIT license.
-#
-from __future__ import absolute_import, unicode_literals
-
-__version__ = '$Id$'
diff --git a/pywikibot/data/__init__.py b/pywikibot/data/__init__.py
index 66fd7c8..fbd6a50 100644
--- a/pywikibot/data/__init__.py
+++ b/pywikibot/data/__init__.py
@@ -1,10 +1,2 @@
 # -*- coding: utf-8 -*-
 """Module providing several layers of data access to the wiki."""
-#
-# (C) Pywikibot team, 2007-2014
-#
-# Distributed under the terms of the MIT license.
-#
-from __future__ import absolute_import, unicode_literals
-
-__version__ = '$Id$'
diff --git a/pywikibot/families/__init__.py b/pywikibot/families/__init__.py
index e40db21..e8bf3ab 100644
--- a/pywikibot/families/__init__.py
+++ b/pywikibot/families/__init__.py
@@ -1,10 +1,2 @@
 # -*- coding: utf-8 -*-
 """Families package."""
-#
-# (C) Pywikibot team, 2007
-#
-# Distributed under the terms of the MIT license.
-#
-from __future__ import absolute_import, unicode_literals
-
-__version__ = '$Id$'
diff --git a/pywikibot/userinterfaces/__init__.py 
b/pywikibot/userinterfaces/__init__.py
index fb83868..c721338 100644
--- a/pywikibot/userinterfaces/__init__.py
+++ b/pywikibot/userinterfaces/__init__.py
@@ -1,10 +1,2 @@
 # -*- coding: utf-8 -*-
 """User interfaces."""
-#
-# (C) Pywikibot team, 2007
-#
-# Distributed under the terms of the MIT license.
-#
-from __future__ import absolute_import, unicode_literals
-
-__version__ = '$Id$'

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1db5ab6bae9d9d9121483a17845d8b9bdd7624d6
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Xqt 
Gerrit-Reviewer: Dalba 
Gerrit-Reviewer: John Vandenberg 
Gerrit-Reviewer: Magul 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...CentralAuth[master]: Check wfReadOnly() for rememberme preference callback

2017-04-19 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/348943 )

Change subject: Check wfReadOnly() for rememberme preference callback
..


Check wfReadOnly() for rememberme preference callback

Change-Id: I378049213b348ab150ea66449d182e1497e4d9cb
---
M includes/specials/SpecialCentralAutoLogin.php
1 file changed, 4 insertions(+), 0 deletions(-)

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



diff --git a/includes/specials/SpecialCentralAutoLogin.php 
b/includes/specials/SpecialCentralAutoLogin.php
index 122a728..57ff39e 100644
--- a/includes/specials/SpecialCentralAutoLogin.php
+++ b/includes/specials/SpecialCentralAutoLogin.php
@@ -175,6 +175,10 @@
if ( $remember != $user->getBoolOption( 
'rememberpassword' ) ) {
$user->setOption( 'rememberpassword', 
$remember ? 1 : 0 );
DeferredUpdates::addCallableUpdate( 
function() use ( $user ) {
+   if ( wfReadOnly() ) {
+   return; // not possible 
to save
+   }
+
$user->saveSettings();
} );
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I378049213b348ab150ea66449d182e1497e4d9cb
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CentralAuth
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: MarcoAurelio 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Add different log-in tooltip for private wikis

2017-04-19 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/331220 )

Change subject: Add different log-in tooltip for private wikis
..


Add different log-in tooltip for private wikis

Bug: T148006
Change-Id: I14e9a554c7e6f67bc120941199b999740886
---
M RELEASE-NOTES-1.29
M includes/skins/SkinTemplate.php
M languages/i18n/en.json
M languages/i18n/qqq.json
4 files changed, 10 insertions(+), 1 deletion(-)

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



diff --git a/RELEASE-NOTES-1.29 b/RELEASE-NOTES-1.29
index f9ff2e3..a225086 100644
--- a/RELEASE-NOTES-1.29
+++ b/RELEASE-NOTES-1.29
@@ -327,6 +327,8 @@
   mwCustomEditButtons, injectSpinner, removeSpinner, escapeQuotes,
   escapeQuotesHTML, jsMsg, addPortletLink, appendCSS, tooltipAccessKeyPrefix,
   tooltipAccessKeyRegexp, updateTooltipAccessKeys.
+* The ID of the  element containing the login link has changed from
+  'pt-login' to 'pt-login-private' in private wikis.
 
 == Compatibility ==
 
diff --git a/includes/skins/SkinTemplate.php b/includes/skins/SkinTemplate.php
index 61dbf2b..1dd9a06 100644
--- a/includes/skins/SkinTemplate.php
+++ b/includes/skins/SkinTemplate.php
@@ -720,7 +720,10 @@
}
 
if ( $authManager->canAuthenticateNow() ) {
-   $personal_urls['login'] = $login_url;
+   $key = User::groupHasPermission( '*', 'read' )
+   ? 'login'
+   : 'login-private';
+   $personal_urls[$key] = $login_url;
}
}
 
diff --git a/languages/i18n/en.json b/languages/i18n/en.json
index 6db8d10..1b71808 100644
--- a/languages/i18n/en.json
+++ b/languages/i18n/en.json
@@ -2735,6 +2735,7 @@
"accesskey-pt-mycontris": "y",
"accesskey-pt-anoncontribs": "y",
"accesskey-pt-login": "o",
+   "accesskey-pt-login-private": "o",
"accesskey-pt-logout": "",
"accesskey-pt-createaccount": "",
"accesskey-ca-talk": "t",
@@ -2806,6 +2807,7 @@
"tooltip-pt-mycontris": "A list of {{GENDER:|your}} contributions",
"tooltip-pt-anoncontribs": "A list of edits made from this IP address",
"tooltip-pt-login": "You are encouraged to log in; however, it is not 
mandatory",
+   "tooltip-pt-login-private": "You need to log in to use this wiki",
"tooltip-pt-logout": "Log out",
"tooltip-pt-createaccount": "You are encouraged to create an account 
and log in; however, it is not mandatory",
"tooltip-ca-talk": "Discussion about the content page",
diff --git a/languages/i18n/qqq.json b/languages/i18n/qqq.json
index d0c55c3..afc9b32 100644
--- a/languages/i18n/qqq.json
+++ b/languages/i18n/qqq.json
@@ -2923,6 +2923,7 @@
"accesskey-pt-mycontris": "{{doc-accesskey}}\nSee also:\n* 
{{msg-mw|Mycontris}}\n* {{msg-mw|Accesskey-pt-mycontris}}\n* 
{{msg-mw|Tooltip-pt-mycontris}}",
"accesskey-pt-anoncontribs": "{{doc-accesskey}}\nSee also:\n* 
{{msg-mw|Anoncontribs}}\n* {{msg-mw|Tooltip-pt-anoncontribs}}",
"accesskey-pt-login": "{{doc-accesskey}}",
+   "accesskey-pt-login-private": "{{doc-accesskey}}",
"accesskey-pt-logout": "{{doc-accesskey}}\nSee also:\n* 
{{msg-mw|Logout}}\n* {{msg-mw|Accesskey-pt-logout}}\n* 
{{msg-mw|Tooltip-pt-logout}}",
"accesskey-pt-createaccount": "{{doc-accesskey}}",
"accesskey-ca-talk": "{{doc-accesskey}}\nSee also:\n* 
{{msg-mw|Talk}}\n* {{msg-mw|Accesskey-ca-talk}}\n* {{msg-mw|Tooltip-ca-talk}}",
@@ -2994,6 +2995,7 @@
"tooltip-pt-mycontris": "Tooltip shown when hovering over the 
{{msg-mw|Mycontris}} link in your personal toolbox (upper right side).\n\nSee 
also:\n* {{msg-mw|Mycontris}}\n* {{msg-mw|Accesskey-pt-mycontris}}\n* 
{{msg-mw|Tooltip-pt-mycontris}}",
"tooltip-pt-anoncontribs": "Tooltip shown when hovering over the 
{{msg-mw|Anoncontribs}} link in your personal toolbox (upper right 
side).\n\nSee also:\n* {{msg-mw|Anoncontribs}}\n* 
{{msg-mw|Accesskey-pt-anoncontribs}}",
"tooltip-pt-login": "Tooltip shown when hovering over the link 'Log in' 
in the upper right corner show on all pages while not logged in.",
+   "tooltip-pt-login-private": "Tooltip shown when hovering over the link 
'Log in' in the upper right corner show on all pages while not logged in, and 
wiki is private.",
"tooltip-pt-logout": "Tooltip shown when hovering over the 
{{msg-mw|Logout}} link in your personal toolbox (upper right side).\n\nSee 
also:\n* {{msg-mw|Logout}}\n* {{msg-mw|Accesskey-pt-logout}}\n* 
{{msg-mw|Tooltip-pt-logout}}\n{{Identical|Log out}}",
"tooltip-pt-createaccount": "Tooltip shown when hovering over the link 
'Create account' in the upper right corner show on all pages while not logged 
in.",
"tooltip-ca-talk": 

[MediaWiki-commits] [Gerrit] wikidata...rdf[master]: Update GUI

2017-04-19 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/349137 )

Change subject: Update GUI
..


Update GUI

Change-Id: I60a52b6cd686230ae729dc968b6e903cff5a9c64
---
M gui
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/gui b/gui
index 80c1a0a..d959ce6 16
--- a/gui
+++ b/gui
@@ -1 +1 @@
-Subproject commit 80c1a0add8b1161c48c4de9be219e0c1a4ee91f0
+Subproject commit d959ce64dc67d38780841f404de908a959c97bc5

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: dnsrec/icinga: add child/parent rel between monitor hosts

2017-04-19 Thread Dzahn (Code Review)
Dzahn has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/347984 )

Change subject: dnsrec/icinga: add child/parent rel between monitor hosts
..


dnsrec/icinga: add child/parent rel between monitor hosts

dnsrec hosts exist in Icinga in 2 ways.

First as regular hosts with default checks incl. ping and
second there are "virtual hosts" added in with a monitoring::host
in modules/dnsrecursor/manifests/monitor.pp which adds one host
per IP address.

This is for the "check_dns!www.wikipedia.org" check which is applied
to BOTH the IPv4 and the IPv6 address of the host by:

modules/role/manifests/dnsrecursor.pp:
::dnsrecursor::monitor { [ $::ipaddress, $::ipaddress6_eth0 ]: }

Today we had a reinstall of one of these servers and even though the
first kind of hosts were downtimed in Icinga we still did get alerts
about those other virtual IP hosts not being reachable.

This change should tell Icinga to consider these hosts as a child
of their parent host.

This should result in a status "UNREACHABLE" instead of "DOWN" because
Icinga then understands it just can't get to them because the other host
is down per its reachability logic.

This in turn should mean that icinga-wm is not reporting it on IRC and spamming
us because notification settings are to just report DOWN/UP/FLAP for hosts.
(and if not we can adjust that)

https://docs.icinga.com/latest/en/networkreachability.html#parentchildrelations

Change-Id: I7ab92a15f51f038316fc5505ab0d737d93ee52d9
---
M modules/dnsrecursor/manifests/monitor.pp
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/modules/dnsrecursor/manifests/monitor.pp 
b/modules/dnsrecursor/manifests/monitor.pp
index c1e1cb7..e2e1b48 100644
--- a/modules/dnsrecursor/manifests/monitor.pp
+++ b/modules/dnsrecursor/manifests/monitor.pp
@@ -3,6 +3,7 @@
 # Monitoring
 monitoring::host { $title:
 ip_address => $title,
+parents=> $::hostname,
 }
 monitoring::service { "recursive dns ${title}":
 host  => $title,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7ab92a15f51f038316fc5505ab0d737d93ee52d9
Gerrit-PatchSet: 5
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn 
Gerrit-Reviewer: Alexandros Kosiaris 
Gerrit-Reviewer: BBlack 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: Giuseppe Lavagetto 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...DonationInterface[master]: Comments and todos

2017-04-19 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/342547 )

Change subject: Comments and todos
..


Comments and todos

Change-Id: I16be18f5618cb34b341b6c3b76c730b928f727c9
---
M gateway_common/GatewayPage.php
M gateway_common/donation.api.php
M gateway_common/gateway.adapter.php
3 files changed, 11 insertions(+), 1 deletion(-)

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



diff --git a/gateway_common/GatewayPage.php b/gateway_common/GatewayPage.php
index a220050..0e88c00 100644
--- a/gateway_common/GatewayPage.php
+++ b/gateway_common/GatewayPage.php
@@ -122,6 +122,7 @@
return;
}
 
+   // FIXME: Should have checked this before creating the adapter.
if ( $this->adapter->getGlobal( 'Enabled' ) !== true ) {
$this->logger->info( 'Displaying fail page for disabled 
gateway' );
$this->displayFailPage();
@@ -341,7 +342,8 @@
protected function handleDonationRequest() {
$this->setHeaders();
 
-   // TODO: this is where we should feed GPCS parameters into 
DonationData.
+   // TODO: This is where we should feed GPCS parameters into the 
gateway
+   // and DonationData, rather than harvest params in the adapter 
itself.
 
// dispatch forms/handling
if ( $this->adapter->checkTokens() ) {
diff --git a/gateway_common/donation.api.php b/gateway_common/donation.api.php
index d560699..8b2e1fa 100644
--- a/gateway_common/donation.api.php
+++ b/gateway_common/donation.api.php
@@ -30,6 +30,7 @@
$gatewayObj->revalidate();
if ( $gatewayObj->getAllErrors() ) {
$outputResult['errors'] = $gatewayObj->getAllErrors();
+   // FIXME: What is this junk?  Smaller API, like 
getResult()->addErrors
$this->getResult()->setIndexedTagName( 
$outputResult['errors'], 'error' );
$this->getResult()->addValue( null, 'result', 
$outputResult );
return;
diff --git a/gateway_common/gateway.adapter.php 
b/gateway_common/gateway.adapter.php
index 84b980d..c65e6f3 100644
--- a/gateway_common/gateway.adapter.php
+++ b/gateway_common/gateway.adapter.php
@@ -237,6 +237,7 @@
$this->session_resetOnSwitch(); // Need to do this before 
creating DonationData
 
// FIXME: this should not have side effects like setting 
order_id_meta['final']
+   // TODO: On second thought, neither set data nor validate in 
this constructor.
$this->dataObj = new DonationData( $this, 
$options['external_data'] );
 
$this->setValidationErrors( 
$this->getOriginalValidationErrors() );
@@ -348,6 +349,8 @@
}
 
foreach ( $this->config['transformers'] as $className ) {
+   // TODO: Pass $this to the constructor so we can take 
gateway out
+   // of the interfaces.
$this->data_transformers[] = new $className();
}
}
@@ -896,10 +899,12 @@
$this->session_addDonorData();
if ( !$this->validatedOK() ){
//If the data didn't validate okay, prevent all data 
transmissions.
+   // TODO: Rename variable to "response".
$return = new PaymentTransactionResponse();
$return->setCommunicationStatus( false );
$return->setMessage( 'Failed data validation' );
foreach ( $this->getAllErrors() as $code => $error ) {
+   // TODO: Error should already be in a native 
format.
$return->addError( $code, array( 'message' => 
$error, 'logLevel' => LogLevel::INFO, 'debugInfo' => '' ) );
}
// TODO: should we set $this->transaction_response ?
@@ -1470,6 +1475,8 @@
/**
 * Parse the response to get the errors in a format we can log and 
otherwise deal with.
 * @return array a key/value array of codes (if they exist) and 
messages.
+* TODO: Move to a parsing class, where these are part of an interface
+* rather than empty although non-abstract.
 */
protected function parseResponseErrors( $response ) {
return array();

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I16be18f5618cb34b341b6c3b76c730b928f727c9
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/DonationInterface
Gerrit-Branch: master
Gerrit-Owner: Awight 
Gerrit-Reviewer: AndyRussG 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Document which EtcdConfig parameters are optional

2017-04-19 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/349126 )

Change subject: Document which EtcdConfig parameters are optional
..


Document which EtcdConfig parameters are optional

Change-Id: Ic6b56ed2f8789ae7920cdfc12f34b00db4a76c3a
---
M includes/config/EtcdConfig.php
1 file changed, 5 insertions(+), 5 deletions(-)

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



diff --git a/includes/config/EtcdConfig.php b/includes/config/EtcdConfig.php
index 0f2f641..d3fbd65 100644
--- a/includes/config/EtcdConfig.php
+++ b/includes/config/EtcdConfig.php
@@ -62,12 +62,12 @@
 *   - host: the host address and port
 *   - protocol: either http or https
 *   - directory: the etc "directory" were MediaWiki specific variables 
are located
-*   - encoding: one of ("JSON", "YAML")
+*   - encoding: one of ("JSON", "YAML"). Defaults to JSON. [optional]
 *   - cache: BagOStuff instance or ObjectFactory spec thereof for a 
server cache.
-*The cache will also be used as a fallback if etcd is down.
-*   - cacheTTL: logical cache TTL in seconds
-*   - skewTTL: maximum seconds to randomly lower the assigned TTL on 
cache save
-*   - timeout: seconds to wait for etcd before throwing an error
+*The cache will also be used as a fallback if etcd is 
down. [optional]
+*   - cacheTTL: logical cache TTL in seconds [optional]
+*   - skewTTL: maximum seconds to randomly lower the assigned TTL on 
cache save [optional]
+*   - timeout: seconds to wait for etcd before throwing an error 
[optional]
 */
public function __construct( array $params ) {
$params += [

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic6b56ed2f8789ae7920cdfc12f34b00db4a76c3a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz 
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] search/MjoLniR[master]: Collect feature vectors from elasticsearch

2017-04-19 Thread EBernhardson (Code Review)
EBernhardson has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349143 )

Change subject: Collect feature vectors from elasticsearch
..

Collect feature vectors from elasticsearch

Simple and straight forward collection of feature vectors from
elasticsearch. For the moment this skips the kafka middleman
that is planned to be used eventually for shipping data between
analytics and prod networks. That can be added, but seems best to
start with something simple and obvious.

This includes a relatively straight forward way of defining features,
but hopefully as work progresses on the elasticsearch plugin we can
remove that and provide elasticsearch with only the name of some
feature set to collect information about.

Bug: T163407
Change-Id: Iaf3d1eab15728397c8f197c9410477430cdba8a0
---
M .gitignore
A mjolnir/features.py
A mjolnir/test/fixtures/requests/test_features.sqlite3
A mjolnir/test/test_features.py
M setup.py
5 files changed, 408 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/search/MjoLniR 
refs/changes/43/349143/1

diff --git a/.gitignore b/.gitignore
index 4b7c536..1e56238 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,6 +5,7 @@
 
 # Distribution / packaging
 venv/
+build/
 *.egg-info/
 *.egg
 *.log
diff --git a/mjolnir/features.py b/mjolnir/features.py
new file mode 100644
index 000..b5504e7
--- /dev/null
+++ b/mjolnir/features.py
@@ -0,0 +1,326 @@
+"""
+Integration for collecting feature vectors from elasticsearch
+"""
+
+from collections import defaultdict
+import json
+import mjolnir.spark
+import pyspark.sql
+from pyspark.sql import functions as F
+import requests
+
+
+def _wrap_with_page_ids(hit_page_ids, should):
+"""Wrap an elasticsearch query with an ids filter.
+
+Parameters
+--
+hit_page_ids : list of ints
+Set of page ids to collect features for
+should : dict or list of dict
+Elasticsearch query for a single feature
+
+Returns
+---
+string
+JSON encoded elasticsearch query
+"""
+assert len(hit_page_ids) < 1
+if type(should) is not list:
+should = [should]
+return json.dumps({
+"_source": False,
+"from": 0,
+"size": ,
+"query": {
+"bool": {
+"filter": {
+'ids': {
+'values': map(str, set(hit_page_ids)),
+}
+},
+"should": should,
+"disable_coord": True,
+}
+}
+})
+
+
+class ScriptFeature(object):
+"""
+Query feature using elasticsearch script_score
+
+...
+
+Methods
+---
+make_query(query)
+Build the elasticsearch query
+"""
+
+def __init__(self, name, script, lang='expression'):
+self.name = name
+self.script = script
+self.lang = lang
+
+def make_query(self, query):
+"""Build the elasticsearch query
+
+Parameters
+--
+query : string
+User provided query term (unused)
+"""
+return {
+"function_score": {
+"score_mode": "sum",
+"boost_mode": "sum",
+"functions": [
+{
+"script_score": {
+"script": {
+"inline": self.script,
+"lang": self.lang,
+}
+}
+}
+]
+}
+}
+
+
+class MultiMatchFeature(object):
+"""
+Query feature using elasticsearch multi_match
+
+...
+
+Methods
+---
+make_query(query)
+Build the elasticsearch query
+"""
+def __init__(self, name, fields, minimum_should_match=1, 
match_type="most_fields"):
+"""
+
+Parameters
+--
+name : string
+Name of the feature
+fields : list
+Fields to perform multi_match against
+minimum_should_match: int, optional
+Minimum number of fields that should match. (Default: 1)
+match_type : string, optional
+Type of match to perform. (Default: most_fields)
+"""
+self.name = name
+assert len(fields) > 0
+self.fields = fields
+self.minimum_should_match = minimum_should_match
+self.match_type = match_type
+
+def make_query(self, query):
+"""Build the elasticsearch query
+
+Parameters
+--
+query : string
+User provided query term
+"""
+return {
+"multi_match": {
+"query": query,
+"minimum_should_match": self.minimum_should_match,
+"type": self.match_type,
+"fields": 

[MediaWiki-commits] [Gerrit] operations/puppet[production]: base/icinga: fix path to check_cpufreq plugin

2017-04-19 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349142 )

Change subject: base/icinga: fix path to check_cpufreq plugin
..

base/icinga: fix path to check_cpufreq plugin

follow-up to Change-Id Ia0ffce19b110439e.

missing the 'monitoring' part in the file path

Change-Id: Ic01e79f16b6b89caba4643fd4f04da1cb66815ec
---
M modules/base/manifests/monitoring/host.pp
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/42/349142/1

diff --git a/modules/base/manifests/monitoring/host.pp 
b/modules/base/manifests/monitoring/host.pp
index 1966f14..a1e4172 100644
--- a/modules/base/manifests/monitoring/host.pp
+++ b/modules/base/manifests/monitoring/host.pp
@@ -141,7 +141,7 @@
 
 file { '/usr/local/lib/nagios/plugins/check_cpufreq':
 ensure => present,
-source => 'puppet:///modules/base/check_cpufreq',
+source => 'puppet:///modules/base/monitoring/check_cpufreq',
 owner  => 'root',
 group  => 'root',
 mode   => '0555',

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: base/icinga: fix path to check_cpufreq plugin

2017-04-19 Thread Dzahn (Code Review)
Dzahn has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/349142 )

Change subject: base/icinga: fix path to check_cpufreq plugin
..


base/icinga: fix path to check_cpufreq plugin

follow-up to Change-Id Ia0ffce19b110439e.

missing the 'monitoring' part in the file path

Change-Id: Ic01e79f16b6b89caba4643fd4f04da1cb66815ec
---
M modules/base/manifests/monitoring/host.pp
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/modules/base/manifests/monitoring/host.pp 
b/modules/base/manifests/monitoring/host.pp
index 1966f14..a1e4172 100644
--- a/modules/base/manifests/monitoring/host.pp
+++ b/modules/base/manifests/monitoring/host.pp
@@ -141,7 +141,7 @@
 
 file { '/usr/local/lib/nagios/plugins/check_cpufreq':
 ensure => present,
-source => 'puppet:///modules/base/check_cpufreq',
+source => 'puppet:///modules/base/monitoring/check_cpufreq',
 owner  => 'root',
 group  => 'root',
 mode   => '0555',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic01e79f16b6b89caba4643fd4f04da1cb66815ec
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn 
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] operations/puppet[production]: base: add icinga check for CPU frequency on Dell R320

2017-04-19 Thread Dzahn (Code Review)
Dzahn has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/348976 )

Change subject: base: add icinga check for CPU frequency on Dell R320
..


base: add icinga check for CPU frequency on Dell R320

Add an Icinga monitoring service that checks for
CPU frequency lower than 600MHz and is only added on
Dell R320 servers. Since we had several cases of unexpected
throttling to 200MHz in the past and we would like to detect
those earlier.

Bug: T163220
Change-Id: Ia0ffce19b110439efad5b269fde0b946c8218e0e
---
R modules/base/files/monitoring/check_cpufreq
M modules/base/manifests/monitoring/host.pp
2 files changed, 16 insertions(+), 0 deletions(-)

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



diff --git a/modules/icinga/files/check_cpufreq 
b/modules/base/files/monitoring/check_cpufreq
similarity index 100%
rename from modules/icinga/files/check_cpufreq
rename to modules/base/files/monitoring/check_cpufreq
diff --git a/modules/base/manifests/monitoring/host.pp 
b/modules/base/manifests/monitoring/host.pp
index c30050c..1966f14 100644
--- a/modules/base/manifests/monitoring/host.pp
+++ b/modules/base/manifests/monitoring/host.pp
@@ -136,4 +136,20 @@
 nrpe_command => 
'/usr/local/lib/nagios/plugins/check_systemd_state',
 }
 }
+
+if $::productname == 'PowerEdge R320' {
+
+file { '/usr/local/lib/nagios/plugins/check_cpufreq':
+ensure => present,
+source => 'puppet:///modules/base/check_cpufreq',
+owner  => 'root',
+group  => 'root',
+mode   => '0555',
+}
+
+::nrpe::monitor_service { 'check_cpufreq':
+description  => 'CPU frequency',
+nrpe_command => '/usr/local/lib/nagios/plugins/check_cpufreq 600',
+}
+}
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia0ffce19b110439efad5b269fde0b946c8218e0e
Gerrit-PatchSet: 4
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: Gehel 
Gerrit-Reviewer: Giuseppe Lavagetto 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] wikimedia...crm[deployment]: Merge branch 'master' into deployment

2017-04-19 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/349141 )

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


Merge branch 'master' into deployment

And update vendor

a384013 Update libraries (upstream php-queue)

Change-Id: I4f4caaa2500300874e2a5dbc14ef0b3e1c684117
---
M vendor
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/vendor b/vendor
index 8343a58..91d1300 16
--- a/vendor
+++ b/vendor
@@ -1 +1 @@
-Subproject commit 8343a58142b81afa05683678e6afc9a42ad9abcf
+Subproject commit 91d130095b7102a59608f969ef890ae7a17e0dbc

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4f4caaa2500300874e2a5dbc14ef0b3e1c684117
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: deployment
Gerrit-Owner: Ejegg 
Gerrit-Reviewer: Ejegg 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] wikimedia...crm[deployment]: Merge branch 'master' into deployment

2017-04-19 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349141 )

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

Merge branch 'master' into deployment

And update vendor

a384013 Update libraries (upstream php-queue)

Change-Id: I4f4caaa2500300874e2a5dbc14ef0b3e1c684117
---
M vendor
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/41/349141/1

diff --git a/vendor b/vendor
index 8343a58..91d1300 16
--- a/vendor
+++ b/vendor
@@ -1 +1 @@
-Subproject commit 8343a58142b81afa05683678e6afc9a42ad9abcf
+Subproject commit 91d130095b7102a59608f969ef890ae7a17e0dbc

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4f4caaa2500300874e2a5dbc14ef0b3e1c684117
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: deployment
Gerrit-Owner: Ejegg 

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


[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Update libraries (upstream php-queue)

2017-04-19 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/349136 )

Change subject: Update libraries (upstream php-queue)
..


Update libraries (upstream php-queue)

Change-Id: I733950b2ec99d981b265ac44398bc194162e3e3f
---
M composer.json
M composer.lock
2 files changed, 69 insertions(+), 22 deletions(-)

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



diff --git a/composer.json b/composer.json
index afb6d1d..3a66391 100644
--- a/composer.json
+++ b/composer.json
@@ -28,10 +28,6 @@
 },
 "repositories": [
 {
-"type": "vcs",
-"url": 
"https://gerrit.wikimedia.org/r/p/wikimedia/fundraising/php-queue.git;
-},
-{
 "type": "git",
 "url": "https://github.com/ejegg/login-and-pay-with-amazon-sdk-php;
 }
diff --git a/composer.lock b/composer.lock
index fddf3e8..9b9b0ba 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,9 +4,54 @@
 "Read more about it at 
https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file;,
 "This file is @generated automatically"
 ],
-"hash": "3d6f8c32ad33ad35ce6ea1c9c53e9a9d",
-"content-hash": "d55d94a44358dcbf751118edd5798fe3",
+"hash": "cd7923c2405b7d871df92d62b63ddcd2",
+"content-hash": "144541d5f1d3ad2122ce999cabaf4df2",
 "packages": [
+{
+"name": "addshore/psr-6-mediawiki-bagostuff-adapter",
+"version": "0.1",
+"source": {
+"type": "git",
+"url": 
"https://github.com/addshore/psr-6-mediawiki-bagostuff-adapter.git;,
+"reference": "92f3bb69bf3e7f51b8b66ae74b6a4a291637354c"
+},
+"dist": {
+"type": "zip",
+"url": 
"https://api.github.com/repos/addshore/psr-6-mediawiki-bagostuff-adapter/zipball/92f3bb69bf3e7f51b8b66ae74b6a4a291637354c;,
+"reference": "92f3bb69bf3e7f51b8b66ae74b6a4a291637354c",
+"shasum": ""
+},
+"require": {
+"psr/cache": "^1.0.0"
+},
+"require-dev": {
+"cache/integration-tests": "~0.9.1",
+"jakub-onderka/php-parallel-lint": "^0.9.2",
+"mediawiki/mediawiki-codesniffer": "^0.7.2",
+"phpunit/phpunit": "~4.8.0|~5.3.0"
+},
+"type": "library",
+"autoload": {
+"psr-4": {
+"Addshore\\Psr\\Cache\\MWBagOStuffAdapter\\": "src/"
+}
+},
+"notification-url": "https://packagist.org/downloads/;,
+"license": [
+"GPL-2.0+"
+],
+"authors": [
+{
+"name": "Addshore"
+}
+],
+"description": "A MediaWiki BagOStuff PSR-6 adapter library",
+"keywords": [
+"cache",
+"mediawiki"
+],
+"time": "2017-02-16 14:33:59"
+},
 {
 "name": "amzn/login-and-pay-with-amazon-sdk-php",
 "version": "dev-master",
@@ -92,8 +137,14 @@
 "version": "dev-master",
 "source": {
 "type": "git",
-"url": 
"https://gerrit.wikimedia.org/r/p/wikimedia/fundraising/php-queue.git;,
-"reference": "d56c5bd69dad595f2e00a3e10c851736b1feb57b"
+"url": "https://github.com/CoderKungfu/php-queue.git;,
+"reference": "dd8412f105632d31cdd77933ec40a08640752c99"
+},
+"dist": {
+"type": "zip",
+"url": 
"https://api.github.com/repos/CoderKungfu/php-queue/zipball/dd8412f105632d31cdd77933ec40a08640752c99;,
+"reference": "dd8412f105632d31cdd77933ec40a08640752c99",
+"shasum": ""
 },
 "require": {
 "clio/clio": "0.1.*",
@@ -101,15 +152,19 @@
 "php": ">=5.3.0"
 },
 "require-dev": {
-"jakub-onderka/php-parallel-lint": "0.9",
-"phpunit/phpunit": "4.4.*"
+"amazonwebservices/aws-sdk-for-php": "dev-master",
+"aws/aws-sdk-php": "dev-master",
+"ext-memcache": "*",
+"iron-io/iron_mq": "dev-master",
+"microsoft/windowsazure": "dev-master",
+"mrpoundsign/pheanstalk-5.3": "dev-master",
+"predis/predis": "1.*"
 },
 "suggest": {
 "Respect/Rest": "For a REST server to post job data",
 "amazonwebservices/aws-sdk-for-php": "For AWS SQS backend 
support (legacy version)",
 "aws/aws-sdk-php": "For AWS SQS backend support",
 "clio/clio": "Support for daemonizing PHP 

[MediaWiki-commits] [Gerrit] mediawiki...MobileFrontend[master]: Hygiene: Folder rename + Document MFAllowNonJavaScriptEditin...

2017-04-19 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/347128 )

Change subject: Hygiene: Folder rename + Document MFAllowNonJavaScriptEditing 
config variable
..


Hygiene: Folder rename + Document MFAllowNonJavaScriptEditing config variable

Make it clearer that the fallback editor styles apply to all mobile skins,
not just Minerva. Document the config variable in the README.

This will aid splitting Minerva out into a separate repository.

Change-Id: I66d1181d9dac7dad586f6e046bbee8a9403af3cd
---
M README.md
M extension.json
M includes/MobileFrontend.hooks.php
R resources/mobile.fallbackeditor.styles/fallbackeditor.less
4 files changed, 10 insertions(+), 3 deletions(-)

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



diff --git a/README.md b/README.md
index a0c6ed4..8adb1f5 100644
--- a/README.md
+++ b/README.md
@@ -676,6 +676,13 @@
   ]
 ```
 
+ $wgMFAllowNonJavaScriptEditing
+
+Adds support for non-JavaScript editing on mobile skins.
+
+* Type: `Boolean`
+* Default: `false`
+
  $wgMFStripResponsiveImages
 
 Whether to strip `srcset` attributes from all images on mobile renderings. This
diff --git a/extension.json b/extension.json
index b5c7897..59c40ac 100644
--- a/extension.json
+++ b/extension.json
@@ -1481,12 +1481,12 @@
"resources/skins.minerva.editor/init.js"
]
},
-   "skins.minerva.fallbackeditor": {
+   "mobile.fallbackeditor.styles": {
"targets": [
"mobile"
],
"styles": [
-   
"resources/skins.minerva.fallbackeditor/fallbackeditor.less"
+   
"resources/mobile.fallbackeditor.styles/fallbackeditor.less"
]
},
"skins.minerva.backtotop": {
diff --git a/includes/MobileFrontend.hooks.php 
b/includes/MobileFrontend.hooks.php
index d4f200c..53b67c9 100644
--- a/includes/MobileFrontend.hooks.php
+++ b/includes/MobileFrontend.hooks.php
@@ -782,7 +782,7 @@
$requestAction = $out->getRequest()->getVal( 'action' );
if ( $noJsEditing && ( $requestAction === 'edit' || 
$requestAction === 'submit' ) ) {
$out->addModuleStyles( [
-   'skins.minerva.fallbackeditor', 
'mobile.messageBox'
+   'mobile.fallbackeditor.styles', 
'mobile.messageBox'
] );
}
}
diff --git a/resources/skins.minerva.fallbackeditor/fallbackeditor.less 
b/resources/mobile.fallbackeditor.styles/fallbackeditor.less
similarity index 100%
rename from resources/skins.minerva.fallbackeditor/fallbackeditor.less
rename to resources/mobile.fallbackeditor.styles/fallbackeditor.less

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I66d1181d9dac7dad586f6e046bbee8a9403af3cd
Gerrit-PatchSet: 5
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson 
Gerrit-Reviewer: Bartosz Dziewoński 
Gerrit-Reviewer: Florianschmidtwelzow 
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] mediawiki...MobileFrontend[master]: Reveal login/logout buttons when non-js editing is available

2017-04-19 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/349114 )

Change subject: Reveal login/logout buttons when non-js editing is available
..


Reveal login/logout buttons when non-js editing is available

Bug: T125174
Change-Id: If8094372ae01ba7c58eb1bd9a8b20ad9df50a85f
---
M includes/skins/SkinMinerva.php
M resources/mobile.mainMenu/mainmenu.less
M resources/mobile.special.mobilemenu.styles/mobilemenu.less
3 files changed, 15 insertions(+), 22 deletions(-)

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



diff --git a/includes/skins/SkinMinerva.php b/includes/skins/SkinMinerva.php
index c7b851a..690aa8e 100644
--- a/includes/skins/SkinMinerva.php
+++ b/includes/skins/SkinMinerva.php
@@ -645,6 +645,7 @@
 */
protected function insertLogInOutMenuItem( MenuBuilder $menu ) {
$query = [];
+   $canEdit = $this->getMFConfig()->get( 
'MFAllowNonJavaScriptEditing' );
if ( !$this->getRequest()->wasPosted() ) {
$returntoquery = $this->getRequest()->getValues();
unset( $returntoquery['title'] );
@@ -665,7 +666,7 @@
$url = SpecialPage::getTitleFor( 'Userlogout' 
)->getLocalURL( $query );
$username = $user->getName();
 
-   $menu->insert( 'auth' )
+   $menu->insert( 'auth', $isJSOnly = !$canEdit )
->addComponent(
$username,
Title::newFromText( $username, NS_USER 
)->getLocalUrl(),
@@ -687,7 +688,7 @@
unset( $returntoquery['campaign'] );
$query[ 'returntoquery' ] = wfArrayToCgi( 
$returntoquery );
$url = $this->getLoginUrl( $query );
-   $menu->insert( 'auth', $isJSOnly = true )
+   $menu->insert( 'auth', $isJSOnly = !$canEdit )
->addComponent(
$this->msg( 
'mobile-frontend-main-menu-login' )->escaped(),
$url,
diff --git a/resources/mobile.mainMenu/mainmenu.less 
b/resources/mobile.mainMenu/mainmenu.less
index 75f0e88..d225405 100644
--- a/resources/mobile.mainMenu/mainmenu.less
+++ b/resources/mobile.mainMenu/mainmenu.less
@@ -56,21 +56,19 @@
float: left;
min-height: 100%;
 
-   .client-js & {
-   .secondary-action {
-   border: 0;
-   position: absolute;
-   right: 0;
-   top: 0;
-   bottom: 0;
-   padding-right: 0;
-   border-left: 1px solid @grayMediumLight;
-   }
+   .secondary-action {
+   border: 0;
+   position: absolute;
+   right: 0;
+   top: 0;
+   bottom: 0;
+   padding-right: 0;
+   border-left: 1px solid @grayMediumLight;
+   }
 
-   .primary-action {
-   // 1px for the logout icon border-left
-   margin-right: @iconSize + @iconGutterWidth * 2;
-   }
+   .primary-action {
+   // 1px for the logout icon border-left
+   margin-right: @iconSize + @iconGutterWidth * 2;
}
 
ul {
diff --git a/resources/mobile.special.mobilemenu.styles/mobilemenu.less 
b/resources/mobile.special.mobilemenu.styles/mobilemenu.less
index 7582bc5..9b7d346 100644
--- a/resources/mobile.special.mobilemenu.styles/mobilemenu.less
+++ b/resources/mobile.special.mobilemenu.styles/mobilemenu.less
@@ -16,9 +16,3 @@
display: none;
}
 }
-
-.client-nojs {
-   nav .secondary-action {
-   display: none;
-   }
-}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If8094372ae01ba7c58eb1bd9a8b20ad9df50a85f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson 
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] analytics/refinery[master]: Fix iOS app detection for monthly and daily uniques

2017-04-19 Thread HaeB (Code Review)
HaeB has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349140 )

Change subject: Fix iOS app detection for monthly and daily uniques
..

Fix iOS app detection for monthly and daily uniques

Add detection of 'iOS' (in addition to 'iPhone') in user agent,
to accord for a change dating around September 2016

Bug: T163403
Change-Id: I38c0417232e5ea47376f0b35c0e900866cbbba10
---
M oozie/mobile_apps/uniques/daily/generate_uniques_daily.hql
M oozie/mobile_apps/uniques/monthly/generate_uniques_monthly.hql
2 files changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/analytics/refinery 
refs/changes/40/349140/1

diff --git a/oozie/mobile_apps/uniques/daily/generate_uniques_daily.hql 
b/oozie/mobile_apps/uniques/daily/generate_uniques_daily.hql
index b1b5dac..bd600cd 100644
--- a/oozie/mobile_apps/uniques/daily/generate_uniques_daily.hql
+++ b/oozie/mobile_apps/uniques/daily/generate_uniques_daily.hql
@@ -56,7 +56,7 @@
 year,
 month,
 day,
-CASE WHEN user_agent LIKE('%iPhone%') THEN 'iOS' ELSE 'Android' END AS 
platform,
+CASE WHEN (user_agent LIKE '%iOS%' OR user_agent LIKE '%iPhone%') THEN 
'iOS' ELSE 'Android' END AS platform,
 COALESCE(x_analytics_map['wmfuuid'],
  parse_url(concat('http://bla.org/woo/', uri_query), 'QUERY', 
'appInstallID')) AS uuid
 FROM ${source_table}
diff --git a/oozie/mobile_apps/uniques/monthly/generate_uniques_monthly.hql 
b/oozie/mobile_apps/uniques/monthly/generate_uniques_monthly.hql
index 9954a48..c6b36a4 100644
--- a/oozie/mobile_apps/uniques/monthly/generate_uniques_monthly.hql
+++ b/oozie/mobile_apps/uniques/monthly/generate_uniques_monthly.hql
@@ -55,7 +55,7 @@
 SELECT
 year,
 month,
-CASE WHEN user_agent LIKE('%iPhone%') THEN 'iOS' ELSE 'Android' END AS 
platform,
+CASE WHEN (user_agent LIKE '%iOS%' OR user_agent LIKE '%iPhone%') THEN 
'iOS' ELSE 'Android' END AS platform,
 COALESCE(x_analytics_map['wmfuuid'],
  parse_url(concat('http://bla.org/woo/', uri_query), 'QUERY', 
'appInstallID')) AS uuid
 FROM ${source_table}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I38c0417232e5ea47376f0b35c0e900866cbbba10
Gerrit-PatchSet: 1
Gerrit-Project: analytics/refinery
Gerrit-Branch: master
Gerrit-Owner: HaeB 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Remove load array indexes from LoadBalancer errors

2017-04-19 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/349089 )

Change subject: Remove load array indexes from LoadBalancer errors
..


Remove load array indexes from LoadBalancer errors

This are not very useful and where not using SPI interpolation either.

Change-Id: Ia3a33da3a4593fbcba59b21f5b5028860752ce09
---
M includes/libs/rdbms/loadbalancer/LoadBalancer.php
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/includes/libs/rdbms/loadbalancer/LoadBalancer.php 
b/includes/libs/rdbms/loadbalancer/LoadBalancer.php
index 1202831..e2fbf72 100644
--- a/includes/libs/rdbms/loadbalancer/LoadBalancer.php
+++ b/includes/libs/rdbms/loadbalancer/LoadBalancer.php
@@ -269,11 +269,11 @@
$host = $this->getServerName( $i );
if ( $lag === false && !is_infinite( 
$maxServerLag ) ) {
$this->replLogger->error(
-   "Server {host} (#$i) is not 
replicating?", [ 'host' => $host ] );
+   "Server {host} is not 
replicating?", [ 'host' => $host ] );
unset( $loads[$i] );
} elseif ( $lag > $maxServerLag ) {
$this->replLogger->warning(
-   "Server {host} (#$i) has {lag} 
seconds of lag (>= {maxlag})",
+   "Server {host} has {lag} 
seconds of lag (>= {maxlag})",
[ 'host' => $host, 'lag' => 
$lag, 'maxlag' => $maxServerLag ]
);
unset( $loads[$i] );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia3a33da3a4593fbcba59b21f5b5028860752ce09
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz 
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] wikidata...rdf[master]: Make all logging use slf4j since this is what Blazegraph is ...

2017-04-19 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/349128 )

Change subject: Make all logging use slf4j since this is what Blazegraph is 
using.
..


Make all logging use slf4j since this is what Blazegraph is using.

Also fix some style warnings.

Change-Id: I345fddc126ed054ed9ebc00b3266184747a9ee41
---
M 
blazegraph/src/main/java/org/wikidata/query/rdf/blazegraph/inline/literal/AbstractMultiTypeExtension.java
M 
blazegraph/src/main/java/org/wikidata/query/rdf/blazegraph/inline/uri/WikibaseStyleStatementInlineUriHandler.java
M 
blazegraph/src/main/java/org/wikidata/query/rdf/blazegraph/label/EmptyLabelServiceOptimizer.java
M 
blazegraph/src/main/java/org/wikidata/query/rdf/blazegraph/label/LabelService.java
M 
blazegraph/src/test/java/org/wikidata/query/rdf/blazegraph/label/LabelServiceUnitTest.java
5 files changed, 16 insertions(+), 16 deletions(-)

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



diff --git 
a/blazegraph/src/main/java/org/wikidata/query/rdf/blazegraph/inline/literal/AbstractMultiTypeExtension.java
 
b/blazegraph/src/main/java/org/wikidata/query/rdf/blazegraph/inline/literal/AbstractMultiTypeExtension.java
index eaf51f4..018e5e9 100644
--- 
a/blazegraph/src/main/java/org/wikidata/query/rdf/blazegraph/inline/literal/AbstractMultiTypeExtension.java
+++ 
b/blazegraph/src/main/java/org/wikidata/query/rdf/blazegraph/inline/literal/AbstractMultiTypeExtension.java
@@ -9,10 +9,11 @@
 import java.util.Map;
 import java.util.Set;
 
-import org.apache.log4j.Logger;
 import org.openrdf.model.Literal;
 import org.openrdf.model.URI;
 import org.openrdf.model.Value;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import com.bigdata.rdf.internal.IDatatypeURIResolver;
 import com.bigdata.rdf.internal.IExtension;
@@ -32,7 +33,7 @@
  *roughly by Blazegraph - lots of rawtypes
  */
 public abstract class AbstractMultiTypeExtension 
implements IExtension {
-private static final Logger log = 
Logger.getLogger(WikibaseDateExtension.class);
+private static final Logger log = 
LoggerFactory.getLogger(WikibaseDateExtension.class);
 
 /**
  * IV to type map as resolved against resolver provided on construction.
diff --git 
a/blazegraph/src/main/java/org/wikidata/query/rdf/blazegraph/inline/uri/WikibaseStyleStatementInlineUriHandler.java
 
b/blazegraph/src/main/java/org/wikidata/query/rdf/blazegraph/inline/uri/WikibaseStyleStatementInlineUriHandler.java
index 1c158a4..1c1c027 100644
--- 
a/blazegraph/src/main/java/org/wikidata/query/rdf/blazegraph/inline/uri/WikibaseStyleStatementInlineUriHandler.java
+++ 
b/blazegraph/src/main/java/org/wikidata/query/rdf/blazegraph/inline/uri/WikibaseStyleStatementInlineUriHandler.java
@@ -4,7 +4,8 @@
 import java.util.Locale;
 import java.util.UUID;
 
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import com.bigdata.rdf.internal.InlineURIHandler;
 import com.bigdata.rdf.internal.impl.literal.AbstractLiteralIV;
@@ -29,7 +30,7 @@
  * @deprecated
  */
 public class WikibaseStyleStatementInlineUriHandler extends InlineURIHandler {
-private static final Logger log = 
Logger.getLogger(WikibaseStyleStatementInlineUriHandler.class);
+private static final Logger log = 
LoggerFactory.getLogger(WikibaseStyleStatementInlineUriHandler.class);
 
 public WikibaseStyleStatementInlineUriHandler(String namespace) {
 super(namespace);
@@ -99,7 +100,7 @@
 i = 
i.shiftLeft(Long.SIZE).or(unsigned(u.getLeastSignificantBits()));
 return new XSDIntegerIV(i);
 } catch (IllegalArgumentException e) {
-
Logger.getLogger(WikibaseStyleStatementInlineUriHandler.class).warn("tmp", e);
+log.warn("tmp", e);
 return null;
 }
 }
diff --git 
a/blazegraph/src/main/java/org/wikidata/query/rdf/blazegraph/label/EmptyLabelServiceOptimizer.java
 
b/blazegraph/src/main/java/org/wikidata/query/rdf/blazegraph/label/EmptyLabelServiceOptimizer.java
index 44cb389..e5922bd 100644
--- 
a/blazegraph/src/main/java/org/wikidata/query/rdf/blazegraph/label/EmptyLabelServiceOptimizer.java
+++ 
b/blazegraph/src/main/java/org/wikidata/query/rdf/blazegraph/label/EmptyLabelServiceOptimizer.java
@@ -2,11 +2,12 @@
 
 import java.util.List;
 
-import org.apache.log4j.Logger;
 import org.openrdf.model.URI;
 import org.openrdf.model.impl.URIImpl;
 import org.openrdf.model.vocabulary.RDFS;
 import org.openrdf.model.vocabulary.SKOS;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.wikidata.query.rdf.common.uri.Ontology;
 import org.wikidata.query.rdf.common.uri.SchemaDotOrg;
 
@@ -36,7 +37,7 @@
  */
 @SuppressWarnings("rawtypes")
 public class EmptyLabelServiceOptimizer extends AbstractJoinGroupOptimizer {
-private static final Logger log = 
Logger.getLogger(EmptyLabelServiceOptimizer.class);
+

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: UploadBase::getTitle can return null

2017-04-19 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/348793 )

Change subject: UploadBase::getTitle can return null
..


UploadBase::getTitle can return null

Change-Id: I5bd94f6233476bda43a01155f6e7d6df420412e2
---
M includes/upload/UploadBase.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/includes/upload/UploadBase.php b/includes/upload/UploadBase.php
index 2c0afdf..55fb685 100644
--- a/includes/upload/UploadBase.php
+++ b/includes/upload/UploadBase.php
@@ -798,7 +798,7 @@
 * Returns the title of the file to be uploaded. Sets mTitleError in 
case
 * the name was illegal.
 *
-* @return Title The title of the file or null in case the name was 
illegal
+* @return Title|null The title of the file or null in case the name 
was illegal
 */
public function getTitle() {
if ( $this->mTitle !== false ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5bd94f6233476bda43a01155f6e7d6df420412e2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Addshore 
Gerrit-Reviewer: Aaron Schulz 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Lower the amount of jobs pushed into redis at once

2017-04-19 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/349113 )

Change subject: Lower the amount of jobs pushed into redis at once
..


Lower the amount of jobs pushed into redis at once

This further limits how long the server can be tied up by push().

Change-Id: I02d242578dadc19912c9fccfdcf5e15c5eb78e9e
---
M includes/jobqueue/JobQueueRedis.php
1 file changed, 3 insertions(+), 1 deletion(-)

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



diff --git a/includes/jobqueue/JobQueueRedis.php 
b/includes/jobqueue/JobQueueRedis.php
index c2c9d66..eb91680 100644
--- a/includes/jobqueue/JobQueueRedis.php
+++ b/includes/jobqueue/JobQueueRedis.php
@@ -75,6 +75,8 @@
/** @var string Compression method to use */
protected $compression;
 
+   const MAX_PUSH_SIZE = 25; // avoid tying up the server
+
/**
 * @param array $params Possible keys:
 *   - redisConfig : An array of parameters to 
RedisConnectionPool::__construct().
@@ -212,7 +214,7 @@
if ( $flags & self::QOS_ATOMIC ) {
$batches = [ $items ]; // all or nothing
} else {
-   $batches = array_chunk( $items, 100 ); // avoid 
tying up the server
+   $batches = array_chunk( $items, 
self::MAX_PUSH_SIZE );
}
$failed = 0;
$pushed = 0;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I02d242578dadc19912c9fccfdcf5e15c5eb78e9e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz 
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] operations/mediawiki-config[master]: rpc: raise exception instead of die

2017-04-19 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/328182 )

Change subject: rpc: raise exception instead of die
..


rpc: raise exception instead of die

Change-Id: Ib01c7f9fa43cdbd15e0c71042870692c283db22a
---
M rpc/RunJobs.php
A tests/rpc/RunJobsTest.php
2 files changed, 47 insertions(+), 2 deletions(-)

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



diff --git a/rpc/RunJobs.php b/rpc/RunJobs.php
index 2db74e7..b479b07 100755
--- a/rpc/RunJobs.php
+++ b/rpc/RunJobs.php
@@ -19,9 +19,9 @@
  * @author Aaron Schulz
  */
 if ( !in_array( $_SERVER['REMOTE_ADDR'], array( '127.0.0.1', 
'0:0:0:0:0:0:0:1', '::1' ), true ) ) {
-   die( "Only loopback requests are allowed.\n" );
+   throw new Exception( "Only loopback requests are allowed.\n", 1 );
 } elseif ( $_SERVER['REQUEST_METHOD'] !== 'POST' ) {
-   die( "Request must use POST.\n" );
+   throw new Exception( "Request must use POST.\n", 2 );
 }
 
 define( 'MEDIAWIKI_JOB_RUNNER', 1 );
diff --git a/tests/rpc/RunJobsTest.php b/tests/rpc/RunJobsTest.php
new file mode 100644
index 000..becd086
--- /dev/null
+++ b/tests/rpc/RunJobsTest.php
@@ -0,0 +1,45 @@
+oldServer = $_SERVER;
+   }
+
+   protected function tearDown() {
+   $_SERVER = $this->oldServer;
+
+   parent::tearDown();
+   }
+
+   /**
+* @expectedException Exception
+* @expectedExceptionCode 1
+* @expectedExceptionMessage Only loopback requests are allowed
+*/
+   function testRaiseAnExceptionFromNonLocalhost() {
+   $_SERVER['REMOTE_ADDR'] = '192.0.2.42';
+   require __DIR__ . '/../../rpc/RunJobs.php';
+   }
+
+   /**
+* @dataProvider provideLocalhostIps
+*
+* @expectedException PHPUnit_Framework_Error_Notice
+* @expectedExceptionMessage Undefined index: REQUEST_METHOD
+*/
+   function testAcceptLocalhostRequest( $address ) {
+   $_SERVER['REMOTE_ADDR'] = $address;
+   require __DIR__ . '/../../rpc/RunJobs.php';
+   }
+
+   public function provideLocalhostIps() {
+   return [
+   'IPv4 loopback' => [ '127.0.0.1' ],
+   'IPv6 loopback' => [ '0:0:0:0:0:0:0:1' ],
+   'IPv6 loopback (short)' => [ '::1' ],
+   ];
+   }
+}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib01c7f9fa43cdbd15e0c71042870692c283db22a
Gerrit-PatchSet: 4
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Hashar 
Gerrit-Reviewer: Aaron Schulz 
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] wikidata...rdf[master]: Update GUI

2017-04-19 Thread Smalyshev (Code Review)
Smalyshev has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349137 )

Change subject: Update GUI
..

Update GUI

Change-Id: I60a52b6cd686230ae729dc968b6e903cff5a9c64
---
M gui
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/gui b/gui
index 80c1a0a..d959ce6 16
--- a/gui
+++ b/gui
@@ -1 +1 @@
-Subproject commit 80c1a0add8b1161c48c4de9be219e0c1a4ee91f0
+Subproject commit d959ce64dc67d38780841f404de908a959c97bc5

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

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

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


[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Update libraries (upstream php-queue)

2017-04-19 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349136 )

Change subject: Update libraries (upstream php-queue)
..

Update libraries (upstream php-queue)

Change-Id: I733950b2ec99d981b265ac44398bc194162e3e3f
---
M composer.json
M composer.lock
2 files changed, 69 insertions(+), 22 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/36/349136/1

diff --git a/composer.json b/composer.json
index afb6d1d..3a66391 100644
--- a/composer.json
+++ b/composer.json
@@ -28,10 +28,6 @@
 },
 "repositories": [
 {
-"type": "vcs",
-"url": 
"https://gerrit.wikimedia.org/r/p/wikimedia/fundraising/php-queue.git;
-},
-{
 "type": "git",
 "url": "https://github.com/ejegg/login-and-pay-with-amazon-sdk-php;
 }
diff --git a/composer.lock b/composer.lock
index fddf3e8..9b9b0ba 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,9 +4,54 @@
 "Read more about it at 
https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file;,
 "This file is @generated automatically"
 ],
-"hash": "3d6f8c32ad33ad35ce6ea1c9c53e9a9d",
-"content-hash": "d55d94a44358dcbf751118edd5798fe3",
+"hash": "cd7923c2405b7d871df92d62b63ddcd2",
+"content-hash": "144541d5f1d3ad2122ce999cabaf4df2",
 "packages": [
+{
+"name": "addshore/psr-6-mediawiki-bagostuff-adapter",
+"version": "0.1",
+"source": {
+"type": "git",
+"url": 
"https://github.com/addshore/psr-6-mediawiki-bagostuff-adapter.git;,
+"reference": "92f3bb69bf3e7f51b8b66ae74b6a4a291637354c"
+},
+"dist": {
+"type": "zip",
+"url": 
"https://api.github.com/repos/addshore/psr-6-mediawiki-bagostuff-adapter/zipball/92f3bb69bf3e7f51b8b66ae74b6a4a291637354c;,
+"reference": "92f3bb69bf3e7f51b8b66ae74b6a4a291637354c",
+"shasum": ""
+},
+"require": {
+"psr/cache": "^1.0.0"
+},
+"require-dev": {
+"cache/integration-tests": "~0.9.1",
+"jakub-onderka/php-parallel-lint": "^0.9.2",
+"mediawiki/mediawiki-codesniffer": "^0.7.2",
+"phpunit/phpunit": "~4.8.0|~5.3.0"
+},
+"type": "library",
+"autoload": {
+"psr-4": {
+"Addshore\\Psr\\Cache\\MWBagOStuffAdapter\\": "src/"
+}
+},
+"notification-url": "https://packagist.org/downloads/;,
+"license": [
+"GPL-2.0+"
+],
+"authors": [
+{
+"name": "Addshore"
+}
+],
+"description": "A MediaWiki BagOStuff PSR-6 adapter library",
+"keywords": [
+"cache",
+"mediawiki"
+],
+"time": "2017-02-16 14:33:59"
+},
 {
 "name": "amzn/login-and-pay-with-amazon-sdk-php",
 "version": "dev-master",
@@ -92,8 +137,14 @@
 "version": "dev-master",
 "source": {
 "type": "git",
-"url": 
"https://gerrit.wikimedia.org/r/p/wikimedia/fundraising/php-queue.git;,
-"reference": "d56c5bd69dad595f2e00a3e10c851736b1feb57b"
+"url": "https://github.com/CoderKungfu/php-queue.git;,
+"reference": "dd8412f105632d31cdd77933ec40a08640752c99"
+},
+"dist": {
+"type": "zip",
+"url": 
"https://api.github.com/repos/CoderKungfu/php-queue/zipball/dd8412f105632d31cdd77933ec40a08640752c99;,
+"reference": "dd8412f105632d31cdd77933ec40a08640752c99",
+"shasum": ""
 },
 "require": {
 "clio/clio": "0.1.*",
@@ -101,15 +152,19 @@
 "php": ">=5.3.0"
 },
 "require-dev": {
-"jakub-onderka/php-parallel-lint": "0.9",
-"phpunit/phpunit": "4.4.*"
+"amazonwebservices/aws-sdk-for-php": "dev-master",
+"aws/aws-sdk-php": "dev-master",
+"ext-memcache": "*",
+"iron-io/iron_mq": "dev-master",
+"microsoft/windowsazure": "dev-master",
+"mrpoundsign/pheanstalk-5.3": "dev-master",
+"predis/predis": "1.*"
 },
 "suggest": {
 "Respect/Rest": "For a REST server to post job data",
 "amazonwebservices/aws-sdk-for-php": "For AWS SQS backend 
support (legacy version)",
 "aws/aws-sdk-php": "For AWS SQS backend support",
 "clio/clio": "Support for 

[MediaWiki-commits] [Gerrit] wikidata...gui-deploy[production]: Merging from d959ce64dc67d38780841f404de908a959c97bc5:

2017-04-19 Thread Smalyshev (Code Review)
Smalyshev has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/349129 )

Change subject: Merging from d959ce64dc67d38780841f404de908a959c97bc5:
..


Merging from d959ce64dc67d38780841f404de908a959c97bc5:

Merge "Refactor "merge entity with label" helper function"

Change-Id: I3dd4fba1da5074a3a09abf74be34ede2c5bb4fa5
---
M embed.html
M index.html
A js/embed.wdqs.min.6ee9aee01fa130fc6d8f.js
D js/embed.wdqs.min.db86fe4367ca17605a29.js
A js/wdqs.min.8c5994ad39e84b4b42ae.js
D js/wdqs.min.ed35ad8da09792946565.js
6 files changed, 9 insertions(+), 9 deletions(-)

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




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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3dd4fba1da5074a3a09abf74be34ede2c5bb4fa5
Gerrit-PatchSet: 1
Gerrit-Project: wikidata/query/gui-deploy
Gerrit-Branch: production
Gerrit-Owner: Smalyshev 
Gerrit-Reviewer: Smalyshev 

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


[MediaWiki-commits] [Gerrit] oojs/ui[master]: SelectWidget/MenuSelectWidget: Maintain 'aria-activedescenda...

2017-04-19 Thread Code Review
Bartosz Dziewoński has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349135 )

Change subject: SelectWidget/MenuSelectWidget: Maintain 'aria-activedescendant' 
attribute on focus owner
..

SelectWidget/MenuSelectWidget: Maintain 'aria-activedescendant' attribute on 
focus owner

Our SelectWidget does not allow individual OptionWidgets to have
focus. Instead, it keeps track internally of which of the options
really is active (e.g. which option arrow navigation is relative to,
or which option will be selected if the user presses the enter key).
This makes some implementation details a bit easier.

However, it means we have to somehow inform accessibility tools about
the currently active option, since they can't guess it from the focus.
This is done by setting 'aria-activedescendant' on the DOM element
which actually has focus (the focus owner).

This is made a little more complicated because the SelectWidget can
stand on its own (e.g. RadioSelectWidget), in which case it is the
focus owner itself, or it can be a part of a larger widget (e.g.
MenuSelectWidget/DropdownInputWidget), in which case the focus owner
is usually somewhere else.

Bug: T149654
Change-Id: Ie993345e44ddb43dfbe2bebe0e12fd2bd9f5812e
---
M src/widgets/MenuSelectWidget.js
M src/widgets/SelectWidget.js
2 files changed, 30 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/35/349135/1

diff --git a/src/widgets/MenuSelectWidget.js b/src/widgets/MenuSelectWidget.js
index de8d457..8533f96 100644
--- a/src/widgets/MenuSelectWidget.js
+++ b/src/widgets/MenuSelectWidget.js
@@ -65,6 +65,9 @@
 
// Initialization
this.$element.addClass( 'oo-ui-menuSelectWidget' );
+   if ( config.widget ) {
+   this.setFocusOwner( config.widget.$tabIndexed );
+   }
 
// Initially hidden - using #toggle may cause errors if subclasses 
override toggle with methods
// that reference properties not initialized at that time of parent 
class construction
@@ -320,6 +323,7 @@
this.toggleClipping( true );
 
if ( this.getSelectedItem() ) {
+   this.$focusOwner.attr( 'aria-activedescendant', 
this.getSelectedItem().getElementId() );
this.getSelectedItem().scrollElementIntoView( { 
duration: 0 } );
}
 
@@ -328,6 +332,7 @@
this.getElementDocument().addEventListener( 
'mousedown', this.onDocumentMouseDownHandler, true );
}
} else {
+   this.$focusOwner.removeAttr( 'aria-activedescendant' );
this.unbindKeyDownListener();
this.unbindKeyPressListener();
this.getElementDocument().removeEventListener( 
'mousedown', this.onDocumentMouseDownHandler, true );
diff --git a/src/widgets/SelectWidget.js b/src/widgets/SelectWidget.js
index 444a63e..0fd638c 100644
--- a/src/widgets/SelectWidget.js
+++ b/src/widgets/SelectWidget.js
@@ -77,6 +77,7 @@
this.$element
.addClass( 'oo-ui-selectWidget oo-ui-selectWidget-depressed' )
.attr( 'role', 'listbox' );
+   this.setFocusOwner( this.$element );
if ( Array.isArray( config.items ) ) {
this.addItems( config.items );
}
@@ -583,6 +584,11 @@
}
}
if ( changed ) {
+   if ( item ) {
+   this.$focusOwner.attr( 'aria-activedescendant', 
item.getElementId() );
+   } else {
+   this.$focusOwner.removeAttr( 'aria-activedescendant' );
+   }
this.emit( 'highlight', item );
}
 
@@ -681,6 +687,13 @@
}
}
if ( changed ) {
+   if ( item && !item.constructor.static.highlightable ) {
+   if ( item ) {
+   this.$focusOwner.attr( 'aria-activedescendant', 
item.getElementId() );
+   } else {
+   this.$focusOwner.removeAttr( 
'aria-activedescendant' );
+   }
+   }
this.emit( 'select', item );
}
 
@@ -856,3 +869,15 @@
 
return this;
 };
+
+/**
+ * Set the DOM element which has focus while the user is interacting with this 
SelectWidget.
+ *
+ * Currently this is just used to set `aria-activedescendant` on it.
+ *
+ * @protected
+ * @param {jQuery} $focusOwner
+ */
+OO.ui.SelectWidget.prototype.setFocusOwner = function ( $focusOwner ) {
+   this.$focusOwner = $focusOwner;
+};

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie993345e44ddb43dfbe2bebe0e12fd2bd9f5812e

[MediaWiki-commits] [Gerrit] oojs/ui[master]: Element: New method #getElementId

2017-04-19 Thread Code Review
Bartosz Dziewoński has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349133 )

Change subject: Element: New method #getElementId
..

Element: New method #getElementId

The method ensures that the element has an 'id' attribute, setting it
to an unique value if it's missing, and returns its value.

Use it to simplify some code in Dialog. Further usages:
* I2d27bdbba408c31001e4db088148a3b454eb6e3a
* Ie993345e44ddb43dfbe2bebe0e12fd2bd9f5812e

Change-Id: Ica44cb523efab239b44dc1080460147c54bdba36
---
M src/Dialog.js
M src/Element.js
2 files changed, 17 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/33/349133/1

diff --git a/src/Dialog.js b/src/Dialog.js
index d6eead5..445f372 100644
--- a/src/Dialog.js
+++ b/src/Dialog.js
@@ -248,21 +248,15 @@
  * @inheritdoc
  */
 OO.ui.Dialog.prototype.initialize = function () {
-   var titleId;
-
// Parent method
OO.ui.Dialog.parent.prototype.initialize.call( this );
 
-   titleId = OO.ui.generateElementId();
-
// Properties
-   this.title = new OO.ui.LabelWidget( {
-   id: titleId
-   } );
+   this.title = new OO.ui.LabelWidget();
 
// Initialization
this.$content.addClass( 'oo-ui-dialog-content' );
-   this.$element.attr( 'aria-labelledby', titleId );
+   this.$element.attr( 'aria-labelledby', this.title.getElementId() );
this.setPendingElement( this.$head );
 };
 
diff --git a/src/Element.js b/src/Element.js
index fd597e9..562ede9 100644
--- a/src/Element.js
+++ b/src/Element.js
@@ -820,6 +820,21 @@
 };
 
 /**
+ * Ensure that the element has an 'id' attribute, setting it to an unique 
value if it's missing,
+ * and return its value.
+ *
+ * @return {string}
+ */
+OO.ui.Element.prototype.getElementId = function () {
+   var id = this.$element.attr( 'id' );
+   if ( id === undefined ) {
+   id = OO.ui.generateElementId();
+   this.$element.attr( 'id', id );
+   }
+   return id;
+};
+
+/**
  * Check if element supports one or more methods.
  *
  * @param {string|string[]} methods Method or list of methods to check

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ica44cb523efab239b44dc1080460147c54bdba36
Gerrit-PatchSet: 1
Gerrit-Project: oojs/ui
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] oojs/ui[master]: Set 'aria-owns' for everything with a dropdown list (ARIA co...

2017-04-19 Thread Code Review
Bartosz Dziewoński has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349134 )

Change subject: Set 'aria-owns' for everything with a dropdown list (ARIA 
combobox)
..

Set 'aria-owns' for everything with a dropdown list (ARIA combobox)

Bug: T149654
Change-Id: I2d27bdbba408c31001e4db088148a3b454eb6e3a
---
M src/mixins/LookupElement.js
M src/widgets/CapsuleMultiselectWidget.js
M src/widgets/ComboBoxInputWidget.js
M src/widgets/DropdownWidget.js
4 files changed, 4 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/34/349134/1

diff --git a/src/mixins/LookupElement.js b/src/mixins/LookupElement.js
index a95d3eb..dd56bd7 100644
--- a/src/mixins/LookupElement.js
+++ b/src/mixins/LookupElement.js
@@ -61,6 +61,7 @@
// Initialization
this.$input.attr( {
role: 'combobox',
+   'aria-owns': this.lookupMenu.getElementId(),
'aria-autocomplete': 'list'
} );
this.$element.addClass( 'oo-ui-lookupElement' );
diff --git a/src/widgets/CapsuleMultiselectWidget.js 
b/src/widgets/CapsuleMultiselectWidget.js
index 805c2ed..cbcc37e 100644
--- a/src/widgets/CapsuleMultiselectWidget.js
+++ b/src/widgets/CapsuleMultiselectWidget.js
@@ -158,6 +158,7 @@
this.$input.prop( 'disabled', this.isDisabled() );
this.$input.attr( {
role: 'combobox',
+   'aria-owns': this.menu.getElementId(),
'aria-autocomplete': 'list'
} );
}
diff --git a/src/widgets/ComboBoxInputWidget.js 
b/src/widgets/ComboBoxInputWidget.js
index 5342854..440da2a 100644
--- a/src/widgets/ComboBoxInputWidget.js
+++ b/src/widgets/ComboBoxInputWidget.js
@@ -113,6 +113,7 @@
// Initialization
this.$input.attr( {
role: 'combobox',
+   'aria-owns': this.menu.getElementId(),
'aria-autocomplete': 'list'
} );
// Do not override options set via config.menu.items
diff --git a/src/widgets/DropdownWidget.js b/src/widgets/DropdownWidget.js
index b4fd091..1d2ff0e 100644
--- a/src/widgets/DropdownWidget.js
+++ b/src/widgets/DropdownWidget.js
@@ -95,6 +95,7 @@
.addClass( 'oo-ui-dropdownWidget-handle' )
.attr( {
role: 'combobox',
+   'aria-owns': this.menu.getElementId(),
'aria-autocomplete': 'list'
} )
.append( this.$icon, this.$label, this.$indicator );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2d27bdbba408c31001e4db088148a3b454eb6e3a
Gerrit-PatchSet: 1
Gerrit-Project: oojs/ui
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] oojs/ui[master]: Set ARIA role=combobox on DropdownWidget and LookupElement too

2017-04-19 Thread Code Review
Bartosz Dziewoński has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349132 )

Change subject: Set ARIA role=combobox on DropdownWidget and LookupElement too
..

Set ARIA role=combobox on DropdownWidget and LookupElement too

ARIA's definition of 'combobox' is a lot wider than ours, it applies
to pretty much everything with a dropdown list of items.

Change-Id: I63273b2c6ca97f9463d451acb40e48a9a776374b
---
M src/mixins/LookupElement.js
M src/widgets/DropdownWidget.js
2 files changed, 8 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/32/349132/1

diff --git a/src/mixins/LookupElement.js b/src/mixins/LookupElement.js
index 6834799..a95d3eb 100644
--- a/src/mixins/LookupElement.js
+++ b/src/mixins/LookupElement.js
@@ -59,6 +59,10 @@
} );
 
// Initialization
+   this.$input.attr( {
+   role: 'combobox',
+   'aria-autocomplete': 'list'
+   } );
this.$element.addClass( 'oo-ui-lookupElement' );
this.lookupMenu.$element.addClass( 'oo-ui-lookupElement-menu' );
this.$overlay.append( this.lookupMenu.$element );
diff --git a/src/widgets/DropdownWidget.js b/src/widgets/DropdownWidget.js
index 5d675dc..b4fd091 100644
--- a/src/widgets/DropdownWidget.js
+++ b/src/widgets/DropdownWidget.js
@@ -93,6 +93,10 @@
// Initialization
this.$handle
.addClass( 'oo-ui-dropdownWidget-handle' )
+   .attr( {
+   role: 'combobox',
+   'aria-autocomplete': 'list'
+   } )
.append( this.$icon, this.$label, this.$indicator );
this.$element
.addClass( 'oo-ui-dropdownWidget' )

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I63273b2c6ca97f9463d451acb40e48a9a776374b
Gerrit-PatchSet: 1
Gerrit-Project: oojs/ui
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] mediawiki...MobileFrontend[master]: POC: Provide a formatter that routes through live Wikipedia ...

2017-04-19 Thread Jdlrobson (Code Review)
Jdlrobson has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349131 )

Change subject: POC: Provide a formatter that routes through live Wikipedia 
content
..

POC: Provide a formatter that routes through live Wikipedia content

This will help us test on some real articles rather than having
to import lots of articles. I'm going to use this for testing
lazy loading images but I also wanted to show how the interface
works...

Change-Id: I4a1cbd2cbacba34f8b57b655472de9c4dde59db8
---
M extension.json
A includes/LiveWikipediaContentFormatter.php
2 files changed, 37 insertions(+), 1 deletion(-)


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

diff --git a/extension.json b/extension.json
index 73b5a80..58e730d 100644
--- a/extension.json
+++ b/extension.json
@@ -58,6 +58,7 @@
"MobileFrontend\\WMFBaseDomainExtractor": 
"includes/WMFBaseDomainExtractor.php",
"MobileContext": "includes/MobileContext.php",
"IParserContentFormatter": 
"includes/IParserContentFormatter.php",
+   "LiveWikipediaContentFormatter": 
"includes/LiveWikipediaContentFormatter.php",
"MobileFormatter": "includes/MobileFormatter.php",
"MobileCollection": "includes/models/MobileCollection.php",
"MobilePage": "includes/models/MobilePage.php",
@@ -1737,7 +1738,7 @@
]
},
"config": {
-   "MFMobileFormatterClass": "MobileFormatter",
+   "MFMobileFormatterClass": "LiveWikipediaContentFormatter",
"MFEnableXAnalyticsLogging": false,
"MFAppPackageId": false,
"MFAppScheme": "http",
diff --git a/includes/LiveWikipediaContentFormatter.php 
b/includes/LiveWikipediaContentFormatter.php
new file mode 100644
index 000..5e0acbc
--- /dev/null
+++ b/includes/LiveWikipediaContentFormatter.php
@@ -0,0 +1,35 @@
+getTitle();
+   if ( !$title->exists() ) {
+   $url = 
'https://en.wikipedia.org/w/api.php?formatversion=2=json=parse=text=';
+   $url .= $title->getPrefixedDBKey();
+   
+   $resp = file_get_contents( $url, false );
+   $json = json_decode( $resp );
+   if ( isset( $json->{'parse'} ) ) {
+   $parse = $json->{'parse'};
+   $html = $parse->{'text'};
+   }
+   }
+
+   $formatter = MobileFormatter::newFromContext( $context, $html, 
$enableSections, $includeTOC );
+   $formatter->remove( [ '.toc', '.mw-editsection', '.navbox', 
'.nomobile' ] );
+   return $formatter;
+   }
+}

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...MobileFrontend[master]: Create IParserContentFormatter for using different formattin...

2017-04-19 Thread Jdlrobson (Code Review)
Jdlrobson has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349130 )

Change subject: Create IParserContentFormatter for using different formatting 
engines
..

Create IParserContentFormatter for using different formatting engines

This is not complete but begins providing a way to swap out
different formatting engines.

Bug: T69434
Change-Id: I0358810637853b9de9a67788bf78f8a2b5d81c4c
---
M README.md
M extension.json
A includes/IParserContentFormatter.php
M includes/MobileFormatter.php
M includes/MobileFrontend.body.php
5 files changed, 67 insertions(+), 22 deletions(-)


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

diff --git a/README.md b/README.md
index a0c6ed4..29a305d 100644
--- a/README.md
+++ b/README.md
@@ -191,6 +191,15 @@
 * Type: `Boolean`
 * Default: `true`
 
+ $wgMFMobileFormatterClass
+
+Name of PHP class that is responsible for formatting HTML for mobile.
+Must implement IParserContentFormatter.
+
+* Type: `string`
+* Default: `MobileFormatter`
+
+
  $wgMFMobileFormatterHeadings
 
 This is a list of html tags, that could be recognized as the first heading of
diff --git a/extension.json b/extension.json
index b5c7897..73b5a80 100644
--- a/extension.json
+++ b/extension.json
@@ -57,6 +57,7 @@
"MobileFrontend\\BaseDomainExtractorInterface": 
"includes/BaseDomainExtractorInterface.php",
"MobileFrontend\\WMFBaseDomainExtractor": 
"includes/WMFBaseDomainExtractor.php",
"MobileContext": "includes/MobileContext.php",
+   "IParserContentFormatter": 
"includes/IParserContentFormatter.php",
"MobileFormatter": "includes/MobileFormatter.php",
"MobileCollection": "includes/models/MobileCollection.php",
"MobilePage": "includes/models/MobilePage.php",
@@ -1736,6 +1737,7 @@
]
},
"config": {
+   "MFMobileFormatterClass": "MobileFormatter",
"MFEnableXAnalyticsLogging": false,
"MFAppPackageId": false,
"MFAppScheme": "http",
diff --git a/includes/IParserContentFormatter.php 
b/includes/IParserContentFormatter.php
new file mode 100644
index 000..7f37097
--- /dev/null
+++ b/includes/IParserContentFormatter.php
@@ -0,0 +1,40 @@
+scriptsEnabled = false;
}
/**
-* Creates and returns a MobileFormatter
-*
-* @param MobileContext $context
-* @param string $html
-*
-* @return MobileFormatter
+* @inheritdoc
 */
-   public static function newFromContext( MobileContext $context, $html ) {
+   public static function newFromContext( MobileContext $context, $html,
+   $enableSections = false, $includeTOC = false
+   ) {
$mfSpecialCaseMainPage = $context->getMFConfig()->get( 
'MFSpecialCaseMainPage' );
 
$title = $context->getTitle();
@@ -103,6 +100,9 @@
if ( $context->getContentTransformations() && !$isFilePage ) {
$formatter->setRemoveMedia( $context->imagesDisabled() 
);
}
+
+   $formatter->enableExpandableSections( $enableSections );
+   $formatter->enableTOCPlaceholder( $includeTOC );
 
return $formatter;
}
@@ -134,13 +134,7 @@
}
 
/**
-* Performs various transformations to the content to make it 
appropiate for mobile devices.
-* @param bool $removeDefaults Whether default settings at 
$wgMFRemovableClasses should be used
-* @param bool $removeReferences Whether to remove references from the 
output
-* @param bool $removeImages Whether to move images into noscript tags
-* @param bool $showFirstParagraphBeforeInfobox Whether the first 
paragraph from the lead
-*  section should be shown before all infoboxes that come earlier.
-* @return array
+* @inheritdoc
 */
public function filterContent(
$removeDefaults = true, $removeReferences = false, 
$removeImages = false,
diff --git a/includes/MobileFrontend.body.php b/includes/MobileFrontend.body.php
index 075cce3..e36e52b 100644
--- a/includes/MobileFrontend.body.php
+++ b/includes/MobileFrontend.body.php
@@ -42,14 +42,10 @@
// Only include the table of contents element if the page is in 
the main namespace
// and the MFTOC flag has been set (which means the page 
originally had a table of contents)
$includeTOC = $out->getProperty( 'MFTOC' ) && $ns === NS_MAIN;
-   $formatter = MobileFormatter::newFromContext( $context, $html );
-   $formatter->enableTOCPlaceholder( $includeTOC );
-
-   Hooks::run( 'MobileFrontendBeforeDOM', [ $context, $formatter ] 
);
 
$isSpecialPage = 

[MediaWiki-commits] [Gerrit] wikidata...gui-deploy[production]: Merging from d959ce64dc67d38780841f404de908a959c97bc5:

2017-04-19 Thread Smalyshev (Code Review)
Smalyshev has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349129 )

Change subject: Merging from d959ce64dc67d38780841f404de908a959c97bc5:
..

Merging from d959ce64dc67d38780841f404de908a959c97bc5:

Merge "Refactor "merge entity with label" helper function"

Change-Id: I3dd4fba1da5074a3a09abf74be34ede2c5bb4fa5
---
M embed.html
M index.html
A js/embed.wdqs.min.6ee9aee01fa130fc6d8f.js
D js/embed.wdqs.min.db86fe4367ca17605a29.js
A js/wdqs.min.8c5994ad39e84b4b42ae.js
D js/wdqs.min.ed35ad8da09792946565.js
6 files changed, 9 insertions(+), 9 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikidata/query/gui-deploy 
refs/changes/29/349129/1


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3dd4fba1da5074a3a09abf74be34ede2c5bb4fa5
Gerrit-PatchSet: 1
Gerrit-Project: wikidata/query/gui-deploy
Gerrit-Branch: production
Gerrit-Owner: Smalyshev 

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


[MediaWiki-commits] [Gerrit] wikidata...rdf[master]: Make all logging use slf4j since this is what Blazegraph is ...

2017-04-19 Thread Smalyshev (Code Review)
Smalyshev has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349128 )

Change subject: Make all logging use slf4j since this is what Blazegraph is 
using.
..

Make all logging use slf4j since this is what Blazegraph is using.

Also fix some style warnings.

Change-Id: I345fddc126ed054ed9ebc00b3266184747a9ee41
---
M 
blazegraph/src/main/java/org/wikidata/query/rdf/blazegraph/inline/literal/AbstractMultiTypeExtension.java
M 
blazegraph/src/main/java/org/wikidata/query/rdf/blazegraph/inline/uri/WikibaseStyleStatementInlineUriHandler.java
M 
blazegraph/src/main/java/org/wikidata/query/rdf/blazegraph/label/EmptyLabelServiceOptimizer.java
M 
blazegraph/src/main/java/org/wikidata/query/rdf/blazegraph/label/LabelService.java
M 
blazegraph/src/test/java/org/wikidata/query/rdf/blazegraph/label/LabelServiceUnitTest.java
5 files changed, 16 insertions(+), 16 deletions(-)


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

diff --git 
a/blazegraph/src/main/java/org/wikidata/query/rdf/blazegraph/inline/literal/AbstractMultiTypeExtension.java
 
b/blazegraph/src/main/java/org/wikidata/query/rdf/blazegraph/inline/literal/AbstractMultiTypeExtension.java
index eaf51f4..018e5e9 100644
--- 
a/blazegraph/src/main/java/org/wikidata/query/rdf/blazegraph/inline/literal/AbstractMultiTypeExtension.java
+++ 
b/blazegraph/src/main/java/org/wikidata/query/rdf/blazegraph/inline/literal/AbstractMultiTypeExtension.java
@@ -9,10 +9,11 @@
 import java.util.Map;
 import java.util.Set;
 
-import org.apache.log4j.Logger;
 import org.openrdf.model.Literal;
 import org.openrdf.model.URI;
 import org.openrdf.model.Value;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import com.bigdata.rdf.internal.IDatatypeURIResolver;
 import com.bigdata.rdf.internal.IExtension;
@@ -32,7 +33,7 @@
  *roughly by Blazegraph - lots of rawtypes
  */
 public abstract class AbstractMultiTypeExtension 
implements IExtension {
-private static final Logger log = 
Logger.getLogger(WikibaseDateExtension.class);
+private static final Logger log = 
LoggerFactory.getLogger(WikibaseDateExtension.class);
 
 /**
  * IV to type map as resolved against resolver provided on construction.
diff --git 
a/blazegraph/src/main/java/org/wikidata/query/rdf/blazegraph/inline/uri/WikibaseStyleStatementInlineUriHandler.java
 
b/blazegraph/src/main/java/org/wikidata/query/rdf/blazegraph/inline/uri/WikibaseStyleStatementInlineUriHandler.java
index 1c158a4..1c1c027 100644
--- 
a/blazegraph/src/main/java/org/wikidata/query/rdf/blazegraph/inline/uri/WikibaseStyleStatementInlineUriHandler.java
+++ 
b/blazegraph/src/main/java/org/wikidata/query/rdf/blazegraph/inline/uri/WikibaseStyleStatementInlineUriHandler.java
@@ -4,7 +4,8 @@
 import java.util.Locale;
 import java.util.UUID;
 
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import com.bigdata.rdf.internal.InlineURIHandler;
 import com.bigdata.rdf.internal.impl.literal.AbstractLiteralIV;
@@ -29,7 +30,7 @@
  * @deprecated
  */
 public class WikibaseStyleStatementInlineUriHandler extends InlineURIHandler {
-private static final Logger log = 
Logger.getLogger(WikibaseStyleStatementInlineUriHandler.class);
+private static final Logger log = 
LoggerFactory.getLogger(WikibaseStyleStatementInlineUriHandler.class);
 
 public WikibaseStyleStatementInlineUriHandler(String namespace) {
 super(namespace);
@@ -99,7 +100,7 @@
 i = 
i.shiftLeft(Long.SIZE).or(unsigned(u.getLeastSignificantBits()));
 return new XSDIntegerIV(i);
 } catch (IllegalArgumentException e) {
-
Logger.getLogger(WikibaseStyleStatementInlineUriHandler.class).warn("tmp", e);
+log.warn("tmp", e);
 return null;
 }
 }
diff --git 
a/blazegraph/src/main/java/org/wikidata/query/rdf/blazegraph/label/EmptyLabelServiceOptimizer.java
 
b/blazegraph/src/main/java/org/wikidata/query/rdf/blazegraph/label/EmptyLabelServiceOptimizer.java
index 44cb389..e5922bd 100644
--- 
a/blazegraph/src/main/java/org/wikidata/query/rdf/blazegraph/label/EmptyLabelServiceOptimizer.java
+++ 
b/blazegraph/src/main/java/org/wikidata/query/rdf/blazegraph/label/EmptyLabelServiceOptimizer.java
@@ -2,11 +2,12 @@
 
 import java.util.List;
 
-import org.apache.log4j.Logger;
 import org.openrdf.model.URI;
 import org.openrdf.model.impl.URIImpl;
 import org.openrdf.model.vocabulary.RDFS;
 import org.openrdf.model.vocabulary.SKOS;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.wikidata.query.rdf.common.uri.Ontology;
 import org.wikidata.query.rdf.common.uri.SchemaDotOrg;
 
@@ -36,7 +37,7 @@
  */
 @SuppressWarnings("rawtypes")
 public class EmptyLabelServiceOptimizer extends AbstractJoinGroupOptimizer {
-private static final Logger log = 
Logger.getLogger(EmptyLabelServiceOptimizer.class);
+

[MediaWiki-commits] [Gerrit] cdb[master]: tests: Avoid use of ':class' to fix test run on PHP 5.4

2017-04-19 Thread Krinkle (Code Review)
Krinkle has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349127 )

Change subject: tests: Avoid use of ':class' to fix test run on PHP 5.4
..

tests: Avoid use of ':class' to fix test run on PHP 5.4

Follows-up 28ce7b1553 which broke the build at


Change-Id: I72ffc9778415d4ab29e2fee388a37fe35ff7e040
---
M tests/CdbTest.php
1 file changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/cdb refs/changes/27/349127/1

diff --git a/tests/CdbTest.php b/tests/CdbTest.php
index 2ed655e..2ea5a15 100644
--- a/tests/CdbTest.php
+++ b/tests/CdbTest.php
@@ -58,7 +58,7 @@
 */
public function testReaderOpen() {
$this->assertInstanceOf(
-   Reader::class,
+   'Cdb\Reader',
Reader::open( $this->phpCdbFile )
);
}
@@ -68,7 +68,7 @@
 */
public function testWriterOpen() {
$this->assertInstanceOf(
-   Writer::class,
+   'Cdb\Writer',
Writer::open( $this->phpCdbFile )
);
}
@@ -165,7 +165,7 @@
public function testDestruct() {
$w = new Writer\PHP( $this->phpCdbFile );
$this->assertInstanceOf(
-   Writer\PHP::class,
+   'Cdb\Writer\PHP',
$w
);
$w = null;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I72ffc9778415d4ab29e2fee388a37fe35ff7e040
Gerrit-PatchSet: 1
Gerrit-Project: cdb
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] mediawiki/core[fundraising/REL1_27]: Update DonationInterface submodule

2017-04-19 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/349120 )

Change subject: Update DonationInterface submodule
..


Update DonationInterface submodule

Change-Id: Ia50539a0c6bdd612da53e784a90f3367599dacfe
---
M extensions/DonationInterface
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/extensions/DonationInterface b/extensions/DonationInterface
index 9b82ca0..5eeb709 16
--- a/extensions/DonationInterface
+++ b/extensions/DonationInterface
@@ -1 +1 @@
-Subproject commit 9b82ca0d262df08f1a7f6df3bdfbc3386ba9404b
+Subproject commit 5eeb709a71cf77cd0e0f45948fd5c23377c546b1

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia50539a0c6bdd612da53e784a90f3367599dacfe
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: fundraising/REL1_27
Gerrit-Owner: Ejegg 
Gerrit-Reviewer: Ejegg 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Document which EtcdConfig parameters are optional

2017-04-19 Thread Aaron Schulz (Code Review)
Aaron Schulz has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349126 )

Change subject: Document which EtcdConfig parameters are optional
..

Document which EtcdConfig parameters are optional

Change-Id: Ic6b56ed2f8789ae7920cdfc12f34b00db4a76c3a
---
M includes/config/EtcdConfig.php
1 file changed, 5 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/26/349126/1

diff --git a/includes/config/EtcdConfig.php b/includes/config/EtcdConfig.php
index 0f2f641..d3fbd65 100644
--- a/includes/config/EtcdConfig.php
+++ b/includes/config/EtcdConfig.php
@@ -62,12 +62,12 @@
 *   - host: the host address and port
 *   - protocol: either http or https
 *   - directory: the etc "directory" were MediaWiki specific variables 
are located
-*   - encoding: one of ("JSON", "YAML")
+*   - encoding: one of ("JSON", "YAML"). Defaults to JSON. [optional]
 *   - cache: BagOStuff instance or ObjectFactory spec thereof for a 
server cache.
-*The cache will also be used as a fallback if etcd is down.
-*   - cacheTTL: logical cache TTL in seconds
-*   - skewTTL: maximum seconds to randomly lower the assigned TTL on 
cache save
-*   - timeout: seconds to wait for etcd before throwing an error
+*The cache will also be used as a fallback if etcd is 
down. [optional]
+*   - cacheTTL: logical cache TTL in seconds [optional]
+*   - skewTTL: maximum seconds to randomly lower the assigned TTL on 
cache save [optional]
+*   - timeout: seconds to wait for etcd before throwing an error 
[optional]
 */
public function __construct( array $params ) {
$params += [

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic6b56ed2f8789ae7920cdfc12f34b00db4a76c3a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz 

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


[MediaWiki-commits] [Gerrit] oojs/ui[master]: NumberInputWidget: Remake as an actual TextInputWidget child

2017-04-19 Thread Mooeypoo (Code Review)
Mooeypoo has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349125 )

Change subject: NumberInputWidget: Remake as an actual TextInputWidget child
..

NumberInputWidget: Remake as an actual TextInputWidget child

As the name of it suggests, it should be a decendent of InputWidget
and, more specifically, of TextInputWidget. This solves a bunch of
compatibility issues.

To demonstrate this, a demo was added with TagMultiselectWidget
using NumberInputWidget; in its previous version the NumberInputWidget
could not have been used inside the TagInputWidget because it didn't
have the expected API of TextInputWidget.

Bug: T124856
Change-Id: I00164fcaf5092b60243d4e3cdc8992285cee33b4
---
M demos/pages/widgets.js
M src/widgets/NumberInputWidget.js
2 files changed, 26 insertions(+), 84 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/25/349125/1

diff --git a/demos/pages/widgets.js b/demos/pages/widgets.js
index c139838..a013b58 100644
--- a/demos/pages/widgets.js
+++ b/demos/pages/widgets.js
@@ -1388,7 +1388,7 @@
new OO.ui.TagMultiselectWidget( {
allowArbitrary: true,
inputPosition: 'outline',
-   inputWidget: new 
OO.ui.SearchInputWidget()
+   inputWidget: new 
OO.ui.NumberInputWidget()
} ),
{
label: 'TagMultiselectWidget 
(inputwidget: OO.ui.SearchInputWidget, inputPosition:outline)',
diff --git a/src/widgets/NumberInputWidget.js b/src/widgets/NumberInputWidget.js
index ac8e6fd..5e71f39 100644
--- a/src/widgets/NumberInputWidget.js
+++ b/src/widgets/NumberInputWidget.js
@@ -18,7 +18,6 @@
  *
  * @constructor
  * @param {Object} [config] Configuration options
- * @cfg {Object} [input] Configuration options to pass to the {@link 
OO.ui.TextInputWidget text input widget}.
  * @cfg {Object} [minusButton] Configuration options to pass to the {@link 
OO.ui.ButtonWidget decrementing button widget}.
  * @cfg {Object} [plusButton] Configuration options to pass to the {@link 
OO.ui.ButtonWidget incrementing button widget}.
  * @cfg {boolean} [isInteger=false] Whether the field accepts only integer 
values.
@@ -29,6 +28,9 @@
  * @cfg {boolean} [showButtons=true] Whether to show the plus and minus 
buttons.
  */
 OO.ui.NumberInputWidget = function OoUiNumberInputWidget( config ) {
+   var $field = $( '' )
+   .addClass( 'oo-ui-numberInputWidget-field' );
+
// Configuration initialization
config = $.extend( {
isInteger: false,
@@ -40,16 +42,11 @@
}, config );
 
// Parent constructor
-   OO.ui.NumberInputWidget.parent.call( this, config );
+   OO.ui.NumberInputWidget.parent.call( this, $.extend( config, {
+   type: 'number',
+   validate: this.validateNumber.bind( this )
+   } ) );
 
-   // Properties
-   this.input = new OO.ui.TextInputWidget( $.extend(
-   {
-   disabled: this.isDisabled(),
-   type: 'number'
-   },
-   config.input
-   ) );
if ( config.showButtons ) {
this.minusButton = new OO.ui.ButtonWidget( $.extend(
{
@@ -72,11 +69,7 @@
}
 
// Events
-   this.input.connect( this, {
-   change: this.emit.bind( this, 'change' ),
-   enter: this.emit.bind( this, 'enter' )
-   } );
-   this.input.$input.on( {
+   this.$input.on( {
keydown: this.onKeyDown.bind( this ),
'wheel mousewheel DOMMouseScroll': this.onWheel.bind( this )
} );
@@ -89,40 +82,28 @@
} );
}
 
+   // Build the field
+   $field.append( this.$input );
+   if ( config.showButtons ) {
+   $field
+   .prepend( this.minusButton.$element )
+   .append( this.plusButton.$element );
+   }
+
// Initialization
this.setIsInteger( !!config.isInteger );
this.setRange( config.min, config.max );
this.setStep( config.step, config.pageStep );
 
-   this.$field = $( '' ).addClass( 'oo-ui-numberInputWidget-field' )
-   .append( this.input.$element );
-   this.$element.addClass( 'oo-ui-numberInputWidget' ).append( this.$field 
);
-   if ( config.showButtons ) {
-   this.$field
-   .prepend( this.minusButton.$element )
-   .append( this.plusButton.$element );
-   this.$element.addClass( 'oo-ui-numberInputWidget-buttoned' );
-   }
-   this.input.setValidation( 

[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Stop thrashing on page save failure and save on subsequent runs

2017-04-19 Thread Mholloway (Code Review)
Mholloway has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349124 )

Change subject: Stop thrashing on page save failure and save on subsequent runs
..

Stop thrashing on page save failure and save on subsequent runs

This patch does the following:

1. Kicks off the service only for changes to ReadingListPageDisk table.
   Previously, it was also being triggered for changes to the Reading-
   ListPageHttp and ReadingListPage tables as well, or thrice per
   substantive change.  This is because the ContentObserver also notifies
   on changes to those tables depsite being registered for /page/disk.

2. Removes the upsert() calls from startTransaction() and
   failTransaction(), which stops each transaction in the service from
   (twice) again retriggering the service.

3. Added (OR status == OUTDATED) to the SQL query for pending rows, so
   that rows left in an OUTDATED state due to a failure, and no longer
   upserted, will be picked up on subsequent runs and saved as originally
   intended.

Also added logging for successful page saves and made minor cosmetic
changes.

Bug: T162894
Change-Id: I1d0bfd2e2071942f3c7ad977ae271cf78db82235
---
M app/src/main/java/org/wikipedia/database/async/AsyncDao.java
M app/src/main/java/org/wikipedia/readinglist/page/ReadingListPageObserver.java
M 
app/src/main/java/org/wikipedia/readinglist/page/database/ReadingListPageDao.java
M app/src/main/java/org/wikipedia/savedpages/SavedPageSyncService.java
4 files changed, 7 insertions(+), 7 deletions(-)


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

diff --git a/app/src/main/java/org/wikipedia/database/async/AsyncDao.java 
b/app/src/main/java/org/wikipedia/database/async/AsyncDao.java
index eb0e193..d8302b8 100644
--- a/app/src/main/java/org/wikipedia/database/async/AsyncDao.java
+++ b/app/src/main/java/org/wikipedia/database/async/AsyncDao.java
@@ -47,13 +47,11 @@
 
 protected void startTransaction(@NonNull Row row) {
 row.startTransaction();
-upsert(row);
 }
 
 protected synchronized void failTransaction(@NonNull Row row) {
 if (completableTransaction(row)) {
 row.failTransaction();
-upsert(row);
 }
 }
 
diff --git 
a/app/src/main/java/org/wikipedia/readinglist/page/ReadingListPageObserver.java 
b/app/src/main/java/org/wikipedia/readinglist/page/ReadingListPageObserver.java
index 8ace611..03cf711 100644
--- 
a/app/src/main/java/org/wikipedia/readinglist/page/ReadingListPageObserver.java
+++ 
b/app/src/main/java/org/wikipedia/readinglist/page/ReadingListPageObserver.java
@@ -41,8 +41,8 @@
 @Override public void onChange(boolean selfChange, Uri uri) {
 if (uri.equals(ReadingListPageContract.Disk.URI)) {
 notifyListeners();
+WikipediaApp.getInstance().startService(new 
Intent(WikipediaApp.getInstance(), SavedPageSyncService.class));
 }
-WikipediaApp.getInstance().startService(new 
Intent(WikipediaApp.getInstance(), SavedPageSyncService.class));
 }
 
 public void register(@NonNull Context context) {
diff --git 
a/app/src/main/java/org/wikipedia/readinglist/page/database/ReadingListPageDao.java
 
b/app/src/main/java/org/wikipedia/readinglist/page/database/ReadingListPageDao.java
index 54f2336..6e8623c 100644
--- 
a/app/src/main/java/org/wikipedia/readinglist/page/database/ReadingListPageDao.java
+++ 
b/app/src/main/java/org/wikipedia/readinglist/page/database/ReadingListPageDao.java
@@ -183,10 +183,12 @@
 .replaceAll(":keyCol", 
ReadingListPageContract.Page.KEY.qualifiedName());
 
 private static final String SELECT_ROWS_WITH_LIST_KEY = "',' || 
:listKeyCol || ',' like '%,' || ? || ',%'"
- .replaceAll(":listKeyCol", 
ReadingListPageContract.Page.LIST_KEYS.qualifiedName());
+.replaceAll(":listKeyCol", 
ReadingListPageContract.Page.LIST_KEYS.qualifiedName());
 
-private static String SELECT_ROWS_PENDING_DISK_TRANSACTION = 
":transactionIdCol == :noTransactionId"
+private static String SELECT_ROWS_PENDING_DISK_TRANSACTION = 
":transactionIdCol == :noTransactionId OR :diskStatusCol == :outdated"
 .replaceAll(":transactionIdCol", 
ReadingListPageContract.DiskWithPage.DISK_TRANSACTION_ID.qualifiedName())
-.replaceAll(":noTransactionId", 
String.valueOf(AsyncConstant.NO_TRANSACTION_ID));
+.replaceAll(":noTransactionId", 
String.valueOf(AsyncConstant.NO_TRANSACTION_ID))
+.replaceAll(":diskStatusCol", 
ReadingListPageContract.DiskWithPage.DISK_STATUS.qualifiedName())
+.replaceAll(":outdated", 
String.valueOf(DiskStatus.OUTDATED.code()));
 }
 }
diff --git 
a/app/src/main/java/org/wikipedia/savedpages/SavedPageSyncService.java 
b/app/src/main/java/org/wikipedia/savedpages/SavedPageSyncService.java
index d37964f..9f29075 100644
--- 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: benchmarks: Minor clean up

2017-04-19 Thread Krinkle (Code Review)
Krinkle has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349121 )

Change subject: benchmarks: Minor clean up
..

benchmarks: Minor clean up

Change-Id: I446ae1a9d9cdb6b26a6bb62367a432cea082f343
---
M maintenance/benchmarks/Benchmarker.php
M maintenance/benchmarks/bench_HTTP_HTTPS.php
M maintenance/benchmarks/bench_Wikimedia_base_convert.php
M maintenance/benchmarks/bench_delete_truncate.php
M maintenance/benchmarks/bench_if_switch.php
M maintenance/benchmarks/bench_strtr_str_replace.php
M maintenance/benchmarks/bench_utf8_title_check.php
M maintenance/benchmarks/bench_wfIsWindows.php
8 files changed, 30 insertions(+), 30 deletions(-)


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

diff --git a/maintenance/benchmarks/Benchmarker.php 
b/maintenance/benchmarks/Benchmarker.php
index 5fab082..70dc1f4 100644
--- a/maintenance/benchmarks/Benchmarker.php
+++ b/maintenance/benchmarks/Benchmarker.php
@@ -38,7 +38,7 @@
 
public function __construct() {
parent::__construct();
-   $this->addOption( 'count', "How many times to run a benchmark", 
false, true );
+   $this->addOption( 'count', 'How many times to run a benchmark', 
false, true );
}
 
public function bench( array $benchs ) {
@@ -68,7 +68,7 @@
'function' => $bench['function'],
'arguments' => $bench['args'],
'count' => $count,
-   'delta' => $delta,
+   'total' => $delta,
'average' => $delta / $count,
];
}
@@ -89,9 +89,9 @@
$res['function'],
implode( ', ', $res['arguments'] )
);
-   $ret .= sprintf( "   %6.2fms (%6.2fms each)\n",
-   $res['delta'] * 1000,
-   $res['average'] * 1000
+   $ret .= sprintf( "   %6.2fms (%6.4fms each)\n",
+   $res['total'] * 1e3,
+   $res['average'] * 1e3
);
}
 
diff --git a/maintenance/benchmarks/bench_HTTP_HTTPS.php 
b/maintenance/benchmarks/bench_HTTP_HTTPS.php
index 5b64bee..1be50bd 100644
--- a/maintenance/benchmarks/bench_HTTP_HTTPS.php
+++ b/maintenance/benchmarks/bench_HTTP_HTTPS.php
@@ -42,20 +42,20 @@
[ 'function' => [ $this, 'getHTTP' ] ],
[ 'function' => [ $this, 'getHTTPS' ] ],
] );
-   print $this->getFormattedResults();
+   $this->output( $this->getFormattedResults() );
}
 
-   static function doRequest( $proto ) {
+   private function doRequest( $proto ) {
Http::get( "$proto://localhost/", [], __METHOD__ );
}
 
// bench function 1
-   function getHTTP() {
+   protected function getHTTP() {
$this->doRequest( 'http' );
}
 
// bench function 2
-   function getHTTPS() {
+   protected function getHTTPS() {
$this->doRequest( 'https' );
}
 }
diff --git a/maintenance/benchmarks/bench_Wikimedia_base_convert.php 
b/maintenance/benchmarks/bench_Wikimedia_base_convert.php
index c8a9055..bc83a24 100644
--- a/maintenance/benchmarks/bench_Wikimedia_base_convert.php
+++ b/maintenance/benchmarks/bench_Wikimedia_base_convert.php
@@ -65,8 +65,8 @@
}
 
protected static function makeRandomNumber( $base, $length ) {
-   $baseChars = "0123456789abcdefghijklmnopqrstuvwxyz";
-   $res = "";
+   $baseChars = '0123456789abcdefghijklmnopqrstuvwxyz';
+   $res = '';
for ( $i = 0; $i < $length; $i++ ) {
$res .= $baseChars[mt_rand( 0, $base - 1 )];
}
diff --git a/maintenance/benchmarks/bench_delete_truncate.php 
b/maintenance/benchmarks/bench_delete_truncate.php
index 2369d99..042f8bd 100644
--- a/maintenance/benchmarks/bench_delete_truncate.php
+++ b/maintenance/benchmarks/bench_delete_truncate.php
@@ -102,5 +102,5 @@
}
 }
 
-$maintClass = "BenchmarkDeleteTruncate";
+$maintClass = 'BenchmarkDeleteTruncate';
 require_once RUN_MAINTENANCE_IF_MAIN;
diff --git a/maintenance/benchmarks/bench_if_switch.php 
b/maintenance/benchmarks/bench_if_switch.php
index 46c9d39..32c3932 100644
--- a/maintenance/benchmarks/bench_if_switch.php
+++ b/maintenance/benchmarks/bench_if_switch.php
@@ -42,11 +42,11 @@
[ 'function' => [ $this, 'doElseIf' ] ],
[ 'function' => [ $this, 'doSwitch' ] ],
] );
-   print $this->getFormattedResults();
+   $this->output( 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: benchmarks: Report more metrics (min/max/median)

2017-04-19 Thread Krinkle (Code Review)
Krinkle has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349123 )

Change subject: benchmarks: Report more metrics (min/max/median)
..

benchmarks: Report more metrics (min/max/median)

Add minimum, maximum, median to the report in addition to the mean (average)
which was already there. Based on benchmarkTidy.php from I254793fc5.

Example output:

> Delete
>times: 10
>total:   7.47ms
>  min:   0.53ms
>   median:   0.74ms
> mean:   0.75ms
>  max:   1.21ms
>
> Truncate
>times: 10
>total:  72.38ms
>  min:   1.37ms
>   median:   8.32ms
> mean:   7.24ms
>  max:  15.73ms

Change-Id: Ifd3064a3621e07f55505490403189cb47022c6c7
---
M maintenance/benchmarks/Benchmarker.php
M maintenance/benchmarks/bench_HTTP_HTTPS.php
M maintenance/benchmarks/bench_Wikimedia_base_convert.php
M maintenance/benchmarks/bench_delete_truncate.php
M maintenance/benchmarks/bench_if_switch.php
M maintenance/benchmarks/bench_strtr_str_replace.php
M maintenance/benchmarks/bench_utf8_title_check.php
M maintenance/benchmarks/bench_wfIsWindows.php
8 files changed, 48 insertions(+), 34 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/23/349123/1

diff --git a/maintenance/benchmarks/Benchmarker.php 
b/maintenance/benchmarks/Benchmarker.php
index 7d8280d..638e47e 100644
--- a/maintenance/benchmarks/Benchmarker.php
+++ b/maintenance/benchmarks/Benchmarker.php
@@ -34,7 +34,6 @@
  * @ingroup Benchmark
  */
 abstract class Benchmarker extends Maintenance {
-   private $results;
protected $defaultCount = 100;
 
public function __construct() {
@@ -43,6 +42,7 @@
}
 
public function bench( array $benchs ) {
+   $this->startBench();
$count = $this->getOption( 'count', $this->defaultCount );
foreach ( $benchs as $key => $bench ) {
// Default to no arguments
@@ -54,11 +54,27 @@
if ( isset( $bench['setup'] ) ) {
call_user_func( $bench['setup'] );
}
-   $start = microtime( true );
+
+   // Run benchmarks
+   $times = [];
for ( $i = 0; $i < $count; $i++ ) {
+   $t = microtime( true );
call_user_func_array( $bench['function'], 
$bench['args'] );
+   $t = ( microtime( true ) - $t ) * 1000;
+   $times[] = $t;
}
-   $delta = microtime( true ) - $start;
+
+   // Collect metrics
+   sort( $times, SORT_NUMERIC );
+   $min = $times[0];
+   $max = end( $times );
+   if ( $count % 2 ) {
+   $median = $times[ ( $count - 1 ) / 2 ];
+   } else {
+   $median = ( $times[$count / 2] + $times[$count 
/ 2 - 1] ) / 2;
+   }
+   $total = array_sum( $times );
+   $mean = $total / $count;
 
// Name defaults to name of called function
if ( is_string( $key ) ) {
@@ -75,35 +91,42 @@
);
}
 
-   $this->results[] = [
+   $this->addResult( [
'name' => $name,
'count' => $count,
-   'total' => $delta,
-   'average' => $delta / $count,
-   ];
+   'total' => $total,
+   'min' => $min,
+   'median' => $median,
+   'mean' => $mean,
+   'max' => $max,
+   ] );
}
}
 
-   public function getFormattedResults() {
-   $ret = sprintf( "Running PHP version %s (%s) on %s %s %s\n\n",
-   phpversion(),
-   php_uname( 'm' ),
-   php_uname( 's' ),
-   php_uname( 'r' ),
-   php_uname( 'v' )
+   public function startBench() {
+   $this->output(
+   sprintf( "Running PHP version %s (%s) on %s %s %s\n\n",
+   phpversion(),
+   php_uname( 'm' ),
+   php_uname( 's' ),
+   php_uname( 'r' ),
+   php_uname( 'v' )
+   )
);
-   foreach ( $this->results as $res ) {
-   // show function with 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: benchmarks: Add setup, bench naming, and custom count default

2017-04-19 Thread Krinkle (Code Review)
Krinkle has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349122 )

Change subject: benchmarks: Add setup, bench naming, and custom count default
..

benchmarks: Add setup, bench naming, and custom count default

* bench(): Add support for setup function.
  Demonstrated by converting bench_delete_truncate.php to use Benchmarker.

* bench(): Allow benchmarks to be named. Default remains (fn + args).
  Useful for closures.

* Benchmarker: Support overriding the default count of 100.
  Demonstrated in bench_delete_truncate.php to run 10x instead of
  100x (previous: 1x).

Change-Id: Iac182eaf3053f5bf0e811cd23082f530629d8a4e
---
M maintenance/benchmarks/Benchmarker.php
M maintenance/benchmarks/bench_delete_truncate.php
2 files changed, 48 insertions(+), 38 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/22/349122/1

diff --git a/maintenance/benchmarks/Benchmarker.php 
b/maintenance/benchmarks/Benchmarker.php
index 70dc1f4..7d8280d 100644
--- a/maintenance/benchmarks/Benchmarker.php
+++ b/maintenance/benchmarks/Benchmarker.php
@@ -35,6 +35,7 @@
  */
 abstract class Benchmarker extends Maintenance {
private $results;
+   protected $defaultCount = 100;
 
public function __construct() {
parent::__construct();
@@ -42,31 +43,40 @@
}
 
public function bench( array $benchs ) {
-   $bench_number = 0;
-   $count = $this->getOption( 'count', 100 );
-
-   foreach ( $benchs as $bench ) {
-   // handle empty args
-   if ( !array_key_exists( 'args', $bench ) ) {
+   $count = $this->getOption( 'count', $this->defaultCount );
+   foreach ( $benchs as $key => $bench ) {
+   // Default to no arguments
+   if ( !isset( $bench['args'] ) ) {
$bench['args'] = [];
}
 
-   $bench_number++;
+   // Optional setup called outside time measure
+   if ( isset( $bench['setup'] ) ) {
+   call_user_func( $bench['setup'] );
+   }
$start = microtime( true );
for ( $i = 0; $i < $count; $i++ ) {
call_user_func_array( $bench['function'], 
$bench['args'] );
}
$delta = microtime( true ) - $start;
 
-   // function passed as a callback
-   if ( is_array( $bench['function'] ) ) {
-   $ret = get_class( $bench['function'][0] ) . 
'->' . $bench['function'][1];
-   $bench['function'] = $ret;
+   // Name defaults to name of called function
+   if ( is_string( $key ) ) {
+   $name = $key;
+   } else {
+   if ( is_array( $bench['function'] ) ) {
+   $name = get_class( 
$bench['function'][0] ) . '::' . $bench['function'][1];
+   } else {
+   $name = strval( $bench['function'] );
+   }
+   $name = sprintf( "%s(%s)",
+   $name,
+   implode( ', ', $bench['args'] )
+   );
}
 
-   $this->results[$bench_number] = [
-   'function' => $bench['function'],
-   'arguments' => $bench['args'],
+   $this->results[] = [
+   'name' => $name,
'count' => $count,
'total' => $delta,
'average' => $delta / $count,
@@ -84,10 +94,9 @@
);
foreach ( $this->results as $res ) {
// show function with args
-   $ret .= sprintf( "%s times: function %s(%s) :\n",
+   $ret .= sprintf( "%s times: %s\n",
$res['count'],
-   $res['function'],
-   implode( ', ', $res['arguments'] )
+   $res['name']
);
$ret .= sprintf( "   %6.2fms (%6.4fms each)\n",
$res['total'] * 1e3,
diff --git a/maintenance/benchmarks/bench_delete_truncate.php 
b/maintenance/benchmarks/bench_delete_truncate.php
index 042f8bd..de655b1 100644
--- a/maintenance/benchmarks/bench_delete_truncate.php
+++ 

[MediaWiki-commits] [Gerrit] mediawiki...DonationInterface[master]: Remove deprecated function

2017-04-19 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/341721 )

Change subject: Remove deprecated function
..


Remove deprecated function

Change-Id: I2a36b910b7181fc4db101bfd90cdbb41cf372181
---
M gateway_common/DonationData.php
1 file changed, 0 insertions(+), 16 deletions(-)

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



diff --git a/gateway_common/DonationData.php b/gateway_common/DonationData.php
index 96a2650..07c6d43 100644
--- a/gateway_common/DonationData.php
+++ b/gateway_common/DonationData.php
@@ -1015,22 +1015,6 @@
return $this->validationErrors;
}
 
-   /**
-* validatedOK
-* Checks to see if the data validated ok (no errors).
-* @return boolean True if no errors, false if errors exist.
-*/
-   public function validatedOK() {
-   if ( is_null( $this->validationErrors ) ) {
-   $this->getValidationErrors();
-   }
-
-   if ( count( $this->validationErrors ) === 0 ) {
-   return true;
-   }
-   return false;
-   }
-
private function expungeNulls() {
foreach ( $this->normalized as $key => $val ) {
if ( is_null( $val ) ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2a36b910b7181fc4db101bfd90cdbb41cf372181
Gerrit-PatchSet: 7
Gerrit-Project: mediawiki/extensions/DonationInterface
Gerrit-Branch: master
Gerrit-Owner: Awight 
Gerrit-Reviewer: AndyRussG 
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] mediawiki/core[fundraising/REL1_27]: Update DonationInterface submodule

2017-04-19 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349120 )

Change subject: Update DonationInterface submodule
..

Update DonationInterface submodule

Change-Id: Ia50539a0c6bdd612da53e784a90f3367599dacfe
---
M extensions/DonationInterface
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/extensions/DonationInterface b/extensions/DonationInterface
index 9b82ca0..5eeb709 16
--- a/extensions/DonationInterface
+++ b/extensions/DonationInterface
@@ -1 +1 @@
-Subproject commit 9b82ca0d262df08f1a7f6df3bdfbc3386ba9404b
+Subproject commit 5eeb709a71cf77cd0e0f45948fd5c23377c546b1

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...DonationInterface[deployment]: Update vendor

2017-04-19 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/349118 )

Change subject: Update vendor
..


Update vendor

Oops, forgot to do this in the merge commit

Change-Id: I7db187d73745dbb3a088628c9e84c5f557e39809
---
M vendor
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/vendor b/vendor
index 648edb5..619cb4e 16
--- a/vendor
+++ b/vendor
@@ -1 +1 @@
-Subproject commit 648edb543ae0457ed2faf5187867fdcb5648e1e0
+Subproject commit 619cb4eed376eff6bb6e108e173a1d15e170ba0d

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7db187d73745dbb3a088628c9e84c5f557e39809
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DonationInterface
Gerrit-Branch: deployment
Gerrit-Owner: Ejegg 
Gerrit-Reviewer: Ejegg 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...vendor[master]: Update libs - upstream PHP-Queue

2017-04-19 Thread Ejegg (Code Review)
Ejegg has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/349117 )

Change subject: Update libs - upstream PHP-Queue
..


Update libs - upstream PHP-Queue

Change-Id: Ibb1365c1e214b6b368239e1124abe841eaaad014
---
D coderkungfu/php-queue/.gitreview
M coderkungfu/php-queue/README.md
M coderkungfu/php-queue/composer.json
M coderkungfu/php-queue/demo/queues/BeanstalkSampleQueue.php
M coderkungfu/php-queue/demo/runners/README.md
M coderkungfu/php-queue/src/PHPQueue/Backend/Beanstalkd.php
M coderkungfu/php-queue/src/PHPQueue/Backend/IronMQ.php
M coderkungfu/php-queue/src/PHPQueue/Backend/Memcache.php
M coderkungfu/php-queue/src/PHPQueue/Backend/MongoDB.php
M coderkungfu/php-queue/src/PHPQueue/Backend/PDO.php
M coderkungfu/php-queue/src/PHPQueue/Backend/Predis.php
M coderkungfu/php-queue/src/PHPQueue/Backend/Stomp.php
D coderkungfu/php-queue/src/PHPQueue/Interfaces/IndexedFifoQueueStore.php
D coderkungfu/php-queue/src/PHPQueue/Interfaces/KeyValueStore.php
M coderkungfu/php-queue/test/PHPQueue/Backend/PredisTest.php
D coderkungfu/php-queue/test/PHPQueue/Backend/PredisZsetTest.php
M composer/autoload_classmap.php
M composer/autoload_static.php
M composer/installed.json
M wikimedia/smash-pig/Core/Configuration.php
M wikimedia/smash-pig/Core/DataFiles/CsvReader.php
M wikimedia/smash-pig/Core/Logging/LogContextHandler.php
M wikimedia/smash-pig/Maintenance/RequeueDelayedMessages.php
M wikimedia/smash-pig/PaymentProviders/PayPal/Job.php
M wikimedia/smash-pig/PaymentProviders/PayPal/RefundMessage.php
A 
wikimedia/smash-pig/PaymentProviders/PayPal/Tests/Data/recurring_payment_profile_created.json
A 
wikimedia/smash-pig/PaymentProviders/PayPal/Tests/Data/recurring_payment_profile_created_transformed.json
A wikimedia/smash-pig/PaymentProviders/PayPal/Tests/Data/refund_ec.json
A 
wikimedia/smash-pig/PaymentProviders/PayPal/Tests/Data/refund_ec_transformed.json
A 
wikimedia/smash-pig/PaymentProviders/PayPal/Tests/Data/refund_recurring_ec.json
A 
wikimedia/smash-pig/PaymentProviders/PayPal/Tests/Data/refund_recurring_ec_transformed.json
M wikimedia/smash-pig/PaymentProviders/PayPal/Tests/config_test.yaml
M 
wikimedia/smash-pig/PaymentProviders/PayPal/Tests/phpunit/CaptureIncomingMessageTest.php
M wikimedia/smash-pig/SmashPig.yaml
M wikimedia/smash-pig/composer.json
M wikimedia/smash-pig/composer.lock
36 files changed, 277 insertions(+), 473 deletions(-)

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



diff --git a/coderkungfu/php-queue/.gitreview b/coderkungfu/php-queue/.gitreview
deleted file mode 100644
index ffb389a..000
--- a/coderkungfu/php-queue/.gitreview
+++ /dev/null
@@ -1,6 +0,0 @@
-[gerrit]
-host=gerrit.wikimedia.org
-port=29418
-project=wikimedia/fundraising/php-queue.git
-defaultbranch=master
-defaultrebase=0
diff --git a/coderkungfu/php-queue/README.md b/coderkungfu/php-queue/README.md
index c69cef1..74ff0e7 100644
--- a/coderkungfu/php-queue/README.md
+++ b/coderkungfu/php-queue/README.md
@@ -1,4 +1,4 @@
-#PHP-Queue#
+# PHP-Queue #
 [![Gitter](https://badges.gitter.im/Join 
Chat.svg)](https://gitter.im/CoderKungfu/php-queue?utm_source=badge_medium=badge_campaign=pr-badge_content=badge)
 
 A unified front-end for different queuing backends. Includes a REST server, 
CLI interface and daemon runners.
@@ -190,16 +190,6 @@
 * FifoQueueStore
 
 A first in first out queue accessed by push and pop.
-
-* IndexedFifoQueueStore
-
-Messages are indexed along one column as they are pushed into a FIFO queue,
-otherwise these behave like FifoQueueStore. clear() deletes records by index.
-There is no get() operation, you'll need a KeyValueStore for that.
-
-* KeyValueStore
-
-Jobs can be retrieved and deleted by their index.
 
 ---
 ## License ##
diff --git a/coderkungfu/php-queue/composer.json 
b/coderkungfu/php-queue/composer.json
index f75d7ef..085c069 100644
--- a/coderkungfu/php-queue/composer.json
+++ b/coderkungfu/php-queue/composer.json
@@ -23,21 +23,19 @@
 "clio/clio": "0.1.*"
 },
 "require-dev": {
-"jakub-onderka/php-parallel-lint": "0.9",
-"phpunit/phpunit": "4.4.*"
-},
-"scripts": {
-"test": [
-"parallel-lint . --exclude vendor",
-"phpunit"
-]
+"mrpoundsign/pheanstalk-5.3": "dev-master",
+"aws/aws-sdk-php": "dev-master",
+"amazonwebservices/aws-sdk-for-php": "dev-master",
+"predis/predis": "1.*",
+"iron-io/iron_mq": "dev-master",
+"ext-memcache": "*",
+"microsoft/windowsazure": "dev-master"
 },
 "suggest": {
 "predis/predis": "For Redis backend support",
 "mrpoundsign/pheanstalk-5.3": "For Beanstalkd backend support",
 "aws/aws-sdk-php": "For AWS SQS backend support",
 "amazonwebservices/aws-sdk-for-php": "For AWS SQS backend support 
(legacy version)",
-"ext-memcache": "*",
 "pecl-mongodb": "For MongoDB backend 

[MediaWiki-commits] [Gerrit] wikidata...rdf[master]: [WIP] [DNM] Add Mediawiki API service

2017-04-19 Thread Smalyshev (Code Review)
Smalyshev has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349119 )

Change subject: [WIP] [DNM] Add Mediawiki API service
..

[WIP] [DNM] Add Mediawiki API service

Mediaiwki API is described by a template, which lists
inputs and outputs, and is invoked via a service:

  SERVICE wikibase:mwapi {
  bd:serviceParam wikibase:api "Categories" .
  bd:serviceParam :titles "Albert Einstein" .
  bd:serviceParam :category ?category .
  bd:serviceParam :title ?title .
  }

Change-Id: If0aa5c213e197f6b20b55092680930eb82d1a0a2
Bug: T148245
---
M blazegraph/pom.xml
M 
blazegraph/src/main/java/org/wikidata/query/rdf/blazegraph/WikibaseContextListener.java
M 
blazegraph/src/main/java/org/wikidata/query/rdf/blazegraph/geo/GeoBoxService.java
A 
blazegraph/src/main/java/org/wikidata/query/rdf/blazegraph/mwapi/ApiTemplate.java
A 
blazegraph/src/main/java/org/wikidata/query/rdf/blazegraph/mwapi/MWApiServiceCall.java
A 
blazegraph/src/main/java/org/wikidata/query/rdf/blazegraph/mwapi/MWApiServiceFactory.java
M dist/src/script/runBlazegraph.sh
M pom.xml
M tools/pom.xml
M tools/runBlazegraph.sh
A tools/src/test/resources/blazegraph/services.json
11 files changed, 713 insertions(+), 11 deletions(-)


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

diff --git a/blazegraph/pom.xml b/blazegraph/pom.xml
index 0ea96cc..4470840 100644
--- a/blazegraph/pom.xml
+++ b/blazegraph/pom.xml
@@ -20,6 +20,14 @@
 
   
 
+  com.fasterxml.jackson.core
+  jackson-core
+
+
+  com.fasterxml.jackson.core
+  jackson-databind
+
+
   
   org.eclipse.jetty
   jetty-client
diff --git 
a/blazegraph/src/main/java/org/wikidata/query/rdf/blazegraph/WikibaseContextListener.java
 
b/blazegraph/src/main/java/org/wikidata/query/rdf/blazegraph/WikibaseContextListener.java
index a028935..e0012fc 100644
--- 
a/blazegraph/src/main/java/org/wikidata/query/rdf/blazegraph/WikibaseContextListener.java
+++ 
b/blazegraph/src/main/java/org/wikidata/query/rdf/blazegraph/WikibaseContextListener.java
@@ -20,6 +20,7 @@
 import org.wikidata.query.rdf.blazegraph.constraints.WikibaseNowBOp;
 import org.wikidata.query.rdf.blazegraph.geo.GeoService;
 import org.wikidata.query.rdf.blazegraph.label.LabelService;
+import org.wikidata.query.rdf.blazegraph.mwapi.MWApiServiceFactory;
 import org.wikidata.query.rdf.common.uri.GeoSparql;
 import org.wikidata.query.rdf.common.uri.OWL;
 import org.wikidata.query.rdf.common.uri.Ontology;
@@ -83,6 +84,7 @@
 reg.setWhitelistEnabled(true);
 LabelService.register();
 GeoService.register();
+MWApiServiceFactory.register();
 
 // Whitelist services we like by default
 reg.addWhitelistURL(GASService.Options.SERVICE_KEY.toString());
diff --git 
a/blazegraph/src/main/java/org/wikidata/query/rdf/blazegraph/geo/GeoBoxService.java
 
b/blazegraph/src/main/java/org/wikidata/query/rdf/blazegraph/geo/GeoBoxService.java
index a0d4e8f..5d6198b 100644
--- 
a/blazegraph/src/main/java/org/wikidata/query/rdf/blazegraph/geo/GeoBoxService.java
+++ 
b/blazegraph/src/main/java/org/wikidata/query/rdf/blazegraph/geo/GeoBoxService.java
@@ -272,7 +272,7 @@
  */
 private final BigdataValueFactory vf;
 
-public GeoBoxServiceCall(BigdataServiceCall wrappedCall, TermNode east,
+GeoBoxServiceCall(BigdataServiceCall wrappedCall, TermNode east,
 TermNode west, AbstractTripleStore kb) {
 this.wrappedCall = wrappedCall;
 this.east = east;
diff --git 
a/blazegraph/src/main/java/org/wikidata/query/rdf/blazegraph/mwapi/ApiTemplate.java
 
b/blazegraph/src/main/java/org/wikidata/query/rdf/blazegraph/mwapi/ApiTemplate.java
new file mode 100644
index 000..9ac05eb
--- /dev/null
+++ 
b/blazegraph/src/main/java/org/wikidata/query/rdf/blazegraph/mwapi/ApiTemplate.java
@@ -0,0 +1,203 @@
+package org.wikidata.query.rdf.blazegraph.mwapi;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import com.bigdata.bop.IVariable;
+import com.bigdata.bop.IVariableOrConstant;
+import com.bigdata.rdf.sparql.ast.TermNode;
+import com.bigdata.rdf.sparql.ast.eval.ServiceParams;
+import com.fasterxml.jackson.databind.JsonNode;
+
+import static 
org.wikidata.query.rdf.blazegraph.mwapi.MWApiServiceFactory.paramNameToURI;
+/**
+ * This class represents API template.
+ */
+public final class ApiTemplate {
+/**
+ * Set of fixed API parameters.
+ */
+private final Map fixedParams = new HashMap<>();
+/**
+ * Set of API parameters that should come from input vars.
+ * The value is the default.
+ */
+private final Map inputVars = new HashMap<>();
+/**
+ * Set of API parameters that should be sent to output.
+ * The value is the XPath to find the value.
+ */
+

[MediaWiki-commits] [Gerrit] mediawiki...DonationInterface[deployment]: Update vendor

2017-04-19 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349118 )

Change subject: Update vendor
..

Update vendor

Oops, forgot to do this in the merge commit

Change-Id: I7db187d73745dbb3a088628c9e84c5f557e39809
---
M vendor
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/vendor b/vendor
index 648edb5..619cb4e 16
--- a/vendor
+++ b/vendor
@@ -1 +1 @@
-Subproject commit 648edb543ae0457ed2faf5187867fdcb5648e1e0
+Subproject commit 619cb4eed376eff6bb6e108e173a1d15e170ba0d

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7db187d73745dbb3a088628c9e84c5f557e39809
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DonationInterface
Gerrit-Branch: deployment
Gerrit-Owner: Ejegg 

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


[MediaWiki-commits] [Gerrit] mediawiki...vendor[master]: Update libs - upstream PHP-Queue

2017-04-19 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349117 )

Change subject: Update libs - upstream PHP-Queue
..

Update libs - upstream PHP-Queue

Change-Id: Ibb1365c1e214b6b368239e1124abe841eaaad014
---
D coderkungfu/php-queue/.gitreview
M coderkungfu/php-queue/README.md
M coderkungfu/php-queue/composer.json
M coderkungfu/php-queue/demo/queues/BeanstalkSampleQueue.php
M coderkungfu/php-queue/demo/runners/README.md
M coderkungfu/php-queue/src/PHPQueue/Backend/Beanstalkd.php
M coderkungfu/php-queue/src/PHPQueue/Backend/IronMQ.php
M coderkungfu/php-queue/src/PHPQueue/Backend/Memcache.php
M coderkungfu/php-queue/src/PHPQueue/Backend/MongoDB.php
M coderkungfu/php-queue/src/PHPQueue/Backend/PDO.php
M coderkungfu/php-queue/src/PHPQueue/Backend/Predis.php
M coderkungfu/php-queue/src/PHPQueue/Backend/Stomp.php
D coderkungfu/php-queue/src/PHPQueue/Interfaces/IndexedFifoQueueStore.php
D coderkungfu/php-queue/src/PHPQueue/Interfaces/KeyValueStore.php
M coderkungfu/php-queue/test/PHPQueue/Backend/PredisTest.php
D coderkungfu/php-queue/test/PHPQueue/Backend/PredisZsetTest.php
M composer/autoload_classmap.php
M composer/autoload_static.php
M composer/installed.json
M wikimedia/smash-pig/Core/Configuration.php
M wikimedia/smash-pig/Core/DataFiles/CsvReader.php
M wikimedia/smash-pig/Core/Logging/LogContextHandler.php
M wikimedia/smash-pig/Maintenance/RequeueDelayedMessages.php
M wikimedia/smash-pig/PaymentProviders/PayPal/Job.php
M wikimedia/smash-pig/PaymentProviders/PayPal/RefundMessage.php
A 
wikimedia/smash-pig/PaymentProviders/PayPal/Tests/Data/recurring_payment_profile_created.json
A 
wikimedia/smash-pig/PaymentProviders/PayPal/Tests/Data/recurring_payment_profile_created_transformed.json
A wikimedia/smash-pig/PaymentProviders/PayPal/Tests/Data/refund_ec.json
A 
wikimedia/smash-pig/PaymentProviders/PayPal/Tests/Data/refund_ec_transformed.json
A 
wikimedia/smash-pig/PaymentProviders/PayPal/Tests/Data/refund_recurring_ec.json
A 
wikimedia/smash-pig/PaymentProviders/PayPal/Tests/Data/refund_recurring_ec_transformed.json
M wikimedia/smash-pig/PaymentProviders/PayPal/Tests/config_test.yaml
M 
wikimedia/smash-pig/PaymentProviders/PayPal/Tests/phpunit/CaptureIncomingMessageTest.php
M wikimedia/smash-pig/SmashPig.yaml
M wikimedia/smash-pig/composer.json
M wikimedia/smash-pig/composer.lock
36 files changed, 277 insertions(+), 473 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DonationInterface/vendor 
refs/changes/17/349117/1

diff --git a/coderkungfu/php-queue/.gitreview b/coderkungfu/php-queue/.gitreview
deleted file mode 100644
index ffb389a..000
--- a/coderkungfu/php-queue/.gitreview
+++ /dev/null
@@ -1,6 +0,0 @@
-[gerrit]
-host=gerrit.wikimedia.org
-port=29418
-project=wikimedia/fundraising/php-queue.git
-defaultbranch=master
-defaultrebase=0
diff --git a/coderkungfu/php-queue/README.md b/coderkungfu/php-queue/README.md
index c69cef1..74ff0e7 100644
--- a/coderkungfu/php-queue/README.md
+++ b/coderkungfu/php-queue/README.md
@@ -1,4 +1,4 @@
-#PHP-Queue#
+# PHP-Queue #
 [![Gitter](https://badges.gitter.im/Join 
Chat.svg)](https://gitter.im/CoderKungfu/php-queue?utm_source=badge_medium=badge_campaign=pr-badge_content=badge)
 
 A unified front-end for different queuing backends. Includes a REST server, 
CLI interface and daemon runners.
@@ -190,16 +190,6 @@
 * FifoQueueStore
 
 A first in first out queue accessed by push and pop.
-
-* IndexedFifoQueueStore
-
-Messages are indexed along one column as they are pushed into a FIFO queue,
-otherwise these behave like FifoQueueStore. clear() deletes records by index.
-There is no get() operation, you'll need a KeyValueStore for that.
-
-* KeyValueStore
-
-Jobs can be retrieved and deleted by their index.
 
 ---
 ## License ##
diff --git a/coderkungfu/php-queue/composer.json 
b/coderkungfu/php-queue/composer.json
index f75d7ef..085c069 100644
--- a/coderkungfu/php-queue/composer.json
+++ b/coderkungfu/php-queue/composer.json
@@ -23,21 +23,19 @@
 "clio/clio": "0.1.*"
 },
 "require-dev": {
-"jakub-onderka/php-parallel-lint": "0.9",
-"phpunit/phpunit": "4.4.*"
-},
-"scripts": {
-"test": [
-"parallel-lint . --exclude vendor",
-"phpunit"
-]
+"mrpoundsign/pheanstalk-5.3": "dev-master",
+"aws/aws-sdk-php": "dev-master",
+"amazonwebservices/aws-sdk-for-php": "dev-master",
+"predis/predis": "1.*",
+"iron-io/iron_mq": "dev-master",
+"ext-memcache": "*",
+"microsoft/windowsazure": "dev-master"
 },
 "suggest": {
 "predis/predis": "For Redis backend support",
 "mrpoundsign/pheanstalk-5.3": "For Beanstalkd backend support",
 "aws/aws-sdk-php": "For AWS SQS backend support",
 "amazonwebservices/aws-sdk-for-php": "For AWS SQS backend support 
(legacy version)",
-"ext-memcache": "*",
 

[MediaWiki-commits] [Gerrit] mediawiki...DonationInterface[master]: Integration test that the PayPal legacy gateway shows an err...

2017-04-19 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/341478 )

Change subject: Integration test that the PayPal legacy gateway shows an error 
form rather than redirect.
..


Integration test that the PayPal legacy gateway shows an error form rather than 
redirect.

Bug: T98447
Change-Id: I89dadb01d28f3590bbbc670d224600c376e98b80
---
M tests/phpunit/Adapter/PayPal/PayPalLegacyTest.php
1 file changed, 25 insertions(+), 0 deletions(-)

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



diff --git a/tests/phpunit/Adapter/PayPal/PayPalLegacyTest.php 
b/tests/phpunit/Adapter/PayPal/PayPalLegacyTest.php
index 9f7a3c9..8bda5b1 100644
--- a/tests/phpunit/Adapter/PayPal/PayPalLegacyTest.php
+++ b/tests/phpunit/Adapter/PayPal/PayPalLegacyTest.php
@@ -199,6 +199,31 @@
}
 
/**
+* Stay on the payments form if there's a currency conversion 
notification.
+*/
+   function testShowFormOnCurrencyFallback() {
+   $init = $this->getDonorTestData();
+   $init['currency'] = 'BBD';
+   $init['amount'] = 15.00;
+   $session = array( 'Donor' => $init );
+   $this->setMwGlobals( array(
+   'wgDonationInterfaceFallbackCurrency' => 'USD',
+   'wgDonationInterfaceNotifyOnConvert' => true,
+   ) );
+   $errorMessage = wfMessage( 
'donate_interface-fallback-currency-notice', 'USD' )->text();
+   $assertNodes = array(
+   'headers' => array(
+   'location' => null,
+   ),
+   'topError' => array(
+   'innerhtmlmatches' => "/.*$errorMessage.*/"
+   )
+   );
+
+   $this->verifyFormOutput( 'PaypalLegacyGateway', $init, 
$assertNodes, false, $session );
+   }
+
+   /**
 * Integration test to verify that the Donate transaction works as 
expected in Belgium for fr, de, and nl.
 *
 * @dataProvider belgiumLanguageProvider

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I89dadb01d28f3590bbbc670d224600c376e98b80
Gerrit-PatchSet: 8
Gerrit-Project: mediawiki/extensions/DonationInterface
Gerrit-Branch: master
Gerrit-Owner: Awight 
Gerrit-Reviewer: AndyRussG 
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] mediawiki...DonationInterface[deployment]: Merge branch 'master' into deployment

2017-04-19 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/349116 )

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


Merge branch 'master' into deployment

3dbf36b Remove deprecated key-value interfaces
ffcf2e9 Get rid of queue mirroring
171da59 Form should not validate if manual errors are present

Change-Id: Ibb465a68a0b85291757176405565c0bf8ff5ec40
---
D tests/phpunit/DonationQueueTest.php
D tests/phpunit/includes/TestingQueue.php
2 files changed, 0 insertions(+), 192 deletions(-)

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



diff --git a/tests/phpunit/DonationQueueTest.php 
b/tests/phpunit/DonationQueueTest.php
deleted file mode 100644
index d8b467a..000
--- a/tests/phpunit/DonationQueueTest.php
+++ /dev/null
@@ -1,124 +0,0 @@
-<<< HEAD   (9b82ca Merge branch 'master' into deployment)
-===
-queue_name = 'test-' . mt_rand();
-
-   $this->setMwGlobals( array(
-   'wgDonationInterfaceQueues' => array(
-   $this->queue_name => array(),
-   ),
-   ) );
-
-   $this->transaction = array(
-   'amount' => '1.24',
-   'city' => 'Dunburger',
-   'contribution_tracking_id' => mt_rand(),
-   // FIXME: err, we're cheating normalization here.
-   'correlation-id' => 'testgateway-' . mt_rand(),
-   'country' => 'US',
-   'currency_code' => 'USD',
-   'date' => time(),
-   'email' => 'nob...@wikimedia.org',
-   'fname' => 'Jen',
-   'gateway_account' => 'default',
-   'gateway' => 'testgateway',
-   'gateway_txn_id' => mt_rand(),
-   'order_id' => mt_rand(),
-   'language' => 'en',
-   'lname' => 'Russ',
-   'payment_method' => 'cc',
-   'payment_submethod' => 'visa',
-   'php-message-class' => 
'SmashPig\CrmLink\Messages\DonationInterfaceMessage',
-   'response' => 'Gateway response something',
-   'state' => 'AK',
-   'street' => '1 Fake St.',
-   'user_ip' => '127.0.0.1',
-   'utm_source' => 'testing',
-   'postal_code' => '12345',
-   );
-
-   $this->expected_message = array(
-   'contribution_tracking_id' => 
$this->transaction['contribution_tracking_id'],
-   'utm_source' => 'testing',
-   'language' => 'en',
-   'email' => 'nob...@wikimedia.org',
-   'first_name' => 'Jen',
-   'last_name' => 'Russ',
-   'street_address' => '1 Fake St.',
-   'city' => 'Dunburger',
-   'state_province' => 'AK',
-   'country' => 'US',
-   'postal_code' => '12345',
-   'gateway' => 'testgateway',
-   'gateway_account' => 'default',
-   'gateway_txn_id' => 
$this->transaction['gateway_txn_id'],
-   'order_id' => $this->transaction['order_id'],
-   'payment_method' => 'cc',
-   'payment_submethod' => 'visa',
-   'response' => 'Gateway response something',
-   'currency' => 'USD',
-   'fee' => '0',
-   'gross' => '1.24',
-   'user_ip' => '127.0.0.1',
-   'date' => (int)$this->transaction['date'],
-   'source_host' => WmfFramework::getHostname(),
-   'source_name' => 'DonationInterface',
-   'source_run_id' => getmypid(),
-   'source_type' => 'payments',
-   'source_version' => DonationQueue::getVersionStamp(),
-   );
-   }
-
-   public function testPushMessage() {
-   DonationQueue::instance()->push( $this->transaction, 
$this->queue_name );
-
-   $this->assertEquals( $this->expected_message,
-   DonationQueue::instance()->pop( $this->queue_name ) );
-   }
-
-   /**
-* After pushing 2, pop should return the first.
-*/
-   public function testIsFifoQueue() {
-   DonationQueue::instance()->push( $this->transaction, 
$this->queue_name );
-
-   $transaction2 = $this->transaction;
-   $transaction2['correlation-id'] = mt_rand();
-
-   $this->assertEquals( $this->expected_message,
-

[MediaWiki-commits] [Gerrit] cdb[master]: tests: Improve code coverage

2017-04-19 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/348662 )

Change subject: tests: Improve code coverage
..


tests: Improve code coverage

* Update PHPUnit to latest 4.x.
* Remove 5.3.3 from Travis CI matrix.
* Add 'composer run cover' command.
* Call parent::tearDown() after local logic, not before.
* Add missing @covers.
* Remove @group (leftover from MediaWiki).

* Add tests for
  - Reader::open()
  - Writer::open()
  - Writer::__destruct()
  - Reader\DBA::__construct() - file open error
  - Reader\PHP::__construct() - file open error
  - Reader\PHP::__construct() - file size error
  - Reader\DBA::get() - key not found
  - Reader\PHP::get() - key not found
  - Writer\PHP::finish() - empty case (0 keys)
Also fixed array_fill warning.
* Ignore coverage:
  - Reader::haveExtension() - mocked environment check

Change-Id: I42a8adf747c7baa3675c97e43b5f642f66b14e66
---
M .travis.yml
M composer.json
M phpunit.xml.dist
M src/Reader.php
M src/Writer.php
M src/Writer/PHP.php
M tests/CdbTest.php
A tests/Reader/DBATest.php
M tests/Reader/HashTest.php
A tests/Reader/PHPTest.php
10 files changed, 131 insertions(+), 21 deletions(-)

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



diff --git a/.travis.yml b/.travis.yml
index 5b4fcc5..19a0ad5 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,6 +1,5 @@
 language: php
 php:
-  - "5.3.3"
   - "5.3"
   - "5.4"
   - "5.5"
@@ -10,8 +9,6 @@
 env:
   global:
 - COMPOSER_DISABLE_XDEBUG_WARN=1
-before_install:
-  - if [ "$TRAVIS_PHP_VERSION" = "5.3.3" ]; then composer config disable-tls 
true; composer config secure-http false; fi
 install:
   - composer install
 script:
diff --git a/composer.json b/composer.json
index bf54635..2c17e96 100644
--- a/composer.json
+++ b/composer.json
@@ -30,14 +30,15 @@
},
"require-dev": {
"jakub-onderka/php-parallel-lint": "0.9",
-   "phpunit/phpunit": "4.6.*",
+   "phpunit/phpunit": "^4.8",
"mediawiki/mediawiki-codesniffer": "0.5.0"
},
"scripts": {
"test": [
"parallel-lint . --exclude vendor",
"phpunit $PHPUNIT_ARGS",
-   "phpcs -p"
-   ]
+   "phpcs -p -s"
+   ],
+   "cover": "phpunit --coverage-html coverage"
}
 }
diff --git a/phpunit.xml.dist b/phpunit.xml.dist
index 8cffd80..d4c95c0 100644
--- a/phpunit.xml.dist
+++ b/phpunit.xml.dist
@@ -1,6 +1,7 @@
 
+   beStrictAboutOutputDuringTests="true"
+   verbose="true">


./tests
diff --git a/src/Reader.php b/src/Reader.php
index b1aaa02..565676f 100644
--- a/src/Reader.php
+++ b/src/Reader.php
@@ -38,7 +38,6 @@
 * Open a file and return a subclass instance
 *
 * @param string $fileName
-*
 * @return Reader
 */
public static function open( $fileName ) {
@@ -51,6 +50,7 @@
 * Returns true if the native extension is available
 *
 * @return bool
+* @codeCoverageIgnore
 */
public static function haveExtension() {
if ( !function_exists( 'dba_handlers' ) ) {
diff --git a/src/Writer.php b/src/Writer.php
index 5321604..9e4e24d 100644
--- a/src/Writer.php
+++ b/src/Writer.php
@@ -51,7 +51,6 @@
 * The user must have write access to the directory, for temporary file 
creation.
 *
 * @param string $fileName
-*
 * @return Writer
 */
public static function open( $fileName ) {
diff --git a/src/Writer/PHP.php b/src/Writer/PHP.php
index 4676b5e..2fd5405 100644
--- a/src/Writer/PHP.php
+++ b/src/Writer/PHP.php
@@ -173,7 +173,12 @@
// Excessively clever and indulgent code to simultaneously fill 
$packedTables
// with the packed hashtables, and adjust the elements of 
$starts
// to actually point to the starts instead of the ends.
-   $packedTables = array_fill( 0, $this->numentries, false );
+   if ( $this->numentries > 0 ) {
+   $packedTables = array_fill( 0, $this->numentries, false 
);
+   } else {
+   // array_fill(): Number of elements must be positive
+   $packedTables = array();
+   }
foreach ( $this->hplist as $item ) {
$packedTables[--$starts[255 & $item['h']]] = $item;
}
diff --git a/tests/CdbTest.php b/tests/CdbTest.php
index 6ef4655..2ed655e 100644
--- a/tests/CdbTest.php
+++ b/tests/CdbTest.php
@@ -7,9 +7,6 @@
 
 /**
  * Test the CDB reader/writer
- * @group Cdb
- * @covers Cdb\Writer\PHP
- * @covers Cdb\Writer\DBA
  */
 class 

[MediaWiki-commits] [Gerrit] mediawiki...DonationInterface[deployment]: Merge branch 'master' into deployment

2017-04-19 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349116 )

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

Merge branch 'master' into deployment

3dbf36b Remove deprecated key-value interfaces
ffcf2e9 Get rid of queue mirroring
171da59 Form should not validate if manual errors are present

Change-Id: Ibb465a68a0b85291757176405565c0bf8ff5ec40
---
D tests/phpunit/DonationQueueTest.php
D tests/phpunit/includes/TestingQueue.php
2 files changed, 0 insertions(+), 192 deletions(-)


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

diff --git a/tests/phpunit/DonationQueueTest.php 
b/tests/phpunit/DonationQueueTest.php
deleted file mode 100644
index d8b467a..000
--- a/tests/phpunit/DonationQueueTest.php
+++ /dev/null
@@ -1,124 +0,0 @@
-<<< HEAD   (9b82ca Merge branch 'master' into deployment)
-===
-queue_name = 'test-' . mt_rand();
-
-   $this->setMwGlobals( array(
-   'wgDonationInterfaceQueues' => array(
-   $this->queue_name => array(),
-   ),
-   ) );
-
-   $this->transaction = array(
-   'amount' => '1.24',
-   'city' => 'Dunburger',
-   'contribution_tracking_id' => mt_rand(),
-   // FIXME: err, we're cheating normalization here.
-   'correlation-id' => 'testgateway-' . mt_rand(),
-   'country' => 'US',
-   'currency_code' => 'USD',
-   'date' => time(),
-   'email' => 'nob...@wikimedia.org',
-   'fname' => 'Jen',
-   'gateway_account' => 'default',
-   'gateway' => 'testgateway',
-   'gateway_txn_id' => mt_rand(),
-   'order_id' => mt_rand(),
-   'language' => 'en',
-   'lname' => 'Russ',
-   'payment_method' => 'cc',
-   'payment_submethod' => 'visa',
-   'php-message-class' => 
'SmashPig\CrmLink\Messages\DonationInterfaceMessage',
-   'response' => 'Gateway response something',
-   'state' => 'AK',
-   'street' => '1 Fake St.',
-   'user_ip' => '127.0.0.1',
-   'utm_source' => 'testing',
-   'postal_code' => '12345',
-   );
-
-   $this->expected_message = array(
-   'contribution_tracking_id' => 
$this->transaction['contribution_tracking_id'],
-   'utm_source' => 'testing',
-   'language' => 'en',
-   'email' => 'nob...@wikimedia.org',
-   'first_name' => 'Jen',
-   'last_name' => 'Russ',
-   'street_address' => '1 Fake St.',
-   'city' => 'Dunburger',
-   'state_province' => 'AK',
-   'country' => 'US',
-   'postal_code' => '12345',
-   'gateway' => 'testgateway',
-   'gateway_account' => 'default',
-   'gateway_txn_id' => 
$this->transaction['gateway_txn_id'],
-   'order_id' => $this->transaction['order_id'],
-   'payment_method' => 'cc',
-   'payment_submethod' => 'visa',
-   'response' => 'Gateway response something',
-   'currency' => 'USD',
-   'fee' => '0',
-   'gross' => '1.24',
-   'user_ip' => '127.0.0.1',
-   'date' => (int)$this->transaction['date'],
-   'source_host' => WmfFramework::getHostname(),
-   'source_name' => 'DonationInterface',
-   'source_run_id' => getmypid(),
-   'source_type' => 'payments',
-   'source_version' => DonationQueue::getVersionStamp(),
-   );
-   }
-
-   public function testPushMessage() {
-   DonationQueue::instance()->push( $this->transaction, 
$this->queue_name );
-
-   $this->assertEquals( $this->expected_message,
-   DonationQueue::instance()->pop( $this->queue_name ) );
-   }
-
-   /**
-* After pushing 2, pop should return the first.
-*/
-   public function testIsFifoQueue() {
-   DonationQueue::instance()->push( $this->transaction, 
$this->queue_name );
-
-   $transaction2 = $this->transaction;
-   $transaction2['correlation-id'] = mt_rand();
-
-   $this->assertEquals( 

[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Chore: update styles

2017-04-19 Thread Niedzielski (Code Review)
Niedzielski has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349115 )

Change subject: Chore: update styles
..

Chore: update styles

Update styles for I04d210c01328ec77a44c9a4617b69a1d34715b20.

Change-Id: Iea5731ace9d81a1ed9c3f64d96d126f434b7308d
---
M app/src/main/assets/dark.css
M app/src/main/assets/preview.css
M app/src/main/assets/styles.css
3 files changed, 42 insertions(+), 54 deletions(-)


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

diff --git a/app/src/main/assets/dark.css b/app/src/main/assets/dark.css
index b7facdc..6aff9aa 100644
--- a/app/src/main/assets/dark.css
+++ b/app/src/main/assets/dark.css
@@ -3,7 +3,7 @@
   background: #000;
 }
 a {
-  color: #2B6FB2;
+  color: #2b6fb2;
 }
 a.external {
   background-image: 
url(data:image/png;base64,iVBORw0KGgoNSUhEUgoKCAYAAACNMs+9AXNSR0IArs4c6QRnQU1BAACxjwv8YQUJcEhZcwAADsMAAA7DAcdvqGQadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAAGJJREFUKFN1jdENgCAMBYmJn47Bak7DZrhTpc/XIm34OAjXA4qIgHI/dSBbLGTcOKjBryFlinGmjDQGiOF0MQkxI3v5wq6L38qR7SnsAx8ul37igPjAd+o5Oz2MRA+xY4ZSXuaW6wYouOLpAElFTkSuQmCC);
diff --git a/app/src/main/assets/preview.css b/app/src/main/assets/preview.css
index 64a0f39..dd41696 100644
--- a/app/src/main/assets/preview.css
+++ b/app/src/main/assets/preview.css
@@ -855,16 +855,16 @@
   -webkit-margin-end: 0 !important;
 }
 .content figure img {
-  margin: .6em auto .6em auto;
+  margin: 0.6em auto 0.6em auto;
   display: block;
   clear: both;
 }
 .content figcaption {
-  margin: .5em 0 0;
-  font-size: .8em;
+  margin: 0.5em 0 0;
+  font-size: 0.8em;
   line-height: 1.5;
   padding: 0 !important;
-  color: #55;
+  color: #555;
   width: auto !important;
 }
 
@@ -883,10 +883,7 @@
   box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.12), 0 0 1px 0 rgba(0, 0, 0, 0.18);
 }
 .app_table_collapsed_container {
-  padding-left: 12px;
-  padding-right: 48px;
-  padding-top: 12px;
-  padding-bottom: 12px;
+  padding: 12px 48px 12px 12px;
   line-height: 120%;
   background-color: #f8f8f8;
   background-repeat: no-repeat;
@@ -899,7 +896,7 @@
   background-image: 
url(/w/extensions/MobileApp/images/table_expand.png?1f7f0)!ie;
 }
 .app_table_collapse_close {
-  border-radius: 2px 2px 0px 0px;
+  border-radius: 2px 2px 0 0;
 }
 .app_table_collapse_icon {
   background-image: 
url(data:image/png;base64,iVBORw0KGgoNSUhEUgAAADAwCAYAAABXAvmHBGdBTUEAALGPC/xhBQlwSFlzAAAOwQAADsEBuJFr7QAAABh0RVh0U29mdHdhcmUAcGFpbnQubmV0IDQuMC4zjOaXUoBJREFUaEPtmE1uE0EQhW3Mzyk4iiU4AFn6BJbtvbfeIIQEAUEUCEnE/58ImCQCIRCSxVk4AGyyYwN5L+qOxuXXM90zthCiS/ricXV11avunhkrrWzZsmXLlu2fttlstjJGo9GN4XB4VY0tC+lcBhC+Dv6QwWBwTcUsA+lsCgTf9uI92I3rKrYp0tkECL1jxXt4pNScJkhnXSByw4oWrKu5dZHOOuDYbAqxEh4xlaMO0pkKjsZ9JbQMHjWVKxXpTKANMQ+suAQ2RM4kpDOSNlZxW4hK5Z7IHY10RsCV3zVCaoN7Yos5TY0opLOCNgo+VEIEn8EX45NwN5nb1KpEOkN0u90zKPRYCRB8Go/HFwivzViIXdRJakI6FRSPlX8iiio+gPN+Lq/BRzdWCncXc6KbkE6LW/lnqqDgoNfrnbM56MPYoYmVcJdZ0+ZQSGcRJkLSF7ZIgOlkMjmr8hDXxL6ZE+JpTBPS6UGSDrb0lUkcYq9MvIcxiH1n5kpQ+3lVE9JJkKADXhcTlsC4jsqjcE3sFeYHwXF6ic9gbunkBHT/ppioBB6vaPEezgGNF2jBwdVB129NghBR5zQE5nfcCqvcc7gFXWhi7kvK+QSPmoj3MEfsE44La++z0wsn/r2dFCD5hVOGayL2BTn3pDv54x5vByZQgq2s/bulgpSfKPv+XZP0gkGBTVN02bCJHVVbcEjtvJGmZkCCxHdFwVXAJraUBsGUDayBXwXnAjift0ShlcLdVloKUPOaD76CL0eFQc9vjK3sfzpVoPZNajCayBE1M+Y0uN/vX3TP5O/gJ/iGoMt+/G8BTZeg5Sv4QW3USK1+PFu2bNmyZcuW7f+1VusYzYvU+uNoBCAASUVORK5CYII=);
@@ -910,12 +907,9 @@
 }
 .app_table_collapsed_bottom {
   color: #808080;
-  padding-left: 12px;
-  padding-right: 48px;
-  padding-top: 12px;
-  padding-bottom: 12px;
+  padding: 12px 48px 12px 12px;
   line-height: 120%;
-  border-radius: 0px 0px 2px 2px;
+  border-radius: 0 0 2px 2px;
   background-color: #f8f8f8;
   background-repeat: no-repeat;
   background-position: 95% 50%;
@@ -1077,11 +1071,11 @@
 }
 /* Generate interpuncts */
 #content .hlist dt:after {
-  content: ": ";
+  content: ': ';
 }
 #content .hlist dd:after,
 #content .hlist li:after {
-  content: " · ";
+  content: ' · ';
   font-weight: bold;
 }
 #content .hlist dd:last-child:after,
@@ -1099,7 +1093,7 @@
 #content .hlist li dd:first-child:before,
 #content .hlist li dt:first-child:before,
 #content .hlist li li:first-child:before {
-  content: " (";
+  content: ' (';
   font-weight: normal;
 }
 #content .hlist dd dd:last-child:after,
@@ -,7 +1105,7 @@
 #content .hlist li dd:last-child:after,
 #content .hlist li dt:last-child:after,
 #content .hlist li li:last-child:after {
-  content: ") ";
+  content: ') ';
   font-weight: normal;
 }
 /* Put ordinals in front of ordered list items */
@@ -1122,12 +1116,12 @@
   counter-increment: list-item;
 }
 #content .hlist ol > li:before {
-  content: " " counter(list-item) " ";
+  content: ' ' counter(list-item) ' ';
 }
 #content .hlist dd ol > li:first-child:before,
 #content .hlist dt ol > li:first-child:before,
 #content .hlist li ol > li:first-child:before {
-  

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: ReadOnlyMode: Add a few doc blocks

2017-04-19 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/349110 )

Change subject: ReadOnlyMode: Add a few doc blocks
..


ReadOnlyMode: Add a few doc blocks

Follows-up 820f46964f7968a.

Change-Id: I7866eb7c8bb9c45a24a3c567a7befe3505821873
---
M includes/MediaWikiServices.php
M includes/ReadOnlyMode.php
2 files changed, 13 insertions(+), 1 deletion(-)

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



diff --git a/includes/MediaWikiServices.php b/includes/MediaWikiServices.php
index d84a2b9..3bf6d78 100644
--- a/includes/MediaWikiServices.php
+++ b/includes/MediaWikiServices.php
@@ -658,7 +658,7 @@
 
/**
 * @since 1.29
-* @return \ReadOnlyMode
+* @return \ConfiguredReadOnlyMode
 */
public function getConfiguredReadOnlyMode() {
return $this->getService( 'ConfiguredReadOnlyMode' );
diff --git a/includes/ReadOnlyMode.php b/includes/ReadOnlyMode.php
index 044e3f5..592d495 100644
--- a/includes/ReadOnlyMode.php
+++ b/includes/ReadOnlyMode.php
@@ -9,7 +9,10 @@
  * @since 1.29
  */
 class ReadOnlyMode {
+   /** @var ConfiguredReadOnlyMode */
private $configuredReadOnly;
+
+   /** @var LoadBalancer */
private $loadBalancer;
 
public function __construct( ConfiguredReadOnlyMode $cro, LoadBalancer 
$loadBalancer ) {
@@ -49,6 +52,8 @@
/**
 * Set the read-only mode, which will apply for the remainder of the
 * request or until a service reset.
+*
+* @param string|null $msg
 */
public function setReason( $msg ) {
$this->configuredReadOnly->setReason( $msg );
@@ -69,8 +74,13 @@
  * @since 1.29
  */
 class ConfiguredReadOnlyMode {
+   /** @var Config */
private $config;
+
+   /** @var string|bool|null */
private $fileReason;
+
+   /** @var string|null */
private $overrideReason;
 
public function __construct( Config $config ) {
@@ -114,6 +124,8 @@
/**
 * Set the read-only mode, which will apply for the remainder of the
 * request or until a service reset.
+*
+* @param string|null $msg
 */
public function setReason( $msg ) {
$this->overrideReason = $msg;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7866eb7c8bb9c45a24a3c567a7befe3505821873
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Krinkle 
Gerrit-Reviewer: Aaron Schulz 
Gerrit-Reviewer: Tim Starling 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...MobileFrontend[master]: Reveal login/logout buttons when non-js editing is available

2017-04-19 Thread Jdlrobson (Code Review)
Jdlrobson has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349114 )

Change subject: Reveal login/logout buttons when non-js editing is available
..

Reveal login/logout buttons when non-js editing is available

Bug: T125174
Change-Id: If8094372ae01ba7c58eb1bd9a8b20ad9df50a85f
---
M includes/skins/SkinMinerva.php
M resources/mobile.mainMenu/mainmenu.less
M resources/mobile.special.mobilemenu.styles/mobilemenu.less
3 files changed, 15 insertions(+), 22 deletions(-)


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

diff --git a/includes/skins/SkinMinerva.php b/includes/skins/SkinMinerva.php
index c7b851a..690aa8e 100644
--- a/includes/skins/SkinMinerva.php
+++ b/includes/skins/SkinMinerva.php
@@ -645,6 +645,7 @@
 */
protected function insertLogInOutMenuItem( MenuBuilder $menu ) {
$query = [];
+   $canEdit = $this->getMFConfig()->get( 
'MFAllowNonJavaScriptEditing' );
if ( !$this->getRequest()->wasPosted() ) {
$returntoquery = $this->getRequest()->getValues();
unset( $returntoquery['title'] );
@@ -665,7 +666,7 @@
$url = SpecialPage::getTitleFor( 'Userlogout' 
)->getLocalURL( $query );
$username = $user->getName();
 
-   $menu->insert( 'auth' )
+   $menu->insert( 'auth', $isJSOnly = !$canEdit )
->addComponent(
$username,
Title::newFromText( $username, NS_USER 
)->getLocalUrl(),
@@ -687,7 +688,7 @@
unset( $returntoquery['campaign'] );
$query[ 'returntoquery' ] = wfArrayToCgi( 
$returntoquery );
$url = $this->getLoginUrl( $query );
-   $menu->insert( 'auth', $isJSOnly = true )
+   $menu->insert( 'auth', $isJSOnly = !$canEdit )
->addComponent(
$this->msg( 
'mobile-frontend-main-menu-login' )->escaped(),
$url,
diff --git a/resources/mobile.mainMenu/mainmenu.less 
b/resources/mobile.mainMenu/mainmenu.less
index 75f0e88..d225405 100644
--- a/resources/mobile.mainMenu/mainmenu.less
+++ b/resources/mobile.mainMenu/mainmenu.less
@@ -56,21 +56,19 @@
float: left;
min-height: 100%;
 
-   .client-js & {
-   .secondary-action {
-   border: 0;
-   position: absolute;
-   right: 0;
-   top: 0;
-   bottom: 0;
-   padding-right: 0;
-   border-left: 1px solid @grayMediumLight;
-   }
+   .secondary-action {
+   border: 0;
+   position: absolute;
+   right: 0;
+   top: 0;
+   bottom: 0;
+   padding-right: 0;
+   border-left: 1px solid @grayMediumLight;
+   }
 
-   .primary-action {
-   // 1px for the logout icon border-left
-   margin-right: @iconSize + @iconGutterWidth * 2;
-   }
+   .primary-action {
+   // 1px for the logout icon border-left
+   margin-right: @iconSize + @iconGutterWidth * 2;
}
 
ul {
diff --git a/resources/mobile.special.mobilemenu.styles/mobilemenu.less 
b/resources/mobile.special.mobilemenu.styles/mobilemenu.less
index 7582bc5..9b7d346 100644
--- a/resources/mobile.special.mobilemenu.styles/mobilemenu.less
+++ b/resources/mobile.special.mobilemenu.styles/mobilemenu.less
@@ -16,9 +16,3 @@
display: none;
}
 }
-
-.client-nojs {
-   nav .secondary-action {
-   display: none;
-   }
-}

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Lower the amount of jobs pushed into redis at once

2017-04-19 Thread Aaron Schulz (Code Review)
Aaron Schulz has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349113 )

Change subject: Lower the amount of jobs pushed into redis at once
..

Lower the amount of jobs pushed into redis at once

This further limits how long the server can be tied up by push().

Change-Id: I02d242578dadc19912c9fccfdcf5e15c5eb78e9e
---
M includes/jobqueue/JobQueueRedis.php
1 file changed, 3 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/13/349113/1

diff --git a/includes/jobqueue/JobQueueRedis.php 
b/includes/jobqueue/JobQueueRedis.php
index c2c9d66..eb91680 100644
--- a/includes/jobqueue/JobQueueRedis.php
+++ b/includes/jobqueue/JobQueueRedis.php
@@ -75,6 +75,8 @@
/** @var string Compression method to use */
protected $compression;
 
+   const MAX_PUSH_SIZE = 25; // avoid tying up the server
+
/**
 * @param array $params Possible keys:
 *   - redisConfig : An array of parameters to 
RedisConnectionPool::__construct().
@@ -212,7 +214,7 @@
if ( $flags & self::QOS_ATOMIC ) {
$batches = [ $items ]; // all or nothing
} else {
-   $batches = array_chunk( $items, 100 ); // avoid 
tying up the server
+   $batches = array_chunk( $items, 
self::MAX_PUSH_SIZE );
}
$failed = 0;
$pushed = 0;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I02d242578dadc19912c9fccfdcf5e15c5eb78e9e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz 

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


[MediaWiki-commits] [Gerrit] mediawiki...BlueSpiceFoundation[REL1_27]: API bs-filebackend-store: Changed default sort

2017-04-19 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/349112 )

Change subject: API bs-filebackend-store: Changed default sort
..


API bs-filebackend-store: Changed default sort

Store sorts descending by upload date.

See ERM4950.

NEEDS CHERRY-PICK TO REL1_27

Change-Id: I19c678bfff502eedbf47d4477bc70451be608ac0
---
M includes/api/BSApiFileBackendStore.php
1 file changed, 17 insertions(+), 0 deletions(-)

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



diff --git a/includes/api/BSApiFileBackendStore.php 
b/includes/api/BSApiFileBackendStore.php
index 7718cf3..12a75a0 100644
--- a/includes/api/BSApiFileBackendStore.php
+++ b/includes/api/BSApiFileBackendStore.php
@@ -224,4 +224,21 @@
 
return BsStringHelper::filter( $oFilter->comparison, 
$sFieldValue, $oFilter->value );
}
+
+   /**
+* Adds special default sorting
+* @return array
+*/
+   public function getAllowedParams() {
+   $aParams = parent::getAllowedParams();
+
+   $aParams['sort'][ApiBase::PARAM_DFLT] = FormatJson::encode( [
+   [
+   'property' => 'file_timestamp',
+   'direction' => 'DESC'
+   ]
+   ] );
+
+   return $aParams;
+   }
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I19c678bfff502eedbf47d4477bc70451be608ac0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceFoundation
Gerrit-Branch: REL1_27
Gerrit-Owner: Mglaser 
Gerrit-Reviewer: Mglaser 
Gerrit-Reviewer: Robert Vogel 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...BlueSpiceFoundation[master]: API bs-filebackend-store: Changed default sort

2017-04-19 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/348914 )

Change subject: API bs-filebackend-store: Changed default sort
..


API bs-filebackend-store: Changed default sort

Store sorts descending by upload date.

See ERM4950.

NEEDS CHERRY-PICK TO REL1_27

Change-Id: I19c678bfff502eedbf47d4477bc70451be608ac0
---
M includes/api/BSApiFileBackendStore.php
1 file changed, 17 insertions(+), 0 deletions(-)

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



diff --git a/includes/api/BSApiFileBackendStore.php 
b/includes/api/BSApiFileBackendStore.php
index 7718cf3..12a75a0 100644
--- a/includes/api/BSApiFileBackendStore.php
+++ b/includes/api/BSApiFileBackendStore.php
@@ -224,4 +224,21 @@
 
return BsStringHelper::filter( $oFilter->comparison, 
$sFieldValue, $oFilter->value );
}
+
+   /**
+* Adds special default sorting
+* @return array
+*/
+   public function getAllowedParams() {
+   $aParams = parent::getAllowedParams();
+
+   $aParams['sort'][ApiBase::PARAM_DFLT] = FormatJson::encode( [
+   [
+   'property' => 'file_timestamp',
+   'direction' => 'DESC'
+   ]
+   ] );
+
+   return $aParams;
+   }
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I19c678bfff502eedbf47d4477bc70451be608ac0
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/BlueSpiceFoundation
Gerrit-Branch: master
Gerrit-Owner: Robert Vogel 
Gerrit-Reviewer: Ljonka 
Gerrit-Reviewer: Mglaser 
Gerrit-Reviewer: Pwirth 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...BlueSpiceFoundation[REL1_27]: API bs-filebackend-store: Changed default sort

2017-04-19 Thread Mglaser (Code Review)
Mglaser has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349112 )

Change subject: API bs-filebackend-store: Changed default sort
..

API bs-filebackend-store: Changed default sort

Store sorts descending by upload date.

See ERM4950.

NEEDS CHERRY-PICK TO REL1_27

Change-Id: I19c678bfff502eedbf47d4477bc70451be608ac0
---
M includes/api/BSApiFileBackendStore.php
1 file changed, 17 insertions(+), 0 deletions(-)


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

diff --git a/includes/api/BSApiFileBackendStore.php 
b/includes/api/BSApiFileBackendStore.php
index 7718cf3..12a75a0 100644
--- a/includes/api/BSApiFileBackendStore.php
+++ b/includes/api/BSApiFileBackendStore.php
@@ -224,4 +224,21 @@
 
return BsStringHelper::filter( $oFilter->comparison, 
$sFieldValue, $oFilter->value );
}
+
+   /**
+* Adds special default sorting
+* @return array
+*/
+   public function getAllowedParams() {
+   $aParams = parent::getAllowedParams();
+
+   $aParams['sort'][ApiBase::PARAM_DFLT] = FormatJson::encode( [
+   [
+   'property' => 'file_timestamp',
+   'direction' => 'DESC'
+   ]
+   ] );
+
+   return $aParams;
+   }
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I19c678bfff502eedbf47d4477bc70451be608ac0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceFoundation
Gerrit-Branch: REL1_27
Gerrit-Owner: Mglaser 
Gerrit-Reviewer: Robert Vogel 

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


[MediaWiki-commits] [Gerrit] mediawiki...SimpleSAMLphp[master]: Added optional error message to authenticate().

2017-04-19 Thread Cicalese (Code Review)
Cicalese has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/348986 )

Change subject: Added optional error message to authenticate().
..


Added optional error message to authenticate().

Bumped version number to synchronize with PluggaleAuth and OpenIDConnect
extensions.

Change-Id: Ib9539d177147b9cfbc7ee533dc3939d1f2e41298
---
M SimpleSAMLphp.class.php
M extension.json
2 files changed, 54 insertions(+), 24 deletions(-)

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



diff --git a/SimpleSAMLphp.class.php b/SimpleSAMLphp.class.php
index 05664fd..2b87420 100644
--- a/SimpleSAMLphp.class.php
+++ b/SimpleSAMLphp.class.php
@@ -32,11 +32,18 @@
 * @param &$username
 * @param &$realname
 * @param &$email
+* @param &$errorMessage
 */
-   public function authenticate( &$id, &$username, &$realname, &$email ) {
+   public function authenticate( &$id, &$username, &$realname, &$email,
+   &$errorMessage ) {
 
$saml = $this->getSAMLClient();
-   $saml->requireAuth();
+   try {
+   $saml->requireAuth();
+   } catch ( Exception $e ) {
+   $errorMessage = $e->getMessage();
+   return false;
+   }
$attributes = $saml->getAttributes();
 
if ( isset( $GLOBALS['wgSimpleSAMLphp_RealNameAttribute'] ) ) {
@@ -50,6 +57,8 @@
}
$realname .= 
$attributes[$attribute][0];
} else {
+   wfDebug( 'SimpleSAMLphp: Could 
not find real name attribute ' .
+   $attribute );
return false;
}
}
@@ -57,36 +66,52 @@
if ( array_key_exists( $realNameAttribute, 
$attributes ) ) {
$realname = 
$attributes[$realNameAttribute][0];
} else {
+   wfDebug( 'SimpleSAMLphp: Could not find 
real name attribute ' .
+   $attributes );
return false;
}
}
} else {
+   wfDebug( 'SimpleSAMLphp: 
$wgSimpleSAMLphp_RealNameAttribute is not set' );
return false;
}
 
-   if ( isset( $GLOBALS['wgSimpleSAMLphp_EmailAttribute'] ) &&
-   array_key_exists( 
$GLOBALS['wgSimpleSAMLphp_EmailAttribute'],
+   if ( isset( $GLOBALS['wgSimpleSAMLphp_EmailAttribute'] ) ) {
+   if ( array_key_exists( 
$GLOBALS['wgSimpleSAMLphp_EmailAttribute'],
$attributes ) ) {
-   $email = 
$attributes[$GLOBALS['wgSimpleSAMLphp_EmailAttribute']][0];
-   } else {
-   return false;
-   }
-
-   if ( isset( $GLOBALS['wgSimpleSAMLphp_UsernameAttribute'] ) &&
-   array_key_exists( 
$GLOBALS['wgSimpleSAMLphp_UsernameAttribute'],
-   $attributes ) ) {
-   $username = strtolower(
-   
$attributes[$GLOBALS['wgSimpleSAMLphp_UsernameAttribute']][0] );
-   $nt = Title::makeTitleSafe( NS_USER, $username );
-   if ( is_null( $nt ) ) {
+   $email = 
$attributes[$GLOBALS['wgSimpleSAMLphp_EmailAttribute']][0];
+   } else {
+   wfDebug( 'SimpleSAMLphp: Could not find email 
attribute ' .
+   $attributes );
return false;
}
-   $username = $nt->getText();
-   $id = User::idFromName( $username );
-   return true;
+   } else {
+   wfDebug( 'SimpleSAMLphp: 
$wgSimpleSAMLphp_EmailAttribute is not set' );
+   return false;
}
 
-   return false;
+   if ( isset( $GLOBALS['wgSimpleSAMLphp_UsernameAttribute'] ) ) {
+   if ( array_key_exists( 
$GLOBALS['wgSimpleSAMLphp_UsernameAttribute'],
+   $attributes ) ) {
+   $username = strtolower(
+   
$attributes[$GLOBALS['wgSimpleSAMLphp_UsernameAttribute']][0] );
+   $nt = Title::makeTitleSafe( NS_USER, $username 
);
+  

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: ReadOnlyMode: Add a few doc blocks

2017-04-19 Thread Krinkle (Code Review)
Krinkle has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349110 )

Change subject: ReadOnlyMode: Add a few doc blocks
..

ReadOnlyMode: Add a few doc blocks

Change-Id: I7866eb7c8bb9c45a24a3c567a7befe3505821873
---
M includes/MediaWikiServices.php
M includes/ReadOnlyMode.php
2 files changed, 13 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/10/349110/1

diff --git a/includes/MediaWikiServices.php b/includes/MediaWikiServices.php
index d84a2b9..3bf6d78 100644
--- a/includes/MediaWikiServices.php
+++ b/includes/MediaWikiServices.php
@@ -658,7 +658,7 @@
 
/**
 * @since 1.29
-* @return \ReadOnlyMode
+* @return \ConfiguredReadOnlyMode
 */
public function getConfiguredReadOnlyMode() {
return $this->getService( 'ConfiguredReadOnlyMode' );
diff --git a/includes/ReadOnlyMode.php b/includes/ReadOnlyMode.php
index 044e3f5..1925425 100644
--- a/includes/ReadOnlyMode.php
+++ b/includes/ReadOnlyMode.php
@@ -9,7 +9,10 @@
  * @since 1.29
  */
 class ReadOnlyMode {
+   /** @var ConfiguredReadOnlyMode */
private $configuredReadOnly;
+
+   /** @var LoadBalancer */
private $loadBalancer;
 
public function __construct( ConfiguredReadOnlyMode $cro, LoadBalancer 
$loadBalancer ) {
@@ -49,6 +52,8 @@
/**
 * Set the read-only mode, which will apply for the remainder of the
 * request or until a service reset.
+*
+* @param string|null $msg
 */
public function setReason( $msg ) {
$this->configuredReadOnly->setReason( $msg );
@@ -69,8 +74,13 @@
  * @since 1.29
  */
 class ConfiguredReadOnlyMode {
+   /** @var Config */
private $config;
+
+   /** @var string|null */
private $fileReason;
+
+   /** @var string|null */
private $overrideReason;
 
public function __construct( Config $config ) {
@@ -114,6 +124,8 @@
/**
 * Set the read-only mode, which will apply for the remainder of the
 * request or until a service reset.
+*
+* @param string|null $msg
 */
public function setReason( $msg ) {
$this->overrideReason = $msg;

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...DonationInterface[master]: Form should not validate if manual errors are present

2017-04-19 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/341592 )

Change subject: Form should not validate if manual errors are present
..


Form should not validate if manual errors are present

TODO: I'd like to understand when and why this changed, and why validation and
manual errors were treated differently.

Bug: T98447
Change-Id: I22d7ee350820db8a1fb37124a0690b0b3d397784
---
M gateway_common/GatewayPage.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/gateway_common/GatewayPage.php b/gateway_common/GatewayPage.php
index 7e53803..a220050 100644
--- a/gateway_common/GatewayPage.php
+++ b/gateway_common/GatewayPage.php
@@ -348,7 +348,7 @@
if ( $this->isProcessImmediate() ) {
// Check form for errors
// FIXME: Should this be rolled into 
adapter.doPayment?
-   $form_errors = $this->validateForm();
+   $form_errors = $this->validateForm() || 
$this->adapter->getManualErrors();
 
// If there were errors, redisplay form, 
otherwise proceed to next step
if ( $form_errors ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I22d7ee350820db8a1fb37124a0690b0b3d397784
Gerrit-PatchSet: 8
Gerrit-Project: mediawiki/extensions/DonationInterface
Gerrit-Branch: master
Gerrit-Owner: Awight 
Gerrit-Reviewer: AndyRussG 
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] mediawiki/core[master]: A service for read-only mode

2017-04-19 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/347315 )

Change subject: A service for read-only mode
..


A service for read-only mode

Introduce a service to represent wfReadOnly() and friends.

It's necessary to have two service instances, one for wfReadOnly() and
one for wfConfiguredReadOnlyReason(), to avoid a circular dependency,
since LoadBalancer needs the configured reason during construction, but
wfReadOnly() needs to query the currently active load balancer.

Not having a cache of the configuration makes it possible to dynamically
change the configuration. Ideally things would not change the
configuration, and I removed such instances in core, but to support
extensions, I added a test ensuring that the configuration can be changed.

Change-Id: I9bbee946c10742526d3423208efd68cb3cc5a7ee
---
M autoload.php
M includes/GlobalFunctions.php
M includes/MediaWikiServices.php
A includes/ReadOnlyMode.php
M includes/ServiceWiring.php
M includes/WatchedItemStore.php
M includes/db/MWLBFactory.php
M maintenance/rebuildFileCache.php
M maintenance/rebuildImages.php
M tests/phpunit/includes/GlobalFunctions/GlobalTest.php
A tests/phpunit/includes/ReadOnlyModeTest.php
M tests/phpunit/includes/WatchedItemStoreUnitTest.php
M tests/phpunit/includes/auth/AuthManagerTest.php
13 files changed, 553 insertions(+), 115 deletions(-)

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



diff --git a/autoload.php b/autoload.php
index 20a1bf4..ba5b774 100644
--- a/autoload.php
+++ b/autoload.php
@@ -285,6 +285,7 @@
'Config' => __DIR__ . '/includes/config/Config.php',
'ConfigException' => __DIR__ . '/includes/config/ConfigException.php',
'ConfigFactory' => __DIR__ . '/includes/config/ConfigFactory.php',
+   'ConfiguredReadOnlyMode' => __DIR__ . '/includes/ReadOnlyMode.php',
'ConstantDependency' => __DIR__ . '/includes/cache/CacheDependency.php',
'Content' => __DIR__ . '/includes/content/Content.php',
'ContentHandler' => __DIR__ . '/includes/content/ContentHandler.php',
@@ -1160,6 +1161,7 @@
'RawAction' => __DIR__ . '/includes/actions/RawAction.php',
'RawMessage' => __DIR__ . '/includes/Message.php',
'ReadOnlyError' => __DIR__ . '/includes/exception/ReadOnlyError.php',
+   'ReadOnlyMode' => __DIR__ . '/includes/ReadOnlyMode.php',
'ReassignEdits' => __DIR__ . '/maintenance/reassignEdits.php',
'RebuildAll' => __DIR__ . '/maintenance/rebuildall.php',
'RebuildFileCache' => __DIR__ . '/maintenance/rebuildFileCache.php',
diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php
index 4e60e63..8b857ea 100644
--- a/includes/GlobalFunctions.php
+++ b/includes/GlobalFunctions.php
@@ -1273,7 +1273,8 @@
  * @return bool
  */
 function wfReadOnly() {
-   return wfReadOnlyReason() !== false;
+   return \MediaWiki\MediaWikiServices::getInstance()->getReadOnlyMode()
+   ->isReadOnly();
 }
 
 /**
@@ -1285,19 +1286,8 @@
  * @return string|bool String when in read-only mode; false otherwise
  */
 function wfReadOnlyReason() {
-   $readOnly = wfConfiguredReadOnlyReason();
-   if ( $readOnly !== false ) {
-   return $readOnly;
-   }
-
-   static $lbReadOnly = null;
-   if ( $lbReadOnly === null ) {
-   // Callers use this method to be aware that data presented to a 
user
-   // may be very stale and thus allowing submissions can be 
problematic.
-   $lbReadOnly = wfGetLB()->getReadOnlyReason();
-   }
-
-   return $lbReadOnly;
+   return \MediaWiki\MediaWikiServices::getInstance()->getReadOnlyMode()
+   ->getReason();
 }
 
 /**
@@ -1307,18 +1297,8 @@
  * @since 1.27
  */
 function wfConfiguredReadOnlyReason() {
-   global $wgReadOnly, $wgReadOnlyFile;
-
-   if ( $wgReadOnly === null ) {
-   // Set $wgReadOnly for faster access next time
-   if ( is_file( $wgReadOnlyFile ) && filesize( $wgReadOnlyFile ) 
> 0 ) {
-   $wgReadOnly = file_get_contents( $wgReadOnlyFile );
-   } else {
-   $wgReadOnly = false;
-   }
-   }
-
-   return $wgReadOnly;
+   return 
\MediaWiki\MediaWikiServices::getInstance()->getConfiguredReadOnlyMode()
+   ->getReason();
 }
 
 /**
diff --git a/includes/MediaWikiServices.php b/includes/MediaWikiServices.php
index e44fefe..d84a2b9 100644
--- a/includes/MediaWikiServices.php
+++ b/includes/MediaWikiServices.php
@@ -656,6 +656,22 @@
return $this->getService( 'VirtualRESTServiceClient' );
}
 
+   /**
+* @since 1.29
+* @return \ReadOnlyMode
+*/
+   public function getConfiguredReadOnlyMode() {
+   return $this->getService( 'ConfiguredReadOnlyMode' );
+   }
+
+   /**
+* @since 

[MediaWiki-commits] [Gerrit] operations/puppet[production]: tools-proxy: Ensure kubelet is stopped on tools proxy nodes

2017-04-19 Thread Madhuvishy (Code Review)
Madhuvishy has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349109 )

Change subject: tools-proxy: Ensure kubelet is stopped on tools proxy nodes
..

tools-proxy: Ensure kubelet is stopped on tools proxy nodes

Bug: T163391
Change-Id: I36295d6d280a12fa67d74e7911e731c655ed3e3f
---
M modules/role/manifests/toollabs/k8s/webproxy.pp
1 file changed, 4 insertions(+), 0 deletions(-)


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

diff --git a/modules/role/manifests/toollabs/k8s/webproxy.pp 
b/modules/role/manifests/toollabs/k8s/webproxy.pp
index cc80702..0c2a57b 100644
--- a/modules/role/manifests/toollabs/k8s/webproxy.pp
+++ b/modules/role/manifests/toollabs/k8s/webproxy.pp
@@ -20,4 +20,8 @@
 class { '::k8s::proxy':
 master_host => $master_host,
 }
+
+service { 'kubelet':
+ensure => stopped,
+}
 }

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...DonationInterface[master]: Get rid of queue mirroring

2017-04-19 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/349106 )

Change subject: Get rid of queue mirroring
..


Get rid of queue mirroring

No longer using that

Change-Id: Ie73dd1d531694e36f6770afbc3beec0508e85320
---
M extension.json
M gateway_common/DonationQueue.php
2 files changed, 0 insertions(+), 27 deletions(-)

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



diff --git a/extension.json b/extension.json
index b693bed..edb34e3 100644
--- a/extension.json
+++ b/extension.json
@@ -381,9 +381,6 @@
"banner-history": [],
"_merge_strategy": "array_plus"
},
-   "DonationInterfaceQueueMirrors": {
-   "_merge_strategy": "array_plus"
-   },
"DonationInterfaceCustomFiltersActionRanges": {
"process": [
0,
diff --git a/gateway_common/DonationQueue.php b/gateway_common/DonationQueue.php
index 7abb5cb..97f4816 100644
--- a/gateway_common/DonationQueue.php
+++ b/gateway_common/DonationQueue.php
@@ -53,9 +53,6 @@
$properties = $this->buildHeaders( $transaction );
$message = $this->buildBody( $transaction );
$this->newBackend( $queue )->push( $message, $properties );
-
-   // FIXME: hack for new queue, remove
-   $this->mirror( $message, $queue );
}
 
public function pop( $queue ) {
@@ -74,27 +71,6 @@
$backend = $this->newBackend( $queue );
 
return $backend->peek();
-   }
-
-   /**
-* Temporary measure to transition from key/value ActiveMQ to pure FIFO
-* queues. Reads $wgDonationInterfaceQueueMirrors, where keys are 
original
-* queue names and values are the queues to mirror to.
-*
-* @param array $message
-* @param string $queue
-*/
-   protected function mirror( $message, $queue ) {
-   global $wgDonationInterfaceQueueMirrors;
-   if ( array_key_exists( $queue, $wgDonationInterfaceQueueMirrors 
) ) {
-   $mirrorQueue = $wgDonationInterfaceQueueMirrors[$queue];
-   try {
-   $this->newBackend( $mirrorQueue )->push( 
$message );
-   } catch ( Exception $ex ) {
-   // TODO: log.
-   // DonationLoggerFactory::getLogger()->warning( 
"Cannot mirror to {$mirrorQueue}: {$ex->getMessage()}" );
-   }
-   }
}
 
/**

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie73dd1d531694e36f6770afbc3beec0508e85320
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DonationInterface
Gerrit-Branch: master
Gerrit-Owner: Ejegg 
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] operations/mediawiki-config[master]: Add b/c for ORES config format change

2017-04-19 Thread Catrope (Code Review)
Catrope has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349108 )

Change subject: Add b/c for ORES config format change
..

Add b/c for ORES config format change

I6b839a6a864463 changed the keys expected in $wgOresFiltersThresholds,
so set both the old and the new keys to keep things working
as 1.29.0-wmf.21 rolls out.

Bug: T162760
Change-Id: Ifda4ba70f70b23e0e1c8c8bea17314e6692ef22d
---
M wmf-config/CommonSettings.php
1 file changed, 4 insertions(+), 0 deletions(-)


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

diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index 3e11fd4..aef734f 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -3324,6 +3324,10 @@
} else {
$wgDefaultUserOptions['oresDamagingPref'] = 'soft';
}
+
+   // Backwards compatibility for upcoming config format change
+   $wgOresFiltersThresholds['goodfaith']['likelygood'] = 
$wgOresFiltersThresholds['goodfaith']['good'];
+   $wgOresFiltersThresholds['goodfaith']['likelybad'] = 
$wgOresFiltersThresholds['goodfaith']['bad'];
 }
 
 ### End (roughly) of general extensions 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifda4ba70f70b23e0e1c8c8bea17314e6692ef22d
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
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] mediawiki...DonationInterface[master]: Remove deprecated key-value interfaces

2017-04-19 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/340924 )

Change subject: Remove deprecated key-value interfaces
..


Remove deprecated key-value interfaces

Updates SmashPig and PHP-Queue libraries

Bug: T159175
Change-Id: I34e782f5dd833de407642c39df2d1ca90a933abf
---
M composer.json
M composer.lock
M gateway_common/DonationQueue.php
M tests/phpunit/DonationQueueTest.php
M tests/phpunit/includes/TestingQueue.php
5 files changed, 22 insertions(+), 90 deletions(-)

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



diff --git a/composer.json b/composer.json
index d62654a..21e4495 100644
--- a/composer.json
+++ b/composer.json
@@ -39,10 +39,6 @@
},
"repositories": [
{
-   "type": "vcs",
-   "url": 
"https://gerrit.wikimedia.org/r/p/wikimedia/fundraising/php-queue.git;
-   },
-   {
"type": "git",
"url": 
"https://github.com/ejegg/login-and-pay-with-amazon-sdk-php;
}
diff --git a/composer.lock b/composer.lock
index 705f7fa..563fb2e 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": "4ed6aa117f3e06e6da4a259e398fd6f8",
-"content-hash": "0b276b857fa6d06ce5b977f9dfa9431d",
+"hash": "286013b033c04aeb560c6d29c9d2462d",
+"content-hash": "c77aa55a881981c2f2170a5894371bc0",
 "packages": [
 {
 "name": "addshore/psr-6-mediawiki-bagostuff-adapter",
@@ -137,8 +137,14 @@
 "version": "dev-master",
 "source": {
 "type": "git",
-"url": 
"https://gerrit.wikimedia.org/r/p/wikimedia/fundraising/php-queue.git;,
-"reference": "d56c5bd69dad595f2e00a3e10c851736b1feb57b"
+"url": "https://github.com/CoderKungfu/php-queue.git;,
+"reference": "dd8412f105632d31cdd77933ec40a08640752c99"
+},
+"dist": {
+"type": "zip",
+"url": 
"https://api.github.com/repos/CoderKungfu/php-queue/zipball/dd8412f105632d31cdd77933ec40a08640752c99;,
+"reference": "dd8412f105632d31cdd77933ec40a08640752c99",
+"shasum": ""
 },
 "require": {
 "clio/clio": "0.1.*",
@@ -146,15 +152,19 @@
 "php": ">=5.3.0"
 },
 "require-dev": {
-"jakub-onderka/php-parallel-lint": "0.9",
-"phpunit/phpunit": "4.4.*"
+"amazonwebservices/aws-sdk-for-php": "dev-master",
+"aws/aws-sdk-php": "dev-master",
+"ext-memcache": "*",
+"iron-io/iron_mq": "dev-master",
+"microsoft/windowsazure": "dev-master",
+"mrpoundsign/pheanstalk-5.3": "dev-master",
+"predis/predis": "1.*"
 },
 "suggest": {
 "Respect/Rest": "For a REST server to post job data",
 "amazonwebservices/aws-sdk-for-php": "For AWS SQS backend 
support (legacy version)",
 "aws/aws-sdk-php": "For AWS SQS backend support",
 "clio/clio": "Support for daemonizing PHP CLI runner",
-"ext-memcache": "*",
 "fusesource/stomp-php": "For the STOMP backend",
 "iron-io/iron_mq": "For IronMQ backend support",
 "microsoft/windowsazure": "For Windows Azure Service Bus 
backend support",
@@ -173,12 +183,7 @@
 "PHPQueue": "src/"
 }
 },
-"scripts": {
-"test": [
-"parallel-lint . --exclude vendor",
-"phpunit"
-]
-},
+"notification-url": "https://packagist.org/downloads/;,
 "license": [
 "MIT"
 ],
@@ -194,7 +199,7 @@
 "queue",
 "transaction"
 ],
-"time": "2017-01-04 21:01:15"
+"time": "2017-04-17 14:11:55"
 },
 {
 "name": "ircmaxell/password-compat",
@@ -936,7 +941,7 @@
 "source": {
 "type": "git",
 "url": 
"https://gerrit.wikimedia.org/r/wikimedia/fundraising/SmashPig.git;,
-"reference": "ec6ea516530400dfb7bb02a72ef52318a40b7bb6"
+"reference": "78a7f28dee35cb4f5df285f53c7b643eecec7d33"
 },
 "require": {
 "amzn/login-and-pay-with-amazon-sdk-php": "dev-master",
@@ -987,7 +992,7 @@
 "donations",
 "payments"
 ],
-"time": "2017-04-10 

[MediaWiki-commits] [Gerrit] mediawiki...MobileFrontend[master]: Restrict lazy loaded images to the viewport

2017-04-19 Thread Jdlrobson (Code Review)
Jdlrobson has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349107 )

Change subject: Restrict lazy loaded images to the viewport
..

Restrict lazy loaded images to the viewport

When lazy loading an image cleanup the dimensions on the lazy loaded
placeholder. The width and height that was specified might be larger
than the viewport so be careful to restrict both the placeholder and
the image inside it once it gets loaded.

In addition to this when loading an image we should remove the dimensions
that were copied from the placeholder to the image. Otherwise these will
conflict with the restriction as inline styles will override any CSS
rule.

Bug: T154478
Change-Id: I8acec78e09b75112749c82aef118c924ba1d7910
---
M resources/mobile.startup/Skin.js
M resources/skins.minerva.content.styles/images.less
2 files changed, 9 insertions(+), 2 deletions(-)


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

diff --git a/resources/mobile.startup/Skin.js b/resources/mobile.startup/Skin.js
index 01e5072..9ccfeb3 100644
--- a/resources/mobile.startup/Skin.js
+++ b/resources/mobile.startup/Skin.js
@@ -233,7 +233,10 @@
$placeholder.empty().append( $downloadingImage 
);
// Set the loaded class after insertion of the 
HTML to trigger the
// animations.
-   $placeholder.addClass( 'loaded' );
+   $placeholder.addClass( 'loaded' )
+   // Remove width and height properties 
which have now been copied to the image and
+   // are surplus to requirements (see 
https://phabricator.wikimedia.org/T154478)
+   .css( { width: '', height: '' } );
} );
 
// Trigger image download after binding the load handler
diff --git a/resources/skins.minerva.content.styles/images.less 
b/resources/skins.minerva.content.styles/images.less
index 985b03e..2facf2b 100644
--- a/resources/skins.minerva.content.styles/images.less
+++ b/resources/skins.minerva.content.styles/images.less
@@ -49,7 +49,11 @@
// Prevent inline styles on images in wikitext
// Note we restrict to img's to avoid conflicts with VisualEditor 
shields
// See bug T64460
-   a > img {
+   a > img,
+   // The lazy image placeholder should be restricted
+   a > .lazy-image-placeholder,
+   // ... and then when loaded so should the image inside it (T154478)
+   a > .lazy-image-placeholder img {
// make sure that images in articles don't cause a horizontal 
scrollbar
// on small screens
max-width: 100% !important;

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

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

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


[MediaWiki-commits] [Gerrit] wikimedia...process-control[master]: Log the subprocess log path; dial normal lock messages down ...

2017-04-19 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/348013 )

Change subject: Log the subprocess log path; dial normal lock messages down to 
debug
..


Log the subprocess log path; dial normal lock messages down to debug

Change-Id: Id5913b86329d0e976aa56eb5b2a38d4495180bba
---
M processcontrol/lock.py
M processcontrol/runner.py
2 files changed, 4 insertions(+), 2 deletions(-)

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



diff --git a/processcontrol/lock.py b/processcontrol/lock.py
index 1ea9f98..a55c39a 100644
--- a/processcontrol/lock.py
+++ b/processcontrol/lock.py
@@ -44,7 +44,7 @@
 os.unlink(filename)
 
 with open(filename, "w") as f:
-config.log.info("Writing lockfile.")
+config.log.debug("Writing lockfile.")
 f.write(str(os.getpid()))
 
 global lockfile
@@ -55,7 +55,7 @@
 global lockfile
 if lockfile:
 if os.path.exists(lockfile):
-config.log.info("Clearing lockfile.")
+config.log.debug("Clearing lockfile.")
 os.unlink(lockfile)
 else:
 raise LockError("Already unlocked!")
diff --git a/processcontrol/runner.py b/processcontrol/runner.py
index 12f4030..c9e1cef 100644
--- a/processcontrol/runner.py
+++ b/processcontrol/runner.py
@@ -52,6 +52,7 @@
 if return_code != 0:
 self.fail_exitcode(return_code)
 job_history.record_success()
+config.log.info("Successfully completed 
{slug}.".format(slug=self.job.slug))
 except (JobFailure, lock.LockError) as ex:
 config.log.error(str(ex))
 self.mailer.fail_mail(str(ex), logfile=self.logfile)
@@ -73,6 +74,7 @@
 self.process = subprocess.Popen(command, stdout=subprocess.PIPE, 
stderr=subprocess.PIPE, env=self.job.environment)
 streamer = output_streamer.OutputStreamer(self.process, self.job.slug, 
command_string, self.start_time)
 self.logfile = streamer.filename
+config.log.info("Logging to {path}".format(path=self.logfile))
 streamer.start()
 
 # should be safe from deadlocks because our OutputStreamer

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id5913b86329d0e976aa56eb5b2a38d4495180bba
Gerrit-PatchSet: 4
Gerrit-Project: wikimedia/fundraising/process-control
Gerrit-Branch: master
Gerrit-Owner: Awight 
Gerrit-Reviewer: Cdentinger 
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] mediawiki...DonationInterface[master]: Get rid of queue mirroring

2017-04-19 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349106 )

Change subject: Get rid of queue mirroring
..

Get rid of queue mirroring

No longer using that

Change-Id: Ie73dd1d531694e36f6770afbc3beec0508e85320
---
M extension.json
M gateway_common/DonationQueue.php
2 files changed, 0 insertions(+), 27 deletions(-)


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

diff --git a/extension.json b/extension.json
index b693bed..edb34e3 100644
--- a/extension.json
+++ b/extension.json
@@ -381,9 +381,6 @@
"banner-history": [],
"_merge_strategy": "array_plus"
},
-   "DonationInterfaceQueueMirrors": {
-   "_merge_strategy": "array_plus"
-   },
"DonationInterfaceCustomFiltersActionRanges": {
"process": [
0,
diff --git a/gateway_common/DonationQueue.php b/gateway_common/DonationQueue.php
index 7abb5cb..97f4816 100644
--- a/gateway_common/DonationQueue.php
+++ b/gateway_common/DonationQueue.php
@@ -53,9 +53,6 @@
$properties = $this->buildHeaders( $transaction );
$message = $this->buildBody( $transaction );
$this->newBackend( $queue )->push( $message, $properties );
-
-   // FIXME: hack for new queue, remove
-   $this->mirror( $message, $queue );
}
 
public function pop( $queue ) {
@@ -74,27 +71,6 @@
$backend = $this->newBackend( $queue );
 
return $backend->peek();
-   }
-
-   /**
-* Temporary measure to transition from key/value ActiveMQ to pure FIFO
-* queues. Reads $wgDonationInterfaceQueueMirrors, where keys are 
original
-* queue names and values are the queues to mirror to.
-*
-* @param array $message
-* @param string $queue
-*/
-   protected function mirror( $message, $queue ) {
-   global $wgDonationInterfaceQueueMirrors;
-   if ( array_key_exists( $queue, $wgDonationInterfaceQueueMirrors 
) ) {
-   $mirrorQueue = $wgDonationInterfaceQueueMirrors[$queue];
-   try {
-   $this->newBackend( $mirrorQueue )->push( 
$message );
-   } catch ( Exception $ex ) {
-   // TODO: log.
-   // DonationLoggerFactory::getLogger()->warning( 
"Cannot mirror to {$mirrorQueue}: {$ex->getMessage()}" );
-   }
-   }
}
 
/**

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie73dd1d531694e36f6770afbc3beec0508e85320
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DonationInterface
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] mediawiki...MobileFrontend[master]: Improve layout of fallback editor

2017-04-19 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/347127 )

Change subject: Improve layout of fallback editor
..


Improve layout of fallback editor

This attempts to make the save changes button visible without
the user having to scroll down the page and clean up the UI.
Note for anonymous users, the user will have to scroll as the warning
text appears before the form. This is unavoidable and an encouragement
to login!

Styles apply when show changes or show preview have been clicked

When the non-JavaScript editor is open
* Reduce heading font-size
* Reduce size of checkbox labels, warnings and licenses to be consistent
with license box in overlays. Pull out a generic mixin until this
component can be generalised. Note given
skins.minerva.fallbackeditor is only applied when action=edit
there is no additional bloat to the resulting CSS payload on standard
mobile views
* Reducing padding of elements to make room for the important textarea
and buttons.
* In preview mode, style "Remember this is only a preview" as a warningbox
to improve visual separation from rest of content
* Remove use of large headings in editor which make UI more cluttered

Bug: T125174
Change-Id: Ibb7355b828c3bedbe8ba9aeaf95a0391c42a18d6
---
M minerva.less/minerva.mixins.less
M resources/mobile.messageBox/messageBox.less
M resources/mobile.startup/Overlay.less
M resources/skins.minerva.fallbackeditor/fallbackeditor.less
4 files changed, 68 insertions(+), 4 deletions(-)

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



diff --git a/minerva.less/minerva.mixins.less b/minerva.less/minerva.mixins.less
index 93c7de2..b12c6f6 100644
--- a/minerva.less/minerva.mixins.less
+++ b/minerva.less/minerva.mixins.less
@@ -45,3 +45,11 @@
-webkit-transition: -webkit-transform @arguments;
transition: transform @arguments;
 }
+
+// Generic mixin for applying styles to text that accompanies/adds context to 
workflows
+.secondary-text() {
+   font-size: 0.9em;
+   color: @grayMedium;
+   margin-top: 0.5em;
+   line-height: 1.4;
+}
diff --git a/resources/mobile.messageBox/messageBox.less 
b/resources/mobile.messageBox/messageBox.less
index debf81f..921e645 100644
--- a/resources/mobile.messageBox/messageBox.less
+++ b/resources/mobile.messageBox/messageBox.less
@@ -2,6 +2,8 @@
 @import 'minerva.mixins';
 @import 'mediawiki.mixins';
 
+// Necessary for fallback editor preview.
+.previewnote p,
 // Used for messages on login screen (They're more informational than actual 
warnings.)
 // FIXME: standardise these two classes
 .warningbox,
@@ -16,13 +18,20 @@
background: @colorSuccessBackground;
 }
 
+// Necessary for fallback editor preview.
+.previewnote p,
 .successbox,
 .errorbox,
 .warningbox,
 .mw-revision {
padding: 1em @contentMargin;
margin: 0 0 1em;
+}
 
+.successbox,
+.errorbox,
+.warningbox,
+.mw-revision {
h2 {
font: bold 100% @fontFamily;
padding: 0;
diff --git a/resources/mobile.startup/Overlay.less 
b/resources/mobile.startup/Overlay.less
index 99927ea..e8c6cd2 100644
--- a/resources/mobile.startup/Overlay.less
+++ b/resources/mobile.startup/Overlay.less
@@ -140,10 +140,7 @@
}
 
.license {
-   font-size: 0.9em;
-   color: @grayMedium;
-   margin-top: 0.5em;
-   line-height: 1.4;
+   .secondary-text();
}
 
.content {
diff --git a/resources/skins.minerva.fallbackeditor/fallbackeditor.less 
b/resources/skins.minerva.fallbackeditor/fallbackeditor.less
index 09a098f..54712ef 100644
--- a/resources/skins.minerva.fallbackeditor/fallbackeditor.less
+++ b/resources/skins.minerva.fallbackeditor/fallbackeditor.less
@@ -15,3 +15,53 @@
max-height: 14em;
 }
 
+.action-submit,
+.action-edit {
+   #page-secondary-actions,
+   #page-actions {
+   display: none;
+   }
+
+   .heading-holder {
+   padding-bottom: 8px;
+   padding-top: 0;
+   font-weight: bold;
+   }
+
+   .editCheckboxes {
+   margin-top: 8px;
+   }
+
+   #mw-anon-edit-warning {
+   padding: 8px;
+   }
+
+   // Parsing information doesn't need to be so big
+   .preview-limit-report-wrapper,
+   // neither to headers for diffs
+   .diff-otitle,
+   .diff-ntitle,
+   // neither does the page title
+   #section_0,
+   // neither do all the warnings
+   #editpage-copywarn,
+   #mw-anon-edit-warning {
+   .secondary-text();
+   }
+
+   // Preview header is hidden given the warning box already
+   // tells the user they are in preview mode.
+   .previewnote h2 {
+   display: none;
+   }
+
+   // show changes specific
+   #wikiDiff table {
+   margin-top: 0;
+
+

[MediaWiki-commits] [Gerrit] mediawiki...TwoColConflict[master]: Switch TestingAccessWrapper to librarized version

2017-04-19 Thread Code Review
Gergő Tisza has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349105 )

Change subject: Switch TestingAccessWrapper to librarized version
..

Switch TestingAccessWrapper to librarized version

Change-Id: I471a226de38d1dc7073dc4411466d43391d64497
---
M composer.json
M tests/phpunit/includes/TwoColConflictPageTest.php
2 files changed, 4 insertions(+), 1 deletion(-)


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

diff --git a/composer.json b/composer.json
index 98d41d9..8149d52 100644
--- a/composer.json
+++ b/composer.json
@@ -1,7 +1,8 @@
 {
"require-dev": {
"jakub-onderka/php-parallel-lint": "0.9.2",
-   "mediawiki/mediawiki-codesniffer": "0.7.2"
+   "mediawiki/mediawiki-codesniffer": "0.7.2",
+   "wikimedia/testing-access-wrapper": "~1.0"
},
"scripts": {
"fix": "phpcbf",
diff --git a/tests/phpunit/includes/TwoColConflictPageTest.php 
b/tests/phpunit/includes/TwoColConflictPageTest.php
index 878c7b7..de27b0e 100644
--- a/tests/phpunit/includes/TwoColConflictPageTest.php
+++ b/tests/phpunit/includes/TwoColConflictPageTest.php
@@ -1,5 +1,7 @@
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I471a226de38d1dc7073dc4411466d43391d64497
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/TwoColConflict
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] mediawiki...Echo[master]: Switch TestingAccessWrapper to librarized version

2017-04-19 Thread Code Review
Gergő Tisza has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349104 )

Change subject: Switch TestingAccessWrapper to librarized version
..

Switch TestingAccessWrapper to librarized version

Change-Id: Ib5aeffb793cfd84201ca397a96689e0b81f3265f
---
M composer.json
M tests/phpunit/DiscussionParserTest.php
2 files changed, 3 insertions(+), 1 deletion(-)


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

diff --git a/composer.json b/composer.json
index e42e5e5..a102085 100644
--- a/composer.json
+++ b/composer.json
@@ -1,7 +1,8 @@
 {
"require-dev": {
"jakub-onderka/php-parallel-lint": "0.9.2",
-   "mediawiki/mediawiki-codesniffer": "0.7.1"
+   "mediawiki/mediawiki-codesniffer": "0.7.1",
+   "wikimedia/testing-access-wrapper": "~1.0"
},
"scripts": {
"test": [
diff --git a/tests/phpunit/DiscussionParserTest.php 
b/tests/phpunit/DiscussionParserTest.php
index a920ecf..f8d8163 100644
--- a/tests/phpunit/DiscussionParserTest.php
+++ b/tests/phpunit/DiscussionParserTest.php
@@ -1,6 +1,7 @@
 https://gerrit.wikimedia.org/r/349104
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib5aeffb793cfd84201ca397a96689e0b81f3265f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
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] mediawiki...CollaborationKit[master]: Switch TestingAccessWrapper to librarized version

2017-04-19 Thread Code Review
Gergő Tisza has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349103 )

Change subject: Switch TestingAccessWrapper to librarized version
..

Switch TestingAccessWrapper to librarized version

Change-Id: Ia65e26c03fed80bc7d15253b4527a8854b61ca2e
---
M composer.json
M tests/phpunit/CollaborationHubContentHandlerTest.php
M tests/phpunit/CollaborationHubContentTest.php
M tests/phpunit/CollaborationHubTOCTest.php
M tests/phpunit/CollaborationKitImageTest.php
M tests/phpunit/CollaborationListContentHandlerTest.php
M tests/phpunit/CollaborationListContentTest.php
7 files changed, 14 insertions(+), 1 deletion(-)


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

diff --git a/composer.json b/composer.json
index 9e0d685..25fad25 100644
--- a/composer.json
+++ b/composer.json
@@ -1,7 +1,8 @@
 {
"require-dev": {
"jakub-onderka/php-parallel-lint": "0.9.2",
-   "mediawiki/mediawiki-codesniffer": "0.7.2"
+   "mediawiki/mediawiki-codesniffer": "0.7.2",
+   "wikimedia/testing-access-wrapper": "~1.0"
},
"scripts": {
"test": [
diff --git a/tests/phpunit/CollaborationHubContentHandlerTest.php 
b/tests/phpunit/CollaborationHubContentHandlerTest.php
index 6ebce82..c3a93e1 100644
--- a/tests/phpunit/CollaborationHubContentHandlerTest.php
+++ b/tests/phpunit/CollaborationHubContentHandlerTest.php
@@ -1,5 +1,7 @@
 https://gerrit.wikimedia.org/r/349103
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia65e26c03fed80bc7d15253b4527a8854b61ca2e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CollaborationKit
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] mediawiki...LoginNotify[master]: Switch TestingAccessWrapper to librarized version

2017-04-19 Thread Code Review
Gergő Tisza has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349101 )

Change subject: Switch TestingAccessWrapper to librarized version
..

Switch TestingAccessWrapper to librarized version

Change-Id: I3bd4a725291c8d0d10ff002c481064fe67f8df39
---
M composer.json
M tests/phpunit/LoginNotifyTests.php
2 files changed, 4 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/LoginNotify 
refs/changes/01/349101/1

diff --git a/composer.json b/composer.json
index 3b67910..7652656 100644
--- a/composer.json
+++ b/composer.json
@@ -6,7 +6,8 @@
"description": "MediaWiki extension to notify users if someone tries to 
login to their account",
"require-dev": {
"jakub-onderka/php-parallel-lint": "0.9.2",
-   "mediawiki/mediawiki-codesniffer": "0.7.2"
+   "mediawiki/mediawiki-codesniffer": "0.7.2",
+   "wikimedia/testing-access-wrapper": "~1.0"
},
"scripts": {
"fix": "phpcbf",
diff --git a/tests/phpunit/LoginNotifyTests.php 
b/tests/phpunit/LoginNotifyTests.php
index 3438569..5abb187 100644
--- a/tests/phpunit/LoginNotifyTests.php
+++ b/tests/phpunit/LoginNotifyTests.php
@@ -1,5 +1,7 @@
 https://gerrit.wikimedia.org/r/349101
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3bd4a725291c8d0d10ff002c481064fe67f8df39
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/LoginNotify
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] mediawiki/core[master]: RCFilters UI: Unify li bullets with and without highlights

2017-04-19 Thread Mooeypoo (Code Review)
Mooeypoo has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349102 )

Change subject: RCFilters UI: Unify li bullets with and without highlights
..

RCFilters UI: Unify li bullets with and without highlights

Make sure that the placement of the texts under the bullets is
the same whether the highlight is on or off. Otherwise, the list
is shifting a bit to the right to make room for highlight 'bullets'
when we press the highlight key.

Bonus: Make sure the highlight container is only appended to each
bullet once, even if the process is called for more than once on
the same content.

Bug: T163275
Change-Id: I4c2cf6176d5129dd2bc37d2f58ed84e85aca8560
---
M 
resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.ChangesListWrapperWidget.less
M 
resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.ChangesListWrapperWidget.js
2 files changed, 11 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/02/349102/1

diff --git 
a/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.ChangesListWrapperWidget.less
 
b/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.ChangesListWrapperWidget.less
index 402f0ad..3337a03 100644
--- 
a/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.ChangesListWrapperWidget.less
+++ 
b/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.ChangesListWrapperWidget.less
@@ -12,12 +12,15 @@
}
}
 
+   ul {
+   // Each li's margin-left should be the width of the highlights
+   // element + the margin
+   margin-left: ~'calc( ( @{result-circle-diameter} + 
@{result-circle-margin} ) * 5 + @{result-circle-general-margin} )';
+   }
+
&-highlighted {
ul {
list-style: none;
-   // Each li's margin-left should be the width of the 
highlights
-   // element + the margin
-   margin-left: ~'calc( ( @{result-circle-diameter} + 
@{result-circle-margin} ) * 5 + @{result-circle-general-margin} )';
 
li {
list-style: none;
diff --git 
a/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.ChangesListWrapperWidget.js
 
b/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.ChangesListWrapperWidget.js
index c7e6961..f4a1807 100644
--- 
a/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.ChangesListWrapperWidget.js
+++ 
b/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.ChangesListWrapperWidget.js
@@ -148,6 +148,11 @@
.prop( 'data-color', 'none' )
);
 
+   if ( $( '.mw-rcfilters-ui-changesListWrapperWidget-highlights' 
).length ) {
+   // Already set up
+   return;
+   }
+
mw.rcfilters.HighlightColors.forEach( function ( color ) {
$highlights.append(
$( '' )

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...Wikibase[master]: Switch TestingAccessWrapper to librarized version

2017-04-19 Thread Code Review
Gergő Tisza has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349100 )

Change subject: Switch TestingAccessWrapper to librarized version
..

Switch TestingAccessWrapper to librarized version

Change-Id: Idfef4f40abca881bff373fbaa269a0d5c6eb88cf
---
M client/tests/phpunit/includes/Hooks/ChangesListSpecialPageHookHandlersTest.php
M client/tests/phpunit/includes/Hooks/MagicWordHookHandlersTest.php
M composer.json
3 files changed, 4 insertions(+), 3 deletions(-)


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

diff --git 
a/client/tests/phpunit/includes/Hooks/ChangesListSpecialPageHookHandlersTest.php
 
b/client/tests/phpunit/includes/Hooks/ChangesListSpecialPageHookHandlersTest.php
index aa51402..8b7b2a3 100644
--- 
a/client/tests/phpunit/includes/Hooks/ChangesListSpecialPageHookHandlersTest.php
+++ 
b/client/tests/phpunit/includes/Hooks/ChangesListSpecialPageHookHandlersTest.php
@@ -7,10 +7,10 @@
 use FormOptions;
 use IDatabase;
 use SpecialPageFactory;
-use TestingAccessWrapper;
 use User;
 use Wikibase\Client\Hooks\ChangesListSpecialPageHookHandlers;
 use Wikimedia\Rdbms\LoadBalancer;
+use Wikimedia\TestingAccessWrapper;
 
 /**
  * @covers Wikibase\Client\Hooks\ChangesListSpecialPageHookHandlers
diff --git a/client/tests/phpunit/includes/Hooks/MagicWordHookHandlersTest.php 
b/client/tests/phpunit/includes/Hooks/MagicWordHookHandlersTest.php
index b8a2637..8049ece 100644
--- a/client/tests/phpunit/includes/Hooks/MagicWordHookHandlersTest.php
+++ b/client/tests/phpunit/includes/Hooks/MagicWordHookHandlersTest.php
@@ -7,7 +7,7 @@
 use MediaWikiTestCase;
 use Parser;
 use Wikibase\SettingsArray;
-use TestingAccessWrapper;
+use Wikimedia\TestingAccessWrapper;
 
 /**
  * @covers Wikibase\Client\Hooks\MagicWordHookHandlers
diff --git a/composer.json b/composer.json
index 6c88971..a6e9b57 100644
--- a/composer.json
+++ b/composer.json
@@ -44,7 +44,8 @@
},
"require-dev": {
"jakub-onderka/php-parallel-lint": ">=0.3 <0.10",
-   "mediawiki/mediawiki-codesniffer": ">=0.4 <0.8"
+   "mediawiki/mediawiki-codesniffer": ">=0.4 <0.8",
+   "wikimedia/testing-access-wrapper": "~1.0"
},
"conflict": {
"mediawiki/mediawiki": "<1.25"

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idfef4f40abca881bff373fbaa269a0d5c6eb88cf
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
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] mediawiki...VisualEditor[master]: Fix logic for redirecting unsupported browsers to old editor

2017-04-19 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/348781 )

Change subject: Fix logic for redirecting unsupported browsers to old editor
..


Fix logic for redirecting unsupported browsers to old editor

Browsers that support JavaScript, but that get served a no-JS
experience by MediaWiki (for example, IE 6), would always get
redirected to an URL with =1 - even when it was unnecessary
because we're not in single-tab mode, and even when the form was
previously submitted, causing the loss of user input.

Follow-up to 188ec0f5d23c0daa55bdea1a019a6b9232fe411e.

Bug: T163226
Change-Id: I212baa0f4305559fa6f6abdfa230b76c122d4909
---
M VisualEditor.hooks.php
1 file changed, 7 insertions(+), 7 deletions(-)

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



diff --git a/VisualEditor.hooks.php b/VisualEditor.hooks.php
index 7982548..3ffe821 100644
--- a/VisualEditor.hooks.php
+++ b/VisualEditor.hooks.php
@@ -173,14 +173,14 @@
$titleMsg = $title->exists() ? 'editing' : 'creating';
$out->setPageTitle( wfMessage( $titleMsg, 
$title->getPrefixedText() ) );
$out->addWikiMsg( 'visualeditor-toload', wfExpandUrl( 
$url ) );
+   $out->addScript( Html::inlineScript(
+   "(window.NORLQ=window.NORLQ||[]).push(" .
+   "function(){" .
+   "location.href=\"$url\";" .
+   "}" .
+   ");"
+   ) );
}
-   $out->addScript( Html::inlineScript(
-   "(window.NORLQ=window.NORLQ||[]).push(" .
-   "function(){" .
-   "location.href=\"$url\";" .
-   "}" .
-   ");"
-   ) );
return $ret;
}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I212baa0f4305559fa6f6abdfa230b76c122d4909
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński 
Gerrit-Reviewer: Esanders 
Gerrit-Reviewer: Jforrester 
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] mediawiki...MobileFrontend[master]: Lead section edit icon should be visible when no-js editing ...

2017-04-19 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/347126 )

Change subject: Lead section edit icon should be visible when no-js editing is 
enabled
..


Lead section edit icon should be visible when no-js editing is enabled

Bug: T125174
Change-Id: I98a310af7d4eadb7a449983ed5a9c0d474b8f827
---
M includes/skins/SkinMinerva.php
M resources/skins.minerva.base.styles/pageactions.less
M resources/skins.minerva.base.styles/ui.less
3 files changed, 7 insertions(+), 3 deletions(-)

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



diff --git a/includes/skins/SkinMinerva.php b/includes/skins/SkinMinerva.php
index d3a87e0..c7b851a 100644
--- a/includes/skins/SkinMinerva.php
+++ b/includes/skins/SkinMinerva.php
@@ -220,7 +220,7 @@
$noJsEdit = $this->getMFConfig()->get( 
'MFAllowNonJavaScriptEditing' );
 
if ( $this->isAllowedPageAction( 'edit' ) ) {
-   $additionalClass = $noJsEdit?' nojs-edit':'';
+   $additionalClass = $noJsEdit ? ' nojs-edit': '';
$lang = wfGetLangObj( $lang );
$message = $this->msg( 'mobile-frontend-editor-edit' 
)->inLanguage( $lang )->text();
$html = Html::openElement( 'span' );
diff --git a/resources/skins.minerva.base.styles/pageactions.less 
b/resources/skins.minerva.base.styles/pageactions.less
index 368f7a8..86d8735 100644
--- a/resources/skins.minerva.base.styles/pageactions.less
+++ b/resources/skins.minerva.base.styles/pageactions.less
@@ -5,12 +5,16 @@
 
 // hide menu items when not possible to use
 .client-nojs #ca-watch,
-.client-nojs #ca-edit,
 #ca-talk.selected {
// Important as this is not negotiable.
display: none !important;
 }
 
+.client-nojs #ca-edit {
+   // This is negotiable as non-JS editing might be enabled.
+   display: none;
+}
+
 #page-actions .nojs-edit {
display: inline-block;
 }
diff --git a/resources/skins.minerva.base.styles/ui.less 
b/resources/skins.minerva.base.styles/ui.less
index efaed2d..190f417 100644
--- a/resources/skins.minerva.base.styles/ui.less
+++ b/resources/skins.minerva.base.styles/ui.less
@@ -423,7 +423,7 @@
 }
 
 .content .nojs-edit {
-   display: inline-block;
+   display: inline-block !important;
visibility: visible;
float: right;
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I98a310af7d4eadb7a449983ed5a9c0d474b8f827
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson 
Gerrit-Reviewer: Bartosz Dziewoński 
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: Jforrester 
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] mediawiki...EmailAuth[master]: Switch TestingAccessWrapper to librarized version

2017-04-19 Thread Code Review
Gergő Tisza has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349099 )

Change subject: Switch TestingAccessWrapper to librarized version
..

Switch TestingAccessWrapper to librarized version

Change-Id: Iffdd2a7d5dd28c9860e82ba92ec31f8b847b8ddf
---
M composer.json
M tests/phpunit/EmailAuthSecondaryAuthenticationProviderTest.php
2 files changed, 3 insertions(+), 2 deletions(-)


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

diff --git a/composer.json b/composer.json
index 98d41d9..8149d52 100644
--- a/composer.json
+++ b/composer.json
@@ -1,7 +1,8 @@
 {
"require-dev": {
"jakub-onderka/php-parallel-lint": "0.9.2",
-   "mediawiki/mediawiki-codesniffer": "0.7.2"
+   "mediawiki/mediawiki-codesniffer": "0.7.2",
+   "wikimedia/testing-access-wrapper": "~1.0"
},
"scripts": {
"fix": "phpcbf",
diff --git a/tests/phpunit/EmailAuthSecondaryAuthenticationProviderTest.php 
b/tests/phpunit/EmailAuthSecondaryAuthenticationProviderTest.php
index 635376e..6882742 100644
--- a/tests/phpunit/EmailAuthSecondaryAuthenticationProviderTest.php
+++ b/tests/phpunit/EmailAuthSecondaryAuthenticationProviderTest.php
@@ -9,8 +9,8 @@
 use MediaWikiTestCase;
 use PHPUnit_Framework_MockObject_MockObject;
 use Psr\Log\LoggerInterface;
-use TestingAccessWrapper;
 use User;
+use Wikimedia\TestingAccessWrapper;
 
 class EmailAuthSecondaryAuthenticationProviderTest extends MediaWikiTestCase  {
/** @var 
EmailAuthSecondaryAuthenticationProvider|PHPUnit_Framework_MockObject_MockObject
 */

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iffdd2a7d5dd28c9860e82ba92ec31f8b847b8ddf
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/EmailAuth
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] mediawiki...ConfirmEdit[master]: Switch TestingAccessWrapper to librarized version

2017-04-19 Thread Code Review
Gergő Tisza has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349098 )

Change subject: Switch TestingAccessWrapper to librarized version
..

Switch TestingAccessWrapper to librarized version

Change-Id: I7d262901f0ae66f20658516bad8aa2d8de3a40f7
---
M composer.json
M tests/phpunit/CaptchaPreAuthenticationProviderTest.php
2 files changed, 3 insertions(+), 1 deletion(-)


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

diff --git a/composer.json b/composer.json
index 4653c05..05020ef 100644
--- a/composer.json
+++ b/composer.json
@@ -1,7 +1,8 @@
 {
"require-dev": {
"jakub-onderka/php-parallel-lint": "0.9.2",
-   "mediawiki/mediawiki-codesniffer": "0.7.2"
+   "mediawiki/mediawiki-codesniffer": "0.7.2",
+   "wikimedia/testing-access-wrapper": "~1.0"
},
"scripts": {
"test": [
diff --git a/tests/phpunit/CaptchaPreAuthenticationProviderTest.php 
b/tests/phpunit/CaptchaPreAuthenticationProviderTest.php
index 03016e1..9997d8f 100644
--- a/tests/phpunit/CaptchaPreAuthenticationProviderTest.php
+++ b/tests/phpunit/CaptchaPreAuthenticationProviderTest.php
@@ -2,6 +2,7 @@
 
 use MediaWiki\Auth\AuthManager;
 use MediaWiki\Auth\UsernameAuthenticationRequest;
+use Wikimedia\TestingAccessWrapper;
 
 /**
  * @group Database

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7d262901f0ae66f20658516bad8aa2d8de3a40f7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ConfirmEdit
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] mediawiki...PageViewInfo[master]: Switch TestingAccessWrapper to librarized version

2017-04-19 Thread Code Review
Gergő Tisza has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349097 )

Change subject: Switch TestingAccessWrapper to librarized version
..

Switch TestingAccessWrapper to librarized version

Change-Id: I173dbfc75ccf17ffca0bf3666c92540c0446ceb2
---
M composer.json
M tests/phpunit/WikimediaPageViewServiceTest.php
M tests/smoke/WikimediaPageViewServiceSmokeTest.php
3 files changed, 8 insertions(+), 4 deletions(-)


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

diff --git a/composer.json b/composer.json
index 9e0d685..25fad25 100644
--- a/composer.json
+++ b/composer.json
@@ -1,7 +1,8 @@
 {
"require-dev": {
"jakub-onderka/php-parallel-lint": "0.9.2",
-   "mediawiki/mediawiki-codesniffer": "0.7.2"
+   "mediawiki/mediawiki-codesniffer": "0.7.2",
+   "wikimedia/testing-access-wrapper": "~1.0"
},
"scripts": {
"test": [
diff --git a/tests/phpunit/WikimediaPageViewServiceTest.php 
b/tests/phpunit/WikimediaPageViewServiceTest.php
index f9accba..ae092c0 100644
--- a/tests/phpunit/WikimediaPageViewServiceTest.php
+++ b/tests/phpunit/WikimediaPageViewServiceTest.php
@@ -2,6 +2,8 @@
 
 namespace MediaWiki\Extensions\PageViewInfo;
 
+use Wikimedia\TestingAccessWrapper;
+
 class WikimediaPageViewServiceTest extends \PHPUnit_Framework_TestCase {
/** @var [ \PHPUnit_Framework_MockObject_MockObject, callable ] */
protected $calls = [];
@@ -32,7 +34,7 @@
) {
$mock = $this->getMockBuilder( \MWHttpRequest::class 
)->disableOriginalConstructor()->getMock();
$this->calls[] = [ $mock, $assertUrl ];
-   $wrapper = \TestingAccessWrapper::newFromObject( $service );
+   $wrapper = TestingAccessWrapper::newFromObject( $service );
$wrapper->requestFactory = function ( $url ) {
if ( !$this->calls ) {
$this->fail( 'Unexpected call!' );
@@ -52,7 +54,7 @@
 * @param string $end -MM-DD
 */
protected function mockDate( WikimediaPageViewService $service, $end ) {
-   $wrapper = \TestingAccessWrapper::newFromObject( $service );
+   $wrapper = TestingAccessWrapper::newFromObject( $service );
$wrapper->lastCompleteDay = strtotime( $end . 'T00:00Z' );
$wrapper->range = null;
}
diff --git a/tests/smoke/WikimediaPageViewServiceSmokeTest.php 
b/tests/smoke/WikimediaPageViewServiceSmokeTest.php
index 3c47cc3..95a087e 100644
--- a/tests/smoke/WikimediaPageViewServiceSmokeTest.php
+++ b/tests/smoke/WikimediaPageViewServiceSmokeTest.php
@@ -4,6 +4,7 @@
 
 use Status;
 use StatusValue;
+use Wikimedia\TestingAccessWrapper;
 
 class WikimediaPageViewServiceSmokeTest extends \PHPUnit_Framework_TestCase {
protected $data;
@@ -86,7 +87,7 @@
 
public function testRequestError() {
$service = $this->getService();
-   $wrapper = \TestingAccessWrapper::newFromObject( $service );
+   $wrapper = TestingAccessWrapper::newFromObject( $service );
$wrapper->access = 'fail';
$logger = new \TestLogger( true, null, true );
$service->setLogger( $logger );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I173dbfc75ccf17ffca0bf3666c92540c0446ceb2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/PageViewInfo
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] mediawiki/core[master]: RCFilters UI: Change text for edit authorship group

2017-04-19 Thread Mooeypoo (Code Review)
Mooeypoo has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349096 )

Change subject: RCFilters UI: Change text for edit authorship group
..

RCFilters UI: Change text for edit authorship group

Bug: T149385
Change-Id: I96831b2a650eb0232013762675fb4c5bd325b6a9
---
M languages/i18n/en.json
1 file changed, 5 insertions(+), 5 deletions(-)


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

diff --git a/languages/i18n/en.json b/languages/i18n/en.json
index 6db8d10..95052a3 100644
--- a/languages/i18n/en.json
+++ b/languages/i18n/en.json
@@ -1386,11 +1386,11 @@
"rcfilters-filter-unregistered-label": "Unregistered",
"rcfilters-filter-unregistered-description": "Editors who aren’t logged 
in.",
"rcfilters-filter-unregistered-conflicts-user-experience-level": "This 
filter conflicts with the following Experience {{PLURAL:$2|filter|filters}}, 
which {{PLURAL:$2|finds|find}} only registered users: $1",
-   "rcfilters-filtergroup-authorship": "Edit authorship",
-   "rcfilters-filter-editsbyself-label": "Your own edits",
-   "rcfilters-filter-editsbyself-description": "Edits by you.",
-   "rcfilters-filter-editsbyother-label": "Edits by others",
-   "rcfilters-filter-editsbyother-description": "Edits created by other 
users (not you).",
+   "rcfilters-filtergroup-authorship": "Contribution authorship",
+   "rcfilters-filter-editsbyself-label": "Changes by you",
+   "rcfilters-filter-editsbyself-description": "Your own contributions.",
+   "rcfilters-filter-editsbyother-label": "Changes by others",
+   "rcfilters-filter-editsbyother-description": "All changes except your 
own.",
"rcfilters-filtergroup-userExpLevel": "Experience level (for registered 
users only)",
"rcfilters-filtergroup-user-experience-level-conflicts-unregistered": 
"Experience filters find only registered users, so this filter conflicts with 
the “Unregistered” filter.",

"rcfilters-filtergroup-user-experience-level-conflicts-unregistered-global": 
"The \"Unregistered\" filter conflicts with one or more Experience filters, 
which find registered users only. The conflicting filters are marked in the 
Active Filters area, above.",

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...Gadgets[master]: Switch TestingAccessWrapper to librarized version

2017-04-19 Thread Code Review
Gergő Tisza has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349095 )

Change subject: Switch TestingAccessWrapper to librarized version
..

Switch TestingAccessWrapper to librarized version

Change-Id: I493d9b28d2c0d265e003a9851746eb07c7d15770
---
M composer.json
M tests/phpunit/GadgetTest.php
2 files changed, 5 insertions(+), 1 deletion(-)


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

diff --git a/composer.json b/composer.json
index fa2d6cd..e5d972b 100644
--- a/composer.json
+++ b/composer.json
@@ -1,6 +1,7 @@
 {
"require-dev": {
-   "jakub-onderka/php-parallel-lint": "0.9.2"
+   "jakub-onderka/php-parallel-lint": "0.9.2",
+   "wikimedia/testing-access-wrapper": "~1.0"
},
"scripts": {
"test": [
diff --git a/tests/phpunit/GadgetTest.php b/tests/phpunit/GadgetTest.php
index 066f4ec..9f4b981 100644
--- a/tests/phpunit/GadgetTest.php
+++ b/tests/phpunit/GadgetTest.php
@@ -1,4 +1,7 @@
 https://gerrit.wikimedia.org/r/349095
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I493d9b28d2c0d265e003a9851746eb07c7d15770
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Gadgets
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] mediawiki...CentralAuth[master]: Switch TestingAccessWrapper to librarized version

2017-04-19 Thread Code Review
Gergő Tisza has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349094 )

Change subject: Switch TestingAccessWrapper to librarized version
..

Switch TestingAccessWrapper to librarized version

Change-Id: I498be3ceb219a8cf1cad88d5a510302a3510b70f
---
M composer.json
M tests/phpunit/CentralAuthPreAuthManagerHooksUsingDatabaseTest.php
M tests/phpunit/CentralAuthUserTest.php
3 files changed, 7 insertions(+), 1 deletion(-)


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

diff --git a/composer.json b/composer.json
index 1c63f9e..7ab41de 100644
--- a/composer.json
+++ b/composer.json
@@ -1,6 +1,7 @@
 {
"require-dev": {
-   "jakub-onderka/php-parallel-lint": "0.9.2"
+   "jakub-onderka/php-parallel-lint": "0.9.2",
+   "wikimedia/testing-access-wrapper": "~1.0"
},
"scripts": {
"test": [
diff --git a/tests/phpunit/CentralAuthPreAuthManagerHooksUsingDatabaseTest.php 
b/tests/phpunit/CentralAuthPreAuthManagerHooksUsingDatabaseTest.php
index a06ebb7..2fc2cca 100644
--- a/tests/phpunit/CentralAuthPreAuthManagerHooksUsingDatabaseTest.php
+++ b/tests/phpunit/CentralAuthPreAuthManagerHooksUsingDatabaseTest.php
@@ -1,4 +1,7 @@
 https://gerrit.wikimedia.org/r/349094
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I498be3ceb219a8cf1cad88d5a510302a3510b70f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CentralAuth
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] wikimedia...SmashPig[deployment]: Merge branch 'master' into deployment

2017-04-19 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/349091 )

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


Merge branch 'master' into deployment

78a7f28 Use upstream php-queue

Change-Id: I5e77fb3b476d693e962d143a89713b25658e49b8
---
M vendor
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/vendor b/vendor
index 1eba7bc..78cd2f8 16
--- a/vendor
+++ b/vendor
@@ -1 +1 @@
-Subproject commit 1eba7bc3eabdf4872d9d1757e56be2be6be24283
+Subproject commit 78cd2f889b1605017b067e188c94466ef8e2c15f

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5e77fb3b476d693e962d143a89713b25658e49b8
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/SmashPig
Gerrit-Branch: deployment
Gerrit-Owner: Ejegg 
Gerrit-Reviewer: Ejegg 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...MobileFrontend[master]: Switch TestingAccessWrapper to librarized version

2017-04-19 Thread Code Review
Gergő Tisza has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349093 )

Change subject: Switch TestingAccessWrapper to librarized version
..

Switch TestingAccessWrapper to librarized version

Change-Id: I794bed49858cb6d0793ea1100ecb7719f1e84a6a
---
M composer.json
M tests/phpunit/skins/SkinMinervaTest.php
2 files changed, 5 insertions(+), 4 deletions(-)


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

diff --git a/composer.json b/composer.json
index 4653c05..05020ef 100644
--- a/composer.json
+++ b/composer.json
@@ -1,7 +1,8 @@
 {
"require-dev": {
"jakub-onderka/php-parallel-lint": "0.9.2",
-   "mediawiki/mediawiki-codesniffer": "0.7.2"
+   "mediawiki/mediawiki-codesniffer": "0.7.2",
+   "wikimedia/testing-access-wrapper": "~1.0"
},
"scripts": {
"test": [
diff --git a/tests/phpunit/skins/SkinMinervaTest.php 
b/tests/phpunit/skins/SkinMinervaTest.php
index a692862..58535a3 100644
--- a/tests/phpunit/skins/SkinMinervaTest.php
+++ b/tests/phpunit/skins/SkinMinervaTest.php
@@ -4,10 +4,10 @@
 
 use MediaWikiTestCase;
 use OutputPage;
-use SkinMinerva;
-use TestingAccessWrapper;
-use Title;
 use RequestContext;
+use SkinMinerva;
+use Title;
+use Wikimedia\TestingAccessWrapper;
 
 /**
  * @covers SkinMinerva

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I794bed49858cb6d0793ea1100ecb7719f1e84a6a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
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] mediawiki/core[wmf/1.29.0-wmf.20]: resourceloader: Move mwNow() to after isCompatible()

2017-04-19 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/349085 )

Change subject: resourceloader: Move mwNow() to after isCompatible()
..


resourceloader: Move mwNow() to after isCompatible()

Follows-up f2fb4a21af. This is logically still the same point in time.
Only 1 function before it now, isCompatible(), which is fine since it
is small and the variable is not used anyway if it returns false.

Change-Id: I34bbe8edf6e9625f8d80f829707adafcb1b91980
(cherry picked from commit 7b2da95a9814beb05112ea2860433499967ab1b9)
---
M resources/src/startup.js
1 file changed, 7 insertions(+), 5 deletions(-)

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



diff --git a/resources/src/startup.js b/resources/src/startup.js
index ad06b34..e0df772 100644
--- a/resources/src/startup.js
+++ b/resources/src/startup.js
@@ -1,7 +1,8 @@
 /**
- * Code in this file MUST work on even the most ancient of browsers!
+ * This file is where we decide whether to initialise the Grade A run-time.
  *
- * This file is where we decide whether to initialise the modern run-time.
+ * - Beware: This file MUST parse without errors on even the most ancient of 
browsers!
+ * - Beware: Do not call mwNow before the isCompatible() check.
  */
 
 /* global mw, $VARS, $CODE */
@@ -18,9 +19,7 @@
function () { return Date.now(); };
}() ),
// eslint-disable-next-line no-unused-vars
-   mediaWikiLoadStart = mwNow();
-
-mwPerformance.mark( 'mwLoadStart' );
+   mediaWikiLoadStart;
 
 /**
  * See 
@@ -153,6 +152,9 @@
};
}
 
+   mediaWikiLoadStart = mwNow();
+   mwPerformance.mark( 'mwLoadStart' );
+
script = document.createElement( 'script' );
script.src = $VARS.baseModulesUri;
script.onload = script.onreadystatechange = function () {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I34bbe8edf6e9625f8d80f829707adafcb1b91980
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.29.0-wmf.20
Gerrit-Owner: Krinkle 
Gerrit-Reviewer: Jack Phoenix 
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] mediawiki...DonationInterface[master]: Switch TestingAccessWrapper to librarized version

2017-04-19 Thread Code Review
Gergő Tisza has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349092 )

Change subject: Switch TestingAccessWrapper to librarized version
..

Switch TestingAccessWrapper to librarized version

Change-Id: Iab1a2d6ec361eb282378df8de5126005942a870f
---
M composer.json
M tests/phpunit/Adapter/Adyen/AdyenTest.php
M tests/phpunit/Adapter/AstroPay/AstroPayTest.php
M tests/phpunit/Adapter/GatewayAdapterTest.php
M tests/phpunit/Adapter/GlobalCollect/GlobalCollectOrphanAdapterTest.php
M tests/phpunit/Adapter/GlobalCollect/GlobalCollectTest.php
M tests/phpunit/DonationInterfaceTestCase.php
M tests/phpunit/FraudFiltersTest.php
8 files changed, 16 insertions(+), 2 deletions(-)


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

diff --git a/composer.json b/composer.json
index d62654a..befeb83 100644
--- a/composer.json
+++ b/composer.json
@@ -35,7 +35,8 @@
"addshore/psr-6-mediawiki-bagostuff-adapter": "0.1"
},
"require-dev": {
-   "jakub-onderka/php-parallel-lint": "0.9.2"
+   "jakub-onderka/php-parallel-lint": "0.9.2",
+   "wikimedia/testing-access-wrapper": "~1.0"
},
"repositories": [
{
diff --git a/tests/phpunit/Adapter/Adyen/AdyenTest.php 
b/tests/phpunit/Adapter/Adyen/AdyenTest.php
index bc70637..137d256 100644
--- a/tests/phpunit/Adapter/Adyen/AdyenTest.php
+++ b/tests/phpunit/Adapter/Adyen/AdyenTest.php
@@ -15,6 +15,8 @@
  * GNU General Public License for more details.
  */
 
+use Wikimedia\TestingAccessWrapper;
+
 /**
  *
  * @group Fundraising
diff --git a/tests/phpunit/Adapter/AstroPay/AstroPayTest.php 
b/tests/phpunit/Adapter/AstroPay/AstroPayTest.php
index 7af0d9c..95d45a1 100644
--- a/tests/phpunit/Adapter/AstroPay/AstroPayTest.php
+++ b/tests/phpunit/Adapter/AstroPay/AstroPayTest.php
@@ -15,7 +15,9 @@
  * GNU General Public License for more details.
  *
  */
+
 use \Psr\Log\LogLevel;
+use Wikimedia\TestingAccessWrapper;
 
 /**
  *
diff --git a/tests/phpunit/Adapter/GatewayAdapterTest.php 
b/tests/phpunit/Adapter/GatewayAdapterTest.php
index ec58ebc..31181d4 100644
--- a/tests/phpunit/Adapter/GatewayAdapterTest.php
+++ b/tests/phpunit/Adapter/GatewayAdapterTest.php
@@ -16,6 +16,8 @@
  *
  */
 
+use Wikimedia\TestingAccessWrapper;
+
 /**
  * TODO: Test everything.
  * Make sure all the basic functions in the gateway_adapter are tested here.
diff --git 
a/tests/phpunit/Adapter/GlobalCollect/GlobalCollectOrphanAdapterTest.php 
b/tests/phpunit/Adapter/GlobalCollect/GlobalCollectOrphanAdapterTest.php
index 6682a87..64aa375 100644
--- a/tests/phpunit/Adapter/GlobalCollect/GlobalCollectOrphanAdapterTest.php
+++ b/tests/phpunit/Adapter/GlobalCollect/GlobalCollectOrphanAdapterTest.php
@@ -1,5 +1,4 @@
 https://gerrit.wikimedia.org/r/349092
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iab1a2d6ec361eb282378df8de5126005942a870f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DonationInterface
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] wikimedia...SmashPig[deployment]: Merge branch 'master' into deployment

2017-04-19 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349091 )

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

Merge branch 'master' into deployment

78a7f28 Use upstream php-queue

Change-Id: I5e77fb3b476d693e962d143a89713b25658e49b8
---
M vendor
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/SmashPig 
refs/changes/91/349091/1

diff --git a/vendor b/vendor
index 1eba7bc..78cd2f8 16
--- a/vendor
+++ b/vendor
@@ -1 +1 @@
-Subproject commit 1eba7bc3eabdf4872d9d1757e56be2be6be24283
+Subproject commit 78cd2f889b1605017b067e188c94466ef8e2c15f

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

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

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


[MediaWiki-commits] [Gerrit] wikimedia...vendor[master]: Update libs

2017-04-19 Thread Ejegg (Code Review)
Ejegg has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/349087 )

Change subject: Update libs
..


Update libs

PHP-Queue to upstream, add psr\cache

Change-Id: I8f491feeae755a6bb14543a75cda452762c39611
---
D coderkungfu/php-queue/.gitreview
M coderkungfu/php-queue/README.md
M coderkungfu/php-queue/composer.json
M coderkungfu/php-queue/demo/queues/BeanstalkSampleQueue.php
M coderkungfu/php-queue/demo/runners/README.md
M coderkungfu/php-queue/src/PHPQueue/Backend/Beanstalkd.php
M coderkungfu/php-queue/src/PHPQueue/Backend/IronMQ.php
M coderkungfu/php-queue/src/PHPQueue/Backend/Memcache.php
M coderkungfu/php-queue/src/PHPQueue/Backend/MongoDB.php
M coderkungfu/php-queue/src/PHPQueue/Backend/PDO.php
M coderkungfu/php-queue/src/PHPQueue/Backend/Predis.php
M coderkungfu/php-queue/src/PHPQueue/Backend/Stomp.php
D coderkungfu/php-queue/src/PHPQueue/Interfaces/IndexedFifoQueueStore.php
D coderkungfu/php-queue/src/PHPQueue/Interfaces/KeyValueStore.php
M coderkungfu/php-queue/test/PHPQueue/Backend/PredisTest.php
D coderkungfu/php-queue/test/PHPQueue/Backend/PredisZsetTest.php
M composer/autoload_psr4.php
M composer/autoload_static.php
M composer/installed.json
A psr/cache/CHANGELOG.md
A psr/cache/LICENSE.txt
A psr/cache/README.md
A psr/cache/composer.json
A psr/cache/src/CacheException.php
A psr/cache/src/CacheItemInterface.php
A psr/cache/src/CacheItemPoolInterface.php
A psr/cache/src/InvalidArgumentException.php
27 files changed, 450 insertions(+), 432 deletions(-)

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



diff --git a/coderkungfu/php-queue/.gitreview b/coderkungfu/php-queue/.gitreview
deleted file mode 100644
index ffb389a..000
--- a/coderkungfu/php-queue/.gitreview
+++ /dev/null
@@ -1,6 +0,0 @@
-[gerrit]
-host=gerrit.wikimedia.org
-port=29418
-project=wikimedia/fundraising/php-queue.git
-defaultbranch=master
-defaultrebase=0
diff --git a/coderkungfu/php-queue/README.md b/coderkungfu/php-queue/README.md
index c69cef1..74ff0e7 100644
--- a/coderkungfu/php-queue/README.md
+++ b/coderkungfu/php-queue/README.md
@@ -1,4 +1,4 @@
-#PHP-Queue#
+# PHP-Queue #
 [![Gitter](https://badges.gitter.im/Join 
Chat.svg)](https://gitter.im/CoderKungfu/php-queue?utm_source=badge_medium=badge_campaign=pr-badge_content=badge)
 
 A unified front-end for different queuing backends. Includes a REST server, 
CLI interface and daemon runners.
@@ -190,16 +190,6 @@
 * FifoQueueStore
 
 A first in first out queue accessed by push and pop.
-
-* IndexedFifoQueueStore
-
-Messages are indexed along one column as they are pushed into a FIFO queue,
-otherwise these behave like FifoQueueStore. clear() deletes records by index.
-There is no get() operation, you'll need a KeyValueStore for that.
-
-* KeyValueStore
-
-Jobs can be retrieved and deleted by their index.
 
 ---
 ## License ##
diff --git a/coderkungfu/php-queue/composer.json 
b/coderkungfu/php-queue/composer.json
index f75d7ef..085c069 100644
--- a/coderkungfu/php-queue/composer.json
+++ b/coderkungfu/php-queue/composer.json
@@ -23,21 +23,19 @@
 "clio/clio": "0.1.*"
 },
 "require-dev": {
-"jakub-onderka/php-parallel-lint": "0.9",
-"phpunit/phpunit": "4.4.*"
-},
-"scripts": {
-"test": [
-"parallel-lint . --exclude vendor",
-"phpunit"
-]
+"mrpoundsign/pheanstalk-5.3": "dev-master",
+"aws/aws-sdk-php": "dev-master",
+"amazonwebservices/aws-sdk-for-php": "dev-master",
+"predis/predis": "1.*",
+"iron-io/iron_mq": "dev-master",
+"ext-memcache": "*",
+"microsoft/windowsazure": "dev-master"
 },
 "suggest": {
 "predis/predis": "For Redis backend support",
 "mrpoundsign/pheanstalk-5.3": "For Beanstalkd backend support",
 "aws/aws-sdk-php": "For AWS SQS backend support",
 "amazonwebservices/aws-sdk-for-php": "For AWS SQS backend support 
(legacy version)",
-"ext-memcache": "*",
 "pecl-mongodb": "For MongoDB backend support",
 "clio/clio": "Support for daemonizing PHP CLI runner",
 "iron-io/iron_mq": "For IronMQ backend support",
diff --git a/coderkungfu/php-queue/demo/queues/BeanstalkSampleQueue.php 
b/coderkungfu/php-queue/demo/queues/BeanstalkSampleQueue.php
index 158f339..9335e4f 100644
--- a/coderkungfu/php-queue/demo/queues/BeanstalkSampleQueue.php
+++ b/coderkungfu/php-queue/demo/queues/BeanstalkSampleQueue.php
@@ -19,10 +19,10 @@
 );
 }
 
-public function addJob($newJob = null)
+public function addJob($newJob = null, $DEFAULT_PRIORITY=1024, 
$DEFAULT_DELAY=0, $DEFAULT_TTR=60)
 {
 $formatted_data = array('worker'=>$this->queueWorker, 'data'=>$newJob);
-$this->dataSource->add($formatted_data);
+$this->dataSource->add($formatted_data, $DEFAULT_PRIORITY, 
$DEFAULT_DELAY, $DEFAULT_TTR);
 
 return true;

[MediaWiki-commits] [Gerrit] oojs/ui[master]: MediaWiki theme: Increase contrast slightly on non-primary, ...

2017-04-19 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/349027 )

Change subject: MediaWiki theme: Increase contrast slightly on non-primary, 
destructive buttons
..


MediaWiki theme: Increase contrast slightly on non-primary, destructive buttons

Make them conform to WCAG 2.0 level AA by using adapted shade of Red50 `#d33`.

Change-Id: Ibcffd71fd1200b1987931135d3441db689d0dcd4
---
M src/themes/mediawiki/common.less
M src/themes/mediawiki/elements.less
2 files changed, 2 insertions(+), 1 deletion(-)

Approvals:
  Bartosz Dziewoński: Looks good to me, but someone else must approve
  jenkins-bot: Verified
  Jforrester: Looks good to me, approved



diff --git a/src/themes/mediawiki/common.less b/src/themes/mediawiki/common.less
index 49cf417..0907636 100644
--- a/src/themes/mediawiki/common.less
+++ b/src/themes/mediawiki/common.less
@@ -27,6 +27,7 @@
 
 @background-color-destructive: #fbe8e7; // equals `fade( @color-destructive, 
10% )`
 @color-destructive: #d33; // equals HSB 360°/77%/87%
+@color-destructive-non-primary: #d7; // Exemption for non-primary buttons, 
foremost used in VE, lightened up R50 to align to AA contrast ratio
 @color-destructive-hover: #ff4242; // equals HSB 360°/74%/100%
 @color-destructive-active: #b32424; // equals HSB 360°/80%/70%
 @color-destructive-focus: @color-destructive;
diff --git a/src/themes/mediawiki/elements.less 
b/src/themes/mediawiki/elements.less
index ff51236..24c79cb 100644
--- a/src/themes/mediawiki/elements.less
+++ b/src/themes/mediawiki/elements.less
@@ -326,7 +326,7 @@
}
 
&-destructive {
-   .mw-framed-button-colored( 
~'.oo-ui-buttonElement-button', @color-destructive, 
@background-color-framed-hover, @border-color-framed-destructive-hover, 
@color-destructive-active, @color-destructive-focus );
+   .mw-framed-button-colored( 
~'.oo-ui-buttonElement-button', @color-destructive-non-primary, 
@background-color-framed-hover, @border-color-framed-destructive-hover, 
@color-destructive-active, @color-destructive-focus );
}
}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibcffd71fd1200b1987931135d3441db689d0dcd4
Gerrit-PatchSet: 1
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: VolkerE 
Gerrit-Reviewer: Bartosz Dziewoński 
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] mediawiki...MobileFrontend[master]: Switch TestingAccessWrapper to librarized version

2017-04-19 Thread Code Review
Gergő Tisza has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349090 )

Change subject: Switch TestingAccessWrapper to librarized version
..

Switch TestingAccessWrapper to librarized version

Change-Id: I28a7200f44bfce8f0993f1adfc764a82ddda5115
---
M composer.json
M tests/phpunit/skins/SkinMinervaTest.php
2 files changed, 5 insertions(+), 4 deletions(-)


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

diff --git a/composer.json b/composer.json
index 4653c05..05020ef 100644
--- a/composer.json
+++ b/composer.json
@@ -1,7 +1,8 @@
 {
"require-dev": {
"jakub-onderka/php-parallel-lint": "0.9.2",
-   "mediawiki/mediawiki-codesniffer": "0.7.2"
+   "mediawiki/mediawiki-codesniffer": "0.7.2",
+   "wikimedia/testing-access-wrapper": "~1.0"
},
"scripts": {
"test": [
diff --git a/tests/phpunit/skins/SkinMinervaTest.php 
b/tests/phpunit/skins/SkinMinervaTest.php
index a692862..58535a3 100644
--- a/tests/phpunit/skins/SkinMinervaTest.php
+++ b/tests/phpunit/skins/SkinMinervaTest.php
@@ -4,10 +4,10 @@
 
 use MediaWikiTestCase;
 use OutputPage;
-use SkinMinerva;
-use TestingAccessWrapper;
-use Title;
 use RequestContext;
+use SkinMinerva;
+use Title;
+use Wikimedia\TestingAccessWrapper;
 
 /**
  * @covers SkinMinerva

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I28a7200f44bfce8f0993f1adfc764a82ddda5115
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
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] mediawiki/core[master]: Remove load array indexes from LoadBalancer errors

2017-04-19 Thread Aaron Schulz (Code Review)
Aaron Schulz has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349089 )

Change subject: Remove load array indexes from LoadBalancer errors
..

Remove load array indexes from LoadBalancer errors

This are not very useful and where not using SPI interpolation either.

Change-Id: Ia3a33da3a4593fbcba59b21f5b5028860752ce09
---
M includes/libs/rdbms/loadbalancer/LoadBalancer.php
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/89/349089/1

diff --git a/includes/libs/rdbms/loadbalancer/LoadBalancer.php 
b/includes/libs/rdbms/loadbalancer/LoadBalancer.php
index 1202831..e2fbf72 100644
--- a/includes/libs/rdbms/loadbalancer/LoadBalancer.php
+++ b/includes/libs/rdbms/loadbalancer/LoadBalancer.php
@@ -269,11 +269,11 @@
$host = $this->getServerName( $i );
if ( $lag === false && !is_infinite( 
$maxServerLag ) ) {
$this->replLogger->error(
-   "Server {host} (#$i) is not 
replicating?", [ 'host' => $host ] );
+   "Server {host} is not 
replicating?", [ 'host' => $host ] );
unset( $loads[$i] );
} elseif ( $lag > $maxServerLag ) {
$this->replLogger->warning(
-   "Server {host} (#$i) has {lag} 
seconds of lag (>= {maxlag})",
+   "Server {host} has {lag} 
seconds of lag (>= {maxlag})",
[ 'host' => $host, 'lag' => 
$lag, 'maxlag' => $maxServerLag ]
);
unset( $loads[$i] );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia3a33da3a4593fbcba59b21f5b5028860752ce09
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz 

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


  1   2   3   4   >