[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: db-eqiad.php: Set commonswiki on read only

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

Change subject: db-eqiad.php: Set commonswiki on read only
..


db-eqiad.php: Set commonswiki on read only

There is a maintenance scheduled Oct Wed 11th from 6AM UTC to 6:30AM
UTC.

https://commons.wikimedia.org/wiki/Commons:Village_pump#Read-only_Commons_in_preparation_for_3D_file_support_-_11_October

Bug: T176883
Change-Id: I3ee4be0ae33c7bfc3086d44982e8a1bbb67c013b
---
M wmf-config/db-eqiad.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php
index 0851e1c..c7bc917 100644
--- a/wmf-config/db-eqiad.php
+++ b/wmf-config/db-eqiad.php
@@ -682,7 +682,7 @@
# 's1'  => 'This request is served by a passive datacenter. If you 
see this something is really wrong.',
# 's2'  => 'This request is served by a passive datacenter. If you 
see this something is really wrong.',
# 'DEFAULT' => 'This request is served by a passive datacenter. If you 
see this something is really wrong.', # s3
-   # 's4'  => 'This request is served by a passive datacenter. If you 
see this something is really wrong.',
+'s4'  => 'There is a maintenance scheduled from 6AM UTC until 6:30 
UTC Wednesday 11th Oct: 
https://commons.wikimedia.org/wiki/Commons:Village_pump#Read-only_Commons_in_preparation_for_3D_file_support_-_11_October',
# 's5'  => 'This request is served by a passive datacenter. If you 
see this something is really wrong.',
# 's6'  => 'This request is served by a passive datacenter. If you 
see this something is really wrong.',
# 's7'  => 'This request is served by a passive datacenter. If you 
see this something is really wrong.',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3ee4be0ae33c7bfc3086d44982e8a1bbb67c013b
Gerrit-PatchSet: 7
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Marostegui 
Gerrit-Reviewer: Jcrespo 
Gerrit-Reviewer: Marostegui 
Gerrit-Reviewer: Urbanecm 
Gerrit-Reviewer: Zoranzoki21 
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...civicrm[master]: CRM-21294 Fix js error on dedupe find screen.

2017-10-10 Thread Eileen (Code Review)
Eileen has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/383501 )

Change subject: CRM-21294 Fix js error on dedupe find screen.
..

CRM-21294 Fix js error on dedupe find screen.

This is an error on selecting & unselecting contacts on the merge screen.
A js error was causing selection issues.

Bug: T177873
Change-Id: Iaa24a54647b79c8700473e49e9371e51f5134e10
---
M templates/CRM/Contact/Page/DedupeFind.tpl
1 file changed, 5 insertions(+), 3 deletions(-)


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

diff --git a/templates/CRM/Contact/Page/DedupeFind.tpl 
b/templates/CRM/Contact/Page/DedupeFind.tpl
index df90aa0..43002b1 100644
--- a/templates/CRM/Contact/Page/DedupeFind.tpl
+++ b/templates/CRM/Contact/Page/DedupeFind.tpl
@@ -189,7 +189,7 @@
 }
 // for action column at the last, set nowrap
 $('td:last', row).attr('nowrap','nowrap');
-// for conflcts column
+// for conflicts column
 var col = CRM.$('table#dupePairs thead 
th.crm-contact-conflicts').index();
 $('td:eq(' + col + ')', row).attr('nowrap','nowrap');
   }
@@ -334,8 +334,10 @@
 else {
   var id = [];
   CRM.$(element).each(function() {
-var sth = CRM.$('input.crm-dedupe-select', this);
-id.push(CRM.$(sth).prop('name').substr(5));
+var pnName = CRM.$('input.crm-dedupe-select', this).prop('name');
+if (pnName !== undefined) {
+  id.push(pnName.substr(5));
+}
   });
   var is_selected = CRM.$('.crm-dedupe-select-all').prop('checked') ? 1 : 
0;
 }

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...WikiEditor[master]: Show invalidreason from API response on invalid title

2017-10-10 Thread Fomafix (Code Review)
Fomafix has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/383500 )

Change subject: Show invalidreason from API response on invalid title
..

Show invalidreason from API response on invalid title

Bug: T99547
Change-Id: I34372e054e509732b008875260ba5c5e0248e551
---
M modules/jquery.wikiEditor.dialogs.config.js
1 file changed, 19 insertions(+), 7 deletions(-)


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

diff --git a/modules/jquery.wikiEditor.dialogs.config.js 
b/modules/jquery.wikiEditor.dialogs.config.js
index ccbcead..ecb529c 100644
--- a/modules/jquery.wikiEditor.dialogs.config.js
+++ b/modules/jquery.wikiEditor.dialogs.config.js
@@ -115,7 +115,7 @@
}
 
// Updates the status indicator 
above the target link
-   function updateWidget( status ) 
{
+   function updateWidget( status, 
reason ) {
$( 
'#wikieditor-toolbar-link-int-target-status' ).children().hide();
$( 
'#wikieditor-toolbar-link-int-target' ).parent()
.removeClass(
@@ -129,6 +129,13 @@
$( 
'.ui-dialog:visible .ui-dialog-buttonpane button:first' )
.prop( 
'disabled', true )

.addClass( 'disabled' );
+   if ( reason ) {
+   $( 
'#wikieditor-toolbar-link-int-target-status-invalid' ).html( reason );
+   } else {
+   $( 
'#wikieditor-toolbar-link-int-target-status-invalid' )
+   .text( 
mw.msg( 'wikieditor-toolbar-tool-link-int-target-status-invalid' ) )
+   }
+
} else {
$( 
'.ui-dialog:visible .ui-dialog-buttonpane button:first' )
.prop( 
'disabled', false )
@@ -142,7 +149,8 @@
// Abort previous 
request
var request = $( 
'#wikieditor-toolbar-link-int-target-status' ).data( 'request' ),
target = $( 
'#wikieditor-toolbar-link-int-target' ).val(),
-   cache = $( 
'#wikieditor-toolbar-link-int-target-status' ).data( 'existencecache' );
+   cache = $( 
'#wikieditor-toolbar-link-int-target-status' ).data( 'existencecache' ),
+   reasoncache = 
$( '#wikieditor-toolbar-link-int-target-status' ).data( 'reasoncache' );
// ensure the internal 
parameter is a boolean
if ( internal !== true 
) {
internal = 
false;
@@ -151,7 +159,7 @@
request.abort();
}
if ( hasOwn.call( 
cache, target ) ) {
-   updateWidget( 
cache[ target ] );
+   updateWidget( 
cache[ target ], reasoncache[ target ] );
return;
}
if ( target.replace( 
/^\s+$/, '' ) === '' ) {
@@ -184,9 +192,11 @@
action: 
'query',
prop: 
'pageprops',
titles: 
target,
-   ppprop: 
'disambiguation'
+   ppprop: 

[MediaWiki-commits] [Gerrit] mediawiki/vagrant[master]: Simplify setup.{bat, sh}

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

Change subject: Simplify setup.{bat,sh}
..


Simplify setup.{bat,sh}

The complexity of finding the Vagrant ruby interpreter and running
custom ruby code is unnecessary since we switched from full plugin
install to sideloading in c8ca590 and stopped installing external
plugins. Instead we can just call `vagrant config --required`.

This change was prompted by a report on irc that the
"..\..\embedded\bin\ruby.exe" path is invalid with the latest version of
Vagrant for windows.

Bug: T171380
Change-Id: I161be221ff1c51eae029c0897d20de7a3271b7ad
---
M .rubocop_todo.yml
D lib/mediawiki-vagrant/setup.rb
M setup.bat
M setup.sh
D support/setup.rb
5 files changed, 8 insertions(+), 132 deletions(-)

Approvals:
  Brion VIBBER: Looks good to me, but someone else must approve
  BryanDavis: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml
index ec446ba..87348c8 100644
--- a/.rubocop_todo.yml
+++ b/.rubocop_todo.yml
@@ -62,7 +62,6 @@
   Exclude:
 - 'lib/mediawiki-vagrant/environment.rb'
 - 'lib/mediawiki-vagrant/roles/list.rb'
-- 'lib/mediawiki-vagrant/setup.rb'
 
 # Offense count: 1
 # Configuration parameters: Methods.
diff --git a/lib/mediawiki-vagrant/setup.rb b/lib/mediawiki-vagrant/setup.rb
deleted file mode 100644
index 9592279..000
--- a/lib/mediawiki-vagrant/setup.rb
+++ /dev/null
@@ -1,89 +0,0 @@
-require 'English'
-require 'optparse'
-require 'rubygems'
-
-module MediaWikiVagrant
-  # Assists with the setup of MediaWiki-Vagrant.
-  #
-  # Provides an interactive set of prompts for configuration of required
-  # settings.
-  #
-  class Setup
-class ExecutionError < RuntimeError
-  attr_reader :command, :status
-
-  def initialize(command, status)
-@command = command
-@status = status
-  end
-
-  def to_s
-"Failed to execute command `#{command}` (#{status})"
-  end
-end
-
-attr_reader :directory, :options
-
-# Creates a new setup runner from the given command-line invocation.
-#
-def initialize(invocation)
-  @silent = false
-  @directory = File.expand_path('..', invocation)
-
-  @options = OptionParser.new do |parser|
-parser.banner = "Usage: #{invocation}"
-
-parser.on('-s', '--silent', 'Run silently with no prompts or output') 
do
-  @silent = true
-end
-
-parser.on_tail('-h', '--help', 'Show this help message.') do
-  puts parser
-  exit
-end
-  end
-end
-
-# Prompt the user to configure any required settings.
-#
-def run
-  @options.parse!
-
-  # Configure required settings
-  configure_settings unless @silent
-
-  notify "\nYou're all set! Simply run `vagrant up` to boot your new 
environment."
-  notify "\n(Or try `vagrant config --list` to see what else you can 
tweak.)"
-end
-
-private
-
-# Prompts the user to configure required settings.
-#
-def configure_settings
-  vagrant('config', '--required') { |pipe| pipe.each_char { |c| print c } }
-end
-
-# Outputs the given message at the given indentation level unless we're
-# operating in silent mode.
-#
-def notify(message_or_io, level = 0)
-  unless @silent
-prefix = ('-' * level) + (level > 0 ? ' ' : '')
-message_or_io.each_line { |line| puts "#{prefix}#{line}" }
-  end
-end
-
-# Executes the vagrant commands with the given arguments.
-#
-def vagrant(*args, )
-  command = ['vagrant'] + args
-  blk ||= proc { |pipe| notify pipe, 1 }
-
-  result = IO.popen(command, err: [:child, :out], )
-  raise ExecutionError.new(command.join(' '), $CHILD_STATUS) unless 
$CHILD_STATUS.success?
-
-  result
-end
-  end
-end
diff --git a/setup.bat b/setup.bat
index a921499..272ed88 100644
--- a/setup.bat
+++ b/setup.bat
@@ -1,7 +1,5 @@
 @echo off
 
-rem Finds the Ruby embedded with Vagrant and executes setup.rb
-
 where /q vagrant.exe
 
 if errorlevel 1 (
@@ -12,6 +10,8 @@
 exit /b 1
 )
 
-for /f "tokens=*" %%F in ('where vagrant.exe') do set vagrant=%%F
+vagrant config --required
 
-"%vagrant%\..\..\embedded\bin\ruby.exe" "%~dp0\support\setup.rb" "%0" %*
+echo.
+echo "You're all set! Simply run `vagrant up` to boot your new environment."
+echo "(Or try `vagrant config --list` to see what else you can tweak.)"
diff --git a/setup.sh b/setup.sh
index 2a09f6a..7cd91a6 100755
--- a/setup.sh
+++ b/setup.sh
@@ -1,7 +1,4 @@
 #!/usr/bin/env bash
-#
-# Executes setup.rb using the Ruby bundled with Vagrant.
-#
 
 if ! which vagrant > /dev/null; then
 echo "Vagrant doesn't seem to be installed. Please download and install it"
@@ -9,22 +6,8 @@
 exit 1
 fi
 
-# These paths assume Vagrant was installed from the vendor-supplied packages
-if [ "$(uname)" 

[MediaWiki-commits] [Gerrit] operations/puppet[production]: db1068: Update socket path

2017-10-10 Thread Marostegui (Code Review)
Marostegui has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/382380 )

Change subject: db1068: Update socket path
..


db1068: Update socket path

db1068 (s4 master) will be stopped for a maintenance.
Update its socket path location

Bug: T168661
Change-Id: Ic36838849b9d1e8026bb94f394879d9a696114ea
---
M hieradata/hosts/db1068.yaml
1 file changed, 0 insertions(+), 1 deletion(-)

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



diff --git a/hieradata/hosts/db1068.yaml b/hieradata/hosts/db1068.yaml
index 196962b..a816436 100644
--- a/hieradata/hosts/db1068.yaml
+++ b/hieradata/hosts/db1068.yaml
@@ -1,4 +1,3 @@
 mariadb::shard: 's4'
 mariadb::mysql_role: 'master'
 mariadb::binlog_format: 'STATEMENT'
-mariadb::socket: '/tmp/mysql.sock'

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic36838849b9d1e8026bb94f394879d9a696114ea
Gerrit-PatchSet: 5
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Marostegui 
Gerrit-Reviewer: Giuseppe Lavagetto 
Gerrit-Reviewer: Marostegui 
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/vagrant[master]: Check for new vagrant ruby.exe location on Windows

2017-10-10 Thread Brion VIBBER (Code Review)
Brion VIBBER has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/383499 )

Change subject: Check for new vagrant ruby.exe location on Windows
..

Check for new vagrant ruby.exe location on Windows

Vagrant for Windows has moved ruby.exe to its mingw64 subdir,
breaking the setup.bat call. Definitely broken in 1.9.7 and 2.0.0.

Adds a check for the old location, and if not present tries the
new location instead.

Bug: T171380
Change-Id: Ib34569e12cd0bfe6adce58eb2a902f2354be1f14
---
M setup.bat
1 file changed, 5 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant 
refs/changes/99/383499/1

diff --git a/setup.bat b/setup.bat
index a921499..ed00b14 100644
--- a/setup.bat
+++ b/setup.bat
@@ -14,4 +14,8 @@
 
 for /f "tokens=*" %%F in ('where vagrant.exe') do set vagrant=%%F
 
-"%vagrant%\..\..\embedded\bin\ruby.exe" "%~dp0\support\setup.rb" "%0" %*
+if exist "%vagrant%\..\..\embedded\bin\ruby.exe" (
+  "%vagrant%\..\..\embedded\bin\ruby.exe" "%~dp0\support\setup.rb" "%0" %*
+) else (
+  "%vagrant%\..\..\embedded\mingw64\bin\ruby.exe" "%~dp0\support\setup.rb" 
"%0" %*
+)

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib34569e12cd0bfe6adce58eb2a902f2354be1f14
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: master
Gerrit-Owner: Brion VIBBER 

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


[MediaWiki-commits] [Gerrit] mediawiki...deploy[master]: Update cxserver to 273b515

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

Change subject: Update cxserver to 273b515
..


Update cxserver to 273b515

List of changes:
1ab0b30 MT: Abstract the  wrapping of content from API usage
096fe16 [BREAKING CHANGE] Return full HTML document in segmentedContent
3629581 Add Catalan-Sardinian language pair for Apertium MT
5ab8917 Avoid using parseInt
b52b629 Update Node.js dependency
85c0ead Fix single-line eslint exceptions
f3d7cca Fix eslint path: tests -> test
acdde42 Remove eslint exceptions and make pass
ccf606a Add Crimean Tatar-Turkish language pair to Apertium MT
3283d58 Reference: Remove wrapping of reference body
868da7f Adapt template names if present in Wikidata
90e3d1c Avoid hardcoding wikipedia.org domain for APIs
e6f308b MWLink: Be selective in which title info fields we pass on
c7def6a AdaptationTest: Actually test that the output is correct
9c3a8a9 Update MT defaults for sc and it
6d0ad3c Update express to 4.16
43da799 Reference adaptation: Add a check for mt service
bb15b3c Add utility binary adapt
dcc1df4 MWImage: Fix js error when textchunk is \n with no tags
9f97c85 Adaptation tests: Do assertions on structured data
610a206 Make bin/apertium-xhtml a generic mt testing utility
822278a Adapter#getAdapter: Do not ignore mismatch with explicit tags and rdfa
15986b4 Include scripts in bin folder for eslint and make it pass tests
e9b63e2 Template adaptation: Implement template param name matching
dd21890 Templates: If templatedata not found, try to extract info from source 
code
a15acdf Matxin MT: Use an API key to access the service
7640360 Refactor the API router to ES6 class
ab13f80 Implement TemplateParameterMapper.getAdaptedParameters
bcee0b8 Add a test case for multi-part template
xxx Update node module dependencies

Change-Id: I06468b6e952de12263bfccff760159ef8ba079f8
---
M node_modules/accepts/package.json
M node_modules/ajv/dist/ajv.min.js
M node_modules/ajv/package.json
M node_modules/bluebird/js/browser/bluebird.core.js
M node_modules/bluebird/js/browser/bluebird.core.min.js
M node_modules/bluebird/js/browser/bluebird.js
M node_modules/bluebird/js/browser/bluebird.min.js
M node_modules/bluebird/js/release/debuggability.js
M node_modules/bluebird/js/release/promise.js
M node_modules/bluebird/js/release/util.js
M node_modules/bluebird/package.json
M node_modules/body-parser/lib/read.js
M node_modules/body-parser/package.json
M node_modules/bytes/package.json
M node_modules/compressible/package.json
D node_modules/compression/node_modules/bytes/LICENSE
D node_modules/compression/node_modules/bytes/index.js
D node_modules/compression/node_modules/bytes/package.json
M node_modules/compression/package.json
M node_modules/debug/component.json
M node_modules/debug/package.json
A node_modules/debug/src/inspector-log.js
M node_modules/debug/src/node.js
M node_modules/etag/package.json
M node_modules/express/lib/application.js
M node_modules/express/lib/express.js
M node_modules/express/lib/request.js
M node_modules/express/lib/response.js
M node_modules/express/lib/router/index.js
M node_modules/express/lib/router/route.js
M node_modules/express/lib/utils.js
M node_modules/express/lib/view.js
D node_modules/express/node_modules/qs/.editorconfig
D node_modules/express/node_modules/qs/.eslintignore
D node_modules/express/node_modules/qs/.eslintrc
D node_modules/express/node_modules/qs/LICENSE
D node_modules/express/node_modules/qs/dist/qs.js
D node_modules/express/node_modules/qs/lib/formats.js
D node_modules/express/node_modules/qs/lib/index.js
D node_modules/express/node_modules/qs/lib/parse.js
D node_modules/express/node_modules/qs/lib/stringify.js
D node_modules/express/node_modules/qs/lib/utils.js
D node_modules/express/node_modules/qs/package.json
D node_modules/express/node_modules/qs/test/.eslintrc
D node_modules/express/node_modules/qs/test/index.js
D node_modules/express/node_modules/qs/test/parse.js
D node_modules/express/node_modules/qs/test/stringify.js
D node_modules/express/node_modules/qs/test/utils.js
A node_modules/express/node_modules/setprototypeof/LICENSE
A node_modules/express/node_modules/setprototypeof/index.d.ts
A node_modules/express/node_modules/setprototypeof/index.js
A node_modules/express/node_modules/setprototypeof/package.json
M node_modules/express/package.json
M node_modules/finalhandler/index.js
M node_modules/finalhandler/package.json
M node_modules/forwarded/package.json
M node_modules/fresh/index.js
M node_modules/fresh/package.json
M node_modules/ipaddr.js/LICENSE
M node_modules/ipaddr.js/bower.json
M node_modules/ipaddr.js/ipaddr.min.js
M node_modules/ipaddr.js/lib/ipaddr.js
M node_modules/ipaddr.js/package.json
M node_modules/ipaddr.js/src/ipaddr.coffee
M node_modules/ipaddr.js/test/ipaddr.test.coffee
M node_modules/kad/package.json
M node_modules/language-data/package.json
D node_modules/mime/.npmignore
M 

[MediaWiki-commits] [Gerrit] mediawiki...Equivset[master]: Increase Test Coverage to 100%

2017-10-10 Thread Dbarratt (Code Review)
Dbarratt has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/383498 )

Change subject: Increase Test Coverage to 100%
..

Increase Test Coverage to 100%

Update the code to support test cases and increase the code
coverage to 100%.

Bug: T177667
Change-Id: I1d8bbc5dc9469f72237f5bde36d5fbc6306bf985
---
M composer.json
A src/AbstractEquivset.php
M src/Command/GenerateEquivset.php
M src/Equivset.php
A src/EquivsetInterface.php
A tests/AbstractEquivsetTest.php
A tests/Command/GenerateEquivsetTest.php
M tests/EquivsetTest.php
A tests/MockEquivset.php
A tests/MockEquivsetTest.php
10 files changed, 743 insertions(+), 169 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/libs/Equivset 
refs/changes/98/383498/1

diff --git a/composer.json b/composer.json
index f3a4d76..9fad549 100644
--- a/composer.json
+++ b/composer.json
@@ -33,7 +33,8 @@
"symfony/var-dumper": "^3.3",
"phpunit/phpunit": "^4.8",
"jakub-onderka/php-parallel-lint": "^0.9.2",
-   "jakub-onderka/php-console-highlighter": "^0.3.2"
+   "jakub-onderka/php-console-highlighter": "^0.3.2",
+   "mikey179/vfsStream": "^1.6"
},
"scripts": {
"lint": [
diff --git a/src/AbstractEquivset.php b/src/AbstractEquivset.php
new file mode 100644
index 000..fa2981f
--- /dev/null
+++ b/src/AbstractEquivset.php
@@ -0,0 +1,110 @@
+http://www.gnu.org/copyleft/gpl.html
+ */
+
+namespace Wikimedia\Equivset;
+
+/**
+ * Equivset
+ */
+abstract class AbstractEquivset implements EquivsetInterface, 
\IteratorAggregate {
+
+   /**
+* Equivset
+*
+* @param array $data Equalvalent Set
+*/
+   public function __construct( array $data = [] ) {
+   $this->data = $data;
+   }
+
+   /**
+* {@inheritdoc}
+*
+* @return array An associative array of equivalent characters.
+*/
+   public function all() {
+   return $this->data;
+   }
+
+   /**
+* {@inheritdoc}
+*
+* @param string $value The string to normalize against the equivset.
+*
+* @return string
+*/
+   public function normalize( $value ) {
+   $data = $this->all();
+
+   return strtr( $value, $data );
+   }
+
+   /**
+* {@inheritdoc}
+*
+* @param string $str1 The first string.
+* @param string $str2 The second string.
+*
+* @return string
+*/
+   public function isEqual( $str1, $str2 ) {
+   return $this->normalize( $str1 ) === $this->normalize( $str2 );
+   }
+
+   /**
+* {@inheritdoc}
+*
+* @param string $key The character that was used.
+*
+* @return bool If the character has an equivalent.
+*/
+   public function has( $key ) {
+   $data = $this->all();
+
+   return array_key_exists( $key, $data );
+   }
+
+   /**
+* {@inheritdoc}
+*
+* @param string $key The character that was used.
+*
+* @return string The equivalent character.
+*
+* @throws \LogicException If character does not exist.
+*/
+   public function get( $key ) {
+   $data = $this->all();
+
+   if ( ! array_key_exists( $key, $data ) ) {
+   throw new \LogicException( 'Equivalent Character Not 
Found' );
+   }
+
+   return $data[$key];
+   }
+
+   /**
+* {@inheritdoc}
+*
+* @return \Traversable The complete Equivset.
+*/
+   public function getIterator() {
+   return new \ArrayIterator( $this->all() );
+   }
+
+}
diff --git a/src/Command/GenerateEquivset.php b/src/Command/GenerateEquivset.php
index 43edefb..02c4dba 100644
--- a/src/Command/GenerateEquivset.php
+++ b/src/Command/GenerateEquivset.php
@@ -29,6 +29,32 @@
 class GenerateEquivset extends Command {
 
/**
+* @var string
+*/
+   protected $dataDir;
+
+   /**
+* @var string
+*/
+   protected $distDir;
+
+   /**
+* Generate Equivset
+*
+* @param string $dataDir Data Directory
+* @param string $distDir Distrobution Directory
+*/
+   public function __construct(
+   $dataDir = '',
+   $distDir = ''
+   ) {
+   parent::__construct();
+
+   $this->dataDir = $dataDir ? $dataDir : __DIR__ . '/../../data';
+   $this->distDir = $distDir ? $distDir : __DIR__ . '/../../dist';
+   }
+
+   /**
 * {@inheritdoc}
 */
protected function configure() {
@@ -44,10 +70,7 @@
 * @return int Return status.
 */
public function execute( InputInterface 

[MediaWiki-commits] [Gerrit] mediawiki...WikiEditor[master]: Align close colors to conform to WCAG level AA

2017-10-10 Thread VolkerE (Code Review)
VolkerE has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/383497 )

Change subject: Align close colors to conform to WCAG level AA
..

Align close colors to conform to WCAG level AA

`#666` is closest simple one that also works on
backgrounds like `#fafafa`.

Change-Id: Iffca2872504e2a173155e4ddc5e4ab652464eb8f
---
M modules/jquery.wikiEditor.dialogs.less
M modules/jquery.wikiEditor.toolbar.less
2 files changed, 3 insertions(+), 3 deletions(-)


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

diff --git a/modules/jquery.wikiEditor.dialogs.less 
b/modules/jquery.wikiEditor.dialogs.less
index ee9ff98..6b20398 100644
--- a/modules/jquery.wikiEditor.dialogs.less
+++ b/modules/jquery.wikiEditor.dialogs.less
@@ -58,5 +58,5 @@
 }
 
 .wikieditor-toolbar-dialog-hint {
-   color: #999;
+   color: #666;
 }
diff --git a/modules/jquery.wikiEditor.toolbar.less 
b/modules/jquery.wikiEditor.toolbar.less
index da393bd..f0ff8b3 100644
--- a/modules/jquery.wikiEditor.toolbar.less
+++ b/modules/jquery.wikiEditor.toolbar.less
@@ -101,7 +101,7 @@
margin: 2px;
margin-left: 5px;
margin-right: 8px;
-   color: #777;
+   color: #666;
cursor: default;
}
 
@@ -238,7 +238,7 @@
}
 
th {
-   color: #999;
+   color: #666;
}
 
td {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iffca2872504e2a173155e4ddc5e4ab652464eb8f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikiEditor
Gerrit-Branch: master
Gerrit-Owner: VolkerE 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Add test cases for digit grouping (commafy) in Polish

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

Change subject: Add test cases for digit grouping (commafy) in Polish
..


Add test cases for digit grouping (commafy) in Polish

According to the typographical convention, a thousands separator
should not be inserted in numbers that are four digits long (between
1000 and ), unlike in English where it's usually acceptable.
This logic is currently implemented in LanguagePl::commafy().

Bug: T177846
Change-Id: I6dbd8febcf5967cdd7d3c1f2f77f4e66
---
M tests/phpunit/languages/classes/LanguagePlTest.php
1 file changed, 27 insertions(+), 0 deletions(-)

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



diff --git a/tests/phpunit/languages/classes/LanguagePlTest.php 
b/tests/phpunit/languages/classes/LanguagePlTest.php
index a6d0f2e..d7a0074 100644
--- a/tests/phpunit/languages/classes/LanguagePlTest.php
+++ b/tests/phpunit/languages/classes/LanguagePlTest.php
@@ -74,4 +74,31 @@
[ 'other', 201 ],
];
}
+
+   /**
+* @covers LanguagePl::commafy()
+* @dataProvider provideCommafyData
+*/
+   public function testCommafy( $number, $numbersWithCommas ) {
+   $this->assertEquals(
+   $numbersWithCommas,
+   $this->getLang()->commafy( $number ),
+   "commafy('$number')"
+   );
+   }
+
+   public static function provideCommafyData() {
+   // Note that commafy() always uses English separators (',' and 
'.') instead of
+   // Polish (' ' and ','). There is another function that 
converts them later.
+   return [
+   [ 1000, '1000' ],
+   [ 1, '10,000' ],
+   [ 1000.0001, '1000.0001' ],
+   [ 1.0001, '10,000.0001' ],
+   [ -1000, '-1000' ],
+   [ -1, '-10,000' ],
+   [ -1000.0001, '-1000.0001' ],
+   [ -1.0001, '-10,000.0001' ],
+   ];
+   }
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6dbd8febcf5967cdd7d3c1f2f77f4e66
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Reedy 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] oojs/ui[master]: Apex theme: Fix PopupToolGroup active box size

2017-10-10 Thread VolkerE (Code Review)
VolkerE has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/383496 )

Change subject: Apex theme: Fix PopupToolGroup active box size
..

Apex theme: Fix PopupToolGroup active box size

Recursion of Ia040a4655af5. We gonna get rid of the modifiers for
now and look for an improved solution when needed.

Change-Id: I2df6a44e521dcbbc974f80095936a5a53a067e20
---
M src/themes/apex/tools.less
1 file changed, 1 insertion(+), 27 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/96/383496/1

diff --git a/src/themes/apex/tools.less b/src/themes/apex/tools.less
index 03c92ef..d764232 100644
--- a/src/themes/apex/tools.less
+++ b/src/themes/apex/tools.less
@@ -386,31 +386,6 @@
}
}
 
-   &.oo-ui-flaggedElement {
-   &-constructive, // Deprecated since v0.23.2
-   &-progressive {
-   > .oo-ui-popupToolGroup-handle {
-   border: 1px solid @progressive-border;
-   .oo-ui-vertical-gradient( 
@progressive-gradient-start, @progressive-gradient-end );
-
-   &:hover,
-   &:focus {
-   border-color: 
@progressive-border-selected;
-   }
-   }
-
-   &.oo-ui-widget-enabled > 
.oo-ui-popupToolGroup-handle:active,
-   &.oo-ui-popupToolGroup-active > 
.oo-ui-popupToolGroup-handle {
-   border: 1px solid @progressive-border;
-   .oo-ui-vertical-gradient( 
@progressive-gradient-end, @progressive-gradient-start );
-   }
-   }
-
-   &-destructive > .oo-ui-popupToolGroup-handle {
-   color: @destructive;
-   }
-   }
-
.oo-ui-buttonGroupWidget & {
margin-left: 0;
 
@@ -471,11 +446,10 @@
}
 
&-active.oo-ui-widget-enabled {
+   .oo-ui-vertical-gradient( #f1f7fb, #fff );
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
box-shadow: inset 0 0.0875em 0.0875em 0 rgba( 0, 0, 0, 0.07 );
-
-   .oo-ui-vertical-gradient( #f1f7fb, #fff );
}
 
.oo-ui-toolGroup-tools {

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: phabricator: move apache includes to profile

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

Change subject: phabricator: move apache includes to profile
..


phabricator: move apache includes to profile

Change-Id: Ifa03e1d06ca30ebb6c154aa94d60b3f82b41fb6e
---
M modules/phabricator/manifests/init.pp
M modules/profile/manifests/phabricator/main.pp
2 files changed, 4 insertions(+), 4 deletions(-)

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



diff --git a/modules/phabricator/manifests/init.pp 
b/modules/phabricator/manifests/init.pp
index 05ad2a2..01acfd8 100644
--- a/modules/phabricator/manifests/init.pp
+++ b/modules/phabricator/manifests/init.pp
@@ -145,10 +145,6 @@
 ensure => present;
 }
 
-# common Apache modules
-include ::apache::mod::rewrite
-include ::apache::mod::headers
-
 $docroot = "${phabdir}/phabricator/webroot"
 
 $phab_servername = hiera('phabricator_servername', 
$phab_settings['phabricator.base-uri'])
diff --git a/modules/profile/manifests/phabricator/main.pp 
b/modules/profile/manifests/phabricator/main.pp
index a425f6e..1a0bede 100644
--- a/modules/profile/manifests/phabricator/main.pp
+++ b/modules/profile/manifests/phabricator/main.pp
@@ -185,6 +185,10 @@
 }
 # lint:endignore
 
+# common Apache modules
+include ::apache::mod::rewrite
+include ::apache::mod::headers
+
 class { '::phabricator::aphlict':
 ensure  => $aphlict_ensure,
 basedir => $phab_root_dir,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ifa03e1d06ca30ebb6c154aa94d60b3f82b41fb6e
Gerrit-PatchSet: 4
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] wikidata/build-resources[master]: Remove MediaInfo from Wikidata build

2017-10-10 Thread Aude (Code Review)
Aude has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/383495 )

Change subject: Remove MediaInfo from Wikidata build
..

Remove MediaInfo from Wikidata build

The reason to have MediaInfo in the build was so that
we would have tests run regularly together with Wikibase.

MediaInfo is now being actively worked on by the structured
data / commons team, thus tests for it will be run
more often now.

Also, Lexeme is (obviously) under active development.
When something breaks (compatibility-wise) in MediaInfo,
usually the same problem happens in Lexeme and thus we
likely would know and hopefully fix in both extensions.

As well, we have a task (T176408) for setting up some
jenkins job(s), maybe post-merge for Wikibase, to have
tests run for extensions that depend on Wikibase.

In removing MediaInfo from the build, (along with the
shared cache key setting, which has another patch),
we probably can have the deployment branch for the build
cut from master in the normal way that is done for
other extensions. (for the time left until we eliminate
having the build)

Change-Id: I3e5743809b97b74ddf9c485ceb42a191515b04cc
---
M Wikidata.php
M build/tasks/updatecomposer.js
M composer.json
3 files changed, 1 insertion(+), 21 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikidata/build-resources 
refs/changes/95/383495/1

diff --git a/Wikidata.php b/Wikidata.php
index b96b27c..d7e39ac 100755
--- a/Wikidata.php
+++ b/Wikidata.php
@@ -8,7 +8,6 @@
$wmgUseWikibaseRepo = true;
$wmgUseWikibaseClient = true;
$wmgUseWikibaseQuality = true;
-   $wmgUseWikibaseMediaInfo = true;
$wmgUseArticlePlaceholder = true;
 }
 
@@ -28,17 +27,6 @@
if ( !empty( $wmgUseWikibaseQuality ) ) {
include_once 
"$wgWikidataBaseDir/extensions/Quality/WikibaseQuality.php";
include_once 
"$wgWikidataBaseDir/extensions/Constraints/WikibaseQualityConstraints.php";
-   }
-
-   // @note wikibase/media-info is removed from composer.json for
-   // deployment builds, during the 'branch' grunt command. (pending 
security review)
-   // jenkins builds for deployment branches have this set to true, but 
then we remove
-   // the code, so need to check the extension is there even on jenkins.
-   if (
-   !empty( $wmgUseWikibaseMediaInfo )
-   && is_readable( 
"$wgWikidataBaseDir/extensions/MediaInfo/extension.json" )
-   ) {
-   wfLoadExtension( 'WikibaseMediaInfo', 
"$wgWikidataBaseDir/extensions/MediaInfo/extension.json" );
}
 }
 
diff --git a/build/tasks/updatecomposer.js b/build/tasks/updatecomposer.js
index 6bb2ee0..d6df824 100644
--- a/build/tasks/updatecomposer.js
+++ b/build/tasks/updatecomposer.js
@@ -17,9 +17,6 @@
 
composer.require["wikibase/wikibase"] = 'dev-' + branch;
 
-   // Don't include in deployment builds while security review is 
pending.
-   delete composer.require["wikibase/media-info"];
-
composer.config["autoloader-suffix"] = autoloadSuffix( branch );
 
grunt.file.write( composerPath, JSON.stringify( composer, null, 
'' ) );
diff --git a/composer.json b/composer.json
index 275a495..1d0bbd6 100644
--- a/composer.json
+++ b/composer.json
@@ -22,10 +22,6 @@
 {
 "type": "git",
 "url": 
"https://gerrit.wikimedia.org/r/mediawiki/extensions/WikibaseQualityConstraints;
-},
-{
-"type": "git",
-"url": 
"https://gerrit.wikimedia.org/r/mediawiki/extensions/WikibaseMediaInfo;
 }
 ],
 "require": {
@@ -37,8 +33,7 @@
 "wikibase/wikimedia-badges": "dev-master",
 "wikibase/Wikidata.org": "dev-master",
 "wikibase/quality": "dev-master",
-"wikibase/constraints": "dev-master",
-"wikibase/media-info": "dev-master"
+"wikibase/constraints": "dev-master"
 },
 "require-dev": {
 "wikimedia/composer-merge-plugin": "1.3.1"

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3e5743809b97b74ddf9c485ceb42a191515b04cc
Gerrit-PatchSet: 1
Gerrit-Project: wikidata/build-resources
Gerrit-Branch: master
Gerrit-Owner: Aude 

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


[MediaWiki-commits] [Gerrit] oojs/ui[master]: WikimediaUI theme: Streamlining icon/indicator visibility

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

Change subject: WikimediaUI theme: Streamlining icon/indicator visibility
..


WikimediaUI theme: Streamlining icon/indicator visibility

This is, due to the internal architecture, a specificity
hassle. It seems like the most appropriate way to hide all
the non-used icons/indicator element.

Bug: T160593
Change-Id: I5b3ac8da1dd692ed62878cc1ffcc0c1066a254e0
---
M src/styles/elements/IconElement.less
M src/styles/elements/IndicatorElement.less
M src/themes/wikimediaui/layouts.less
M src/themes/wikimediaui/tools.less
M src/themes/wikimediaui/widgets.less
5 files changed, 18 insertions(+), 8 deletions(-)

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



diff --git a/src/styles/elements/IconElement.less 
b/src/styles/elements/IconElement.less
index a7bdc13..a78597e 100644
--- a/src/styles/elements/IconElement.less
+++ b/src/styles/elements/IconElement.less
@@ -6,7 +6,6 @@
background-size: contain;
background-position: center center;
background-repeat: no-repeat;
-   display: none;
position: absolute;
top: 0;
// Support: IE11, Edge 12+ (T94494), Firefox 31.5 (T93636)
diff --git a/src/styles/elements/IndicatorElement.less 
b/src/styles/elements/IndicatorElement.less
index 9819345..0eabf72 100644
--- a/src/styles/elements/IndicatorElement.less
+++ b/src/styles/elements/IndicatorElement.less
@@ -6,7 +6,6 @@
background-size: contain;
background-position: center center;
background-repeat: no-repeat;
-   display: none;
position: absolute;
top: 0;
// Support: IE11, Edge 12+ (T94494), Firefox 31.5 (T93636)
diff --git a/src/themes/wikimediaui/layouts.less 
b/src/themes/wikimediaui/layouts.less
index 8e3c18a..8a4f8a2 100644
--- a/src/themes/wikimediaui/layouts.less
+++ b/src/themes/wikimediaui/layouts.less
@@ -1,10 +1,6 @@
 @import 'common';
 
-.theme-oo-ui-layout () {
-   &.oo-ui-iconElement .oo-ui-iconElement-icon {
-   display: block;
-   }
-}
+.theme-oo-ui-layout () {}
 
 .theme-oo-ui-bookletLayout () {
&-stackLayout {
@@ -185,6 +181,10 @@
}
}
 
+   &.oo-ui-iconElement > .oo-ui-fieldsetLayout-header 
.oo-ui-iconElement-icon {
+   display: block;
+   }
+
+ .oo-ui-fieldsetLayout,
+ .oo-ui-formLayout {
margin-top: 2em;
diff --git a/src/themes/wikimediaui/tools.less 
b/src/themes/wikimediaui/tools.less
index ab59092..f8c8263 100644
--- a/src/themes/wikimediaui/tools.less
+++ b/src/themes/wikimediaui/tools.less
@@ -92,6 +92,7 @@
}
 
&.oo-ui-iconElement .oo-ui-iconElement-icon {
+   display: block;
left: @start-tool-icon-indicator;
}
 
diff --git a/src/themes/wikimediaui/widgets.less 
b/src/themes/wikimediaui/widgets.less
index b3e1fbd..3b82e9a 100644
--- a/src/themes/wikimediaui/widgets.less
+++ b/src/themes/wikimediaui/widgets.less
@@ -1,8 +1,19 @@
 @import 'common';
 
 .theme-oo-ui-widget () {
+   .oo-ui-iconElement-icon,
+   .oo-ui-indicatorElement-indicator,
+   &.oo-ui-iconElement .oo-ui-widget .oo-ui-iconElement-icon,
+   &.oo-ui-indicatorElement .oo-ui-widget 
.oo-ui-indicatorElement-indicator {
+   display: none;
+   }
+
&.oo-ui-iconElement .oo-ui-iconElement-icon,
-   &.oo-ui-indicatorElement .oo-ui-indicatorElement-indicator {
+   &.oo-ui-iconElement > * > .oo-ui-iconElement-icon,
+   &.oo-ui-iconElement .oo-ui-iconElement .oo-ui-iconElement-icon,
+   &.oo-ui-indicatorElement > .oo-ui-indicatorElement-indicator,
+   &.oo-ui-indicatorElement > * > .oo-ui-indicatorElement-indicator,
+   &.oo-ui-indicatorElement .oo-ui-indicatorElement 
.oo-ui-indicatorElement-indicator {
display: block;
}
 }

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

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

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


[MediaWiki-commits] [Gerrit] oojs/ui[master]: Apex theme: Show icons in MenuToolGroups

2017-10-10 Thread VolkerE (Code Review)
VolkerE has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/383494 )

Change subject: Apex theme: Show icons in MenuToolGroups
..

Apex theme: Show icons in MenuToolGroups

In contrast to WikimediaUI theme, icons in MenuToolGroups were hidden by
this rule has been around for at least three years. There's no reason
not to show icons there when they are applied.
MenuToolGroups are not actively used in VE,
they are at least part of the demos though.

Change-Id: I9de5df6ebaf7ff7293eb47601e3baf935351be5d
---
M src/themes/apex/tools.less
1 file changed, 0 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/94/383494/1

diff --git a/src/themes/apex/tools.less b/src/themes/apex/tools.less
index 03c92ef..eeefe54 100644
--- a/src/themes/apex/tools.less
+++ b/src/themes/apex/tools.less
@@ -294,12 +294,6 @@
.oo-ui-tool {
padding: 0 1.25em 0 0.3125em;
 
-   &-link {
-   .oo-ui-iconElement-icon {
-   background-image: none;
-   }
-   }
-
&-active .oo-ui-tool-link .oo-ui-iconElement-icon {
.oo-ui-background-image-svg( 
'@{oo-ui-default-image-path}/icons/check' );
background-size: contain;

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

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

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


[MediaWiki-commits] [Gerrit] oojs/ui[master]: WikimediaUI theme: Streamlining icon/indicator visibility

2017-10-10 Thread VolkerE (Code Review)
VolkerE has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/383493 )

Change subject: WikimediaUI theme: Streamlining icon/indicator visibility
..

WikimediaUI theme: Streamlining icon/indicator visibility

This is, due to the internal architecture, a specificity
hassle. It seems like the most appropriate way to hide all
the non-used icons/indicator element.

Bug: T160593
Change-Id: I5b3ac8da1dd692ed62878cc1ffcc0c1066a254e0
---
M src/styles/elements/IconElement.less
M src/styles/elements/IndicatorElement.less
M src/themes/wikimediaui/layouts.less
M src/themes/wikimediaui/tools.less
M src/themes/wikimediaui/widgets.less
5 files changed, 18 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/93/383493/1

diff --git a/src/styles/elements/IconElement.less 
b/src/styles/elements/IconElement.less
index a7bdc13..a78597e 100644
--- a/src/styles/elements/IconElement.less
+++ b/src/styles/elements/IconElement.less
@@ -6,7 +6,6 @@
background-size: contain;
background-position: center center;
background-repeat: no-repeat;
-   display: none;
position: absolute;
top: 0;
// Support: IE11, Edge 12+ (T94494), Firefox 31.5 (T93636)
diff --git a/src/styles/elements/IndicatorElement.less 
b/src/styles/elements/IndicatorElement.less
index 9819345..0eabf72 100644
--- a/src/styles/elements/IndicatorElement.less
+++ b/src/styles/elements/IndicatorElement.less
@@ -6,7 +6,6 @@
background-size: contain;
background-position: center center;
background-repeat: no-repeat;
-   display: none;
position: absolute;
top: 0;
// Support: IE11, Edge 12+ (T94494), Firefox 31.5 (T93636)
diff --git a/src/themes/wikimediaui/layouts.less 
b/src/themes/wikimediaui/layouts.less
index 8e3c18a..8a4f8a2 100644
--- a/src/themes/wikimediaui/layouts.less
+++ b/src/themes/wikimediaui/layouts.less
@@ -1,10 +1,6 @@
 @import 'common';
 
-.theme-oo-ui-layout () {
-   &.oo-ui-iconElement .oo-ui-iconElement-icon {
-   display: block;
-   }
-}
+.theme-oo-ui-layout () {}
 
 .theme-oo-ui-bookletLayout () {
&-stackLayout {
@@ -185,6 +181,10 @@
}
}
 
+   &.oo-ui-iconElement > .oo-ui-fieldsetLayout-header 
.oo-ui-iconElement-icon {
+   display: block;
+   }
+
+ .oo-ui-fieldsetLayout,
+ .oo-ui-formLayout {
margin-top: 2em;
diff --git a/src/themes/wikimediaui/tools.less 
b/src/themes/wikimediaui/tools.less
index ab59092..f8c8263 100644
--- a/src/themes/wikimediaui/tools.less
+++ b/src/themes/wikimediaui/tools.less
@@ -92,6 +92,7 @@
}
 
&.oo-ui-iconElement .oo-ui-iconElement-icon {
+   display: block;
left: @start-tool-icon-indicator;
}
 
diff --git a/src/themes/wikimediaui/widgets.less 
b/src/themes/wikimediaui/widgets.less
index b3e1fbd..3b82e9a 100644
--- a/src/themes/wikimediaui/widgets.less
+++ b/src/themes/wikimediaui/widgets.less
@@ -1,8 +1,19 @@
 @import 'common';
 
 .theme-oo-ui-widget () {
+   .oo-ui-iconElement-icon,
+   .oo-ui-indicatorElement-indicator,
+   &.oo-ui-iconElement .oo-ui-widget .oo-ui-iconElement-icon,
+   &.oo-ui-indicatorElement .oo-ui-widget 
.oo-ui-indicatorElement-indicator {
+   display: none;
+   }
+
&.oo-ui-iconElement .oo-ui-iconElement-icon,
-   &.oo-ui-indicatorElement .oo-ui-indicatorElement-indicator {
+   &.oo-ui-iconElement > * > .oo-ui-iconElement-icon,
+   &.oo-ui-iconElement .oo-ui-iconElement .oo-ui-iconElement-icon,
+   &.oo-ui-indicatorElement > .oo-ui-indicatorElement-indicator,
+   &.oo-ui-indicatorElement > * > .oo-ui-indicatorElement-indicator,
+   &.oo-ui-indicatorElement .oo-ui-indicatorElement 
.oo-ui-indicatorElement-indicator {
display: block;
}
 }

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: contint: apt-get update before installing packages

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

Change subject: contint: apt-get update before installing packages
..


contint: apt-get update before installing packages

apt::repository schedule a refresh of Exec[apt-get update] but the
package get installed before it has actually run.  The packages are thus
not found :(

When packages require an apt::repository, make them require the apt-get
update.

Change-Id: I5c3ab00efcf320dd973d90ddb62f43f4d55eb966
---
M modules/contint/manifests/packages/php.pp
1 file changed, 5 insertions(+), 1 deletion(-)

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



diff --git a/modules/contint/manifests/packages/php.pp 
b/modules/contint/manifests/packages/php.pp
index b7d89e5..09321cd 100644
--- a/modules/contint/manifests/packages/php.pp
+++ b/modules/contint/manifests/packages/php.pp
@@ -72,7 +72,10 @@
 if os_version('debian == jessie') {
 package { $php7_packages :
 ensure  => latest,
-require => Apt::Repository['sury-php'],
+require => [
+Apt::Repository['sury-php'],
+Exec['apt-get update'],
+],
 }
 
 apt::repository { 'jessie-ci-php55':
@@ -103,6 +106,7 @@
 ensure  => present,
 require => [
 Apt::Repository['jessie-ci-php55'],
+Exec['apt-get update'],
 ],
 }
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5c3ab00efcf320dd973d90ddb62f43f4d55eb966
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Hashar 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: Muehlenhoff 
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...ApprovedRevs[master]: Match hook, avoid warnings

2017-10-10 Thread MarkAHershberger (Code Review)
MarkAHershberger has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/383492 )

Change subject: Match hook, avoid warnings
..

Match hook, avoid warnings

Bug: T177897
Change-Id: Ia559f6925edb10131c54eb683245fbc5ee20f358
---
M ApprovedRevs.hooks.php
1 file changed, 3 insertions(+), 3 deletions(-)


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

diff --git a/ApprovedRevs.hooks.php b/ApprovedRevs.hooks.php
index de014da..6791533 100644
--- a/ApprovedRevs.hooks.php
+++ b/ApprovedRevs.hooks.php
@@ -801,13 +801,13 @@
 *
 * @since 0.5.6
 *
-* @param Article &$article
+* @param Article $article
 * @param boolean $outputDone
 * @param boolean $useParserCache
 *
 * @return true
 */
-   public static function setArticleHeader( Article &$article, 
&$outputDone, &$useParserCache ) {
+   public static function setArticleHeader( Article $article, 
&$outputDone, &$useParserCache ) {
global $wgOut, $wgRequest, $egApprovedRevsBlankIfUnapproved;
 
// For now, we only set the header if "blank if unapproved"
@@ -889,7 +889,7 @@
 * a header message stating that, if the setting to display this
 * message is activated.
 */
-   public static function displayNotApprovedHeader( Article &$article, 
&$outputDone, &$useParserCache ) {
+   public static function displayNotApprovedHeader( Article $article, 
&$outputDone, &$useParserCache ) {
global $egApprovedRevsShowNotApprovedMessage;
if ( !$egApprovedRevsShowNotApprovedMessage) {
return true;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia559f6925edb10131c54eb683245fbc5ee20f358
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ApprovedRevs
Gerrit-Branch: master
Gerrit-Owner: MarkAHershberger 

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Disable OCG services

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

Change subject: Disable OCG services
..


Disable OCG services

Bug: T177795
Change-Id: I2f820a5c5be5986b14f1c5ce0f52f3fd6140a6a3
---
M wmf-config/CommonSettings.php
M wmf-config/LabsServices.php
M wmf-config/ProductionServices.php
3 files changed, 0 insertions(+), 4 deletions(-)

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



diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index d53b1de..6d3fd43 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -1824,7 +1824,6 @@
 if ( $wmgUseCollection ) {
// PediaPress / PDF generation
include "$IP/extensions/Collection/Collection.php";
-   $wgCollectionMWServeURL = $wmfLocalServices['ocg'];
// Use pediapress server for POD function (T73675)
$wgCollectionCommandToServeURL = [
'zip_post' => 
"{$wmfLocalServices['urldownloader']}|https://pediapress.com/wmfup/;,
diff --git a/wmf-config/LabsServices.php b/wmf-config/LabsServices.php
index 70b5455..1ec6b7e 100644
--- a/wmf-config/LabsServices.php
+++ b/wmf-config/LabsServices.php
@@ -20,7 +20,6 @@
'deployment-elastic06.deployment-prep.eqiad.wmflabs',
'deployment-elastic07.deployment-prep.eqiad.wmflabs',
],
-   'ocg' => 'http://deployment-pdf01:8000',
'urldownloader' => 
'http://deployment-urldownloader.deployment-prep.eqiad.wmflabs:8080',
'parsoid' => 
'http://deployment-parsoid09.deployment-prep.eqiad.wmflabs:8000',
'mathoid' => 'http://deployment-mathoid.eqiad.wmflabs:10042',
diff --git a/wmf-config/ProductionServices.php 
b/wmf-config/ProductionServices.php
index 447ac5b..7a4044b 100644
--- a/wmf-config/ProductionServices.php
+++ b/wmf-config/ProductionServices.php
@@ -15,7 +15,6 @@
'udp2log' => 'mwlog1001.eqiad.wmnet:8420',
'statsd' => 'statsd.eqiad.wmnet',
'search' => [ 'search.svc.eqiad.wmnet' ], # elasticsearch must be 
accessed by hostname for SSL certificate verification to work
-   'ocg' => 'http://ocg.svc.eqiad.wmnet:8000',
'urldownloader' => 'http://url-downloader.eqiad.wikimedia.org:8080',
'parsoid' => 'http://parsoid.discovery.wmnet:8000',
'mathoid' => 'http://mathoid.discovery.wmnet:10042',
@@ -33,7 +32,6 @@
'udp2log' => 'mwlog1001.eqiad.wmnet:8420',
'statsd' => 'statsd.eqiad.wmnet',
'search' => [ 'search.svc.codfw.wmnet' ], # elasticsearch must be 
accessed by hostname for SSL certificate verification to work
-   'ocg' => 'http://ocg.svc.eqiad.wmnet:8000',
'urldownloader' => 'http://url-downloader.codfw.wikimedia.org:8080',
'parsoid' => 'http://parsoid.discovery.wmnet:8000',
'mathoid' => 'http://mathoid.discovery.wmnet:10042',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2f820a5c5be5986b14f1c5ce0f52f3fd6140a6a3
Gerrit-PatchSet: 3
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson 
Gerrit-Reviewer: Thcipriani 
Gerrit-Reviewer: Urbanecm 
Gerrit-Reviewer: Zoranzoki21 
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]: Add puppetcompiler1001 to dhcp and autoinstall configs

2017-10-10 Thread Herron (Code Review)
Herron has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/383488 )

Change subject: Add puppetcompiler1001 to dhcp and autoinstall configs
..


Add puppetcompiler1001 to dhcp and autoinstall configs

For provisioning of ganeti VM puppetcompiler1001.eqiad.wmnet.

Bug: T177843
Change-Id: Ib594f1a3a038bbc9913eb82cb5ae1e6d32ebf23f
---
M modules/install_server/files/autoinstall/netboot.cfg
M modules/install_server/files/dhcpd/linux-host-entries.ttyS0-115200
2 files changed, 8 insertions(+), 1 deletion(-)

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



diff --git a/modules/install_server/files/autoinstall/netboot.cfg 
b/modules/install_server/files/autoinstall/netboot.cfg
index 9414ebc..34b60fa 100755
--- a/modules/install_server/files/autoinstall/netboot.cfg
+++ b/modules/install_server/files/autoinstall/netboot.cfg
@@ -76,7 +76,7 @@
 elastic20[0-2][0-9]|elastic203[0-6]) echo 
partman/raid1-lvm-ext4-srv-noswap.cfg ;; \
 
labcontrol100[34]|labmon100[12]|mwlog[12]001|relforge100[12]|scb200[1-6]|stat100[56])
 echo partman/raid10-gpt-srv-lvm-ext4.cfg ;; \
 analytics1003|cobalt|thorium) echo partman/raid10-gpt-srv-lvm-ext4.cfg 
;; \
-
acrab|acrux|actinium|alcyone|aluminium|argon|boron|chlorine|bromine|bohrium|darmstadtium|dbmonitor[12]001|dubnium|etcd100[1-6]|etherpad[12]001|fermium|hassaleh|hassium|krypton|kubetcd[12]00[1-3]|meitnerium|mendelevium|mwdebug100[12]|netmon1003|releases[12]001|nihal|nitrogen|planet[12]001|pollux|roentgenium|rutherfordium|sca[12]00[34]|seaborgium|serpens|tureis|alsafi|kraz|install[12]00[12]|ununpentium)
 echo partman/flat.cfg virtual.cfg ;; \
+
acrab|acrux|actinium|alcyone|aluminium|argon|boron|chlorine|bromine|bohrium|darmstadtium|dbmonitor[12]001|dubnium|etcd100[1-6]|etherpad[12]001|fermium|hassaleh|hassium|krypton|kubetcd[12]00[1-3]|meitnerium|mendelevium|mwdebug100[12]|netmon1003|releases[12]001|nihal|nitrogen|planet[12]001|pollux|puppetcompiler1001|roentgenium|rutherfordium|sca[12]00[34]|seaborgium|serpens|tureis|alsafi|kraz|install[12]00[12]|ununpentium)
 echo partman/flat.cfg virtual.cfg ;; \
 diadem|dysprosium) echo partman/flat.cfg virtual.cfg ;; \
 kubestagetcd100[123]|neon) echo partman/flat.cfg virtual.cfg ;; \
 eventlog[1-2]001|ocg100[1-2]|scb100[1-4]) echo partman/raid1.cfg ;; \
diff --git a/modules/install_server/files/dhcpd/linux-host-entries.ttyS0-115200 
b/modules/install_server/files/dhcpd/linux-host-entries.ttyS0-115200
index 74ab995..6f0b2b9 100644
--- a/modules/install_server/files/dhcpd/linux-host-entries.ttyS0-115200
+++ b/modules/install_server/files/dhcpd/linux-host-entries.ttyS0-115200
@@ -311,6 +311,13 @@
 fixed-address poolcounter2002.codfw.wmnet;
 }
 
+host puppetcompiler1001 {
+hardware ethernet aa:00:00:25:33:57;
+fixed-address puppetcompiler1001.eqiad.wmnet;
+option pxelinux.pathprefix "stretch-installer/";
+filename "stretch-installer/debian-installer/amd64/pxelinux.0";
+}
+
 # ganeti VMs used for pybal testing/development
 host pybal-test2001 {
 hardware ethernet aa:00:00:16:8d:f9;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib594f1a3a038bbc9913eb82cb5ae1e6d32ebf23f
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Herron 
Gerrit-Reviewer: Herron 
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...release[master]: Update Wikidata - wmf/1.31.0-wmf.3

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

Change subject: Update Wikidata - wmf/1.31.0-wmf.3
..


Update Wikidata - wmf/1.31.0-wmf.3

Change-Id: I75e1288db3fd54a19aa3961106fb4ced4bd58b34
---
M make-wmf-branch/config.json
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/make-wmf-branch/config.json b/make-wmf-branch/config.json
index 79f061c..5b58b77 100644
--- a/make-wmf-branch/config.json
+++ b/make-wmf-branch/config.json
@@ -190,6 +190,6 @@
"@": "Set a string for the specific commit, branch, or tag",
"special_extensions": {
"CentralNotice": "wmf_deploy",
-   "Wikidata": "wmf/1.31.0-wmf.2"
+   "Wikidata": "wmf/1.31.0-wmf.3"
}
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I75e1288db3fd54a19aa3961106fb4ced4bd58b34
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/tools/release
Gerrit-Branch: master
Gerrit-Owner: Aude 
Gerrit-Reviewer: Aude 
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]: Enable Vector print logo and print styles on all wikis

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

Change subject: Enable Vector print logo and print styles on all wikis
..

Enable Vector print logo and print styles on all wikis

Bug: T169732
Change-Id: Ia92657dd2937996c62652bc1675dcc8461fcf8fc
---
M wmf-config/CommonSettings.php
M wmf-config/InitialiseSettings.php
2 files changed, 15 insertions(+), 2 deletions(-)


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

diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index d53b1de..8c7ceea 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -650,6 +650,20 @@
wfLoadSkin( 'Timeless' ); // T154371
 }
 
+// The Print logo for Vector should use the same wordmark as Minerva
+// This avoids duplicate config entries (T169732)
+if (
+   isset( $wgMinervaCustomLogos['copyright'] ) &&
+   isset( $wgMinervaCustomLogos['copyright-height'] ) &&
+   isset( $wgMinervaCustomLogos['copyright-width'] )
+) {
+   $wgVectorPrintLogo = [
+   'width' => $wgMinervaCustomLogos['copyright-width'],
+   'height' => $wgMinervaCustomLogos['copyright-height'],
+   'url' =>  $wgMinervaCustomLogos['copyright'],
+   ];
+}
+
 // Grants and rights
 // Note these have to be visible on all wikis, not just the ones the
 // extension is enabled on, for proper display in OAuth pages and such.
diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index b8e7692..7d10369 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -7178,8 +7178,7 @@
 
 // T169732
 'wgVectorExperimentalPrintStyles' => [
-   'default' => false,
-   'testwiki' => true,
+   'default' => true,
 ],
 
 'wgVectorResponsive' => [

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia92657dd2937996c62652bc1675dcc8461fcf8fc
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
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...release[master]: Update Wikidata - wmf/1.31.0-wmf.3

2017-10-10 Thread Aude (Code Review)
Aude has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/383490 )

Change subject: Update Wikidata - wmf/1.31.0-wmf.3
..

Update Wikidata - wmf/1.31.0-wmf.3

Change-Id: I75e1288db3fd54a19aa3961106fb4ced4bd58b34
---
M make-wmf-branch/config.json
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/make-wmf-branch/config.json b/make-wmf-branch/config.json
index 79f061c..5b58b77 100644
--- a/make-wmf-branch/config.json
+++ b/make-wmf-branch/config.json
@@ -190,6 +190,6 @@
"@": "Set a string for the specific commit, branch, or tag",
"special_extensions": {
"CentralNotice": "wmf_deploy",
-   "Wikidata": "wmf/1.31.0-wmf.2"
+   "Wikidata": "wmf/1.31.0-wmf.3"
}
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I75e1288db3fd54a19aa3961106fb4ced4bd58b34
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/tools/release
Gerrit-Branch: master
Gerrit-Owner: Aude 

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


[MediaWiki-commits] [Gerrit] mediawiki...Scribunto[REL1_27]: Match hook, avoid warnings

2017-10-10 Thread MarkAHershberger (Code Review)
MarkAHershberger has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/383489 )

Change subject: Match hook, avoid warnings
..

Match hook, avoid warnings

Bug: T177897
Change-Id: I2cdb4943f4a861474134cdee7f3988524bada74f
---
M common/Hooks.php
1 file changed, 3 insertions(+), 2 deletions(-)


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

diff --git a/common/Hooks.php b/common/Hooks.php
index 792e78a..a7862ae 100644
--- a/common/Hooks.php
+++ b/common/Hooks.php
@@ -437,12 +437,13 @@
}
 
/**
-* @param Article &$article
+* @param Article $article
+* @param Article $article
 * @param bool &$outputDone
 * @param bool &$pcache
 * @return bool
 */
-   public static function showDocPageHeader( Article &$article, 
&$outputDone, &$pcache ) {
+   public static function showDocPageHeader( Article $article, 
&$outputDone, &$pcache ) {
global $wgOut;
 
$title = $article->getTitle();

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2cdb4943f4a861474134cdee7f3988524bada74f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Scribunto
Gerrit-Branch: REL1_27
Gerrit-Owner: MarkAHershberger 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Add puppetcompiler1001 to dhcp and autoinstall configs

2017-10-10 Thread Herron (Code Review)
Herron has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/383488 )

Change subject: Add puppetcompiler1001 to dhcp and autoinstall configs
..

Add puppetcompiler1001 to dhcp and autoinstall configs

For provisioning of ganeti VM puppetcompiler1001.eqiad.wmnet.

Bug: T177843
Change-Id: Ib594f1a3a038bbc9913eb82cb5ae1e6d32ebf23f
---
M modules/install_server/files/autoinstall/netboot.cfg
M modules/install_server/files/dhcpd/linux-host-entries.ttyS0-115200
2 files changed, 9 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/88/383488/1

diff --git a/modules/install_server/files/autoinstall/netboot.cfg 
b/modules/install_server/files/autoinstall/netboot.cfg
index 9414ebc..34b60fa 100755
--- a/modules/install_server/files/autoinstall/netboot.cfg
+++ b/modules/install_server/files/autoinstall/netboot.cfg
@@ -76,7 +76,7 @@
 elastic20[0-2][0-9]|elastic203[0-6]) echo 
partman/raid1-lvm-ext4-srv-noswap.cfg ;; \
 
labcontrol100[34]|labmon100[12]|mwlog[12]001|relforge100[12]|scb200[1-6]|stat100[56])
 echo partman/raid10-gpt-srv-lvm-ext4.cfg ;; \
 analytics1003|cobalt|thorium) echo partman/raid10-gpt-srv-lvm-ext4.cfg 
;; \
-
acrab|acrux|actinium|alcyone|aluminium|argon|boron|chlorine|bromine|bohrium|darmstadtium|dbmonitor[12]001|dubnium|etcd100[1-6]|etherpad[12]001|fermium|hassaleh|hassium|krypton|kubetcd[12]00[1-3]|meitnerium|mendelevium|mwdebug100[12]|netmon1003|releases[12]001|nihal|nitrogen|planet[12]001|pollux|roentgenium|rutherfordium|sca[12]00[34]|seaborgium|serpens|tureis|alsafi|kraz|install[12]00[12]|ununpentium)
 echo partman/flat.cfg virtual.cfg ;; \
+
acrab|acrux|actinium|alcyone|aluminium|argon|boron|chlorine|bromine|bohrium|darmstadtium|dbmonitor[12]001|dubnium|etcd100[1-6]|etherpad[12]001|fermium|hassaleh|hassium|krypton|kubetcd[12]00[1-3]|meitnerium|mendelevium|mwdebug100[12]|netmon1003|releases[12]001|nihal|nitrogen|planet[12]001|pollux|puppetcompiler1001|roentgenium|rutherfordium|sca[12]00[34]|seaborgium|serpens|tureis|alsafi|kraz|install[12]00[12]|ununpentium)
 echo partman/flat.cfg virtual.cfg ;; \
 diadem|dysprosium) echo partman/flat.cfg virtual.cfg ;; \
 kubestagetcd100[123]|neon) echo partman/flat.cfg virtual.cfg ;; \
 eventlog[1-2]001|ocg100[1-2]|scb100[1-4]) echo partman/raid1.cfg ;; \
diff --git a/modules/install_server/files/dhcpd/linux-host-entries.ttyS0-115200 
b/modules/install_server/files/dhcpd/linux-host-entries.ttyS0-115200
index 74ab995..5c9a0d0 100644
--- a/modules/install_server/files/dhcpd/linux-host-entries.ttyS0-115200
+++ b/modules/install_server/files/dhcpd/linux-host-entries.ttyS0-115200
@@ -311,6 +311,13 @@
 fixed-address poolcounter2002.codfw.wmnet;
 }
 
+host puppetcompiler1001 {
+hardware ethernet aa:00:00:25:33:57;
+fixed-address puppetcompiler1001.eqiad.wmnet;
+option pxelinux.pathprefix "stretch-installer/";
+filename "stretch-installer/debian-installer/amd64/pxelinux.0";
+}
+
 # ganeti VMs used for pybal testing/development
 host pybal-test2001 {
 hardware ethernet aa:00:00:16:8d:f9;
@@ -392,3 +399,4 @@
 hardware ethernet aa:00:00:45:62:2d;
 fixed-address tureis.codfw.wmnet;
 }
+

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...Vector[master]: Expand relative URL - CSSMin needs absolute url

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

Change subject: Expand relative URL - CSSMin needs absolute url
..

Expand relative URL - CSSMin needs absolute url

The logo is configured as a relative URL.
CSSMin encodeImageAsDataURI requires an absolute URL.
This change is backwards compatible with absolute URLs

Bug: T177800
Change-Id: I0254ae8e360f09fe1c786695510550c7fec02026
---
M README.md
M ResourceLoaderLessModule.php
2 files changed, 6 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/Vector 
refs/changes/87/383487/1

diff --git a/README.md b/README.md
index 4b3f40b..85e6ff7 100644
--- a/README.md
+++ b/README.md
@@ -14,6 +14,8 @@
 its dimensions also need to match the corresponding variable below.
 That in turn may result in blurry images, though.
 
+The URL can be absolute or relative.
+
 Example configuration:
 
$wgVectorPrintLogo = [
diff --git a/ResourceLoaderLessModule.php b/ResourceLoaderLessModule.php
index a901601..e42b697 100644
--- a/ResourceLoaderLessModule.php
+++ b/ResourceLoaderLessModule.php
@@ -45,7 +45,10 @@
if ( $printLogo ) {
$lessVars[ 'printLogo' ] = true;
$lessVars[ 'printLogoUrl' ] = CSSMin::buildUrlValue(
-   CSSMin::encodeImageAsDataURI( $printLogo['url'] 
) );
+   CSSMin::encodeImageAsDataURI(
+   wfExpandUrl( $printLogo['url'] )
+   )
+   );
$lessVars[ 'printLogoWidth' ] = intval( 
$printLogo['width'] );
$lessVars[ 'printLogoHeight' ] = intval( 
$printLogo['height'] );
} else {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0254ae8e360f09fe1c786695510550c7fec02026
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/Vector
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...Scribunto[master]: Match hook, avoid warnings

2017-10-10 Thread MarkAHershberger (Code Review)
MarkAHershberger has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/383486 )

Change subject: Match hook, avoid warnings
..

Match hook, avoid warnings

Bug: T177897
Change-Id: I2cdb4943f4a861474134cdee7f3988524bada74f
---
M common/Hooks.php
1 file changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/common/Hooks.php b/common/Hooks.php
index ab75dd2..62ca956 100644
--- a/common/Hooks.php
+++ b/common/Hooks.php
@@ -389,12 +389,12 @@
}
 
/**
-* @param Article &$article
+* @param Article $article
 * @param bool &$outputDone
 * @param bool &$pcache
 * @return bool
 */
-   public static function showDocPageHeader( Article &$article, 
&$outputDone, &$pcache ) {
+   public static function showDocPageHeader( Article $article, 
&$outputDone, &$pcache ) {
$title = $article->getTitle();
if ( Scribunto::isDocPage( $title, $forModule ) ) {
$article->getContext()->getOutput()->addHTML(

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2cdb4943f4a861474134cdee7f3988524bada74f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Scribunto
Gerrit-Branch: master
Gerrit-Owner: MarkAHershberger 

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Revert "Enable Vector print logo on test wiki"

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

Change subject: Revert "Enable Vector print logo on test wiki"
..


Revert "Enable Vector print logo on test wiki"

This reverts commit e8ab435a3564ebd3f4f964110b43ca1e8669de98.

Change-Id: Ia7b092e559487058b6a9b5909c4404f44dfe89a1
---
M wmf-config/CommonSettings.php
1 file changed, 0 insertions(+), 14 deletions(-)

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



diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index 8c7ceea..d53b1de 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -650,20 +650,6 @@
wfLoadSkin( 'Timeless' ); // T154371
 }
 
-// The Print logo for Vector should use the same wordmark as Minerva
-// This avoids duplicate config entries (T169732)
-if (
-   isset( $wgMinervaCustomLogos['copyright'] ) &&
-   isset( $wgMinervaCustomLogos['copyright-height'] ) &&
-   isset( $wgMinervaCustomLogos['copyright-width'] )
-) {
-   $wgVectorPrintLogo = [
-   'width' => $wgMinervaCustomLogos['copyright-width'],
-   'height' => $wgMinervaCustomLogos['copyright-height'],
-   'url' =>  $wgMinervaCustomLogos['copyright'],
-   ];
-}
-
 // Grants and rights
 // Note these have to be visible on all wikis, not just the ones the
 // extension is enabled on, for proper display in OAuth pages and such.

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

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

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Revert "Enable Vector print logo on test wiki"

2017-10-10 Thread Thcipriani (Code Review)
Thcipriani has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/383484 )

Change subject: Revert "Enable Vector print logo on test wiki"
..

Revert "Enable Vector print logo on test wiki"

This reverts commit e8ab435a3564ebd3f4f964110b43ca1e8669de98.

Change-Id: Ia7b092e559487058b6a9b5909c4404f44dfe89a1
---
M wmf-config/CommonSettings.php
1 file changed, 0 insertions(+), 14 deletions(-)


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

diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index 8c7ceea..d53b1de 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -650,20 +650,6 @@
wfLoadSkin( 'Timeless' ); // T154371
 }
 
-// The Print logo for Vector should use the same wordmark as Minerva
-// This avoids duplicate config entries (T169732)
-if (
-   isset( $wgMinervaCustomLogos['copyright'] ) &&
-   isset( $wgMinervaCustomLogos['copyright-height'] ) &&
-   isset( $wgMinervaCustomLogos['copyright-width'] )
-) {
-   $wgVectorPrintLogo = [
-   'width' => $wgMinervaCustomLogos['copyright-width'],
-   'height' => $wgMinervaCustomLogos['copyright-height'],
-   'url' =>  $wgMinervaCustomLogos['copyright'],
-   ];
-}
-
 // Grants and rights
 // Note these have to be visible on all wikis, not just the ones the
 // extension is enabled on, for proper display in OAuth pages and such.

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: PageCreate events are no longer flowing

2017-10-10 Thread Nuria (Code Review)
Nuria has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/383485 )

Change subject: PageCreate events are no longer flowing
..

PageCreate events are no longer flowing

Bug: T171629
Change-Id: I7dd1bf3a19bf6b54130b56ce47b47a982dcb648a
---
M hieradata/common.yaml
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/hieradata/common.yaml b/hieradata/common.yaml
index 447584b..7d763a8 100644
--- a/hieradata/common.yaml
+++ b/hieradata/common.yaml
@@ -349,7 +349,7 @@
 #   * CentralNoticeBannerHistory because it can't be inserted into mysql with 
its array property
 #   * ImageMetrics see T141407, these tables are no longer used and yet some 
cached code is still sending events
 #   * PageCreation see T171629, data is available in several other ways
-eventlogging_valid_mixed_schema_blacklist: 
^(Analytics|CentralNoticeBannerHistory|ImageMetricsLoadingTime|ImageMetricsCorsSupport|PageCreation|Popups)$
+eventlogging_valid_mixed_schema_blacklist: 
^(Analytics|CentralNoticeBannerHistory|ImageMetricsLoadingTime|ImageMetricsCorsSupport|Popups)$
 # Used to specify writer handler for eventlogging processor producer.
 eventlogging_kafka_producer_scheme: "kafka-confluent://"
 

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...ContentTranslation[master]: Rename mw.cx.ui.TranslationView to ve.init.mw.CXTarget

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

Change subject: Rename mw.cx.ui.TranslationView to ve.init.mw.CXTarget
..


Rename mw.cx.ui.TranslationView to ve.init.mw.CXTarget

There is some conflict over VE and CX naming conventions,
specifically:
* Target in VE being the root UI element for the editor
* Target in CX possibly meaning the target (not source)
  document
and
* View in VE referring to CE nodes (as opposed to DM model)
* TranslationView being the root UI element for the editor

As mw.cx.ui.TranslationView inherits from ve.init.mw.Target it
is definitely a VE component and therefore should live in
ve-cx and use VE naming conventions, hence being renamed
to ve.init.mw.CXTarget.

To avoid confusion with target documents, local pointers to
the instance of this are called '.veTarget'.

Change-Id: Idbbd4250a7f2381f2cd82c22d7abd88f823d47d1
---
M doc/ContentTranslation-v2.md
M extension.json
M modules/mw.cx.TargetArticle.js
M modules/mw.cx.TranslationController.js
M modules/mw.cx.init.Translation.js
M modules/translation/ext.cx.translation.loader.js
R modules/ve-cx/init/styles/ve.init.mw.CXTarget.less
R modules/ve-cx/init/ve.init.mw.CXTarget.js
8 files changed, 93 insertions(+), 93 deletions(-)

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



diff --git a/doc/ContentTranslation-v2.md b/doc/ContentTranslation-v2.md
index c863a7f..2a86109 100644
--- a/doc/ContentTranslation-v2.md
+++ b/doc/ContentTranslation-v2.md
@@ -26,11 +26,11 @@
 mw.cx.Translation - Save, fetch and restore implementation
 
 mw.cx.TargetArticle - Prepare translation for publishing.
-TODO: Currently instantiated in mw.cx.ui.TranslationView, I think we need to 
move this to mw.cx.Translation
+TODO: Currently instantiated in ve.init.mw.CXTarget, I think we need to move 
this to mw.cx.Translation
 
 User Interface
 --
-mw.cx.ui.TranslationView constructed using
+ve.init.mw.CXTarget constructed using
 1. mw.cx.ui.Header
  1. mw.cx.ui.Infobar
 2. mw.cx.ui.Columns
@@ -38,7 +38,7 @@
  2. mw.cx.ui.TranslationColumn
  3. mw.cx.ui.ToolsColumn
 
-mw.cx.ui.TranslationView prepares the translation unit UI models based on 
translation unit Data models in mw.cx.dm.Translation
+ve.init.mw.CXTarget prepares the translation unit UI models based on 
translation unit Data models in mw.cx.dm.Translation
 
 Translation data models
 ---
@@ -108,7 +108,7 @@
 * If there is a translation corresponding to a source section, 
mw.cx.Translation.prototype.restore will set the target document to that 
translation unit.
 * There is no initialization code for translation unit data models. And 
nothing happens till The UI is ready and UI data models initialized.
 
-Once the translation UI is ready, and source article and saved translation (if 
any) is fetched, it is time for rendering each translation unit in interface. 
mw.cx.ui.TranslationView.prototype.loadTranslation is called by 
mw.cx.init.Translation, which then calls 
mw.cx.ui.TranslationView.prototype.prepareTranslationUnitUIs. This is also a 
non-recursive construction of translation unit UI models. The init method of 
each translation unit is called explicitly.
+Once the translation UI is ready, and source article and saved translation (if 
any) is fetched, it is time for rendering each translation unit in interface. 
ve.init.mw.CXTarget.prototype.loadTranslation is called by 
mw.cx.init.Translation, which then calls 
ve.init.mw.CXTarget.prototype.prepareTranslationUnitUIs. This is also a 
non-recursive construction of translation unit UI models. The init method of 
each translation unit is called explicitly.
 
 The init method of SectionTranslationUnit just initialize the source and 
target section properties and listens for events.
 
@@ -138,8 +138,8 @@
 }
 ```
 
-It is mw.cx.ui.TranslationView that connects the translation units and tools. 
The showTool event from translation unit is handled by mw.cx.ui.TranslationView 
and it fires mw.cx.ui.TranslationView.prototype.showTranslationTool.
+It is ve.init.mw.CXTarget that connects the translation units and tools. The 
showTool event from translation unit is handled by ve.init.mw.CXTarget and it 
fires ve.init.mw.CXTarget.prototype.showTranslationTool.
 
-When a click is received on a translation unit, the unit is activated and it 
emits 'activate' event. On every 'activate' event all translation tools are 
first hidden by the mw.cx.ui.TranslationView.
+When a click is received on a translation unit, the unit is activated and it 
emits 'activate' event. On every 'activate' event all translation tools are 
first hidden by the ve.init.mw.CXTarget.
 
 Nested section translation units are problematic in this case too. Section 
level translation unit tools will be shown more than once when the event 
propagates.
diff --git a/extension.json b/extension.json
index d26046c..a755783 

[MediaWiki-commits] [Gerrit] operations/puppet[production]: annualreport: rm module, merge into profile, fix style

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

Change subject: annualreport: rm module, merge into profile, fix style
..


annualreport: rm module, merge into profile, fix style

Move the Apache includes into the profile where they belong.

This basically means the whole module can be removed
and everything is just a profile, which also has a
"violation delta" of at least -1 (for now until the
Apache module is refactored)

Change-Id: I381a9714e2bcaf996072679d57de27dd1fec0404
---
D modules/annualreport/manifests/init.pp
R modules/profile/files/annualreport/15.wikipedia.org
R modules/profile/files/annualreport/annual.wikimedia.org
M modules/profile/manifests/microsites/annualreport.pp
4 files changed, 17 insertions(+), 24 deletions(-)

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



diff --git a/modules/annualreport/manifests/init.pp 
b/modules/annualreport/manifests/init.pp
deleted file mode 100644
index bd82d14..000
--- a/modules/annualreport/manifests/init.pp
+++ /dev/null
@@ -1,21 +0,0 @@
-# sets up the WMF annual report site - https://annual.wikimedia.org/
-# T599 - https://15.wikipedia.org (aka. annual report 2015)
-class annualreport {
-
-include ::apache
-include ::apache::mod::headers
-
-apache::site { 'annual.wikimedia.org':
-source => 'puppet:///modules/annualreport/annual.wikimedia.org',
-}
-
-apache::site { '15.wikipedia.org':
-source => 'puppet:///modules/annualreport/15.wikipedia.org',
-}
-
-git::clone { 'wikimedia/annualreport':
-ensure=> 'latest',
-directory => '/srv/org/wikimedia/annualreport',
-branch=> 'master',
-}
-}
diff --git a/modules/annualreport/files/15.wikipedia.org 
b/modules/profile/files/annualreport/15.wikipedia.org
similarity index 100%
rename from modules/annualreport/files/15.wikipedia.org
rename to modules/profile/files/annualreport/15.wikipedia.org
diff --git a/modules/annualreport/files/annual.wikimedia.org 
b/modules/profile/files/annualreport/annual.wikimedia.org
similarity index 100%
rename from modules/annualreport/files/annual.wikimedia.org
rename to modules/profile/files/annualreport/annual.wikimedia.org
diff --git a/modules/profile/manifests/microsites/annualreport.pp 
b/modules/profile/manifests/microsites/annualreport.pp
index 232e361..07019d6 100644
--- a/modules/profile/manifests/microsites/annualreport.pp
+++ b/modules/profile/manifests/microsites/annualreport.pp
@@ -1,16 +1,30 @@
+# sets up the WMF annual report site
 # https://annual.wikimedia.org/
-# microsite for the WMF annual report
 # http://wikimediafoundation.org/wiki/Annual_Report
+# T599 - https://15.wikipedia.org (aka. annual report 2015)
 class profile::microsites::annualreport {
 
-include ::annualreport
-
 include ::base::firewall
+include ::apache
+include ::apache::mod::headers
 
 ferm::service { 'annualreport_http':
 proto => 'tcp',
 port  => '80',
 }
 
+apache::site { 'annual.wikimedia.org':
+source => 
'puppet:///modules/profile/annualreport/annual.wikimedia.org',
+}
+
+apache::site { '15.wikipedia.org':
+source => 'puppet:///modules/profile/annualreport/15.wikipedia.org',
+}
+
+git::clone { 'wikimedia/annualreport':
+ensure=> 'latest',
+directory => '/srv/org/wikimedia/annualreport',
+branch=> 'master',
+}
 }
 

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

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

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Enable Vector print logo on test wiki

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

Change subject: Enable Vector print logo on test wiki
..


Enable Vector print logo on test wiki

Bug: T177800
Change-Id: I94725ae35c4ce7138470898de860f81fd7b2227f
---
M wmf-config/CommonSettings.php
1 file changed, 14 insertions(+), 0 deletions(-)

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



diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index d53b1de..8c7ceea 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -650,6 +650,20 @@
wfLoadSkin( 'Timeless' ); // T154371
 }
 
+// The Print logo for Vector should use the same wordmark as Minerva
+// This avoids duplicate config entries (T169732)
+if (
+   isset( $wgMinervaCustomLogos['copyright'] ) &&
+   isset( $wgMinervaCustomLogos['copyright-height'] ) &&
+   isset( $wgMinervaCustomLogos['copyright-width'] )
+) {
+   $wgVectorPrintLogo = [
+   'width' => $wgMinervaCustomLogos['copyright-width'],
+   'height' => $wgMinervaCustomLogos['copyright-height'],
+   'url' =>  $wgMinervaCustomLogos['copyright'],
+   ];
+}
+
 // Grants and rights
 // Note these have to be visible on all wikis, not just the ones the
 // extension is enabled on, for proper display in OAuth pages and such.

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I94725ae35c4ce7138470898de860f81fd7b2227f
Gerrit-PatchSet: 2
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson 
Gerrit-Reviewer: Bmansurov 
Gerrit-Reviewer: Thcipriani 
Gerrit-Reviewer: Urbanecm 
Gerrit-Reviewer: Zoranzoki21 
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...Collection[wmf/1.31.0-wmf.2]: Don't request render if renderer not configured

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

Change subject: Don't request render if renderer not configured
..


Don't request render if renderer not configured

If $mwCollectionMWServeURL is falsy, then don't try make an HTTP request
to the rendering backend. Instead, log a helpful message to the
"collection" log group.

Bug: T177795
Change-Id: Ia33e7f72b4d3cbbea6c8e939ea80ef05c179648f
(cherry picked from commit 2fef1600479c2f288ba973996fd984d346903b6c)
---
M RenderingAPI.php
1 file changed, 8 insertions(+), 0 deletions(-)

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



diff --git a/RenderingAPI.php b/RenderingAPI.php
index 397872d..2593416 100644
--- a/RenderingAPI.php
+++ b/RenderingAPI.php
@@ -301,14 +301,22 @@
// If $serveURL has a | in it, we need to use a proxy.
list( $proxy, $serveURL ) = array_pad( explode( '|', $serveURL, 
2 ), -2, '' );
 
+   if ( !$serveURL ) {
+   wfDebugLog( 'collection', 'The mwlib/OCG render server 
URL isn\'t configured.' );
+
+   return new CollectionAPIResult( false );
+   }
+
$response = Http::post(
$serveURL,
[ 'postData' => $params, 'proxy' => $proxy ],
__METHOD__
);
+
if ( $response === false ) {
wfDebugLog( 'collection', "Request to $serveURL 
resulted in error" );
}
+
return new CollectionAPIResult( $response );
}
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia33e7f72b4d3cbbea6c8e939ea80ef05c179648f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Collection
Gerrit-Branch: wmf/1.31.0-wmf.2
Gerrit-Owner: Jdlrobson 
Gerrit-Reviewer: C. Scott Ananian 
Gerrit-Reviewer: Phuedx 
Gerrit-Reviewer: Thcipriani 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: wikitech: Align 'contentadmin' and 'sysop' permissions

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

Change subject: wikitech: Align 'contentadmin' and 'sysop' permissions
..


wikitech: Align 'contentadmin' and 'sysop' permissions

Three user rights are assigned to sysop's in some extension.json, which is
parsed after the configuration files are read. Hence those aren't
automatically added to contentadmins in the first line (assigning all
sysop permissions to contentadmin). Grant those explicitely. These are:
- Mass delete pages (nuke)
- Send a message to multiple users at once (massmessage)
- View the spam blacklist log (spamblacklistlog)

Also, the user right 'editrestrictedfield' is explicitely removed from
contentadmins. This used to be a right in use with PageForms, an
extension which has been undeployed from wikitech. Removing that line is
just cleanup.

Bug: T171208
Change-Id: I62e8a93760b639cdf0c60f13d117c74065030414
---
M wmf-config/CommonSettings.php
1 file changed, 5 insertions(+), 1 deletion(-)

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



diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index c932ae9..d53b1de 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -2808,13 +2808,17 @@
$wgGroupPermissions['contentadmin'] = $wgGroupPermissions['sysop'];
$wgGroupPermissions['contentadmin']['editusercss'] = false;
$wgGroupPermissions['contentadmin']['edituserjs'] = false;
-   $wgGroupPermissions['contentadmin']['editrestrictedfield'] = false;
$wgGroupPermissions['contentadmin']['editinterface'] = false;
$wgGroupPermissions['contentadmin']['tboverride'] = false;
$wgGroupPermissions['contentadmin']['titleblacklistlog'] = false;
$wgGroupPermissions['contentadmin']['override-antispoof'] = false;
$wgGroupPermissions['contentadmin']['createaccount'] = false;
 
+   // These are somehow not added as they are assigned to 'sysop' in the 
respective extension.json
+   $wgGroupPermissions['contentadmin']['nuke'] = true;
+   $wgGroupPermissions['contentadmin']['massmessage'] = true;
+   $wgGroupPermissions['contentadmin']['spamblacklistlog'] = true;
+
$wgMessageCacheType = 'memcached-pecl';
 
if ( $wgDBname === 'labswiki' ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I62e8a93760b639cdf0c60f13d117c74065030414
Gerrit-PatchSet: 3
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: EddieGP 
Gerrit-Reviewer: Alex Monk 
Gerrit-Reviewer: BryanDavis 
Gerrit-Reviewer: Thcipriani 
Gerrit-Reviewer: Urbanecm 
Gerrit-Reviewer: Zoranzoki21 
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...Wikibase[master]: Fix "Wrapper for …" comments in Scribunto LuaWikibaseLibrary

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

Change subject: Fix "Wrapper for …" comments in Scribunto_LuaWikibaseLibrary
..


Fix "Wrapper for …" comments in Scribunto_LuaWikibaseLibrary

Change-Id: I49699cee55b9e9796b94cd58764264019afb647e
---
M client/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseLibrary.php
1 file changed, 5 insertions(+), 5 deletions(-)

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



diff --git 
a/client/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseLibrary.php 
b/client/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseLibrary.php
index 2a181f3..4290d37 100644
--- a/client/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseLibrary.php
+++ b/client/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseLibrary.php
@@ -380,7 +380,7 @@
}
 
/**
-* Wrapper for getEntityId in WikibaseLuaBindings
+* Wrapper for getEntityId in WikibaseLanguageIndependentLuaBindings
 *
 * @param string|null $pageTitle
 *
@@ -392,7 +392,7 @@
}
 
/**
-* Wrapper for getSetting in WikibaseLuaBindings
+* Wrapper for getSetting in WikibaseLanguageIndependentLuaBindings
 *
 * @param string $setting
 *
@@ -438,7 +438,7 @@
}
 
/**
-* Wrapper for getLabel in Scribunto_LuaWikibaseLibraryImplementation
+* Wrapper for getLabel in WikibaseLanguageDependentLuaBindings
 *
 * @param string $prefixedEntityId
 *
@@ -466,7 +466,7 @@
}
 
/**
-* Wrapper for getDescription in 
Scribunto_LuaWikibaseLibraryImplementation
+* Wrapper for getDescription in WikibaseLanguageDependentLuaBindings
 *
 * @param string $prefixedEntityId
 *
@@ -479,7 +479,7 @@
}
 
/**
-* Wrapper for getSiteLinkPageName in WikibaseLuaBindings
+* Wrapper for getSiteLinkPageName in 
WikibaseLanguageIndependentLuaBindings
 *
 * @param string $prefixedItemId
 * @param string|null $globalSiteId

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I49699cee55b9e9796b94cd58764264019afb647e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Hoo man 
Gerrit-Reviewer: Addshore 
Gerrit-Reviewer: Jackmcbarn 
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...ContentTranslation[master]: Use OOUI buttons for discard/continue translation

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

Change subject: Use OOUI buttons for discard/continue translation
..


Use OOUI buttons for discard/continue translation

Removes the need for a trash icon copy, and removes
the non-standard orange.

Change-Id: I5ad95e2fd2c598d83596143eef2fb2bb7007e381
---
M extension.json
M modules/dashboard/ext.cx.translationlist.js
D modules/dashboard/images/trash_lightgray.png
D modules/dashboard/images/trash_lightgray.svg
D modules/dashboard/images/trash_orange.png
D modules/dashboard/images/trash_orange.svg
M modules/dashboard/styles/ext.cx.translationlist.less
7 files changed, 21 insertions(+), 44 deletions(-)

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



diff --git a/extension.json b/extension.json
index 7027fd2..3b6a772 100644
--- a/extension.json
+++ b/extension.json
@@ -906,7 +906,9 @@
"ext.cx.widgets.overlay",
"jquery.uls.data",
"moment",
-   "oojs-ui.styles.icons-interactions"
+   "oojs-ui.styles.icons-interactions",
+   "oojs-ui.styles.icons-moderation",
+   "oojs-ui.styles.icons-editing-core"
],
"messages": [
"cx-dashboard-header",
diff --git a/modules/dashboard/ext.cx.translationlist.js 
b/modules/dashboard/ext.cx.translationlist.js
index 38fc4c3..87d10b6 100644
--- a/modules/dashboard/ext.cx.translationlist.js
+++ b/modules/dashboard/ext.cx.translationlist.js
@@ -268,8 +268,8 @@
sourceDir, targetDir, $targetTitle,
$translationLink,
$sourceLanguage, $targetLanguage, $languageContainer,
-   $actionsTrigger, $deleteTranslation, $menu, 
$menuContainer,
-   $continueTranslation,
+   $actionsTrigger, deleteTranslation, $menu, 
$menuContainer,
+   continueTranslation,
$titleLanguageBlock,
$translations = [];
 
@@ -350,20 +350,25 @@
 
$actionsTrigger = $( '' )
.addClass( 'cx-tlitem__actions__trigger 
oo-ui-iconElement-icon oo-ui-icon-ellipsis' );
+   $menu = $( '' );
 
// If the translation is draft, allow deleting it
if ( translation.status === 'draft' ) {
-   $deleteTranslation = $( '' )
-   .addClass( 'cx-discard-translation' )
-   .text( mw.msg( 'cx-discard-translation' 
) );
-   $menu = $( '' )
-   .append( $deleteTranslation );
+   deleteTranslation = new OO.ui.ButtonWidget( {
+   framed: false,
+   classes: [ 'cx-discard-translation' ],
+   label: mw.msg( 'cx-discard-translation' 
),
+   icon: 'trash'
+   } );
+   $menu.append( $( '' ).append( 
deleteTranslation.$element ) );
} else if ( translation.status === 'published' ) {
-   $continueTranslation = $( '' )
-   .addClass( 'cx-continue-translation' )
-   .text( mw.msg( 
'cx-continue-translation' ) );
-   $menu = $( '' )
-   .append( $continueTranslation );
+   continueTranslation = new OO.ui.ButtonWidget( {
+   framed: false,
+   classes: [ 'cx-continue-translation' ],
+   icon: 'edit',
+   label: mw.msg( 
'cx-continue-translation' )
+   } );
+   $menu.append( $( '' ).append( 
continueTranslation.$element ) );
}
$menuContainer = $( '' )
.addClass( 'cx-tlitem__actions' )
diff --git a/modules/dashboard/images/trash_lightgray.png 
b/modules/dashboard/images/trash_lightgray.png
deleted file mode 100644
index 8152fc9..000
--- a/modules/dashboard/images/trash_lightgray.png
+++ /dev/null
Binary files differ
diff --git a/modules/dashboard/images/trash_lightgray.svg 
b/modules/dashboard/images/trash_lightgray.svg
deleted file mode 100644
index 7eadf08..000
--- 

[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Bug: T177657 Change-Id: If99f35977700261d4da84d1a05d585d8c57...

2017-10-10 Thread Dbrant (Code Review)
Dbrant has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/383482 )

Change subject: Bug: T177657 Change-Id: 
If99f35977700261d4da84d1a05d585d8c57c8c04
..

Bug: T177657
Change-Id: If99f35977700261d4da84d1a05d585d8c57c8c04
---
M app/src/main/java/org/wikipedia/feed/becauseyouread/BecauseYouReadClient.java
1 file changed, 11 insertions(+), 8 deletions(-)


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

diff --git 
a/app/src/main/java/org/wikipedia/feed/becauseyouread/BecauseYouReadClient.java 
b/app/src/main/java/org/wikipedia/feed/becauseyouread/BecauseYouReadClient.java
index 4cdd80d..f13e477 100644
--- 
a/app/src/main/java/org/wikipedia/feed/becauseyouread/BecauseYouReadClient.java
+++ 
b/app/src/main/java/org/wikipedia/feed/becauseyouread/BecauseYouReadClient.java
@@ -7,6 +7,7 @@
 import org.wikipedia.dataclient.WikiSite;
 import org.wikipedia.dataclient.mwapi.MwQueryResponse;
 import org.wikipedia.feed.dataclient.FeedClient;
+import org.wikipedia.feed.model.Card;
 import org.wikipedia.history.HistoryEntry;
 import org.wikipedia.page.bottomcontent.MainPageReadMoreTopicTask;
 import org.wikipedia.search.FullTextSearchClient;
@@ -36,7 +37,7 @@
 cb.error(new IOException("Error retrieving history entry 
for suggestions"));
 return;
 }
-getCardForHistoryEntry(wiki, entry, cb);
+getCardForHistoryEntry(entry, cb);
 }
 
 @Override public void onCatch(Throwable caught) {
@@ -58,13 +59,17 @@
 }
 }
 
-private void getCardForHistoryEntry(@NonNull WikiSite wiki, @NonNull final 
HistoryEntry entry,
+private void getCardForHistoryEntry(@NonNull final HistoryEntry entry,
 final FeedClient.Callback cb) {
-requestMoreLike(wiki, entry.getTitle().getDisplayText(), null, null, 
SUGGESTION_REQUEST_ITEMS,
-new FullTextSearchClient.Callback() {
+requestMoreLike(entry.getTitle().getWikiSite(), 
entry.getTitle().getDisplayText(),
+null, null, SUGGESTION_REQUEST_ITEMS, new 
FullTextSearchClient.Callback() {
 @Override public void success(@NonNull Call call,
   @NonNull SearchResults results) {
-
cb.success(Collections.singletonList(toBecauseYouReadCard(results, entry)));
+SearchResults filteredResults = SearchResults
+.filter(results, entry.getTitle().getText(), false);
+cb.success(filteredResults.getResults().isEmpty()
+? Collections.emptyList()
+: 
Collections.singletonList(toBecauseYouReadCard(results, entry)));
 }
 
 @Override public void failure(@NonNull Call call,
@@ -77,9 +82,7 @@
 @NonNull private BecauseYouReadCard toBecauseYouReadCard(@NonNull 
SearchResults results,
  @NonNull 
HistoryEntry entry) {
 List itemCards = new ArrayList<>();
-for (SearchResult result : SearchResults
-.filter(results, entry.getTitle().getText(), false)
-.getResults()) {
+for (SearchResult result : results.getResults()) {
 itemCards.add(new BecauseYouReadItemCard(result.getPageTitle()));
 }
 return new BecauseYouReadCard(entry, itemCards);

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If99f35977700261d4da84d1a05d585d8c57c8c04
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Dbrant 

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


[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Properly deserialize MwQueryResult, with postprocessing!

2017-10-10 Thread Dbrant (Code Review)
Dbrant has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/383483 )

Change subject: Properly deserialize MwQueryResult, with postprocessing!
..

Properly deserialize MwQueryResult, with postprocessing!

There are actually a couple of postprocessing steps that need to be
performed on MwQueryResult:

The juicy meat of the response is the "pages" array, which contains
the list of page properties that were requested. However, there is a
separate array called "redirects" that contains a list of redirects that
were performed by the server to come up with the list of titles. There may
also be a list called "converted" that contains a list of titles that were
converted from one language variant to another.

Previously, the postprocessing of redirects was performed as a manual
one-time function when sorting through search results.  And the
"converted" array was not handled at all.

This patch creates a special Gson type adapter that supports post-
processing, and allows MwQueryResult to be post-processed automatically,
so that no one can ever forget to resolve the redirects and the converted
titles.

Bug: T177657
Change-Id: Id8da4bfd6f84e8a10319097e59ec2bdb32ea28b5
---
M app/src/main/java/org/wikipedia/dataclient/mwapi/MwQueryPage.java
M app/src/main/java/org/wikipedia/dataclient/mwapi/MwQueryResult.java
M app/src/main/java/org/wikipedia/json/GsonUtil.java
A app/src/main/java/org/wikipedia/json/PostProcessingTypeAdapter.java
M app/src/main/java/org/wikipedia/pageimages/PageImagesClient.java
M app/src/main/java/org/wikipedia/readinglist/ReadingListPageDetailFetcher.java
M app/src/main/java/org/wikipedia/readinglist/ReadingListPageInfoClient.java
M app/src/main/java/org/wikipedia/search/PrefixSearchClient.java
M 
app/src/test/java/org/wikipedia/search/SearchResultsRedirectProcessingTest.java
9 files changed, 146 insertions(+), 59 deletions(-)


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

diff --git a/app/src/main/java/org/wikipedia/dataclient/mwapi/MwQueryPage.java 
b/app/src/main/java/org/wikipedia/dataclient/mwapi/MwQueryPage.java
index bbdba31..696c331 100644
--- a/app/src/main/java/org/wikipedia/dataclient/mwapi/MwQueryPage.java
+++ b/app/src/main/java/org/wikipedia/dataclient/mwapi/MwQueryPage.java
@@ -29,6 +29,7 @@
 @SuppressWarnings("unused") @SerializedName("imageinfo") @Nullable private 
List imageInfo;
 @SuppressWarnings("unused") @SerializedName("videoinfo") @Nullable private 
List videoInfo;
 @Nullable private String redirectFrom;
+@Nullable private String convertedFrom;
 
 @NonNull public String title() {
 return title;
@@ -79,6 +80,14 @@
 redirectFrom = from;
 }
 
+@Nullable public String convertedFrom() {
+return convertedFrom;
+}
+
+public void convertedFrom(@Nullable String from) {
+convertedFrom = from;
+}
+
 public void appendTitleFragment(@Nullable String fragment) {
 title += "#" + fragment;
 }
diff --git 
a/app/src/main/java/org/wikipedia/dataclient/mwapi/MwQueryResult.java 
b/app/src/main/java/org/wikipedia/dataclient/mwapi/MwQueryResult.java
index ead48be..33552e9 100644
--- a/app/src/main/java/org/wikipedia/dataclient/mwapi/MwQueryResult.java
+++ b/app/src/main/java/org/wikipedia/dataclient/mwapi/MwQueryResult.java
@@ -9,6 +9,7 @@
 import org.wikipedia.dataclient.WikiSite;
 import org.wikipedia.gallery.ImageInfo;
 import org.wikipedia.gallery.VideoInfo;
+import org.wikipedia.json.PostProcessingTypeAdapter;
 import org.wikipedia.model.BaseModel;
 import org.wikipedia.nearby.NearbyPage;
 import org.wikipedia.notifications.Notification;
@@ -22,9 +23,10 @@
 import java.util.Map;
 import java.util.Set;
 
-public class MwQueryResult extends BaseModel {
+public class MwQueryResult extends BaseModel implements 
PostProcessingTypeAdapter.PostProcessable {
 @SuppressWarnings("unused") @Nullable private List pages;
 @SuppressWarnings("unused") @Nullable private List redirects;
+@SuppressWarnings("unused") @Nullable private List 
converted;
 @SuppressWarnings("unused") @SerializedName("userinfo") private UserInfo 
userInfo;
 @SuppressWarnings("unused") @Nullable private List 
users;
 @SuppressWarnings("unused") @Nullable private Tokens tokens;
@@ -36,10 +38,6 @@
 
 @Nullable public List pages() {
 return pages;
-}
-
-@Nullable public List redirects() {
-return redirects;
 }
 
 @Nullable public UserInfo userInfo() {
@@ -147,7 +145,46 @@
 return result;
 }
 
-public static class Redirect {
+@Override
+public void postProcess() {
+resolveConvertedTitles();
+resolveRedirectedTitles();
+}
+
+private void resolveRedirectedTitles() {
+if (redirects == null || pages == null) {
+return;
+}
+for (MwQueryPage page : pages) {
+for 

[MediaWiki-commits] [Gerrit] mediawiki...Collection[master]: Fix table of contents font-size

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

Change subject: Fix table of contents font-size
..

Fix table of contents font-size

Bug: T177892
Change-Id: I30480c91f08afdf4f00b508e4c34921f384acc89
---
M resources/ext.collection.offline/offline.less
1 file changed, 4 insertions(+), 0 deletions(-)


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

diff --git a/resources/ext.collection.offline/offline.less 
b/resources/ext.collection.offline/offline.less
index df1150d..3622c19 100644
--- a/resources/ext.collection.offline/offline.less
+++ b/resources/ext.collection.offline/offline.less
@@ -44,6 +44,10 @@
}
}
 
+   // FIXME: Is there any reason images, license and contributors cannot 
be type chapter ?
+   .mw-book-tocitem-type-images,
+   .mw-book-tocitem-type-license,
+   .mw-book-tocitem-type-contributors,
.mw-book-tocitem-type-chapter {
font-size: 140%;
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I30480c91f08afdf4f00b508e4c34921f384acc89
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Collection
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...Wikibase[master]: Fix "Wrapper for …" comments in Scribunto LuaWikibaseLibrary

2017-10-10 Thread Hoo man (Code Review)
Hoo man has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/383480 )

Change subject: Fix "Wrapper for …" comments in Scribunto_LuaWikibaseLibrary
..

Fix "Wrapper for …" comments in Scribunto_LuaWikibaseLibrary

Change-Id: I49699cee55b9e9796b94cd58764264019afb647e
---
M client/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseLibrary.php
1 file changed, 5 insertions(+), 5 deletions(-)


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

diff --git 
a/client/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseLibrary.php 
b/client/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseLibrary.php
index 2a181f3..4290d37 100644
--- a/client/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseLibrary.php
+++ b/client/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseLibrary.php
@@ -380,7 +380,7 @@
}
 
/**
-* Wrapper for getEntityId in WikibaseLuaBindings
+* Wrapper for getEntityId in WikibaseLanguageIndependentLuaBindings
 *
 * @param string|null $pageTitle
 *
@@ -392,7 +392,7 @@
}
 
/**
-* Wrapper for getSetting in WikibaseLuaBindings
+* Wrapper for getSetting in WikibaseLanguageIndependentLuaBindings
 *
 * @param string $setting
 *
@@ -438,7 +438,7 @@
}
 
/**
-* Wrapper for getLabel in Scribunto_LuaWikibaseLibraryImplementation
+* Wrapper for getLabel in WikibaseLanguageDependentLuaBindings
 *
 * @param string $prefixedEntityId
 *
@@ -466,7 +466,7 @@
}
 
/**
-* Wrapper for getDescription in 
Scribunto_LuaWikibaseLibraryImplementation
+* Wrapper for getDescription in WikibaseLanguageDependentLuaBindings
 *
 * @param string $prefixedEntityId
 *
@@ -479,7 +479,7 @@
}
 
/**
-* Wrapper for getSiteLinkPageName in WikibaseLuaBindings
+* Wrapper for getSiteLinkPageName in 
WikibaseLanguageIndependentLuaBindings
 *
 * @param string $prefixedItemId
 * @param string|null $globalSiteId

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I49699cee55b9e9796b94cd58764264019afb647e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Hoo man 

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


[MediaWiki-commits] [Gerrit] oojs/ui[master]: WikimediaUI theme: Reduce Checkbox*- & RadioSelectInputWidge...

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

Change subject: WikimediaUI theme: Reduce Checkbox*- & RadioSelectInputWidget 
vertical space
..


WikimediaUI theme: Reduce Checkbox*- & RadioSelectInputWidget vertical space

Reducing vertical space taken up by CheckboxMultiselectInputWidget &
RadioSelectInputWidget to be in on par with their JS siblings.

Bug: T177683
Change-Id: Ib00af2f05ba8e3a92c7343e00f5fc438bbb73531
---
M src/themes/wikimediaui/widgets.less
1 file changed, 6 insertions(+), 14 deletions(-)

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



diff --git a/src/themes/wikimediaui/widgets.less 
b/src/themes/wikimediaui/widgets.less
index d4dfebb..754b4a7 100644
--- a/src/themes/wikimediaui/widgets.less
+++ b/src/themes/wikimediaui/widgets.less
@@ -454,14 +454,10 @@
 
 .theme-oo-ui-checkboxMultiselectInputWidget () {
.oo-ui-fieldLayout {
-   margin-top: 0;
+   margin-top: @padding-vertical-label; // 
`@padding-vertical-label` used as `margin-top` here
 
-   .oo-ui-fieldLayout-body {
-   padding: @padding-vertical-label 0;
-
-   .oo-ui-labelElement-label {
-   line-height: @line-height-input-binary-label;
-   }
+   .oo-ui-fieldLayout-body .oo-ui-labelElement-label {
+   line-height: @line-height-input-binary-label;
}
}
 }
@@ -1284,14 +1280,10 @@
 
 .theme-oo-ui-radioSelectInputWidget () {
.oo-ui-fieldLayout {
-   margin-top: 0;
+   margin-top: @padding-vertical-label; // 
`@padding-vertical-label` used as `margin-top` here
 
-   .oo-ui-fieldLayout-body {
-   padding: @padding-vertical-label 0;
-
-   .oo-ui-labelElement-label {
-   line-height: @line-height-input-binary-label;
-   }
+   .oo-ui-fieldLayout-body .oo-ui-labelElement-label {
+   line-height: @line-height-input-binary-label;
}
}
 }

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

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

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


[MediaWiki-commits] [Gerrit] oojs/ui[master]: PHP: Implement SearchInputWidget, deprecate search option

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

Change subject: PHP: Implement SearchInputWidget, deprecate search option
..


PHP: Implement SearchInputWidget, deprecate search option

Bug: T166685
Change-Id: I31caa6a84015c45e313c317aaac0cfbe6db48831
---
M bin/testsuitegenerator.rb
M demos/pages/widgets.php
A php/widgets/SearchInputWidget.php
M php/widgets/TextInputWidget.php
4 files changed, 43 insertions(+), 0 deletions(-)

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



diff --git a/bin/testsuitegenerator.rb b/bin/testsuitegenerator.rb
index 711059f..3770661 100644
--- a/bin/testsuitegenerator.rb
+++ b/bin/testsuitegenerator.rb
@@ -81,6 +81,11 @@
['FieldLayout', 'help'] => [],
['ActionFieldLayout', 'help'] => [],
['FieldsetLayout', 'help'] => [],
+   # the dynamic 'clear' indicator in JS messes everything up
+   ['SearchInputWidget', 'value'] => [],
+   ['SearchInputWidget', 'indicator'] => [],
+   ['SearchInputWidget', 'required'] => [],
+   ['SearchInputWidget', 'disabled'] => [],
# these are defined by Element and would bloat the tests
'classes' => [],
'id' => [],
diff --git a/demos/pages/widgets.php b/demos/pages/widgets.php
index 4848a47..fa48e7d 100644
--- a/demos/pages/widgets.php
+++ b/demos/pages/widgets.php
@@ -368,6 +368,13 @@
]
),
new OOUI\FieldLayout(
+   new OOUI\SearchInputWidget(),
+   [
+   'label' => "SearchInputWidget",
+   'align' => 'top'
+   ]
+   ),
+   new OOUI\FieldLayout(
new OOUI\TextInputWidget( [
'value' => 'Access key: S',
'accessKey' => 's'
diff --git a/php/widgets/SearchInputWidget.php 
b/php/widgets/SearchInputWidget.php
new file mode 100644
index 000..6349479
--- /dev/null
+++ b/php/widgets/SearchInputWidget.php
@@ -0,0 +1,25 @@
+ 'search',
+   ], $config );
+
+   // Parent constructor
+   parent::__construct( $config );
+   }
+
+   protected function getSaneType( $config ) {
+   return 'search';
+   }
+}
diff --git a/php/widgets/TextInputWidget.php b/php/widgets/TextInputWidget.php
index ceab8ae..72abc16 100644
--- a/php/widgets/TextInputWidget.php
+++ b/php/widgets/TextInputWidget.php
@@ -87,6 +87,12 @@
'Use MultilineTextInputWidget instead.'
);
}
+   if ( $config['type'] === 'search' && !( $this instanceof 
SearchInputWidget ) ) {
+   Element::warnDeprecation(
+   'The TextInputWidget "type" => "search" is 
deprecated as of OOjs UI v0.22.2. ' .
+   'Use SearchInputWidget instead.'
+   );
+   }
 
// Traits
$this->initializeIconElement( $config );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I31caa6a84015c45e313c317aaac0cfbe6db48831
Gerrit-PatchSet: 4
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: Prtksxna 
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] oojs/ui[master]: SearchInputWidget: Prevent extra 'oo-ui-textInputWidget-type...

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

Change subject: SearchInputWidget: Prevent extra 
'oo-ui-textInputWidget-type-text' class
..


SearchInputWidget: Prevent extra 'oo-ui-textInputWidget-type-text' class

Prevent the extra 'oo-ui-textInputWidget-type-text' CSS class from
being added by overriding getSaneType(). This causes TextInputWidget
code to add the 'oo-ui-textInputWidget-type-search' class now and
create the right `` element, so remove our code doing this.

Change-Id: Idca36785608f80e25ba62ea4c97c2630fd4f58c5
---
M php/widgets/TextInputWidget.php
M src/widgets/SearchInputWidget.js
M src/widgets/TextInputWidget.js
3 files changed, 4 insertions(+), 9 deletions(-)

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



diff --git a/php/widgets/TextInputWidget.php b/php/widgets/TextInputWidget.php
index e2fdaed..ceab8ae 100644
--- a/php/widgets/TextInputWidget.php
+++ b/php/widgets/TextInputWidget.php
@@ -189,7 +189,7 @@
}
}
 
-   private function getSaneType( $config ) {
+   protected function getSaneType( $config ) {
$allowedTypes = [
'text',
'password',
diff --git a/src/widgets/SearchInputWidget.js b/src/widgets/SearchInputWidget.js
index 478831b..a4fcb7f 100644
--- a/src/widgets/SearchInputWidget.js
+++ b/src/widgets/SearchInputWidget.js
@@ -10,10 +10,6 @@
icon: 'search'
}, config );
 
-   // Set type to text so that TextInputWidget doesn't
-   // get stuck in an infinite loop.
-   config.type = 'text';
-
// Parent constructor
OO.ui.SearchInputWidget.parent.call( this, config );
 
@@ -23,7 +19,6 @@
} );
 
// Initialization
-   this.$element.addClass( 'oo-ui-textInputWidget-type-search' );
this.updateSearchIndicator();
this.connect( this, {
disable: 'onDisable'
@@ -40,8 +35,8 @@
  * @inheritdoc
  * @protected
  */
-OO.ui.SearchInputWidget.prototype.getInputElement = function () {
-   return $( '' ).attr( 'type', 'search' );
+OO.ui.SearchInputWidget.prototype.getSaneType = function () {
+   return 'search';
 };
 
 /**
diff --git a/src/widgets/TextInputWidget.js b/src/widgets/TextInputWidget.js
index 68d698f..a432ba3 100644
--- a/src/widgets/TextInputWidget.js
+++ b/src/widgets/TextInputWidget.js
@@ -388,7 +388,7 @@
  *
  * @param {Object} config Configuration options
  * @return {string|null}
- * @private
+ * @protected
  */
 OO.ui.TextInputWidget.prototype.getSaneType = function ( config ) {
var allowedTypes = [

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Idca36785608f80e25ba62ea4c97c2630fd4f58c5
Gerrit-PatchSet: 2
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: 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/core[master]: Remove outdated code comments in MessagesXx.php files

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

Change subject: Remove outdated code comments in MessagesXx.php files
..


Remove outdated code comments in MessagesXx.php files

MessagesKk_arab.php:
MessagesKk_cyrl.php:
MessagesKk_latn.php:
MessagesRu.php:
* Translations of a comment warning end-users against editing
  localisation messages in these files. That comment was removed
  from  MessagesEn.php in b38247894422fb34dbddaea23cfc08cd72f48d5b,
  as we no longer store localisation messages here.

MessagesKsh.php
* Warning for translators not to use encodings other than UTF-8.

Change-Id: I1ff2cf035b84dc53c368ad7182f294c7fb8f1a3d
---
M languages/messages/MessagesKk_arab.php
M languages/messages/MessagesKk_cyrl.php
M languages/messages/MessagesKk_latn.php
M languages/messages/MessagesKsh.php
M languages/messages/MessagesRu.php
5 files changed, 0 insertions(+), 47 deletions(-)

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



diff --git a/languages/messages/MessagesKk_arab.php 
b/languages/messages/MessagesKk_arab.php
index 72179d6..6032773 100644
--- a/languages/messages/MessagesKk_arab.php
+++ b/languages/messages/MessagesKk_arab.php
@@ -13,17 +13,6 @@
  * @author Urhixidur
  */
 
-/**
- * بۇل قازاقشا تىلدەسۋىنىڭ جەرسىندىرۋ فايلى
- *
- * شەتكى پايدالانۋشىلار: بۇل فايلدى تىكەلەي وڭدەمەڭىز!
- *
- * بۇل فايلداعى وزگەرىستەر باعدارلامالىق جاساقتاما كەزەكتى جاڭارتىلعاندا 
جوعالتىلادى.
- * ۋىيكىيدە ٴوز باپتالىمدارىڭىزدى ىستەي الاسىز.
- * اكىمشى بوپ كىرگەنىڭىزدە, [[ارنايى:بارلىق حابارلار]] دەگەن بەتكە ٴوتىڭىز دە
- * مىندا تىزىمدەلىنگەن مەدىياۋىيكىي:* سىيپاتى بار بەتتەردى وڭدەڭىز.
- */
-
 $fallback = 'kk-cyrl';
 $rtl = true;
 
diff --git a/languages/messages/MessagesKk_cyrl.php 
b/languages/messages/MessagesKk_cyrl.php
index 818a9b6..2857721 100644
--- a/languages/messages/MessagesKk_cyrl.php
+++ b/languages/messages/MessagesKk_cyrl.php
@@ -18,16 +18,6 @@
  * @author Urhixidur
  */
 
-/**
- * Бұл қазақша тілдесуінің жерсіндіру файлы
- *
- * ШЕТКІ ПАЙДАЛАНУШЫЛАР: БҰЛ ФАЙЛДЫ ТІКЕЛЕЙ ӨҢДЕМЕҢІЗ!
- *
- * Бұл файлдағы өзгерістер бағдарламалық жасақтама кезекті жаңартылғанда 
жоғалтылады.
- * Уикиде өз бапталымдарыңызды істей аласыз.
- * Әкімші боп кіргеніңізде, [[Арнайы:Барлық хабарлар]] деген бетке өтіңіз де
- * мында тізімделінген МедиаУики:* сипаты бар беттерді өңдеңіз.
- */
 $separatorTransformTable = [
',' => "\xc2\xa0",
'.' => ',',
diff --git a/languages/messages/MessagesKk_latn.php 
b/languages/messages/MessagesKk_latn.php
index 56d8a58..36e8ecb 100644
--- a/languages/messages/MessagesKk_latn.php
+++ b/languages/messages/MessagesKk_latn.php
@@ -12,17 +12,6 @@
  * @author Urhixidur
  */
 
-/**
- * Bul qazaqşa tildeswiniñ jersindirw faýlı
- *
- * ŞETKİ PAÝDALANWŞILAR: BUL FAÝLDI TİKELEÝ ÖÑDEMEÑİZ!
- *
- * Bul faýldağı özgerister bağdarlamalıq jasaqtama kezekti jañartılğanda 
joğaltıladı.
- * Wïkïde öz baptalımdarıñızdı isteý alasız.
- * Äkimşi bop kirgeniñizde, [[Arnaýı:Barlıq xabarlar]] degen betke ötiñiz de
- * mında tizimdelingen MedïaWïkï:* sïpatı bar betterdi öñdeñiz.
- */
-
 $fallback = 'kk-cyrl';
 
 $separatorTransformTable = [
diff --git a/languages/messages/MessagesKsh.php 
b/languages/messages/MessagesKsh.php
index 164b20a..1fef838 100644
--- a/languages/messages/MessagesKsh.php
+++ b/languages/messages/MessagesKsh.php
@@ -37,13 +37,6 @@
  * Otherwise most part of the following expressions are taken from the 
Akademie.
  *
  */
-/**
- * Hints for editing
- * Avoid ä and other special codings because of legibility for those users,
- * who will take this as a basis for further ripuarian message interfaces
- * ä => ä, ö => ö, ü => ü, Ä => Ä, Ö => Ö, Ãœ => Ü, ß => ß
- * „ => „, “ => “
- */
 
 $fallback = 'de';
 
diff --git a/languages/messages/MessagesRu.php 
b/languages/messages/MessagesRu.php
index 3041abd..b5f310d 100644
--- a/languages/messages/MessagesRu.php
+++ b/languages/messages/MessagesRu.php
@@ -416,14 +416,6 @@
'Amazon.com' => 'https://www.amazon.com/exec/obidos/ISBN=$1'
 ];
 
-/**
- * Изменения сделанные в этом файле будут потеряны при обновлении MediaWiki.
- *
- * Если необходимо внести изменения в перевод отдельных строк интерфейса,
- * сделайте это посредством редактирования страниц вида «MediaWiki:*».
- * Их список можно найти на странице «Special:Allmessages».
- */
-
 $separatorTransformTable = [
',' => "\xc2\xa0", # nbsp
'.' => ','

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1ff2cf035b84dc53c368ad7182f294c7fb8f1a3d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński 
Gerrit-Reviewer: Amire80 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: 

[MediaWiki-commits] [Gerrit] mediawiki...Wikibase[master]: Docs: Discourage use of mw.wikibase.getLabelByLang for getti...

2017-10-10 Thread Hoo man (Code Review)
Hoo man has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/383479 )

Change subject: Docs: Discourage use of mw.wikibase.getLabelByLang for getting 
in user lang
..

Docs: Discourage use of mw.wikibase.getLabelByLang for getting in user lang

This is because this means that the usages depend on who viewed the page
(which they really shouldn't), as this bypasses T173196. That can cause
both DB performance issues (to many DB updates) and inconsistent watchlist
behavior (when does a label change actually affect a page?).

Bug: T173262
Change-Id: I391d6d0049351705a22086e00a9f9ec0760d6ddd
---
M docs/lua.wiki
1 file changed, 2 insertions(+), 0 deletions(-)


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

diff --git a/docs/lua.wiki b/docs/lua.wiki
index 89a1e81..24d117f 100644
--- a/docs/lua.wiki
+++ b/docs/lua.wiki
@@ -75,6 +75,8 @@
 wikibase.getLabelByLang( id, languageCode )
 Get the label from an entity for a specific language, returns the label as 
string or nil if it couldn't be found. This doesn't apply any language 
fallbacks.
 
+'''Note''': This should not be used to get the label in the user's language on 
multilingual wikis, use [[#mw.wikibase.label|mw.wikibase.label]] 
for that if by any means possible.
+
 An example call might look like this:
 
 mw.wikibase.getLabelByLang( 'Q42', 'es' ) -- Returns the Spanish label of the 
item as a string, like "Berlín".

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I391d6d0049351705a22086e00a9f9ec0760d6ddd
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Hoo man 

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


[MediaWiki-commits] [Gerrit] oojs/ui[master]: SearchInputWidget: Prevent extra 'oo-ui-textInputWidget-type...

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

Change subject: SearchInputWidget: Prevent extra 
'oo-ui-textInputWidget-type-text' class
..

SearchInputWidget: Prevent extra 'oo-ui-textInputWidget-type-text' class

Prevent the extra 'oo-ui-textInputWidget-type-text' CSS class from
being added by overriding getSaneType(). This causes TextInputWidget
code to add the 'oo-ui-textInputWidget-type-search' class now and
create the right `` element, so remove our code doing this.

Change-Id: Idca36785608f80e25ba62ea4c97c2630fd4f58c5
---
M php/widgets/TextInputWidget.php
M src/widgets/SearchInputWidget.js
M src/widgets/TextInputWidget.js
3 files changed, 4 insertions(+), 9 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/78/383478/1

diff --git a/php/widgets/TextInputWidget.php b/php/widgets/TextInputWidget.php
index e2fdaed..ceab8ae 100644
--- a/php/widgets/TextInputWidget.php
+++ b/php/widgets/TextInputWidget.php
@@ -189,7 +189,7 @@
}
}
 
-   private function getSaneType( $config ) {
+   protected function getSaneType( $config ) {
$allowedTypes = [
'text',
'password',
diff --git a/src/widgets/SearchInputWidget.js b/src/widgets/SearchInputWidget.js
index 478831b..d94952d 100644
--- a/src/widgets/SearchInputWidget.js
+++ b/src/widgets/SearchInputWidget.js
@@ -10,10 +10,6 @@
icon: 'search'
}, config );
 
-   // Set type to text so that TextInputWidget doesn't
-   // get stuck in an infinite loop.
-   config.type = 'text';
-
// Parent constructor
OO.ui.SearchInputWidget.parent.call( this, config );
 
@@ -23,7 +19,6 @@
} );
 
// Initialization
-   this.$element.addClass( 'oo-ui-textInputWidget-type-search' );
this.updateSearchIndicator();
this.connect( this, {
disable: 'onDisable'
@@ -40,8 +35,8 @@
  * @inheritdoc
  * @protected
  */
-OO.ui.SearchInputWidget.prototype.getInputElement = function () {
-   return $( '' ).attr( 'type', 'search' );
+OO.ui.SearchInputWidget.prototype.getSaneType = function ( config ) {
+   return 'search';
 };
 
 /**
diff --git a/src/widgets/TextInputWidget.js b/src/widgets/TextInputWidget.js
index 68d698f..a432ba3 100644
--- a/src/widgets/TextInputWidget.js
+++ b/src/widgets/TextInputWidget.js
@@ -388,7 +388,7 @@
  *
  * @param {Object} config Configuration options
  * @return {string|null}
- * @private
+ * @protected
  */
 OO.ui.TextInputWidget.prototype.getSaneType = function ( config ) {
var allowedTypes = [

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idca36785608f80e25ba62ea4c97c2630fd4f58c5
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...VisualEditor[master]: init.mw.Target: make getSurfaceConfig aware of modes

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

Change subject: init.mw.Target: make getSurfaceConfig aware of modes
..


init.mw.Target: make getSurfaceConfig aware of modes

ve.init.Target sets up TriggerListeners based on getSurfaceConfig if there's
no Surface instantiated. As such, loading directly in source mode would have
those listeners present and assuming the document is in visual mode. So, if
there's not a Surface already, we'll assume we're going to get one created
with the defaultMode, and set things up expecting that.

Bug: T153959
Change-Id: Ia0afe32e6b63ea0d3418137ca5c8bc32c009ecfa
---
M modules/ve-mw/init/ve.init.mw.Target.js
1 file changed, 14 insertions(+), 3 deletions(-)

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



diff --git a/modules/ve-mw/init/ve.init.mw.Target.js 
b/modules/ve-mw/init/ve.init.mw.Target.js
index 2fc7b9c..08d17f2 100644
--- a/modules/ve-mw/init/ve.init.mw.Target.js
+++ b/modules/ve-mw/init/ve.init.mw.Target.js
@@ -310,9 +310,6 @@
// Preserve empty linebreaks on paste in source editor
importRules.all.keepEmptyContentBranches = true;
config = this.getSurfaceConfig( ve.extendObject( {}, config, {
-   commandRegistry: ve.ui.wikitextCommandRegistry,
-   sequenceRegistry: ve.ui.wikitextSequenceRegistry,
-   dataTransferHandlerFactory: 
ve.ui.wikitextDataTransferHandlerFactory,
importRules: importRules
} ) );
return new ve.ui.MWWikitextSurface( dmDoc, config );
@@ -342,6 +339,20 @@
 };
 
 /**
+ * @inheritdoc
+ */
+ve.init.mw.Target.prototype.getSurfaceConfig = function ( config ) {
+   // If we're not asking for a specific mode's config, use the default 
mode.
+   config = ve.extendObject( { mode: this.defaultMode }, config );
+   return ve.init.mw.Target.super.prototype.getSurfaceConfig.call( this, 
ve.extendObject( {
+   // Provide the wikitext versions of the registries, if we're 
using source mode
+   commandRegistry: config.mode === 'source' ? 
ve.ui.wikitextCommandRegistry : ve.ui.commandRegistry,
+   sequenceRegistry: config.mode === 'source' ? 
ve.ui.wikitextSequenceRegistry : ve.ui.sequenceRegistry,
+   dataTransferHandlerFactory: config.mode === 'source' ? 
ve.ui.wikitextDataTransferHandlerFactory : ve.ui.dataTransferHandlerFactory
+   }, config ) );
+};
+
+/**
  * Switch to editing mode.
  *
  * @method

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia0afe32e6b63ea0d3418137ca5c8bc32c009ecfa
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: DLynch 
Gerrit-Reviewer: Divec 
Gerrit-Reviewer: Esanders 
Gerrit-Reviewer: jenkins-bot <>

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


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

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

Change subject: Update GUI
..


Update GUI

Change-Id: I3e6b07d1ddfb4521337727ddedd3656d133a16db
---
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 54d9748..3007a2a 16
--- a/gui
+++ b/gui
@@ -1 +1 @@
-Subproject commit 54d9748cb924d504fac873edfb93b88d6d2fbb09
+Subproject commit 3007a2aa07d25607186087fa92da3557b5563b74

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3e6b07d1ddfb4521337727ddedd3656d133a16db
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] mediawiki...UniversalLanguageSelector[master]: Show the same tooltips on compact language links

2017-10-10 Thread Amire80 (Code Review)
Amire80 has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/383477 )

Change subject: Show the same tooltips on compact language links
..

Show the same tooltips on compact language links

Bug: T160976
Change-Id: If3dd416e4a6f13b7b1366d30a1a3807a505346cb
---
M resources/js/ext.uls.compactlinks.js
1 file changed, 5 insertions(+), 2 deletions(-)


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

diff --git a/resources/js/ext.uls.compactlinks.js 
b/resources/js/ext.uls.compactlinks.js
index 13ad20d..ed72f86 100644
--- a/resources/js/ext.uls.compactlinks.js
+++ b/resources/js/ext.uls.compactlinks.js
@@ -172,12 +172,15 @@
},
languageDecorator: function ( $languageLink, language ) 
{
var data = self.interlanguageList[ language ];
-   // set href and text exactly same as what was in
+   // Set href, text, and tooltip exactly same as 
what was in
// interlanguage link. The ULS autonym might be 
different in some
// cases like sr. In ULS it is "српски", while 
in interlanguage links
// it is "српски / srpski"
$languageLink
-   .prop( 'href', data.href )
+   .prop( {
+   'href': data.href,
+   'title': data.element.title
+   } )
.text( data.autonym );
 
// This code is to support badges used in 
Wikimedia

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...Collection[master]: WIP: Add tests for the fixTemplateData method

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

Change subject: WIP: Add tests for the fixTemplateData method
..

WIP: Add tests for the fixTemplateData method

The previous patch surfaced an issue in that code. Let's ensure
we've captured all possible edge cases here.

Change-Id: Ifaf12815f56706a7393544564400803b99bc72eb
---
M includes/BookRenderer.php
M tests/phpunit/includes/BookRendererTest.php
2 files changed, 46 insertions(+), 5 deletions(-)


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

diff --git a/includes/BookRenderer.php b/includes/BookRenderer.php
index e5d0d50..ad36066 100644
--- a/includes/BookRenderer.php
+++ b/includes/BookRenderer.php
@@ -333,14 +333,18 @@
 * @param array $data
 * @return array
 */
-   private function fixTemplateData( $data ) {
+   public function fixTemplateData( $data ) {
$fixedData = [];
if ( !is_array( $data ) ) {
return $data;
}
foreach ( $data as $field => $value ) {
// treat 0/'0' as truthy
-   $fixedData[$field . '?'] = !in_array( $value, [ false, 
[], '' ], true );
+   if ( is_array( $value ) ) {
+   $fixedData[$field . '?'] = !in_array( $value, [ 
false, [], '' ], true );
+   } else if ( is_string( $value ) ) {
+   $fixedData[$field . '?'] = (bool)$value;
+   }
if ( is_array( $value ) ) {
if ( array_keys( $value ) === array_keys( 
array_values( $value ) ) ) {
// consecutive numeric keys - treat as 
an array
diff --git a/tests/phpunit/includes/BookRendererTest.php 
b/tests/phpunit/includes/BookRendererTest.php
index e7d2ad3..a9eb961 100644
--- a/tests/phpunit/includes/BookRendererTest.php
+++ b/tests/phpunit/includes/BookRendererTest.php
@@ -8,21 +8,58 @@
 use Title;
 
 class BookRendererTest extends MediaWikiTestCase {
+   const TEMPLATE_DIR = '/../../../templates';
+
/**
 * @dataProvider provideGetBookTemplateDataOutlineGeneration
 */
public function testGetBookTemplateDataOutlineGeneration(
$collection, $pages, $metadata, $expectedOutline
) {
-   $templateParser = new TemplateParser( __DIR__ . 
'/../../../templates' );
+   $templateParser = new TemplateParser( __DIR__ . 
self::TEMPLATE_DIR );
$renderer = new BookRenderer( $templateParser );
$data = $renderer->getBookTemplateData( $collection, $pages, 
$metadata );
$this->assertArraySame( $renderer->getNestedOutline( 
$expectedOutline ), $data['toc']['tocitems'],
'Check table of contents generation' );
}
 
+   public function testfixTemplateData() {
+   $templateParser = new TemplateParser( __DIR__ . 
self::TEMPLATE_DIR );
+   $renderer = new BookRenderer( $templateParser );
+   $fixedData = $renderer->fixTemplateData( [
+   'a' => false,
+   'b' => [],
+   'c' => [
+   'd' => [ 'a', 'b', 'c' ],
+   'e' => false,
+   'f' => [
+   'g' => [ 'a', 'b', 'c' ],
+   ],
+   ],
+   'd' => 'hello world'
+   ] );
+   $this->assertArraySame( $fixedData, [
+   'a' => false,
+   'b?' => false,
+   'b' => [],
+   'c?' => true,
+   'c' => [
+   'd?' => true,
+   'd' => [ 'a', 'b', 'c' ],
+   'e' => false,
+   'f?' => true,
+   'f' => [
+   'g?' => true,
+   'g' => [ 'a', 'b', 'c' ],
+   ],
+   ],
+   'd?' => true,
+   'd' => 'hello world',
+   ] );
+   }
+
public function testGetBookTemplateDataImagesGeneration() {
-   $templateParser = new TemplateParser( __DIR__ . 
'/../../../templates' );
+   $templateParser = new TemplateParser( __DIR__ . 
self::TEMPLATE_DIR );
$renderer = new BookRenderer( $templateParser );
$collection = [ 'items' => [], 'title' => 'Empty book' ];
$data = $renderer->getBookTemplateData( $collection, [], [] );
@@ 

[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Fix: Update license text files to use content:// URIs

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

Change subject: Fix: Update license text files to use content:// URIs
..

Fix: Update license text files to use content:// URIs

This should allow them to be displayed on all devices including those
on 7.0 and above.

Bug: T164439
Change-Id: If28915142b881cea35ae1317fde963a4f190b95d
---
M app/src/main/AndroidManifest.xml
M app/src/main/res/values/credits.xml
2 files changed, 12 insertions(+), 12 deletions(-)


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

diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 99579f2..9767379 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -169,7 +169,7 @@
 
 
 
-
+
 
 
 Adam Baso, Amir E. Aharoni, Anirudh S, 
Bernd Sitzmann, Brion Vibber, Dan Garry, Dmitry Brant, Elena Tonkovidova, Kaity 
Hammerstein, Kenan Wang, Maryana Pinchuk, Matanya Moses, Max Semenik, Michael 
Holloway, Moiz Syed, Monte Hurd, Mun May Tee, Nicole Borrelli, Niklas 
Laxström, Rita Ho, Rummana Yasmeen, Stephen Niedzielski, Thomas PT, Tomasz 
Finc, Vibha Bamba, Yuvi Panda
 https://jakewharton.github.io/butterknife/;>ButterKnife
 
-(license),
+(license),
 
 https://commons.apache.org/proper/commons-lang/;>Commons 
Lang
 
-(license),
+(license),
 
 http://frescolib.org/;>Fresco
 
-(license),
+(license),
 
 https://hockeyapp.net/;>HockeySDK-Android
 
-(license),
+(license),
 
 https://github.com/jhy/jsoup;>jsoup
 
-(license),
+(license),
 
 https://www.mapbox.com/android-sdk/;>Mapbox Android SDK
 
-(license),
+(license),
 
 https://square.github.io/otto/;>Otto
 
-(license),
+(license),
 
 https://github.com/romandanylyk/PageIndicatorView;>PageIndicatorView
 
-(license),
+(license),
 
 https://square.github.io/retrofit/;>Retrofit
 
-(license)
+(license)
 
 https://github.com/KeepSafe/TapTargetView;>TapTargetView
 
-(license)
+(license)
 
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If28915142b881cea35ae1317fde963a4f190b95d
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Mholloway 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Ensure only strings are passed to mysql_real_escape_string()

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

Change subject: Ensure only strings are passed to mysql_real_escape_string()
..


Ensure only strings are passed to mysql_real_escape_string()

Under some conditions (Semantic MediaWiki, Gadgets), an integer is
passed to DatabaseMysqli::mysqlRealEscapeString (). This integer is, in
turn, passed to mysqli::real_escape_string (), which needs a string.

Under HHVM 3.19.1 (at least) this type mismatch causes an exception.

A typecast should prevent it.

I repeated the patch in other DB drivers where I could find a function
that escaped strings for SQL.

Bug: T163646
Change-Id: I1b7820bc064dc79498cf9f17747f745990c526b7
---
M includes/libs/rdbms/database/DatabaseMssql.php
M includes/libs/rdbms/database/DatabaseMysql.php
M includes/libs/rdbms/database/DatabaseMysqli.php
M includes/libs/rdbms/database/DatabasePostgres.php
M includes/libs/rdbms/database/DatabaseSqlite.php
5 files changed, 7 insertions(+), 8 deletions(-)

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



diff --git a/includes/libs/rdbms/database/DatabaseMssql.php 
b/includes/libs/rdbms/database/DatabaseMssql.php
index 4ebc623..8a69eec 100644
--- a/includes/libs/rdbms/database/DatabaseMssql.php
+++ b/includes/libs/rdbms/database/DatabaseMssql.php
@@ -1065,7 +1065,6 @@
 */
public function strencode( $s ) {
// Should not be called by us
-
return str_replace( "'", "''", $s );
}
 
diff --git a/includes/libs/rdbms/database/DatabaseMysql.php 
b/includes/libs/rdbms/database/DatabaseMysql.php
index d81d909..58b0926 100644
--- a/includes/libs/rdbms/database/DatabaseMysql.php
+++ b/includes/libs/rdbms/database/DatabaseMysql.php
@@ -203,7 +203,7 @@
protected function mysqlRealEscapeString( $s ) {
$conn = $this->getBindingHandle();
 
-   return mysql_real_escape_string( $s, $conn );
+   return mysql_real_escape_string( (string)$s, $conn );
}
 }
 
diff --git a/includes/libs/rdbms/database/DatabaseMysqli.php 
b/includes/libs/rdbms/database/DatabaseMysqli.php
index 4c3cbdd..c1a5698 100644
--- a/includes/libs/rdbms/database/DatabaseMysqli.php
+++ b/includes/libs/rdbms/database/DatabaseMysqli.php
@@ -316,7 +316,7 @@
protected function mysqlRealEscapeString( $s ) {
$conn = $this->getBindingHandle();
 
-   return $conn->real_escape_string( $s );
+   return $conn->real_escape_string( (string)$s );
}
 
/**
diff --git a/includes/libs/rdbms/database/DatabasePostgres.php 
b/includes/libs/rdbms/database/DatabasePostgres.php
index 5719a1f..5a7da49 100644
--- a/includes/libs/rdbms/database/DatabasePostgres.php
+++ b/includes/libs/rdbms/database/DatabasePostgres.php
@@ -1175,7 +1175,7 @@
 
public function strencode( $s ) {
// Should not be called by us
-   return pg_escape_string( $this->getBindingHandle(), $s );
+   return pg_escape_string( $this->getBindingHandle(), (string)$s 
);
}
 
public function addQuotes( $s ) {
@@ -1196,7 +1196,7 @@
return 'DEFAULT';
}
 
-   return "'" . pg_escape_string( $conn, $s ) . "'";
+   return "'" . pg_escape_string( $conn, (string)$s ) . "'";
}
 
/**
diff --git a/includes/libs/rdbms/database/DatabaseSqlite.php 
b/includes/libs/rdbms/database/DatabaseSqlite.php
index 870fc3e..2b06607 100644
--- a/includes/libs/rdbms/database/DatabaseSqlite.php
+++ b/includes/libs/rdbms/database/DatabaseSqlite.php
@@ -790,7 +790,7 @@
return "x'" . bin2hex( $s->fetch() ) . "'";
} elseif ( is_bool( $s ) ) {
return (int)$s;
-   } elseif ( strpos( $s, "\0" ) !== false ) {
+   } elseif ( strpos( (string)$s, "\0" ) !== false ) {
// SQLite doesn't support \0 in strings, so use the hex 
representation as a workaround.
// This is a known limitation of SQLite's mprintf 
function which PDO
// should work around, but doesn't. I have reported 
this to php.net as bug #63419:
@@ -806,9 +806,9 @@
'For consistency all binary data should have 
been ' .
'first processed with self::encodeBlob()'
);
-   return "x'" . bin2hex( $s ) . "'";
+   return "x'" . bin2hex( (string)$s ) . "'";
} else {
-   return $this->mConn->quote( $s );
+   return $this->mConn->quote( (string)$s );
}
}
 

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Switch test wikis to HTML5 fragment mode in links

2017-10-10 Thread MaxSem (Code Review)
MaxSem has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/383473 )

Change subject: Switch test wikis to HTML5 fragment mode in links
..

Switch test wikis to HTML5 fragment mode in links

To be merged on October 14 or later, 1 month from
Id18f8a8c2b402e4d3c22d6b5c15fc8abaacbf16a.

Bug: T152540
Change-Id: I81f92dac58983062b0c91bcd9c9bbf411948d8fb
---
M wmf-config/InitialiseSettings.php
1 file changed, 2 insertions(+), 0 deletions(-)


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index b8e7692..d8326b5 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -19600,6 +19600,8 @@
 // T152540
 'wgFragmentMode' => [
'default' => [ 'legacy', 'html5' ],
+   'testwiki' => [ 'html5', 'legacy' ],
+   'test2wiki' => [ 'html5', 'legacy' ],
 ],
 
 'wmgUse3d' => [

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

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

___
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-10-10 Thread Smalyshev (Code Review)
Smalyshev has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/383474 )

Change subject: Update GUI
..

Update GUI

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


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

diff --git a/gui b/gui
index 54d9748..3007a2a 16
--- a/gui
+++ b/gui
@@ -1 +1 @@
-Subproject commit 54d9748cb924d504fac873edfb93b88d6d2fbb09
+Subproject commit 3007a2aa07d25607186087fa92da3557b5563b74

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3e6b07d1ddfb4521337727ddedd3656d133a16db
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] wikidata...gui-deploy[production]: Merging from 3007a2aa07d25607186087fa92da3557b5563b74:

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

Change subject: Merging from 3007a2aa07d25607186087fa92da3557b5563b74:
..


Merging from 3007a2aa07d25607186087fa92da3557b5563b74:

Hide embed logo after rendering result

If result view does not use 100% VH Wikidata logo should not be visible
after rendering result.

Change-Id: I2f886721164b7ed189faf0039dfe8f3fa45c8a82
---
R css/embed.style.min.807b59dbba1bf3666c02.css
R css/style.min.1f2494a82547230de3f0.css
M embed.html
M i18n/cs.json
M index.html
D js/embed.wdqs.min.f8e74f358d5dfb016755.js
A js/embed.wdqs.min.fb28c32d66b8acd05676.js
A js/wdqs.min.68b2b024ef7b75f881cb.js
D js/wdqs.min.9998ea6535715df0075e.js
9 files changed, 11 insertions(+), 9 deletions(-)

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




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

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

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


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

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

Change subject: Merging from 3007a2aa07d25607186087fa92da3557b5563b74:
..

Merging from 3007a2aa07d25607186087fa92da3557b5563b74:

Hide embed logo after rendering result

If result view does not use 100% VH Wikidata logo should not be visible
after rendering result.

Change-Id: I2f886721164b7ed189faf0039dfe8f3fa45c8a82
---
R css/embed.style.min.807b59dbba1bf3666c02.css
R css/style.min.1f2494a82547230de3f0.css
M embed.html
M i18n/cs.json
M index.html
D js/embed.wdqs.min.f8e74f358d5dfb016755.js
A js/embed.wdqs.min.fb28c32d66b8acd05676.js
A js/wdqs.min.68b2b024ef7b75f881cb.js
D js/wdqs.min.9998ea6535715df0075e.js
9 files changed, 11 insertions(+), 9 deletions(-)


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


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2f886721164b7ed189faf0039dfe8f3fa45c8a82
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] mediawiki...Echo[master]: Replace vendor prefixed `box-shadow` with central mixin

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

Change subject: Replace vendor prefixed `box-shadow` with central mixin
..


Replace vendor prefixed `box-shadow` with central mixin

Replacing vendor prefixed `box-shadow` with LESS mixin out of
mediawiki.mixins.less. This also removes obsolete `-moz-box-shadow`
saving some bytes.

Change-Id: I336ee7340bc518fef74762a8381495265dd3eb4b
---
M modules/styles/mw.echo.ui.CrossWikiNotificationItemWidget.less
1 file changed, 2 insertions(+), 3 deletions(-)

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



diff --git a/modules/styles/mw.echo.ui.CrossWikiNotificationItemWidget.less 
b/modules/styles/mw.echo.ui.CrossWikiNotificationItemWidget.less
index deb8b70..473bcb2 100644
--- a/modules/styles/mw.echo.ui.CrossWikiNotificationItemWidget.less
+++ b/modules/styles/mw.echo.ui.CrossWikiNotificationItemWidget.less
@@ -1,3 +1,4 @@
+@import 'mediawiki.mixins';
 @import '../echo.variables';
 
 .mw-echo-ui-crossWikiNotificationItemWidget,
@@ -54,9 +55,7 @@
cursor: default;
padding: @bundle-group-padding;
background-color: #f8f9fa;
-   -webkit-box-shadow: inset 0 -2px 0 0 rgba( 0, 0, 0, 0.05 ), 
inset 0 2px 0 0 rgba( 0, 0, 0, 0.05 );
-   -moz-box-shadow: inset 0 -2px 0 0 rgba( 0, 0, 0, 0.05 ), inset 
0 2px 0 0 rgba( 0, 0, 0, 0.05 );
-   box-shadow: inset 0 -2px 0 0 rgba( 0, 0, 0, 0.05 ), inset 0 2px 
0 0 rgba( 0, 0, 0, 0.05 );
+   .box-shadow( inset 0 -2px 0 0 rgba( 0, 0, 0, 0.05 ), inset 0 
2px 0 0 rgba( 0, 0, 0, 0.05 ); );
border-bottom: 1px solid #ddd;
margin-bottom: 0.4em;
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I336ee7340bc518fef74762a8381495265dd3eb4b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: VolkerE 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] oojs/ui[master]: Generalize icon and indicator positioning & visibility

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

Change subject: Generalize icon and indicator positioning & visibility
..


Generalize icon and indicator positioning & visibility

Generalizing icon and indicator positioning & visibility
foremost in WikimediaUI theme. This results in much cleaner
and simpler output, easier debuggability and saves about
2% output CSS.

Bug: T161177
Change-Id: I9d0cbf5d069ae0ecdb56501fb6f352ba68d29c1f
---
M src/styles/elements/ButtonElement.less
M src/styles/elements/IconElement.less
M src/styles/elements/IndicatorElement.less
M src/styles/layouts/FieldsetLayout.less
M src/styles/toolgroups/BarToolGroup.less
M src/styles/toolgroups/PopupToolGroup.less
M src/styles/widgets/ButtonOptionWidget.less
M src/styles/widgets/CapsuleMultiselectWidget.less
M src/styles/widgets/DecoratedOptionWidget.less
M src/styles/widgets/DropdownWidget.less
M src/styles/widgets/SelectFileWidget.less
M src/styles/widgets/TextInputWidget.less
M src/themes/apex/elements.less
M src/themes/apex/layouts.less
M src/themes/apex/tools.less
M src/themes/apex/widgets.less
M src/themes/wikimediaui/elements.less
M src/themes/wikimediaui/layouts.less
M src/themes/wikimediaui/tools.less
M src/themes/wikimediaui/widgets.less
20 files changed, 152 insertions(+), 154 deletions(-)

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



diff --git a/src/styles/elements/ButtonElement.less 
b/src/styles/elements/ButtonElement.less
index 67524b9..c89263b 100644
--- a/src/styles/elements/ButtonElement.less
+++ b/src/styles/elements/ButtonElement.less
@@ -20,23 +20,10 @@
border-color: transparent;
padding: 0;
}
-
-   > .oo-ui-iconElement-icon,
-   > .oo-ui-indicatorElement-indicator {
-   display: none;
-   }
}
 
&.oo-ui-widget-disabled > .oo-ui-buttonElement-button {
cursor: default;
-   }
-
-   &.oo-ui-indicatorElement > .oo-ui-buttonElement-button > 
.oo-ui-indicatorElement-indicator,
-   &.oo-ui-labelElement > .oo-ui-buttonElement-button > 
.oo-ui-labelElement-label,
-   &-frameless.oo-ui-iconElement > .oo-ui-buttonElement-button > 
.oo-ui-iconElement-icon {
-   // Vertical align text
-   display: inline-block;
-   vertical-align: middle;
}
 
&-frameless {
diff --git a/src/styles/elements/IconElement.less 
b/src/styles/elements/IconElement.less
index 120454b..a7bdc13 100644
--- a/src/styles/elements/IconElement.less
+++ b/src/styles/elements/IconElement.less
@@ -6,12 +6,15 @@
background-size: contain;
background-position: center center;
background-repeat: no-repeat;
+   display: none;
+   position: absolute;
+   top: 0;
// Support: IE11, Edge 12+ (T94494), Firefox 31.5 (T93636)
min-width: @min-size-icon;
width: @size-icon;
// Support: IE11, Edge 12+ (T94494), Firefox 31.5 (T93636)
min-height: @min-size-icon;
-   height: @size-icon;
+   height: 100%;
}
 
.theme-oo-ui-iconElement();
diff --git a/src/styles/elements/IndicatorElement.less 
b/src/styles/elements/IndicatorElement.less
index b4a6a6d..9819345 100644
--- a/src/styles/elements/IndicatorElement.less
+++ b/src/styles/elements/IndicatorElement.less
@@ -6,12 +6,15 @@
background-size: contain;
background-position: center center;
background-repeat: no-repeat;
+   display: none;
+   position: absolute;
+   top: 0;
// Support: IE11, Edge 12+ (T94494), Firefox 31.5 (T93636)
min-width: @min-size-indicator;
width: @size-indicator;
// Support: IE11, Edge 12+ (T94494), Firefox 31.5 (T93636)
min-height: @min-size-indicator;
-   height: @size-indicator;
+   height: 100%;
}
 
.theme-oo-ui-indicatorElement();
diff --git a/src/styles/layouts/FieldsetLayout.less 
b/src/styles/layouts/FieldsetLayout.less
index aaee46b..8d8e8e1 100644
--- a/src/styles/layouts/FieldsetLayout.less
+++ b/src/styles/layouts/FieldsetLayout.less
@@ -11,11 +11,6 @@
display: table-cell; // Prevent overflowing content in Firefox 
(responsive layouts)
}
 
-   &.oo-ui-iconElement > .oo-ui-fieldsetLayout-header > 
.oo-ui-iconElement-icon {
-   display: block;
-   position: absolute;
-   }
-
&.oo-ui-labelElement > .oo-ui-fieldsetLayout-header {
color: inherit; // Correct the color inheritance from 
`fieldset` elements in IE
display: inline-table; // Correct the 

[MediaWiki-commits] [Gerrit] operations/dns[master]: Revert "Depool esams for expected blips during ASN renumbering"

2017-10-10 Thread BBlack (Code Review)
BBlack has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/383462 )

Change subject: Revert "Depool esams for expected blips during ASN renumbering"
..


Revert "Depool esams for expected blips during ASN renumbering"

This reverts commit 199e80e36a182deb1054ac8d405661c18837bb79.

Change-Id: I4add93d9e76f08dd74e62cb8d146d4f69492dfd8
---
M admin_state
1 file changed, 0 insertions(+), 3 deletions(-)

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



diff --git a/admin_state b/admin_state
index 4d7ce93..54ee433 100644
--- a/admin_state
+++ b/admin_state
@@ -72,6 +72,3 @@
 ### v T164610 - semi-permanent to avoid confusion until T164609
 geoip/misc-addrs/ulsfo => DOWN
 ### ^ T164610 - semi-permanent to avoid confusion until T164609
-
-# esams AS renumbering - T167840
-geoip/generic-map/esams => DOWN

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4add93d9e76f08dd74e62cb8d146d4f69492dfd8
Gerrit-PatchSet: 2
Gerrit-Project: operations/dns
Gerrit-Branch: master
Gerrit-Owner: BBlack 
Gerrit-Reviewer: Ayounsi 
Gerrit-Reviewer: BBlack 
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...Echo[master]: Replace subtle greys with WikimediaUI color palette ones

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

Change subject: Replace subtle greys with WikimediaUI color palette ones
..


Replace subtle greys with WikimediaUI color palette ones

Bug: T177723
Change-Id: Iceafe2f3e702667e0ee68b79ddcb6aa4d8fd0010
---
M modules/styles/mw.echo.ui.FooterNoticeWidget.less
M modules/styles/mw.echo.ui.MenuItemWidget.less
M modules/styles/mw.echo.ui.NotificationBadgeWidget.less
M modules/styles/mw.echo.ui.NotificationItemWidget.less
M modules/styles/mw.echo.ui.SpecialHelpMenuWidget.less
M modules/styles/mw.echo.ui.overlay.minerva.less
6 files changed, 10 insertions(+), 10 deletions(-)

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



diff --git a/modules/styles/mw.echo.ui.FooterNoticeWidget.less 
b/modules/styles/mw.echo.ui.FooterNoticeWidget.less
index 8bc9c7d..ff8cd7b 100644
--- a/modules/styles/mw.echo.ui.FooterNoticeWidget.less
+++ b/modules/styles/mw.echo.ui.FooterNoticeWidget.less
@@ -3,7 +3,7 @@
 
 .mw-echo-ui-footerNoticeWidget {
padding: 0.5em;
-   border-bottom: 1px solid #ddd;
+   border-bottom: 1px solid #c8ccd1;
white-space: normal;
line-height: 16px;
 
diff --git a/modules/styles/mw.echo.ui.MenuItemWidget.less 
b/modules/styles/mw.echo.ui.MenuItemWidget.less
index 6c955fd..77ca9c5 100644
--- a/modules/styles/mw.echo.ui.MenuItemWidget.less
+++ b/modules/styles/mw.echo.ui.MenuItemWidget.less
@@ -27,7 +27,7 @@
max-width: 15em;
 
&-description {
-   color: #666 !important;
+   color: #54595d !important;
}
}
 
diff --git a/modules/styles/mw.echo.ui.NotificationBadgeWidget.less 
b/modules/styles/mw.echo.ui.NotificationBadgeWidget.less
index 73092a7..7ccda22 100644
--- a/modules/styles/mw.echo.ui.NotificationBadgeWidget.less
+++ b/modules/styles/mw.echo.ui.NotificationBadgeWidget.less
@@ -13,7 +13,7 @@
> .oo-ui-popupWidget-popup {
> .oo-ui-popupWidget-head {
height: 3.5em;
-   border-bottom: 1px solid #ddd;
+   border-bottom: 1px solid #c8ccd1;
 
> .oo-ui-iconWidget {
/* ( 3.5 - 1.875 ) / 2 = 0.8125 */
@@ -53,7 +53,7 @@
}
 
> .oo-ui-popupWidget-footer {
-   border-top: 1px solid #ddd;
+   border-top: 1px solid #c8ccd1;
width: 100%;
 
// Override the margins that OOUI suddenly 
added to popup footers (T171302)
@@ -74,7 +74,7 @@
.box-sizing( border-box );
 
&:last-child {
-   border-left: 1px solid 
#ddd;
+   border-left: 1px solid 
#c8ccd1;
}
 
> .oo-ui-buttonElement-button {
diff --git a/modules/styles/mw.echo.ui.NotificationItemWidget.less 
b/modules/styles/mw.echo.ui.NotificationItemWidget.less
index ccb21bc..fa58e95 100644
--- a/modules/styles/mw.echo.ui.NotificationItemWidget.less
+++ b/modules/styles/mw.echo.ui.NotificationItemWidget.less
@@ -3,13 +3,13 @@
 @import '../echo.mixins';
 
 .mw-echo-ui-notificationItemWidget {
-   background-color: #f1f1f1;
+   background-color: #f1f1f1; // FIXME: needs to be aligned with 
WikimediaUI color palette
position: relative;
white-space: normal;
padding: 0.8em 1em 0.5em 1em;
.box-sizing( border-box );
 
-   border: 1px solid #ddd;
+   border: 1px solid #c8ccd1;
border-bottom: 0;
 
&:hover {
@@ -17,7 +17,7 @@
}
 
&:last-child {
-   border-bottom: 1px solid #ddd;
+   border-bottom: 1px solid #c8ccd1;
}
 
&-unread {
diff --git a/modules/styles/mw.echo.ui.SpecialHelpMenuWidget.less 
b/modules/styles/mw.echo.ui.SpecialHelpMenuWidget.less
index 83b7177..779b89d 100644
--- a/modules/styles/mw.echo.ui.SpecialHelpMenuWidget.less
+++ b/modules/styles/mw.echo.ui.SpecialHelpMenuWidget.less
@@ -34,7 +34,7 @@
}
 
&:hover {
-   background-color: #ddd;
+   background-color: #c8ccd1;
}
}
}
diff --git a/modules/styles/mw.echo.ui.overlay.minerva.less 
b/modules/styles/mw.echo.ui.overlay.minerva.less
index 9007ab6..27177f7 100644
--- a/modules/styles/mw.echo.ui.overlay.minerva.less
+++ b/modules/styles/mw.echo.ui.overlay.minerva.less
@@ -10,7 +10,7 @@
   

[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Add configuration for statement indexing for Wikidata

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

Change subject: Add configuration for statement indexing for Wikidata
..

Add configuration for statement indexing for Wikidata

Bug: T175199
Change-Id: I041baf591abdce2623396e16ef99dd011a1df6f7
---
M wmf-config/Wikibase.php
1 file changed, 4 insertions(+), 0 deletions(-)


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

diff --git a/wmf-config/Wikibase.php b/wmf-config/Wikibase.php
index cc01531..958aa77 100644
--- a/wmf-config/Wikibase.php
+++ b/wmf-config/Wikibase.php
@@ -135,10 +135,14 @@
if ( $wgDBname === 'testwikidatawiki' ) {
// Enable Cirrus on test.wikidata.org
$wgWBRepoSettings['entitySearch']['useCirrus'] = true;
+   // These are for testing only, one is Item and one is ExternalId
+   $wgWBRepoSettings['entitySearch']['searchIndexProperties'] = 
['P7', 'P700'];
} else {
// Soft-enable Cirrus usage for wbsearchentities
// Cirrus search will be used if useCirrus=1 parameter is set
$wgWBRepoSettings['entitySearch']['useCirrus'] = null;
+   // Index: instance of, subclass of
+   $wgWBRepoSettings['entitySearch']['searchIndexProperties'] = 
['P31', 'P279'];
}
 
$wgWBRepoSettings['dispatchingLockManager'] = 'redisLockManager';

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I041baf591abdce2623396e16ef99dd011a1df6f7
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
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] mediawiki...GuidedTour[master]: Optimize SVGs & replace colors with WikimediaUI palette ones

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

Change subject: Optimize SVGs & replace colors with WikimediaUI palette ones
..


Optimize SVGs & replace colors with WikimediaUI palette ones

Optimizing SVGs to useful minimum markup and replacing
colors with ones from WikimediaUI palette.

Bug: T175660
Change-Id: Iff8c34e8470741cc2e4caf0a963e062ee3b8b208
---
M modules/images/arrow-icon-back-ltr.svg
M modules/images/arrow-icon-back-rtl.svg
M modules/images/arrow-icon-next-ltr.svg
M modules/images/arrow-icon-next-rtl.svg
M modules/images/ext.guidedTour.x.svg
M modules/images/okay-icon.svg
6 files changed, 15 insertions(+), 56 deletions(-)

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



diff --git a/modules/images/arrow-icon-back-ltr.svg 
b/modules/images/arrow-icon-back-ltr.svg
index 82945cb..02ff3be 100644
--- a/modules/images/arrow-icon-back-ltr.svg
+++ b/modules/images/arrow-icon-back-ltr.svg
@@ -1,12 +1,4 @@
 
-
-http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd;>
-http://www.w3.org/2000/svg; 
xmlns:xlink="http://www.w3.org/1999/xlink; x="0px" y="0px"
-width="116.66px" height="116.662px" viewBox="0 0 116.66 116.662" 
enable-background="new 0 0 116.66 116.662"
-xml:space="preserve">
-
-   
-   
-   
-
+http://www.w3.org/2000/svg; width="116.66" height="116.662" 
viewBox="0 0 116.66 116.662">
+   
 
diff --git a/modules/images/arrow-icon-back-rtl.svg 
b/modules/images/arrow-icon-back-rtl.svg
index 13611c3..dd4f642 100644
--- a/modules/images/arrow-icon-back-rtl.svg
+++ b/modules/images/arrow-icon-back-rtl.svg
@@ -1,12 +1,4 @@
 
-
-http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd;>
-http://www.w3.org/2000/svg; 
xmlns:xlink="http://www.w3.org/1999/xlink; x="0px" y="0px"
-width="116.66px" height="116.662px" viewBox="0 0 116.66 116.662" 
enable-background="new 0 0 116.66 116.662"
-xml:space="preserve">
-
-   
-   
-   
-
+http://www.w3.org/2000/svg; width="116.66" height="116.662" 
viewBox="0 0 116.66 116.662">
+   
 
diff --git a/modules/images/arrow-icon-next-ltr.svg 
b/modules/images/arrow-icon-next-ltr.svg
index e654a2c..54bdb0c 100644
--- a/modules/images/arrow-icon-next-ltr.svg
+++ b/modules/images/arrow-icon-next-ltr.svg
@@ -1,12 +1,4 @@
 
-
-http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd;>
-http://www.w3.org/2000/svg; 
xmlns:xlink="http://www.w3.org/1999/xlink; x="0px" y="0px"
-width="116.66px" height="116.662px" viewBox="0 0 116.66 116.662" 
enable-background="new 0 0 116.66 116.662"
-xml:space="preserve">
-
-   
-   
-   
-
+http://www.w3.org/2000/svg; width="116.66" height="116.662" 
viewBox="0 0 116.66 116.662">
+   
 
diff --git a/modules/images/arrow-icon-next-rtl.svg 
b/modules/images/arrow-icon-next-rtl.svg
index 6ea5820..b6435f0 100644
--- a/modules/images/arrow-icon-next-rtl.svg
+++ b/modules/images/arrow-icon-next-rtl.svg
@@ -1,12 +1,4 @@
 
-
-http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd;>
-http://www.w3.org/2000/svg; 
xmlns:xlink="http://www.w3.org/1999/xlink; x="0px" y="0px"
-width="116.66px" height="116.662px" viewBox="0 0 116.66 116.662" 
enable-background="new 0 0 116.66 116.662"
-xml:space="preserve">
-
-   
-   
-   
-
+http://www.w3.org/2000/svg; width="116.66" height="116.662" 
viewBox="0 0 116.66 116.662">
+   
 
diff --git a/modules/images/ext.guidedTour.x.svg 
b/modules/images/ext.guidedTour.x.svg
index 938fd51..80be9a3 100644
--- a/modules/images/ext.guidedTour.x.svg
+++ b/modules/images/ext.guidedTour.x.svg
@@ -1,7 +1,4 @@
 
-
-http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd;>
-http://www.w3.org/2000/svg; 
xmlns:xlink="http://www.w3.org/1999/xlink; x="0px" y="0px"
-viewBox="0 0 96 96" enable-background="new 0 0 96 96" 
xml:space="preserve">
-
+http://www.w3.org/2000/svg; width="96" height="96" viewBox="0 0 96 
96">
+   
 
diff --git a/modules/images/okay-icon.svg b/modules/images/okay-icon.svg
index a93b606..3f4dd46 100644
--- a/modules/images/okay-icon.svg
+++ b/modules/images/okay-icon.svg
@@ -1,13 +1,7 @@
 
-
-http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd;>
-http://www.w3.org/2000/svg; 
xmlns:xlink="http://www.w3.org/1999/xlink; x="0px" y="0px"
-width="142.282px" height="142.28px" viewBox="0 -11.785 142.282 142.28" 
enable-background="new 0 -11.785 142.282 142.28"
-xml:space="preserve">
-
-   
-   
-   
-   
-
+http://www.w3.org/2000/svg; width="142.282" height="142.28" 
viewBox="0 -11.785 142.282 142.28">
+   
+   
+   
+   
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iff8c34e8470741cc2e4caf0a963e062ee3b8b208
Gerrit-PatchSet: 1
Gerrit-Project: 

[MediaWiki-commits] [Gerrit] operations/dns[master]: Revert "Depool esams for expected blips during ASN renumbering"

2017-10-10 Thread BBlack (Code Review)
Hello jenkins-bot, Ayounsi,

I'd like you to do a code review.  Please visit

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

to review the following change.


Change subject: Revert "Depool esams for expected blips during ASN renumbering"
..

Revert "Depool esams for expected blips during ASN renumbering"

This reverts commit 199e80e36a182deb1054ac8d405661c18837bb79.

Change-Id: I4add93d9e76f08dd74e62cb8d146d4f69492dfd8
---
M admin_state
1 file changed, 0 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/dns 
refs/changes/62/383462/1

diff --git a/admin_state b/admin_state
index 4d7ce93..54ee433 100644
--- a/admin_state
+++ b/admin_state
@@ -72,6 +72,3 @@
 ### v T164610 - semi-permanent to avoid confusion until T164609
 geoip/misc-addrs/ulsfo => DOWN
 ### ^ T164610 - semi-permanent to avoid confusion until T164609
-
-# esams AS renumbering - T167840
-geoip/generic-map/esams => DOWN

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4add93d9e76f08dd74e62cb8d146d4f69492dfd8
Gerrit-PatchSet: 1
Gerrit-Project: operations/dns
Gerrit-Branch: master
Gerrit-Owner: BBlack 
Gerrit-Reviewer: Ayounsi 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] oojs/ui[master]: Do not call .offset() on $( 'html' )

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

Change subject: Do not call .offset() on $( 'html' )
..


Do not call .offset() on $( 'html' )

jQuery Migrate generates a warning for it and it may or may not
actually be supported. I think these are the only places where
it may happen and wasn't already special-cased for other reasons.

Bug: T177252
Change-Id: I0f6db1f3b0e049c812f230215ce5cd5ffa633856
---
M src/toolgroups/PopupToolGroup.js
M src/widgets/PopupWidget.js
2 files changed, 9 insertions(+), 3 deletions(-)

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



diff --git a/src/toolgroups/PopupToolGroup.js b/src/toolgroups/PopupToolGroup.js
index 6691dc5..65caa10 100644
--- a/src/toolgroups/PopupToolGroup.js
+++ b/src/toolgroups/PopupToolGroup.js
@@ -194,7 +194,9 @@
if ( this.isClippedHorizontally() ) {
// Anchoring to the right also caused the popup 
to clip, so just make it fill the container
containerWidth = 
this.$clippableScrollableContainer.width();
-   containerLeft = 
this.$clippableScrollableContainer.offset().left;
+   containerLeft = 
this.$clippableScrollableContainer[ 0 ] === document.documentElement ?
+   0 :
+   
this.$clippableScrollableContainer.offset().left;
 
this.toggleClipping( false );
this.$element.removeClass( 
'oo-ui-popupToolGroup-right' );
diff --git a/src/widgets/PopupWidget.js b/src/widgets/PopupWidget.js
index acc7bd0..ce1ef5a 100644
--- a/src/widgets/PopupWidget.js
+++ b/src/widgets/PopupWidget.js
@@ -463,7 +463,9 @@
floatablePos = this.$floatableContainer.offset();
floatablePos[ far ] = floatablePos[ near ] + this.$floatableContainer[ 
'outer' + sizeProp ]();
// Measure where the offsetParent is and compute our position based on 
that and parentPosition
-   offsetParentPos = this.$element.offsetParent().offset();
+   offsetParentPos = this.$element.offsetParent()[ 0 ] === 
document.documentElement ?
+   { top: 0, left: 0 } :
+   this.$element.offsetParent().offset();
 
if ( positionProp === near ) {
popupPos[ near ] = offsetParentPos[ near ] + parentPosition[ 
near ];
@@ -499,7 +501,9 @@
}
 
// Check if the popup will go beyond the edge of this.$container
-   containerPos = this.$container.offset();
+   containerPos = this.$container[ 0 ] === document.documentElement ?
+   { top: 0, left: 0 } :
+   this.$container.offset();
containerPos[ far ] = containerPos[ near ] + this.$container[ 'inner' + 
sizeProp ]();
// Take into account how much the popup will move because of the 
adjustments we're going to make
popupPos[ near ] += ( positionProp === near ? 1 : -1 ) * 
positionAdjustment;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0f6db1f3b0e049c812f230215ce5cd5ffa633856
Gerrit-PatchSet: 2
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński 
Gerrit-Reviewer: Bartosz Dziewoński 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: VolkerE 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...CirrusSearch[master]: Add support for 'super_detect_noop' script language

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

Change subject: Add support for 'super_detect_noop' script language
..


Add support for 'super_detect_noop' script language

This is because native scripts have been deprecated.
Requires a config change and the extra version 5.5.2

Should be merged once elastic 5.5.2 is deployed or if
the super_detect_noop_enable_native has been set to true.

Bug: T174652
Change-Id: Ia3e5b507080bfe8a4d3075e67adac3d9c5b61ee9
---
M CirrusSearch.php
M README
M docs/settings.txt
M includes/Updater.php
M tests/jenkins/FullyFeaturedConfig.php
M tests/unit/UpdaterTest.php
6 files changed, 33 insertions(+), 6 deletions(-)

Approvals:
  Cindy-the-browser-test-bot: Looks good to me, but someone else must approve
  EBernhardson: Looks good to me, approved
  jenkins-bot: Verified

Objections:
  DCausse: There's a problem with this change, please improve



diff --git a/CirrusSearch.php b/CirrusSearch.php
index 1f6e140..6cc7508 100644
--- a/CirrusSearch.php
+++ b/CirrusSearch.php
@@ -176,6 +176,12 @@
  * wikimedia-extra versions 1.3.1, 1.4.2, 1.5.0, and greater:
  * $wgCirrusSearchWikimediaExtraPlugin[ 'super_detect_noop' ] = true;
  *
+ * As of elastic 5.5 native scripts have been deprecated the super_detect_noop 
is
+ * now available as a normal script with language "super_detect_noop".
+ * If you run elastic prior to 5.5.2 you must enable this option if using
+ * super_detect_noop.
+ * $wgCirrusSearchWikimediaExtraPlugin['super_detect_noop_enable_native'] = 
true;
+ *
  * Controls the list of extra handlers to set when the noop script
  * is enabled.
  *
diff --git a/README b/README
index 535b455..24f85ce 100644
--- a/README
+++ b/README
@@ -13,6 +13,8 @@
   $CirrusSearchElasticQuirks = [ 'query_string_max_determinized_states' => 
true ];
 - elastic versions before 5.3.1 suffer from a bug that prevent an index to be 
reindexed
   properly without missing docs when using multiple elasticsearch machines
+- when using elastic prior to 5.5.2 with the extra plugin and the 
super_detect_noop script
+  you must activate the "super_detect_noop_enable_native" option (see 
docs/settings.txt)
 
 Place the CirrusSearch extension in your extensions directory.
 Make sure you have the curl php library installed (sudo apt-get install 
php5-curl in Debian.)
diff --git a/docs/settings.txt b/docs/settings.txt
index cfabeed..5a44679 100644
--- a/docs/settings.txt
+++ b/docs/settings.txt
@@ -171,6 +171,13 @@
 
 $wgCirrusSearchWikimediaExtraPlugin[ 'super_detect_noop' ] = true;
 
+As of elastic 5.5 native scripts have been deprecated the super_detect_noop is
+now available as a normal script with language "super_detect_noop".
+If you run elastic prior to 5.5.2 you must enable this option if using
+super_detect_noop.
+
+$wgCirrusSearchWikimediaExtraPlugin['super_detect_noop_enable_native'] = 
true;
+
 Configure field specific handlers for the noop script.
 
 $wgCirrusSearchWikimediaExtraPlugin[ 'super_detect_noop_handlers' ] = [
diff --git a/includes/Updater.php b/includes/Updater.php
index 8a2ad19..8c62ea7 100644
--- a/includes/Updater.php
+++ b/includes/Updater.php
@@ -198,9 +198,9 @@
$allData = array_fill_keys( 
$this->connection->getAllIndexTypes(), [] );
foreach ( $this->buildDocumentsForPages( $pages, $flags ) as 
$document ) {
$suffix = 
$this->connection->getIndexSuffixForNamespace( $document->get( 'namespace' ) );
-   if ( isset( $wgCirrusSearchWikimediaExtraPlugin[ 
'super_detect_noop' ] ) &&
-   $wgCirrusSearchWikimediaExtraPlugin[ 
'super_detect_noop' ] ) {
-   $document = $this->docToSuperDetectNoopScript( 
$document );
+   if ( isset( $wgCirrusSearchWikimediaExtraPlugin[ 
'super_detect_noop' ] ) ) {
+   $document = $this->docToSuperDetectNoopScript( 
$document,
+   !empty( 
$wgCirrusSearchWikimediaExtraPlugin['super_detect_noop_enable_native' ] ) );
}
// TODO: Move hints reset at a later stage if they 
appear to be useful
// (e.g. in DataSender::sendData)
@@ -403,9 +403,10 @@
 * Converts a document into a call to super_detect_noop from the 
wikimedia-extra plugin.
 * @internal made public for testing purposes
 * @param \Elastica\Document $doc
+* @param bool $enableNative enable the use of native scripts 
(deprecated as of elastic 5.5+)
 * @return \Elastica\Script\Script
 */
-   public function docToSuperDetectNoopScript( $doc ) {
+   public function docToSuperDetectNoopScript( $doc, $enableNative = false 
) {
$handlers = CirrusIndexField::getHint( $doc, 
CirrusIndexField::NOOP_HINT );

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: mediawiki.language: Implement non-digit-grouping of four-dig...

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

Change subject: mediawiki.language: Implement non-digit-grouping of four-digit 
numbers
..

mediawiki.language: Implement non-digit-grouping of four-digit numbers

In some languages it's conventional not to insert a thousands
separator in numbers that are four digits long (1000-).
This now matches the behavior of the PHP Language class.

Bug: T177846
Change-Id: I6f4e51a907b084bd7fde09cd9c16c9bf41cdc98c
---
M includes/resourceloader/ResourceLoaderLanguageDataModule.php
M resources/src/mediawiki.language/mediawiki.language.init.js
M resources/src/mediawiki.language/mediawiki.language.numbers.js
M tests/qunit/suites/resources/mediawiki/mediawiki.language.test.js
4 files changed, 25 insertions(+), 10 deletions(-)


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

diff --git a/includes/resourceloader/ResourceLoaderLanguageDataModule.php 
b/includes/resourceloader/ResourceLoaderLanguageDataModule.php
index ef942fa..f8785c0 100644
--- a/includes/resourceloader/ResourceLoaderLanguageDataModule.php
+++ b/includes/resourceloader/ResourceLoaderLanguageDataModule.php
@@ -40,6 +40,7 @@
return [
'digitTransformTable' => 
$language->digitTransformTable(),
'separatorTransformTable' => 
$language->separatorTransformTable(),
+   'keepFourDigitNumbersUngrouped' => 
$language->keepFourDigitNumbersUngrouped(),
'grammarForms' => $language->getGrammarForms(),
'grammarTransformations' => 
$language->getGrammarTransformations(),
'pluralRules' => $language->getPluralRules(),
diff --git a/resources/src/mediawiki.language/mediawiki.language.init.js 
b/resources/src/mediawiki.language/mediawiki.language.init.js
index 808f6e5..e3698ad 100644
--- a/resources/src/mediawiki.language/mediawiki.language.init.js
+++ b/resources/src/mediawiki.language/mediawiki.language.init.js
@@ -32,6 +32,7 @@
 *
 *  - `digitTransformTable`
 *  - `separatorTransformTable`
+*  - `keepFourDigitNumbersUngrouped`
 *  - `grammarForms`
 *  - `pluralRules`
 *  - `digitGroupingPattern`
diff --git a/resources/src/mediawiki.language/mediawiki.language.numbers.js 
b/resources/src/mediawiki.language/mediawiki.language.numbers.js
index 83277cb..b0fa6bc 100644
--- a/resources/src/mediawiki.language/mediawiki.language.numbers.js
+++ b/resources/src/mediawiki.language/mediawiki.language.numbers.js
@@ -69,6 +69,7 @@
 * @param {Object} [options] If provided, both option keys must be 
present:
 * @param {string} options.decimal The decimal separator. Defaults to: 
`'.'`.
 * @param {string} options.group The group separator. Defaults to: 
`','`.
+* @param {string} [options.keepFourDigitNumbersUngrouped=false]
 * @return {string}
 */
function commafyNumber( value, pattern, options ) {
@@ -143,17 +144,19 @@
}
}
 
-   for ( whole = valueParts[ 0 ]; whole; ) {
-   off = groupSize ? whole.length - groupSize : 0;
-   pieces.push( ( off > 0 ) ? whole.slice( off ) : whole );
-   whole = ( off > 0 ) ? whole.slice( 0, off ) : '';
+   if ( !options.keepFourDigitNumbersUngrouped || valueParts[ 0 
].length > 4 ) {
+   for ( whole = valueParts[ 0 ]; whole; ) {
+   off = groupSize ? whole.length - groupSize : 0;
+   pieces.push( ( off > 0 ) ? whole.slice( off ) : 
whole );
+   whole = ( off > 0 ) ? whole.slice( 0, off ) : 
'';
 
-   if ( groupSize2 ) {
-   groupSize = groupSize2;
-   groupSize2 = null;
+   if ( groupSize2 ) {
+   groupSize = groupSize2;
+   groupSize2 = null;
+   }
}
+   valueParts[ 0 ] = pieces.reverse().join( options.group 
);
}
-   valueParts[ 0 ] = pieces.reverse().join( options.group );
 
return valueParts.join( options.decimal );
}
@@ -220,7 +223,9 @@
// When unformatting, we just use 
separatorTransformTable.
pattern = mw.language.getData( mw.config.get( 
'wgUserLanguage' ),
'digitGroupingPattern' ) || '#,##0.###';
-   numberString = mw.language.commafy( num, 
pattern );
+ 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Generalize non-digit-grouping of four-digit numbers

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

Change subject: Generalize non-digit-grouping of four-digit numbers
..

Generalize non-digit-grouping of four-digit numbers

In some languages it's conventional not to insert a thousands
separator in numbers that are four digits long (1000-).
Rather than copy-paste the custom code to do this between 13 files,
introduce another option and have the base Language class handle it.

This also fixes an issue in several languages where this logic
previously would not work for negative or fractional numbers.

Bug: T177846
Change-Id: Iedd8de5648cf2de1c94044918626de2f96365d48
---
M autoload.php
M includes/cache/localisation/LocalisationCache.php
M languages/Language.php
M languages/classes/LanguageBe_tarask.php
D languages/classes/LanguageBg.php
D languages/classes/LanguageEs.php
D languages/classes/LanguageEt.php
M languages/classes/LanguageHy.php
M languages/classes/LanguageKaa.php
M languages/classes/LanguageKk_cyrl.php
M languages/classes/LanguageKsh.php
M languages/classes/LanguageKu.php
D languages/classes/LanguageKu_ku.php
D languages/classes/LanguagePl.php
D languages/classes/LanguageRu.php
D languages/classes/LanguageUk.php
M languages/messages/MessagesBe_tarask.php
M languages/messages/MessagesBg.php
M languages/messages/MessagesEs.php
M languages/messages/MessagesEt.php
M languages/messages/MessagesHy.php
M languages/messages/MessagesKaa.php
M languages/messages/MessagesKk_cyrl.php
M languages/messages/MessagesKsh.php
M languages/messages/MessagesKu_latn.php
M languages/messages/MessagesPl.php
M languages/messages/MessagesRu.php
M languages/messages/MessagesUk.php
28 files changed, 43 insertions(+), 401 deletions(-)


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

diff --git a/autoload.php b/autoload.php
index 0a2ecf0..a9ec935 100644
--- a/autoload.php
+++ b/autoload.php
@@ -700,15 +700,12 @@
'LanguageAr' => __DIR__ . '/languages/classes/LanguageAr.php',
'LanguageAz' => __DIR__ . '/languages/classes/LanguageAz.php',
'LanguageBe_tarask' => __DIR__ . 
'/languages/classes/LanguageBe_tarask.php',
-   'LanguageBg' => __DIR__ . '/languages/classes/LanguageBg.php',
'LanguageBs' => __DIR__ . '/languages/classes/LanguageBs.php',
'LanguageCode' => __DIR__ . '/languages/LanguageCode.php',
'LanguageConverter' => __DIR__ . '/languages/LanguageConverter.php',
'LanguageCu' => __DIR__ . '/languages/classes/LanguageCu.php',
'LanguageDsb' => __DIR__ . '/languages/classes/LanguageDsb.php',
'LanguageEn' => __DIR__ . '/languages/classes/LanguageEn.php',
-   'LanguageEs' => __DIR__ . '/languages/classes/LanguageEs.php',
-   'LanguageEt' => __DIR__ . '/languages/classes/LanguageEt.php',
'LanguageFi' => __DIR__ . '/languages/classes/LanguageFi.php',
'LanguageGa' => __DIR__ . '/languages/classes/LanguageGa.php',
'LanguageGan' => __DIR__ . '/languages/classes/LanguageGan.php',
@@ -723,21 +720,17 @@
'LanguageKm' => __DIR__ . '/languages/classes/LanguageKm.php',
'LanguageKsh' => __DIR__ . '/languages/classes/LanguageKsh.php',
'LanguageKu' => __DIR__ . '/languages/classes/LanguageKu.php',
-   'LanguageKu_ku' => __DIR__ . '/languages/classes/LanguageKu_ku.php',
'LanguageLa' => __DIR__ . '/languages/classes/LanguageLa.php',
'LanguageMl' => __DIR__ . '/languages/classes/LanguageMl.php',
'LanguageMy' => __DIR__ . '/languages/classes/LanguageMy.php',
'LanguageOs' => __DIR__ . '/languages/classes/LanguageOs.php',
-   'LanguagePl' => __DIR__ . '/languages/classes/LanguagePl.php',
'LanguageQqx' => __DIR__ . '/languages/classes/LanguageQqx.php',
-   'LanguageRu' => __DIR__ . '/languages/classes/LanguageRu.php',
'LanguageShi' => __DIR__ . '/languages/classes/LanguageShi.php',
'LanguageSl' => __DIR__ . '/languages/classes/LanguageSl.php',
'LanguageSr' => __DIR__ . '/languages/classes/LanguageSr.php',
'LanguageTg' => __DIR__ . '/languages/classes/LanguageTg.php',
'LanguageTr' => __DIR__ . '/languages/classes/LanguageTr.php',
'LanguageTyv' => __DIR__ . '/languages/classes/LanguageTyv.php',
-   'LanguageUk' => __DIR__ . '/languages/classes/LanguageUk.php',
'LanguageUz' => __DIR__ . '/languages/classes/LanguageUz.php',
'LanguageWa' => __DIR__ . '/languages/classes/LanguageWa.php',
'LanguageYue' => __DIR__ . '/languages/classes/LanguageYue.php',
diff --git a/includes/cache/localisation/LocalisationCache.php 
b/includes/cache/localisation/LocalisationCache.php
index a0ce95e..0240688 100644
--- a/includes/cache/localisation/LocalisationCache.php
+++ b/includes/cache/localisation/LocalisationCache.php
@@ -109,7 +109,8 @@
static public $allKeys = [
'fallback', 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Remove outdated code comments in MessagesXx.php files

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

Change subject: Remove outdated code comments in MessagesXx.php files
..

Remove outdated code comments in MessagesXx.php files

MessagesKk_arab.php:
MessagesKk_cyrl.php:
MessagesKk_latn.php:
MessagesRu.php:
* Translations of a comment warning end-users against editing
  localisation messages in these files. That comment was removed
  from  MessagesEn.php in b38247894422fb34dbddaea23cfc08cd72f48d5b,
  as we no longer store localisation messages here.

MessagesKsh.php
* Warning for translators not to use encodings other than UTF-8.

Change-Id: I1ff2cf035b84dc53c368ad7182f294c7fb8f1a3d
---
M languages/messages/MessagesKk_arab.php
M languages/messages/MessagesKk_cyrl.php
M languages/messages/MessagesKk_latn.php
M languages/messages/MessagesKsh.php
M languages/messages/MessagesRu.php
5 files changed, 0 insertions(+), 47 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/42/383442/1

diff --git a/languages/messages/MessagesKk_arab.php 
b/languages/messages/MessagesKk_arab.php
index 72179d6..6032773 100644
--- a/languages/messages/MessagesKk_arab.php
+++ b/languages/messages/MessagesKk_arab.php
@@ -13,17 +13,6 @@
  * @author Urhixidur
  */
 
-/**
- * بۇل قازاقشا تىلدەسۋىنىڭ جەرسىندىرۋ فايلى
- *
- * شەتكى پايدالانۋشىلار: بۇل فايلدى تىكەلەي وڭدەمەڭىز!
- *
- * بۇل فايلداعى وزگەرىستەر باعدارلامالىق جاساقتاما كەزەكتى جاڭارتىلعاندا 
جوعالتىلادى.
- * ۋىيكىيدە ٴوز باپتالىمدارىڭىزدى ىستەي الاسىز.
- * اكىمشى بوپ كىرگەنىڭىزدە, [[ارنايى:بارلىق حابارلار]] دەگەن بەتكە ٴوتىڭىز دە
- * مىندا تىزىمدەلىنگەن مەدىياۋىيكىي:* سىيپاتى بار بەتتەردى وڭدەڭىز.
- */
-
 $fallback = 'kk-cyrl';
 $rtl = true;
 
diff --git a/languages/messages/MessagesKk_cyrl.php 
b/languages/messages/MessagesKk_cyrl.php
index 818a9b6..2857721 100644
--- a/languages/messages/MessagesKk_cyrl.php
+++ b/languages/messages/MessagesKk_cyrl.php
@@ -18,16 +18,6 @@
  * @author Urhixidur
  */
 
-/**
- * Бұл қазақша тілдесуінің жерсіндіру файлы
- *
- * ШЕТКІ ПАЙДАЛАНУШЫЛАР: БҰЛ ФАЙЛДЫ ТІКЕЛЕЙ ӨҢДЕМЕҢІЗ!
- *
- * Бұл файлдағы өзгерістер бағдарламалық жасақтама кезекті жаңартылғанда 
жоғалтылады.
- * Уикиде өз бапталымдарыңызды істей аласыз.
- * Әкімші боп кіргеніңізде, [[Арнайы:Барлық хабарлар]] деген бетке өтіңіз де
- * мында тізімделінген МедиаУики:* сипаты бар беттерді өңдеңіз.
- */
 $separatorTransformTable = [
',' => "\xc2\xa0",
'.' => ',',
diff --git a/languages/messages/MessagesKk_latn.php 
b/languages/messages/MessagesKk_latn.php
index 56d8a58..36e8ecb 100644
--- a/languages/messages/MessagesKk_latn.php
+++ b/languages/messages/MessagesKk_latn.php
@@ -12,17 +12,6 @@
  * @author Urhixidur
  */
 
-/**
- * Bul qazaqşa tildeswiniñ jersindirw faýlı
- *
- * ŞETKİ PAÝDALANWŞILAR: BUL FAÝLDI TİKELEÝ ÖÑDEMEÑİZ!
- *
- * Bul faýldağı özgerister bağdarlamalıq jasaqtama kezekti jañartılğanda 
joğaltıladı.
- * Wïkïde öz baptalımdarıñızdı isteý alasız.
- * Äkimşi bop kirgeniñizde, [[Arnaýı:Barlıq xabarlar]] degen betke ötiñiz de
- * mında tizimdelingen MedïaWïkï:* sïpatı bar betterdi öñdeñiz.
- */
-
 $fallback = 'kk-cyrl';
 
 $separatorTransformTable = [
diff --git a/languages/messages/MessagesKsh.php 
b/languages/messages/MessagesKsh.php
index 164b20a..1fef838 100644
--- a/languages/messages/MessagesKsh.php
+++ b/languages/messages/MessagesKsh.php
@@ -37,13 +37,6 @@
  * Otherwise most part of the following expressions are taken from the 
Akademie.
  *
  */
-/**
- * Hints for editing
- * Avoid ä and other special codings because of legibility for those users,
- * who will take this as a basis for further ripuarian message interfaces
- * ä => ä, ö => ö, ü => ü, Ä => Ä, Ö => Ö, Ãœ => Ü, ß => ß
- * „ => „, “ => “
- */
 
 $fallback = 'de';
 
diff --git a/languages/messages/MessagesRu.php 
b/languages/messages/MessagesRu.php
index 3041abd..b5f310d 100644
--- a/languages/messages/MessagesRu.php
+++ b/languages/messages/MessagesRu.php
@@ -416,14 +416,6 @@
'Amazon.com' => 'https://www.amazon.com/exec/obidos/ISBN=$1'
 ];
 
-/**
- * Изменения сделанные в этом файле будут потеряны при обновлении MediaWiki.
- *
- * Если необходимо внести изменения в перевод отдельных строк интерфейса,
- * сделайте это посредством редактирования страниц вида «MediaWiki:*».
- * Их список можно найти на странице «Special:Allmessages».
- */
-
 $separatorTransformTable = [
',' => "\xc2\xa0", # nbsp
'.' => ','

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1ff2cf035b84dc53c368ad7182f294c7fb8f1a3d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Add test cases for digit grouping (commafy) in Polish

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

Change subject: Add test cases for digit grouping (commafy) in Polish
..

Add test cases for digit grouping (commafy) in Polish

According to the typographical convention, a thousands separator
should not be inserted in numbers that are four digits long (between
1000 and ), unlike in English where it's usually acceptable.
This logic is currently implemented in LanguagePl::commafy().

Bug: T177846
Change-Id: I6dbd8febcf5967cdd7d3c1f2f77f4e66
---
M tests/phpunit/languages/classes/LanguagePlTest.php
1 file changed, 27 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/43/383443/1

diff --git a/tests/phpunit/languages/classes/LanguagePlTest.php 
b/tests/phpunit/languages/classes/LanguagePlTest.php
index a6d0f2e..d7a0074 100644
--- a/tests/phpunit/languages/classes/LanguagePlTest.php
+++ b/tests/phpunit/languages/classes/LanguagePlTest.php
@@ -74,4 +74,31 @@
[ 'other', 201 ],
];
}
+
+   /**
+* @covers LanguagePl::commafy()
+* @dataProvider provideCommafyData
+*/
+   public function testCommafy( $number, $numbersWithCommas ) {
+   $this->assertEquals(
+   $numbersWithCommas,
+   $this->getLang()->commafy( $number ),
+   "commafy('$number')"
+   );
+   }
+
+   public static function provideCommafyData() {
+   // Note that commafy() always uses English separators (',' and 
'.') instead of
+   // Polish (' ' and ','). There is another function that 
converts them later.
+   return [
+   [ 1000, '1000' ],
+   [ 1, '10,000' ],
+   [ 1000.0001, '1000.0001' ],
+   [ 1.0001, '10,000.0001' ],
+   [ -1000, '-1000' ],
+   [ -1, '-10,000' ],
+   [ -1000.0001, '-1000.0001' ],
+   [ -1.0001, '-10,000.0001' ],
+   ];
+   }
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6dbd8febcf5967cdd7d3c1f2f77f4e66
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
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] wikidata...gui[master]: Hide embed logo after rendering result

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

Change subject: Hide embed logo after rendering result
..


Hide embed logo after rendering result

If result view does not use 100% VH Wikidata logo should not be visible
after rendering result.

Change-Id: If6e351867f8d745cfa587bba8abdb9a9d84b1fa7
---
M embed.html
1 file changed, 3 insertions(+), 1 deletion(-)

Approvals:
  Smalyshev: Looks good to me, approved
  Jonas Kress (WMDE): Looks good to me, approved
  jenkins-bot: Verified



diff --git a/embed.html b/embed.html
index 840738d..3fc56e8 100644
--- a/embed.html
+++ b/embed.html
@@ -269,7 +269,9 @@
$( 'body' ).i18n();
$( 'html' ).attr( { lang: lang, dir: 
$.uls.data.getDir( lang ) } );
 
-   resultView.draw( query );
+   resultView.draw( query ).done( function() {
+   $( '.logo' ).hide();
+   } );
renderEdit( query, function( q ){
resultView.draw( q );
window.location.hash = '#' + 
encodeURIComponent( q )

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If6e351867f8d745cfa587bba8abdb9a9d84b1fa7
Gerrit-PatchSet: 3
Gerrit-Project: wikidata/query/gui
Gerrit-Branch: master
Gerrit-Owner: Jonas Kress (WMDE) 
Gerrit-Reviewer: Jonas Kress (WMDE) 
Gerrit-Reviewer: Lucas Werkmeister (WMDE) 
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/mediawiki-config[master]: Move WB client "disabledUsageAspects" setting into $wmgWikib...

2017-10-10 Thread Hoo man (Code Review)
Hoo man has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/383439 )

Change subject: Move WB client "disabledUsageAspects" setting into 
$wmgWikibaseDisabledUsageAspects
..

Move WB client "disabledUsageAspects" setting into 
$wmgWikibaseDisabledUsageAspects

Just nicer than doing it all per hand.

Bug: T151717
Change-Id: Iaff80461990542ef80e8483659e80d2f9c354aa1
---
M wmf-config/InitialiseSettings.php
M wmf-config/Wikibase-production.php
2 files changed, 9 insertions(+), 6 deletions(-)


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index b8e7692..db5828f 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -19612,6 +19612,14 @@
'default' => [ 'DISPLAY' => ':99' ],
 ],
 
+// T151717 and T177153
+'wmgWikibaseDisabledUsageAspects' => [
+   'default' => [ 'D', 'C' ],
+   'elwiki' => [ 'D' ],
+   'kowiki' => [ 'D' ],
+   'trwiki' => [ 'D' ],
+],
+
 ];
 
 ### WMF Labs override #
diff --git a/wmf-config/Wikibase-production.php 
b/wmf-config/Wikibase-production.php
index 7f700b0..8549c8d 100644
--- a/wmf-config/Wikibase-production.php
+++ b/wmf-config/Wikibase-production.php
@@ -197,12 +197,7 @@
$wgWBClientSettings['sendEchoNotification'] = true;
$wgWBClientSettings['echoIcon'] = [ 'url' => 
'/static/images/wikibase/echoIcon.svg' ];
 
-   // T177153
-   $wgWBClientSettings['disabledUsageAspects'] = [ 'D' ];
-   // T151717
-   if ( !in_array( $wgDBname, [ 'elwiki', 'kowiki', 'trwiki' ] ) ) {
-   $wgWBClientSettings['disabledUsageAspects'][] = 'C';
-   }
+   $wgWBClientSettings['disabledUsageAspects'] = 
$wmgWikibaseDisabledUsageAspects;
 
// T171027
if ( in_array( $wgDBname, [ 'commonswiki', 'ruwiki' ] ) ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iaff80461990542ef80e8483659e80d2f9c354aa1
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Hoo man 

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Enable Statement usage tracking on cawiki and cewiki

2017-10-10 Thread Hoo man (Code Review)
Hoo man has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/383440 )

Change subject: Enable Statement usage tracking on cawiki and cewiki
..

Enable Statement usage tracking on cawiki and cewiki

Per T151717#3671181.

Bug: T151717
Change-Id: If7b06ac9bb8423fb538987024e5bc4082fd51851
---
M wmf-config/InitialiseSettings.php
1 file changed, 2 insertions(+), 0 deletions(-)


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index db5828f..069c6fe 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -19615,6 +19615,8 @@
 // T151717 and T177153
 'wmgWikibaseDisabledUsageAspects' => [
'default' => [ 'D', 'C' ],
+   'cawiki' => [ 'D' ],
+   'cewiki' => [ 'D' ],
'elwiki' => [ 'D' ],
'kowiki' => [ 'D' ],
'trwiki' => [ 'D' ],

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If7b06ac9bb8423fb538987024e5bc4082fd51851
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Hoo man 

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


[MediaWiki-commits] [Gerrit] search/MjoLniR[master]: Adapt feature logging with new ltr response format

2017-10-10 Thread EBernhardson (Code Review)
EBernhardson has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/381228 )

Change subject: Adapt feature logging with new ltr response format
..


Adapt feature logging with new ltr response format

in https://github.com/o19s/elasticsearch-learning-to-rank/pull/88
the response format was changed from a map to a list.
Adjust mjolnir so that it understand this new format.
This allows us to keep the same ordinals in mjolnir by using
OrderedDict.

Change-Id: Ib8c994b0dda7c22dc4a7724a141b94171c9dac85
---
M mjolnir/cli/data_pipeline.py
M mjolnir/features.py
M mjolnir/test/fixtures/requests/test_features.sqlite3
M mjolnir/test/test_features.py
4 files changed, 22 insertions(+), 21 deletions(-)

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



diff --git a/mjolnir/cli/data_pipeline.py b/mjolnir/cli/data_pipeline.py
index 28248aa..3d03ff4 100644
--- a/mjolnir/cli/data_pipeline.py
+++ b/mjolnir/cli/data_pipeline.py
@@ -11,6 +11,7 @@
 """
 
 import argparse
+from collections import OrderedDict
 import logging
 import mjolnir.dbn
 import mjolnir.metrics
@@ -128,7 +129,7 @@
 
 # Collect features for all known queries. Note that this intentionally
 # uses query and NOT norm_query_id. Merge those back into the source hits.
-fnames_accu = df_hits._sc.accumulator({}, 
mjolnir.features.FeatureNamesAccumulator())
+fnames_accu = df_hits._sc.accumulator(OrderedDict(), 
mjolnir.features.FeatureNamesAccumulator())
 if ltr_feature_definitions:
 if brokers:
 df_features = mjolnir.features.collect_from_ltr_plugin_and_kafka(
@@ -171,8 +172,10 @@
 # collect the accumulator
 df_features.cache().count()
 
-# TODO: test that features returned a coherent map (all features must have 
the same counts)
-features = sorted(fnames_accu.value)
+if len(set(fnames_accu.value.values())) != 1:
+raise ValueError("Not all features were collected properly: " + 
str(fnames_accu.value))
+
+features = fnames_accu.value.keys()
 df_features = df_features.withColumn('features', 
mjolnir.spark.add_meta(df_features._sc, F.col('features'), {
 'features': features
 }))
diff --git a/mjolnir/features.py b/mjolnir/features.py
index 5b2f30f..5cae635 100644
--- a/mjolnir/features.py
+++ b/mjolnir/features.py
@@ -3,7 +3,7 @@
 """
 
 import base64
-from collections import defaultdict, namedtuple
+from collections import defaultdict, namedtuple, OrderedDict
 import json
 import math
 import mjolnir.cirrus
@@ -176,8 +176,7 @@
 
 def extract_ltr_log_feature_values(response, accum):
 """Extract feature vector from ltr_log search ext
-Scan all hits and inspect the ltr_log field. Feature names are then
-lexically ordered to have consistent ordinals
+Scan all hits and inspect the ltr_log field.
 
 Parameters
 --
@@ -195,9 +194,11 @@
 for hit in response['hits']['hits']:
 page_id = int(hit['_id'])
 features = []
-counts = {}
-for n, v in 
sorted(hit['fields']['_ltrlog'][0]['sltr_log'].iteritems()):
-features.append(v)
+counts = OrderedDict()
+for v in hit['fields']['_ltrlog'][0]['sltr_log']:
+score = v['value']
+n = v['name']
+features.append(score)
 counts[n] = counts.get(n, 0) + 1
 accum += counts
 yield page_id, Vectors.dense(features)
@@ -343,7 +344,7 @@
 Keep a dict with feature names as keys and a counter as values.
 """
 def zero(self, value):
-return dict()
+return OrderedDict()
 
 def addInPlace(self, value1, value2):
 for k, v in value2.iteritems():
@@ -409,22 +410,18 @@
 assert 'responses' in parsed, response.text
 
 features = defaultdict(lambda: [float('nan')] * len(feature_names))
-features_seen = {}
-# feature ordinals (sorted by feature names)
-# ordinal_map[i] returns the feature ordinal for request i and 
feature_names[i]
-ordinal_map = [elts[0] for elts in sorted(enumerate(feature_names), 
key=lambda i:i[1])]
-ordinal_map = [elts[0] for elts in sorted(enumerate(ordinal_map), 
key=lambda i:i[1])]
+features_seen = OrderedDict()
 for i, response in enumerate(parsed['responses']):
-ordinal = ordinal_map[i]
 # These should be retried when making the queries. If we get this far 
then
 # no retry is possible anymore, and the default NaN value will signal 
to
 # throw away the hit_page_id
 if response['status'] != 200:
+features_seen[feature_names[i]] = 0
 continue
 features_seen[feature_names[i]] = 1
 for hit in response['hits']['hits']:
 hit_page_id = int(hit['_id'])
-features[hit_page_id][ordinal] = hit['_score']
+features[hit_page_id][i] = hit['_score']
 feature_names_accu += features_seen
 return 

[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Modify time to update Featured Article widget

2017-10-10 Thread Jcasariego (Code Review)
Jcasariego has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/383428 )

Change subject: Modify time to update Featured Article widget
..

Modify time to update Featured Article widget

At the moment, the Featured Article widget is hard-coded to update itself every 
12 hours. Now, this was updated to update every 4 hours.

Bug: T121410
Change-Id: I2914e1accf5e17a09399ef8eb807ca571b6378af
---
M app/src/main/res/xml/widget_featured_page.xml
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/app/src/main/res/xml/widget_featured_page.xml 
b/app/src/main/res/xml/widget_featured_page.xml
index 94772ad..fb37598 100644
--- a/app/src/main/res/xml/widget_featured_page.xml
+++ b/app/src/main/res/xml/widget_featured_page.xml
@@ -5,6 +5,6 @@
 android:minHeight="32dp"
 android:minResizeWidth="100dp"
 android:resizeMode="horizontal|vertical"
-android:updatePeriodMillis="4320"
+android:updatePeriodMillis="1440"
 android:initialLayout="@layout/widget_featured_page">
 
\ No newline at end of file

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2914e1accf5e17a09399ef8eb807ca571b6378af
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Jcasariego 

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


[MediaWiki-commits] [Gerrit] operations/dns[master]: Add puppetcompiler1001 forward and reverse DNS records

2017-10-10 Thread Herron (Code Review)
Herron has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/383400 )

Change subject: Add puppetcompiler1001 forward and reverse DNS records
..


Add puppetcompiler1001 forward and reverse DNS records

Create dns entries for puppetcompiler1001.eqiad.wmnet ganeti VM

Bug: T177843
Change-Id: I36f99810a8fef564a8d5c8508f50e024f93b89dd
---
M templates/10.in-addr.arpa
M templates/wmnet
2 files changed, 2 insertions(+), 1 deletion(-)

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



diff --git a/templates/10.in-addr.arpa b/templates/10.in-addr.arpa
index 7e5a534..b2f9de7 100644
--- a/templates/10.in-addr.arpa
+++ b/templates/10.in-addr.arpa
@@ -714,7 +714,7 @@
 14  1H IN PTR   ores1005.eqiad.wmnet.
 15  1H IN PTR   ores1006.eqiad.wmnet.
 16  1H IN PTR   deploy1001.eqiad.wmnet.
-
+17  1H IN PTR   puppetcompiler1001.eqiad.wmnet. ; VM on the 
ganeti01.svc.eqiad.wmnet cluster
 18  1H IN PTR   rdb1007.eqiad.wmnet.
 19  1H IN PTR   rdb1008.eqiad.wmnet.
 20  1H IN PTR   neodymium.eqiad.wmnet.
diff --git a/templates/wmnet b/templates/wmnet
index 76aa873..14dcc2f 100644
--- a/templates/wmnet
+++ b/templates/wmnet
@@ -791,6 +791,7 @@
 prometheus1004  1H  IN A10.64.16.38
 prometheus1004  1H  IN  2620:0:861:102:10:64:16:38
 promethium  1H  IN A10.64.20.12
+puppetcompiler1001 1H IN A  10.64.32.17 ; VM on the 
ganeti01.svc.eqiad.wmnet cluster
 puppetmaster1001 1H IN A10.64.16.73
 puppetmaster1001 1H IN  2620:0:861:102:10:64:16:73
 puppetmaster1002 1H IN A10.64.48.45

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I36f99810a8fef564a8d5c8508f50e024f93b89dd
Gerrit-PatchSet: 1
Gerrit-Project: operations/dns
Gerrit-Branch: master
Gerrit-Owner: Herron 
Gerrit-Reviewer: Herron 
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...GuidedTour[master]: Optimize SVGs & replace colors with WikimediaUI palette ones

2017-10-10 Thread VolkerE (Code Review)
VolkerE has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/383415 )

Change subject: Optimize SVGs & replace colors with WikimediaUI palette ones
..

Optimize SVGs & replace colors with WikimediaUI palette ones

Optimizing SVGs to useful minimum markup and replacing
colors with ones from WikimediaUI palette.

Bug: T175660
Change-Id: Iff8c34e8470741cc2e4caf0a963e062ee3b8b208
---
M modules/images/arrow-icon-back-ltr.svg
M modules/images/arrow-icon-back-rtl.svg
M modules/images/arrow-icon-next-ltr.svg
M modules/images/arrow-icon-next-rtl.svg
M modules/images/ext.guidedTour.x.svg
M modules/images/okay-icon.svg
6 files changed, 15 insertions(+), 56 deletions(-)


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

diff --git a/modules/images/arrow-icon-back-ltr.svg 
b/modules/images/arrow-icon-back-ltr.svg
index 82945cb..02ff3be 100644
--- a/modules/images/arrow-icon-back-ltr.svg
+++ b/modules/images/arrow-icon-back-ltr.svg
@@ -1,12 +1,4 @@
 
-
-http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd;>
-http://www.w3.org/2000/svg; 
xmlns:xlink="http://www.w3.org/1999/xlink; x="0px" y="0px"
-width="116.66px" height="116.662px" viewBox="0 0 116.66 116.662" 
enable-background="new 0 0 116.66 116.662"
-xml:space="preserve">
-
-   
-   
-   
-
+http://www.w3.org/2000/svg; width="116.66" height="116.662" 
viewBox="0 0 116.66 116.662">
+   
 
diff --git a/modules/images/arrow-icon-back-rtl.svg 
b/modules/images/arrow-icon-back-rtl.svg
index 13611c3..dd4f642 100644
--- a/modules/images/arrow-icon-back-rtl.svg
+++ b/modules/images/arrow-icon-back-rtl.svg
@@ -1,12 +1,4 @@
 
-
-http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd;>
-http://www.w3.org/2000/svg; 
xmlns:xlink="http://www.w3.org/1999/xlink; x="0px" y="0px"
-width="116.66px" height="116.662px" viewBox="0 0 116.66 116.662" 
enable-background="new 0 0 116.66 116.662"
-xml:space="preserve">
-
-   
-   
-   
-
+http://www.w3.org/2000/svg; width="116.66" height="116.662" 
viewBox="0 0 116.66 116.662">
+   
 
diff --git a/modules/images/arrow-icon-next-ltr.svg 
b/modules/images/arrow-icon-next-ltr.svg
index e654a2c..54bdb0c 100644
--- a/modules/images/arrow-icon-next-ltr.svg
+++ b/modules/images/arrow-icon-next-ltr.svg
@@ -1,12 +1,4 @@
 
-
-http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd;>
-http://www.w3.org/2000/svg; 
xmlns:xlink="http://www.w3.org/1999/xlink; x="0px" y="0px"
-width="116.66px" height="116.662px" viewBox="0 0 116.66 116.662" 
enable-background="new 0 0 116.66 116.662"
-xml:space="preserve">
-
-   
-   
-   
-
+http://www.w3.org/2000/svg; width="116.66" height="116.662" 
viewBox="0 0 116.66 116.662">
+   
 
diff --git a/modules/images/arrow-icon-next-rtl.svg 
b/modules/images/arrow-icon-next-rtl.svg
index 6ea5820..b6435f0 100644
--- a/modules/images/arrow-icon-next-rtl.svg
+++ b/modules/images/arrow-icon-next-rtl.svg
@@ -1,12 +1,4 @@
 
-
-http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd;>
-http://www.w3.org/2000/svg; 
xmlns:xlink="http://www.w3.org/1999/xlink; x="0px" y="0px"
-width="116.66px" height="116.662px" viewBox="0 0 116.66 116.662" 
enable-background="new 0 0 116.66 116.662"
-xml:space="preserve">
-
-   
-   
-   
-
+http://www.w3.org/2000/svg; width="116.66" height="116.662" 
viewBox="0 0 116.66 116.662">
+   
 
diff --git a/modules/images/ext.guidedTour.x.svg 
b/modules/images/ext.guidedTour.x.svg
index 938fd51..80be9a3 100644
--- a/modules/images/ext.guidedTour.x.svg
+++ b/modules/images/ext.guidedTour.x.svg
@@ -1,7 +1,4 @@
 
-
-http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd;>
-http://www.w3.org/2000/svg; 
xmlns:xlink="http://www.w3.org/1999/xlink; x="0px" y="0px"
-viewBox="0 0 96 96" enable-background="new 0 0 96 96" 
xml:space="preserve">
-
+http://www.w3.org/2000/svg; width="96" height="96" viewBox="0 0 96 
96">
+   
 
diff --git a/modules/images/okay-icon.svg b/modules/images/okay-icon.svg
index a93b606..3f4dd46 100644
--- a/modules/images/okay-icon.svg
+++ b/modules/images/okay-icon.svg
@@ -1,13 +1,7 @@
 
-
-http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd;>
-http://www.w3.org/2000/svg; 
xmlns:xlink="http://www.w3.org/1999/xlink; x="0px" y="0px"
-width="142.282px" height="142.28px" viewBox="0 -11.785 142.282 142.28" 
enable-background="new 0 -11.785 142.282 142.28"
-xml:space="preserve">
-
-   
-   
-   
-   
-
+http://www.w3.org/2000/svg; width="142.282" height="142.28" 
viewBox="0 -11.785 142.282 142.28">
+   
+   
+   
+   
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iff8c34e8470741cc2e4caf0a963e062ee3b8b208
Gerrit-PatchSet: 1

[MediaWiki-commits] [Gerrit] operations/puppet[production]: Increase the shard count for Wikidata entity dumps from 5 to 6

2017-10-10 Thread Hoo man (Code Review)
Hoo man has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/383414 )

Change subject: Increase the shard count for Wikidata entity dumps from 5 to 6
..

Increase the shard count for Wikidata entity dumps from 5 to 6

We did many other things (and by far not all of these are deployed
yet), but this is the only way we can get this into a reasonable
state again.

Bug: T177486
Change-Id: I1faa4bcae655f78e39ac2d0786ea74061a3fa9c4
---
M modules/snapshot/files/cron/dumpwikidatajson.sh
M modules/snapshot/files/cron/dumpwikidatardf.sh
2 files changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/14/383414/1

diff --git a/modules/snapshot/files/cron/dumpwikidatajson.sh 
b/modules/snapshot/files/cron/dumpwikidatajson.sh
index 5bb3279..147cc30 100644
--- a/modules/snapshot/files/cron/dumpwikidatajson.sh
+++ b/modules/snapshot/files/cron/dumpwikidatajson.sh
@@ -16,7 +16,7 @@
 failureFile=/tmp/dumpwikidatajson-failure
 mainLogFile=/var/log/wikidatadump/dumpwikidatajson-$filename-main.log
 
-shards=5
+shards=6
 
 # Try to create the dump (up to three times).
 retries=0
diff --git a/modules/snapshot/files/cron/dumpwikidatardf.sh 
b/modules/snapshot/files/cron/dumpwikidatardf.sh
index 1742842..006c36d 100755
--- a/modules/snapshot/files/cron/dumpwikidatardf.sh
+++ b/modules/snapshot/files/cron/dumpwikidatardf.sh
@@ -39,7 +39,7 @@
 failureFile=/tmp/dumpwikidata$dumpFormat-$dumpName-failure
 mainLogFile=/var/log/wikidatadump/dumpwikidata$dumpFormat-$filename-main.log
 
-shards=5
+shards=6
 
 declare -A dumpNameToMinSize
 # Sanity check: Minimal size we expect each shard of a certain dump to have

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1faa4bcae655f78e39ac2d0786ea74061a3fa9c4
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Hoo man 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Add option to hide missing pages while searching

2017-10-10 Thread Petar.petkovic (Code Review)
Petar.petkovic has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/383413 )

Change subject: Add option to hide missing pages while searching
..

Add option to hide missing pages while searching

Bug: T177469
Change-Id: Ie5fdbe6eacde05473101d480a98eb5f2b3c6251d
---
M resources/src/mediawiki.widgets/mw.widgets.TitleWidget.js
1 file changed, 5 insertions(+), 0 deletions(-)


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

diff --git a/resources/src/mediawiki.widgets/mw.widgets.TitleWidget.js 
b/resources/src/mediawiki.widgets/mw.widgets.TitleWidget.js
index db56bd3..8ddef54 100644
--- a/resources/src/mediawiki.widgets/mw.widgets.TitleWidget.js
+++ b/resources/src/mediawiki.widgets/mw.widgets.TitleWidget.js
@@ -22,6 +22,7 @@
 * @cfg {boolean} [showRedirectTargets=true] Show the targets of 
redirects
 * @cfg {boolean} [showImages] Show page images
 * @cfg {boolean} [showDescriptions] Show page descriptions
+* @cfg {boolean} [showMissing=true] Show missing pages
 * @cfg {boolean} [excludeCurrentPage] Exclude the current page from 
suggestions
 * @cfg {boolean} [validateTitle=true] Whether the input must be a 
valid title (if set to true,
 *  the widget will marks itself red for invalid inputs, including an 
empty query).
@@ -44,6 +45,7 @@
this.showRedirectTargets = config.showRedirectTargets !== false;
this.showImages = !!config.showImages;
this.showDescriptions = !!config.showDescriptions;
+   this.showMissing = config.showMissing !== false;
this.excludeCurrentPage = !!config.excludeCurrentPage;
this.validateTitle = config.validateTitle !== undefined ? 
config.validateTitle : true;
this.cache = config.cache;
@@ -227,6 +229,9 @@
 
for ( index in data.pages ) {
suggestionPage = data.pages[ index ];
+   if ( !this.showMissing && suggestionPage.missing !== 
undefined ) {
+   continue;
+   }
// When excludeCurrentPage is set, don't list the 
current page unless the user has type the full title
if ( this.excludeCurrentPage && suggestionPage.title 
=== currentPageName && suggestionPage.title !== titleObj.getPrefixedText() ) {
continue;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie5fdbe6eacde05473101d480a98eb5f2b3c6251d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Petar.petkovic 

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


[MediaWiki-commits] [Gerrit] mediawiki...Collection[master]: Deal with extreme of an empty book

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

Change subject: Deal with extreme of an empty book
..

Deal with extreme of an empty book

This edge case currently throws an exception. Let's not do that.

Bug: T175856
Change-Id: I768a89d213611799a227270c6cb2b512c083e7ef
---
M includes/BookRenderer.php
M tests/phpunit/includes/BookRendererTest.php
2 files changed, 29 insertions(+), 8 deletions(-)


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

diff --git a/includes/BookRenderer.php b/includes/BookRenderer.php
index ef1a0f6..f064867 100644
--- a/includes/BookRenderer.php
+++ b/includes/BookRenderer.php
@@ -41,6 +41,7 @@
$articleCount = count( array_filter( $collection['items'], 
function ( $item ) {
return $item['type'] === 'article';
} ) );
+   $hasArticles = $articleCount > 0;
 
$headingCounter = new HeadingCounter();
$bookBodyHtml = '';
@@ -119,19 +120,26 @@
$hasImages = isset( $metadata['images'] ) && 
$metadata['images'];
$hasLicense = isset( $metadata['license'] ) && 
$metadata['license'];
 
-   $outline = array_merge( $outline,
-   $this->getAdditionalBookChapters( $tocHeadingCounter, 
$metadataLevel,
-   $hasImages, $hasLicense )
-   );
+   if ( $hasArticles ) {
+   $outline = array_merge( $outline,
+   $this->getAdditionalBookChapters( 
$tocHeadingCounter, $metadataLevel,
+   $hasImages, $hasLicense )
+   );
+   }
 
$templateData = [
-   'contributors' => [
-   'data' => $metadata['contributors'],
-   'level' => 
$headingCounter->incrementAndGetTopLevel(),
-   ],
'outline' => $outline,
'html' => $bookBodyHtml,
];
+
+   if ( $hasArticles ) {
+   $templateData['contributors'] = [
+   'data' => $metadata['contributors'],
+   'level' => 
$headingCounter->incrementAndGetTopLevel(),
+   ];
+   } else {
+   $templateData['contributors'] = false;
+   }
if ( $hasImages ) {
$templateData['images'] = [
'data' => $metadata['images'],
diff --git a/tests/phpunit/includes/BookRendererTest.php 
b/tests/phpunit/includes/BookRendererTest.php
index b097ea2..efe8001 100644
--- a/tests/phpunit/includes/BookRendererTest.php
+++ b/tests/phpunit/includes/BookRendererTest.php
@@ -20,6 +20,19 @@
$this->assertArraySame( $expectedOutline, $data['outline'], 
'Check table of contents generation' );
}
 
+
+   public function testGetBookTemplateDataImagesGeneration() {
+   $templateParser = new TemplateParser( __DIR__ . 
'/../../../templates' );
+   $renderer = new BookRenderer( $templateParser );
+   $collection = [ 'items' => [], 'title' => 'Empty book' ];
+   $data = $renderer->getBookTemplateData( $collection, [], [] );
+   $this->assertSame( $data['license'], false, 'Template data for 
empty book has no license' );
+   $this->assertSame( $data['images'], false, 'Template data for 
empty book has no images' );
+   $this->assertSame( $data['contributors'], false, 'Template data 
for empty book has no contributors' );
+   $this->assertArraySame( $data['outline'], [],
+   'Template data for empty book has empty outline' );
+   }
+
/**
 * @dataProvider provideRenderBook
 * @param array[] $collection Collection, as returned by 
CollectionSession::getCollection().

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I768a89d213611799a227270c6cb2b512c083e7ef
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Collection
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...Collection[master]: Restore table of content generation tests

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

Change subject: Restore table of content generation tests
..

Restore table of content generation tests

Bug: T175856
Change-Id: Ie6c023924cf4d1623243cb879974b945772d5962
---
M includes/BookRenderer.php
M tests/phpunit/includes/BookRendererTest.php
2 files changed, 24 insertions(+), 1 deletion(-)


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

diff --git a/includes/BookRenderer.php b/includes/BookRenderer.php
index d4e01ee..ef1a0f6 100644
--- a/includes/BookRenderer.php
+++ b/includes/BookRenderer.php
@@ -34,7 +34,7 @@
 *   Also, an outline will be added (see renderCoverAndToc() for 
format).
 * @return array with keys html representing the data needed to render 
the book
 */
-   private function getBookTemplateData( $collection, $pages, $metadata ) {
+   public function getBookTemplateData( $collection, $pages, $metadata ) {
$hasChapters = !empty( array_filter( $collection['items'], 
function ( $item ) {
return $item['type'] === 'chapter';
} ) );
diff --git a/tests/phpunit/includes/BookRendererTest.php 
b/tests/phpunit/includes/BookRendererTest.php
index 4cb7072..b097ea2 100644
--- a/tests/phpunit/includes/BookRendererTest.php
+++ b/tests/phpunit/includes/BookRendererTest.php
@@ -9,6 +9,18 @@
 
 class BookRendererTest extends MediaWikiTestCase {
/**
+* @dataProvider provideGetBookTemplateDataOutlineGeneration
+*/
+   public function testGetBookTemplateDataOutlineGeneration(
+   $collection, $pages, $metadata, $expectedOutline
+   ) {
+   $templateParser = new TemplateParser( __DIR__ . 
'/../../../templates' );
+   $renderer = new BookRenderer( $templateParser );
+   $data = $renderer->getBookTemplateData( $collection, $pages, 
$metadata );
+   $this->assertArraySame( $expectedOutline, $data['outline'], 
'Check table of contents generation' );
+   }
+
+   /**
 * @dataProvider provideRenderBook
 * @param array[] $collection Collection, as returned by 
CollectionSession::getCollection().
 * @param string[] $pages Map of prefixed DB key => Parsoid HTML.
@@ -35,6 +47,17 @@
];
}
 
+   public function provideGetBookTemplateDataOutlineGeneration() {
+   $cases = [];
+   foreach ( [ 'single_page', 'two_pages', 'chapters', 
'id_conflict', 'header_conflict' ] as $key ) {
+   $eg = $this->loadData( $key );
+   $cases[] = [
+   $eg['collection'], $eg['pages'], 
$eg['metadata'], $eg['expectedOutline'],
+   ];
+   }
+   return $cases;
+   }
+
/**
 * @param string $title Book title
 * @param string $subtitle Book subtitle

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie6c023924cf4d1623243cb879974b945772d5962
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Collection
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...SmashPig[master]: Add .editorconfig

2017-10-10 Thread Eileen (Code Review)
Eileen has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/383301 )

Change subject: Add .editorconfig
..


Add .editorconfig

I couldn't actually find in the MediaWiki standard that it says we should use
tabs instead of spaces, but that is what is happening in this module.

Shame MediaWiki doesn't use psr-2 - would be one less, but like drupal they
probably chose a standard before psr-2 won the standards war.

I was amused to read the page as they advocated various things as 'being more
readable' - when people clearly have differing opinions on that.

Anyway, this isn't working in my IDE as well as I might hope with
the spaces vs tabs, but I'm pretty sure it is right & the magic is in
getting the IDE to work right (or waiting for a release that does).

Bug: T177725
Change-Id: I317c068b28dd2cdede9d854e187fb952ac0fe3e2
---
A .editorconfig
1 file changed, 15 insertions(+), 0 deletions(-)

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



diff --git a/.editorconfig b/.editorconfig
new file mode 100644
index 000..9ec2faa
--- /dev/null
+++ b/.editorconfig
@@ -0,0 +1,15 @@
+# This file is for unifying the coding style for different editors and IDEs
+# editorconfig.org
+
+# WMF-special coding standard
+# https://www.mediawiki.org/wiki/Manual:Coding_conventions/PHP
+
+root = true
+
+[*.php]
+charset = utf-8
+end_of_line = lf
+insert_final_newline = true
+trim_trailing_whitespace = true
+indent_style = tab
+indent_size = 4

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I317c068b28dd2cdede9d854e187fb952ac0fe3e2
Gerrit-PatchSet: 2
Gerrit-Project: wikimedia/fundraising/SmashPig
Gerrit-Branch: master
Gerrit-Owner: Eileen 
Gerrit-Reviewer: Eileen 
Gerrit-Reviewer: Ejegg 
Gerrit-Reviewer: Mepps 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] oojs/ui[master]: icons: Provide a 'reload' icon in the 'interactions' pack

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

Change subject: icons: Provide a 'reload' icon in the 'interactions' pack
..


icons: Provide a 'reload' icon in the 'interactions' pack

Based on the icon in the ContentTranslation MediaWiki
extension.

Bug: T177694
Change-Id: Ie726396f0045e507bd6ae4b40fbb3894c919d1a1
---
M demos/pages/icons.js
M src/themes/apex/icons-interactions.json
A src/themes/apex/images/icons/reload-ltr.svg
A src/themes/apex/images/icons/reload-rtl.svg
M src/themes/wikimediaui/icons-interactions.json
A src/themes/wikimediaui/images/icons/reload-ltr.svg
A src/themes/wikimediaui/images/icons/reload-rtl.svg
7 files changed, 25 insertions(+), 0 deletions(-)

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



diff --git a/demos/pages/icons.js b/demos/pages/icons.js
index 75a9f85..7c459c9 100644
--- a/demos/pages/icons.js
+++ b/demos/pages/icons.js
@@ -65,6 +65,7 @@
'logOut',
'newWindow',
'printer',
+   'reload',
'search',
'settings',
'subtract'
diff --git a/src/themes/apex/icons-interactions.json 
b/src/themes/apex/icons-interactions.json
index 8aa804e..87798fb 100644
--- a/src/themes/apex/icons-interactions.json
+++ b/src/themes/apex/icons-interactions.json
@@ -50,6 +50,10 @@
"ltr": "images/icons/printer-ltr.svg",
"rtl": "images/icons/printer-rtl.svg"
} },
+   "reload": { "file": {
+   "ltr": "images/icons/reload-ltr.svg",
+   "rtl": "images/icons/reload-rtl.svg"
+   } },
"search": { "file": {
"ltr": "images/icons/search-ltr.svg",
"rtl": "images/icons/search-rtl.svg"
diff --git a/src/themes/apex/images/icons/reload-ltr.svg 
b/src/themes/apex/images/icons/reload-ltr.svg
new file mode 100644
index 000..0615bb1
--- /dev/null
+++ b/src/themes/apex/images/icons/reload-ltr.svg
@@ -0,0 +1,4 @@
+
+http://www.w3.org/2000/svg; width="24" height="24" viewBox="0 0 24 
24">
+
+
diff --git a/src/themes/apex/images/icons/reload-rtl.svg 
b/src/themes/apex/images/icons/reload-rtl.svg
new file mode 100644
index 000..aca5112
--- /dev/null
+++ b/src/themes/apex/images/icons/reload-rtl.svg
@@ -0,0 +1,4 @@
+
+http://www.w3.org/2000/svg; width="24" height="24" viewBox="0 0 24 
24">
+
+
diff --git a/src/themes/wikimediaui/icons-interactions.json 
b/src/themes/wikimediaui/icons-interactions.json
index 1fb333a..d782e54 100644
--- a/src/themes/wikimediaui/icons-interactions.json
+++ b/src/themes/wikimediaui/icons-interactions.json
@@ -73,6 +73,10 @@
"ltr": "images/icons/printer-ltr.svg",
"rtl": "images/icons/printer-rtl.svg"
} },
+   "reload": { "file": {
+   "ltr": "images/icons/reload-ltr.svg",
+   "rtl": "images/icons/reload-rtl.svg"
+   } },
"search": { "file": {
"ltr": "images/icons/search-ltr.svg",
"rtl": "images/icons/search-rtl.svg"
diff --git a/src/themes/wikimediaui/images/icons/reload-ltr.svg 
b/src/themes/wikimediaui/images/icons/reload-ltr.svg
new file mode 100644
index 000..0615bb1
--- /dev/null
+++ b/src/themes/wikimediaui/images/icons/reload-ltr.svg
@@ -0,0 +1,4 @@
+
+http://www.w3.org/2000/svg; width="24" height="24" viewBox="0 0 24 
24">
+
+
diff --git a/src/themes/wikimediaui/images/icons/reload-rtl.svg 
b/src/themes/wikimediaui/images/icons/reload-rtl.svg
new file mode 100644
index 000..aca5112
--- /dev/null
+++ b/src/themes/wikimediaui/images/icons/reload-rtl.svg
@@ -0,0 +1,4 @@
+
+http://www.w3.org/2000/svg; width="24" height="24" viewBox="0 0 24 
24">
+
+

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: init.mw.Target: make getSurfaceConfig aware of modes

2017-10-10 Thread DLynch (Code Review)
DLynch has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/383410 )

Change subject: init.mw.Target: make getSurfaceConfig aware of modes
..

init.mw.Target: make getSurfaceConfig aware of modes

ve.init.Target sets up TriggerListeners based on getSurfaceConfig if there's
no Surface instantiated. As such, loading directly in source mode would have
those listeners present and assuming the document is in visual mode. So, if
there's not a Surface already, we'll assume we're going to get one created
with the defaultMode, and set things up expecting that.

Bug: T153959
Change-Id: Ia0afe32e6b63ea0d3418137ca5c8bc32c009ecfa
---
M modules/ve-mw/init/ve.init.mw.Target.js
1 file changed, 14 insertions(+), 3 deletions(-)


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

diff --git a/modules/ve-mw/init/ve.init.mw.Target.js 
b/modules/ve-mw/init/ve.init.mw.Target.js
index 2fc7b9c..08d17f2 100644
--- a/modules/ve-mw/init/ve.init.mw.Target.js
+++ b/modules/ve-mw/init/ve.init.mw.Target.js
@@ -310,9 +310,6 @@
// Preserve empty linebreaks on paste in source editor
importRules.all.keepEmptyContentBranches = true;
config = this.getSurfaceConfig( ve.extendObject( {}, config, {
-   commandRegistry: ve.ui.wikitextCommandRegistry,
-   sequenceRegistry: ve.ui.wikitextSequenceRegistry,
-   dataTransferHandlerFactory: 
ve.ui.wikitextDataTransferHandlerFactory,
importRules: importRules
} ) );
return new ve.ui.MWWikitextSurface( dmDoc, config );
@@ -342,6 +339,20 @@
 };
 
 /**
+ * @inheritdoc
+ */
+ve.init.mw.Target.prototype.getSurfaceConfig = function ( config ) {
+   // If we're not asking for a specific mode's config, use the default 
mode.
+   config = ve.extendObject( { mode: this.defaultMode }, config );
+   return ve.init.mw.Target.super.prototype.getSurfaceConfig.call( this, 
ve.extendObject( {
+   // Provide the wikitext versions of the registries, if we're 
using source mode
+   commandRegistry: config.mode === 'source' ? 
ve.ui.wikitextCommandRegistry : ve.ui.commandRegistry,
+   sequenceRegistry: config.mode === 'source' ? 
ve.ui.wikitextSequenceRegistry : ve.ui.sequenceRegistry,
+   dataTransferHandlerFactory: config.mode === 'source' ? 
ve.ui.wikitextDataTransferHandlerFactory : ve.ui.dataTransferHandlerFactory
+   }, config ) );
+};
+
+/**
  * Switch to editing mode.
  *
  * @method

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia0afe32e6b63ea0d3418137ca5c8bc32c009ecfa
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: DLynch 

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


[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Fix interlanguage links for be-x-old language.

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

Change subject: Fix interlanguage links for be-x-old language.
..


Fix interlanguage links for be-x-old language.

Bug: T168496
Change-Id: Ic082fcb833701110b45d61fb067c51077aadb302
---
M app/src/main/java/org/wikipedia/language/LangLinksActivity.java
1 file changed, 5 insertions(+), 0 deletions(-)

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



diff --git a/app/src/main/java/org/wikipedia/language/LangLinksActivity.java 
b/app/src/main/java/org/wikipedia/language/LangLinksActivity.java
index f59ebe0..7dd8115 100644
--- a/app/src/main/java/org/wikipedia/language/LangLinksActivity.java
+++ b/app/src/main/java/org/wikipedia/language/LangLinksActivity.java
@@ -193,6 +193,11 @@
 if (GOTHIC_LANGUAGE_CODE.equals(languageCode)) {
 // Remove Gothic since it causes Android to segfault.
 it.remove();
+} else if ("be-x-old".equals(languageCode)) {
+// Replace legacy name of тарашкевіца language with the 
correct name.
+// TODO: Can probably be removed when T111853 is resolved.
+it.remove();
+it.add(new PageTitle(link.getText(), 
WikiSite.forLanguageCode("be-tarask")));
 } else if 
(AppLanguageLookUpTable.CHINESE_LANGUAGE_CODE.equals(languageCode)) {
 // Replace Chinese with Simplified and Traditional 
dialects.
 haveChineseEntry = true;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic082fcb833701110b45d61fb067c51077aadb302
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Dbrant 
Gerrit-Reviewer: Brion VIBBER 
Gerrit-Reviewer: Cooltey 
Gerrit-Reviewer: Mholloway 
Gerrit-Reviewer: Sharvaniharan 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] marvin[master]: Update: add revision support to wiki endpoint

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

Change subject: Update: add revision support to wiki endpoint
..

Update: add revision support to wiki endpoint

Change-Id: I3439048cc3094218f17edc107d1084aa484f841a
---
M src/common/pages/home.tsx
M src/common/pages/wiki.tsx
M src/common/routers/api.test.ts
M src/common/routers/api.ts
M src/common/routers/route.ts
5 files changed, 41 insertions(+), 11 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/marvin refs/changes/06/383406/1

diff --git a/src/common/pages/home.tsx b/src/common/pages/home.tsx
index bb478eb..8e33bc6 100644
--- a/src/common/pages/home.tsx
+++ b/src/common/pages/home.tsx
@@ -45,6 +45,11 @@
 {
   title: "Carrot cake",
   text: "Encoding redirect"
+},
+{
+  title: "Ice_cream_cake",
+  revision: "24242119",
+  text: "An arbitrary revision"
 }
   ];
   return (
@@ -69,11 +74,21 @@
 
 Pages
 
-  {testPages.map(({ title, text }) => (
-
-  {text}
-
-  ))}
+  {testPages.map(
+({
+  title,
+  revision,
+  text
+}: {
+  title: string;
+  revision?: string;
+  text: string;
+}) => (
+  
+{text}
+  
+)
+  )}
 
 
 Summaries
diff --git a/src/common/pages/wiki.tsx b/src/common/pages/wiki.tsx
index 3de8e71..3b008c0 100644
--- a/src/common/pages/wiki.tsx
+++ b/src/common/pages/wiki.tsx
@@ -15,14 +15,19 @@
* an encoded PageTitlePath.
*/
   title: PageTitleID | PageTitlePath;
+
+  revision?: string;
 }
 
 export interface Props {
   page: PageModel;
 }
 
-export const getInitialProps = ({ title }: Params): Promise =>
-  requestPage({ titlePath: title }).then(page => ({ page }));
+export const getInitialProps = ({ title, revision }: Params): Promise =>
+  requestPage({
+titlePath: title,
+revision: (revision && parseInt(revision, 10)) || undefined
+  }).then(page => ({ page }));
 
 export const Component = ({ page }: Props): JSX.Element => (
   
diff --git a/src/common/routers/api.test.ts b/src/common/routers/api.test.ts
index 95d778c..a349fe7 100644
--- a/src/common/routers/api.test.ts
+++ b/src/common/routers/api.test.ts
@@ -15,7 +15,8 @@
 const expected: RouteParams = {};
 Object.keys((params as RouteParams) || {}).forEach(name => {
   const value = (params as RouteParams)[name];
-  expected[name] = encodeURIComponent(value);
+  expected[name] =
+value === undefined ? undefined : encodeURIComponent(value);
 });
 
 const path = route.toPath(params);
@@ -28,7 +29,16 @@
 [
   { name: "home", route: home, params: undefined },
   { name: "about", route: about, params: undefined },
-  { name: "wiki", route: wiki, params: { title: "title" } },
+  {
+name: "wiki (latest)",
+route: wiki,
+params: { title: "title", revision: undefined }
+  },
+  {
+name: "wiki (revision)",
+route: wiki,
+params: { title: "title", revision: "1" }
+  },
   { name: "summary", route: summary, params: { title: "title" } },
   { name: "styleGuide", route: styleGuide, params: undefined },
   { name: "notFound", route: notFound, params: { 0: "/404" } }
diff --git a/src/common/routers/api.ts b/src/common/routers/api.ts
index a420c31..0116c09 100644
--- a/src/common/routers/api.ts
+++ b/src/common/routers/api.ts
@@ -21,7 +21,7 @@
 });
 
 export const wiki: Route = newRoute({
-  path: "/wiki/:title",
+  path: "/wiki/:title/:revision?",
   importModule: () =>
 import(/* webpackChunkName: "pages/wiki" */ "../pages/wiki"),
   chunkName: "pages/wiki"
diff --git a/src/common/routers/route.ts b/src/common/routers/route.ts
index fce500f..eeebcd5 100644
--- a/src/common/routers/route.ts
+++ b/src/common/routers/route.ts
@@ -7,7 +7,7 @@
  * Route.url().
  */
 export interface RouteParams {
-  [name: string]: string;
+  [name: string]: string | undefined;
 }
 
 /**

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3439048cc3094218f17edc107d1084aa484f841a
Gerrit-PatchSet: 1
Gerrit-Project: marvin
Gerrit-Branch: master
Gerrit-Owner: Niedzielski 
Gerrit-Reviewer: Sniedzielski 

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


[MediaWiki-commits] [Gerrit] marvin[master]: Fix: remove unsupported revision parameter from summary endp...

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

Change subject: Fix: remove unsupported revision parameter from summary endpoint
..

Fix: remove unsupported revision parameter from summary endpoint

The summary endpoint doesn't actually support revisions. Remove support
in Marvin.

Change-Id: If44c812def13ef863bdcd1a3aecf9a2a9d5514ac
---
M src/common/data-clients/page-summary-data-client.ts
1 file changed, 2 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/marvin refs/changes/05/383405/1

diff --git a/src/common/data-clients/page-summary-data-client.ts 
b/src/common/data-clients/page-summary-data-client.ts
index c0b6d0d..072d264 100644
--- a/src/common/data-clients/page-summary-data-client.ts
+++ b/src/common/data-clients/page-summary-data-client.ts
@@ -8,18 +8,12 @@
 // https://en.wikipedia.org/api/rest_v1/#!/Page_content/get_page_summary_title
 export interface Params {
   titlePath: PageTitlePath;
-  revision?: number;
-  timeID?: string;
   redirect?: PageRedirect;
 }
 
-const url = ({ titlePath, revision, timeID, redirect }: Params) => {
-  const revisionPath = revision === undefined ? "" : `/${revision}`;
-  const timeIDPath = timeID === undefined ? "" : `/${timeID}`;
+const url = ({ titlePath, redirect }: Params) => {
   const redirectParam = redirect === undefined ? "" : `=${redirect}`;
-
-  // eslint-disable-next-line max-len
-  return 
`${RESTBase.BASE_URL}/page/summary/${titlePath}${revisionPath}${timeIDPath}${redirectParam}`;
+  return `${RESTBase.BASE_URL}/page/summary/${titlePath}${redirectParam}`;
 };
 
 const HEADERS = {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If44c812def13ef863bdcd1a3aecf9a2a9d5514ac
Gerrit-PatchSet: 1
Gerrit-Project: marvin
Gerrit-Branch: master
Gerrit-Owner: Niedzielski 
Gerrit-Reviewer: Sniedzielski 

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


[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: WIP: Get a ve.ce.BranchNode position's corresponding DOM pos...

2017-10-10 Thread Divec (Code Review)
Divec has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/383404 )

Change subject: WIP: Get a ve.ce.BranchNode position's corresponding DOM 
position
..

WIP: Get a ve.ce.BranchNode position's corresponding DOM position

TODO: unit testing
Change-Id: I8c9a24dc877a530c9fa421e63caf73f78d79d04c
---
M src/ce/ve.ce.BranchNode.js
1 file changed, 48 insertions(+), 39 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor 
refs/changes/04/383404/1

diff --git a/src/ce/ve.ce.BranchNode.js b/src/ce/ve.ce.BranchNode.js
index b1a3131..5b5b04e 100644
--- a/src/ce/ve.ce.BranchNode.js
+++ b/src/ce/ve.ce.BranchNode.js
@@ -174,16 +174,8 @@
  * @param {...ve.dm.BranchNode} [nodes] Variadic list of nodes to insert
  */
 ve.ce.BranchNode.prototype.onSplice = function ( index ) {
-   var i, j,
-   length,
-   args = [],
-   anchorCeNode,
-   prevCeNode,
-   anchorDomNode,
-   afterAnchor,
-   node,
-   parentNode,
-   removals;
+   var i, length, removals, position, j,
+   args = [];
 
for ( i = 0, length = arguments.length; i < length; i++ ) {
args.push( arguments[ i ] );
@@ -205,37 +197,14 @@
removals[ i ].$element.detach();
}
if ( args.length >= 3 ) {
-   if ( index > 0 ) {
-   // Get the element before the insertion
-   anchorCeNode = this.children[ index - 1 ];
-   // If the CE node is a text node, its $element will be 
empty
-   // Look at its previous sibling, which cannot be a text 
node
-   if ( anchorCeNode.getType() === 'text' ) {
-   prevCeNode = this.children[ index - 2 ];
-   if ( prevCeNode ) {
-   anchorDomNode = 
prevCeNode.$element.last()[ 0 ].nextSibling;
-   } else {
-   anchorDomNode = this.$element[ 0 
].firstChild;
-   }
-   } else {
-   anchorDomNode = anchorCeNode.$element.last()[ 0 
];
-   }
-   }
+   position = this.getDomPosition( index );
for ( i = args.length - 1; i >= 2; i-- ) {
args[ i ].attach( this );
-   if ( anchorDomNode ) {
-   // DOM equivalent of $( anchorDomNode ).after( 
args[i].$element );
-   afterAnchor = anchorDomNode.nextSibling;
-   parentNode = anchorDomNode.parentNode;
-   for ( j = 0, length = args[ i 
].$element.length; j < length; j++ ) {
-   parentNode.insertBefore( args[ i 
].$element[ j ], afterAnchor );
-   }
-   } else {
-   // DOM equivalent of this.$element.prepend( 
args[j].$element );
-   node = this.$element[ 0 ];
-   for ( j = args[ i ].$element.length - 1; j >= 
0; j-- ) {
-   node.insertBefore( args[ i ].$element[ 
j ], node.firstChild );
-   }
+   for ( j = 0, length = args[ i ].$element.length; j < 
length; j++ ) {
+   position.node.insertBefore(
+   args[ i ].$element[ j ],
+   position.node.children[ position.offset 
]
+   );
}
if ( this.live !== args[ i ].isLive() ) {
args[ i ].setLive( this.live );
@@ -386,3 +355,43 @@
// Parent method
ve.ce.BranchNode.super.prototype.destroy.call( this );
 };
+
+/**
+ * Get the DOM position (node and offset) corresponding to a position in this 
node
+ *
+ * @param {number} offset The offset inside this node of the required position
+ * @return {Object|null} position The DOM position, or null if unattached
+ * @return {Node} return.node DOM node; guaranteed to be this node's final DOM 
node
+ * @return {number} return.offset Offset
+ */
+ve.ce.BranchNode.prototype.getDomPosition = function ( offset ) {
+   var ceNode, domOffset,
+   domNode = this.$element.last()[ 0 ],
+   textNodeCount = 0;
+   while ( true ) {
+   offset--;
+   ceNode = this.children[ offset ];
+   if ( !ceNode ) {
+   // No children with DOM nodes; return the first offset 
inside this
+   // node's DOM node.
+   

[MediaWiki-commits] [Gerrit] wikidata...rdf[master]: fix checkstyle / spotbugs warnings on tools module

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

Change subject: fix checkstyle / spotbugs warnings on tools module
..


fix checkstyle / spotbugs warnings on tools module

Change-Id: I6d173267a09ded9245e3c304e66fce53ca18e4f1
---
M tools/src/main/java/org/wikidata/query/rdf/tool/CliUtils.java
M tools/src/main/java/org/wikidata/query/rdf/tool/Munge.java
M tools/src/main/java/org/wikidata/query/rdf/tool/Update.java
M tools/src/main/java/org/wikidata/query/rdf/tool/Updater.java
M tools/src/main/java/org/wikidata/query/rdf/tool/change/Change.java
M 
tools/src/main/java/org/wikidata/query/rdf/tool/change/RecentChangesPoller.java
M tools/src/main/java/org/wikidata/query/rdf/tool/rdf/Munger.java
M tools/src/main/java/org/wikidata/query/rdf/tool/rdf/RdfRepository.java
M tools/src/main/java/org/wikidata/query/rdf/tool/rdf/UpdateBuilder.java
M 
tools/src/main/java/org/wikidata/query/rdf/tool/wikibase/WikibaseRepository.java
M 
tools/src/test/java/org/wikidata/query/rdf/tool/AbstractUpdaterIntegrationTestBase.java
11 files changed, 85 insertions(+), 62 deletions(-)

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



diff --git a/tools/src/main/java/org/wikidata/query/rdf/tool/CliUtils.java 
b/tools/src/main/java/org/wikidata/query/rdf/tool/CliUtils.java
index 0205033..1dad22c 100644
--- a/tools/src/main/java/org/wikidata/query/rdf/tool/CliUtils.java
+++ b/tools/src/main/java/org/wikidata/query/rdf/tool/CliUtils.java
@@ -1,12 +1,12 @@
 package org.wikidata.query.rdf.tool;
 
+import static java.nio.file.Files.createDirectories;
+import static java.nio.file.Files.newInputStream;
+import static java.nio.file.Files.newOutputStream;
 import static org.wikidata.query.rdf.tool.StreamUtils.utf8;
 
 import java.io.BufferedInputStream;
 import java.io.BufferedOutputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
@@ -14,10 +14,9 @@
 import java.io.Reader;
 import java.io.Writer;
 import java.net.URI;
+import java.nio.file.Paths;
 import java.util.zip.GZIPInputStream;
 import java.util.zip.GZIPOutputStream;
-
-import com.google.common.io.Files;
 
 /**
  * Utilities for command line scripts.
@@ -44,7 +43,7 @@
 }
 InputStream stream;
 if (!uri.contains(":/")) {
-stream = new BufferedInputStream(new FileInputStream(uri));
+stream = new BufferedInputStream(newInputStream(Paths.get(uri)));
 } else {
 stream = URI.create(uri).toURL().openStream();
 }
@@ -74,8 +73,8 @@
 if (out.equals("-")) {
 return ForbiddenOk.systemDotOut();
 }
-Files.createParentDirs(new File(out));
-OutputStream stream = new BufferedOutputStream(new 
FileOutputStream(out));
+createDirectories(Paths.get(out));
+OutputStream stream = new 
BufferedOutputStream(newOutputStream(Paths.get(out)));
 if (out.endsWith(".gz")) {
 stream = new GZIPOutputStream(stream);
 }
diff --git a/tools/src/main/java/org/wikidata/query/rdf/tool/Munge.java 
b/tools/src/main/java/org/wikidata/query/rdf/tool/Munge.java
index 3e235db..85e5d13 100644
--- a/tools/src/main/java/org/wikidata/query/rdf/tool/Munge.java
+++ b/tools/src/main/java/org/wikidata/query/rdf/tool/Munge.java
@@ -1,5 +1,6 @@
 package org.wikidata.query.rdf.tool;
 
+import static java.lang.Boolean.FALSE;
 import static org.wikidata.query.rdf.tool.options.OptionsUtils.handleOptions;
 import static 
org.wikidata.query.rdf.tool.options.OptionsUtils.mungerFromOptions;
 import static org.wikidata.query.rdf.tool.StreamUtils.utf8;
@@ -286,6 +287,7 @@
 }
 
 @Override
+@SuppressFBWarnings(value = "STT_STRING_PARSING_A_FIELD", 
justification = "low priority to fix")
 public void handleStatement(Statement statement) throws 
RDFHandlerException {
 lastStatement = statement;
 String subject = statement.getSubject().stringValue();
@@ -499,6 +501,9 @@
 }
 
 @Override
+@SuppressFBWarnings(
+value = "EXS_EXCEPTION_SOFTENING_NO_CHECKED",
+justification = "Hiding IOException is suspicious, but seems 
to be the usual pattern in this project")
 protected Writer buildWriter(long chunk) {
 String file = String.format(Locale.ROOT, pattern, chunk);
 log.info("Switching to {}", file);
@@ -526,6 +531,9 @@
 }
 
 @Override
+@SuppressFBWarnings(
+value = "EXS_EXCEPTION_SOFTENING_NO_CHECKED",
+justification = "Hiding IOException is suspicious, but seems 
to be the usual pattern in this project")
 protected Writer buildWriter(long chunk) {
 PipedInputStream toQueue = new PipedInputStream();

[MediaWiki-commits] [Gerrit] operations/dns[master]: geodns: US+CA prefer codfw over eqiad

2017-10-10 Thread BBlack (Code Review)
BBlack has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/383402 )

Change subject: geodns: US+CA prefer codfw over eqiad
..

geodns: US+CA prefer codfw over eqiad

Change-Id: I3aadca0a99adbfd502375d71593621d5ae33168a
---
M geo-maps
1 file changed, 33 insertions(+), 33 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/dns 
refs/changes/02/383402/1

diff --git a/geo-maps b/geo-maps
index 43c1155..08799a2 100644
--- a/geo-maps
+++ b/geo-maps
@@ -125,65 +125,65 @@
 AZ => [ulsfo, codfw, eqiad, esams], # Arizona
 CA => [ulsfo, codfw, eqiad, esams], # California
 CO => [codfw, eqiad, ulsfo, esams], # Colorado
-CT => [eqiad, codfw, ulsfo, esams], # Connecticut
-DC => [eqiad, codfw, ulsfo, esams], # District of Columbia
-DE => [eqiad, codfw, ulsfo, esams], # Delaware
-FL => [eqiad, codfw, ulsfo, esams], # Florida
-GA => [eqiad, codfw, ulsfo, esams], # Georgia
+CT => [codfw, eqiad, ulsfo, esams], # Connecticut
+DC => [codfw, eqiad, ulsfo, esams], # District of Columbia
+DE => [codfw, eqiad, ulsfo, esams], # Delaware
+FL => [codfw, eqiad, ulsfo, esams], # Florida
+GA => [codfw, eqiad, ulsfo, esams], # Georgia
 HI => [ulsfo, codfw, eqiad, esams], # Hawaii
 IA => [codfw, eqiad, ulsfo, esams], # Iowa
 ID => [ulsfo, codfw, eqiad, esams], # Idaho
-IL => [eqiad, codfw, ulsfo, esams], # Illinois
-IN => [eqiad, codfw, ulsfo, esams], # Indiana
+IL => [codfw, eqiad, ulsfo, esams], # Illinois
+IN => [codfw, eqiad, ulsfo, esams], # Indiana
 KS => [codfw, eqiad, ulsfo, esams], # Kansas
-KY => [eqiad, codfw, ulsfo, esams], # Kentucky
+KY => [codfw, eqiad, ulsfo, esams], # Kentucky
 LA => [codfw, eqiad, ulsfo, esams], # Louisiana
-MA => [eqiad, codfw, ulsfo, esams], # Massachusetts
-MD => [eqiad, codfw, ulsfo, esams], # Maryland
-ME => [eqiad, codfw, ulsfo, esams], # Maine
-MI => [eqiad, codfw, ulsfo, esams], # Michigan
+MA => [codfw, eqiad, ulsfo, esams], # Massachusetts
+MD => [codfw, eqiad, ulsfo, esams], # Maryland
+ME => [codfw, eqiad, ulsfo, esams], # Maine
+MI => [codfw, eqiad, ulsfo, esams], # Michigan
 MN => [codfw, eqiad, ulsfo, esams], # Minnesota
 MO => [codfw, eqiad, ulsfo, esams], # Missouri
 MS => [codfw, eqiad, ulsfo, esams], # Mississippi
 MT => [ulsfo, codfw, eqiad, esams], # Montana
-NC => [eqiad, codfw, ulsfo, esams], # North Carolina
+NC => [codfw, eqiad, ulsfo, esams], # North Carolina
 ND => [codfw, eqiad, ulsfo, esams], # North Dakota
 NE => [codfw, eqiad, ulsfo, esams], # Nebraska
-NH => [eqiad, codfw, ulsfo, esams], # New Hampshire
-NJ => [eqiad, codfw, ulsfo, esams], # New Jersey
+NH => [codfw, eqiad, ulsfo, esams], # New Hampshire
+NJ => [codfw, eqiad, ulsfo, esams], # New Jersey
 NM => [codfw, eqiad, ulsfo, esams], # New Mexico
 NV => [ulsfo, codfw, eqiad, esams], # Nevada
-NY => [eqiad, codfw, ulsfo, esams], # New York
-OH => [eqiad, codfw, ulsfo, esams], # Ohio
+NY => [codfw, eqiad, ulsfo, esams], # New York
+OH => [codfw, eqiad, ulsfo, esams], # Ohio
 OK => [codfw, eqiad, ulsfo, esams], # Oklahoma
 OR => [ulsfo, codfw, eqiad, esams], # Oregon
-PA => [eqiad, codfw, ulsfo, esams], # Pennsylvania
-RI => [eqiad, codfw, ulsfo, esams], # Rhode Island
-SC => [eqiad, codfw, ulsfo, esams], # South Carolina
+PA => [codfw, eqiad, ulsfo, esams], # Pennsylvania
+RI => [codfw, eqiad, ulsfo, esams], # Rhode Island
+SC => [codfw, eqiad, ulsfo, esams], # South Carolina
 SD => [codfw, eqiad, ulsfo, esams], # South Dakota
-TN => [eqiad, codfw, ulsfo, esams], # Tennessee
+TN => [codfw, eqiad, ulsfo, esams], # Tennessee
 TX => [codfw, eqiad, ulsfo, esams], # Texas
 UT => [ulsfo, codfw, eqiad, esams], # Utah
-VA => [eqiad, codfw, ulsfo, esams], # Virginia
-VT => [eqiad, codfw, ulsfo, esams], # Vermont
+VA => [codfw, eqiad, ulsfo, esams], # Virginia
+VT => [codfw, eqiad, ulsfo, esams], # Vermont
 WA => [ulsfo, codfw, eqiad, esams], # Washington
-  

[MediaWiki-commits] [Gerrit] mediawiki...mobileapps[master]: Hygiene: Update test fixtures

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

Change subject: Hygiene: Update test fixtures
..


Hygiene: Update test fixtures

This is for news, onthisday, and a general test page.
This ia a followup of the comment in
https://gerrit.wikimedia.org/r/#/c/382035/1//COMMIT_MSG@9.

The updated content is based on an undeployed Parsoid version:
https://gerrit.wikimedia.org/r/#/c/370227/12
to make sure MCS is ready for this.

Using
const uri = 
`http://localhost:8000/${lang}.wikipedia.org/v3/page/pagebundle/${encodeURIComponent(NEWS_SITES[lang].title)}`;
Note: pagebundle instead of html in the path.
And used rsp.body.html.body instead of rsp.body when writing.

Change-Id: Ib50b702a37acf6cb481d5ffa731e48e6e8490303
---
M test/features/news/news-sites.js
M test/features/onthisday/fixtures/ar.January_1.html
M test/features/onthisday/fixtures/de.1._Dezember.html
M test/features/onthisday/fixtures/en.December_1.html
M test/features/onthisday/fixtures/sv.Augusti_25.html
M test/features/onthisday/on-this-day.js
A test/fixtures/news-site-da-2017-10-04.htm
A test/fixtures/news-site-de-2017-10-04.htm
A test/fixtures/news-site-el-2017-10-04.htm
A test/fixtures/news-site-en-2017-10-04.htm
A test/fixtures/news-site-es-2017-10-04.htm
A test/fixtures/news-site-fi-2017-10-04.htm
A test/fixtures/news-site-fr-2017-10-04.htm
A test/fixtures/news-site-he-2017-10-04.htm
A test/fixtures/news-site-ko-2017-10-04.htm
A test/fixtures/news-site-no-2017-10-04.htm
A test/fixtures/news-site-pl-2017-10-04.htm
A test/fixtures/news-site-pt-2017-10-04.htm
A test/fixtures/news-site-ru-2017-10-04.htm
A test/fixtures/news-site-sco-2017-10-04.htm
A test/fixtures/news-site-sv-2017-10-04.htm
A test/fixtures/news-site-vi-2017-10-04.htm
M test/fixtures/update-news-sites
M test/lib/bill-clinton.html
M test/lib/parseProperty/parse-infobox-test.js
25 files changed, 4,363 insertions(+), 3,013 deletions(-)

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




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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib50b702a37acf6cb481d5ffa731e48e6e8490303
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/services/mobileapps
Gerrit-Branch: master
Gerrit-Owner: BearND 
Gerrit-Reviewer: Dbrant 
Gerrit-Reviewer: Fjalapeno 
Gerrit-Reviewer: GWicke 
Gerrit-Reviewer: Jdlrobson 
Gerrit-Reviewer: Mholloway 
Gerrit-Reviewer: Mhurd 
Gerrit-Reviewer: Mobrovac 
Gerrit-Reviewer: Ppchelko 
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...mobileapps[master]: Fix Portuguese news selector

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

Change subject: Fix Portuguese news selector
..


Fix Portuguese news selector

The old version of the CSS selector for ptwiki news stories resulted in
too many news result (around 133 as of yesterday). Now it should only
pick from the top news table.

We had not noticed earlier since he had not updated the fixtures.
A subsequent commit will do so.

Change-Id: I165ec6056c10673a297ed407e427cc1697f1efc4
---
M etc/feed/news-sites.js
1 file changed, 2 insertions(+), 1 deletion(-)

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



diff --git a/etc/feed/news-sites.js b/etc/feed/news-sites.js
index 4bbe83e..7e6f627 100644
--- a/etc/feed/news-sites.js
+++ b/etc/feed/news-sites.js
@@ -62,7 +62,8 @@
 ko: new NewsSite('틀:새로_들어온_소식', 'body > ul > li', 
TOPIC_SELECTOR_BOLD_LINK),
 no: new NewsSite('Mal:Aktuelt', 'ul > li', TOPIC_SELECTOR_BOLD_LINK),
 pl: new NewsSite('Szablon:Aktualności', 'ul:last-of-type > li', 
TOPIC_SELECTOR_BOLD_LINK),
-pt: new NewsSite('Portal:Eventos_atuais', 'div > ul > li', 
TOPIC_SELECTOR_BOLD_LINK),
+pt: new NewsSite('Portal:Eventos_atuais', 'table:nth-child(3) ul > li',
+TOPIC_SELECTOR_BOLD_LINK),
 ru: new NewsSite('Шаблон:Актуальные_события', 'body > ul > li', 
TOPIC_SELECTOR_BOLD_LINK),
 sco: new NewsSite('Template:In_the_news', 'ul[id^=mw] li', 
TOPIC_SELECTOR_BOLD_LINK), // see en
 sv: new NewsSite('Portal:Huvudsida/Aktuella händelser', 'body > ul > li',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I165ec6056c10673a297ed407e427cc1697f1efc4
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/services/mobileapps
Gerrit-Branch: master
Gerrit-Owner: BearND 
Gerrit-Reviewer: Dbrant 
Gerrit-Reviewer: Fjalapeno 
Gerrit-Reviewer: GWicke 
Gerrit-Reviewer: Jdlrobson 
Gerrit-Reviewer: Mholloway 
Gerrit-Reviewer: Mhurd 
Gerrit-Reviewer: Mobrovac 
Gerrit-Reviewer: Ppchelko 
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...tools-webservice[master]: Extend webservice -h details

2017-10-10 Thread Merlijn van Deen (Code Review)
Merlijn van Deen has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/383401 )

Change subject: Extend webservice -h details
..

Extend webservice -h details

Adds a link to the online docs and a list of supported webservice types.
After this patch, `webservice -h` looks like this:


usage: webservice [-h] [--backend {gridengine,kubernetes}]
  [type] {start,stop,status,restart,shell} [extra_args]

Online documentation: https://wikitech.wikimedia.org/wiki/Help:Toolforge/Web

Supported webservice types:
Kubernetes backend:  golang, jdk8, nodejs, php5.6 (default), python,
 python2, ruby2, tcl
Grid Engine backend: generic, lighttpd (default), lighttpd-plain, nodejs,
 tomcat, uwsgi-plain, uwsgi-python
---

with the further details below these lines.

Change-Id: Iba82fd4f884d9993ba50759ef150671c3ecf31cf
---
M scripts/webservice
1 file changed, 29 insertions(+), 3 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/operations/software/tools-webservice 
refs/changes/01/383401/1

diff --git a/scripts/webservice b/scripts/webservice
index ae32246..8dba86a 100755
--- a/scripts/webservice
+++ b/scripts/webservice
@@ -2,6 +2,7 @@
 from __future__ import print_function
 import argparse
 import sys
+import textwrap
 
 from toollabs.webservice import WebService
 from toollabs.webservice.backends import Backend, GridEngineBackend, 
KubernetesBackend
@@ -10,7 +11,32 @@
 from toollabs.common.el import log_command_invocation
 
 
-argparser = argparse.ArgumentParser()
+GRIDENGINE_DEFAULT_TYPE = 'lighttpd'
+KUBERNETES_DEFAULT_TYPE = 'php5.6'
+
+
+def format_types_block(types, default):
+types = sorted(t + " (default)" if t == default else t for t in types)
+joined = ", ".join(types)
+return textwrap.fill(joined, 55, subsequent_indent=' '*len('Grid Engine 
backend: '))
+
+
+description = """
+Online documentation: https://wikitech.wikimedia.org/wiki/Help:Toolforge/Web
+
+Supported webservice types:
+Kubernetes backend:  {kubernetes}
+Grid Engine backend: {gridengine}
+""".format(
+kubernetes = format_types_block(KubernetesBackend.CONFIG.keys(), 
KUBERNETES_DEFAULT_TYPE),
+gridengine = format_types_block(GridEngineBackend.CONFIG.keys(), 
GRIDENGINE_DEFAULT_TYPE)
+)
+
+argparser = argparse.ArgumentParser(
+description=description,
+formatter_class=argparse.RawDescriptionHelpFormatter
+)
+
 argparser.add_argument('type', help='Type of webservice to start',
nargs='?')
 argparser.add_argument('--backend', help='Which cluster backend to use run the 
webservice',
@@ -99,7 +125,7 @@
 print("--release is deprecated and has no effect, using 
trusty...")
 args.release = 'trusty'
 if args.type is None:
-args.type = tool.manifest.get('web', 'lighttpd')
+args.type = tool.manifest.get('web', GRIDENGINE_DEFAULT_TYPE)
 elif args.type == 'lighttpd-precise':
 print('*' * 78, file=sys.stderr)
 print(
@@ -115,7 +141,7 @@
 print("Please just pick an appropriate type instead")
 sys.exit(1)
 if args.type is None:
-args.type = tool.manifest.get('web', 'php5.6')
+args.type = tool.manifest.get('web', KUBERNETES_DEFAULT_TYPE)
 acceptable_types = KubernetesBackend.CONFIG.keys()
 
 if args.extra_args is None:

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iba82fd4f884d9993ba50759ef150671c3ecf31cf
Gerrit-PatchSet: 1
Gerrit-Project: operations/software/tools-webservice
Gerrit-Branch: master
Gerrit-Owner: Merlijn van Deen 

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


[MediaWiki-commits] [Gerrit] operations/dns[master]: Add puppetcompiler1001 forward and reverse DNS records

2017-10-10 Thread Herron (Code Review)
Herron has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/383400 )

Change subject: Add puppetcompiler1001 forward and reverse DNS records
..

Add puppetcompiler1001 forward and reverse DNS records

Create dns entries for puppetcompiler1001.eqiad.wmnet ganeti VM

Bug: T177843
Change-Id: I36f99810a8fef564a8d5c8508f50e024f93b89dd
---
M templates/10.in-addr.arpa
M templates/wmnet
2 files changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/dns 
refs/changes/00/383400/1

diff --git a/templates/10.in-addr.arpa b/templates/10.in-addr.arpa
index 7e5a534..b2f9de7 100644
--- a/templates/10.in-addr.arpa
+++ b/templates/10.in-addr.arpa
@@ -714,7 +714,7 @@
 14  1H IN PTR   ores1005.eqiad.wmnet.
 15  1H IN PTR   ores1006.eqiad.wmnet.
 16  1H IN PTR   deploy1001.eqiad.wmnet.
-
+17  1H IN PTR   puppetcompiler1001.eqiad.wmnet. ; VM on the 
ganeti01.svc.eqiad.wmnet cluster
 18  1H IN PTR   rdb1007.eqiad.wmnet.
 19  1H IN PTR   rdb1008.eqiad.wmnet.
 20  1H IN PTR   neodymium.eqiad.wmnet.
diff --git a/templates/wmnet b/templates/wmnet
index 76aa873..14dcc2f 100644
--- a/templates/wmnet
+++ b/templates/wmnet
@@ -791,6 +791,7 @@
 prometheus1004  1H  IN A10.64.16.38
 prometheus1004  1H  IN  2620:0:861:102:10:64:16:38
 promethium  1H  IN A10.64.20.12
+puppetcompiler1001 1H IN A  10.64.32.17 ; VM on the 
ganeti01.svc.eqiad.wmnet cluster
 puppetmaster1001 1H IN A10.64.16.73
 puppetmaster1001 1H IN  2620:0:861:102:10:64:16:73
 puppetmaster1002 1H IN A10.64.48.45

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I36f99810a8fef564a8d5c8508f50e024f93b89dd
Gerrit-PatchSet: 1
Gerrit-Project: operations/dns
Gerrit-Branch: master
Gerrit-Owner: Herron 

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: noc: Make css/base.css shared between index, db and conf views

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

Change subject: noc: Make css/base.css shared between index, db and conf views
..


noc: Make css/base.css shared between index, db and conf views

It wasn't actually a base stylesheet before. Remove redundant
copies of base styles now coming from base.css.

Change-Id: I1b4504b04fd8fc26a280306e3aaed6e0f68781d6
---
M docroot/noc/css/base.css
M docroot/noc/css/vector.css
M docroot/noc/db.php
M docroot/noc/index.html
4 files changed, 13 insertions(+), 40 deletions(-)

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



diff --git a/docroot/noc/css/base.css b/docroot/noc/css/base.css
index d39be7c..90c67e2 100644
--- a/docroot/noc/css/base.css
+++ b/docroot/noc/css/base.css
@@ -3,9 +3,14 @@
  * - noc.wikimedia.org
  */
 
+html,
+body {
+   margin: 0;
+   padding: 0;
+}
+
 body {
background: #fff;
-   margin: 0;
padding: 0.5em 1em;
font: 14px/21px sans-serif;
color: #333;
diff --git a/docroot/noc/css/vector.css b/docroot/noc/css/vector.css
index 943515f..ec9a181 100644
--- a/docroot/noc/css/vector.css
+++ b/docroot/noc/css/vector.css
@@ -1,15 +1,12 @@
 /* Framework */
-html,
-body {
-   height: 100%;
-   margin: 0;
-   padding: 0;
-   font-family: sans-serif;
-   font-size: 1em;
-}
 body {
background-color: #f3f3f3;
background-image: url(images/page-base.png);
+
+   /* Vector: No outer padding */
+   padding: 0;
+   /* Vector: Larger base size, bodyContent resets */
+   font-size: 100%;
 }
 /* Head */
 #page-base {
@@ -166,35 +163,7 @@
 #bodyContent td, #bodyContent th {
border: none;
 }
-/* Links */
-a {
-   text-decoration: none;
-   color: #0645ad;
-   background: none;
-}
-a:visited {
-   color: #0b0080;
-}
-a:active {
-   color: #faa700;
-}
-a:hover {
-   text-decoration: underline;
-}
-a.stub {
-   color: #772233;
-}
-a.new {
-   color: #ba;
-}
-a.new:visited {
-   color: #a55858;
-}
 /* Inline Elements */
-img {
-   border: none;
-   vertical-align: middle;
-}
 hr {
height: 1px;
color: #aaa;
diff --git a/docroot/noc/db.php b/docroot/noc/db.php
index 1b49967..5e0d340 100644
--- a/docroot/noc/db.php
+++ b/docroot/noc/db.php
@@ -108,11 +108,9 @@
 

Wikimedia database configuration
+   

-   body { font: 14px/21px sans-serif; color: #252525; }
h2 { font-weight: normal; }
-   a { text-decoration: none; color: #0645ad; }
-   a:hover { text-decoration: underline; }
code { color: #000; background: #f9f9f9; border: 1px solid #ddd; 
border-radius: 2px; padding: 1px 4px; }
main { display: flex; flex-wrap: wrap; }
nav li { float: left; list-style: none; border: 1px solid #eee; 
padding: 1px 4px; margin: 0 1em 1em 0; }
diff --git a/docroot/noc/index.html b/docroot/noc/index.html
index 1781c9d..17fcef9 100644
--- a/docroot/noc/index.html
+++ b/docroot/noc/index.html
@@ -3,6 +3,7 @@
 

Wikimedia NOC
+