[MediaWiki-commits] [Gerrit] drac, icinga, ipmi: do not ensure => latest - change (operations/puppet)

2016-06-20 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review.

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

Change subject: drac,icinga,ipmi: do not ensure => latest
..

drac,icinga,ipmi: do not ensure => latest

Some more remaining cases where we ensure "latest"
with packages.

Bug:T115348
Change-Id: Id310d8128459aeb0f8feeb98e3f30a707cc00c71
---
M modules/drac/manifests/init.pp
M modules/icinga/manifests/web.pp
M modules/ipmi/manifests/init.pp
3 files changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/22/295322/1

diff --git a/modules/drac/manifests/init.pp b/modules/drac/manifests/init.pp
index 065d0d7..1733f0b 100644
--- a/modules/drac/manifests/init.pp
+++ b/modules/drac/manifests/init.pp
@@ -1,6 +1,6 @@
 class drac {
 package {'python-paramiko':
-ensure  => latest,
+ensure  => present,
 }
 
 file {'/usr/local/sbin/drac':
diff --git a/modules/icinga/manifests/web.pp b/modules/icinga/manifests/web.pp
index ca27210..3034926 100644
--- a/modules/icinga/manifests/web.pp
+++ b/modules/icinga/manifests/web.pp
@@ -7,7 +7,7 @@
 
 # Apparently required for the web interface
 package { 'icinga-doc':
-ensure => latest
+ensure => present
 }
 include ::apache
 include ::apache::mod::php5
diff --git a/modules/ipmi/manifests/init.pp b/modules/ipmi/manifests/init.pp
index e277598..2cfdb3d 100644
--- a/modules/ipmi/manifests/init.pp
+++ b/modules/ipmi/manifests/init.pp
@@ -2,7 +2,7 @@
 class ipmi {
 
 package { 'ipmitool':
-ensure => 'latest',
+ensure => present,
 }
 
 file { '/usr/local/sbin/ipmi_mgmt':

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

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

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


[MediaWiki-commits] [Gerrit] nagios_common: delete check_http_bits command - change (operations/puppet)

2016-06-20 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review.

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

Change subject: nagios_common: delete check_http_bits command
..

nagios_common: delete check_http_bits command

This check command is not used afaict and we are trying
to delete the entire bits.wikimedia.org hostname and references to it.

Bug:T107430
Change-Id: I006e9062f89f2b0aa069c9eb5f12edebf914fc99
---
M modules/nagios_common/files/checkcommands.cfg
1 file changed, 0 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/21/295321/1

diff --git a/modules/nagios_common/files/checkcommands.cfg 
b/modules/nagios_common/files/checkcommands.cfg
index 7f9a574..4e1a77b 100644
--- a/modules/nagios_common/files/checkcommands.cfg
+++ b/modules/nagios_common/files/checkcommands.cfg
@@ -235,12 +235,6 @@
 command_line$USER1$/check_http -H upload.wikimedia.org -S -I 
$HOSTADDRESS$ -u /monitoring/backend
 }
 
-# 'check_http_bits' command definition
-define command {
-command_namecheck_http_bits
-command_line$USER1$/check_http -H bits.wikimedia.org -I $HOSTADDRESS$ 
-u /en.wikipedia.org/load.php
-}
-
 # 'check_http_varnish' command definition
 define command {
 command_namecheck_http_varnish

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

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

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


[MediaWiki-commits] [Gerrit] Do not file mw.cx.source.ready twice - change (mediawiki...ContentTranslation)

2016-06-20 Thread Santhosh (Code Review)
Santhosh has uploaded a new change for review.

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

Change subject: Do not file mw.cx.source.ready twice
..

Do not file mw.cx.source.ready twice

Bug: T138193
Change-Id: I26454b53dc3e1065ab63402a4dbcf6f0e4436601
---
M modules/source/ext.cx.source.js
1 file changed, 0 insertions(+), 1 deletion(-)


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

diff --git a/modules/source/ext.cx.source.js b/modules/source/ext.cx.source.js
index 9c578b6..f156065 100644
--- a/modules/source/ext.cx.source.js
+++ b/modules/source/ext.cx.source.js
@@ -180,7 +180,6 @@
// TODO: Figure out what should be done here
this.$content.find( 'base' ).detach();
 
-   mw.hook( 'mw.cx.source.ready' ).fire();
// Try to load Cite styles. Silently ignored if not installed.
mw.loader.load( 'ext.cite.style' );
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I26454b53dc3e1065ab63402a4dbcf6f0e4436601
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ContentTranslation
Gerrit-Branch: master
Gerrit-Owner: Santhosh 

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


[MediaWiki-commits] [Gerrit] Remove login and create_account_failure_messages Cucumber fe... - change (mediawiki...MobileFrontend)

2016-06-20 Thread Mholloway (Code Review)
Mholloway has uploaded a new change for review.

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

Change subject: Remove login and create_account_failure_messages Cucumber 
features
..

Remove login and create_account_failure_messages Cucumber features

These concern third-party systems and shouldn't be tested in
MobileFrontend.

Bug: T137793
Change-Id: I3fe2ab35713e278881c7b0efb4ed1e114381fdad
---
D tests/browser/features/create_account_failure_messages.feature
D tests/browser/features/login.feature
D 
tests/browser/features/step_definitions/create_account_failure_messages_steps.rb
D tests/browser/features/step_definitions/special_userlogin_steps.rb
4 files changed, 0 insertions(+), 53 deletions(-)


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

diff --git a/tests/browser/features/create_account_failure_messages.feature 
b/tests/browser/features/create_account_failure_messages.feature
deleted file mode 100644
index f727368..000
--- a/tests/browser/features/create_account_failure_messages.feature
+++ /dev/null
@@ -1,10 +0,0 @@
-@chrome @en.m.wikipedia.beta.wmflabs.org @firefox @test2.m.wikipedia.org 
@vagrant
-Feature: Create failure messages
-  Background:
-Given I am using the mobile site
-And I am on the sign-up page
-
-  Scenario: Create account password mismatch message
-When I sign up with two different passwords
-Then I should see an error indicating they do not match
-  And I should still be on the sign-up page
diff --git a/tests/browser/features/login.feature 
b/tests/browser/features/login.feature
deleted file mode 100644
index f159e07..000
--- a/tests/browser/features/login.feature
+++ /dev/null
@@ -1,15 +0,0 @@
-@chrome @en.m.wikipedia.beta.wmflabs.org @firefox @test2.m.wikipedia.org 
@vagrant
-Feature: Login
-
-  Background:
-Given I am using the mobile site
-
-  Scenario: Not logged in
-Given I am on the "Main Page" page
-When I click on "Log in" in the main navigation menu
-Then I should see a message box at the top of the login page
-  And I should not see a message warning me I am already logged in
-
-  Scenario: Password reset available
-When I am on the "Special:UserLogin" page
-Then I should see a password reset link
diff --git 
a/tests/browser/features/step_definitions/create_account_failure_messages_steps.rb
 
b/tests/browser/features/step_definitions/create_account_failure_messages_steps.rb
deleted file mode 100644
index 1f87ef3..000
--- 
a/tests/browser/features/step_definitions/create_account_failure_messages_steps.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-When(/^I sign up with two different passwords$/) do
-  on(SpecialUserLoginPage) do |page|
-page.username = 'some_username'
-page.password = 's0me decent password'
-page.confirm_password = 's0me wrong password'
-page.signup_submit
-  end
-end
-
-Then(/^I should see an error indicating they do not match$/) do
-  expect(on(SpecialUserLoginPage).error_box).to match('There are problems with 
some of your input.')
-  expect(on(SpecialUserLoginPage).confirm_password_error_box).to match('The 
passwords you entered do not match')
-end
-
-Then(/^I should still be on the sign-up page$/) do
-  expect(on(SpecialUserLoginPage).first_heading).to match('Create account')
-end
diff --git a/tests/browser/features/step_definitions/special_userlogin_steps.rb 
b/tests/browser/features/step_definitions/special_userlogin_steps.rb
deleted file mode 100644
index 68199ac..000
--- a/tests/browser/features/step_definitions/special_userlogin_steps.rb
+++ /dev/null
@@ -1,11 +0,0 @@
-Then(/^I should not see a message warning me I am already logged in$/) do
-  expect(on(SpecialUserLoginPage).warning_box_element).not_to be_visible
-end
-
-Then(/^I should see a message box at the top of the login page$/) do
-  expect(on(SpecialUserLoginPage).message_box_element).to be_visible
-end
-
-Then(/^I should see a password reset link$/) do
-  expect(on(SpecialUserLoginPage).password_reset_element).to be_visible
-end

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3fe2ab35713e278881c7b0efb4ed1e114381fdad
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
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] [wip] Fade in/out elements that are moved in the notificatio... - change (mediawiki...Echo)

2016-06-20 Thread Mooeypoo (Code Review)
Mooeypoo has uploaded a new change for review.

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

Change subject: [wip] Fade in/out elements that are moved in the notifications 
list
..

[wip] Fade in/out elements that are moved in the notifications list

Bug: T126214
Change-Id: Iad5df1f56bfbd12cb6f42dd6e73860bdcc27cd68
---
M modules/ui/mw.echo.ui.SortedListWidget.js
1 file changed, 16 insertions(+), 2 deletions(-)


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

diff --git a/modules/ui/mw.echo.ui.SortedListWidget.js 
b/modules/ui/mw.echo.ui.SortedListWidget.js
index 99fde36..add81a3 100644
--- a/modules/ui/mw.echo.ui.SortedListWidget.js
+++ b/modules/ui/mw.echo.ui.SortedListWidget.js
@@ -1,4 +1,4 @@
-( function ( mw ) {
+( function ( mw, $ ) {
/**
 * Sorted list widget. This is a group widget that sorts its items
 * according to a given sorting callback.
@@ -44,6 +44,20 @@
 
/* Methods */
 
+   /**
+* @inheritdoc
+*/
+   mw.echo.ui.SortedListWidget.prototype.onItemSortChange = function ( 
item ) {
+   var widget = this;
+
+   item.$element.fadeOut( 400, function () {
+   widget.removeItems( item );
+
+   item.$element.hide();
+   widget.addItems( item );
+   item.$element.fadeIn( 400 );
+   } );
+   };
/**
 * Set the group element.
 *
@@ -205,4 +219,4 @@
);
};
 
-} )( mediaWiki );
+} )( mediaWiki, jQuery );

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

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

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


[MediaWiki-commits] [Gerrit] Put failed examples and passed examples into a file. - change (mediawiki...codesniffer)

2016-06-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Put failed examples and passed examples into a file.
..


Put failed examples and passed examples into a file.

Change-Id: Ia8b1527d69ae31f42ed0c05d02c3cc4234cb08ec
---
A MediaWiki/Tests/files/AlternativeSyntax/alternative_syntax.php
A MediaWiki/Tests/files/AlternativeSyntax/alternative_syntax.php.expect
D MediaWiki/Tests/files/AlternativeSyntax/alternative_syntax_fail.php
D MediaWiki/Tests/files/AlternativeSyntax/alternative_syntax_fail.php.expect
D MediaWiki/Tests/files/AlternativeSyntax/alternative_syntax_pass.php
D MediaWiki/Tests/files/AlternativeSyntax/alternative_syntax_pass.php.expect
A MediaWiki/Tests/files/Commenting/commenting_function.php
A MediaWiki/Tests/files/Commenting/commenting_function.php.expect
A MediaWiki/Tests/files/Commenting/commenting_function.php.fixed
D MediaWiki/Tests/files/Commenting/commenting_function_fail.php
D MediaWiki/Tests/files/Commenting/commenting_function_fail.php.expect
D MediaWiki/Tests/files/Commenting/commenting_function_fail.php.fixed
D MediaWiki/Tests/files/Commenting/commenting_function_pass.php
D MediaWiki/Tests/files/Commenting/commenting_function_pass.php.expect
A MediaWiki/Tests/files/ControlStructures/assignment_in_control_structures.php
A 
MediaWiki/Tests/files/ControlStructures/assignment_in_control_structures.php.expect
D 
MediaWiki/Tests/files/ControlStructures/assignment_in_control_structures_fail.php
D 
MediaWiki/Tests/files/ControlStructures/assignment_in_control_structures_fail.php.expect
D 
MediaWiki/Tests/files/ControlStructures/assignment_in_control_structures_pass.php
D 
MediaWiki/Tests/files/ControlStructures/assignment_in_control_structures_pass.php.expect
A MediaWiki/Tests/files/ControlStructures/if_else_structure.php
R MediaWiki/Tests/files/ControlStructures/if_else_structure.php.expect
A MediaWiki/Tests/files/ControlStructures/if_else_structure.php.fixed
D MediaWiki/Tests/files/ControlStructures/if_else_structure_fail.php
D MediaWiki/Tests/files/ControlStructures/if_else_structure_fail.php.fixed
D MediaWiki/Tests/files/ControlStructures/if_else_structure_pass.php
D MediaWiki/Tests/files/ControlStructures/if_else_structure_pass.php.expect
M 
MediaWiki/Tests/files/ExtraCharacters/extra_characters_before_phpopen_tag_fail.php
M 
MediaWiki/Tests/files/ExtraCharacters/extra_characters_before_phpopen_tag_fail.php.expect
A 
MediaWiki/Tests/files/ExtraCharacters/extra_characters_before_phpopen_tag_fail.php.fixed
M 
MediaWiki/Tests/files/ExtraCharacters/extra_characters_before_phpopen_tag_pass.php
M 
MediaWiki/Tests/files/ExtraCharacters/valid_shebang_before_phpopen_tag_fail.php
M 
MediaWiki/Tests/files/ExtraCharacters/valid_shebang_before_phpopen_tag_pass.php
A MediaWiki/Tests/files/NamingConventions/case_global_name.php
A MediaWiki/Tests/files/NamingConventions/case_global_name.php.expect
D MediaWiki/Tests/files/NamingConventions/case_global_name_fail.php
D MediaWiki/Tests/files/NamingConventions/case_global_name_fail.php.expect
A MediaWiki/Tests/files/NamingConventions/wf_global_function.php
A MediaWiki/Tests/files/NamingConventions/wf_global_function.php.expect
D MediaWiki/Tests/files/NamingConventions/wf_global_function_fail.php
D MediaWiki/Tests/files/NamingConventions/wf_global_function_fail.php.expect
D MediaWiki/Tests/files/NamingConventions/wf_global_function_pass.php
D MediaWiki/Tests/files/NamingConventions/wf_global_function_pass.php.expect
R MediaWiki/Tests/files/NamingConventions/wf_namespace.php
R MediaWiki/Tests/files/NamingConventions/wf_namespace.php.expect
D MediaWiki/Tests/files/NamingConventions/wg_global_name2_fail.php
D MediaWiki/Tests/files/NamingConventions/wg_global_name2_fail.php.expect
D MediaWiki/Tests/files/NamingConventions/wg_global_name_fail.php
D MediaWiki/Tests/files/NamingConventions/wg_global_name_fail.php.expect
D MediaWiki/Tests/files/NamingConventions/wg_global_name_fail.php.fixed
A MediaWiki/Tests/files/Usage/dir_usage.php
R MediaWiki/Tests/files/Usage/dir_usage.php.expect
A MediaWiki/Tests/files/Usage/dir_usage.php.fixed
D MediaWiki/Tests/files/Usage/dir_usage_fail.php
D MediaWiki/Tests/files/Usage/dir_usage_fail.php.fixed
D MediaWiki/Tests/files/Usage/dir_usage_pass.php
D MediaWiki/Tests/files/Usage/dir_usage_pass.php.expect
A MediaWiki/Tests/files/Usage/goto_usage.php
R MediaWiki/Tests/files/Usage/goto_usage.php.expect
D MediaWiki/Tests/files/Usage/goto_usage_fail.php
D MediaWiki/Tests/files/Usage/goto_usage_pass.php
D MediaWiki/Tests/files/Usage/goto_usage_pass.php.expect
D MediaWiki/Tests/files/VariableAnalysis/unused_global_variables_fail.php
D 
MediaWiki/Tests/files/VariableAnalysis/unused_global_variables_heredoc_pass.php
D 
MediaWiki/Tests/files/VariableAnalysis/unused_global_variables_heredoc_pass.php.expect
A MediaWiki/Tests/files/VariableAnalysis/used_global_variables.php
R MediaWiki/Tests/files/VariableAnalysis/used_global_variables.php.expect
D 

[MediaWiki-commits] [Gerrit] Fix pt.wikinews namespace issue - change (operations/mediawiki-config)

2016-06-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Fix pt.wikinews namespace issue
..


Fix pt.wikinews namespace issue

Grondin noticed the namespace Transwiki has disappeared on pt.wikinews.

After investigation, commit 8c29c8e5 has created a new array in
$wgExtraNamespaces, as the previous array wasn't correctly sorted
alphabetically.

This commit fixes that merging the two arrays together.

Bug: T138230
Change-Id: I3e3c9b8074cb627c022fc9e61f0ae5ee36a2c461
---
M wmf-config/InitialiseSettings.php
1 file changed, 6 insertions(+), 8 deletions(-)

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



diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index cb8b99c..fb0b71b 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -6383,14 +6383,6 @@
106 => 'Portal',
107 => 'Portal-diskusjon',
],
-   'ptwikinews' => [
-   100 => 'Portal',
-   101 => 'Portal_Discussão',
-   102 => 'Efeméride',
-   103 => 'Efeméride_Discussão',
-   104 => 'Transwiki',
-   105 => 'Transwiki_Discussão',
-   ],
'plwikinews' => [
NS_PROJECT_TALK => 'Dyskusja_Wikinews',
NS_USER => 'Wikireporter',
@@ -6399,6 +6391,12 @@
101 => 'Dyskusja_portalu'
],
'ptwikinews' => [
+   100 => 'Portal',
+   101 => 'Portal_Discussão',
+   102 => 'Efeméride',
+   103 => 'Efeméride_Discussão',
+   104 => 'Transwiki',
+   105 => 'Transwiki_Discussão',
110 => 'Colaboração', // T94894
111 => 'Colaboração_Discussão',
],

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3e3c9b8074cb627c022fc9e61f0ae5ee36a2c461
Gerrit-PatchSet: 2
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Dereckson 
Gerrit-Reviewer: Dereckson 
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: Luke081515 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] WIP: Wikivoyage maps - change (mediawiki...Kartographer)

2016-06-20 Thread MaxSem (Code Review)
MaxSem has uploaded a new change for review.

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

Change subject: WIP: Wikivoyage maps
..

WIP: Wikivoyage maps

Change-Id: Ib6f92eaedddb453fe6346d6f2e55e9de6d78f278
---
A modules/wikivoyage/controls/layers.js
A modules/wikivoyage/controls/nearby.js
A modules/wikivoyage/controls/scale.js
A modules/wikivoyage/data/en-articles.js
A modules/wikivoyage/data/maptiles.json
A modules/wikivoyage/i18n/en.json
A modules/wikivoyage/images/nearby.svg
A modules/wikivoyage/index.js
A modules/wikivoyage/map/control-layers.js
A modules/wikivoyage/map/map.js
A modules/wikivoyage/mw.message.js
A modules/wikivoyage/mw.wikivoyage.js
A modules/wikivoyage/styles/wikivoyage.css
13 files changed, 807 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Kartographer 
refs/changes/17/295317/1

diff --git a/modules/wikivoyage/controls/layers.js 
b/modules/wikivoyage/controls/layers.js
new file mode 100644
index 000..d6a2340
--- /dev/null
+++ b/modules/wikivoyage/controls/layers.js
@@ -0,0 +1,46 @@
+import L from 'leaflet';
+import wikivoyage from '../mw.wikivoyage';
+
+/*jscs:disable disallowDanglingUnderscores, requireVarDeclFirst */
+var ControlLayers = L.Control.Layers.extend( {
+
+   _addItem: function ( obj ) {
+   var label = L.Control.Layers.prototype._addItem.call( this, obj 
);
+   if ( !obj.overlay && label.childNodes[ 0 ].checked ) {
+   this._previousSelected = label.childNodes[ 0 ];
+   }
+   },
+
+   _onInputClick: function ( event ) {
+   var self = this,
+   proto = L.Control.Layers.prototype._onInputClick,
+   input = event && event.target,
+   obj;
+
+   if ( input &&
+   event.type === 'click' &&
+   /leaflet-control-layers-selector/.test( input.className 
) ) {
+
+   obj = this._layers[ input.layerId ];
+   if ( this._map.hasLayer( obj.layer ) ) {
+   proto.call( self );
+   } else {
+   event.stopPropagation();
+   if ( !obj.overlay && this._previousSelected ) {
+   this._previousSelected.checked = true;
+   }
+   input.checked = false;
+   this._expand();
+   wikivoyage.isAllowed( obj.layer )
+   .done( function () {
+   input.checked = true;
+   proto.call( self );
+   } );
+   }
+   } else {
+   proto.call( this );
+   }
+   }
+} );
+
+export default ControlLayers;
diff --git a/modules/wikivoyage/controls/nearby.js 
b/modules/wikivoyage/controls/nearby.js
new file mode 100644
index 000..b265c6d
--- /dev/null
+++ b/modules/wikivoyage/controls/nearby.js
@@ -0,0 +1,105 @@
+import L from 'leaflet';
+import $ from 'jquery';
+import wikivoyage from '../mw.wikivoyage';
+import getArticles from '../data/en-articles';
+
+function mousepopup( marker, data ) {
+   marker.bindPopup( data.title, { minWidth: 120, maxWidth: 120 } );
+   marker.on( 'click', function ( e ) {
+   this.openPopup();
+   } );
+}
+
+/*jscs:disable disallowDanglingUnderscores, requireVarDeclFirst */
+var ControlNearby = L.Control.extend( {
+   options: {
+   // Do not switch for RTL because zoom also stays in place
+   position: 'topleft'
+   },
+
+   onAdd: function ( map ) {
+   var container = L.DomUtil.create( 'div', 'leaflet-bar' ),
+   link = L.DomUtil.create( 'a', 
'mw-kartographer-icon-nearby', container ),
+   pruneCluster = new PruneClusterForLeaflet( 70 ),
+   control = this;
+
+   link.href = '#';
+   link.title = mw.msg( 'kartographer-wv-nearby-articles-control' 
);
+   pruneCluster.options = {
+   wvIsOverlay: true,
+   wvIsExternal: true,
+   wvName: 'nearby-articles'
+   };
+
+   this.map = map;
+   this.link = link;
+   this.pruneCluster = pruneCluster;
+
+   L.DomEvent.addListener( link, 'click', 
this._onToggleNearbyLayer, this );
+   L.DomEvent.disableClickPropagation( container );
+
+   map.on( 'overlayadd', this._onOverlayAdd, this );
+   map.on( 'overlayremove', this._onOverlayRemove, this );
+
+   return container;
+   },
+
+   

[MediaWiki-commits] [Gerrit] Remove old mobile workaround for wikidata descriptions - change (operations/mediawiki-config)

2016-06-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Remove old mobile workaround for wikidata descriptions
..


Remove old mobile workaround for wikidata descriptions

Bug: T127250
Bug: T138085
Change-Id: I50358c2d41f307220ece3f160269741067b6a230
---
M wmf-config/mobile.php
1 file changed, 0 insertions(+), 2 deletions(-)

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



diff --git a/wmf-config/mobile.php b/wmf-config/mobile.php
index bc046c9..f5735ad 100644
--- a/wmf-config/mobile.php
+++ b/wmf-config/mobile.php
@@ -117,8 +117,6 @@
$wgMFSearchAPIParams = $wmgMFSearchAPIParams;
$wgMFSearchGenerator = $wmgMFSearchGenerator;
 
-   $wgMFUseWikibaseDescription = true; // Alpha experiment
-
// Turn on volunteer recruitment
$wgMFEnableJSConsoleRecruitment = true;
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I50358c2d41f307220ece3f160269741067b6a230
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Jhobs 
Gerrit-Reviewer: Dereckson 
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Followup on a8ee9bf5: Normalize newlines around new content ... - change (mediawiki...parsoid)

2016-06-20 Thread Subramanya Sastry (Code Review)
Subramanya Sastry has uploaded a new change for review.

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

Change subject: Followup on a8ee9bf5: Normalize newlines around new content only
..

Followup on a8ee9bf5: Normalize newlines around new content only

* Since it looks like the extra newlines might be used as
  a stylistic practice in wikitext for tables, use the normalized
  single-newline form only around new content.

  Discovered via rt-testing.

* Selser changes seem expected.

Change-Id: I615d6dc3399a0bef5707463ce6188ff36b247185
---
M lib/html2wt/DOMHandlers.js
M tests/parserTests-blacklist.js
2 files changed, 37 insertions(+), 24 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid 
refs/changes/16/295316/1

diff --git a/lib/html2wt/DOMHandlers.js b/lib/html2wt/DOMHandlers.js
index d4d6de6..a992233 100644
--- a/lib/html2wt/DOMHandlers.js
+++ b/lib/html2wt/DOMHandlers.js
@@ -561,6 +561,10 @@
}
 }
 
+function maxNLsInTable(node, origNode) {
+   return DU.isNewElt(node) || DU.isNewElt(origNode) ? 1 : 2;
+}
+
 /**
  * A map of `domHandler`s keyed on nodeNames.
  *
@@ -699,8 +703,12 @@
return { min: 0, max: 2 };
}
},
-   firstChild: id({ min: 1, max: 1 }),
-   lastChild: id({ min: 1, max: 1 }),
+   firstChild: function(node, otherNode) {
+   return { min: 1, max: maxNLsInTable(node, 
otherNode) };
+   },
+   lastChild: function(node, otherNode) {
+   return { min: 1, max: maxNLsInTable(node, 
otherNode) };
+   },
},
},
tbody: justChildren,
@@ -727,13 +735,13 @@
sepnls: {
before: function(node, otherNode) {
if (trWikitextNeeded(node, 
DU.getDataParsoid(node))) {
-   return { min: 1, max: 1 };
+   return { min: 1, max: 
maxNLsInTable(node, otherNode) };
} else {
-   return { min: 0, max: 1 };
+   return { min: 0, max: 
maxNLsInTable(node, otherNode) };
}
},
after: function(node, otherNode) {
-   return { min: 0, max: 1 };
+   return { min: 0, max: maxNLsInTable(node, 
otherNode) };
},
},
},
@@ -760,17 +768,17 @@
if (otherNode.nodeName === 'TH' &&
DU.getDataParsoid(node).stx_v 
=== 'row') {
// force single line
-   return { min: 0, max: 1 };
+   return { min: 0, max: 
maxNLsInTable(node, otherNode) };
} else {
-   return { min: 1, max: 1 };
+   return { min: 1, max: 
maxNLsInTable(node, otherNode) };
}
},
after: function(node, otherNode) {
if (otherNode.nodeName === 'TD') {
// Force a newline break
-   return { min: 1, max: 1 };
+   return { min: 1, max: 
maxNLsInTable(node, otherNode) };
} else {
-   return { min: 0, max: 1 };
+   return { min: 0, max: 
maxNLsInTable(node, otherNode) };
}
},
},
@@ -799,12 +807,14 @@
if (otherNode.nodeName === 'TD' &&
DU.getDataParsoid(node).stx_v 
=== 'row') {
// force single line
-   return { min: 0, max: 1 };
+   return { min: 0, max: 
maxNLsInTable(node, otherNode) };
} else {
-   return { min: 1, max: 1 };
+   return { min: 1, max: 
maxNLsInTable(node, otherNode) };
}
},
-   after: id({ min: 0, max: 1 }),
+   after: function(node, otherNode) {
+   return { min: 0, max: maxNLsInTable(node, 
otherNode) };
+   },

[MediaWiki-commits] [Gerrit] Better handle ApiMessage errors from UploadVerifyFile hook - change (mediawiki/core)

2016-06-20 Thread Code Review
Bartosz Dziewoński has uploaded a new change for review.

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

Change subject: Better handle ApiMessage errors from UploadVerifyFile hook
..

Better handle ApiMessage errors from UploadVerifyFile hook

The extra data is actually understood and output now.

Bug: T137961
Change-Id: Ifac8995a4d16d11840cee814177fc2808bc2072c
---
M docs/hooks.txt
M includes/api/ApiUpload.php
2 files changed, 25 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/15/295315/1

diff --git a/docs/hooks.txt b/docs/hooks.txt
index d667ea1..16d0680 100644
--- a/docs/hooks.txt
+++ b/docs/hooks.txt
@@ -3283,7 +3283,9 @@
   Handlers will typically only apply for specific MIME types.
 &$error: (object) output: true if the file is valid. Otherwise, an indexed 
array
   representing the problem with the file, where the first element is the 
message
-  key and the remaining elements are used as parameters to the message.
+  key or MessageSpecifier instance (you might want to use ApiMessage to provide
+  machine-readable details for the API) and the remaining elements are used as
+  parameters to the message.
 
 'UploadVerifyUpload': Upload verification, based on both file properties like
 MIME type (same as UploadVerifyFile) and the information entered by the user
diff --git a/includes/api/ApiUpload.php b/includes/api/ApiUpload.php
index 3af0dff..4d4dfdb 100644
--- a/includes/api/ApiUpload.php
+++ b/includes/api/ApiUpload.php
@@ -567,12 +567,28 @@
$this->dieUsage( $msg, 'filetype-banned', 0, 
$extradata );
break;
case UploadBase::VERIFICATION_ERROR:
-   $params = $verification['details'];
-   $key = array_shift( $params );
-   $msg = $this->msg( $key, $params )->inLanguage( 
'en' )->useDatabase( false )->text();
-   ApiResult::setIndexedTagName( 
$verification['details'], 'detail' );
-   $this->dieUsage( "This file did not pass file 
verification: $msg", 'verification-error',
-   0, [ 'details' => 
$verification['details'] ] );
+   $parsed = $this->parseMsg( 
$verification['details'] );
+   $info = "This file did not pass file 
verification: {$parsed['info']}";
+   if ( $verification['details'][0] instanceof 
MessageSpecifier ) {
+   $code = $parsed['code'];
+   } else {
+   // For backwards-compatibility, all of 
the errors from UploadBase::verifyFile() are
+   // reported as 'verification-error', 
and the real error code is reported in 'details'.
+   $code = 'verification-error';
+   }
+   if ( $verification['details'][0] instanceof 
MessageSpecifier ) {
+   $msg = $verification['details'][0];
+   $details = array_merge_recursive( [ 
$msg->getKey() ], $msg->getParams() );
+   } else {
+   $details = $verification['details'];
+   }
+   ApiResult::setIndexedTagName( $details, 
'detail' );
+   $data = [ 'details' => $details ];
+   if ( isset( $parsed['data'] ) ) {
+   $data = array_merge( $data, 
$parsed['data'] );
+   }
+
+   $this->dieUsage( $info, $code, 0, $data );
break;
case UploadBase::HOOK_ABORTED:
if ( is_array( $verification['error'] ) ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifac8995a4d16d11840cee814177fc2808bc2072c
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] Use custom error code 'abusefilter-forbidden' for edit and u... - change (mediawiki...AbuseFilter)

2016-06-20 Thread Code Review
Bartosz Dziewoński has uploaded a new change for review.

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

Change subject: Use custom error code 'abusefilter-forbidden' for edit and 
upload API responses
..

Use custom error code 'abusefilter-forbidden' for edit and upload API responses

Also cleaned up some dead "forwards-compatibility" code and made a
recently introduced public method private.

The new functionality depends on Ifac8995a4d16d11840cee814177fc2808bc2072c
in MediaWiki core, older MediaWiki versions behave mostly as before.

Bug: T137961
Change-Id: I5780eae96930211191ecd874aacf53fdacb58f89
---
M AbuseFilter.class.php
M AbuseFilter.hooks.php
2 files changed, 17 insertions(+), 23 deletions(-)


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

diff --git a/AbuseFilter.class.php b/AbuseFilter.class.php
index 032706e..fff7a66 100644
--- a/AbuseFilter.class.php
+++ b/AbuseFilter.class.php
@@ -846,17 +846,12 @@
 * @param array[] $messages a list if arrays, where each array contains 
a message key
 *followed by any message parameters.
 *
-* @todo: change this to accept Message objects. This is only possible 
from 1.21 onward,
-*because before that, Status::fatal does not accept Message 
objects.
-*
 * @return Status
 */
protected static function buildStatus( array $actionsTaken, array 
$messages ) {
$status = Status::newGood( $actionsTaken );
 
foreach ( $messages as $msg ) {
-   // Since MW 1.21, we could just pass Message objects, 
but in 1.20,
-   // we still have to rely on arrays.
call_user_func_array( array( $status, 'fatal' ), $msg );
}
 
diff --git a/AbuseFilter.hooks.php b/AbuseFilter.hooks.php
index 0d98a75..6c00db0 100644
--- a/AbuseFilter.hooks.php
+++ b/AbuseFilter.hooks.php
@@ -55,7 +55,7 @@
 
if ( !$status->isOK() ) {
// Produce a useful error message for API edits
-   $status->apiHookResult = self::getEditApiResult( 
$status );
+   $status->apiHookResult = self::getApiResult( $status );
}
 
return $continue;
@@ -161,29 +161,23 @@
}
 
/**
-* Implementation for EditFilterMergedContent hook.
-*
 * @param Status $status Error message details
 * @return array API result
 */
-   public static function getEditApiResult( Status $status ) {
+   private static function getApiResult( Status $status ) {
$msg = $status->getErrorsArray()[0];
 
-   // Use the error message key name as error code, the first 
parameter is the filter description.
-   if ( $msg instanceof Message ) {
-   // For forward compatibility: In case we switch over 
towards using Message objects someday.
-   // (see the todo for AbuseFilter::buildStatus)
-   $code = $msg->getKey();
-   $filterDescription = $msg->getParams()[0];
-   $warning = $msg->parse();
-   } else {
-   $code = array_shift( $msg );
-   $filterDescription = $msg[0];
-   $warning = wfMessage( $code )->params( $msg )->parse();
-   }
+   $code = array_shift( $msg );
+   $filterDescription = $msg[0];
+   $filter = $msg[1];
+   $warning = wfMessage( $code )->params( $msg )->parse();
 
return array(
-   'code' => $code,
+   'code' => 'abusefilter-forbidden',
+   'message' => $code,
+   'filter' => $filter,
+   'filterDescription' => $filterDescription,
+   // For backwards-compatibility
'info' => 'Hit AbuseFilter: ' . $filterDescription,
'warning' => $warning
);
@@ -798,7 +792,12 @@
$filter_result = AbuseFilter::filterAction( $vars, $title );
 
if ( !$filter_result->isOK() ) {
-   $error = $filter_result->getErrorsArray()[0];
+   $messageAndParams = $filter_result->getErrorsArray()[0];
+   $error = [ ApiMessage::create(
+   $messageAndParams,
+   'abusefilter-forbidden',
+   self::getApiResult( $filter_result )
+   ) ];
}
 
return $filter_result->isOK();

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


[MediaWiki-commits] [Gerrit] Added geoshape protocol - change (mediawiki...Graph)

2016-06-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Added geoshape protocol
..


Added geoshape protocol

The protocol will be disabled until added
to the graph's configuration block

Bug: T138192
Change-Id: I0325b74191983279b85db2fd48b96b3e2b379378
---
M lib/graph2.compiled.js
1 file changed, 38 insertions(+), 35 deletions(-)

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



diff --git a/lib/graph2.compiled.js b/lib/graph2.compiled.js
index 980408b..bfe1214 100644
--- a/lib/graph2.compiled.js
+++ b/lib/graph2.compiled.js
@@ -134,10 +134,6 @@
  * @param {boolean} useXhr true if we should use XHR, false for node.js http 
loading
  * @param {boolean} isTrusted true if the graph spec can be trusted
  * @param {Object} domains allowed protocols and a list of their domains
- * @param {string[]} domains.http
- * @param {string[]} domains.https
- * @param {string[]} domains.wikirawupload
- * @param {string[]} domains.wikidatasparql
  * @param {Object} domainMap domain remapping
  * @param {Function} logger
  * @param {Function} objExtender $.extend in browser, _.extend in NodeJs
@@ -154,10 +150,12 @@
 self.parseUrl = parseUrl;
 self.formatUrl = formatUrl;
 
-self.httpHostsRe = makeValidator(domains.http, true);
-self.httpsHostsRe = makeValidator(domains.https, true);
-self.uploadHostsRe = makeValidator(domains.wikirawupload);
-self.sparqlHostsRe = makeValidator(domains.wikidatasparql);
+self.validators = {};
+Object.keys(domains).map(function(protocol) {
+// Only allow subdomains for https & http. Other protocols must be 
exact match.
+self.validators[protocol] = makeValidator(domains[protocol], protocol 
=== 'https' || protocol === 'http');
+});
+
 self.domainMap = domainMap;
 
 load.loader = function (opt, callback) {
@@ -206,9 +204,9 @@
 host: host
 };
 
-if (this.httpsHostsRe.test(host)) {
+if (this.validators.https.test(host)) {
 result.protocol = 'https';
-} else if (this.httpHostsRe.test(host)) {
+} else if (this.validators.http.test(host)) {
 result.protocol = 'http';
 } else {
 result = undefined;
@@ -230,7 +228,7 @@
 
 var sanitizedHost = this.sanitizeHost(urlParts.host);
 if (!sanitizedHost) {
-throw new Error('URL hostname is not whitelisted: ' + 
JSON.stringify(opt.url));
+throw new Error('URL hostname is not whitelisted: ' + opt.url);
 }
 urlParts.host = sanitizedHost.host;
 if (!urlParts.protocol) {
@@ -298,49 +296,54 @@
 // 
wikirawupload://upload.wikimedia.org/wikipedia/commons/3/3e/Einstein_1921.jpg
 // Get an image for the graph, e.g. from commons
 // This tag specifies any content from the uploads.* domain, 
without query params
-if (!this.domains.wikirawupload) {
-throw new Error('wikirawupload: protocol is disabled: ' + 
JSON.stringify(opt.url));
-}
-if (urlParts.isRelativeHost) {
-urlParts.host = this.domains.wikirawupload[0];
-sanitizedHost = this.sanitizeHost(urlParts.host);
-}
-if (!this.uploadHostsRe.test(urlParts.host)) {
-throw new Error('wikirawupload: protocol must only reference 
allowed upload hosts: ' + JSON.stringify(opt.url));
-}
+this._validateExternalService(urlParts, sanitizedHost, opt.url);
 urlParts.query = {};
 // keep urlParts.pathname;
-urlParts.protocol = sanitizedHost.protocol;
 break;
 
 case 'wikidatasparql':
 // wikidatasparql:///?query=
 // Runs a SPARQL query, converting it to
 // 
https://query.wikidata.org/bigdata/namespace/wdq/sparql?format=json=...
-if (!this.domains.wikidatasparql) {
-throw new Error('wikidatasparql: protocol is disabled: ' + 
JSON.stringify(opt.url));
-}
-if (urlParts.isRelativeHost) {
-urlParts.host = this.domains.wikidatasparql[0];
-sanitizedHost = this.sanitizeHost(urlParts.host);
-}
-if (!this.sparqlHostsRe.test(urlParts.host)) {
-throw new Error('wikidatasparql: protocol must only reference 
allowed sparql hosts: ' + JSON.stringify(opt.url));
-}
+this._validateExternalService(urlParts, sanitizedHost, opt.url);
 if (!urlParts.query || !urlParts.query.query) {
-throw new Error('wikidatasparql: missing query parameter in: ' 
+ JSON.stringify(opt.url));
+throw new Error('wikidatasparql: missing query parameter in: ' 
+ opt.url);
 }
 urlParts.query = { format: 'json', query: urlParts.query.query };
 urlParts.pathname = '/bigdata/namespace/wdq/sparql';
-urlParts.protocol 

[MediaWiki-commits] [Gerrit] Add 'ApiMakeParserOptions' hook - change (mediawiki/core)

2016-06-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Add 'ApiMakeParserOptions' hook
..


Add 'ApiMakeParserOptions' hook

This allows extensions (e.g. TemplateSandbox in I77a9aa5a) to better
interact with the ApiParse and ApiExpandTemplates modules.

Change-Id: I72d5cf8e0b86e4250af1459219dc3b42d7adbbb8
---
M RELEASE-NOTES-1.28
M docs/hooks.txt
M includes/api/ApiExpandTemplates.php
M includes/api/ApiParse.php
4 files changed, 30 insertions(+), 8 deletions(-)

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



diff --git a/RELEASE-NOTES-1.28 b/RELEASE-NOTES-1.28
index 360f6d5..6beeac9 100644
--- a/RELEASE-NOTES-1.28
+++ b/RELEASE-NOTES-1.28
@@ -20,6 +20,8 @@
 === New features in 1.28 ===
 * User::isBot() method for checking if an account is a bot role account.
 * Added a new hook, 'UserIsBot', to aid in determining if a user is a bot.
+* Added a new hook, 'ApiMakeParserOptions', to allow extensions to better
+  interact with API parsing.
 
 === External library changes in 1.28 ===
 
@@ -35,6 +37,8 @@
 === Action API changes in 1.28 ===
 
 === Action API internal changes in 1.28 ===
+* Added a new hook, 'ApiMakeParserOptions', to allow extensions to better
+  interact with ApiParse and ApiExpandTemplates.
 
 === Languages updated in 1.28 ===
 
diff --git a/docs/hooks.txt b/docs/hooks.txt
index 44f2551..39cae73 100644
--- a/docs/hooks.txt
+++ b/docs/hooks.txt
@@ -443,6 +443,15 @@
 $apiMain: Calling ApiMain instance.
 $e: Exception object.
 
+'ApiMakeParserOptions': Called from ApiParse and ApiExpandTemplates to allow
+extensions to adjust the ParserOptions before parsing.
+$options: ParserOptions object
+$title: Title to be parsed
+$params: Parameter array for the API module
+$module: API module (which is also a ContextSource)
+&$reset: Set to a ScopedCallback used to reset any hooks after the parse is 
done.
+&$suppressCache: Set true if cache should be suppressed.
+
 'ApiOpenSearchSuggest': Called when constructing the OpenSearch results. Hooks
 can alter or append to the array.
 &$results: array with integer keys to associative arrays. Keys in associative
diff --git a/includes/api/ApiExpandTemplates.php 
b/includes/api/ApiExpandTemplates.php
index 286fe88..48e7698 100644
--- a/includes/api/ApiExpandTemplates.php
+++ b/includes/api/ApiExpandTemplates.php
@@ -77,6 +77,11 @@
$options->setRemoveComments( false );
}
 
+   $reset = null;
+   $suppressCache = false;
+   Hooks::run( 'ApiMakeParserOptions',
+   [ $options, $title_obj, $params, $this, &$reset, 
&$suppressCache ] );
+
$retval = [];
 
if ( isset( $prop['parsetree'] ) || $params['generatexml'] ) {
diff --git a/includes/api/ApiParse.php b/includes/api/ApiParse.php
index fe418e3..f96acf3 100644
--- a/includes/api/ApiParse.php
+++ b/includes/api/ApiParse.php
@@ -109,13 +109,13 @@
$titleObj = $rev->getTitle();
$wgTitle = $titleObj;
$pageObj = WikiPage::factory( $titleObj );
-   $popts = $this->makeParserOptions( $pageObj, 
$params );
+   list( $popts, $reset, $suppressCache ) = 
$this->makeParserOptions( $pageObj, $params );
 
// If for some reason the "oldid" is actually 
the current revision, it may be cached
// Deliberately comparing $pageObj->getLatest() 
with $rev->getId(), rather than
// checking $rev->isCurrent(), because $pageObj 
is what actually ends up being used,
// and if its ->getLatest() is outdated, 
$rev->isCurrent() won't tell us that.
-   if ( $rev->getId() == $pageObj->getLatest() ) {
+   if ( !$suppressCache && $rev->getId() == 
$pageObj->getLatest() ) {
// May get from/save to parser cache
$p_result = $this->getParsedContent( 
$pageObj, $popts,
$pageid, isset( 
$prop['wikitext'] ) );
@@ -167,12 +167,12 @@
$oldid = $pageObj->getLatest();
}
 
-   $popts = $this->makeParserOptions( $pageObj, 
$params );
+   list( $popts, $reset, $suppressCache ) = 
$this->makeParserOptions( $pageObj, $params );
 
// Don't pollute the parser cache when setting 
options that aren't
// in ParserOptions::optionsHash()
/// @todo: This should be handled closer to the 
actual cache instead of here, see T110269
-   

[MediaWiki-commits] [Gerrit] Use debug() for stash messages to match core - change (mediawiki...VisualEditor)

2016-06-20 Thread Aaron Schulz (Code Review)
Aaron Schulz has uploaded a new change for review.

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

Change subject: Use debug() for stash messages to match core
..

Use debug() for stash messages to match core

Change-Id: I366d14d41143d55740e178a16b0af84c5a8ea272
---
M ApiVisualEditor.php
1 file changed, 4 insertions(+), 1 deletion(-)


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

diff --git a/ApiVisualEditor.php b/ApiVisualEditor.php
index c5c863f..c30a833 100644
--- a/ApiVisualEditor.php
+++ b/ApiVisualEditor.php
@@ -8,6 +8,8 @@
  * @license The MIT License (MIT); see LICENSE.txt
  */
 
+use MediaWiki\Logger\LoggerFactory;
+
 class ApiVisualEditor extends ApiBase {
// These are safe even if VE is not enabled on the page.
// This is intended for other VE interfaces, such as Flow's.
@@ -142,7 +144,8 @@
 
$status = ApiStashEdit::parseAndStash( $page, $content, 
$this->getUser(), '' );
if ( $status === ApiStashEdit::ERROR_NONE ) {
-   wfDebugLog( 'StashEdit', "Cached parser output for VE 
content key '$key'." );
+   $logger = LoggerFactory::getInstance( 'StashEdit' );
+   $logger->debug( 'StashEdit', "Cached parser output for 
VE content key '$key'." );
}
$this->getStats()->increment( 
"editstash.ve_cache_stores.$status" );
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I366d14d41143d55740e178a16b0af84c5a8ea272
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz 

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


[MediaWiki-commits] [Gerrit] Don't use $wgContentNamespaces directly - change (mediawiki...LinkSuggest)

2016-06-20 Thread MaxSem (Code Review)
MaxSem has submitted this change and it was merged.

Change subject: Don't use $wgContentNamespaces directly
..


Don't use $wgContentNamespaces directly

Change-Id: I596ebf6a8d8b8b5632b35f1c787bc2570f00c426
---
M LinkSuggest.class.php
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/LinkSuggest.class.php b/LinkSuggest.class.php
index f8844f2..b605285 100644
--- a/LinkSuggest.class.php
+++ b/LinkSuggest.class.php
@@ -80,7 +80,7 @@
 * @return array $ar Link suggestions
 */
public static function get( $originalQuery ) {
-   global $wgContLang, $wgContentNamespaces;
+   global $wgContLang;
 
// trim passed query and replace spaces by underscores
// - this is how MediaWiki stores article titles in database
@@ -114,7 +114,7 @@
// list of namespaces to search in
if ( empty( $namespace ) ) {
// search only within content namespaces - default 
behaviour
-   $namespaces = $wgContentNamespaces;
+   $namespaces = MWNamespace::getContentNamespaces();
} else {
// search only within a namespace from query
$namespaces = $namespace;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I596ebf6a8d8b8b5632b35f1c787bc2570f00c426
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/LinkSuggest
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: MaxSem 

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


[MediaWiki-commits] [Gerrit] Ignore optional tags in sandbox - change (mediawiki...Graph)

2016-06-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Ignore optional  tags in sandbox
..


Ignore optional  tags in sandbox

Bug: T138232
Change-Id: I06014fe08691999b529de55f0513a558f0df0b07
---
M includes/ApiGraph.php
1 file changed, 10 insertions(+), 2 deletions(-)

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



diff --git a/includes/ApiGraph.php b/includes/ApiGraph.php
index 21b7356..905b909 100644
--- a/includes/ApiGraph.php
+++ b/includes/ApiGraph.php
@@ -68,7 +68,7 @@
}
 
/**
-* Get graph definition with title and hash
+* Parse graph definition that may contain wiki markup into pure json
 * @param string $text
 * @return string
 */
@@ -78,7 +78,15 @@
$text = $wgParser->getFreshParser()->preprocess( $text, $title, 
new ParserOptions() );
$st = FormatJson::parse( $text );
if ( !$st->isOK() ) {
-   $this->dieUsage( 'Graph is not valid.', 'invalidtext' );
+   // Sometimes we get  {...}  as 
input. Try to strip  tags
+   $count = 0;
+   $text = preg_replace( 
'/^\s*]*>(.*)<\/graph>\s*$/s', '$1', $text, 1, $count );
+   if ( $count === 1 ) {
+   $st = FormatJson::parse( $text );
+   }
+   if ( !$st->isOK() ) {
+   $this->dieUsage( 'Graph is not valid.', 
'invalidtext' );
+   }
}
return $st->getValue();
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I06014fe08691999b529de55f0513a558f0df0b07
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Graph
Gerrit-Branch: master
Gerrit-Owner: Yurik 
Gerrit-Reviewer: MaxSem 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] When logging in, if VEE cookie is set, change the user's pre... - change (mediawiki...VisualEditor)

2016-06-20 Thread Alex Monk (Code Review)
Alex Monk has uploaded a new change for review.

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

Change subject: When logging in, if VEE cookie is set, change the user's 
preference to match it
..

When logging in, if VEE cookie is set, change the user's preference to match it

Bug: T133304
Change-Id: I9660cfc7b0e980192dd063f44d32d04cf34b1d6d
---
M VisualEditor.hooks.php
M extension.json
2 files changed, 16 insertions(+), 0 deletions(-)


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

diff --git a/VisualEditor.hooks.php b/VisualEditor.hooks.php
index fe4368f..0e5e2c9 100644
--- a/VisualEditor.hooks.php
+++ b/VisualEditor.hooks.php
@@ -973,4 +973,17 @@
return true;
}
 
+   /**
+* On login, if user has a VEE cookie, set their preference equal to it.
+* @param $user User
+* @return bool true
+*/
+   public static function onUserLoggedIn( $user ) {
+   $cookie = RequestContext::getMain()->getRequest()->getCookie( 
'VEE', '' );
+   if ( $cookie === 'visualeditor' || $cookie === 'wikitext' ) {
+   $user->setOption( 'visualeditor-editor', $cookie );
+   $user->saveSettings();
+   }
+   return true;
+   }
 }
diff --git a/extension.json b/extension.json
index 810cb8c..b6374cb 100644
--- a/extension.json
+++ b/extension.json
@@ -186,6 +186,9 @@
],
"CustomEditor": [
"VisualEditorHooks::onCustomEditor"
+   ],
+   "UserLoggedIn": [
+   "VisualEditorHooks::onUserLoggedIn"
]
},
"ResourceModules": {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9660cfc7b0e980192dd063f44d32d04cf34b1d6d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Alex Monk 

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


[MediaWiki-commits] [Gerrit] Add statsd logging of DeferredUpdates - change (mediawiki/core)

2016-06-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Add statsd logging of DeferredUpdates
..


Add statsd logging of DeferredUpdates

Bug: T137326
Change-Id: Icce439210c6412c1824d8d5c411880825bb05643
---
M includes/deferred/DeferredUpdates.php
1 file changed, 4 insertions(+), 1 deletion(-)

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



diff --git a/includes/deferred/DeferredUpdates.php 
b/includes/deferred/DeferredUpdates.php
index e3b7570..1552777 100644
--- a/includes/deferred/DeferredUpdates.php
+++ b/includes/deferred/DeferredUpdates.php
@@ -126,8 +126,10 @@
}
 
public static function execute( array &$queue, $mode ) {
-   $updates = $queue; // snapshot of queue
+   $stats = 
\MediaWiki\MediaWikiServices::getInstance()->getStatsdDataFactory();
+   $method = RequestContext::getMain()->getRequest()->getMethod();
 
+   $updates = $queue; // snapshot of queue
// Keep doing rounds of updates until none get enqueued
while ( count( $updates ) ) {
$queue = []; // clear the queue
@@ -141,6 +143,7 @@
} else {
$otherUpdates[] = $update;
}
+   $stats->increment( 'deferred_updates.' . 
$method . '.' . get_class( $update ) );
}
 
// Delegate DataUpdate execution to the DataUpdate class

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

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

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


[MediaWiki-commits] [Gerrit] Remove old mobile workaround for wikidata descriptions - change (operations/mediawiki-config)

2016-06-20 Thread Jhobs (Code Review)
Jhobs has uploaded a new change for review.

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

Change subject: Remove old mobile workaround for wikidata descriptions
..

Remove old mobile workaround for wikidata descriptions

Bug: T127250
Bug: T138085
Change-Id: I50358c2d41f307220ece3f160269741067b6a230
---
M wmf-config/mobile.php
1 file changed, 0 insertions(+), 2 deletions(-)


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

diff --git a/wmf-config/mobile.php b/wmf-config/mobile.php
index bc046c9..f5735ad 100644
--- a/wmf-config/mobile.php
+++ b/wmf-config/mobile.php
@@ -117,8 +117,6 @@
$wgMFSearchAPIParams = $wmgMFSearchAPIParams;
$wgMFSearchGenerator = $wmgMFSearchGenerator;
 
-   $wgMFUseWikibaseDescription = true; // Alpha experiment
-
// Turn on volunteer recruitment
$wgMFEnableJSConsoleRecruitment = true;
 

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

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

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


[MediaWiki-commits] [Gerrit] Update property suggester - change (mediawiki...Wikidata)

2016-06-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Update property suggester
..


Update property suggester

Bug: T138059
Change-Id: Ic68d3af4293d2f5c81740c941dd75c18fb1f979f
---
M composer.lock
M extensions/PropertySuggester/PropertySuggesterHooks.php
M extensions/PropertySuggester/README.md
A extensions/PropertySuggester/i18n/de.json
A extensions/PropertySuggester/i18n/es.json
A extensions/PropertySuggester/i18n/fr.json
A extensions/PropertySuggester/i18n/gl.json
A extensions/PropertySuggester/i18n/he.json
A extensions/PropertySuggester/i18n/id.json
A extensions/PropertySuggester/i18n/it.json
A extensions/PropertySuggester/i18n/mk.json
M extensions/PropertySuggester/i18n/qqq.json
A extensions/PropertySuggester/i18n/ru.json
A extensions/PropertySuggester/i18n/uk.json
A extensions/PropertySuggester/i18n/zh-hans.json
M extensions/PropertySuggester/maintenance/UpdateTable.php
M extensions/PropertySuggester/modules/ext.PropertySuggester.EntitySelector.js
M extensions/PropertySuggester/src/PropertySuggester/SuggesterParamsParser.php
M 
extensions/PropertySuggester/src/PropertySuggester/Suggesters/SimpleSuggester.php
M extensions/PropertySuggester/src/PropertySuggester/SuggestionGenerator.php
M 
extensions/PropertySuggester/src/PropertySuggester/UpdateTable/Importer/BasicImporter.php
M 
extensions/PropertySuggester/tests/phpunit/PropertySuggester/GetSuggestionsTest.php
A 
extensions/PropertySuggester/tests/phpunit/PropertySuggester/PropertySuggesterHooksTest.php
M 
extensions/PropertySuggester/tests/phpunit/PropertySuggester/ResultBuilderTest.php
M 
extensions/PropertySuggester/tests/phpunit/PropertySuggester/SuggestionGeneratorTest.php
M vendor/composer/installed.json
26 files changed, 444 insertions(+), 121 deletions(-)

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



diff --git a/composer.lock b/composer.lock
index 0d869db..718d497 100644
--- a/composer.lock
+++ b/composer.lock
@@ -813,16 +813,16 @@
 },
 {
 "name": "propertysuggester/property-suggester",
-"version": "3.0.1",
+"version": "3.0.2",
 "source": {
 "type": "git",
 "url": "https://github.com/Wikidata-lib/PropertySuggester.git;,
-"reference": "c267839dbf9e1369053999ebee996bff7c87f3ee"
+"reference": "fdb33b593b96a890145c6ae008333768fb4f0d3c"
 },
 "dist": {
 "type": "zip",
-"url": 
"https://api.github.com/repos/Wikidata-lib/PropertySuggester/zipball/c267839dbf9e1369053999ebee996bff7c87f3ee;,
-"reference": "c267839dbf9e1369053999ebee996bff7c87f3ee",
+"url": 
"https://api.github.com/repos/Wikidata-lib/PropertySuggester/zipball/fdb33b593b96a890145c6ae008333768fb4f0d3c;,
+"reference": "fdb33b593b96a890145c6ae008333768fb4f0d3c",
 "shasum": ""
 },
 "require": {
@@ -856,7 +856,7 @@
 "wikibase",
 "wikidata"
 ],
-"time": "2016-03-16 11:16:15"
+"time": "2016-06-20 17:44:28"
 },
 {
 "name": "serialization/serialization",
diff --git a/extensions/PropertySuggester/PropertySuggesterHooks.php 
b/extensions/PropertySuggester/PropertySuggesterHooks.php
index bdf6414..75f18d1 100644
--- a/extensions/PropertySuggester/PropertySuggesterHooks.php
+++ b/extensions/PropertySuggester/PropertySuggesterHooks.php
@@ -1,5 +1,6 @@
 getEntityNamespaceLookup();
-   $itemNamespace = $entityNamespaceLookup->getEntityNamespace( 
CONTENT_MODEL_WIKIBASE_ITEM );
+   $itemNamespace = $entityNamespaceLookup->getEntityNamespace( 
Item::ENTITY_TYPE );
+
+   if ( $itemNamespace === false ) {
+   // try looking up namespace by content model, for any 
instances of PropertySuggester
+   // running with older Wikibase prior to ef622b1bc.
+   $itemNamespace = 
$entityNamespaceLookup->getEntityNamespace(
+   CONTENT_MODEL_WIKIBASE_ITEM
+   );
+   }
 
if ( $out->getTitle()->getNamespace() !== $itemNamespace ) {
return true;
diff --git a/extensions/PropertySuggester/README.md 
b/extensions/PropertySuggester/README.md
index 3666f94..b54fff6 100644
--- a/extensions/PropertySuggester/README.md
+++ b/extensions/PropertySuggester/README.md
@@ -45,6 +45,10 @@
 
 ## Release notes
 
+### 3.0.2 (2016-06-20)
+* Adapt entity type for namespaces
+* Minor cleanups
+
 ### 3.0.1 (2016-03-14)
 * Defined compatibility with Wikibase DataModel ~6.0
 
diff --git a/extensions/PropertySuggester/i18n/de.json 
b/extensions/PropertySuggester/i18n/de.json
new file mode 100644
index 000..d0e0d41
--- /dev/null
+++ 

[MediaWiki-commits] [Gerrit] Remove 'beta', updated OSM URL - change (mediawiki...Kartographer)

2016-06-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Remove 'beta', updated OSM URL
..


Remove 'beta', updated OSM URL

Bug: T138126
Bug: T138044
Change-Id: I30d292559e9453e2006256304fbedcc94e15602b
---
M i18n/ast.json
M i18n/ba.json
M i18n/be-tarask.json
M i18n/bn.json
M i18n/cs.json
M i18n/de.json
M i18n/en.json
M i18n/es.json
M i18n/fr.json
M i18n/gl.json
M i18n/he.json
M i18n/it.json
M i18n/ko.json
M i18n/mk.json
M i18n/nap.json
M i18n/pt.json
M i18n/sv.json
M i18n/uk.json
M i18n/vi.json
M i18n/zh-hans.json
M i18n/zh-hant.json
21 files changed, 21 insertions(+), 21 deletions(-)

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



diff --git a/i18n/ast.json b/i18n/ast.json
index 65ec1ee..675d92d 100644
--- a/i18n/ast.json
+++ b/i18n/ast.json
@@ -14,7 +14,7 @@
"apihelp-query+mapdata-param-continue": "Usa esti parámetru pa siguir 
cola iteración de les resultancies",
"apihelp-query+mapdata-param-groups": "Grupos separaos por barres de 
los que devolver datos",
"apihelp-query+mapdata-param-limit": "Númberu de páxines pa les que 
devolver datos",
-   "kartographer-attribution": "Wikimedia maps beta | Datos del mapa © 
[http://openstreetmap.org/copyright collaboradores d'OpenStreetMap]",
+   "kartographer-attribution": "Wikimedia maps | Datos del mapa © 
[https://www.openstreetmap.org/copyright collaboradores d'OpenStreetMap]",
"kartographer-broken-category": "Páxines con mapes frañaos",
"kartographer-broken-category-desc": "La páxina incluye un usu inválidu 
de mapa.",
"kartographer-desc": "Permite amestar mapes a les páxines wiki",
diff --git a/i18n/ba.json b/i18n/ba.json
index d1fc9bf..ed4a65f 100644
--- a/i18n/ba.json
+++ b/i18n/ba.json
@@ -8,7 +8,7 @@
"Ләйсән"
]
},
-   "kartographer-attribution": "Бета карталары Викимедиаһы - | картографик 
мәғлүмәттәр © [http://openstreetmap.org/copyright ҡатнашыусылар OpenStreetMap]",
+   "kartographer-attribution": "Карталары Викимедиаһы - | картографик 
мәғлүмәттәр © [https://www.openstreetmap.org/copyright ҡатнашыусылар 
OpenStreetMap]",
"kartographer-broken-category": "Графиктары боҙолған биттәр",
"kartographer-broken-category-desc": "Был биттә файҙаланырға яраҡһыҙ 
графиктар",
"kartographer-desc": "Картаның вики-битенә өҫтәргә рөхсәт бирә.",
diff --git a/i18n/be-tarask.json b/i18n/be-tarask.json
index 2d00fde..5da1dcc 100644
--- a/i18n/be-tarask.json
+++ b/i18n/be-tarask.json
@@ -4,5 +4,5 @@
"Red Winged Duck"
]
},
-   "kartographer-attribution": "Мапы Вікімэдыі бэта | Зьвесткі мапаў © 
[http://openstreetmap.org/copyright Аўтары OpenStreetMap]"
+   "kartographer-attribution": "Мапы Вікімэдыі | Зьвесткі мапаў © 
[https://www.openstreetmap.org/copyright Аўтары OpenStreetMap]"
 }
diff --git a/i18n/bn.json b/i18n/bn.json
index da15d52..6758984 100644
--- a/i18n/bn.json
+++ b/i18n/bn.json
@@ -5,7 +5,7 @@
"Bodhisattwa"
]
},
-   "kartographer-attribution": "উইকিমিডিয়া মানচিত্র বেটা | মানচিত্রের 
উপাত্ত © [http://openstreetmap.org/copyright ওপেনস্ট্রীটম্যাপের অবদানকারীগণ]",
+   "kartographer-attribution": "উইকিমিডিয়া মানচিত্র বেটা | মানচিত্রের 
উপাত্ত © [https://www.openstreetmap.org/copyright ওপেনস্ট্রীটম্যাপের 
অবদানকারীগণ]",
"kartographer-broken-category": "ভাঙা মানচিত্রসহ পাতা",
"kartographer-broken-category-desc": "পাতা একটি অকার্যকর মানচিত্র 
অন্তর্ভুক্ত করে",
"kartographer-desc": "উইকি পাতাসমূহে মানচিত্র অন্তর্ভুক্ত করতে অনুমতি 
দেয়",
diff --git a/i18n/cs.json b/i18n/cs.json
index fde4749..b981eb2 100644
--- a/i18n/cs.json
+++ b/i18n/cs.json
@@ -5,7 +5,7 @@
"Kvetoslav47"
]
},
-   "kartographer-attribution": "Wikimedia mapy beta | Mapová data © 
[http://openstreetmap.org/copyright přispěvatelé OpenStreetMap]",
+   "kartographer-attribution": "Wikimedia mapy | Mapová data © 
[https://www.openstreetmap.org/copyright přispěvatelé OpenStreetMap]",
"kartographer-broken-category": "Stránky s rozbitými mapami",
"kartographer-broken-category-desc": "Tato stránka obsahuje chybně 
použitou mapu",
"kartographer-desc": "Umožňuje na stránky wiki přidávat mapy",
diff --git a/i18n/de.json b/i18n/de.json
index 96b4a11..6703588 100644
--- a/i18n/de.json
+++ b/i18n/de.json
@@ -15,7 +15,7 @@
"apihelp-query+mapdata-param-continue": "Verwende diesen Parameter, um 
mit der Wiederholung der Ergebnisse fortzufahren.",
"apihelp-query+mapdata-param-groups": "Mit | getrennte Gruppen, für die 
die Daten zurückgegeben werden sollen.",
"apihelp-query+mapdata-param-limit": "Für wie viele Seiten Daten 
zurückgegeben werden sollen",
-   "kartographer-attribution": "Wikimedia Karten Beta | Kartendaten 

[MediaWiki-commits] [Gerrit] registration: Add support for $wgGrantPermissions & $wgGrant... - change (mediawiki/core)

2016-06-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: registration: Add support for $wgGrantPermissions & 
$wgGrantPermissionGroups
..


registration: Add support for $wgGrantPermissions & $wgGrantPermissionGroups

Change-Id: If336aa351ee5dc4dc07f63cfac2a5d236e501718
---
M docs/extension.schema.json
M includes/registration/ExtensionProcessor.php
2 files changed, 26 insertions(+), 0 deletions(-)

Approvals:
  Anomie: Looks good to me, but someone else must approve
  Gergő Tisza: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/docs/extension.schema.json b/docs/extension.schema.json
index 1d2b2f0..1fccf17 100644
--- a/docs/extension.schema.json
+++ b/docs/extension.schema.json
@@ -630,6 +630,29 @@
}
}
},
+   "GrantPermissions": {
+   "type": "object",
+   "description": "Map of permissions granted to 
authorized consumers to their bundles, called 'grants'",
+   "patternProperties": {
+   "^[a-z]+$": {
+   "type": "object",
+   "patternProperties": {
+   "^[a-z]+$": {
+   "type": "boolean"
+   }
+   }
+   }
+   }
+   },
+   "GrantPermissionGroups": {
+   "type": "object",
+   "description": "Map of grants to their UI grouping",
+   "patternProperties": {
+   "^[a-z]+$": {
+   "type": "string"
+   }
+   }
+   },
"ImplicitGroups": {
"type": "array",
"description": "Implicit groups"
diff --git a/includes/registration/ExtensionProcessor.php 
b/includes/registration/ExtensionProcessor.php
index 78f9370..2205f95 100644
--- a/includes/registration/ExtensionProcessor.php
+++ b/includes/registration/ExtensionProcessor.php
@@ -15,6 +15,8 @@
'HiddenPrefs',
'GroupPermissions',
'RevokePermissions',
+   'GrantPermissions',
+   'GrantPermissionGroups',
'ImplicitGroups',
'GroupsAddToSelf',
'GroupsRemoveFromSelf',
@@ -61,6 +63,7 @@
protected static $mergeStrategies = [
'wgGroupPermissions' => 'array_plus_2d',
'wgRevokePermissions' => 'array_plus_2d',
+   'wgGrantPermissions' => 'array_plus_2d',
'wgHooks' => 'array_merge_recursive',
'wgExtensionCredits' => 'array_merge_recursive',
'wgExtraGenderNamespaces' => 'array_plus',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If336aa351ee5dc4dc07f63cfac2a5d236e501718
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Anomie 
Gerrit-Reviewer: Gergő Tisza 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Adjust Searcher maximum result depth - change (mediawiki...CirrusSearch)

2016-06-20 Thread EBernhardson (Code Review)
EBernhardson has uploaded a new change for review.

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

Change subject: Adjust Searcher maximum result depth
..

Adjust Searcher maximum result depth

Since upgrading to elasticsearch 2.x we have been getting new errors in
cirrus logs about searching too deep into the index. The default in
elasticsearch is 10,000 items. This seems like more than enough, so
adjust our own limit of 100,000 to match the 10,000 set in
elasticsearch.

Bug: T136937
Change-Id: I03bf300aec3a733f56c62ae0e626cd51f6470f33
---
M includes/Searcher.php
1 file changed, 6 insertions(+), 5 deletions(-)


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

diff --git a/includes/Searcher.php b/includes/Searcher.php
index 52926d4..5238cbc 100644
--- a/includes/Searcher.php
+++ b/includes/Searcher.php
@@ -63,10 +63,11 @@
const MAX_TEXT_SEARCH = 300;
 
/**
-* Maximum offset depth allowed.  Too deep will cause very slow queries.
-* 100,000 feels plenty deep.
+* Maximum offset + limit depth allowed. As in the deepest possible 
result 
+* to return. Too deep will cause very slow queries. 10,000 feels plenty
+* deep. This should be <= index.max_result_window in elasticsearch.
 */
-   const MAX_OFFSET = 10;
+   const MAX_OFFSET_LIMIT = 1;
 
/**
 * @var integer search offset
@@ -218,8 +219,8 @@
 
parent::__construct( $conn, $user, $config->get( 
'CirrusSearchSlowSearch' ) );
$this->config = $config;
-   $this->offset = min( $offset, self::MAX_OFFSET );
-   $this->limit = $limit;
+   $this->limit = min( $limit, self::MAX_OFFSET_LIMIT );
+   $this->offset = min( $offset, self::MAX_OFFSET_LIMIT - 
$this->limit );
$this->indexBaseName = $index ?: $config->getWikiId();
$this->language = $config->get( 'ContLang' );
$this->escaper = new Escaper( $config->get( 'LanguageCode' ), 
$config->get( 'CirrusSearchAllowLeadingWildcard' ) );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I03bf300aec3a733f56c62ae0e626cd51f6470f33
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CirrusSearch
Gerrit-Branch: master
Gerrit-Owner: EBernhardson 

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


[MediaWiki-commits] [Gerrit] Update property suggester - change (mediawiki...Wikidata)

2016-06-20 Thread Aude (Code Review)
Aude has uploaded a new change for review.

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

Change subject: Update property suggester
..

Update property suggester

Bug: T138059
Change-Id: Ic68d3af4293d2f5c81740c941dd75c18fb1f979f
---
M composer.lock
M extensions/PropertySuggester/PropertySuggesterHooks.php
M extensions/PropertySuggester/README.md
A extensions/PropertySuggester/i18n/de.json
A extensions/PropertySuggester/i18n/es.json
A extensions/PropertySuggester/i18n/fr.json
A extensions/PropertySuggester/i18n/gl.json
A extensions/PropertySuggester/i18n/he.json
A extensions/PropertySuggester/i18n/id.json
A extensions/PropertySuggester/i18n/it.json
A extensions/PropertySuggester/i18n/mk.json
M extensions/PropertySuggester/i18n/qqq.json
A extensions/PropertySuggester/i18n/ru.json
A extensions/PropertySuggester/i18n/uk.json
A extensions/PropertySuggester/i18n/zh-hans.json
M extensions/PropertySuggester/maintenance/UpdateTable.php
M extensions/PropertySuggester/modules/ext.PropertySuggester.EntitySelector.js
M extensions/PropertySuggester/src/PropertySuggester/SuggesterParamsParser.php
M 
extensions/PropertySuggester/src/PropertySuggester/Suggesters/SimpleSuggester.php
M extensions/PropertySuggester/src/PropertySuggester/SuggestionGenerator.php
M 
extensions/PropertySuggester/src/PropertySuggester/UpdateTable/Importer/BasicImporter.php
M 
extensions/PropertySuggester/tests/phpunit/PropertySuggester/GetSuggestionsTest.php
A 
extensions/PropertySuggester/tests/phpunit/PropertySuggester/PropertySuggesterHooksTest.php
M 
extensions/PropertySuggester/tests/phpunit/PropertySuggester/ResultBuilderTest.php
M 
extensions/PropertySuggester/tests/phpunit/PropertySuggester/SuggestionGeneratorTest.php
M vendor/composer/installed.json
26 files changed, 444 insertions(+), 121 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikidata 
refs/changes/09/295309/1

diff --git a/composer.lock b/composer.lock
index 0d869db..718d497 100644
--- a/composer.lock
+++ b/composer.lock
@@ -813,16 +813,16 @@
 },
 {
 "name": "propertysuggester/property-suggester",
-"version": "3.0.1",
+"version": "3.0.2",
 "source": {
 "type": "git",
 "url": "https://github.com/Wikidata-lib/PropertySuggester.git;,
-"reference": "c267839dbf9e1369053999ebee996bff7c87f3ee"
+"reference": "fdb33b593b96a890145c6ae008333768fb4f0d3c"
 },
 "dist": {
 "type": "zip",
-"url": 
"https://api.github.com/repos/Wikidata-lib/PropertySuggester/zipball/c267839dbf9e1369053999ebee996bff7c87f3ee;,
-"reference": "c267839dbf9e1369053999ebee996bff7c87f3ee",
+"url": 
"https://api.github.com/repos/Wikidata-lib/PropertySuggester/zipball/fdb33b593b96a890145c6ae008333768fb4f0d3c;,
+"reference": "fdb33b593b96a890145c6ae008333768fb4f0d3c",
 "shasum": ""
 },
 "require": {
@@ -856,7 +856,7 @@
 "wikibase",
 "wikidata"
 ],
-"time": "2016-03-16 11:16:15"
+"time": "2016-06-20 17:44:28"
 },
 {
 "name": "serialization/serialization",
diff --git a/extensions/PropertySuggester/PropertySuggesterHooks.php 
b/extensions/PropertySuggester/PropertySuggesterHooks.php
index bdf6414..75f18d1 100644
--- a/extensions/PropertySuggester/PropertySuggesterHooks.php
+++ b/extensions/PropertySuggester/PropertySuggesterHooks.php
@@ -1,5 +1,6 @@
 getEntityNamespaceLookup();
-   $itemNamespace = $entityNamespaceLookup->getEntityNamespace( 
CONTENT_MODEL_WIKIBASE_ITEM );
+   $itemNamespace = $entityNamespaceLookup->getEntityNamespace( 
Item::ENTITY_TYPE );
+
+   if ( $itemNamespace === false ) {
+   // try looking up namespace by content model, for any 
instances of PropertySuggester
+   // running with older Wikibase prior to ef622b1bc.
+   $itemNamespace = 
$entityNamespaceLookup->getEntityNamespace(
+   CONTENT_MODEL_WIKIBASE_ITEM
+   );
+   }
 
if ( $out->getTitle()->getNamespace() !== $itemNamespace ) {
return true;
diff --git a/extensions/PropertySuggester/README.md 
b/extensions/PropertySuggester/README.md
index 3666f94..b54fff6 100644
--- a/extensions/PropertySuggester/README.md
+++ b/extensions/PropertySuggester/README.md
@@ -45,6 +45,10 @@
 
 ## Release notes
 
+### 3.0.2 (2016-06-20)
+* Adapt entity type for namespaces
+* Minor cleanups
+
 ### 3.0.1 (2016-03-14)
 * Defined compatibility with Wikibase DataModel ~6.0
 
diff --git a/extensions/PropertySuggester/i18n/de.json 
b/extensions/PropertySuggester/i18n/de.json
new file mode 100644
index 000..d0e0d41
--- 

[MediaWiki-commits] [Gerrit] Update ldapauth and wikitech roles for AuthManager - change (mediawiki/vagrant)

2016-06-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Update ldapauth and wikitech roles for AuthManager
..


Update ldapauth and wikitech roles for AuthManager

Change-Id: Ic9923b04c6f736a93d2f0f6ba0aea0ac122ccd6b
---
M puppet/modules/role/templates/ldapauth/LdapAuthentication.php.erb
M puppet/modules/role/templates/wikitech/LdapAuth.php.erb
2 files changed, 27 insertions(+), 2 deletions(-)

Approvals:
  BryanDavis: Looks good to me, approved
  Gergő Tisza: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/puppet/modules/role/templates/ldapauth/LdapAuthentication.php.erb 
b/puppet/modules/role/templates/ldapauth/LdapAuthentication.php.erb
index 19c243d..922d0a0 100644
--- a/puppet/modules/role/templates/ldapauth/LdapAuthentication.php.erb
+++ b/puppet/modules/role/templates/ldapauth/LdapAuthentication.php.erb
@@ -1,5 +1,17 @@
 // [
+   'class' => LdapPrimaryAuthenticationProvider::class,
+   'args' => [ [
+   'authoritative' => true, // don't allow local 
non-LDAP accounts
+   ] ],
+   'sort' => 50, // must be smaller than local pw provider
+   ],
+   ];
+} else {
+   $wgAuth = new LdapAuthenticationPlugin();
+}
 
 $wgLDAPDomainNames = array( 'ldap' );
 $wgLDAPServerNames = array( 'ldap' => '127.0.0.1' );
diff --git a/puppet/modules/role/templates/wikitech/LdapAuth.php.erb 
b/puppet/modules/role/templates/wikitech/LdapAuth.php.erb
index a76315b..9bce82a 100644
--- a/puppet/modules/role/templates/wikitech/LdapAuth.php.erb
+++ b/puppet/modules/role/templates/wikitech/LdapAuth.php.erb
@@ -1,4 +1,17 @@
-$wgAuth = new LdapAuthenticationPlugin();
+if ( class_exists( MediaWiki\Auth\AuthManager::class ) && empty( 
$wgDisableAuthManager ) ) {
+   $wgAuthManagerAutoConfig['primaryauth'] += [
+   LdapPrimaryAuthenticationProvider::class => [
+   'class' => LdapPrimaryAuthenticationProvider::class,
+   'args' => [ [
+   'authoritative' => true, // don't allow local 
non-LDAP accounts
+   ] ],
+   'sort' => 50, // must be smaller than local pw provider
+   ],
+   ];
+} else {
+   $wgAuth = new LdapAuthenticationPlugin();
+}
+
 $wgLDAPDomainNames = array('labs');
 $wgLDAPServerNames = array( 'labs' => 'localhost' );
 $wgLDAPSearchAttributes = array( 'labs' => 'cn' );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic9923b04c6f736a93d2f0f6ba0aea0ac122ccd6b
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: master
Gerrit-Owner: Anomie 
Gerrit-Reviewer: BryanDavis 
Gerrit-Reviewer: Dduvall 
Gerrit-Reviewer: Gergő Tisza 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Add a link back to the article from Special:MobileCite - change (mediawiki...MobileFrontend)

2016-06-20 Thread Bmansurov (Code Review)
Bmansurov has uploaded a new change for review.

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

Change subject: Add a link back to the article from Special:MobileCite
..

Add a link back to the article from Special:MobileCite

The link is especially useful when the user is coming to the page
from a shared link or from the search engine.

Bug: T136617
Change-Id: Ifaef5114ff0ae8d6955fb7c09bc561535c622822
---
M extension.json
M i18n/en.json
M i18n/qqq.json
A includes/specials/SpecialMobileCite.mustache
M includes/specials/SpecialMobileCite.php
A resources/mobile.special.mobilecite.styles/mobilecite.less
6 files changed, 30 insertions(+), 2 deletions(-)


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

diff --git a/extension.json b/extension.json
index d5eac0b..1c39145 100644
--- a/extension.json
+++ b/extension.json
@@ -1423,6 +1423,13 @@
"class": "MobileUserModule",
"position": "bottom"
},
+   "mobile.special.mobilecite.styles": {
+   "targets": "mobile",
+   "styles": [
+   
"resources/mobile.special.mobilecite.styles/mobilecite.less"
+   ],
+   "position": "top"
+   },
"mobile.special.mobilemenu.styles": {
"targets": "mobile",
"styles": [
diff --git a/i18n/en.json b/i18n/en.json
index 1179384..c5b4a5f 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -275,6 +275,7 @@
"mobile-frontend-requires-mobile": "This page is not available on 
desktop. Please click the mobile view link at the bottom of the page.",
"mobile-frontend-requires-optin": "This page is not available unless 
you opt into our beta mode. Visit the [[Special:MobileOptions|settings page]] 
to opt in.",
"mobile-frontend-requires-title": "Page unavailable",
+   "mobile-frontend-return-to-article": "Return to article",
"mobile-frontend-save-error": "Error saving settings. Please make sure 
that you have cookies enabled.",
"mobile-frontend-save-settings": "Save",
"mobile-frontend-saving-exit-page": "Your contribution is still saving. 
If you leave your contributions will be lost. Are you sure you want to exit?",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index b4a2d6a..7f691e5 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -273,6 +273,7 @@
"mobile-frontend-requires-mobile": "Message that shows when a special 
page does not have a desktop equivalent.\n\nPoints user to mobile view link at 
bottom of page to switch to mobile.\n\nThis should be consistent with 
{{msg-mw|Mobile-frontend-view}}.",
"mobile-frontend-requires-optin": "Message that shows when a page 
requires beta mode to work. Wikitext that links to [[Special:MobileOptions]] 
page.",
"mobile-frontend-requires-title": "Title shown on page when the page is 
not available to the user. Currently used for special pages that have no 
mobile/desktop equivalent or that are only available as experimental features.",
+   "mobile-frontend-return-to-article": "Title of the link that takes the 
user to the article page to which the current Special:MobileCite page belongs.",
"mobile-frontend-save-error": "Error message shown when a user tries to 
save settings form without cookies present.",
"mobile-frontend-save-settings": "Text for button for saving settings 
on [[Special:MobileOptions]]. Since this appears on the settings page 
translating the word save is sufficient\n{{Identical|Save}}",
"mobile-frontend-saving-exit-page": "When a user makes an edit in the 
page which is happening in the background\nand then tries to leave the page 
this message is shown to check that they are happy that they will lose their 
changes.\nThey can either exit the page and lose them or stay on the page until 
they are complete",
diff --git a/includes/specials/SpecialMobileCite.mustache 
b/includes/specials/SpecialMobileCite.mustache
new file mode 100644
index 000..5f9c71e
--- /dev/null
+++ b/includes/specials/SpecialMobileCite.mustache
@@ -0,0 +1,6 @@
+{{#show_article_link}}
+   
+   {{article_link_title}}
+   
+{{/show_article_link}}
+{{{html}}}
diff --git a/includes/specials/SpecialMobileCite.php 
b/includes/specials/SpecialMobileCite.php
index 5fd7bef..40c4d12 100644
--- a/includes/specials/SpecialMobileCite.php
+++ b/includes/specials/SpecialMobileCite.php
@@ -49,6 +49,7 @@
 * @param string $pagename The revision number
 */
public function executeWhenAvailable( $param ) {
+   $this->setHeaders();
$out = $this->getOutput();
$revision = null;
if ( $param ) {
@@ -64,10 +65,19 @@
$html = $this->getReferenceBodyHtml( 

[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: c7b8be0..20b9301 - change (mediawiki/extensions)

2016-06-20 Thread Jenkins-mwext-sync (Code Review)
Jenkins-mwext-sync has uploaded a new change for review.

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

Change subject: Syncronize VisualEditor: c7b8be0..20b9301
..

Syncronize VisualEditor: c7b8be0..20b9301

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


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

diff --git a/VisualEditor b/VisualEditor
index c7b8be0..20b9301 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit c7b8be0cac5e602d924b022edbf6e0114e3dd6cf
+Subproject commit 20b93019a0d5fde0590d8759f3ab0d944a03d319

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3d922ecf701538ea33c73bf4ffaa3d567537a0d8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions
Gerrit-Branch: master
Gerrit-Owner: Jenkins-mwext-sync 

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


[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: c7b8be0..20b9301 - change (mediawiki/extensions)

2016-06-20 Thread Jenkins-mwext-sync (Code Review)
Jenkins-mwext-sync has submitted this change and it was merged.

Change subject: Syncronize VisualEditor: c7b8be0..20b9301
..


Syncronize VisualEditor: c7b8be0..20b9301

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

Approvals:
  Jenkins-mwext-sync: Verified; Looks good to me, approved



diff --git a/VisualEditor b/VisualEditor
index c7b8be0..20b9301 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit c7b8be0cac5e602d924b022edbf6e0114e3dd6cf
+Subproject commit 20b93019a0d5fde0590d8759f3ab0d944a03d319

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3d922ecf701538ea33c73bf4ffaa3d567537a0d8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions
Gerrit-Branch: master
Gerrit-Owner: Jenkins-mwext-sync 
Gerrit-Reviewer: Jenkins-mwext-sync 

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


[MediaWiki-commits] [Gerrit] Show request id in Exception pages even if $wgShowExceptionD... - change (mediawiki/core)

2016-06-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Show request id in Exception pages even if 
$wgShowExceptionDetails is false
..


Show request id in Exception pages even if $wgShowExceptionDetails is false

Bug: T137277
Change-Id: I5ff7e4ce0336616f8a9bcc39031a0a032bd9a931
---
M includes/exception/MWExceptionHandler.php
1 file changed, 6 insertions(+), 5 deletions(-)

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



diff --git a/includes/exception/MWExceptionHandler.php 
b/includes/exception/MWExceptionHandler.php
index 63adc29..e4ff5f3 100644
--- a/includes/exception/MWExceptionHandler.php
+++ b/includes/exception/MWExceptionHandler.php
@@ -93,10 +93,11 @@
}
}
} else {
-   $message = "Exception encountered, of type \"" . 
get_class( $e ) . "\"";
-
-   if ( $wgShowExceptionDetails ) {
-   $message .= "\n" . self::getLogMessage( $e ) . 
"\nBacktrace:\n" .
+   if ( !$wgShowExceptionDetails ) {
+   $message = self::getPublicLogMessage( $e );
+   } else {
+   $message = self::getLogMessage( $e ) .
+   "\nBacktrace:\n" .
self::getRedactedTraceAsString( $e ) . 
"\n";
}
 
@@ -492,7 +493,7 @@
$type = get_class( $e );
return '[' . $reqId . '] '
. gmdate( 'Y-m-d H:i:s' ) . ': '
-   . 'Fatal exception of type ' . $type;
+   . 'Fatal exception of type "' . $type . '"';
}
 
/**

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5ff7e4ce0336616f8a9bcc39031a0a032bd9a931
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Glaisher 
Gerrit-Reviewer: Alex Monk 
Gerrit-Reviewer: BryanDavis 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Fedora 22 instructions for vagrant-lxc - change (mediawiki/vagrant)

2016-06-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Fedora 22 instructions for vagrant-lxc
..


Fedora 22 instructions for vagrant-lxc

Setup is easy once you know the correct packages, but vagrant up fails.

Tips assembled from multiple sources:

* https://fedoraproject.org/wiki/LXC
* http://blog.obnox.de/vagrant-with-lxc-and-libvirt-reprise/
* https://stackoverflow.com/a/4502672
* https://github.com/jedi4ever/veewee/issues/510#issuecomment-77170337
* http://blog.bak1an.so/blog/2014/03/23/fedora-vagrant-nfs/
* https://github.com/coreos/coreos-vagrant/issues/162#issuecomment-53849603

Next step will be to solve https://unix.stackexchange.com/q/218631

Change-Id: I6ca6f6178aab7a124ac9467c7f33e392026b23f3
---
M support/README-lxc.md
1 file changed, 40 insertions(+), 0 deletions(-)

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



diff --git a/support/README-lxc.md b/support/README-lxc.md
index bf6..322efec 100644
--- a/support/README-lxc.md
+++ b/support/README-lxc.md
@@ -114,3 +114,43 @@
 
 You can also set `VAGRANT_DEFAULT_PROVIDER=lxc` in your shell environment to
 tell Vagrant your preferred default provider.
+
+
+Setup on a Fedora 22 host
+
+
+Since Fedora 22, everything is packaged, you just need to remember all the
+packages:
+
+sudo dnf install lxc lxc-templates lxc-extra vagrant vagrant-libvirt \
+vagrant-lxc vagrant-libvirt-doc gcc ruby-devel rubygems libvirt-devel \
+redir nfs-utils
+
+Now you can simplify your life reducing the sudo passwords to type in vagrant:
+
+sudo cp 
/usr/share/vagrant/gems/doc/vagrant-libvirt-0.0.*/polkit/10-vagrant-libvirt.rules
 /usr/share/polkit-1/rules.d/
+
+Start NFS and allow access to it:
+
+sudo systemctl start rpcbind.service nfs-idmap.service nfs-server.service
+sudo firewall-cmd --zone=internal --change-interface=virbr0
+sudo firewall-cmd --permanent --zone=public --add-service=nfs
+sudo firewall-cmd --permanent --zone=public --add-service=rpc-bind
+sudo firewall-cmd --permanent --zone=public --add-service=mountd
+sudo firewall-cmd --permanent --zone=public --add-port=2049/udp
+sudo firewall-cmd --reload
+
+Continue installing MediaWiki-Vagrant using normal instructions:
+
+git clone https://gerrit.wikimedia.org/r/mediawiki/vagrant
+cd vagrant
+git submodule update --init --recursive
+./setup.sh
+
+Vagrant may automatically select LXC as the default provider when it is
+available, but if is not picked for you it can be forced:
+
+vagrant up --provider=lxc
+
+You can also set `VAGRANT_DEFAULT_PROVIDER=lxc` in your shell environment to
+tell Vagrant your preferred default provider.

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6ca6f6178aab7a124ac9467c7f33e392026b23f3
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: master
Gerrit-Owner: Nemo bis 
Gerrit-Reviewer: BryanDavis 
Gerrit-Reviewer: Dduvall 
Gerrit-Reviewer: Nemo bis 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Provide CategoryAfterPageRemoved hook handlers with deleted ... - change (mediawiki/core)

2016-06-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Provide CategoryAfterPageRemoved hook handlers with deleted 
page IDs
..


Provide CategoryAfterPageRemoved hook handlers with deleted page IDs

Since this updates happens post-send or via the job queue, the
page object will be for a non-existing or newer page/redirect.

Change-Id: I20b583948157dccceca6eb1fbd25121822bf1b2f
---
M docs/hooks.txt
M includes/Title.php
M includes/deferred/LinksDeletionUpdate.php
M includes/page/Article.php
M includes/page/WikiPage.php
5 files changed, 14 insertions(+), 14 deletions(-)

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



diff --git a/docs/hooks.txt b/docs/hooks.txt
index 44f2551..f20c5b8 100644
--- a/docs/hooks.txt
+++ b/docs/hooks.txt
@@ -919,6 +919,7 @@
 'CategoryAfterPageRemoved': After a page is removed from a category.
 $category: Category that page was removed from
 $wikiPage: WikiPage that was removed
+$id: the page ID (original ID in case of page deletions)
 
 'CategoryPageView': Before viewing a categorypage in CategoryPage::view.
 &$catpage: CategoryPage instance
diff --git a/includes/Title.php b/includes/Title.php
index 4555f16..f291a69 100644
--- a/includes/Title.php
+++ b/includes/Title.php
@@ -4371,7 +4371,6 @@
$conds = $this->pageCond();
$dbw->onTransactionIdle( function () use ( $dbw, $conds, 
$method, $purgeTime ) {
$dbTimestamp = $dbw->timestamp( $purgeTime ?: time() );
-
$dbw->update(
'page',
[ 'page_touched' => $dbTimestamp ],
diff --git a/includes/deferred/LinksDeletionUpdate.php 
b/includes/deferred/LinksDeletionUpdate.php
index 2f17729..a7c39ca 100644
--- a/includes/deferred/LinksDeletionUpdate.php
+++ b/includes/deferred/LinksDeletionUpdate.php
@@ -73,7 +73,7 @@
);
$catBatches = array_chunk( $cats, $batchSize );
foreach ( $catBatches as $catBatch ) {
-   $this->page->updateCategoryCounts( [], $catBatch );
+   $this->page->updateCategoryCounts( [], $catBatch, $id );
if ( count( $catBatches ) > 1 ) {
$this->mDb->commit( __METHOD__, 'flush' );
wfGetLBFactory()->waitForReplication( [ 'wiki' 
=> $this->mDb->getWikiID() ] );
diff --git a/includes/page/Article.php b/includes/page/Article.php
index eccf36f..1f1e8d6 100644
--- a/includes/page/Article.php
+++ b/includes/page/Article.php
@@ -2601,8 +2601,8 @@
 * Call to WikiPage function for backwards compatibility.
 * @see WikiPage::updateCategoryCounts
 */
-   public function updateCategoryCounts( array $added, array $deleted ) {
-   return $this->mPage->updateCategoryCounts( $added, $deleted );
+   public function updateCategoryCounts( array $added, array $deleted, $id 
= 0 ) {
+   return $this->mPage->updateCategoryCounts( $added, $deleted, 
$id );
}
 
/**
diff --git a/includes/page/WikiPage.php b/includes/page/WikiPage.php
index 8d9d5a8..a416d56 100644
--- a/includes/page/WikiPage.php
+++ b/includes/page/WikiPage.php
@@ -3427,16 +3427,16 @@
 *
 * @param array $added The names of categories that were added
 * @param array $deleted The names of categories that were deleted
+* @param integer $id Page ID (this should be the original deleted page 
ID)
 */
-   public function updateCategoryCounts( array $added, array $deleted ) {
-   $that = $this;
-   $method = __METHOD__;
+   public function updateCategoryCounts( array $added, array $deleted, $id 
= 0 ) {
+   $id = $id ?: $this->getId();
$dbw = wfGetDB( DB_MASTER );
-
+   $method = __METHOD__;
// Do this at the end of the commit to reduce lock wait timeouts
$dbw->onTransactionPreCommitOrIdle(
-   function () use ( $dbw, $that, $method, $added, 
$deleted ) {
-   $ns = $that->getTitle()->getNamespace();
+   function () use ( $dbw, $added, $deleted, $id, $method 
) {
+   $ns = $this->getTitle()->getNamespace();
 
$addFields = [ 'cat_pages = cat_pages + 1' ];
$removeFields = [ 'cat_pages = cat_pages - 1' ];
@@ -3453,7 +3453,7 @@
'category',
'cat_title',
[ 'cat_title' => $added ],
-   __METHOD__
+   $method
);
 
  

[MediaWiki-commits] [Gerrit] [wip] Change mark as read buttons to circles - change (mediawiki...Echo)

2016-06-20 Thread Mooeypoo (Code Review)
Mooeypoo has uploaded a new change for review.

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

Change subject: [wip] Change mark as read buttons to circles
..

[wip] Change mark as read buttons to circles

Bug: T126214
Change-Id: I78a93c0545bbe2d7c11a0c62557cd2e97e9d3866
---
M Resources.php
M modules/styles/mw.echo.ui.NotificationItemWidget.less
A modules/styles/mw.echo.ui.ToggleReadCircleButtonWidget.less
M modules/ui/mw.echo.ui.NotificationItemWidget.js
A modules/ui/mw.echo.ui.ToggleReadCircleButtonWidget.js
5 files changed, 88 insertions(+), 12 deletions(-)


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

diff --git a/Resources.php b/Resources.php
index e815aea..73b6ed9 100644
--- a/Resources.php
+++ b/Resources.php
@@ -70,6 +70,7 @@
'ui/mw.echo.ui.SubGroupListWidget.js',
'ui/mw.echo.ui.NotificationsListWidget.js',
'ui/mw.echo.ui.PlaceholderItemWidget.js',
+   'ui/mw.echo.ui.ToggleReadCircleButtonWidget.js',
'ui/mw.echo.ui.NotificationItemWidget.js',
'ui/mw.echo.ui.SingleNotificationItemWidget.js',
'ui/mw.echo.ui.CrossWikiNotificationItemWidget.js',
@@ -84,6 +85,7 @@
'styles/mw.echo.ui.overlay.less',
'styles/mw.echo.ui.icons.less',
'styles/mw.echo.ui.NotificationItemWidget.less',
+   'styles/mw.echo.ui.ToggleReadCircleButtonWidget.less',

'styles/mw.echo.ui.CrossWikiNotificationItemWidget.less',
'styles/mw.echo.ui.NotificationsListWidget.less',
'styles/mw.echo.ui.PlaceholderItemWidget.less',
diff --git a/modules/styles/mw.echo.ui.NotificationItemWidget.less 
b/modules/styles/mw.echo.ui.NotificationItemWidget.less
index 82b02ca..402e2dc 100644
--- a/modules/styles/mw.echo.ui.NotificationItemWidget.less
+++ b/modules/styles/mw.echo.ui.NotificationItemWidget.less
@@ -166,11 +166,10 @@
}
 
&-markAsReadButton {
-   .mw-echo-ui-mixin-hover-opacity;
float: right;
font-size: 1em;
-   margin-top: -0.5em;
-   margin-right: -0.4em;
+   margin-top: -2em;
+   margin-right: -1.4em;
padding: 0;
 
.mw-echo-ui-notificationItemWidget-bundle & {
diff --git a/modules/styles/mw.echo.ui.ToggleReadCircleButtonWidget.less 
b/modules/styles/mw.echo.ui.ToggleReadCircleButtonWidget.less
new file mode 100644
index 000..b3d47f4
--- /dev/null
+++ b/modules/styles/mw.echo.ui.ToggleReadCircleButtonWidget.less
@@ -0,0 +1,28 @@
+.mw-echo-ui-toggleReadCircleButtonWidget {
+   &-circle {
+   border-radius: 50%;
+   width: 10px;
+   height: 10px;
+   margin: 20px;
+
+   // Mark as read
+   background-color: #347BFF;
+   border: 0;
+
+   // Mark as unread
+   &-unread {
+   background-color: #eee;
+   border: 1px solid #bbb;
+   }
+   }
+
+   &:hover .mw-echo-ui-toggleReadCircleButtonWidget-circle {
+   // Mark as read
+   background-color: #ddd;
+
+   // Mark as unread
+   &-unread {
+   background-color: #ddd;
+   }
+   }
+}
diff --git a/modules/ui/mw.echo.ui.NotificationItemWidget.js 
b/modules/ui/mw.echo.ui.NotificationItemWidget.js
index 1be5349..f28be4d 100644
--- a/modules/ui/mw.echo.ui.NotificationItemWidget.js
+++ b/modules/ui/mw.echo.ui.NotificationItemWidget.js
@@ -35,11 +35,11 @@
.addClass( 
'mw-echo-ui-notificationItemWidget-content-actions' );
 
// Mark as read
-   this.markAsReadButton = new OO.ui.ButtonWidget( {
-   icon: 'close',
+   this.markAsReadButton = new 
mw.echo.ui.ToggleReadCircleButtonWidget( {
framed: false,
title: mw.msg( 'echo-notification-markasread-tooltip' ),
-   classes: [ 
'mw-echo-ui-notificationItemWidget-markAsReadButton' ]
+   classes: [ 
'mw-echo-ui-notificationItemWidget-markAsReadButton' ],
+   markAsRead: !this.model.isRead()
} );
 
// Icon
@@ -219,7 +219,7 @@
 * Respond to mark as read button click
 */
mw.echo.ui.NotificationItemWidget.prototype.onMarkAsReadButtonClick = 
function () {
-   this.markRead( true );
+   this.markRead( !this.model.isRead() );
};
 
/**
@@ -289,18 +289,18 @@
 * Toggle the function of the 'mark as read' secondary button from 
'mark as read' to
 * 

[MediaWiki-commits] [Gerrit] Add .arcconfig - change (mediawiki/vagrant)

2016-06-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Add .arcconfig
..


Add .arcconfig

Change-Id: I245bba272d9bb0b8546c41a2162ac6bec818f350
---
A .arcconfig
1 file changed, 5 insertions(+), 0 deletions(-)

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



diff --git a/.arcconfig b/.arcconfig
new file mode 100644
index 000..dfe75cc
--- /dev/null
+++ b/.arcconfig
@@ -0,0 +1,5 @@
+{
+   "project.name": "mediawiki-vagrant",
+   "phabricator.uri": "https://phabricator.wikimedia.org;,
+   "repository.callsign": "MWVA"
+}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I245bba272d9bb0b8546c41a2162ac6bec818f350
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: master
Gerrit-Owner: Mattflaschen 
Gerrit-Reviewer: BryanDavis 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: Dduvall 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Unbreak travis-ci on 5.3.3. - change (at-ease)

2016-06-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Unbreak travis-ci on 5.3.3.
..


Unbreak travis-ci on 5.3.3.

And shut up the xdebug warning while we're at it too.

Change-Id: I03677e5c9c26cba075ed4f6e811aa0b01660c6bf
---
M .travis.yml
1 file changed, 5 insertions(+), 0 deletions(-)

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



diff --git a/.travis.yml b/.travis.yml
index 3d4019f..5b4fcc5 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -7,6 +7,11 @@
   - "5.6"
   - "hhvm"
 sudo: false
+env:
+  global:
+- COMPOSER_DISABLE_XDEBUG_WARN=1
+before_install:
+  - if [ "$TRAVIS_PHP_VERSION" = "5.3.3" ]; then composer config disable-tls 
true; composer config secure-http false; fi
 install:
   - composer install
 script:

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I03677e5c9c26cba075ed4f6e811aa0b01660c6bf
Gerrit-PatchSet: 1
Gerrit-Project: at-ease
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: BryanDavis 
Gerrit-Reviewer: MaxSem 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] [WIP] Add interactivity to "because you read" card. - change (apps...wikipedia)

2016-06-20 Thread Dbrant (Code Review)
Dbrant has uploaded a new change for review.

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

Change subject: [WIP] Add interactivity to "because you read" card.
..

[WIP] Add interactivity to "because you read" card.

Please do not review yet.

Change-Id: I0663b26dd247f65a28655213b73e08e07078426b
---
M app/src/main/java/org/wikipedia/feed/FeedFragment.java
A app/src/main/java/org/wikipedia/feed/FeedViewCallback.java
M 
app/src/main/java/org/wikipedia/feed/becauseyouread/BecauseYouReadCardView.java
M 
app/src/main/java/org/wikipedia/feed/becauseyouread/BecauseYouReadItemCard.java
M app/src/main/java/org/wikipedia/feed/view/FeedRecyclerAdapter.java
M app/src/main/java/org/wikipedia/feed/view/FeedView.java
M app/src/main/java/org/wikipedia/feed/view/ListCardItemView.java
A app/src/main/java/org/wikipedia/feed/view/PageTitleListCardItemView.java
A app/src/main/java/org/wikipedia/feed/view/PageTitleListCardView.java
M app/src/main/java/org/wikipedia/history/HistoryEntry.java
M app/src/main/java/org/wikipedia/page/MwApiResultPage.java
M app/src/main/java/org/wikipedia/page/NavDrawerHelper.java
M app/src/main/java/org/wikipedia/page/PageActivity.java
M app/src/main/java/org/wikipedia/readinglist/AddToReadingListDialog.java
14 files changed, 233 insertions(+), 40 deletions(-)


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

diff --git a/app/src/main/java/org/wikipedia/feed/FeedFragment.java 
b/app/src/main/java/org/wikipedia/feed/FeedFragment.java
index 1d84d45..8e91cbf 100644
--- a/app/src/main/java/org/wikipedia/feed/FeedFragment.java
+++ b/app/src/main/java/org/wikipedia/feed/FeedFragment.java
@@ -1,6 +1,7 @@
 package org.wikipedia.feed;
 
 import android.os.Bundle;
+import android.support.annotation.NonNull;
 import android.support.annotation.Nullable;
 import android.support.v4.app.Fragment;
 import android.view.LayoutInflater;
@@ -13,6 +14,7 @@
 import org.wikipedia.activity.FragmentUtil;
 import org.wikipedia.feed.model.Card;
 import org.wikipedia.feed.view.FeedView;
+import org.wikipedia.page.PageTitle;
 
 import java.util.List;
 
@@ -26,6 +28,13 @@
 private Unbinder unbinder;
 private WikipediaApp app;
 private FeedCoordinator coordinator;
+private FeedViewCallback feedCallback = new FeedCallback();
+
+public interface Callback extends CallbackFragment.Callback {
+void onFeedSearchRequested();
+void onFeedSelectPage(PageTitle title);
+void onFeedAddPageToList(PageTitle title);
+}
 
 public static FeedFragment newInstance() {
 return new FeedFragment();
@@ -45,7 +54,7 @@
 View view = inflater.inflate(R.layout.fragment_feed, container, false);
 
 unbinder = ButterKnife.bind(this, view);
-feedView.set(coordinator.getCards());
+feedView.set(coordinator.getCards(), feedCallback);
 
 coordinator.setFeedUpdateListener(new 
FeedCoordinator.FeedUpdateListener() {
 @Override
@@ -78,4 +87,19 @@
 feedView.update();
 }
 
+private class FeedCallback implements FeedViewCallback {
+@Override
+public void onSelectPage(@NonNull PageTitle title) {
+if (getCallback() != null) {
+getCallback().onFeedSelectPage(title);
+}
+}
+
+@Override
+public void onAddPageToList(@NonNull PageTitle title) {
+if (getCallback() != null) {
+getCallback().onFeedAddPageToList(title);
+}
+}
+}
 }
diff --git a/app/src/main/java/org/wikipedia/feed/FeedViewCallback.java 
b/app/src/main/java/org/wikipedia/feed/FeedViewCallback.java
new file mode 100644
index 000..7954be9
--- /dev/null
+++ b/app/src/main/java/org/wikipedia/feed/FeedViewCallback.java
@@ -0,0 +1,10 @@
+package org.wikipedia.feed;
+
+import android.support.annotation.NonNull;
+
+import org.wikipedia.page.PageTitle;
+
+public interface FeedViewCallback {
+void onSelectPage(@NonNull PageTitle title);
+void onAddPageToList(@NonNull PageTitle title);
+}
diff --git 
a/app/src/main/java/org/wikipedia/feed/becauseyouread/BecauseYouReadCardView.java
 
b/app/src/main/java/org/wikipedia/feed/becauseyouread/BecauseYouReadCardView.java
index 92b65e7..b579bf1 100644
--- 
a/app/src/main/java/org/wikipedia/feed/becauseyouread/BecauseYouReadCardView.java
+++ 
b/app/src/main/java/org/wikipedia/feed/becauseyouread/BecauseYouReadCardView.java
@@ -3,22 +3,33 @@
 import android.content.Context;
 import android.net.Uri;
 import android.support.annotation.NonNull;
+import android.support.annotation.Nullable;
 
+import org.wikipedia.feed.FeedViewCallback;
 import org.wikipedia.feed.view.CardLargeHeaderView;
 import org.wikipedia.feed.view.ListCardItemView;
 import org.wikipedia.feed.view.ListCardView;
+import org.wikipedia.feed.view.PageTitleListCardItemView;
+import org.wikipedia.feed.view.PageTitleListCardView;
 import 

[MediaWiki-commits] [Gerrit] Move only ES entries about the current wiki - change (mediawiki...Flow)

2016-06-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Move only ES entries about the current wiki
..


Move only ES entries about the current wiki

This doesn't affect MediaWiki-Vagrant or Beta Cluster, since they
don't have a shared flowdb.  But in general (and in production)
it should only run on the specified wiki.

Change-Id: Ib0716cd05fc19ffe9a2aa1426c4bbf9d63f15f4a
---
M maintenance/FlowExternalStoreMoveCluster.php
1 file changed, 2 insertions(+), 0 deletions(-)

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



diff --git a/maintenance/FlowExternalStoreMoveCluster.php 
b/maintenance/FlowExternalStoreMoveCluster.php
index 62abe61..4134c99 100644
--- a/maintenance/FlowExternalStoreMoveCluster.php
+++ b/maintenance/FlowExternalStoreMoveCluster.php
@@ -76,6 +76,7 @@
$clusterConditions[] = $schema['content'] . 
$dbr->buildLike( "DB://$cluster/", $dbr->anyString() );
}
$iterator->addConditions( array(
+   $schema['wiki'] => wfWikiID(),
$schema['flags'] . $dbr->buildLike( 
$dbr->anyString(), 'external', $dbr->anyString() ),
$dbr->makeList( $clusterConditions, LIST_OR ),
) );
@@ -276,6 +277,7 @@
'pk' => 'rev_id',
'content' => 'rev_content',
'flags' => 'rev_flags',
+   'wiki' => 'rev_user_wiki',
);
}
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib0716cd05fc19ffe9a2aa1426c4bbf9d63f15f4a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Mattflaschen 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: Matthias Mullie 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Revert "Revert "Improve edit stashing when vary-revision is ... - change (mediawiki/core)

2016-06-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Revert "Revert "Improve edit stashing when vary-revision is 
used""
..


Revert "Revert "Improve edit stashing when vary-revision is used""

This reverts commit ed9238aca86c61e077a4c1fc6da9ef4570fbc83a.

Change-Id: Id63a0aace3c3b054f421dc1292f5c22608281309
---
M includes/api/ApiStashEdit.php
1 file changed, 13 insertions(+), 8 deletions(-)

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



diff --git a/includes/api/ApiStashEdit.php b/includes/api/ApiStashEdit.php
index 67939a0..c8a330a 100644
--- a/includes/api/ApiStashEdit.php
+++ b/includes/api/ApiStashEdit.php
@@ -234,27 +234,34 @@
 
$age = time() - wfTimestamp( TS_UNIX, 
$editInfo->output->getCacheTime() );
if ( $age <= self::PRESUME_FRESH_TTL_SEC ) {
+   // Assume nothing changed in this time
$stats->increment( 
'editstash.cache_hits.presumed_fresh' );
$logger->debug( "Timestamp-based cache hit for key 
'$key' (age: $age sec)." );
-   return $editInfo; // assume nothing changed
} elseif ( isset( $editInfo->edits ) && $editInfo->edits === 
$user->getEditCount() ) {
// Logged-in user made no local upload/template edits 
in the meantime
$stats->increment( 
'editstash.cache_hits.presumed_fresh' );
$logger->debug( "Edit count based cache hit for key 
'$key' (age: $age sec)." );
-   return $editInfo;
} elseif ( $user->isAnon()
&& self::lastEditTime( $user ) < 
$editInfo->output->getCacheTime()
) {
// Logged-out user made no local upload/template edits 
in the meantime
$stats->increment( 
'editstash.cache_hits.presumed_fresh' );
$logger->debug( "Edit check based cache hit for key 
'$key' (age: $age sec)." );
-   return $editInfo;
+   } else {
+   // User may have changed included content
+   $editInfo = false;
}
 
-   $stats->increment( 'editstash.cache_misses.proven_stale' );
-   $logger->info( "Stale cache for key '$key'; old key with 
outside edits. (age: $age sec)" );
+   if ( !$editInfo ) {
+   $stats->increment( 
'editstash.cache_misses.proven_stale' );
+   $logger->info( "Stale cache for key '$key'; old key 
with outside edits. (age: $age sec)" );
+   } elseif ( $editInfo->output->getFlag( 'vary-revision' ) ) {
+   // This can be used for the initial parse, e.g. for 
filters or doEditContent(),
+   // but a second parse will be triggered in 
doEditUpdates(). This is not optimal.
+   $logger->info( "Partially usable cache for key '$key' 
('$title') [vary_revision]." );
+   }
 
-   return false;
+   return $editInfo;
}
 
/**
@@ -318,8 +325,6 @@
$ttl = min( $parserOutput->getCacheExpiry() - $since, 
self::MAX_CACHE_TTL );
if ( $ttl <= 0 ) {
return [ null, 0, 'no_ttl' ];
-   } elseif ( $parserOutput->getFlag( 'vary-revision' ) ) {
-   return [ null, 0, 'vary_revision' ];
}
 
// Only store what is actually needed

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id63a0aace3c3b054f421dc1292f5c22608281309
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.28.0-wmf.6
Gerrit-Owner: Aaron Schulz 
Gerrit-Reviewer: Aaron Schulz 
Gerrit-Reviewer: Anomie 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Revert "Revert "Improve edit stashing when vary-revision is ... - change (mediawiki/core)

2016-06-20 Thread Aaron Schulz (Code Review)
Aaron Schulz has uploaded a new change for review.

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

Change subject: Revert "Revert "Improve edit stashing when vary-revision is 
used""
..

Revert "Revert "Improve edit stashing when vary-revision is used""

This reverts commit ed9238aca86c61e077a4c1fc6da9ef4570fbc83a.

Change-Id: Id63a0aace3c3b054f421dc1292f5c22608281309
---
M includes/api/ApiStashEdit.php
1 file changed, 13 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/59/295259/1

diff --git a/includes/api/ApiStashEdit.php b/includes/api/ApiStashEdit.php
index 67939a0..c8a330a 100644
--- a/includes/api/ApiStashEdit.php
+++ b/includes/api/ApiStashEdit.php
@@ -234,27 +234,34 @@
 
$age = time() - wfTimestamp( TS_UNIX, 
$editInfo->output->getCacheTime() );
if ( $age <= self::PRESUME_FRESH_TTL_SEC ) {
+   // Assume nothing changed in this time
$stats->increment( 
'editstash.cache_hits.presumed_fresh' );
$logger->debug( "Timestamp-based cache hit for key 
'$key' (age: $age sec)." );
-   return $editInfo; // assume nothing changed
} elseif ( isset( $editInfo->edits ) && $editInfo->edits === 
$user->getEditCount() ) {
// Logged-in user made no local upload/template edits 
in the meantime
$stats->increment( 
'editstash.cache_hits.presumed_fresh' );
$logger->debug( "Edit count based cache hit for key 
'$key' (age: $age sec)." );
-   return $editInfo;
} elseif ( $user->isAnon()
&& self::lastEditTime( $user ) < 
$editInfo->output->getCacheTime()
) {
// Logged-out user made no local upload/template edits 
in the meantime
$stats->increment( 
'editstash.cache_hits.presumed_fresh' );
$logger->debug( "Edit check based cache hit for key 
'$key' (age: $age sec)." );
-   return $editInfo;
+   } else {
+   // User may have changed included content
+   $editInfo = false;
}
 
-   $stats->increment( 'editstash.cache_misses.proven_stale' );
-   $logger->info( "Stale cache for key '$key'; old key with 
outside edits. (age: $age sec)" );
+   if ( !$editInfo ) {
+   $stats->increment( 
'editstash.cache_misses.proven_stale' );
+   $logger->info( "Stale cache for key '$key'; old key 
with outside edits. (age: $age sec)" );
+   } elseif ( $editInfo->output->getFlag( 'vary-revision' ) ) {
+   // This can be used for the initial parse, e.g. for 
filters or doEditContent(),
+   // but a second parse will be triggered in 
doEditUpdates(). This is not optimal.
+   $logger->info( "Partially usable cache for key '$key' 
('$title') [vary_revision]." );
+   }
 
-   return false;
+   return $editInfo;
}
 
/**
@@ -318,8 +325,6 @@
$ttl = min( $parserOutput->getCacheExpiry() - $since, 
self::MAX_CACHE_TTL );
if ( $ttl <= 0 ) {
return [ null, 0, 'no_ttl' ];
-   } elseif ( $parserOutput->getFlag( 'vary-revision' ) ) {
-   return [ null, 0, 'vary_revision' ];
}
 
// Only store what is actually needed

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id63a0aace3c3b054f421dc1292f5c22608281309
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.28.0-wmf.6
Gerrit-Owner: Aaron Schulz 

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


[MediaWiki-commits] [Gerrit] Fix documentation of the dir parameter of list=watchlistraw ... - change (mediawiki/core)

2016-06-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Fix documentation of the dir parameter of list=watchlistraw API 
action
..


Fix documentation of the dir parameter of list=watchlistraw API action

Bug: T138213
Change-Id: I26709b03dd9b64c6f1231f3bfc3064c63c8f0c21
---
M includes/api/ApiQueryWatchlistRaw.php
M includes/api/i18n/en.json
M includes/api/i18n/qqq.json
3 files changed, 2 insertions(+), 1 deletion(-)

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



diff --git a/includes/api/ApiQueryWatchlistRaw.php 
b/includes/api/ApiQueryWatchlistRaw.php
index 742f8f5..64b97fe 100644
--- a/includes/api/ApiQueryWatchlistRaw.php
+++ b/includes/api/ApiQueryWatchlistRaw.php
@@ -193,7 +193,6 @@
'ascending',
'descending'
],
-   ApiBase::PARAM_HELP_MSG => 
'api-help-param-direction',
],
'fromtitle' => [
ApiBase::PARAM_TYPE => 'string'
diff --git a/includes/api/i18n/en.json b/includes/api/i18n/en.json
index cfd0c74..5124955 100644
--- a/includes/api/i18n/en.json
+++ b/includes/api/i18n/en.json
@@ -1291,6 +1291,7 @@
"apihelp-query+watchlistraw-param-show": "Only list items that meet 
these criteria.",
"apihelp-query+watchlistraw-param-owner": "Used along with $1token to 
access a different user's watchlist.",
"apihelp-query+watchlistraw-param-token": "A security token (available 
in the user's [[Special:Preferences#mw-prefsection-watchlist|preferences]]) to 
allow access to another user's watchlist.",
+   "apihelp-query+watchlistraw-param-dir": "The direction in which to 
list.",
"apihelp-query+watchlistraw-param-fromtitle": "Title (with namespace 
prefix) to begin enumerating from.",
"apihelp-query+watchlistraw-param-totitle": "Title (with namespace 
prefix) to stop enumerating at.",
"apihelp-query+watchlistraw-example-simple": "List pages on the current 
user's watchlist.",
diff --git a/includes/api/i18n/qqq.json b/includes/api/i18n/qqq.json
index 44769cf..ed9952f 100644
--- a/includes/api/i18n/qqq.json
+++ b/includes/api/i18n/qqq.json
@@ -1204,6 +1204,7 @@
"apihelp-query+watchlistraw-param-show": 
"{{doc-apihelp-param|query+watchlistraw|show}}",
"apihelp-query+watchlistraw-param-owner": 
"{{doc-apihelp-param|query+watchlistraw|owner}}",
"apihelp-query+watchlistraw-param-token": 
"{{doc-apihelp-param|query+watchlistraw|token}}",
+   "apihelp-query+watchlistraw-param-dir": 
"{{doc-apihelp-param|query+watchlistraw|dir}}",
"apihelp-query+watchlistraw-param-fromtitle": 
"{{doc-apihelp-param|query+watchlistraw|fromtitle}}",
"apihelp-query+watchlistraw-param-totitle": 
"{{doc-apihelp-param|query+watchlistraw|totitle}}",
"apihelp-query+watchlistraw-example-simple": 
"{{doc-apihelp-example|query+watchlistraw}}",

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I26709b03dd9b64c6f1231f3bfc3064c63c8f0c21
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: WMDE-leszek 
Gerrit-Reviewer: Anomie 
Gerrit-Reviewer: Siebrand 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Add 'ApiMakeParserOptions' hook - change (mediawiki/core)

2016-06-20 Thread Anomie (Code Review)
Anomie has uploaded a new change for review.

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

Change subject: Add 'ApiMakeParserOptions' hook
..

Add 'ApiMakeParserOptions' hook

This allows extensions (e.g. TemplateSandbox in I77a9aa5a) to better
interact with the ApiParse and ApiExpandTemplates modules.

Change-Id: I72d5cf8e0b86e4250af1459219dc3b42d7adbbb8
---
M RELEASE-NOTES-1.28
M docs/hooks.txt
M includes/api/ApiExpandTemplates.php
M includes/api/ApiParse.php
4 files changed, 30 insertions(+), 8 deletions(-)


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

diff --git a/RELEASE-NOTES-1.28 b/RELEASE-NOTES-1.28
index 360f6d5..6beeac9 100644
--- a/RELEASE-NOTES-1.28
+++ b/RELEASE-NOTES-1.28
@@ -20,6 +20,8 @@
 === New features in 1.28 ===
 * User::isBot() method for checking if an account is a bot role account.
 * Added a new hook, 'UserIsBot', to aid in determining if a user is a bot.
+* Added a new hook, 'ApiMakeParserOptions', to allow extensions to better
+  interact with API parsing.
 
 === External library changes in 1.28 ===
 
@@ -35,6 +37,8 @@
 === Action API changes in 1.28 ===
 
 === Action API internal changes in 1.28 ===
+* Added a new hook, 'ApiMakeParserOptions', to allow extensions to better
+  interact with ApiParse and ApiExpandTemplates.
 
 === Languages updated in 1.28 ===
 
diff --git a/docs/hooks.txt b/docs/hooks.txt
index 44f2551..39cae73 100644
--- a/docs/hooks.txt
+++ b/docs/hooks.txt
@@ -443,6 +443,15 @@
 $apiMain: Calling ApiMain instance.
 $e: Exception object.
 
+'ApiMakeParserOptions': Called from ApiParse and ApiExpandTemplates to allow
+extensions to adjust the ParserOptions before parsing.
+$options: ParserOptions object
+$title: Title to be parsed
+$params: Parameter array for the API module
+$module: API module (which is also a ContextSource)
+&$reset: Set to a ScopedCallback used to reset any hooks after the parse is 
done.
+&$suppressCache: Set true if cache should be suppressed.
+
 'ApiOpenSearchSuggest': Called when constructing the OpenSearch results. Hooks
 can alter or append to the array.
 &$results: array with integer keys to associative arrays. Keys in associative
diff --git a/includes/api/ApiExpandTemplates.php 
b/includes/api/ApiExpandTemplates.php
index 286fe88..48e7698 100644
--- a/includes/api/ApiExpandTemplates.php
+++ b/includes/api/ApiExpandTemplates.php
@@ -77,6 +77,11 @@
$options->setRemoveComments( false );
}
 
+   $reset = null;
+   $suppressCache = false;
+   Hooks::run( 'ApiMakeParserOptions',
+   [ $options, $title_obj, $params, $this, &$reset, 
&$suppressCache ] );
+
$retval = [];
 
if ( isset( $prop['parsetree'] ) || $params['generatexml'] ) {
diff --git a/includes/api/ApiParse.php b/includes/api/ApiParse.php
index fe418e3..f96acf3 100644
--- a/includes/api/ApiParse.php
+++ b/includes/api/ApiParse.php
@@ -109,13 +109,13 @@
$titleObj = $rev->getTitle();
$wgTitle = $titleObj;
$pageObj = WikiPage::factory( $titleObj );
-   $popts = $this->makeParserOptions( $pageObj, 
$params );
+   list( $popts, $reset, $suppressCache ) = 
$this->makeParserOptions( $pageObj, $params );
 
// If for some reason the "oldid" is actually 
the current revision, it may be cached
// Deliberately comparing $pageObj->getLatest() 
with $rev->getId(), rather than
// checking $rev->isCurrent(), because $pageObj 
is what actually ends up being used,
// and if its ->getLatest() is outdated, 
$rev->isCurrent() won't tell us that.
-   if ( $rev->getId() == $pageObj->getLatest() ) {
+   if ( !$suppressCache && $rev->getId() == 
$pageObj->getLatest() ) {
// May get from/save to parser cache
$p_result = $this->getParsedContent( 
$pageObj, $popts,
$pageid, isset( 
$prop['wikitext'] ) );
@@ -167,12 +167,12 @@
$oldid = $pageObj->getLatest();
}
 
-   $popts = $this->makeParserOptions( $pageObj, 
$params );
+   list( $popts, $reset, $suppressCache ) = 
$this->makeParserOptions( $pageObj, $params );
 
// Don't pollute the parser cache when setting 
options that aren't
// in ParserOptions::optionsHash()
/// @todo: This should be handled closer to the 
actual cache instead of here, see T110269

[MediaWiki-commits] [Gerrit] Add API support - change (mediawiki...TemplateSandbox)

2016-06-20 Thread Anomie (Code Review)
Anomie has uploaded a new change for review.

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

Change subject: Add API support
..

Add API support

This doesn't add an API module of its own, instead it integrates into
the existing ApiParse and ApiExpandTemplates modules.

This also refactors the logic for actually doing the sandboxing into a
separate class.

Bug: T65523
Change-Id: I77a9aa5ac30cd954b380e1bfd3e60a353d26b32f
Depends-On: I72d5cf8e0b86e4250af1459219dc3b42d7adbbb8
---
M SpecialTemplateSandbox.php
M TemplateSandbox.hooks.php
A TemplateSandboxLogic.php
M extension.json
M i18n/en.json
M i18n/qqq.json
6 files changed, 284 insertions(+), 121 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TemplateSandbox 
refs/changes/57/295257/1

diff --git a/SpecialTemplateSandbox.php b/SpecialTemplateSandbox.php
index 20c0b4e..06ac2c3 100644
--- a/SpecialTemplateSandbox.php
+++ b/SpecialTemplateSandbox.php
@@ -1,7 +1,6 @@
 prefixes;
-   $inHook = false;
-   $wgHooks['TitleExists']['TemplateSandbox'] =
-   function ( $title, &$exists ) use ( $prefixes, &$inHook 
) {
-   if ( $exists || $inHook ) {
-   return;
-   }
-   $inHook = true;
-   foreach ( $prefixes as $prefix ) {
-   $newtitle = Title::newFromText(
-   $prefix . '/' . 
$title->getFullText() );
-   if ( $newtitle instanceof Title && 
$newtitle->exists() ) {
-   $exists = true;
-   break;
-   }
-   }
-   $inHook = false;
-   };
-   LinkCache::singleton()->clear();
-   return new ScopedCallback( function () {
-   global $wgHooks;
-   unset( $wgHooks['TitleExists']['TemplateSandbox'] );
-   LinkCache::singleton()->clear();
-   } );
}
 
function execute( $par ) {
@@ -232,29 +200,11 @@
$popts = $page->makeParserOptions( $this->getContext() );
$popts->setIsPreview( true );
$popts->setIsSectionPreview( false );
-   $fakePageExistsScopedCallback = $this->fakePageExists();
-   $this->oldCurrentRevisionCallback = 
$popts->setCurrentRevisionCallback(
-   array( $this, 'currentRevisionCallback' ) );
+   $logic = new TemplateSandboxLogic( $this->prefixes, null, null 
);
+   $reset = $logic->setupForParse( $popts );
$this->title = $title;
$this->output = $content->getParserOutput( $title, 
$rev->getId(), $popts );
 
return Status::newGood();
-   }
-
-   /**
-* @param Title $title
-* @param Parser|bool $parser
-* @return Revision
-*/
-   function currentRevisionCallback( $title, $parser = false ) {
-   $found = false;
-   foreach ( $this->prefixes as $prefix ) {
-   $newtitle = Title::newFromText( $prefix . '/' . 
$title->getFullText() );
-   if ( $newtitle instanceof Title && $newtitle->exists() 
) {
-   $title = $newtitle;
-   break;
-   }
-   }
-   return call_user_func( $this->oldCurrentRevisionCallback, 
$title, $parser );
}
 }
diff --git a/TemplateSandbox.hooks.php b/TemplateSandbox.hooks.php
index 4fb8873..1f73288 100644
--- a/TemplateSandbox.hooks.php
+++ b/TemplateSandbox.hooks.php
@@ -1,17 +1,5 @@
 \n"
. wfMessage( $msg )->parseAsBlock()
. "\n";
-   }
-
-   /**
-* @param Title $templatetitle
-* @return ScopedCallback to clean up
-*/
-   private static function fakePageExists( $templatetitle ) {
-   global $wgHooks;
-   $wgHooks['TitleExists']['TemplateSandbox'] =
-   function ( $title, &$exists ) use ( $templatetitle ) {
-   if ( $templatetitle->equals( $title ) ) {
-   $exists = true;
-   }
-   };
-   LinkCache::singleton()->clearBadLink( 
$templatetitle->getPrefixedDBkey() );
-   return new ScopedCallback( function () use ( $templatetitle ) {
-   global $wgHooks;
-   unset( $wgHooks['TitleExists']['TemplateSandbox'] );
-   LinkCache::singleton()->clearLink( 

[MediaWiki-commits] [Gerrit] contint: do not backup Jenkins build history - change (operations/puppet)

2016-06-20 Thread Hashar (Code Review)
Hashar has uploaded a new change for review.

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

Change subject: contint: do not backup Jenkins build history
..

contint: do not backup Jenkins build history

There is roughly 165 GBytes of build history and artifacts saved on the
Jenkins master.  They are rotated after 15/30 days.  We can afford to
loose them hence instruct Bacula to exclude /var/lib/jenkins/builds

This change can be merge, the backup is not enabled yet and will be via:
https://gerrit.wikimedia.org/r/#/c/293690/

We will also need to change Jenkins configuration to have it save its
build to /builds/ instead of under each job area.

Bug: T80385
Change-Id: Id371f7333c99d80d07d881931a117d6170808dd7
---
M modules/role/manifests/backup/director.pp
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/55/295255/1

diff --git a/modules/role/manifests/backup/director.pp 
b/modules/role/manifests/backup/director.pp
index bcb8c1d..49a445d 100644
--- a/modules/role/manifests/backup/director.pp
+++ b/modules/role/manifests/backup/director.pp
@@ -208,7 +208,7 @@
 }
 bacula::director::fileset { 'contint':
 includes => [ '/srv', '/var/lib/zuul', '/var/lib/jenkins' ],
-excludes => [ '/srv/ssd', ],
+excludes => [ '/srv/ssd', '/var/lib/jenkins/builds', ],
 }
 
 # The console should be on the director

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

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

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


[MediaWiki-commits] [Gerrit] Make a real link so users can open it in a new tab... - change (mediawiki...Kartographer)

2016-06-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Make  a real link so users can open it in a new 
tab/window.
..


Make  a real link so users can open it in
a new tab/window.

Bug: T137910
Change-Id: I48f60846107f1a313cab509e7fc73910a88f62cd
---
M modules/kartographer.MapDialog.js
M modules/kartographer.js
M styles/kartographer.less
3 files changed, 77 insertions(+), 28 deletions(-)

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



diff --git a/modules/kartographer.MapDialog.js 
b/modules/kartographer.MapDialog.js
index 798f144..2bb774c 100644
--- a/modules/kartographer.MapDialog.js
+++ b/modules/kartographer.MapDialog.js
@@ -53,8 +53,8 @@
 
// Check whether it is the same map.
if ( existing &&
-   typeof existing.articleMapId === 'number' &&
-   existing.articleMapId === mapData.articleMapId ) {
+   typeof existing.maptagId === 'number' &&
+   existing.maptagId === mapData.maptagId ) {
 
fullScreenState = mapData.fullScreenState;
extendedData = {};
@@ -149,7 +149,7 @@
this.map.setView( new L.LatLng( 
extendedData.latitude, extendedData.longitude ), extendedData.zoom, true );
}
 
-   if ( typeof mapData.articleMapId === 'number' ) {
+   if ( typeof mapData.maptagId === 'number' ) {
this.map.on( 'moveend', this.onMapMove, this );
}
 
diff --git a/modules/kartographer.js b/modules/kartographer.js
index 206ca96..371791a 100644
--- a/modules/kartographer.js
+++ b/modules/kartographer.js
@@ -42,6 +42,13 @@
 */
mw.kartographer.maps = [];
 
+   /**
+* References the maplinks of the page.
+*
+* @type {HTMLElement[]}
+*/
+   mw.kartographer.maplinks = [];
+
mw.kartographer.FullScreenControl = L.Control.extend( {
options: {
// Do not switch for RTL because zoom also stays in 
place
@@ -280,8 +287,8 @@
if ( mapData instanceof L.Map ) {
map = mapData;
mapData = getMapData( $( 
map.getContainer() ).closest( '.mw-kartographer-interactive' ) );
-   } else if ( $.type( mapData.articleMapId ) === 
'number' ) {
-   map = mw.kartographer.maps[ 
mapData.articleMapId ];
+   } else if ( mapData && mapData.isMapframe ) {
+   map = mw.kartographer.maps[ 
mapData.maptagId ];
}
 
$.extend( dialogData, mapData, {
@@ -312,7 +319,7 @@
 
/**
 * Formats the full screen route of the map, such as:
-*   `/map/:articleMapId(/:zoom/:longitude/:latitude)`
+*   `/map/:maptagId(/:zoom/:longitude/:latitude)`
 *
 * The hash will contain the portion between parenthesis if and only if
 * one of these 3 values differs from the initial setting.
@@ -323,10 +330,13 @@
 * @return {string} The route to open the map in full screen mode.
 */
mw.kartographer.getMapHash = function ( data, map ) {
-   var hash = '/map/' + data.articleMapId,
+
+   var hash = '/' + ( data.isMapframe ? 'map' : 'maplink' ),
mapPosition,
newHash,
initialHash = getScaleCoords( data.zoom, data.latitude, 
data.longitude ).join( '/' );
+
+   hash += '/' + data.maptagId;
 
if ( map ) {
mapPosition = getMapPosition( map );
@@ -388,24 +398,49 @@
 */
function getMapData( element ) {
var $el = $( element ),
-   articleMapId = null;
+   maptagId = null;
// Prevent users from adding map divs directly via wikitext
if ( $el.attr( 'mw-data' ) !== 'interface' ) {
return null;
}
 
-   if ( $.type( $el.data( 'article-map-id' ) ) !== 'undefined' ) {
-   articleMapId = +$el.data( 'article-map-id' );
+   if ( $.type( $el.data( 'maptag-id' ) ) !== 'undefined' ) {
+   maptagId = +$el.data( 'maptag-id' );
}
 
return {
-   articleMapId: articleMapId,
+   isMapframe: $el.hasClass( 'mw-kartographer-interactive' 
),
+   maptagId: maptagId,
latitude: +$el.data( 'lat' ),
longitude: +$el.data( 'lon' ),
zoom: +$el.data( 'zoom' ),
style: 

[MediaWiki-commits] [Gerrit] Rephrase 'upload-foreign-cant-load-config' for clarity - change (mediawiki/core)

2016-06-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Rephrase 'upload-foreign-cant-load-config' for clarity
..


Rephrase 'upload-foreign-cant-load-config' for clarity

Bug: T137670
Change-Id: I105b9dd570745053c82f43d95c4b427788adacce
---
M languages/i18n/en.json
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/languages/i18n/en.json b/languages/i18n/en.json
index 0d7d047..600f67d 100644
--- a/languages/i18n/en.json
+++ b/languages/i18n/en.json
@@ -1513,7 +1513,7 @@
"upload-http-error": "An HTTP error occurred: $1",
"upload-copy-upload-invalid-domain": "Copy uploads are not available 
from this domain.",
"upload-foreign-cant-upload": "This wiki is not configured to upload 
files to the requested foreign file repository.",
-   "upload-foreign-cant-load-config": "Loading file upload configuration 
for the foreign file repository failed.",
+   "upload-foreign-cant-load-config": "Failed to load the configuration 
for file uploads to the foreign file repository.",
"upload-dialog-disabled": "File uploads using this dialog are disabled 
on this wiki.",
"upload-dialog-title": "Upload file",
"upload-dialog-button-cancel": "Cancel",

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

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

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


[MediaWiki-commits] [Gerrit] Pool db1071 with low weight after maintenance - change (operations/mediawiki-config)

2016-06-20 Thread Jcrespo (Code Review)
Jcrespo has submitted this change and it was merged.

Change subject: Pool db1071 with low weight after maintenance
..


Pool db1071 with low weight after maintenance

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

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



diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php
index cd1e511..c2de140 100644
--- a/wmf-config/db-eqiad.php
+++ b/wmf-config/db-eqiad.php
@@ -140,7 +140,7 @@
'db1026' => 0,   # 1.4TB  64GB, watchlist, recentchanges, 
contributions, logpager
'db1045' => 0,   # 1.4TB  64GB, vslow, dump
'db1070' => 200, # 2.8TB 160GB, api, old master
-#  'db1071' => 300, # 2.8TB 160GB, depooled for maintenance
+   'db1071' => 50,  # 2.8TB 160GB, low weight after repool
'db1082' => 300, # 3.6TB 512GB
'db1087' => 300, # 3.6TB 512GB
'db1092' => 300, # 3.6TB 512GB

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib41463b2c6562f38fa2310d252e9becc35220041
Gerrit-PatchSet: 3
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Jcrespo 
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: Jcrespo 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Provide page text and edit summary when filtering file uploads - change (mediawiki...AbuseFilter)

2016-06-20 Thread Code Review
Bartosz Dziewoński has uploaded a new change for review.

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

Change subject: Provide page text and edit summary when filtering file uploads
..

Provide page text and edit summary when filtering file uploads

This allows filters using `action='upload'` to use the variables
`summary`, `new_wikitext` and several others that previously were only
provided when editing pages (`action='edit'`).

This is achieved using the new UploadVerifyUpload hook, introduced in
MediaWiki core in change Ie68801b307de8456e1753ba54a29c34c8063bc36.

`action='upload'` is now only used when publishing an upload, and not
for uploads to stash. A new `action='stashupload'` is introduced,
which is used for all uploads, including uploads to stash. This
behaves like `action='upload'` used to, and only provides file
metadata variables.

Filter authors should use `action='stashupload'` when a file can be
checked based only on the file contents, and `action='upload'` only
when the wikitext edit needs to be examined too.

Bug: T87381
Bug: T89252
Change-Id: I9654f82ecda82e4917fd0ac6b364b947a1434c73
---
M AbuseFilter.hooks.php
M extension.json
2 files changed, 84 insertions(+), 19 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/AbuseFilter 
refs/changes/54/295254/1

diff --git a/AbuseFilter.hooks.php b/AbuseFilter.hooks.php
index b8cf7dc..0d98a75 100644
--- a/AbuseFilter.hooks.php
+++ b/AbuseFilter.hooks.php
@@ -689,32 +689,65 @@
}
 
/**
-* Handler for the UploadVerifyFile hook
-*
-* @param $upload UploadBase
-* @param $mime
-* @param $error array
-*
+* @param UploadBase $upload
+* @param User $user
+* @param array $props
+* @param string $comment
+* @param string $pageText
+* @param array &$error
+* @return bool
+*/
+   public static function onUploadVerifyUpload( UploadBase $upload, User 
$user,
+   array $props, $comment, $pageText, &$error
+   ) {
+   return self::filterUpload( 'upload', $upload, $user, $props, 
$comment, $pageText, $error );
+   }
+
+   /**
+* @param UploadBase $upload
+* @param string $mime
+* @param array &$error
 * @return bool
 */
public static function onUploadVerifyFile( $upload, $mime, &$error ) {
-   global $wgUser;
+   global $wgUser, $wgVersion;
 
-   $vars = new AbuseFilterVariableHolder;
+   // On MW 1.27 and older, this is the only hook we can use, even 
though it's deficient.
+   // On MW 1.28 and newer, we use UploadVerifyUpload to check 
file uploads, and this one only
+   // to check file uploads to stash. If a filter doesn't need to 
check the page contents or
+   // upload comment, it can use `action='stashupload'` to provide 
better experience to e.g.
+   // UploadWizard (rejecting files immediately, rather than after 
the user adds the details).
+   $action = version_compare( $wgVersion, '1.28', '<' ) ? 'upload' 
: 'stashupload';
+
+   // UploadBase makes it absolutely impossible to get these out 
of it, even though it knows them.
+   $props = FSFile::getPropsFromPath( $upload->getTempPath() );
+
+   return self::filterUpload( $action, $upload, $wgUser, $props, 
null, null, $error );
+   }
+
+   /**
+* Implementation for UploadVerifyFile and UploadVerifyUpload hooks.
+*
+* @param string $action 'upload' or 'stashupload'
+* @param UploadBase $upload
+* @param User $user User performing the action
+* @param array $props File properties, as returned by 
FSFile::getPropsFromPath()
+* @param string|null $summary Upload log comment (also used as edit 
summary)
+* @param string|null $text File description page text (only used for 
new uploads)
+* @param array &$error
+* @return bool
+*/
+   public static function filterUpload( $action, UploadBase $upload, User 
$user,
+   array $props, $summary, $text, &$error
+   ) {
$title = $upload->getTitle();
 
-   if ( !$title ) {
-   // If there's no valid title assigned to the upload
-   // it wont proceed anyway, so no point in filtering it.
-   return true;
-   }
-
+   $vars = new AbuseFilterVariableHolder;
$vars->addHolders(
-   AbuseFilter::generateUserVars( $wgUser ),
+   AbuseFilter::generateUserVars( $user ),
AbuseFilter::generateTitleVars( $title, 'ARTICLE' )
);
-
-   $vars->setVar( 'ACTION', 'upload' );
+   $vars->setVar( 

[MediaWiki-commits] [Gerrit] Minor code quality tweaks - change (mediawiki...AbuseFilter)

2016-06-20 Thread Code Review
Bartosz Dziewoński has uploaded a new change for review.

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

Change subject: Minor code quality tweaks
..

Minor code quality tweaks

Change-Id: If34e763e7cc82917c8611ec638972d20f559a601
---
M AbuseFilter.hooks.php
1 file changed, 4 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/AbuseFilter 
refs/changes/53/295253/1

diff --git a/AbuseFilter.hooks.php b/AbuseFilter.hooks.php
index 466a254..b8cf7dc 100644
--- a/AbuseFilter.hooks.php
+++ b/AbuseFilter.hooks.php
@@ -167,16 +167,14 @@
 * @return array API result
 */
public static function getEditApiResult( Status $status ) {
-   $msg = $status->getErrorsArray();
-   $msg = $msg[0];
+   $msg = $status->getErrorsArray()[0];
 
// Use the error message key name as error code, the first 
parameter is the filter description.
if ( $msg instanceof Message ) {
// For forward compatibility: In case we switch over 
towards using Message objects someday.
// (see the todo for AbuseFilter::buildStatus)
$code = $msg->getKey();
-   $filterDescription = $msg->getParams();
-   $filterDescription = $filterDescription[0];
+   $filterDescription = $msg->getParams()[0];
$warning = $msg->parse();
} else {
$code = array_shift( $msg );
@@ -590,7 +588,7 @@

"$dir/db_patches/patch-afl-namespace_int.sql", true
) );
} else {
-   /**
+   /*
$updater->addExtensionUpdate( array(
 'modifyField',
 'abuse_filter_log',
@@ -736,8 +734,7 @@
$filter_result = AbuseFilter::filterAction( $vars, $title );
 
if ( !$filter_result->isOK() ) {
-   $error = $filter_result->getErrorsArray();
-   $error = $error[0];
+   $error = $filter_result->getErrorsArray()[0];
}
 
return $filter_result->isOK();

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If34e763e7cc82917c8611ec638972d20f559a601
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/AbuseFilter
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] Introduce new hook UploadVerifyUpload to allow preventing fi... - change (mediawiki/core)

2016-06-20 Thread Code Review
Bartosz Dziewoński has uploaded a new change for review.

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

Change subject: Introduce new hook UploadVerifyUpload to allow preventing file 
uploads
..

Introduce new hook UploadVerifyUpload to allow preventing file uploads

Unlike the existing UploadVerifyFile hook, the new one provides the
information about the file description page being created, and the
user who is performing the upload. It also does not run for uploads
to stash.

Bug: T89302
Change-Id: Ie68801b307de8456e1753ba54a29c34c8063bc36
---
M docs/hooks.txt
M includes/upload/UploadBase.php
2 files changed, 20 insertions(+), 1 deletion(-)


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

diff --git a/docs/hooks.txt b/docs/hooks.txt
index 1d11893..6094d1a 100644
--- a/docs/hooks.txt
+++ b/docs/hooks.txt
@@ -3285,6 +3285,18 @@
   representing the problem with the file, where the first element is the 
message
   key and the remaining elements are used as parameters to the message.
 
+'UploadVerifyUpload': Upload verification, based on both file properties like
+MIME type (same as UploadVerifyFile) and the information entered by the user
+(upload comment, file page contents etc.).
+$upload: (object) An instance of UploadBase, with all info about the upload
+$user: (object) An instance of User, the user uploading this file
+$props: (array) File properties, as returned by FSFile::getPropsFromPath()
+$comment: (string) Upload log comment (also used as edit summary)
+$pageText: (string) File description page text (only used for new uploads)
+&$error: output: If the file upload should be prevented, set this to an array
+  representing the problem with the file, where the first element is the 
message
+  key and the remaining elements are used as parameters to the message.
+
 'UserIsBot': when determining whether a user is a bot account
 $user: the user
 &$isBot: whether this is user a bot or not (boolean)
diff --git a/includes/upload/UploadBase.php b/includes/upload/UploadBase.php
index ba5171f..bae59be 100644
--- a/includes/upload/UploadBase.php
+++ b/includes/upload/UploadBase.php
@@ -717,13 +717,20 @@
 */
public function performUpload( $comment, $pageText, $watch, $user, 
$tags = [] ) {
$this->getLocalFile()->load( File::READ_LATEST );
+   $props = $this->mFileProps;
+
+   $error = null;
+   Hooks::run( 'UploadVerifyUpload', [ $this, $user, $props, 
$comment, $pageText, &$error ] );
+   if ( $error ) {
+   return call_user_func_array( 'Status::newFatal', $error 
);
+   }
 
$status = $this->getLocalFile()->upload(
$this->mTempPath,
$comment,
$pageText,
File::DELETE_SOURCE,
-   $this->mFileProps,
+   $props,
false,
$user,
$tags

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie68801b307de8456e1753ba54a29c34c8063bc36
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] Minor bug fix - change (wikimedia...golden)

2016-06-20 Thread Bearloga (Code Review)
Bearloga has submitted this change and it was merged.

Change subject: Minor bug fix
..


Minor bug fix

Change-Id: I98394abdd28329ec64928a762d09b129bc4d8f94
---
M search/dwelltime.R
1 file changed, 2 insertions(+), 1 deletion(-)

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



diff --git a/search/dwelltime.R b/search/dwelltime.R
index 63f8fb8..8385e11 100644
--- a/search/dwelltime.R
+++ b/search/dwelltime.R
@@ -15,7 +15,8 @@
conditionals = "event_action 
IN('searchResultPage','visitPage', 'checkin', 'click')
AND (event_subTest IS NULL OR 
event_subTest IN ('null','baseline'))
AND event_source = 'fulltext'")
-  data <- data[duplicated(data$event_id, fromLast = FALSE), ]; data$event_id 
<- NULL
+  data <- data[order(data$timestamp, decreasing = FALSE), ]
+  data <- data[!duplicated(data$event_id, fromLast = FALSE), ]; data$event_id 
<- NULL
   data$timestamp <- lubridate::ymd_hms(data$timestamp)
   data$action_id <- ifelse(data$action == "searchResultPage", 0, 1)
   

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I98394abdd28329ec64928a762d09b129bc4d8f94
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/discovery/golden
Gerrit-Branch: master
Gerrit-Owner: Bearloga 
Gerrit-Reviewer: Bearloga 

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


[MediaWiki-commits] [Gerrit] Minor bug fix - change (wikimedia...golden)

2016-06-20 Thread Bearloga (Code Review)
Bearloga has uploaded a new change for review.

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

Change subject: Minor bug fix
..

Minor bug fix

Change-Id: I98394abdd28329ec64928a762d09b129bc4d8f94
---
M search/dwelltime.R
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/discovery/golden 
refs/changes/51/295251/1

diff --git a/search/dwelltime.R b/search/dwelltime.R
index 63f8fb8..8385e11 100644
--- a/search/dwelltime.R
+++ b/search/dwelltime.R
@@ -15,7 +15,8 @@
conditionals = "event_action 
IN('searchResultPage','visitPage', 'checkin', 'click')
AND (event_subTest IS NULL OR 
event_subTest IN ('null','baseline'))
AND event_source = 'fulltext'")
-  data <- data[duplicated(data$event_id, fromLast = FALSE), ]; data$event_id 
<- NULL
+  data <- data[order(data$timestamp, decreasing = FALSE), ]
+  data <- data[!duplicated(data$event_id, fromLast = FALSE), ]; data$event_id 
<- NULL
   data$timestamp <- lubridate::ymd_hms(data$timestamp)
   data$action_id <- ifelse(data$action == "searchResultPage", 0, 1)
   

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

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

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


[MediaWiki-commits] [Gerrit] Add event de-duplication + remove previous portal "deduplica... - change (wikimedia...golden)

2016-06-20 Thread Bearloga (Code Review)
Bearloga has submitted this change and it was merged.

Change subject: Add event de-duplication + remove previous portal 
"deduplication"
..


Add event de-duplication
+ remove previous portal "deduplication"

Change-Id: I69bff8e376ade39edfcaf1e8d75958e0bc5f045c
---
M portal/portal.R
M search/dwelltime.R
2 files changed, 3 insertions(+), 2 deletions(-)

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



diff --git a/portal/portal.R b/portal/portal.R
index fd1857b..2e0f3b5 100644
--- a/portal/portal.R
+++ b/portal/portal.R
@@ -41,7 +41,6 @@
   
   # Generate click breakdown
   data <- data[order(data$type, decreasing = FALSE),]
-  data <- data[!duplicated(data$session),]
   breakdown_data <- data[,j=list(events=.N),by = c("date","section_used")]
   
   # Generate by-country breakdown
diff --git a/search/dwelltime.R b/search/dwelltime.R
index f8444fa..63f8fb8 100644
--- a/search/dwelltime.R
+++ b/search/dwelltime.R
@@ -5,6 +5,7 @@
   
   # Retrieve data
   data <- wmf::build_query(fields = "SELECT timestamp,
+ event_uniqueId AS event_id,
  event_searchSessionId AS session_id,
  event_pageViewId AS page_id,
  event_action AS action,
@@ -12,8 +13,9 @@
date = date,
table = table,
conditionals = "event_action 
IN('searchResultPage','visitPage', 'checkin', 'click')
-   AND event_subTest IS NULL
+   AND (event_subTest IS NULL OR 
event_subTest IN ('null','baseline'))
AND event_source = 'fulltext'")
+  data <- data[duplicated(data$event_id, fromLast = FALSE), ]; data$event_id 
<- NULL
   data$timestamp <- lubridate::ymd_hms(data$timestamp)
   data$action_id <- ifelse(data$action == "searchResultPage", 0, 1)
   

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I69bff8e376ade39edfcaf1e8d75958e0bc5f045c
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/discovery/golden
Gerrit-Branch: master
Gerrit-Owner: Bearloga 
Gerrit-Reviewer: Bearloga 

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


[MediaWiki-commits] [Gerrit] Add event de-duplication + remove previous portal "deduplica... - change (wikimedia...golden)

2016-06-20 Thread Bearloga (Code Review)
Bearloga has uploaded a new change for review.

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

Change subject: Add event de-duplication + remove previous portal 
"deduplication"
..

Add event de-duplication
+ remove previous portal "deduplication"

Change-Id: I69bff8e376ade39edfcaf1e8d75958e0bc5f045c
---
M portal/portal.R
M search/dwelltime.R
2 files changed, 3 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/discovery/golden 
refs/changes/50/295250/1

diff --git a/portal/portal.R b/portal/portal.R
index fd1857b..2e0f3b5 100644
--- a/portal/portal.R
+++ b/portal/portal.R
@@ -41,7 +41,6 @@
   
   # Generate click breakdown
   data <- data[order(data$type, decreasing = FALSE),]
-  data <- data[!duplicated(data$session),]
   breakdown_data <- data[,j=list(events=.N),by = c("date","section_used")]
   
   # Generate by-country breakdown
diff --git a/search/dwelltime.R b/search/dwelltime.R
index f8444fa..63f8fb8 100644
--- a/search/dwelltime.R
+++ b/search/dwelltime.R
@@ -5,6 +5,7 @@
   
   # Retrieve data
   data <- wmf::build_query(fields = "SELECT timestamp,
+ event_uniqueId AS event_id,
  event_searchSessionId AS session_id,
  event_pageViewId AS page_id,
  event_action AS action,
@@ -12,8 +13,9 @@
date = date,
table = table,
conditionals = "event_action 
IN('searchResultPage','visitPage', 'checkin', 'click')
-   AND event_subTest IS NULL
+   AND (event_subTest IS NULL OR 
event_subTest IN ('null','baseline'))
AND event_source = 'fulltext'")
+  data <- data[duplicated(data$event_id, fromLast = FALSE), ]; data$event_id 
<- NULL
   data$timestamp <- lubridate::ymd_hms(data$timestamp)
   data$action_id <- ifelse(data$action == "searchResultPage", 0, 1)
   

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

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

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


[MediaWiki-commits] [Gerrit] Enable wikibase descriptions for beta, even if disabled for ... - change (mediawiki...MobileFrontend)

2016-06-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Enable wikibase descriptions for beta, even if disabled for 
production
..


Enable wikibase descriptions for beta, even if disabled for production

* To be removed upon enabling in production
* Also fix a minor hygiene problem

Bug: T127250
Change-Id: Ic6324788c6e04eeb9b65d63eff042d7755f759d9
---
M includes/MobileFrontend.hooks.php
M includes/skins/SkinMinerva.php
2 files changed, 4 insertions(+), 3 deletions(-)

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



diff --git a/includes/MobileFrontend.hooks.php 
b/includes/MobileFrontend.hooks.php
index 9c1b09c..8883d52 100644
--- a/includes/MobileFrontend.hooks.php
+++ b/includes/MobileFrontend.hooks.php
@@ -1266,7 +1266,8 @@
$outputPage->enableTOC( false );
$outputPage->setProperty( 'MFTOC', $po->getTOCHTML() 
!== '' );
 
-   if ( $mfUseWikibaseDescription ) {
+   // FIXME: Remove beta check once enabled in production
+   if ( $mfUseWikibaseDescription || 
$context->isBetaGroupMember() ) {
$item = $po->getProperty( 'wikibase_item' );
if ( $item ) {
$desc = 
ExtMobileFrontend::getWikibaseDescription( $item );
diff --git a/includes/skins/SkinMinerva.php b/includes/skins/SkinMinerva.php
index 1e2e044..3c6ed58 100644
--- a/includes/skins/SkinMinerva.php
+++ b/includes/skins/SkinMinerva.php
@@ -957,8 +957,8 @@
$vars = [
'wgMinervaMenuData' => $this->getMenuData(),
// Expose for skins.minerva.tablet.scripts
-   'wgMinervaTocEnabled' => 
$this->getOutput()->getProperty( 'MFTOC' ),
-   'wgMFDescription' => $this->getOutput()->getProperty( 
'wgMFDescription' ),
+   'wgMinervaTocEnabled' => $out->getProperty( 'MFTOC' ),
+   'wgMFDescription' => $out->getProperty( 
'wgMFDescription' ),
];
 
if ( $this->isAuthenticatedUser() ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic6324788c6e04eeb9b65d63eff042d7755f759d9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jhobs 
Gerrit-Reviewer: Phuedx 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] ncredir hostname and service IP - change (operations/dns)

2016-06-20 Thread BBlack (Code Review)
BBlack has uploaded a new change for review.

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

Change subject: ncredir hostname and service IP
..

ncredir hostname and service IP

Bug: T133548
Change-Id: I2c9d4310ef078b1f24ec6b219f872de2688a05cf
---
M templates/1.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa
M templates/154.80.208.in-addr.arpa
M templates/wikimedia.org
3 files changed, 5 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/dns 
refs/changes/49/295249/1

diff --git a/templates/1.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa 
b/templates/1.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa
index fab8bd5..e80eccb 100644
--- a/templates/1.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa
+++ b/templates/1.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa
@@ -221,6 +221,7 @@
 $ORIGIN 0.0.0.0.0.0.0.0.0.0.0.0.a.1.d.e.{{ zonename }}.
 
 1.0.0.0 1H IN PTR   text-lb.eqiad.wikimedia.org.
+7.0.0.0 1H IN PTR   ncredir.wikimedia.org.
 
 ; wrong subnet, but not important...
 e.0.0.0 1H IN PTR   ns0.wikimedia.org.
diff --git a/templates/154.80.208.in-addr.arpa 
b/templates/154.80.208.in-addr.arpa
index c72b993..2470529 100644
--- a/templates/154.80.208.in-addr.arpa
+++ b/templates/154.80.208.in-addr.arpa
@@ -168,6 +168,7 @@
 
 224 1H  IN PTR  text-lb.eqiad.wikimedia.org.
 225 1H  IN PTR  geoiplookup-lb.eqiad.wikimedia.org.
+226 1H  IN PTR  ncredir.wikimedia.org.
 
 ; - - 208.80.154.232/29 (232-239) LVS Mobile
 
diff --git a/templates/wikimedia.org b/templates/wikimedia.org
index 4ed90c9..9abecf4 100644
--- a/templates/wikimedia.org
+++ b/templates/wikimedia.org
@@ -252,6 +252,9 @@
 git-ssh 1H  IN A208.80.154.250
 1H  IN  2620:0:861:ed1a::3:16
 
+ncredir 600 IN A208.80.154.226
+600 IN  2620:0:861:ed1a::7
+
 ;;; ulsfo
 text-lb.ulsfo   600 IN DYNA geoip!text-addrs/ulsfo
 upload-lb.ulsfo 600 IN DYNA geoip!upload-addrs/ulsfo

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2c9d4310ef078b1f24ec6b219f872de2688a05cf
Gerrit-PatchSet: 1
Gerrit-Project: operations/dns
Gerrit-Branch: master
Gerrit-Owner: BBlack 

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


[MediaWiki-commits] [Gerrit] Fix LegacyHookPreAuthenticationProvider::testUserForCreation - change (mediawiki/core)

2016-06-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Fix LegacyHookPreAuthenticationProvider::testUserForCreation
..


Fix LegacyHookPreAuthenticationProvider::testUserForCreation

Simply testing shouldn't call AbortNewAccount, we only want to do that
when the account is actually being created.

Change-Id: Icb3d1ce63a2691aa232b4564ed88fee6d50d7ab7
---
M includes/auth/LegacyHookPreAuthenticationProvider.php
M tests/phpunit/includes/auth/LegacyHookPreAuthenticationProviderTest.php
2 files changed, 11 insertions(+), 74 deletions(-)

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



diff --git a/includes/auth/LegacyHookPreAuthenticationProvider.php 
b/includes/auth/LegacyHookPreAuthenticationProvider.php
index c98a184..cab6e32 100644
--- a/includes/auth/LegacyHookPreAuthenticationProvider.php
+++ b/includes/auth/LegacyHookPreAuthenticationProvider.php
@@ -106,27 +106,6 @@
$user, $user, LoginForm::ABORTED, 
$abortError, 'AbortAutoAccount'
);
}
-   } else {
-   $abortError = '';
-   $abortStatus = null;
-   if ( !\Hooks::run( 'AbortNewAccount', [ $user, 
&$abortError, &$abortStatus ] ) ) {
-   // Hook point to add extra creation throttles 
and blocks
-   $this->logger->debug( __METHOD__ . ': a hook 
blocked creation' );
-   if ( $abortStatus === null ) {
-   // Report back the old string as a raw 
message status.
-   // This will report the error back as 
'createaccount-hook-aborted'
-   // with the given string as the message.
-   // To return a different error code, 
return a StatusValue object.
-   $msg = wfMessage( 
'createaccount-hook-aborted' )->rawParams( $abortError );
-   return StatusValue::newFatal( $msg );
-   } else {
-   // For MediaWiki 1.23+ and updated 
hooks, return the Status object
-   // returned from the hook.
-   $ret = StatusValue::newGood();
-   $ret->merge( $abortStatus );
-   return $ret;
-   }
-   }
}
 
return StatusValue::newGood();
diff --git 
a/tests/phpunit/includes/auth/LegacyHookPreAuthenticationProviderTest.php 
b/tests/phpunit/includes/auth/LegacyHookPreAuthenticationProviderTest.php
index edee6fc..3548002 100644
--- a/tests/phpunit/includes/auth/LegacyHookPreAuthenticationProviderTest.php
+++ b/tests/phpunit/includes/auth/LegacyHookPreAuthenticationProviderTest.php
@@ -334,22 +334,23 @@
 * @param string|null $failMsg
 */
public function testTestUserForCreation( $error, $failMsg ) {
+   $testUser = self::getTestUser()->getUser();
+   $provider = $this->getProvider();
+   $options = [ 'flags' => \User::READ_LOCKING, 'creating' => true 
];
+
$this->hook( 'AbortNewAccount', $this->never() );
$this->hook( 'AbortAutoAccount', $this->once() )
-   ->will( $this->returnCallback( function ( $user, 
&$abortError ) use ( $error ) {
+   ->will( $this->returnCallback( function ( $user, 
&$abortError ) use ( $testUser, $error ) {
$this->assertInstanceOf( 'User', $user );
-   $this->assertSame( 'UTSysop', $user->getName() 
);
+   $this->assertSame( $testUser->getName(), 
$user->getName() );
$abortError = $error;
return $error === null;
} ) );
-
-   $status = $this->getProvider()->testUserForCreation(
-   \User::newFromName( 'UTSysop' ), 
AuthManager::AUTOCREATE_SOURCE_SESSION
+   $status = $provider->testUserForCreation(
+   $testUser, AuthManager::AUTOCREATE_SOURCE_SESSION, 
$options
);
-
$this->unhook( 'AbortNewAccount' );
$this->unhook( 'AbortAutoAccount' );
-
if ( $failMsg === null ) {
$this->assertEquals( \StatusValue::newGood(), $status, 
'should succeed' );
} else {
@@ -360,54 +361,11 @@
}
 
$this->hook( 'AbortAutoAccount', $this->never() );
-   $this->hook( 'AbortNewAccount', $this->once() )
-   

[MediaWiki-commits] [Gerrit] Add $options parameter for testUserForCreation() - change (mediawiki...AntiSpoof)

2016-06-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Add $options parameter for testUserForCreation()
..


Add $options parameter for testUserForCreation()

And use it to skip the check when it indicates testForAccountCreation()
is going to be called for a more thorough check.

Change-Id: I4af8b3b692f60c42f8685b90be5936da7ba4e2e2
---
M AntiSpoofPreAuthenticationProvider.php
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/AntiSpoofPreAuthenticationProvider.php 
b/AntiSpoofPreAuthenticationProvider.php
index f61de77..ede77ae 100644
--- a/AntiSpoofPreAuthenticationProvider.php
+++ b/AntiSpoofPreAuthenticationProvider.php
@@ -94,12 +94,12 @@
return StatusValue::newGood();
}
 
-   public function testUserForCreation( $user, $autocreate ) {
+   public function testUserForCreation( $user, $autocreate, array $options 
= [] ) {
$sv = StatusValue::newGood();
 
// For "cancreate" checks via the API, test if the current user 
could
// create the username.
-   if ( $this->antiSpoofAccounts && !$autocreate &&
+   if ( $this->antiSpoofAccounts && !$autocreate && empty( 
$options['creating'] ) &&
!RequestContext::getMain()->getUser()->isAllowed( 
'override-antispoof' )
) {
$sv->merge( $this->testUserInternal( $user, false, new 
NullLogger ) );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4af8b3b692f60c42f8685b90be5936da7ba4e2e2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/AntiSpoof
Gerrit-Branch: master
Gerrit-Owner: Anomie 
Gerrit-Reviewer: Gergő Tisza 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Add $options parameter for testUserForCreation() - change (mediawiki/core)

2016-06-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Add $options parameter for testUserForCreation()
..


Add $options parameter for testUserForCreation()

This will allow providers to know whether the call is just for testing
(from ApiQueryUsers) or for actual creation, and skip duplicate work
when testForAccountCreation() is going to be called.

Change-Id: Id3ef713fd377135d78f66e5100dedd4689293b59
Depends-On: I4af8b3b692f60c42f8685b90be5936da7ba4e2e2
Depends-On: Ie9639a15d04b387be0e72754301eb6d91cd8adc2
Depends-On: I063cbdfbd9a223bf2391fce2b714ab82ddd3272f
Depends-On: I7c67512634f6e72251911238f083857da9fd3f84
---
M includes/auth/AbstractPreAuthenticationProvider.php
M includes/auth/AbstractPrimaryAuthenticationProvider.php
M includes/auth/AbstractSecondaryAuthenticationProvider.php
M includes/auth/AuthManager.php
M includes/auth/CheckBlocksSecondaryAuthenticationProvider.php
M includes/auth/LegacyHookPreAuthenticationProvider.php
M includes/auth/PreAuthenticationProvider.php
M includes/auth/PrimaryAuthenticationProvider.php
M includes/auth/SecondaryAuthenticationProvider.php
9 files changed, 55 insertions(+), 13 deletions(-)

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



diff --git a/includes/auth/AbstractPreAuthenticationProvider.php 
b/includes/auth/AbstractPreAuthenticationProvider.php
index 48a9c88..d997dbb 100644
--- a/includes/auth/AbstractPreAuthenticationProvider.php
+++ b/includes/auth/AbstractPreAuthenticationProvider.php
@@ -45,7 +45,7 @@
return \StatusValue::newGood();
}
 
-   public function testUserForCreation( $user, $autocreate ) {
+   public function testUserForCreation( $user, $autocreate, array $options 
= [] ) {
return \StatusValue::newGood();
}
 
diff --git a/includes/auth/AbstractPrimaryAuthenticationProvider.php 
b/includes/auth/AbstractPrimaryAuthenticationProvider.php
index 2e0d669..ea3dfa3 100644
--- a/includes/auth/AbstractPrimaryAuthenticationProvider.php
+++ b/includes/auth/AbstractPrimaryAuthenticationProvider.php
@@ -91,7 +91,7 @@
public function postAccountCreation( $user, $creator, 
AuthenticationResponse $response ) {
}
 
-   public function testUserForCreation( $user, $autocreate ) {
+   public function testUserForCreation( $user, $autocreate, array $options 
= [] ) {
return \StatusValue::newGood();
}
 
diff --git a/includes/auth/AbstractSecondaryAuthenticationProvider.php 
b/includes/auth/AbstractSecondaryAuthenticationProvider.php
index 89fd6f9..00493bc 100644
--- a/includes/auth/AbstractSecondaryAuthenticationProvider.php
+++ b/includes/auth/AbstractSecondaryAuthenticationProvider.php
@@ -77,7 +77,7 @@
public function postAccountCreation( $user, $creator, 
AuthenticationResponse $response ) {
}
 
-   public function testUserForCreation( $user, $autocreate ) {
+   public function testUserForCreation( $user, $autocreate, array $options 
= [] ) {
return \StatusValue::newGood();
}
 
diff --git a/includes/auth/AuthManager.php b/includes/auth/AuthManager.php
index 7ca9c6a..6db5f2c 100644
--- a/includes/auth/AuthManager.php
+++ b/includes/auth/AuthManager.php
@@ -878,10 +878,22 @@
/**
 * Determine whether a particular account can be created
 * @param string $username
-* @param int $flags Bitfield of User:READ_* constants
+* @param array $options
+*  - flags: (int) Bitfield of User:READ_* constants, default 
User::READ_NORMAL
+*  - creating: (bool) For internal use only. Never specify this.
 * @return Status
 */
-   public function canCreateAccount( $username, $flags = User::READ_NORMAL 
) {
+   public function canCreateAccount( $username, $options = [] ) {
+   // Back compat
+   if ( is_int( $options ) ) {
+   $options = [ 'flags' => $options ];
+   }
+   $options += [
+   'flags' => User::READ_NORMAL,
+   'creating' => false,
+   ];
+   $flags = $options['flags'];
+
if ( !$this->canCreateAccounts() ) {
return Status::newFatal( 'authmanager-create-disabled' 
);
}
@@ -905,7 +917,7 @@
$this->getPrimaryAuthenticationProviders() +
$this->getSecondaryAuthenticationProviders();
foreach ( $providers as $provider ) {
-   $status = $provider->testUserForCreation( $user, false 
);
+   $status = $provider->testUserForCreation( $user, false, 
$options );
if ( !$status->isGood() ) {
return Status::wrap( $status );
}
@@ -1010,7 +1022,9 @@
return 

[MediaWiki-commits] [Gerrit] Add $options parameter for testUserForCreation() - change (mediawiki...AbuseFilter)

2016-06-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Add $options parameter for testUserForCreation()
..


Add $options parameter for testUserForCreation()

In the future this will likely be useful for T136621.

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

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



diff --git a/AbuseFilterPreAuthenticationProvider.php 
b/AbuseFilterPreAuthenticationProvider.php
index d1e2f4f..9058c6e 100644
--- a/AbuseFilterPreAuthenticationProvider.php
+++ b/AbuseFilterPreAuthenticationProvider.php
@@ -7,7 +7,7 @@
return $this->testUser( $user, $creator, false );
}
 
-   public function testUserForCreation( $user, $autocreate ) {
+   public function testUserForCreation( $user, $autocreate, array $options 
= [] ) {
// if this is not an autocreation, testForAccountCreation 
already handled it
if ( $autocreate ) {
return $this->testUser( $user, $user, true );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I063cbdfbd9a223bf2391fce2b714ab82ddd3272f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/AbuseFilter
Gerrit-Branch: master
Gerrit-Owner: Anomie 
Gerrit-Reviewer: Anomie 
Gerrit-Reviewer: Gergő Tisza 
Gerrit-Reviewer: Jackmcbarn 
Gerrit-Reviewer: Se4598 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Add $options parameter for testUserForCreation() - change (mediawiki...TitleBlacklist)

2016-06-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Add $options parameter for testUserForCreation()
..


Add $options parameter for testUserForCreation()

Also use it to only log the title blacklist hit when running for real,
not when testing a username.

Change-Id: Ie9639a15d04b387be0e72754301eb6d91cd8adc2
---
M TitleBlacklistPreAuthenticationProvider.php
1 file changed, 5 insertions(+), 3 deletions(-)

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



diff --git a/TitleBlacklistPreAuthenticationProvider.php 
b/TitleBlacklistPreAuthenticationProvider.php
index 19bd3c2..b2371ca 100644
--- a/TitleBlacklistPreAuthenticationProvider.php
+++ b/TitleBlacklistPreAuthenticationProvider.php
@@ -37,12 +37,14 @@
return TitleBlacklistHooks::testUserName( $user->getName(), 
$creator, $override, true );
}
 
-   public function testUserForCreation( $user, $autocreate ) {
+   public function testUserForCreation( $user, $autocreate, array $options 
= [] ) {
$sv = StatusValue::newGood();
$creator = RequestContext::getMain()->getUser();
 
-   if ( !$autocreate || $this->blockAutoAccountCreation ) {
-   $sv->merge( TitleBlacklistHooks::testUserName( 
$user->getName(), $creator, true, true ) );
+   if ( !$autocreate && empty( $options['creating'] ) || 
$this->blockAutoAccountCreation ) {
+   $sv->merge( TitleBlacklistHooks::testUserName(
+   $user->getName(), $creator, true, 
(bool)$autocreate
+   ) );
}
return $sv;
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie9639a15d04b387be0e72754301eb6d91cd8adc2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/TitleBlacklist
Gerrit-Branch: master
Gerrit-Owner: Anomie 
Gerrit-Reviewer: Gergő Tisza 
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] Improve provider's canCreateAccount logic - change (mediawiki...CentralAuth)

2016-06-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Improve provider's canCreateAccount logic
..


Improve provider's canCreateAccount logic

Do anti-spoof checks in testUserForCreation() too so the provider can
signal failure to API list=allusers=cancreate. Assumes the
creator will override if they can.

Change-Id: I7c67512634f6e72251911238f083857da9fd3f84
---
M AntiSpoof/CentralAuthAntiSpoofHooks.php
M includes/CentralAuthPrimaryAuthenticationProvider.php
2 files changed, 23 insertions(+), 6 deletions(-)

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



diff --git a/AntiSpoof/CentralAuthAntiSpoofHooks.php 
b/AntiSpoof/CentralAuthAntiSpoofHooks.php
index 1a54f29..18affa6 100644
--- a/AntiSpoof/CentralAuthAntiSpoofHooks.php
+++ b/AntiSpoof/CentralAuthAntiSpoofHooks.php
@@ -1,5 +1,7 @@
 getNormalized();
$conflicts = $spoof->getConflicts();
if ( empty( $conflicts ) ) {
-   wfDebugLog( 'antispoof', "{$mode}PASS new 
account '$name' [$normalized]" );
+   $logger->info( "{$mode}PASS new account '$name' 
[$normalized]" );
} else {
-   wfDebugLog( 'antispoof', "{$mode}CONFLICT new 
account '$name' [$normalized] spoofs " . implode( ',', $conflicts ) );
+   $logger->info( "{$mode}CONFLICT new account 
'$name' [$normalized] spoofs " . implode( ',', $conflicts ) );
if ( $active ) {
$numConflicts = count( $conflicts );
 
@@ -63,7 +70,7 @@
}
} else {
$error = $spoof->getError();
-   wfDebugLog( 'antispoof', "{$mode}ILLEGAL new account 
'$name' $error" );
+   $logger->info( "{$mode}ILLEGAL new account '$name' 
$error" );
if ( $active ) {
return StatusValue::newFatal( 
'antispoof-name-illegal', $name, $error );
}
diff --git a/includes/CentralAuthPrimaryAuthenticationProvider.php 
b/includes/CentralAuthPrimaryAuthenticationProvider.php
index a79e522..6321158 100644
--- a/includes/CentralAuthPrimaryAuthenticationProvider.php
+++ b/includes/CentralAuthPrimaryAuthenticationProvider.php
@@ -340,10 +340,10 @@
return self::TYPE_CREATE;
}
 
-   public function testUserForCreation( $user, $autocreate ) {
+   public function testUserForCreation( $user, $autocreate, array $options 
= [] ) {
global $wgCentralAuthEnableGlobalRenameRequest;
 
-   $status = parent::testUserForCreation( $user, $autocreate );
+   $status = parent::testUserForCreation( $user, $autocreate, 
$options );
if ( !$status->isOk() ) {
return $status;
}
@@ -379,6 +379,16 @@
}
}
 
+   // Check CentralAuthAntiSpoof, if applicable. Assume the user 
will override if they can.
+   if ( $this->antiSpoofAccounts && class_exists( 
'AntiSpoofAuthenticationRequest' ) &&
+   empty( $options['creating'] ) &&
+   !RequestContext::getMain()->getUser()->isAllowed( 
'override-antispoof' )
+   ) {
+   $status->merge( 
CentralAuthAntiSpoofHooks::testNewAccount(
+   $user, new User, true, false, new 
\Psr\Log\NullLogger
+   ) );
+   }
+
return $status;
}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7c67512634f6e72251911238f083857da9fd3f84
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CentralAuth
Gerrit-Branch: master
Gerrit-Owner: Anomie 
Gerrit-Reviewer: Gergő Tisza 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Revert "Deploy Compact Language Links as default (Stage 1)" - change (operations/mediawiki-config)

2016-06-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Revert "Deploy Compact Language Links as default (Stage 1)"
..


Revert "Deploy Compact Language Links as default (Stage 1)"

This reverts commit 41e5f0ad4fbdf7d93ffd119a1504f006ffd0e8b3.

Change-Id: Idcb67034d639defb8fc432b01fc48c20a3326891
---
D dblists/cll-nondefault.dblist
M wmf-config/CommonSettings.php
M wmf-config/InitialiseSettings.php
3 files changed, 1 insertion(+), 99 deletions(-)

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



diff --git a/dblists/cll-nondefault.dblist b/dblists/cll-nondefault.dblist
deleted file mode 100644
index 3a8b6b9..000
--- a/dblists/cll-nondefault.dblist
+++ /dev/null
@@ -1,90 +0,0 @@
-enwiki
-svwiki
-cebwiki
-dewiki
-nlwiki
-frwiki
-ruwiki
-itwiki
-eswiki
-warwiki
-plwiki
-viwiki
-jawiki
-ptwiki
-zhwiki
-ukwiki
-cawiki
-fawiki
-nowiki
-shwiki
-arwiki
-fiwiki
-huwiki
-idwiki
-rowiki
-cswiki
-kowiki
-srwiki
-mswiki
-trwiki
-euwiki
-eowiki
-minwiki
-bgwiki
-dawiki
-kkwiki
-skwiki
-hywiki
-hewiki
-ltwiki
-hrwiki
-slwiki
-zh_min_nanwiki
-etwiki
-cewiki
-glwiki
-nnwiki
-uzwiki
-lawiki
-vowiki
-simplewiki
-elwiki
-bewiki
-azwiki
-urwiki
-kawiki
-thwiki
-hiwiki
-ocwiki
-tawiki
-mkwiki
-mgwiki
-newwiki
-cywiki
-lvwiki
-bswiki
-ttwiki
-tewiki
-tlwiki
-pmswiki
-be_x_oldwiki
-brwiki
-sqwiki
-kywiki
-htwiki
-jvwiki
-tgwiki
-astwiki
-zh_yuewiki
-lbwiki
-mrwiki
-mlwiki
-bnwiki
-pnbwiki
-iswiki
-afwiki
-scowiki
-gawiki
-bawiki
-cvwiki
diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index 7ecb992..77f6b6c 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -166,7 +166,7 @@
foreach ( [ 'private', 'fishbowl', 'special', 'closed', 'flow', 
'flaggedrevs', 'small', 'medium',
'large', 'wikimania', 'wikidata', 'wikidataclient', 
'visualeditor-default',
'commonsuploads', 'nonbetafeatures', 'group0', 
'group1', 'group2', 'wikipedia', 'nonglobal',
-   'wikitech', 'nonecho', 'cll-nondefault'
+   'wikitech', 'nonecho'
] as $tag ) {
$dblist = MWWikiversions::readDbListFile( $tag );
if ( in_array( $wgDBname, $dblist ) ) {
diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index b0692c4..cb8b99c 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -12637,14 +12637,6 @@
'testwiki' => false,
'test2wiki' => false,
'nonbetafeatures' => false,
-   'wikipedia' => false,
-   'wiktionary' => false,
-   'wikiversity' => false,
-   'wikiquote' => false,
-   'wikibooks' => false,
-   'wikinews' => false,
-   'wikivoyage' => false,
-   'cll-nondefault' => true,
 ],
 
 //  BetaFeatures end ---

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Idcb67034d639defb8fc432b01fc48c20a3326891
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] Change Satisfaction EL table ref - change (wikimedia...golden)

2016-06-20 Thread Bearloga (Code Review)
Bearloga has submitted this change and it was merged.

Change subject: Change Satisfaction EL table ref
..


Change Satisfaction EL table ref

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

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



diff --git a/search/dwelltime.R b/search/dwelltime.R
index 0031b64..f8444fa 100644
--- a/search/dwelltime.R
+++ b/search/dwelltime.R
@@ -1,7 +1,7 @@
 # Per-file config:
 base_path <- paste0(write_root, "search/")
 
-main <- function(date = NULL, table = "TestSearchSatisfaction2_15357244"){
+main <- function(date = NULL, table = "TestSearchSatisfaction2_15700292"){
   
   # Retrieve data
   data <- wmf::build_query(fields = "SELECT timestamp,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Idd2839636d1b38a8482455706865bda950782a4c
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/discovery/golden
Gerrit-Branch: master
Gerrit-Owner: Bearloga 
Gerrit-Reviewer: Bearloga 

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


[MediaWiki-commits] [Gerrit] Revert "Deploy Compact Language Links as default (Stage 1)" - change (operations/mediawiki-config)

2016-06-20 Thread Thcipriani (Code Review)
Thcipriani has uploaded a new change for review.

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

Change subject: Revert "Deploy Compact Language Links as default (Stage 1)"
..

Revert "Deploy Compact Language Links as default (Stage 1)"

This reverts commit 41e5f0ad4fbdf7d93ffd119a1504f006ffd0e8b3.

Change-Id: Idcb67034d639defb8fc432b01fc48c20a3326891
---
D dblists/cll-nondefault.dblist
M wmf-config/CommonSettings.php
M wmf-config/InitialiseSettings.php
3 files changed, 1 insertion(+), 99 deletions(-)


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

diff --git a/dblists/cll-nondefault.dblist b/dblists/cll-nondefault.dblist
deleted file mode 100644
index 3a8b6b9..000
--- a/dblists/cll-nondefault.dblist
+++ /dev/null
@@ -1,90 +0,0 @@
-enwiki
-svwiki
-cebwiki
-dewiki
-nlwiki
-frwiki
-ruwiki
-itwiki
-eswiki
-warwiki
-plwiki
-viwiki
-jawiki
-ptwiki
-zhwiki
-ukwiki
-cawiki
-fawiki
-nowiki
-shwiki
-arwiki
-fiwiki
-huwiki
-idwiki
-rowiki
-cswiki
-kowiki
-srwiki
-mswiki
-trwiki
-euwiki
-eowiki
-minwiki
-bgwiki
-dawiki
-kkwiki
-skwiki
-hywiki
-hewiki
-ltwiki
-hrwiki
-slwiki
-zh_min_nanwiki
-etwiki
-cewiki
-glwiki
-nnwiki
-uzwiki
-lawiki
-vowiki
-simplewiki
-elwiki
-bewiki
-azwiki
-urwiki
-kawiki
-thwiki
-hiwiki
-ocwiki
-tawiki
-mkwiki
-mgwiki
-newwiki
-cywiki
-lvwiki
-bswiki
-ttwiki
-tewiki
-tlwiki
-pmswiki
-be_x_oldwiki
-brwiki
-sqwiki
-kywiki
-htwiki
-jvwiki
-tgwiki
-astwiki
-zh_yuewiki
-lbwiki
-mrwiki
-mlwiki
-bnwiki
-pnbwiki
-iswiki
-afwiki
-scowiki
-gawiki
-bawiki
-cvwiki
diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index 7ecb992..77f6b6c 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -166,7 +166,7 @@
foreach ( [ 'private', 'fishbowl', 'special', 'closed', 'flow', 
'flaggedrevs', 'small', 'medium',
'large', 'wikimania', 'wikidata', 'wikidataclient', 
'visualeditor-default',
'commonsuploads', 'nonbetafeatures', 'group0', 
'group1', 'group2', 'wikipedia', 'nonglobal',
-   'wikitech', 'nonecho', 'cll-nondefault'
+   'wikitech', 'nonecho'
] as $tag ) {
$dblist = MWWikiversions::readDbListFile( $tag );
if ( in_array( $wgDBname, $dblist ) ) {
diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index b0692c4..cb8b99c 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -12637,14 +12637,6 @@
'testwiki' => false,
'test2wiki' => false,
'nonbetafeatures' => false,
-   'wikipedia' => false,
-   'wiktionary' => false,
-   'wikiversity' => false,
-   'wikiquote' => false,
-   'wikibooks' => false,
-   'wikinews' => false,
-   'wikivoyage' => false,
-   'cll-nondefault' => true,
 ],
 
 //  BetaFeatures end ---

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idcb67034d639defb8fc432b01fc48c20a3326891
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] Change Satisfaction EL table ref - change (wikimedia...golden)

2016-06-20 Thread Bearloga (Code Review)
Bearloga has uploaded a new change for review.

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

Change subject: Change Satisfaction EL table ref
..

Change Satisfaction EL table ref

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


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/discovery/golden 
refs/changes/47/295247/1

diff --git a/search/dwelltime.R b/search/dwelltime.R
index 0031b64..f8444fa 100644
--- a/search/dwelltime.R
+++ b/search/dwelltime.R
@@ -1,7 +1,7 @@
 # Per-file config:
 base_path <- paste0(write_root, "search/")
 
-main <- function(date = NULL, table = "TestSearchSatisfaction2_15357244"){
+main <- function(date = NULL, table = "TestSearchSatisfaction2_15700292"){
   
   # Retrieve data
   data <- wmf::build_query(fields = "SELECT timestamp,

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

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

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


[MediaWiki-commits] [Gerrit] Promote the enhanced search bar to stable - change (mediawiki...MobileFrontend)

2016-06-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Promote the enhanced search bar to stable
..


Promote the enhanced search bar to stable

Cached pages with no JS support will fall back to the simple search form
with a max-width as before.

Bug: T134894
Change-Id: I7b0dc769282c8550998dd29448a07105a73a1507
---
M extension.json
M includes/skins/MinervaTemplate.php
M includes/skins/search_form.mustache
M resources/mobile.overlays/Overlay.hogan
M resources/mobile.overlays/Overlay.less
M resources/mobile.search/SearchOverlay.js
M resources/mobile.search/SearchOverlay.less
M resources/mobile.search/header.hogan
R resources/skins.minerva.base.styles/magnifying-glass.svg
M resources/skins.minerva.base.styles/ui.less
D resources/skins.minerva.beta.styles/ui.less
R resources/skins.minerva.icons.images/magnifying-glass-white.svg
M tests/browser/features/support/pages/article_page.rb
13 files changed, 83 insertions(+), 135 deletions(-)

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



diff --git a/extension.json b/extension.json
index 4fb0960..e89b100 100644
--- a/extension.json
+++ b/extension.json
@@ -140,7 +140,6 @@
],
"position": "top",
"styles": [
-   "resources/skins.minerva.beta.styles/ui.less",

"resources/skins.minerva.beta.styles/pageactions.less"
]
},
@@ -203,7 +202,8 @@
"notifications": 
"resources/skins.minerva.icons.images/bell.svg",
"mainmenu": 
"resources/skins.minerva.icons.images/hamburger.svg",
"edit": 
"resources/skins.minerva.icons.images/editLocked.svg",
-   "edit-enabled": 
"resources/skins.minerva.icons.images/edit.svg"
+   "edit-enabled": 
"resources/skins.minerva.icons.images/edit.svg",
+   "magnifying-glass-white": 
"resources/skins.minerva.icons.images/magnifying-glass-white.svg"
}
},
"skins.minerva.icons.beta.images": {
@@ -211,8 +211,7 @@
"prefix": "mw-ui",
"selector": ".mw-ui-icon-{name}:before",
"images": {
-   "language-switcher": 
"resources/skins.minerva.icons.beta.images/languageSwitcher.svg",
-   "magnifying-glass-white": 
"resources/skins.minerva.icons.beta.images/magnifying-glass-white.svg"
+   "language-switcher": 
"resources/skins.minerva.icons.beta.images/languageSwitcher.svg"
}
},
"mobile.overlay.images": {
diff --git a/includes/skins/MinervaTemplate.php 
b/includes/skins/MinervaTemplate.php
index 97682bd..2cb0517 100644
--- a/includes/skins/MinervaTemplate.php
+++ b/includes/skins/MinervaTemplate.php
@@ -32,23 +32,13 @@
 * @return string
 */
protected function getSearchForm( $data ) {
-   $isBeta = MobileContext::singleton()->isBetaGroupMember();
-   $additionalButtonClasses = '';
-
-   if ( !$isBeta ) {
-   // The enclosing div already has this class in beta, so 
only add it
-   // in stable.
-   $additionalButtonClasses = ' no-js-only';
-   }
-
$args = [
'action' => $data['wgScript'],
'searchInput' => $this->makeSearchInput( 
$this->getSearchAttributes() ),
'searchButton' => $this->makeSearchButton( 'fulltext', [
'class' => MobileUI::buttonClass( 'progressive',
-   'fulltext-search' . 
$additionalButtonClasses ),
-   ] ),
-   'isBeta' => $isBeta
+   'fulltext-search' ),
+   ] )
];
$templateParser = new TemplateParser( __DIR__ );
return $templateParser->processTemplate( 'search_form', $args );
diff --git a/includes/skins/search_form.mustache 
b/includes/skins/search_form.mustache
index 43e1942..e889459 100644
--- a/includes/skins/search_form.mustache
+++ b/includes/skins/search_form.mustache
@@ -1,14 +1,8 @@
 
-   {{# isBeta }}
-   
-   {{{ searchButton }}}
-   
-   
-   {{{ searchInput }}}
-   
-   {{/isBeta}}
-   {{^ isBeta }}
-   {{{ searchInput }}}
+   
{{{ searchButton }}}
-   {{/isBeta}}
-
\ No newline at end of file
+   
+   
+   {{{ searchInput }}}
+   
+
diff 

[MediaWiki-commits] [Gerrit] tlsproxy: redirect-only service on 8080 - change (operations/puppet)

2016-06-20 Thread BBlack (Code Review)
BBlack has submitted this change and it was merged.

Change subject: tlsproxy: redirect-only service on 8080
..


tlsproxy: redirect-only service on 8080

Bug: T107236
Change-Id: Ieb8d43bf7edc7f068f76aa08fa5c3a070b79e3ba
---
M modules/role/manifests/cache/ssl/misc.pp
M modules/role/manifests/cache/ssl/unified.pp
M modules/tlsproxy/manifests/localssl.pp
M modules/tlsproxy/templates/localssl.erb
4 files changed, 28 insertions(+), 0 deletions(-)

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



diff --git a/modules/role/manifests/cache/ssl/misc.pp 
b/modules/role/manifests/cache/ssl/misc.pp
index c6c4803..80104c4 100644
--- a/modules/role/manifests/cache/ssl/misc.pp
+++ b/modules/role/manifests/cache/ssl/misc.pp
@@ -10,6 +10,7 @@
 server_name=> 'wmfusercontent.org',
 server_aliases => ['*.wmfusercontent.org'],
 upstream_port  => 3127,
+redir_port => 8080,
 }
 
 tlsproxy::localssl { 'planet.wikimedia.org':
@@ -17,5 +18,6 @@
 server_name=> 'planet.wikimedia.org',
 server_aliases => ['*.planet.wikimedia.org'],
 upstream_port  => 3127,
+redir_port => 8080,
 }
 }
diff --git a/modules/role/manifests/cache/ssl/unified.pp 
b/modules/role/manifests/cache/ssl/unified.pp
index 5886d5a..e026702 100644
--- a/modules/role/manifests/cache/ssl/unified.pp
+++ b/modules/role/manifests/cache/ssl/unified.pp
@@ -11,6 +11,7 @@
 default_server => true,
 do_ocsp=> true,
 upstream_port  => 3127,
+redir_port => 8080,
 }
 }
 else {
@@ -21,6 +22,7 @@
 do_ocsp=> false,
 skip_private   => true,
 upstream_port  => 3127,
+redir_port => 8080,
 }
 }
 
diff --git a/modules/tlsproxy/manifests/localssl.pp 
b/modules/tlsproxy/manifests/localssl.pp
index 9781bae..b318e8e 100644
--- a/modules/tlsproxy/manifests/localssl.pp
+++ b/modules/tlsproxy/manifests/localssl.pp
@@ -18,6 +18,11 @@
 # [*upstream_port*]
 #   TCP port to proxy to. Defaults to '80'
 #
+# [*redir_port*]
+#   TCP port to listen on as plain HTTP.  This listener will redirect GET/HEAD
+#   to HTTPS with 301 and deny all other methods with 403.  It does not proxy
+#   any traffic. Default is undefined.
+#
 # [*default_server*]
 #   Boolean. Adds the 'default_server' option to the listen statement.
 #   Exactly one instance should have this set to true.
@@ -34,6 +39,7 @@
 $server_aliases = [],
 $default_server = false,
 $upstream_port  = '80',
+$redir_port = undef,
 $do_ocsp= false,
 $skip_private   = false,
 ) {
diff --git a/modules/tlsproxy/templates/localssl.erb 
b/modules/tlsproxy/templates/localssl.erb
index ef775dc..36bd037 100644
--- a/modules/tlsproxy/templates/localssl.erb
+++ b/modules/tlsproxy/templates/localssl.erb
@@ -60,3 +60,21 @@
 <% end -%>
}
 }
+<% if @redir_port -%>
+server {
+   listen [::]:<%= @redir_port %> <%= @default_server ? "default_server 
deferred backlog=4096 reuseport ipv6only=on " : "" %>;
+   listen <%= @redir_port %> <%= @default_server ? "default_server 
deferred backlog=4096 reuseport " : "" %>;
+   server_name <%= ([@server_name] + @server_aliases).join(" ") %>;
+
+   error_log   /var/log/nginx/<%= @name %>.error.log;
+   access_log   off;
+
+   if ($request_method = GET) {
+   return 301 https://$host$request_uri;
+   }
+   if ($request_method = HEAD) {
+   return 301 https://$host$request_uri;
+   }
+   return 403 "Insecure Request Forbidden - use HTTPS";
+}
+<% end -%>

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

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

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


[MediaWiki-commits] [Gerrit] Localisation updates from https://translatewiki.net. - change (apps...wikipedia)

2016-06-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Localisation updates from https://translatewiki.net.
..


Localisation updates from https://translatewiki.net.

Change-Id: I9ea604b02849c01af1cbd04d52deb6baeed6ab2d
---
M app/src/main/res/values-cs/strings.xml
M app/src/main/res/values-fa/strings.xml
M app/src/main/res/values-ka/strings.xml
M app/src/main/res/values-ko/strings.xml
M app/src/main/res/values-mr/strings.xml
M app/src/main/res/values-pt/strings.xml
6 files changed, 69 insertions(+), 14 deletions(-)

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



diff --git a/app/src/main/res/values-cs/strings.xml 
b/app/src/main/res/values-cs/strings.xml
index 5f1d8dc..7369e93 100644
--- a/app/src/main/res/values-cs/strings.xml
+++ b/app/src/main/res/values-cs/strings.xml
@@ -261,7 +261,7 @@
   1 článek
   %s článků
   Seřadit
-  Podle názvu
+  Seřadit podle názvu
   Upravit podrobnosti seznamu k 
přečtení
   Odstranit seznam k přečtení
   Můj seznam k přečtení
diff --git a/app/src/main/res/values-fa/strings.xml 
b/app/src/main/res/values-fa/strings.xml
index 985a37e..65ac071 100644
--- a/app/src/main/res/values-fa/strings.xml
+++ b/app/src/main/res/values-fa/strings.xml
@@ -39,6 +39,7 @@
   %.2f km
   بزرگنمایی مکان در نقشه
%1$s آخرین به‌روزرسانی
+  بحث
   مطالب تحت a class=\"external\" 
rel=\"nofollow\" href=\"//creativecommons.org/licenses/by-sa/3.0/\"CC BY-SA 
3.0/a در دسترس است مگر اینکه غیر آن بیان گردد.
   با ذخیره کردن، a 
href=\"https://wikimediafoundation.org/wiki/Terms_of_Use\"شرایط 
استفاده/a را می‌پذیرید، و به طور جبران‌ناشدنی مشارکت‌هایتان را تحت 
پروانه a href=\"https://creativecommons.org/licenses/by-sa/3.0/\"CC 
BY-SA 3.0/a منتشر کنید.
   با ذخیره کردن، a 
href=\"https://wikimediafoundation.org/wiki/Terms_of_Use\"شرایط 
استفاده/a را می‌پذیرید، و به طور جبران‌ناشدنی مشارکت‌هایتان را تحت 
پروانه a href=\"https://creativecommons.org/licenses/by-sa/3.0/\"CC 
BY-SA 3.0/a منتشر کنید. ویرایش‌ها به نشانی آی‌پی دستگاه‌تان نسبت داده 
خواهد شد. اگر a href=\"https://#login\"وارد شوید/a، حریم خصوصی 
بیشتری دارید.
@@ -260,8 +261,10 @@
   ۱ مقاله
   %s مقاله
   مرتب‌کردن
-  بر پایهٔ نام
-  بر پایهٔ 
آخرین
+  مرتب بر پایهٔ نام
+  مرتب بر پایهٔ نام 
(معکوس)
+  مرتب بر پایهٔ آخرین
+  مرتب بر پایهٔ آخرین 
(معکوس)
   ویرایش جزئیات فهرست مطالعه
   حذف فهرست مطالعه
   فهرست مطالعهٔ من
@@ -282,5 +285,6 @@
   حیوانات مورد علاقه
   فضا!
   گرفتم
+  نکته: هر صفحه‌ای را به 
راست یا چپ بکشید تا از این فهرست حذف شود.
   ترجیحات
 
diff --git a/app/src/main/res/values-ka/strings.xml 
b/app/src/main/res/values-ka/strings.xml
index 2adb8fb..32788d7 100644
--- a/app/src/main/res/values-ka/strings.xml
+++ b/app/src/main/res/values-ka/strings.xml
@@ -24,6 +24,7 @@
   შინაარსობრივი საკითები
   მსგავსი სათაურები
   ფონტი და თემა
+  საკითხავ სიაში დამატება
   ბმულის გაზიარება
   გახსნა
   ახალ ჩანართში გახსნა
@@ -36,6 +37,7 @@
   %.2f კმ
   მიახლოება რუკაზე
   ბოლოს განახლდა %s
+  განხილვა
   შინაარსი ვრცელდება a 
href=\"//creativecommons.org/licenses/by-sa/3.0/\"CC BY-SA 3.0/a 
ლიცენზიით, თუკი სხვაგვარად არ არის აღნიშნული
   შენახვით, თქვენ ეთანხმებით 
a href=\"https://wikimediafoundation.org/wiki/Terms_of_Use\"გამოყენების 
პირობებს/a და თქვენს მიერ დაწერილი ტექსტის a 
href=\"https://creativecommons.org/licenses/by-sa/3.0/\"CC BY-SA 
3.0/a ლიცენზიით გაშვებას.
   შენახვით, თქვენ ეთანხმებით 
a href=\"https://wikimediafoundation.org/wiki/Terms_of_Use\"გამოყენების 
პირობებს/a და თქვენს მიერ დაწერილი ტექსტის a 
href=\"https://creativecommons.org/licenses/by-sa/3.0/\"CC BY-SA 
3.0/a ლიცენზიით გაშვებას. რედაქტირების ავტორად დაფიქსირდება თქვენი 
მოწყობილობის IP-მისამართი. რეკომენდებულია a 
href=\"https://#login\"ავტორიზაციის/a; გავლა მეტი 
დაცულობისათვის.
@@ -137,10 +139,11 @@
   ვიკიპედიის აპლიკაციის შესახებ
   კონფიდენციალურობის 
პოლიტიკა
   გამოყენების პირობები
-  გამოყენებული 
მასალები
-  ავტორები
-  მთარგმნელები
+  გამოყენებული ბიბლიოთეკები
+  ავტორები
+  მთარგმნელები
   ეს აპლიკაცია თარგმნილია 
მოხალისე მთარგმნელთა მიერ აქ: a 
href=\"https://translatewiki.net\"translatewiki.net/a;.
+  ლიცენზია
   a 
href=\"http://wikimediafoundation.org/wiki/Home\"ფონდ ვიკიმედიის/a 
პროდუქტი
   შესახებ
   ეს გვერდი განახლდა. გსურთ თქვენი 
ცვლილებების შენახვის გარეშე გამოსვლა?
@@ -233,7 +236,27 @@
   გსურთ დაწყება ან 
გასვლა?
   თავიდან დაწყება
   გამოსვლა
-  სტატიების შენახვა 
მოგვიანებით ოფლაინ-რეჟიმში წასაკითხად
+  ამ სტატიის საკითხავ სიაში 
დამატება
   სტატიის ბმულის გაზიარება
   სტატიის მდებარეობაზე 
გადასვლა
+  საკითხავი სიები
+  უსათაურო
+  საკითხავ სიაში შენახვა
+  ახლის შექმნა
+  დაემატა %s-ში.
+  დაემატა საკითხავ სიაში.
+  ეს სტატია უკვე ამ სიაშია.
+  სიის ხილვა
+  1 სტატია
+  %s სტატია
+  სორტირება
+  გაუქმება
+  კარგი
+  გაუქმება
+  მაგალითად
+  მოსანახულებელი 
ადგილები
+  საყვარელი ცხოველები
+  კოსმოსი!
+  გასაგებია
+  კონფიგურაცია
 
diff --git a/app/src/main/res/values-ko/strings.xml 

[MediaWiki-commits] [Gerrit] Make TermIndexEntry::getNumericId private - change (mediawiki...Wikibase)

2016-06-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Make TermIndexEntry::getNumericId private
..


Make TermIndexEntry::getNumericId private

See the comments in Ie8d0d4f.

Bug: T136294
Change-Id: I91c30c9c1dc27d588f12bdb3ddf6c46405077263
---
M lib/includes/TermIndexEntry.php
1 file changed, 3 insertions(+), 4 deletions(-)

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



diff --git a/lib/includes/TermIndexEntry.php b/lib/includes/TermIndexEntry.php
index 8724d02..1c9677d 100644
--- a/lib/includes/TermIndexEntry.php
+++ b/lib/includes/TermIndexEntry.php
@@ -211,11 +211,9 @@
}
 
/**
-* @since 0.5
-*
 * @return int|null
 */
-   public function getNumericId() {
+   private function getNumericId() {
return array_key_exists( 'entityId', $this->fields ) ? 
$this->fields['entityId'] : null;
}
 
@@ -230,7 +228,8 @@
$numericId = $this->getNumericId();
 
if ( $entityType !== null && $numericId !== null ) {
-   // TODO: This does not belong to a value object. 
Provide entityId object to constructor, so service will be obsolete.
+   // TODO: This does not belong to a value object. 
Introduce a TermIndexEntryFactory and
+   // encapsulate all knowledge about numeric IDs there.
if ( defined( 'WB_VERSION' ) ) {
$entityIdComposer = 
WikibaseRepo::getDefaultInstance()->getEntityIdComposer();
} elseif ( defined( 'WBC_VERSION' ) ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I91c30c9c1dc27d588f12bdb3ddf6c46405077263
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Thiemo Mättig (WMDE) 
Gerrit-Reviewer: Daniel Kinzler 
Gerrit-Reviewer: Jonas Kress (WMDE) 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] DNC: Add prod DNS entried for ms-be202[2-7] Bug:T136630 - change (operations/dns)

2016-06-20 Thread Papaul (Code Review)
Papaul has uploaded a new change for review.

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

Change subject: DNC: Add prod DNS entried for ms-be202[2-7] Bug:T136630
..

DNC: Add prod DNS entried for ms-be202[2-7]
Bug:T136630

Change-Id: I8f86f88a690dc53c7701e93c608d8d948a705d6f
---
M templates/10.in-addr.arpa
M templates/wmnet
2 files changed, 12 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/dns 
refs/changes/46/295246/1

diff --git a/templates/10.in-addr.arpa b/templates/10.in-addr.arpa
index dd7bb0b..fad5106 100644
--- a/templates/10.in-addr.arpa
+++ b/templates/10.in-addr.arpa
@@ -3199,6 +3199,12 @@
 55  1H IN PTR   restbase2009-b.codfw.wmnet.
 56  1H IN PTR   restbase2009-c.codfw.wmnet.
 57  1H IN PTR   maps2004.codfw.wmnet.
+58  1H IN PTR   ms-be2022.codfw.wmnet.
+59  1H IN PTR   ms-be2023.codfw.wmnet.
+60  1H IN PTR   ms-be2024.codfw.wmnet.
+61  1H IN PTR   ms-be2025.codfw.wmnet.
+62  1H IN PTR   ms-be2026.codfw.wmnet.
+63  1H IN PTR   ms-be2027.codfw.wmnet.
 
 $ORIGIN 49.192.{{ zonename }}.
 1   1H IN PTR   vl2020-eth3.lvs2001.codfw.wmnet.
diff --git a/templates/wmnet b/templates/wmnet
index 089a9ec..5cd700d 100644
--- a/templates/wmnet
+++ b/templates/wmnet
@@ -2560,6 +2560,12 @@
 ms-be2019   1H  IN A10.192.16.161
 ms-be2020   1H  IN A10.192.32.126
 ms-be2021   1H  IN A10.192.32.127
+ms-be2022   1H  IN A10.192.48.58
+ms-be2023   1H  IN A10.192.48.59
+ms-be2024   1H  IN A10.192.48.60
+ms-be2025   1H  IN A10.192.48.61
+ms-be2026   1H  IN A10.192.48.62
+ms-be2027   1H  IN A10.192.48.63
 ms-fe2001   1H  IN A10.192.0.23
 ms-fe2002   1H  IN A10.192.0.24
 ms-fe2003   1H  IN A10.192.16.25

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8f86f88a690dc53c7701e93c608d8d948a705d6f
Gerrit-PatchSet: 1
Gerrit-Project: operations/dns
Gerrit-Branch: master
Gerrit-Owner: Papaul 

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


[MediaWiki-commits] [Gerrit] Fix deployment of Compact Language Links - change (operations/mediawiki-config)

2016-06-20 Thread KartikMistry (Code Review)
KartikMistry has uploaded a new change for review.

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

Change subject: Fix deployment of Compact Language Links
..

Fix deployment of Compact Language Links

Set wikipedia => true to not enable by default for all wikis.

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


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 702320f..13727f1 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -12635,7 +12635,7 @@
'testwiki' => false,
'test2wiki' => false,
'nonbetafeatures' => false,
-   'wikipedia' => false,
+   'wikipedia' => true,
'wiktionary' => false,
'wikiversity' => false,
'wikiquote' => false,

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

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

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


[MediaWiki-commits] [Gerrit] Localisation updates from https://translatewiki.net. - change (apps...wikipedia)

2016-06-20 Thread Niedzielski (Code Review)
Niedzielski has uploaded a new change for review.

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

Change subject: Localisation updates from https://translatewiki.net.
..

Localisation updates from https://translatewiki.net.

Change-Id: I9ea604b02849c01af1cbd04d52deb6baeed6ab2d
---
M app/src/main/res/values-ba/strings.xml
M app/src/main/res/values-cs/strings.xml
M app/src/main/res/values-fa/strings.xml
M app/src/main/res/values-ka/strings.xml
M app/src/main/res/values-ko/strings.xml
M app/src/main/res/values-mr/strings.xml
M app/src/main/res/values-pt/strings.xml
7 files changed, 72 insertions(+), 14 deletions(-)


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

diff --git a/app/src/main/res/values-ba/strings.xml 
b/app/src/main/res/values-ba/strings.xml
index f2a7db6..201659a 100644
--- a/app/src/main/res/values-ba/strings.xml
+++ b/app/src/main/res/values-ba/strings.xml
@@ -41,6 +41,7 @@
   Әңгәмә
   Эстәлек a 
href=\"//creativecommons.org/licenses/by-sa/3.0/\"CC BY-SA 3.0/a 
лицензияһына ярашлы ҡулланыла
   Үҙгәртеүҙәрҙе һаҡлап, һеҙ 
a href=\"https://wikimediafoundation.org/wiki/Terms_of_Use/ru ҡулланыу 
шарттарына ризалыҡ бирәһегеҙ\" /a, шулай уҡ ошо лицензия буйынса, 
кире алынмай торған баҫтырыуға ризалыҡ бирәһегеҙa 
href=\"https://creativecommons.org/licenses/by-sa/3.0/deed.ru\"CC-BY-SA 
3.0/a.
+  Үҙгәрештәрҙе һаҡлап, һеҙ 
ҡулланыу шарттары менән килешәһегеҙ, шулай уҡ,лицензия буйынса баҫманы кире 
таптырып алмаҫҡа килешәһегеҙ.Төҙәтмәләр һеҙҙең ҡоролманың IP-адресына 
бәйләнәсәк.Әгәр ҙә  танылһағыҙ,һеҙҙең мәғлүмәттәр юғарыраҡ кимәлдә 
һаҡланасаҡ
   Википедия теле
   Эҙләү
   Эҙләү
@@ -83,6 +84,7 @@
   Яңыраҡ ҡаралған биттәр юҡ!
   Һеҙ, моғайын, уларҙың бөтәһен дә 
юйғанһығыҙ. Икенсе тапҡыр, биткә инһәгеҙ, уға ошо урындан кире әйләнеп ҡайта 
алаһығыҙ.
   Юйырға
+  Икенсе телдәрҙә
   Ҡатнашыусы исеме
   Һеҙҙең иҫәп яҙыуығыҙ юҡ. 
Википедияға ҡушылығыҙ
   Һеҙ теркәлдегеҙме? Инегеҙ
@@ -145,6 +147,7 @@
   Файҙаланған китапханалар
   Авторҙар
   Тәржемәселәр
+  Был ҡушымта ирекмәндәр 
тарафынан тәржемә ителгән
   Лицензия
   a 
href=\"https://github.com/wikimedia/apps-android-wikipedia/blob/master/COPYING\"Apache
 2.0/a лицензияһы буйынса
 башланғыс код бында a 
href=\"https://gerrit.wikimedia.org/r/#/admin/projects/apps/android/wikipedia\"Gerrit/a;
 һәм a 
href=\"https://github.com/wikimedia/apps-android-wikipedia\"Gerrit/a;
 алырға мөмкин. Әгәр ҙә башҡа күрһәтмә булмаһа, йөкмәтке a 
href=\"https://en.wikipedia.org/wiki/Wikipedia:Text_of_Creative_Commons_Attribution-ShareAlike_3.0_Unported_License\"Creative
 Commons Attribution-ShareAlike/a лицезияһына ярашлы алына.
diff --git a/app/src/main/res/values-cs/strings.xml 
b/app/src/main/res/values-cs/strings.xml
index 5f1d8dc..7369e93 100644
--- a/app/src/main/res/values-cs/strings.xml
+++ b/app/src/main/res/values-cs/strings.xml
@@ -261,7 +261,7 @@
   1 článek
   %s článků
   Seřadit
-  Podle názvu
+  Seřadit podle názvu
   Upravit podrobnosti seznamu k 
přečtení
   Odstranit seznam k přečtení
   Můj seznam k přečtení
diff --git a/app/src/main/res/values-fa/strings.xml 
b/app/src/main/res/values-fa/strings.xml
index 985a37e..65ac071 100644
--- a/app/src/main/res/values-fa/strings.xml
+++ b/app/src/main/res/values-fa/strings.xml
@@ -39,6 +39,7 @@
   %.2f km
   بزرگنمایی مکان در نقشه
%1$s آخرین به‌روزرسانی
+  بحث
   مطالب تحت a class=\"external\" 
rel=\"nofollow\" href=\"//creativecommons.org/licenses/by-sa/3.0/\"CC BY-SA 
3.0/a در دسترس است مگر اینکه غیر آن بیان گردد.
   با ذخیره کردن، a 
href=\"https://wikimediafoundation.org/wiki/Terms_of_Use\"شرایط 
استفاده/a را می‌پذیرید، و به طور جبران‌ناشدنی مشارکت‌هایتان را تحت 
پروانه a href=\"https://creativecommons.org/licenses/by-sa/3.0/\"CC 
BY-SA 3.0/a منتشر کنید.
   با ذخیره کردن، a 
href=\"https://wikimediafoundation.org/wiki/Terms_of_Use\"شرایط 
استفاده/a را می‌پذیرید، و به طور جبران‌ناشدنی مشارکت‌هایتان را تحت 
پروانه a href=\"https://creativecommons.org/licenses/by-sa/3.0/\"CC 
BY-SA 3.0/a منتشر کنید. ویرایش‌ها به نشانی آی‌پی دستگاه‌تان نسبت داده 
خواهد شد. اگر a href=\"https://#login\"وارد شوید/a، حریم خصوصی 
بیشتری دارید.
@@ -260,8 +261,10 @@
   ۱ مقاله
   %s مقاله
   مرتب‌کردن
-  بر پایهٔ نام
-  بر پایهٔ 
آخرین
+  مرتب بر پایهٔ نام
+  مرتب بر پایهٔ نام 
(معکوس)
+  مرتب بر پایهٔ آخرین
+  مرتب بر پایهٔ آخرین 
(معکوس)
   ویرایش جزئیات فهرست مطالعه
   حذف فهرست مطالعه
   فهرست مطالعهٔ من
@@ -282,5 +285,6 @@
   حیوانات مورد علاقه
   فضا!
   گرفتم
+  نکته: هر صفحه‌ای را به 
راست یا چپ بکشید تا از این فهرست حذف شود.
   ترجیحات
 
diff --git a/app/src/main/res/values-ka/strings.xml 
b/app/src/main/res/values-ka/strings.xml
index 2adb8fb..32788d7 100644
--- a/app/src/main/res/values-ka/strings.xml
+++ b/app/src/main/res/values-ka/strings.xml
@@ -24,6 +24,7 @@
   შინაარსობრივი საკითები
   მსგავსი სათაურები
   ფონტი და თემა
+  საკითხავ სიაში დამატება
   ბმულის გაზიარება
   გახსნა
   ახალ ჩანართში გახსნა
@@ 

[MediaWiki-commits] [Gerrit] Revert "Deploy Compact Language Links as default (Stage 1)" - change (operations/mediawiki-config)

2016-06-20 Thread Steinsplitter (Code Review)
Steinsplitter has uploaded a new change for review.

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

Change subject: Revert "Deploy Compact Language Links as default (Stage 1)"
..

Revert "Deploy Compact Language Links as default (Stage 1)"

Unfortunately, there is no consensus and a lot of oppose. See phabricator.

This reverts commit 41e5f0ad4fbdf7d93ffd119a1504f006ffd0e8b3.

Bug: T136677
Change-Id: I66f02e8f161c581d2daf2bd601cc47b9d8c5e528
---
D dblists/cll-nondefault.dblist
M wmf-config/CommonSettings.php
M wmf-config/InitialiseSettings.php
3 files changed, 1 insertion(+), 99 deletions(-)


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

diff --git a/dblists/cll-nondefault.dblist b/dblists/cll-nondefault.dblist
deleted file mode 100644
index 3a8b6b9..000
--- a/dblists/cll-nondefault.dblist
+++ /dev/null
@@ -1,90 +0,0 @@
-enwiki
-svwiki
-cebwiki
-dewiki
-nlwiki
-frwiki
-ruwiki
-itwiki
-eswiki
-warwiki
-plwiki
-viwiki
-jawiki
-ptwiki
-zhwiki
-ukwiki
-cawiki
-fawiki
-nowiki
-shwiki
-arwiki
-fiwiki
-huwiki
-idwiki
-rowiki
-cswiki
-kowiki
-srwiki
-mswiki
-trwiki
-euwiki
-eowiki
-minwiki
-bgwiki
-dawiki
-kkwiki
-skwiki
-hywiki
-hewiki
-ltwiki
-hrwiki
-slwiki
-zh_min_nanwiki
-etwiki
-cewiki
-glwiki
-nnwiki
-uzwiki
-lawiki
-vowiki
-simplewiki
-elwiki
-bewiki
-azwiki
-urwiki
-kawiki
-thwiki
-hiwiki
-ocwiki
-tawiki
-mkwiki
-mgwiki
-newwiki
-cywiki
-lvwiki
-bswiki
-ttwiki
-tewiki
-tlwiki
-pmswiki
-be_x_oldwiki
-brwiki
-sqwiki
-kywiki
-htwiki
-jvwiki
-tgwiki
-astwiki
-zh_yuewiki
-lbwiki
-mrwiki
-mlwiki
-bnwiki
-pnbwiki
-iswiki
-afwiki
-scowiki
-gawiki
-bawiki
-cvwiki
diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index 7ecb992..77f6b6c 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -166,7 +166,7 @@
foreach ( [ 'private', 'fishbowl', 'special', 'closed', 'flow', 
'flaggedrevs', 'small', 'medium',
'large', 'wikimania', 'wikidata', 'wikidataclient', 
'visualeditor-default',
'commonsuploads', 'nonbetafeatures', 'group0', 
'group1', 'group2', 'wikipedia', 'nonglobal',
-   'wikitech', 'nonecho', 'cll-nondefault'
+   'wikitech', 'nonecho'
] as $tag ) {
$dblist = MWWikiversions::readDbListFile( $tag );
if ( in_array( $wgDBname, $dblist ) ) {
diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 1ca3646..9f3630b 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -12635,14 +12635,6 @@
'testwiki' => false,
'test2wiki' => false,
'nonbetafeatures' => false,
-   'wikipedia' => false,
-   'wiktionary' => false,
-   'wikiversity' => false,
-   'wikiquote' => false,
-   'wikibooks' => false,
-   'wikinews' => false,
-   'wikivoyage' => false,
-   'cll-nondefault' => true,
 ],
 
 //  BetaFeatures end ---

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

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

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


[MediaWiki-commits] [Gerrit] [WIP] Generalize mw_cirrus_versions into a multi-purpose met... - change (mediawiki...CirrusSearch)

2016-06-20 Thread DCausse (Code Review)
DCausse has uploaded a new change for review.

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

Change subject: [WIP] Generalize mw_cirrus_versions into a multi-purpose meta 
index
..

[WIP] Generalize mw_cirrus_versions into a multi-purpose meta index

Create and maintain a mw_cirrus_metastore index per cluste.
This index will be used for :
- versions
- frozen indices
- tracking sanitize offsets

WIP: add a new maint script to create the index

Bug: T133793
Change-Id: Ib44b3e71a68daf2e5216fbf250a7fd1bd90812f9
---
M autoload.php
M includes/Connection.php
M includes/Maintenance/ConfigUtils.php
A includes/Maintenance/MetaStoreIndex.php
M maintenance/checkIndexes.php
M maintenance/updateSuggesterIndex.php
M maintenance/updateVersionIndex.php
7 files changed, 482 insertions(+), 65 deletions(-)


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

diff --git a/autoload.php b/autoload.php
index c81556c..342b852 100644
--- a/autoload.php
+++ b/autoload.php
@@ -61,6 +61,7 @@
'CirrusSearch\\Maintenance\\IndexNamespaces' => __DIR__ . 
'/maintenance/indexNamespaces.php',
'CirrusSearch\\Maintenance\\Maintenance' => __DIR__ . 
'/includes/Maintenance/Maintenance.php',
'CirrusSearch\\Maintenance\\MappingConfigBuilder' => __DIR__ . 
'/includes/Maintenance/MappingConfigBuilder.php',
+   'CirrusSearch\\Maintenance\\MetaStoreIndex' => __DIR__ . 
'/includes/Maintenance/MetaStoreIndex.php',
'CirrusSearch\\Maintenance\\OrderedStreamingForkController' => __DIR__ 
. '/includes/Maintenance/OrderedStreamingForkController.php',
'CirrusSearch\\Maintenance\\Reindexer' => __DIR__ . 
'/includes/Maintenance/Reindexer.php',
'CirrusSearch\\Maintenance\\RunSearch' => __DIR__ . 
'/maintenance/runSearch.php',
diff --git a/includes/Connection.php b/includes/Connection.php
index 461eb86..f4ad8a7 100644
--- a/includes/Connection.php
+++ b/includes/Connection.php
@@ -4,6 +4,7 @@
 
 use ElasticaConnection;
 use MWNamespace;
+use CirrusSearch\Maintenance\MetaStoreIndex;
 
 /**
  * Forms and caches connection to Elasticsearch as well as client objects
@@ -189,31 +190,10 @@
}
 
/**
-* Fetch the Elastica Type used for all wikis in the cluster to track
-* frozen indexes that should not be written to.
-* @return \Elastica\Index
-*/
-   public function getFrozenIndex() {
-   global $wgCirrusSearchCreateFrozenIndex;
-
-   $index = $this->getIndex( 
'mediawiki_cirrussearch_frozen_indexes' );
-   if ( $wgCirrusSearchCreateFrozenIndex ) {
-   if ( !$index->exists() ) {
-   $options = array(
-   'number_of_shards' => 1,
-   'auto_expand_replicas' => '0-2',
-);
-   $index->create( $options, true );
-   }
-   }
-   return $index;
-   }
-
-   /**
 * @return \Elastica\Type
 */
public function getFrozenIndexNameType() {
-   return $this->getFrozenIndex()->getType( 'name' );
+   return MetaStoreIndex::getFrozenType( $this );
}
 
/**
diff --git a/includes/Maintenance/ConfigUtils.php 
b/includes/Maintenance/ConfigUtils.php
index cf5fd16..4ef138d 100644
--- a/includes/Maintenance/ConfigUtils.php
+++ b/includes/Maintenance/ConfigUtils.php
@@ -115,27 +115,36 @@
}
 
/**
+* @param string $what
+* @return string[] list of modules or plugins
+*/
+   private function scanModulesOrPlugins( $what ) {
+   $result = $this->client->request( '_nodes' );
+   $result = $result->getData();
+   $availables = array();
+   $first = true;
+   foreach ( array_values( $result[ 'nodes' ] ) as $node ) {
+   $plugins = array();
+   foreach ( $node[ $what ] as $plugin ) {
+   $plugins[] = $plugin[ 'name' ];
+   }
+   if ( $first ) {
+   $availables = $plugins;
+   $first = false;
+   } else {
+   $availables = array_intersect( $availables, 
$plugins );
+   }
+   }
+   return $availables;
+   }
+
+   /**
 * @param string[] $bannedPlugins
 * @return string[]
 */
public function scanAvailablePlugins( array $bannedPlugins = array() ) {
$this->outputIndented( "Scanning available plugins..." );
-   $result = $this->client->request( '_nodes' );
-   $result = $result->getData();
-   $availablePlugins = array();
-   

[MediaWiki-commits] [Gerrit] Ignore optional tags in sandbox - change (mediawiki...Graph)

2016-06-20 Thread Yurik (Code Review)
Yurik has uploaded a new change for review.

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

Change subject: Ignore optional  tags in sandbox
..

Ignore optional  tags in sandbox

Bug: T138232
Change-Id: I06014fe08691999b529de55f0513a558f0df0b07
---
M includes/ApiGraph.php
1 file changed, 10 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Graph 
refs/changes/41/295241/1

diff --git a/includes/ApiGraph.php b/includes/ApiGraph.php
index 21b7356..801f884 100644
--- a/includes/ApiGraph.php
+++ b/includes/ApiGraph.php
@@ -68,7 +68,7 @@
}
 
/**
-* Get graph definition with title and hash
+* Parse graph definition that may contain wiki markup into pure json
 * @param string $text
 * @return string
 */
@@ -78,7 +78,15 @@
$text = $wgParser->getFreshParser()->preprocess( $text, $title, 
new ParserOptions() );
$st = FormatJson::parse( $text );
if ( !$st->isOK() ) {
-   $this->dieUsage( 'Graph is not valid.', 'invalidtext' );
+   // Sometimes we get  {...}  as 
input. Try to strip  tags
+   $count = 0;
+   $text = preg_replace( 
'/^\s*]*>(.*)<\/graph>\s*$/', '$1', $text, 1, $count );
+   if ( $count === 1 ) {
+   $st = FormatJson::parse( $text );
+   }
+   if ( !$st->isOK() ) {
+   $this->dieUsage( 'Graph is not valid.', 
'invalidtext' );
+   }
}
return $st->getValue();
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I06014fe08691999b529de55f0513a558f0df0b07
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Graph
Gerrit-Branch: master
Gerrit-Owner: Yurik 

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


[MediaWiki-commits] [Gerrit] Add $wgEchoCrossWikiNotifications flag to disable cross-wiki... - change (mediawiki...Echo)

2016-06-20 Thread Catrope (Code Review)
Catrope has submitted this change and it was merged.

Change subject: Add $wgEchoCrossWikiNotifications flag to disable cross-wiki 
notifications
..


Add $wgEchoCrossWikiNotifications flag to disable cross-wiki notifications

This is needed because global tables and cache keys will attempt to be used
even for users who don't have the preference enabled.

Bug: T135266
Change-Id: I6208a12d46c8cd0275a232663cd50ac2bd2fed1c
---
M Echo.php
M Hooks.php
M includes/NotifUser.php
M includes/api/ApiEchoNotifications.php
4 files changed, 87 insertions(+), 47 deletions(-)

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



diff --git a/Echo.php b/Echo.php
index 887d584..0b5e07b 100644
--- a/Echo.php
+++ b/Echo.php
@@ -210,6 +210,12 @@
 // sprintf format of per-user notification agent whitelists. Set to null to 
disable.
 $wgEchoPerUserWhitelistFormat = '%s/Echo-whitelist';
 
+// Whether to enable the cross-wiki notifications feature. To enable this 
feature you need to:
+// - have a global user system (e.g. CentralAuth or a shared user table)
+// - have $wgMainStash and $wgMainWANCache shared between wikis
+// - configure $wgEchoSharedTrackingDB
+$wgEchoCrossWikiNotifications = false;
+
 // Feature flag for the cross-wiki notifications beta feature
 // If this is true, the cross-wiki notifications preference will appear in the 
BetaFeatures section;
 // if this is false, it'll appear in the Notifications section instead.
diff --git a/Hooks.php b/Hooks.php
index 36f2f29..33a4470 100644
--- a/Hooks.php
+++ b/Hooks.php
@@ -216,9 +216,9 @@
 * @return bool true in all cases
 */
public static function getBetaFeaturePreferences( User $user, array 
&$preferences ) {
-   global $wgExtensionAssetsPath, $wgEchoUseCrossWikiBetaFeature;
+   global $wgExtensionAssetsPath, $wgEchoUseCrossWikiBetaFeature, 
$wgEchoCrossWikiNotifications;
 
-   if ( $wgEchoUseCrossWikiBetaFeature ) {
+   if ( $wgEchoUseCrossWikiBetaFeature && 
$wgEchoCrossWikiNotifications ) {
$preferences['echo-cross-wiki-notifications'] = array(
'label-message' => 
'echo-pref-beta-feature-cross-wiki-message',
'desc-message' => 
'echo-pref-beta-feature-cross-wiki-description',
@@ -250,7 +250,7 @@
global $wgAuth, $wgEchoEnableEmailBatch,
$wgEchoNotifiers, $wgEchoNotificationCategories, 
$wgEchoNotifications,
$wgEchoNewMsgAlert, $wgAllowHTMLEmail, 
$wgEchoUseCrossWikiBetaFeature,
-   $wgEchoShowFooterNotice;
+   $wgEchoShowFooterNotice, $wgEchoCrossWikiNotifications;
 
$attributeManager = EchoAttributeManager::newFromGlobalVars();
 
@@ -391,7 +391,7 @@
'tooltips' => $tooltips,
);
 
-   if ( !$wgEchoUseCrossWikiBetaFeature ) {
+   if ( !$wgEchoUseCrossWikiBetaFeature && 
$wgEchoCrossWikiNotifications ) {
$preferences['echo-cross-wiki-notifications'] = array(
'type' => 'toggle',
'label-message' => 
'echo-pref-cross-wiki-notifications',
diff --git a/includes/NotifUser.php b/includes/NotifUser.php
index 1249759..1a8a133 100644
--- a/includes/NotifUser.php
+++ b/includes/NotifUser.php
@@ -187,7 +187,9 @@
 
/**
 * Retrieves number of unread notifications that a user has, would 
return
-* MWEchoNotifUser::MAX_BADGE_COUNT + 1 at most
+* MWEchoNotifUser::MAX_BADGE_COUNT + 1 at most.
+*
+* If $wgEchoCrossWikiNotifications is disabled, the $global parameter 
is ignored.
 *
 * @param boolean $cached Set to false to bypass the cache. (Optional. 
Defaults to true)
 * @param int $dbSource Use master or slave database to pull count 
(Optional. Defaults to DB_SLAVE)
@@ -198,6 +200,12 @@
public function getNotificationCount( $cached = true, $dbSource = 
DB_SLAVE, $section = EchoAttributeManager::ALL, $global = 'preference' ) {
if ( $this->mUser->isAnon() ) {
return 0;
+   }
+
+   global $wgEchoCrossWikiNotifications;
+   if ( !$wgEchoCrossWikiNotifications ) {
+   // Ignore the $global parameter
+   $global = false;
}
 
if ( $global === 'preference' ) {
@@ -254,6 +262,8 @@
/**
 * Returns the timestamp of the last unread notification.
 *
+* If $wgEchoCrossWikiNotifications is disabled, the $global parameter 
is ignored.
+*
 * @param boolean $cached Set to false to bypass the cache. (Optional. 
Defaults to true)
 * @param int $dbSource Use master or slave database to pull count 
(Optional. Defaults to 

[MediaWiki-commits] [Gerrit] Use global user ID in global cache keys - change (mediawiki...Echo)

2016-06-20 Thread Catrope (Code Review)
Catrope has submitted this change and it was merged.

Change subject: Use global user ID in global cache keys
..


Use global user ID in global cache keys

We were using the local user ID instead, which is not the
same on every wiki, which caused strange cache staleness
and pollution behavior.

Run sets through a wrapper function (gets were already wrapped)
so we can update the instance cache and deal with uncomputable
cache keys in one place. A global cache key may be uncomputable
if we fail to obtain the user's global user ID (users aren't
supposed to be unattached, but some are).

Also bump the cache version to get rid of polluted cache entries.
Bumping this version number was probably a good idea anyway,
with all the recent changes.

Bug: T134533
Change-Id: I1c4f0c2f2eded480c80f8ec7a49a04feb7c5ecfb
---
M Echo.php
M includes/NotifUser.php
2 files changed, 54 insertions(+), 15 deletions(-)

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



diff --git a/Echo.php b/Echo.php
index d14486c..887d584 100644
--- a/Echo.php
+++ b/Echo.php
@@ -529,7 +529,7 @@
 
 // Echo Configuration for EventLogging
 $wgEchoConfig = array(
-   'version' => '1.6',
+   'version' => '1.7',
'eventlogging' => array(
/**
 * Properties:
diff --git a/includes/NotifUser.php b/includes/NotifUser.php
index bf11756..1249759 100644
--- a/includes/NotifUser.php
+++ b/includes/NotifUser.php
@@ -225,7 +225,7 @@
$count += $this->getForeignNotifications()->getCount( 
$section );
}
 
-   $this->cache->set( $memcKey, $count, 86400 );
+   $this->setInCache( $memcKey, $count, 86400 );
return $count;
}
 
@@ -320,7 +320,7 @@
$cacheValue = $timestamp->getTimestamp( TS_MW );
}
 
-   $this->cache->set( $memcKey, $cacheValue, 86400 );
+   $this->setInCache( $memcKey, $cacheValue, 86400 );
return $returnValue;
}
 
@@ -474,14 +474,14 @@
$globalAlertUnread : $globalMsgUnread;
 
// Write computed values to cache
-   $this->cache->set( $this->getMemcKey( 'echo-notification-count' 
), $allCount, 86400 );
-   $this->cache->set( $this->getGlobalMemcKey( 
'echo-notification-count-alert' ), $globalAlertCount, 86400 );
-   $this->cache->set( $this->getGlobalMemcKey( 
'echo-notification-count-message' ), $globalMsgCount, 86400 );
-   $this->cache->set( $this->getGlobalMemcKey( 
'echo-notification-count' ), $globalAllCount, 86400 );
-   $this->cache->set( $this->getMemcKey( 
'echo-notification-timestamp', $allUnread === false ? -1 : 
$allUnread->getTimestamp( TS_MW ) ), 86400 );
-   $this->cache->set( $this->getGlobalMemcKey( 
'echo-notification-timestamp-alert' ), $globalAlertUnread === false ? -1 : 
$globalAlertUnread->getTimestamp( TS_MW ), 86400 );
-   $this->cache->set( $this->getGlobalMemcKey( 
'echo-notification-timestamp-message' ), $globalMsgUnread === false ? -1 : 
$globalMsgUnread->getTimestamp( TS_MW ), 86400 );
-   $this->cache->set( $this->getGlobalMemcKey( 
'echo-notification-timestamp' ), $globalAllUnread === false ? -1 : 
$globalAllUnread->getTimestamp( TS_MW ), 86400 );
+   $this->setInCache( $this->getMemcKey( 'echo-notification-count' 
), $allCount, 86400 );
+   $this->setInCache( $this->getGlobalMemcKey( 
'echo-notification-count-alert' ), $globalAlertCount, 86400 );
+   $this->setInCache( $this->getGlobalMemcKey( 
'echo-notification-count-message' ), $globalMsgCount, 86400 );
+   $this->setInCache( $this->getGlobalMemcKey( 
'echo-notification-count' ), $globalAllCount, 86400 );
+   $this->setInCache( $this->getMemcKey( 
'echo-notification-timestamp' ), $allUnread === false ? -1 : 
$allUnread->getTimestamp( TS_MW ), 86400 );
+   $this->setInCache( $this->getGlobalMemcKey( 
'echo-notification-timestamp-alert' ), $globalAlertUnread === false ? -1 : 
$globalAlertUnread->getTimestamp( TS_MW ), 86400 );
+   $this->setInCache( $this->getGlobalMemcKey( 
'echo-notification-timestamp-message' ), $globalMsgUnread === false ? -1 : 
$globalMsgUnread->getTimestamp( TS_MW ), 86400 );
+   $this->setInCache( $this->getGlobalMemcKey( 
'echo-notification-timestamp' ), $globalAllUnread === false ? -1 : 
$globalAllUnread->getTimestamp( TS_MW ), 86400 );
 
// Invalidate the user's cache
$user = $this->mUser;
@@ -510,7 +510,18 @@
}
}
 
+   /**
+* Get a cache entry from the cache, using a preloaded instance cache.
+* @param  string|false $memcKey Cache key returned by getMemcKey()
+* @return mixed Cache value
+*/
protected function getFromCache( 

[MediaWiki-commits] [Gerrit] Fix documentation of the dir parameter of list=watchlistraw ... - change (mediawiki/core)

2016-06-20 Thread WMDE-leszek (Code Review)
WMDE-leszek has uploaded a new change for review.

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

Change subject: Fix documentation of the dir parameter of list=watchlistraw API 
action
..

Fix documentation of the dir parameter of list=watchlistraw API action

Bug: T138213
Change-Id: I26709b03dd9b64c6f1231f3bfc3064c63c8f0c21
---
M includes/api/ApiQueryWatchlistRaw.php
M includes/api/i18n/en.json
M includes/api/i18n/qqq.json
3 files changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/40/295240/1

diff --git a/includes/api/ApiQueryWatchlistRaw.php 
b/includes/api/ApiQueryWatchlistRaw.php
index 742f8f5..64b97fe 100644
--- a/includes/api/ApiQueryWatchlistRaw.php
+++ b/includes/api/ApiQueryWatchlistRaw.php
@@ -193,7 +193,6 @@
'ascending',
'descending'
],
-   ApiBase::PARAM_HELP_MSG => 
'api-help-param-direction',
],
'fromtitle' => [
ApiBase::PARAM_TYPE => 'string'
diff --git a/includes/api/i18n/en.json b/includes/api/i18n/en.json
index cfd0c74..5124955 100644
--- a/includes/api/i18n/en.json
+++ b/includes/api/i18n/en.json
@@ -1291,6 +1291,7 @@
"apihelp-query+watchlistraw-param-show": "Only list items that meet 
these criteria.",
"apihelp-query+watchlistraw-param-owner": "Used along with $1token to 
access a different user's watchlist.",
"apihelp-query+watchlistraw-param-token": "A security token (available 
in the user's [[Special:Preferences#mw-prefsection-watchlist|preferences]]) to 
allow access to another user's watchlist.",
+   "apihelp-query+watchlistraw-param-dir": "The direction in which to 
list.",
"apihelp-query+watchlistraw-param-fromtitle": "Title (with namespace 
prefix) to begin enumerating from.",
"apihelp-query+watchlistraw-param-totitle": "Title (with namespace 
prefix) to stop enumerating at.",
"apihelp-query+watchlistraw-example-simple": "List pages on the current 
user's watchlist.",
diff --git a/includes/api/i18n/qqq.json b/includes/api/i18n/qqq.json
index 44769cf..ed9952f 100644
--- a/includes/api/i18n/qqq.json
+++ b/includes/api/i18n/qqq.json
@@ -1204,6 +1204,7 @@
"apihelp-query+watchlistraw-param-show": 
"{{doc-apihelp-param|query+watchlistraw|show}}",
"apihelp-query+watchlistraw-param-owner": 
"{{doc-apihelp-param|query+watchlistraw|owner}}",
"apihelp-query+watchlistraw-param-token": 
"{{doc-apihelp-param|query+watchlistraw|token}}",
+   "apihelp-query+watchlistraw-param-dir": 
"{{doc-apihelp-param|query+watchlistraw|dir}}",
"apihelp-query+watchlistraw-param-fromtitle": 
"{{doc-apihelp-param|query+watchlistraw|fromtitle}}",
"apihelp-query+watchlistraw-param-totitle": 
"{{doc-apihelp-param|query+watchlistraw|totitle}}",
"apihelp-query+watchlistraw-example-simple": 
"{{doc-apihelp-example|query+watchlistraw}}",

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I26709b03dd9b64c6f1231f3bfc3064c63c8f0c21
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: WMDE-leszek 

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


[MediaWiki-commits] [Gerrit] Fix pt.wikinews namespace issue - change (operations/mediawiki-config)

2016-06-20 Thread Dereckson (Code Review)
Dereckson has uploaded a new change for review.

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

Change subject: Fix pt.wikinews namespace issue
..

Fix pt.wikinews namespace issue

Grondin noticed the namespace Transwiki has disappeared on pt.wikinews.

After investigation, commit 8c29c8e5 has created a new array in
$wgExtraNamespaces, as the previous array wasn't correctly sorted
alphabetically.

This commit fixes that merging the two arrays together.

Bug: T138230
Change-Id: I3e3c9b8074cb627c022fc9e61f0ae5ee36a2c461
---
M wmf-config/InitialiseSettings.php
1 file changed, 6 insertions(+), 8 deletions(-)


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index b0692c4..da13e2b 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -6383,14 +6383,6 @@
106 => 'Portal',
107 => 'Portal-diskusjon',
],
-   'ptwikinews' => [
-   100 => 'Portal',
-   101 => 'Portal_Discussão',
-   102 => 'Efeméride',
-   103 => 'Efeméride_Discussão',
-   104 => 'Transwiki',
-   105 => 'Transwiki_Discussão',
-   ],
'plwikinews' => [
NS_PROJECT_TALK => 'Dyskusja_Wikinews',
NS_USER => 'Wikireporter',
@@ -6399,6 +6391,12 @@
101 => 'Dyskusja_portalu'
],
'ptwikinews' => [
+   100 => 'Portal',
+   101 => 'Portal_Discussão',
+   102 => 'Efeméride',
+   103 => 'Efeméride_Discussão',
+   104 => 'Transwiki',
+   105 => 'Transwiki_Discussão',
110 => 'Colaboração', // T94894
111 => 'Colaboração_Discussão',
],

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

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

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


[MediaWiki-commits] [Gerrit] empty php entry point - change (mediawiki...TemplateSandbox)

2016-06-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: empty php entry point
..


empty php entry point

Change-Id: If56898f56429e75683cdc2355b3e134e4d633386
---
M TemplateSandbox.php
1 file changed, 12 insertions(+), 47 deletions(-)

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



diff --git a/TemplateSandbox.php b/TemplateSandbox.php
index 26d5655..0245f73 100644
--- a/TemplateSandbox.php
+++ b/TemplateSandbox.php
@@ -20,51 +20,16 @@
  * http://www.gnu.org/copyleft/gpl.html
  */
 
-# Alert the user that this is not a valid entry point to MediaWiki if they try
-# to access the special pages file directly.
-if ( !defined( 'MEDIAWIKI' ) ) {
-   echo < __FILE__,
-   'name' => 'TemplateSandbox',
-   'author' => 'Brad Jorsch',
-   'url' => 'https://www.mediawiki.org/wiki/Extension:TemplateSandbox',
-   'descriptionmsg' => 'templatesandbox-desc',
-   'version' => '1.1.0',
-   'license-name' => 'GPL-2.0+',
-);
-
-$wgAutoloadClasses['TemplateSandboxHooks'] = __DIR__ . 
'/TemplateSandbox.hooks.php';
-$wgAutoloadClasses['SpecialTemplateSandbox'] = __DIR__ . 
'/SpecialTemplateSandbox.php';
-$wgMessagesDirs['TemplateSandbox'] = __DIR__ . '/i18n';
-$wgExtensionMessagesFiles['TemplateSandboxAlias'] = __DIR__ . 
'/TemplateSandbox.alias.php';
-$wgSpecialPages['TemplateSandbox'] = 'SpecialTemplateSandbox';
-$wgHooks['EditPage::importFormData'][] = 
'TemplateSandboxHooks::importFormData';
-$wgHooks['EditPage::showStandardInputs:options'][] = 
'TemplateSandboxHooks::injectOptions';
-$wgHooks['AlternateEditPreview'][] = 
'TemplateSandboxHooks::templateSandboxPreview';
-
-$wgResourceModules['ext.TemplateSandbox'] = array(
-   'scripts' => 'ext.TemplateSandbox.js',
-   'position' => 'bottom',
-   'localBasePath' => __DIR__ . '/modules',
-   'remoteExtPath' => 'TemplateSandbox/modules'
-);

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If56898f56429e75683cdc2355b3e134e4d633386
Gerrit-PatchSet: 15
Gerrit-Project: mediawiki/extensions/TemplateSandbox
Gerrit-Branch: master
Gerrit-Owner: Paladox 
Gerrit-Reviewer: Anomie 
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: Jackmcbarn 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Paladox 
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] Clarify mention error log comment - change (mediawiki...Echo)

2016-06-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Clarify mention error log comment
..


Clarify mention error log comment

The case also logs non-existing users.

Change-Id: Id5a360b672df11d214459432c4ebbed5c03c1ba9
---
M includes/DiscussionParser.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/includes/DiscussionParser.php b/includes/DiscussionParser.php
index cfeebb9..151452e 100644
--- a/includes/DiscussionParser.php
+++ b/includes/DiscussionParser.php
@@ -171,7 +171,7 @@
$stats->increment( 
'echo.event.mention.error.ownPage' );
continue;
}
-   // 4. user is anonymous
+   // 4. user is anonymous or does not exist
if ( $user->isAnon() ) {
$stats->increment( 
'echo.event.mention.error.anonUser' );
continue;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id5a360b672df11d214459432c4ebbed5c03c1ba9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: WMDE-Fisch 
Gerrit-Reviewer: Addshore 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Fix doc comments - change (mediawiki...TemplateSandbox)

2016-06-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Fix doc comments
..


Fix doc comments

Change-Id: I8b0d8602869c197cc426323facb2f9a585e7b5cd
---
M SpecialTemplateSandbox.php
M TemplateSandbox.hooks.php
2 files changed, 18 insertions(+), 18 deletions(-)

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



diff --git a/SpecialTemplateSandbox.php b/SpecialTemplateSandbox.php
index 38ba483..20c0b4e 100644
--- a/SpecialTemplateSandbox.php
+++ b/SpecialTemplateSandbox.php
@@ -149,8 +149,8 @@
}
 
/**
-* @param $value string|null
-* @param $allData
+* @param string|null $value
+* @param array $allData
 * @return bool|String
 */
function validatePageParam( $value, $allData ) {
@@ -168,8 +168,8 @@
}
 
/**
-* @param $value string|null
-* @param $allData
+* @param string|null $value
+* @param array $allData
 * @return bool|String
 */
function validateRevidParam( $value, $allData ) {
@@ -184,8 +184,8 @@
}
 
/**
-* @param $value
-* @param $allData
+* @param string|null $value
+* @param array $allData
 * @return bool|String
 */
function validatePrefixParam( $value, $allData ) {
@@ -207,8 +207,8 @@
}
 
/**
-* @param $data array
-* @param $form
+* @param array $data
+* @param HTMLForm $form
 * @return Status
 */
public function onSubmit( $data, $form ) {
diff --git a/TemplateSandbox.hooks.php b/TemplateSandbox.hooks.php
index 06c29ae..4fb8873 100644
--- a/TemplateSandbox.hooks.php
+++ b/TemplateSandbox.hooks.php
@@ -19,8 +19,8 @@
 * Note we specifically do not check $wgTemplateSandboxEditNamespaces 
here,
 * to allow users to create gadgets to enable this for other namespaces.
 *
-* @param $editpage EditPage
-* @param $request WebRequest
+* @param EditPage $editpage
+* @param WebRequest $request
 * @return bool
 */
public static function importFormData( $editpage, $request ) {
@@ -43,7 +43,7 @@
}
 
/**
-* @param $msg string
+* @param string $msg
 * @return string
 */
private static function wrapErrorMsg( $msg ) {
@@ -76,10 +76,10 @@
 * Hook for AlternateEditPreview to output an entirely different preview
 * when our button was clicked.
 *
-* @param $editpage EditPage
-* @param $content Content
-* @param $out string
-* @param $parserOutput ParserOutput
+* @param EditPage $editpage
+* @param Content $content
+* @param string $out
+* @param ParserOutput $parserOutput
 * @return bool
 */
public static function templateSandboxPreview( $editpage, &$content, 
&$out, &$parserOutput ) {
@@ -237,9 +237,9 @@
 * Hook for EditPage::showStandardInputs:options to add our form fields 
to
 * the "editOptions" area of the page.
 *
-* @param $editpage EditPage
-* @param $output OutputPage
-* @param $tabindex
+* @param EditPage $editpage
+* @param OutputPage $output
+* @param int $tabindex
 * @return bool
 */
public static function injectOptions( $editpage, $output, &$tabindex ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8b0d8602869c197cc426323facb2f9a585e7b5cd
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/TemplateSandbox
Gerrit-Branch: master
Gerrit-Owner: Anomie 
Gerrit-Reviewer: Anomie 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Fix doc comments - change (mediawiki...TemplateSandbox)

2016-06-20 Thread Anomie (Code Review)
Anomie has uploaded a new change for review.

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

Change subject: Fix doc comments
..

Fix doc comments

Change-Id: I8b0d8602869c197cc426323facb2f9a585e7b5cd
---
M SpecialTemplateSandbox.php
M TemplateSandbox.hooks.php
2 files changed, 18 insertions(+), 18 deletions(-)


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

diff --git a/SpecialTemplateSandbox.php b/SpecialTemplateSandbox.php
index 38ba483..20c0b4e 100644
--- a/SpecialTemplateSandbox.php
+++ b/SpecialTemplateSandbox.php
@@ -149,8 +149,8 @@
}
 
/**
-* @param $value string|null
-* @param $allData
+* @param string|null $value
+* @param array $allData
 * @return bool|String
 */
function validatePageParam( $value, $allData ) {
@@ -168,8 +168,8 @@
}
 
/**
-* @param $value string|null
-* @param $allData
+* @param string|null $value
+* @param array $allData
 * @return bool|String
 */
function validateRevidParam( $value, $allData ) {
@@ -184,8 +184,8 @@
}
 
/**
-* @param $value
-* @param $allData
+* @param string|null $value
+* @param array $allData
 * @return bool|String
 */
function validatePrefixParam( $value, $allData ) {
@@ -207,8 +207,8 @@
}
 
/**
-* @param $data array
-* @param $form
+* @param array $data
+* @param HTMLForm $form
 * @return Status
 */
public function onSubmit( $data, $form ) {
diff --git a/TemplateSandbox.hooks.php b/TemplateSandbox.hooks.php
index 06c29ae..4fb8873 100644
--- a/TemplateSandbox.hooks.php
+++ b/TemplateSandbox.hooks.php
@@ -19,8 +19,8 @@
 * Note we specifically do not check $wgTemplateSandboxEditNamespaces 
here,
 * to allow users to create gadgets to enable this for other namespaces.
 *
-* @param $editpage EditPage
-* @param $request WebRequest
+* @param EditPage $editpage
+* @param WebRequest $request
 * @return bool
 */
public static function importFormData( $editpage, $request ) {
@@ -43,7 +43,7 @@
}
 
/**
-* @param $msg string
+* @param string $msg
 * @return string
 */
private static function wrapErrorMsg( $msg ) {
@@ -76,10 +76,10 @@
 * Hook for AlternateEditPreview to output an entirely different preview
 * when our button was clicked.
 *
-* @param $editpage EditPage
-* @param $content Content
-* @param $out string
-* @param $parserOutput ParserOutput
+* @param EditPage $editpage
+* @param Content $content
+* @param string $out
+* @param ParserOutput $parserOutput
 * @return bool
 */
public static function templateSandboxPreview( $editpage, &$content, 
&$out, &$parserOutput ) {
@@ -237,9 +237,9 @@
 * Hook for EditPage::showStandardInputs:options to add our form fields 
to
 * the "editOptions" area of the page.
 *
-* @param $editpage EditPage
-* @param $output OutputPage
-* @param $tabindex
+* @param EditPage $editpage
+* @param OutputPage $output
+* @param int $tabindex
 * @return bool
 */
public static function injectOptions( $editpage, $output, &$tabindex ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8b0d8602869c197cc426323facb2f9a585e7b5cd
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/TemplateSandbox
Gerrit-Branch: master
Gerrit-Owner: Anomie 

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


[MediaWiki-commits] [Gerrit] Clarify mention error log comment - change (mediawiki...Echo)

2016-06-20 Thread WMDE-Fisch (Code Review)
WMDE-Fisch has uploaded a new change for review.

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

Change subject: Clarify mention error log comment
..

Clarify mention error log comment

The case also logs non-existing users.

Change-Id: Id5a360b672df11d214459432c4ebbed5c03c1ba9
---
M includes/DiscussionParser.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/includes/DiscussionParser.php b/includes/DiscussionParser.php
index cfeebb9..151452e 100644
--- a/includes/DiscussionParser.php
+++ b/includes/DiscussionParser.php
@@ -171,7 +171,7 @@
$stats->increment( 
'echo.event.mention.error.ownPage' );
continue;
}
-   // 4. user is anonymous
+   // 4. user is anonymous or does not exist
if ( $user->isAnon() ) {
$stats->increment( 
'echo.event.mention.error.anonUser' );
continue;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id5a360b672df11d214459432c4ebbed5c03c1ba9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: WMDE-Fisch 

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


[MediaWiki-commits] [Gerrit] Revert "Improve edit stashing when vary-revision is used" - change (mediawiki/core)

2016-06-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Revert "Improve edit stashing when vary-revision is used"
..


Revert "Improve edit stashing when vary-revision is used"

This reverts commit 0887a29e17f0a4bd8a50bfd66ca516ba6acad903.

Pulled down this change as part of morning SWAT, was unclear if it was
supposed to merge, didn't want anyone to sync on accident.

Change-Id: Ib74141254dc712f4376a22d0a3c50c24c62f98a8
---
M includes/api/ApiStashEdit.php
1 file changed, 8 insertions(+), 13 deletions(-)

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



diff --git a/includes/api/ApiStashEdit.php b/includes/api/ApiStashEdit.php
index c8a330a..67939a0 100644
--- a/includes/api/ApiStashEdit.php
+++ b/includes/api/ApiStashEdit.php
@@ -234,34 +234,27 @@
 
$age = time() - wfTimestamp( TS_UNIX, 
$editInfo->output->getCacheTime() );
if ( $age <= self::PRESUME_FRESH_TTL_SEC ) {
-   // Assume nothing changed in this time
$stats->increment( 
'editstash.cache_hits.presumed_fresh' );
$logger->debug( "Timestamp-based cache hit for key 
'$key' (age: $age sec)." );
+   return $editInfo; // assume nothing changed
} elseif ( isset( $editInfo->edits ) && $editInfo->edits === 
$user->getEditCount() ) {
// Logged-in user made no local upload/template edits 
in the meantime
$stats->increment( 
'editstash.cache_hits.presumed_fresh' );
$logger->debug( "Edit count based cache hit for key 
'$key' (age: $age sec)." );
+   return $editInfo;
} elseif ( $user->isAnon()
&& self::lastEditTime( $user ) < 
$editInfo->output->getCacheTime()
) {
// Logged-out user made no local upload/template edits 
in the meantime
$stats->increment( 
'editstash.cache_hits.presumed_fresh' );
$logger->debug( "Edit check based cache hit for key 
'$key' (age: $age sec)." );
-   } else {
-   // User may have changed included content
-   $editInfo = false;
+   return $editInfo;
}
 
-   if ( !$editInfo ) {
-   $stats->increment( 
'editstash.cache_misses.proven_stale' );
-   $logger->info( "Stale cache for key '$key'; old key 
with outside edits. (age: $age sec)" );
-   } elseif ( $editInfo->output->getFlag( 'vary-revision' ) ) {
-   // This can be used for the initial parse, e.g. for 
filters or doEditContent(),
-   // but a second parse will be triggered in 
doEditUpdates(). This is not optimal.
-   $logger->info( "Partially usable cache for key '$key' 
('$title') [vary_revision]." );
-   }
+   $stats->increment( 'editstash.cache_misses.proven_stale' );
+   $logger->info( "Stale cache for key '$key'; old key with 
outside edits. (age: $age sec)" );
 
-   return $editInfo;
+   return false;
}
 
/**
@@ -325,6 +318,8 @@
$ttl = min( $parserOutput->getCacheExpiry() - $since, 
self::MAX_CACHE_TTL );
if ( $ttl <= 0 ) {
return [ null, 0, 'no_ttl' ];
+   } elseif ( $parserOutput->getFlag( 'vary-revision' ) ) {
+   return [ null, 0, 'vary_revision' ];
}
 
// Only store what is actually needed

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib74141254dc712f4376a22d0a3c50c24c62f98a8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.28.0-wmf.6
Gerrit-Owner: Thcipriani 
Gerrit-Reviewer: Anomie 
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] Update the way captions show up in packed-overlay and packed... - change (mediawiki/core)

2016-06-20 Thread Prtksxna (Code Review)
Prtksxna has uploaded a new change for review.

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

Change subject: Update the way captions show up in packed-overlay and 
packed-hover
..

Update the way captions show up in packed-overlay and packed-hover

Instead of taking up the entire height of the thumbnail, this now
shows only the first line of the caption with ellipsis. The rest
of the caption can be seen by hovering over it.

This lets you click the image thumbnail, even when the caption is
too long, and also looks much neater in a gallery of lots of images
and long captions.

Bug: T93393
Change-Id: I6688e9574d72b2ea6acee729ecc1cb2f331cd0f8
---
M resources/src/mediawiki/page/gallery.css
1 file changed, 25 insertions(+), 0 deletions(-)


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

diff --git a/resources/src/mediawiki/page/gallery.css 
b/resources/src/mediawiki/page/gallery.css
index 4d43e6a..4b7dd02 100644
--- a/resources/src/mediawiki/page/gallery.css
+++ b/resources/src/mediawiki/page/gallery.css
@@ -90,10 +90,35 @@
bottom: 0;
left: 0; /* Needed for IE */
height: auto;
+   max-height: 40%;
+   overflow: hidden;
font-weight: bold;
margin: 2px; /* correspond to style on div.thumb */
 }
 
+ul.mw-gallery-packed-hover li.gallerybox:hover div.gallerytextwrapper p,
+ul.mw-gallery-packed-overlay li.gallerybox div.gallerytextwrapper p,
+ul.mw-gallery-packed-hover li.gallerybox.mw-gallery-focused 
div.gallerytextwrapper p {
+   text-overflow: ellipsis;
+   white-space: nowrap;
+   overflow: hidden;
+}
+
+ul.mw-gallery-packed-hover li.gallerybox div.gallerytextwrapper:hover,
+ul.mw-gallery-packed-overlay li.gallerybox div.gallerytextwrapper:hover,
+ul.mw-gallery-packed-hover li.gallerybox.mw-gallery-focused 
div.gallerytextwrapper:hover {
+   overflow: visible;
+   max-height: unset;
+}
+
+ul.mw-gallery-packed-hover li.gallerybox div.gallerytextwrapper:hover p,
+ul.mw-gallery-packed-overlay li.gallerybox div.gallerytextwrapper:hover p,
+ul.mw-gallery-packed-hover li.gallerybox.mw-gallery-focused 
div.gallerytextwrapper:hover p {
+   text-overflow: unset;
+   white-space: unset;
+   overflow: unset;
+}
+
 ul.mw-gallery-packed-hover,
 ul.mw-gallery-packed-overlay,
 ul.mw-gallery-packed {

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

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

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


[MediaWiki-commits] [Gerrit] DHCP: Add mw2243 MAC address Bug:T135466 - change (operations/puppet)

2016-06-20 Thread Elukey (Code Review)
Elukey has submitted this change and it was merged.

Change subject: DHCP: Add mw2243 MAC address Bug:T135466
..


DHCP: Add mw2243 MAC address
Bug:T135466

Change-Id: I77c101d6c5cd7ea46f80b98711d0e3c9a3020364
---
M modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200
1 file changed, 5 insertions(+), 0 deletions(-)

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



diff --git a/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 
b/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200
index 59ebc8d..7893134 100644
--- a/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200
+++ b/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200
@@ -5958,6 +5958,11 @@
 fixed-address mw2242.codfw.wmnet;
 }
 
+host mw2243 {
+hardware ethernet 14:18:77:66:A3:E8;
+fixed-address mw2243.codfw.wmnet;
+}
+
 host mw2244 {
 hardware ethernet 14:18:77:66:7D:CD;
 fixed-address mw2244.codfw.wmnet;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I77c101d6c5cd7ea46f80b98711d0e3c9a3020364
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Papaul 
Gerrit-Reviewer: Elukey 
Gerrit-Reviewer: Giuseppe Lavagetto 
Gerrit-Reviewer: RobH 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Revert "Improve edit stashing when vary-revision is used" - change (mediawiki/core)

2016-06-20 Thread Thcipriani (Code Review)
Thcipriani has uploaded a new change for review.

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

Change subject: Revert "Improve edit stashing when vary-revision is used"
..

Revert "Improve edit stashing when vary-revision is used"

This reverts commit 0887a29e17f0a4bd8a50bfd66ca516ba6acad903.

Pulled down this change as part of morning SWAT, was unclear if it was
supposed to merge, didn't want anyone to sync on accident.

Change-Id: Ib74141254dc712f4376a22d0a3c50c24c62f98a8
---
M includes/api/ApiStashEdit.php
1 file changed, 8 insertions(+), 13 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/35/295235/1

diff --git a/includes/api/ApiStashEdit.php b/includes/api/ApiStashEdit.php
index c8a330a..67939a0 100644
--- a/includes/api/ApiStashEdit.php
+++ b/includes/api/ApiStashEdit.php
@@ -234,34 +234,27 @@
 
$age = time() - wfTimestamp( TS_UNIX, 
$editInfo->output->getCacheTime() );
if ( $age <= self::PRESUME_FRESH_TTL_SEC ) {
-   // Assume nothing changed in this time
$stats->increment( 
'editstash.cache_hits.presumed_fresh' );
$logger->debug( "Timestamp-based cache hit for key 
'$key' (age: $age sec)." );
+   return $editInfo; // assume nothing changed
} elseif ( isset( $editInfo->edits ) && $editInfo->edits === 
$user->getEditCount() ) {
// Logged-in user made no local upload/template edits 
in the meantime
$stats->increment( 
'editstash.cache_hits.presumed_fresh' );
$logger->debug( "Edit count based cache hit for key 
'$key' (age: $age sec)." );
+   return $editInfo;
} elseif ( $user->isAnon()
&& self::lastEditTime( $user ) < 
$editInfo->output->getCacheTime()
) {
// Logged-out user made no local upload/template edits 
in the meantime
$stats->increment( 
'editstash.cache_hits.presumed_fresh' );
$logger->debug( "Edit check based cache hit for key 
'$key' (age: $age sec)." );
-   } else {
-   // User may have changed included content
-   $editInfo = false;
+   return $editInfo;
}
 
-   if ( !$editInfo ) {
-   $stats->increment( 
'editstash.cache_misses.proven_stale' );
-   $logger->info( "Stale cache for key '$key'; old key 
with outside edits. (age: $age sec)" );
-   } elseif ( $editInfo->output->getFlag( 'vary-revision' ) ) {
-   // This can be used for the initial parse, e.g. for 
filters or doEditContent(),
-   // but a second parse will be triggered in 
doEditUpdates(). This is not optimal.
-   $logger->info( "Partially usable cache for key '$key' 
('$title') [vary_revision]." );
-   }
+   $stats->increment( 'editstash.cache_misses.proven_stale' );
+   $logger->info( "Stale cache for key '$key'; old key with 
outside edits. (age: $age sec)" );
 
-   return $editInfo;
+   return false;
}
 
/**
@@ -325,6 +318,8 @@
$ttl = min( $parserOutput->getCacheExpiry() - $since, 
self::MAX_CACHE_TTL );
if ( $ttl <= 0 ) {
return [ null, 0, 'no_ttl' ];
+   } elseif ( $parserOutput->getFlag( 'vary-revision' ) ) {
+   return [ null, 0, 'vary_revision' ];
}
 
// Only store what is actually needed

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib74141254dc712f4376a22d0a3c50c24c62f98a8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.28.0-wmf.6
Gerrit-Owner: Thcipriani 

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


[MediaWiki-commits] [Gerrit] Gracefully handle outdated echo_unread_wikis rows - change (mediawiki...Echo)

2016-06-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Gracefully handle outdated echo_unread_wikis rows
..


Gracefully handle outdated echo_unread_wikis rows

Adds $wgEchoSectionTransition and $wgEchoBundleTransition.
If either of these settings is enabled, we will disbelieve
the alert/message counts in the euw table and obtain them
using server-side cross-wiki API queries instead.

This affects both ApiEchoNotifications (for generating the cross-wiki
summary entry) and the count and timestamp computation in NotifUser.

In bundle transition mode, we trust that notifications are classified
correctly between alerts and messages, but we don't trust the
counts in the table. In section transition mode, we trust that
the sum of the alert and message counts is the correct count,
but we don't trust the alert and message counts individually.
If both modes are enabled, we mistrust anything that's mistrusted
by either mode and only trust what's trusted by both modes.
In any event, we do trust that only the wikis with rows in the
euw table have unread notifications.

Bug: T132954
Change-Id: Ibcc8ac102dac3cf06916d67427b42457fdb93db6
---
M Echo.php
M includes/NotifUser.php
M includes/api/ApiCrossWikiBase.php
M includes/api/ApiEchoNotifications.php
4 files changed, 218 insertions(+), 21 deletions(-)

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



diff --git a/Echo.php b/Echo.php
index 735ce17..9eeeaf4 100644
--- a/Echo.php
+++ b/Echo.php
@@ -151,6 +151,17 @@
 // main one. Must be a key defined in $wgExternalServers
 $wgEchoSharedTrackingCluster = false;
 
+// Enable this when you've changed the section (alert vs message) of a 
notification
+// type, but haven't yet finished running backfillUnreadWikis.php. This setting
+// reduces performance but prevents glitchy and inaccurate information from 
being
+// show to users while the unread_wikis table is being rebuilt.
+$wgEchoSectionTransition = false;
+
+// Enable this when you've changed the way bundled notifications are counted,
+// but haven't yet finished running backfillUnreadWikis.php. Like 
$wgEchoSectionTransition,
+// this setting reduces performance but prevents glitches.
+$wgEchoBundleTransition = false;
+
 // The max number of notifications allowed for a user to do a live update,
 // this is also the number of max notifications allowed for a user to have
 // @FIXME - the name is not intuitive, probably change it when the deleteJob 
patch
diff --git a/includes/NotifUser.php b/includes/NotifUser.php
index 1755c90..546efaa 100644
--- a/includes/NotifUser.php
+++ b/includes/NotifUser.php
@@ -45,6 +45,11 @@
 */
private $cached;
 
+   /**
+* @var array|null
+*/
+   private $mForeignData = null;
+
// The max notification count shown in badge
 
// The max number shown in bundled message, eg,  and 99+ others 
.
@@ -230,7 +235,7 @@
$count = (int) 
$this->userNotifGateway->getCappedNotificationCount( $dbSource, 
$eventTypesToLoad, MWEchoNotifUser::MAX_BADGE_COUNT + 1 );
 
if ( $global ) {
-   $count += $this->getForeignNotifications()->getCount( 
$section );
+   $count += $this->getForeignCount( $section );
}
 
$this->setInCache( $memcKey, $count, 86400 );
@@ -316,7 +321,8 @@
 
// Use timestamp of most recent foreign notification, if it's 
more recent
if ( $global ) {
-   $foreignTime = 
$this->getForeignNotifications()->getTimestamp( $section );
+   $foreignTime = $this->getForeignTimestamp( $section );
+
if (
$foreignTime !== false &&
// $foreignTime < $timestamp = invert 0
@@ -478,16 +484,16 @@
 
if ( $wgEchoCrossWikiNotifications ) {
// For performance, compute the global counts by adding 
foreign counts to the above
-   $globalAlertCount = $alertCount + 
$this->getForeignNotifications()->getCount( EchoAttributeManager::ALERT );
-   $globalMsgCount = $msgCount + 
$this->getForeignNotifications()->getCount( EchoAttributeManager::MESSAGE );
+   $globalAlertCount = $alertCount + 
$this->getForeignCount( EchoAttributeManager::ALERT );
+   $globalMsgCount = $msgCount + $this->getForeignCount( 
EchoAttributeManager::MESSAGE );
$globalAllCount = $globalAlertCount + $globalMsgCount;
 
// For performance, compute the global timestamps as 
max( localTimestamp, foreignTimestamp )
-   $foreignAlertUnread = 
$this->getForeignNotifications()->getTimestamp( EchoAttributeManager::ALERT );
+   $foreignAlertUnread = $this->getForeignTimestamp( 

[MediaWiki-commits] [Gerrit] Enable Echo transition flags in beta labs for testing - change (operations/mediawiki-config)

2016-06-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Enable Echo transition flags in beta labs for testing
..


Enable Echo transition flags in beta labs for testing

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

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



diff --git a/wmf-config/CommonSettings-labs.php 
b/wmf-config/CommonSettings-labs.php
index 91cd28d..053b3a1 100644
--- a/wmf-config/CommonSettings-labs.php
+++ b/wmf-config/CommonSettings-labs.php
@@ -315,6 +315,10 @@
$wgEchoSharedTrackingDB = 'wikishared';
// Set cluster back to false, to override CommonSettings.php setting it 
to 'extension1'
$wgEchoSharedTrackingCluster = false;
+
+   // Testing these transition flags in beta
+   $wgEchoSectionTransition = true;
+   $wgEchoBundleTransition = true;
 }
 
 if ( $wmgUseGraph ) {

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

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

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


[MediaWiki-commits] [Gerrit] Enable Echo transition flags in beta labs for testing - change (operations/mediawiki-config)

2016-06-20 Thread Catrope (Code Review)
Catrope has uploaded a new change for review.

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

Change subject: Enable Echo transition flags in beta labs for testing
..

Enable Echo transition flags in beta labs for testing

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


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

diff --git a/wmf-config/CommonSettings-labs.php 
b/wmf-config/CommonSettings-labs.php
index 91cd28d..053b3a1 100644
--- a/wmf-config/CommonSettings-labs.php
+++ b/wmf-config/CommonSettings-labs.php
@@ -315,6 +315,10 @@
$wgEchoSharedTrackingDB = 'wikishared';
// Set cluster back to false, to override CommonSettings.php setting it 
to 'extension1'
$wgEchoSharedTrackingCluster = false;
+
+   // Testing these transition flags in beta
+   $wgEchoSectionTransition = true;
+   $wgEchoBundleTransition = true;
 }
 
 if ( $wmgUseGraph ) {

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

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

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


[MediaWiki-commits] [Gerrit] Allow sysops to add to/remove from confirmed on ca.wikinews - change (operations/mediawiki-config)

2016-06-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Allow sysops to add to/remove from confirmed on ca.wikinews
..


Allow sysops to add to/remove from confirmed on ca.wikinews

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

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



diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 7605589..b0692c4 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -9038,7 +9038,7 @@
'bureaucrat' => [ 'translationadmin' ], // T75394
],
'+cawikinews' => [
-   'sysop' => [ 'flood' ], // T98576
+   'sysop' => [ 'flood', 'confirmed' ], // T98576, T138069
],
'+cewiki' => [
'sysop' => [ 'rollbacker', 'suppressredirect', 'uploader' ], // 
T128205, T129005
@@ -9715,7 +9715,7 @@
'bureaucrat' => [ 'translationadmin' ], // T75394
],
'+cawikinews' => [
-   'sysop' => [ 'flood' ], // T98576
+   'sysop' => [ 'flood', 'confirmed' ], // T98576, T138069
],
'+cewiki' => [
'sysop' => [ 'rollbacker', 'suppressredirect', 'uploader' ], // 
T128205, T129005

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic06b710df80cd6a86ef490bf2822e82b32f66357
Gerrit-PatchSet: 2
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Dereckson 
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: Luke081515 
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] Add tests for ApiQueryWatchlistRaw - change (mediawiki/core)

2016-06-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Add tests for ApiQueryWatchlistRaw
..


Add tests for ApiQueryWatchlistRaw

This includes tests that originally were part of
I875a92074b52c00ac11db1fa05615abbf5262ab1

Change-Id: I9c07aa237607143985f0efe20ed0065d2bde27e4
---
A tests/phpunit/includes/api/ApiQueryWatchlistRawIntegrationTest.php
1 file changed, 542 insertions(+), 0 deletions(-)

Approvals:
  WMDE-Fisch: Looks good to me, but someone else must approve
  Addshore: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/tests/phpunit/includes/api/ApiQueryWatchlistRawIntegrationTest.php 
b/tests/phpunit/includes/api/ApiQueryWatchlistRawIntegrationTest.php
new file mode 100644
index 000..85bcf5f
--- /dev/null
+++ b/tests/phpunit/includes/api/ApiQueryWatchlistRawIntegrationTest.php
@@ -0,0 +1,542 @@
+getMutableTestUser();
+   self::$users['ApiQueryWatchlistRawIntegrationTestUser2']
+   = $this->getMutableTestUser();
+   $this->doLogin( 'ApiQueryWatchlistRawIntegrationTestUser' );
+   }
+
+   private function getLoggedInTestUser() {
+   return 
self::$users['ApiQueryWatchlistRawIntegrationTestUser']->getUser();
+   }
+
+   private function getNotLoggedInTestUser() {
+   return 
self::$users['ApiQueryWatchlistRawIntegrationTestUser2']->getUser();
+   }
+
+   private function getWatchedItemStore() {
+   return MediaWikiServices::getInstance()->getWatchedItemStore();
+   }
+
+   private function doListWatchlistRawRequest( array $params = [] ) {
+   return $this->doApiRequest( array_merge(
+   [ 'action' => 'query', 'list' => 'watchlistraw' ],
+   $params
+   ) );
+   }
+
+   private function doGeneratorWatchlistRawRequest( array $params = [] ) {
+   return $this->doApiRequest( array_merge(
+   [ 'action' => 'query', 'generator' => 'watchlistraw' ],
+   $params
+   ) );
+   }
+
+   private function getItemsFromApiResponse( array $response ) {
+   return $response[0]['watchlistraw'];
+   }
+
+   public function testListWatchlistRaw_returnsWatchedItems() {
+   $store = $this->getWatchedItemStore();
+   $store->addWatch(
+   $this->getLoggedInTestUser(),
+   new TitleValue( 0, 
'ApiQueryWatchlistRawIntegrationTestPage' )
+   );
+
+   $result = $this->doListWatchlistRawRequest();
+
+   $this->assertArrayHasKey( 'watchlistraw', $result[0] );
+
+   $this->assertEquals(
+   [
+   [
+   'ns' => 0,
+   'title' => 
'ApiQueryWatchlistRawIntegrationTestPage',
+   ],
+   ],
+   $this->getItemsFromApiResponse( $result )
+   );
+   }
+
+   public function testPropChanged_addsNotificationTimestamp() {
+   $target = new TitleValue( 0, 
'ApiQueryWatchlistRawIntegrationTestPage' );
+   $otherUser = $this->getNotLoggedInTestUser();
+
+   $store = $this->getWatchedItemStore();
+
+   $store->addWatch( $this->getLoggedInTestUser(), $target );
+   $store->updateNotificationTimestamp(
+   $otherUser,
+   $target,
+   '20151212010101'
+   );
+
+   $result = $this->doListWatchlistRawRequest( [ 'wrprop' => 
'changed' ] );
+
+   $this->assertEquals(
+   [
+   [
+   'ns' => 0,
+   'title' => 
'ApiQueryWatchlistRawIntegrationTestPage',
+   'changed' => '2015-12-12T01:01:01Z',
+   ],
+   ],
+   $this->getItemsFromApiResponse( $result )
+   );
+   }
+
+   public function testNamespaceParam() {
+   $store = $this->getWatchedItemStore();
+
+   $store->addWatchBatchForUser( $this->getLoggedInTestUser(), [
+   new TitleValue( 0, 
'ApiQueryWatchlistRawIntegrationTestPage' ),
+   new TitleValue( 1, 
'ApiQueryWatchlistRawIntegrationTestPage' ),
+   ] );
+
+   $result = $this->doListWatchlistRawRequest( [ 'wrnamespace' => 
'0' ] );
+
+   $this->assertEquals(
+   [
+   [
+   'ns' => 0,
+   'title' => 
'ApiQueryWatchlistRawIntegrationTestPage',
+   

[MediaWiki-commits] [Gerrit] Use GenderCache service in ApiQueryWatchlistIntegrationTest - change (mediawiki/core)

2016-06-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Use GenderCache service in ApiQueryWatchlistIntegrationTest
..


Use GenderCache service in ApiQueryWatchlistIntegrationTest

Change-Id: I5190c8c91fa4994fcce850067fa7d2a01ccc4424
---
M tests/phpunit/includes/api/ApiQueryWatchlistIntegrationTest.php
1 file changed, 4 insertions(+), 1 deletion(-)

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



diff --git a/tests/phpunit/includes/api/ApiQueryWatchlistIntegrationTest.php 
b/tests/phpunit/includes/api/ApiQueryWatchlistIntegrationTest.php
index def9c5d..898b58e 100644
--- a/tests/phpunit/includes/api/ApiQueryWatchlistIntegrationTest.php
+++ b/tests/phpunit/includes/api/ApiQueryWatchlistIntegrationTest.php
@@ -229,7 +229,10 @@
}
 
private function getTitleFormatter() {
-   return new MediaWikiTitleCodec( Language::factory( 'en' ), 
GenderCache::singleton() );
+   return new MediaWikiTitleCodec(
+   Language::factory( 'en' ),
+   MediaWikiServices::getInstance()->getGenderCache()
+   );
}
 
private function getPrefixedText( LinkTarget $target ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5190c8c91fa4994fcce850067fa7d2a01ccc4424
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: WMDE-leszek 
Gerrit-Reviewer: Addshore 
Gerrit-Reviewer: WMDE-leszek 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Add missing parameter to a message - change (mediawiki...Echo)

2016-06-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Add missing parameter to a message
..


Add missing parameter to a message

This is already done in EditUserTalk-, Mention- and RevertedPresentationModel,
so PageLinked- should be consistent.

Change-Id: I4786406cabab778250d72c7ed92701b940a0a9f7
---
M includes/formatters/PageLinkedPresentationModel.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/includes/formatters/PageLinkedPresentationModel.php 
b/includes/formatters/PageLinkedPresentationModel.php
index c33e141..4587fd1 100644
--- a/includes/formatters/PageLinkedPresentationModel.php
+++ b/includes/formatters/PageLinkedPresentationModel.php
@@ -42,7 +42,7 @@
if ( $revid !== null ) {
$diffLink = array(
'url' => $this->getPageFrom()->getFullURL( 
array( 'diff' => $revid, 'oldid' => 'prev' ) ),
-   'label' => $this->msg( 
'notification-link-text-view-changes' )->text(),
+   'label' => $this->msg( 
'notification-link-text-view-changes', $this->getViewingUserForGender() 
)->text(),
'description' => '',
'icon' => 'changes',
'prioritized' => true

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4786406cabab778250d72c7ed92701b940a0a9f7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: Matěj Suchánek 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Enable NewUserMessage on pl.wikipedia - change (operations/mediawiki-config)

2016-06-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Enable NewUserMessage on pl.wikipedia
..


Enable NewUserMessage on pl.wikipedia

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

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



diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 702320f..7605589 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -11799,6 +11799,7 @@
'ndswiki' => true,
'newiki' => true, // T96823
'pawiki' => true, // T99331
+   'plwiki' => true, // T138169
'pswiki' => true, // T121132
'ptwiktionary' => true, // T46412
'rowiki' => true,
@@ -11862,6 +11863,7 @@
'default' => true,
'arwiki' => false,
'fawiki' => false,
+   'plwiki' => false, // T138169
'incubatorwiki' => false,
 ],
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6a1a80c073e0a3e58a1b0f3f0c4ad97eadf15f40
Gerrit-PatchSet: 2
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Dereckson 
Gerrit-Reviewer: Florianschmidtwelzow 
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] Add rack awareness to the aqs100[456] Cassandra nodes. - change (operations/puppet)

2016-06-20 Thread Elukey (Code Review)
Elukey has uploaded a new change for review.

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

Change subject: Add rack awareness to the aqs100[456] Cassandra nodes.
..

Add rack awareness to the aqs100[456] Cassandra nodes.

Change-Id: I9e9aaf891655c64abdd79441b9aa278278eda5f1
---
M hieradata/hosts/aqs1004.yaml
M hieradata/hosts/aqs1005.yaml
M hieradata/hosts/aqs1006.yaml
3 files changed, 12 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/33/295233/1

diff --git a/hieradata/hosts/aqs1004.yaml b/hieradata/hosts/aqs1004.yaml
index 7643f20..5a9b551 100644
--- a/hieradata/hosts/aqs1004.yaml
+++ b/hieradata/hosts/aqs1004.yaml
@@ -14,11 +14,15 @@
 listen_address: 10.64.0.126 #aqs1004-a.eqiad.wmnet
 rpc_address: 10.64.0.126
 rpc_interface: eth0
+rack: "rack1"
+dc: "eqiad"
   b:
 jmx_port: 7190
 listen_address: 10.64.0.127 #aqs1004-b.eqiad.wmnet
 rpc_address: 10.64.0.127
 rpc_interface: eth0
+rack: "rack1"
+dc: "eqiad"
 
 cassandra::cluster_name: "Analytics Query Service Test"
 
diff --git a/hieradata/hosts/aqs1005.yaml b/hieradata/hosts/aqs1005.yaml
index a10fe30..971fe42 100644
--- a/hieradata/hosts/aqs1005.yaml
+++ b/hieradata/hosts/aqs1005.yaml
@@ -14,11 +14,15 @@
 listen_address: 10.64.32.189 #aqs1005-a.eqiad.wmnet
 rpc_address: 10.64.32.189
 rpc_interface: eth0
+rack: "rack2"
+dc: "eqiad"
   b:
 jmx_port: 7190
 listen_address: 10.64.32.190 #aqs1005-b.eqiad.wmnet
 rpc_address: 10.64.32.190
 rpc_interface: eth0
+rack: "rack2"
+dc: "eqiad"
 
 cassandra::cluster_name: "Analytics Query Service Test"
 
diff --git a/hieradata/hosts/aqs1006.yaml b/hieradata/hosts/aqs1006.yaml
index 65589d7..4a485f8 100644
--- a/hieradata/hosts/aqs1006.yaml
+++ b/hieradata/hosts/aqs1006.yaml
@@ -14,11 +14,15 @@
 listen_address: 10.64.48.148 #aqs1006-a.eqiad.wmnet
 rpc_address: 10.64.48.148
 rpc_interface: eth0
+rack: "rack3"
+dc: "eqiad"
   b:
 jmx_port: 7190
 listen_address: 10.64.48.149 #aqs1006-b.eqiad.wmnet
 rpc_address: 10.64.48.149
 rpc_interface: eth0
+rack: "rack3"
+dc: "eqiad"
 
 cassandra::cluster_name: "Analytics Query Service Test"
 

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

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

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


[MediaWiki-commits] [Gerrit] Split CentralAuthUser::queryAttached into cheap and expensiv... - change (mediawiki...CentralAuth)

2016-06-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Split CentralAuthUser::queryAttached into cheap and expensive 
part
..


Split CentralAuthUser::queryAttached into cheap and expensive part

CentralAuthUser::queryAttached does a single query to look up attached
status and then four queries per attached wiki to extend it with
local data. Local data is not always needed, so split out the cheap part.

This should also reduce the impact of T119736.

Change-Id: I1da755ad9eacd417c8d2c348fb3ff577b5fcf60d
(cherry picked from commit ea6847504659607ceec46e39eaa3f74c95bd11e1)
---
M includes/CentralAuthUser.php
M tests/phpunit/CentralAuthUserTest.php
2 files changed, 43 insertions(+), 13 deletions(-)

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



diff --git a/includes/CentralAuthUser.php b/includes/CentralAuthUser.php
index 8d3f11e..083400c 100644
--- a/includes/CentralAuthUser.php
+++ b/includes/CentralAuthUser.php
@@ -695,7 +695,7 @@
return $this->mHomeWiki;
}
 
-   $attached = $this->queryAttached();
+   $attached = $this->queryAttachedBasic();
 
if ( !count( $attached ) ) {
return null;
@@ -708,9 +708,9 @@
}
}
 
-   // Still null... try harder.
if ( $this->mHomeWiki === null || $this->mHomeWiki === '' ) {
-   reset( $attached );
+   // Still null... try harder.
+   $attached = $this->queryAttached();
$this->mHomeWiki = key( $attached ); // Make sure we 
always have some value
$maxEdits = -1;
foreach ( $attached as $wiki => $acc ) {
@@ -2223,9 +2223,39 @@
 *wiki  The wiki ID (database name)
 *attachedTimestamp The MW timestamp when the account was 
attached
 *attachedMethodAttach method: password, mail or primary
+*...   All information returned by localUserData()
 */
public function queryAttached() {
// Cache $wikis to avoid expensive query whenever possible
+   // mAttachedInfo is shared with queryAttachedBasic(); check 
whether it contains partial data
+   if (
+   $this->mAttachedInfo !== null
+   && ( !$this->mAttachedInfo || array_key_exists( 'id', 
reset( $this->mAttachedInfo ) ) )
+   ) {
+   return $this->mAttachedInfo;
+   }
+
+   $wikis = $this->queryAttachedBasic();
+
+   foreach ( $wikis as $wikiId => $_ ) {
+   $localUser = $this->localUserData( $wikiId );
+   $wikis[$wikiId] = array_merge( $wikis[$wikiId], 
$localUser );
+   }
+
+   $this->mAttachedInfo = $wikis;
+
+   return $wikis;
+   }
+
+   /**
+* Helper method for queryAttached().
+*
+* Does the cheap part of the lookup by checking the cross-wiki 
localuser table,
+* and returns attach time and method.
+*
+* @return array
+*/
+   protected function queryAttachedBasic() {
if ( $this->mAttachedInfo !== null ) {
return $this->mAttachedInfo;
}
@@ -2248,16 +2278,9 @@
$wikis[$row->lu_wiki] = array(
'wiki' => $row->lu_wiki,
'attachedTimestamp' => wfTimestampOrNull( TS_MW,
-$row->lu_attached_timestamp ),
+   $row->lu_attached_timestamp ),
'attachedMethod' => $row->lu_attached_method,
);
-
-   $localUser = $this->localUserData( $row->lu_wiki );
-
-   // Just for fun, add local user data.
-   // Displayed in the steward interface.
-   $wikis[$row->lu_wiki] = array_merge( 
$wikis[$row->lu_wiki],
-   $localUser );
}
 
$this->mAttachedInfo = $wikis;
@@ -2286,6 +2309,8 @@
 
/**
 * Fetch a row of user data needed for migration.
+*
+* Returns most data in the user and ipblocks tables, user groups, and 
editcount.
 *
 * @param $wikiID String
 * @throws Exception if local user not found
@@ -2835,4 +2860,4 @@
private function clearLocalUserCache( $wikiId, $userId ) {
User::purge( $wikiId, $userId );
}
-}
+}
\ No newline at end of file
diff --git a/tests/phpunit/CentralAuthUserTest.php 
b/tests/phpunit/CentralAuthUserTest.php
index 766e7a9..4535343 100644

[MediaWiki-commits] [Gerrit] Enable Flow beta feature on frwikiquote - change (operations/mediawiki-config)

2016-06-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Enable Flow beta feature on frwikiquote
..


Enable Flow beta feature on frwikiquote

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

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



diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 1ca3646..702320f 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -15679,6 +15679,7 @@
'bswiki' => true,
'cawiki' => true, // T120829
'frwiki' => true, // T136684
+   'frwikiquote' => true, // T138064
'frwikisource' => true, // T132914
'frwikivoyage' => true, // T135702
'nowiki' => true, // T132693

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id2077a2b4972b67126b07e4022d3f1479a6131d1
Gerrit-PatchSet: 2
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Catrope 
Gerrit-Reviewer: Florianschmidtwelzow 
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] Add missing parameter to a message - change (mediawiki...Echo)

2016-06-20 Thread Code Review
Matěj Suchánek has uploaded a new change for review.

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

Change subject: Add missing parameter to a message
..

Add missing parameter to a message

This is already done in EditUserTalk-, Mention- and RevertedPresentationModel,
so PageLinked- should be consistent.

Change-Id: I4786406cabab778250d72c7ed92701b940a0a9f7
---
M includes/formatters/PageLinkedPresentationModel.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/includes/formatters/PageLinkedPresentationModel.php 
b/includes/formatters/PageLinkedPresentationModel.php
index c33e141..4587fd1 100644
--- a/includes/formatters/PageLinkedPresentationModel.php
+++ b/includes/formatters/PageLinkedPresentationModel.php
@@ -42,7 +42,7 @@
if ( $revid !== null ) {
$diffLink = array(
'url' => $this->getPageFrom()->getFullURL( 
array( 'diff' => $revid, 'oldid' => 'prev' ) ),
-   'label' => $this->msg( 
'notification-link-text-view-changes' )->text(),
+   'label' => $this->msg( 
'notification-link-text-view-changes', $this->getViewingUserForGender() 
)->text(),
'description' => '',
'icon' => 'changes',
'prioritized' => true

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4786406cabab778250d72c7ed92701b940a0a9f7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: Matěj Suchánek 

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


  1   2   >