[MediaWiki-commits] [Gerrit] mediawiki...BlueSpiceExtensions[master]: Fix for broken dialog on PermissionManager TemplateEditor

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

Change subject: Fix for broken dialog on PermissionManager TemplateEditor
..


Fix for broken dialog on PermissionManager TemplateEditor

On tree panel selection change (beforeselect), if there are changes in
current record, a dialog asking wether to save changes is displayed. If
user says Yes, saveTemplate is called and state is changed to 'clean' (no
changes). Problem is that this setting to clean happens in .done method of
ajax call which comes late, before it gets the chance to set the state to
clean, beforeselect event is fired again, and it tries to dispay the
dialog again, but this time it failes, causing broken dialog.

Added also _closeDialog var, to distinguish when dialog should be closed
(Save button clicked) and when it should remain open (saving after
changing selection)

ERM: #3812

Needs cherry-picking to REL1_27 and REL1_23

Change-Id: I975be9eb6ced6571078dc04a62664be7d83eb784
---
M PermissionManager/resources/BS.PermissionManager/TemplateEditor.js
1 file changed, 22 insertions(+), 6 deletions(-)

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



diff --git a/PermissionManager/resources/BS.PermissionManager/TemplateEditor.js 
b/PermissionManager/resources/BS.PermissionManager/TemplateEditor.js
index 19b1a92..e45e6bd 100644
--- a/PermissionManager/resources/BS.PermissionManager/TemplateEditor.js
+++ b/PermissionManager/resources/BS.PermissionManager/TemplateEditor.js
@@ -15,6 +15,7 @@
closeAction: 'hide',
_cleanState: true,
_hasChanged: false,
+   _closeDialog: true,
constructor: function(config) {
this._treeStore = 
Ext.create('BS.PermissionManager.store.TemplateTree');
this._permissionStore = 
Ext.create('BS.PermissionManager.store.TemplatePermissions');
@@ -34,6 +35,12 @@
hasChanged: function() {
return this._hasChanged;
},
+   setCloseDialog: function(close) {
+   this._closeDialog = close;
+   },
+   getCloseDialog: function() {
+   return this._closeDialog;
+   },
saveTemplate: function() {
var me = this;
var record = Ext.getCmp('bs-template-editor-treepanel')
@@ -47,7 +54,6 @@
};
 
if (typeof record !== 'undefined') {
-
for (var i in me._permissionStore.data.items) {
var dataSet = 
me._permissionStore.data.items[i].data;
if (dataSet.enabled === true) {
@@ -79,17 +85,25 @@

.lookup('bs-permissionmanager-permission-store')

.loadRawData(dataManager.buildPermissionData().permissions);
 
-   
Ext.getCmp('bs-template-editor-treepanel').getSelectionModel().select(
-   
me._treeStore.getNodeById(newRecord.text)
-   );
+   if( me.getCloseDialog() ) {
+   
Ext.getCmp('bs-template-editor-treepanel').getSelectionModel().select(
+   
me._treeStore.getNodeById(newRecord.text)
+   );
+   }
+
mw.notify( mw.msg( 
'bs-permissionmanager-msgtpled-success' ), { title: mw.msg( 
'bs-extjs-title-success' ) } );
} else {
bs.util.alert( 'bs-pm-save-tpl-error', {
text: result.msg
});
}
-   me.hide();
+
+   if ( me.getCloseDialog() ) {
+   me.hide();
+   }
+   me.setCloseDialog(true);
});
+
}
},
discardChanges: function() {
@@ -115,7 +129,9 @@
text: 
mw.message('bs-permissionmanager-msgtpled-saveonabort').plain()
});
dialog.on('ok', function() {
+   me.setCloseDialog(false);
me.saveTemplate();
+   me.setCleanState(true);
if (record !== false) {

Ext.getCmp('bs-template-editor-treepanel').getSelectionModel().select(record);
}
@@ -311,4 +327,4 @@
   

[MediaWiki-commits] [Gerrit] mediawiki...BlueSpiceExtensions[REL1_23]: Add 'source' tag to InsertMagic

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

Change subject: Add 'source' tag to InsertMagic
..


Add 'source' tag to InsertMagic

Change-Id: Ieda84a58c75b2fdeed7cb531de7929918cabfb8a
---
M CSyntaxHighlight/CSyntaxHighlight.class.php
M CSyntaxHighlight/CSyntaxHighlight.setup.php
M CSyntaxHighlight/i18n/en.json
M CSyntaxHighlight/i18n/qqq.json
4 files changed, 28 insertions(+), 3 deletions(-)

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



diff --git a/CSyntaxHighlight/CSyntaxHighlight.class.php 
b/CSyntaxHighlight/CSyntaxHighlight.class.php
index cc2221e..8829cba 100644
--- a/CSyntaxHighlight/CSyntaxHighlight.class.php
+++ b/CSyntaxHighlight/CSyntaxHighlight.class.php
@@ -179,4 +179,25 @@
return true;
}
 
+   /**
+* Hook-Handler for Hook 'BSInsertMagicAjaxGetData'
+* @param object $oResponse
+* @param string $sType
+* @return boolean Always true to keep hook running
+*/
+   public function onBSInsertMagicAjaxGetData( $oResponse, $sType ) {
+   if( $sType !== "tags" ) return true;
+
+   $oDescriptor = new stdClass();
+   $oDescriptor->id = "";
+   $oDescriptor->type = 'tag';
+   $oDescriptor->name = "source";
+   $oDescriptor->desc = wfMessage( 'bs-csyntaxhighlight-tag-desc' 
)->text();
+   $oDescriptor->helplink = 
'https://help.bluespice.com/index.php/CSyntaxHighlight';
+   $oDescriptor->code = "";
+   $oDescriptor->previewable = true;
+
+   $oResponse->result[] = $oDescriptor;
+   return true;
+   }
 }
\ No newline at end of file
diff --git a/CSyntaxHighlight/CSyntaxHighlight.setup.php 
b/CSyntaxHighlight/CSyntaxHighlight.setup.php
index c632dc3..4644cbd 100644
--- a/CSyntaxHighlight/CSyntaxHighlight.setup.php
+++ b/CSyntaxHighlight/CSyntaxHighlight.setup.php
@@ -6,4 +6,6 @@
 
 $wgMessagesDirs['CSyntaxHighlight'] = __DIR__ . '/i18n';
 
-$wgExtensionMessagesFiles['CSyntaxHighlight'] = __DIR__ . 
'/languages/CSyntaxHighlight.i18n.php';
\ No newline at end of file
+$wgExtensionMessagesFiles['CSyntaxHighlight'] = __DIR__ . 
'/languages/CSyntaxHighlight.i18n.php';
+
+$wgHooks['BSInsertMagicAjaxGetData'][] = 
"CSyntaxHighlight::onBSInsertMagicAjaxGetData";
\ No newline at end of file
diff --git a/CSyntaxHighlight/i18n/en.json b/CSyntaxHighlight/i18n/en.json
index d56a634..02accd4 100644
--- a/CSyntaxHighlight/i18n/en.json
+++ b/CSyntaxHighlight/i18n/en.json
@@ -9,5 +9,6 @@
"bs-csyntaxhighlight-pref-theme": "Theme:",
"bs-csyntaxhighlight-pref-gutter": "Show line numbers",
"bs-csyntaxhighlight-pref-autolinks": "Link URLs",
-   "bs-csyntaxhighlight-pref-toolbar": "Show toolbar"
+   "bs-csyntaxhighlight-pref-toolbar": "Show toolbar",
+   "bs-csyntaxhighlight-tag-desc": "Inserts CSyntaxHighlight tag, used to 
display formatted code snippets"
 }
diff --git a/CSyntaxHighlight/i18n/qqq.json b/CSyntaxHighlight/i18n/qqq.json
index 01de864..6cea8fc 100644
--- a/CSyntaxHighlight/i18n/qqq.json
+++ b/CSyntaxHighlight/i18n/qqq.json
@@ -10,5 +10,6 @@
"bs-csyntaxhighlight-pref-theme": "Option in 
[[Special:Wiki_Admin=Preferences]], label for theme:\n{{Identical|Theme}}",
"bs-csyntaxhighlight-pref-gutter": "Option in 
[[Special:Wiki_Admin=Preferences]], checkbox label for show line numbers",
"bs-csyntaxhighlight-pref-autolinks": "Option in 
[[Special:Wiki_Admin=Preferences]], checkbox label for link URLs",
-   "bs-csyntaxhighlight-pref-toolbar": "Option in 
[[Special:Wiki_Admin=Preferences]], checkbox label for show toolbar"
+   "bs-csyntaxhighlight-pref-toolbar": "Option in 
[[Special:Wiki_Admin=Preferences]], checkbox label for show toolbar",
+   "bs-csyntaxhighlight-tag-desc": "Used in InsertMagic extension, 
description of the tag that displays formatted code snippets."
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ieda84a58c75b2fdeed7cb531de7929918cabfb8a
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions
Gerrit-Branch: REL1_23
Gerrit-Owner: ItSpiderman 
Gerrit-Reviewer: Ljonka 
Gerrit-Reviewer: Mglaser 
Gerrit-Reviewer: Pwirth 
Gerrit-Reviewer: Raimond Spekking 
Gerrit-Reviewer: Robert Vogel 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: db-codfw.php: Repool db2062 - depool db2069

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

Change subject: db-codfw.php: Repool db2062 - depool db2069
..


db-codfw.php: Repool db2062 - depool db2069

db2062 finished the ALTER table so repool it
db2069 needs an ALTER table so depool it

Bug: T132416
Change-Id: I8874f82da47c9fb6739ab521467c3353290d7dbd
---
M wmf-config/db-codfw.php
1 file changed, 4 insertions(+), 4 deletions(-)

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



diff --git a/wmf-config/db-codfw.php b/wmf-config/db-codfw.php
index 0e0fa86..85b3449 100644
--- a/wmf-config/db-codfw.php
+++ b/wmf-config/db-codfw.php
@@ -98,8 +98,8 @@
'db2042' => 50,  # C6 2.9TB 160GB, rc, log
'db2048' => 400, # C6 2.9TB 160GB,
'db2055' => 50,  # D6 3.3TB 160GB, dump (inactive), vslow
-#  'db2062' => 100, # B5 3.3TB 160GB, api #T132416
-   'db2069' => 100, # D6 3.3TB 160GB, api
+   'db2062' => 100, # B5 3.3TB 160GB, api
+#  'db2069' => 100, # D6 3.3TB 160GB, api #T132416
'db2070' => 400, # C5 3.3TB 160GB
],
's2' => [
@@ -244,8 +244,8 @@
'db2055' => 1,
],
'api' => [
-#  'db2062' => 1,
-   'db2069' => 1,
+   'db2062' => 1,
+#  'db2069' => 1,
],
],
's2' => [

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: linux-host-entries: Remove trusty from dbstore1001

2017-02-22 Thread Marostegui (Code Review)
Marostegui has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/339351 )

Change subject: linux-host-entries: Remove trusty from dbstore1001
..

linux-host-entries: Remove trusty from dbstore1001

dbstore1001 is going to be reimaged with new disks, and needs to go to
jessie.

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


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/51/339351/1

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 84faaee..b3bfd06 100644
--- a/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200
+++ b/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200
@@ -1728,8 +1728,6 @@
 host dbstore1001 {
 hardware ethernet C8:1F:66:B8:2A:04;
 fixed-address dbstore1001.eqiad.wmnet;
-option pxelinux.pathprefix "trusty-installer/";
-filename "trusty-installer/ubuntu-installer/amd64/pxelinux.0";
 }
 
 host dbstore1002 {

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

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

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: db-codfw.php: Repool db2062 - depool db2069

2017-02-22 Thread Marostegui (Code Review)
Marostegui has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/339350 )

Change subject: db-codfw.php: Repool db2062 - depool db2069
..

db-codfw.php: Repool db2062 - depool db2069

db2062 finished the ALTER table so repool it
db2069 needs an ALTER table so depool it

Bug: T132416
Change-Id: I8874f82da47c9fb6739ab521467c3353290d7dbd
---
M wmf-config/db-codfw.php
1 file changed, 4 insertions(+), 4 deletions(-)


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

diff --git a/wmf-config/db-codfw.php b/wmf-config/db-codfw.php
index 0e0fa86..85b3449 100644
--- a/wmf-config/db-codfw.php
+++ b/wmf-config/db-codfw.php
@@ -98,8 +98,8 @@
'db2042' => 50,  # C6 2.9TB 160GB, rc, log
'db2048' => 400, # C6 2.9TB 160GB,
'db2055' => 50,  # D6 3.3TB 160GB, dump (inactive), vslow
-#  'db2062' => 100, # B5 3.3TB 160GB, api #T132416
-   'db2069' => 100, # D6 3.3TB 160GB, api
+   'db2062' => 100, # B5 3.3TB 160GB, api
+#  'db2069' => 100, # D6 3.3TB 160GB, api #T132416
'db2070' => 400, # C5 3.3TB 160GB
],
's2' => [
@@ -244,8 +244,8 @@
'db2055' => 1,
],
'api' => [
-#  'db2062' => 1,
-   'db2069' => 1,
+   'db2062' => 1,
+#  'db2069' => 1,
],
],
's2' => [

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

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

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: db-eqiad.php: Restore db1060 original load

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

Change subject: db-eqiad.php: Restore db1060 original load
..


db-eqiad.php: Restore db1060 original load

db1060 was depooled to get the BBU replaced and now restoring its
original load and role on the API service

Bug: T158194
Change-Id: Iae5ae168671473d9c6ee34de3f40cbd757f8e70a
---
M wmf-config/db-eqiad.php
1 file changed, 3 insertions(+), 3 deletions(-)

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



diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php
index 41bf55e..06c5d6d 100644
--- a/wmf-config/db-eqiad.php
+++ b/wmf-config/db-eqiad.php
@@ -111,10 +111,10 @@
'db1021' => 0,   # B1 1.4TB  64GB, vslow, dump
'db1036' => 1,   # B2 1.4TB  64GB, watchlist, recentchanges, 
contributions, logpager
'db1054' => 1,   # A3 2.8TB  96GB, api
-   'db1060' => 20,   # C2 2.8TB  96GB, api #T158194
+   'db1060' => 1,   # C2 2.8TB  96GB, api
 #  'db1063' => 0,   # D1 2.8TB 128GB
 #  'db1067' => 0,   # D1 2.8TB 160GB
-   'db1074' => 300, # A2 3.6TB 512GB, api #T158194
+   'db1074' => 500, # A2 3.6TB 512GB
'db1076' => 500, # B1 3.6TB 512GB
'db1090' => 500, # C3 3.6TB 512GB
],
@@ -278,7 +278,7 @@
],
'api' => [
'db1054' => 1,
-   'db1074' => 1,
+   'db1060' => 1,
],
'watchlist' => [
'db1036' => 1,

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

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

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: db-eqiad.php: Restore db1060 original load

2017-02-22 Thread Marostegui (Code Review)
Marostegui has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/339349 )

Change subject: db-eqiad.php: Restore db1060 original load
..

db-eqiad.php: Restore db1060 original load

db1060 was depooled to get the BBU replaced and now restoring its
original load and role on the API service

Bug: T158194
Change-Id: Iae5ae168671473d9c6ee34de3f40cbd757f8e70a
---
M wmf-config/db-eqiad.php
1 file changed, 3 insertions(+), 3 deletions(-)


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

diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php
index 41bf55e..06c5d6d 100644
--- a/wmf-config/db-eqiad.php
+++ b/wmf-config/db-eqiad.php
@@ -111,10 +111,10 @@
'db1021' => 0,   # B1 1.4TB  64GB, vslow, dump
'db1036' => 1,   # B2 1.4TB  64GB, watchlist, recentchanges, 
contributions, logpager
'db1054' => 1,   # A3 2.8TB  96GB, api
-   'db1060' => 20,   # C2 2.8TB  96GB, api #T158194
+   'db1060' => 1,   # C2 2.8TB  96GB, api
 #  'db1063' => 0,   # D1 2.8TB 128GB
 #  'db1067' => 0,   # D1 2.8TB 160GB
-   'db1074' => 300, # A2 3.6TB 512GB, api #T158194
+   'db1074' => 500, # A2 3.6TB 512GB
'db1076' => 500, # B1 3.6TB 512GB
'db1090' => 500, # C3 3.6TB 512GB
],
@@ -278,7 +278,7 @@
],
'api' => [
'db1054' => 1,
-   'db1074' => 1,
+   'db1060' => 1,
],
'watchlist' => [
'db1036' => 1,

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

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

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: New namespace aliases for itwikiversity

2017-02-22 Thread Urbanecm (Code Review)
Urbanecm has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/339348 )

Change subject: New namespace aliases for itwikiversity
..

New namespace aliases for itwikiversity

NS_USER: U
NS_USER_TALK: UT
NS_PROJECT: WV
NS_PROJECT_TALK: DWV
NS_TEMPLATE: T
NS_TEMPLATE_TALK: DT
NS_HELP: A
NS_HELP_TALK: (DA requested; conflicting with interwiki, solving)
NS_CATEGORY: CAT
NS_CATEGORY_TALK: DCAT
Discussioni area: DAREA
Corso: (C requested; conflicting with interwiki, solving)
Discussioni corso: DC
Materia: (M requested; conflicting with interwiki, solving)
Discussioni materia: DM
Dipartimento: DIP
Discussioni dipartimento: DDIP

Bug: T158775
Change-Id: Ibd91b809854783038fda5cf6fa6541b1b3fa6db3
---
M wmf-config/InitialiseSettings.php
1 file changed, 14 insertions(+), 0 deletions(-)


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 43b900d..6345ca0 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -3307,6 +3307,20 @@
'+itwikiversity' => [
'Facoltà' => 100,
'Discussioni_facoltà' => 101
+   'U' => NS_USER, // T158775
+   'UT' => NS_USER_TALK, // T158775
+   'WV' => NS_PROJECT, // T158775
+   'DWV' => NS_PROJECT_TALK, // T158775
+   'T' => NS_TEMPLATE, // T158775
+   'DT' => NS_TEMPLATE_TALK, // T158775
+   'A' => NS_HELP, // T158775
+   'CAT' => NS_CATEGORY, // T158775
+   'DCAT' => NS_CATEGORY_TALK, // T158775
+   'DAREA' => 101, // T158775
+   'DC0' => 103, // T158775
+   'DM' => 105, // T158775
+   'DIP' => 106, // T158775
+   'DDIP' => 107, // T158775
],
'+itwiktionary' => [
'WZ' => NS_PROJECT,

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

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

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


[MediaWiki-commits] [Gerrit] wikidata...rdf[master]: Refactor WDQS to use standard prefixes option

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

Change subject: Refactor WDQS to use standard prefixes option
..


Refactor WDQS to use standard prefixes option

Use -Dcom.bigdata.rdf.sail.sparql.PrefixDeclProcessor.additionalDeclsFile=file 
instead of
a homebrew option.
See also: https://jira.blazegraph.com/browse/BLZG-1773

Change-Id: Ief366782d5f8a2ec50809fbc69445ad604165aa9
---
M 
blazegraph/src/main/java/org/wikidata/query/rdf/blazegraph/WikibaseContextListener.java
M common/src/main/java/org/wikidata/query/rdf/common/uri/WikibaseUris.java
M dist/src/script/prefixes.conf
M dist/src/script/runBlazegraph.sh
4 files changed, 4 insertions(+), 70 deletions(-)

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



diff --git 
a/blazegraph/src/main/java/org/wikidata/query/rdf/blazegraph/WikibaseContextListener.java
 
b/blazegraph/src/main/java/org/wikidata/query/rdf/blazegraph/WikibaseContextListener.java
index 7bf98ff..8121eef 100644
--- 
a/blazegraph/src/main/java/org/wikidata/query/rdf/blazegraph/WikibaseContextListener.java
+++ 
b/blazegraph/src/main/java/org/wikidata/query/rdf/blazegraph/WikibaseContextListener.java
@@ -188,11 +188,6 @@
 defaultDecls.put("owl", OWL.NAMESPACE);
 defaultDecls.put("geo", GeoSparql.NAMESPACE);
 defaultDecls.put("geof", GeoSparql.FUNCTION_NAMESPACE);
-// Add supplemental prefixes
-final Map extra = uris.getExtraPrefixes();
-for (String pref: extra.keySet()) {
-defaultDecls.put(pref, extra.get(pref));
-}
 }
 
 @Override
diff --git 
a/common/src/main/java/org/wikidata/query/rdf/common/uri/WikibaseUris.java 
b/common/src/main/java/org/wikidata/query/rdf/common/uri/WikibaseUris.java
index 5c23901..68dc6b2 100644
--- a/common/src/main/java/org/wikidata/query/rdf/common/uri/WikibaseUris.java
+++ b/common/src/main/java/org/wikidata/query/rdf/common/uri/WikibaseUris.java
@@ -1,12 +1,5 @@
 package org.wikidata.query.rdf.common.uri;
 
-import java.io.BufferedReader;
-import java.io.FileNotFoundException;
-import java.io.FileReader;
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.Map;
-
 /**
  * Uris wikibase uses that are relative to the wikibase instance.
  */
@@ -22,19 +15,10 @@
 public static final String WIKIBASE_HOST_PROPERTY = "wikibaseHost";
 
 /**
- * Third-party prefixes filename.
- */
-public static final String WIKIBASE_PREFIXES = "wikibasePrefixes";
-/**
  * Current URI system. This is static since each instance has only one URI
  * system.
  */
 private static WikibaseUris uriSystem;
-
-/**
- * Extra prefixes list.
- */
-private static Map extraPrefixes;
 
 /**
  * Property types used in the ontology.
@@ -196,12 +180,6 @@
 query.append("PREFIX ").append(p.prefix()).append(": <")
 .append(prop).append(p.suffix()).append(">\n");
 }
-// Add extra prefixes
-final Map extra = getExtraPrefixes();
-for (String pref : extra.keySet()) {
-query.append("PREFIX ").append(pref).append(": <").append(prop)
-.append(extra.get(pref)).append(">\n");
-}
 return query;
 }
 
@@ -284,43 +262,4 @@
 return uriSystem;
 }
 
-/**
- * Get the list of extra prefixes.
- * @return
- */
-public static Map getExtraPrefixes() {
-if (extraPrefixes == null) {
-extraPrefixes = new HashMap<>();
-if (System.getProperty(WIKIBASE_PREFIXES) != null) {
-
ForbiddenOk.readPrefixes(System.getProperty(WIKIBASE_PREFIXES), extraPrefixes);
-}
-}
-return extraPrefixes;
-}
-
-/**
- * Methods in this class are ignored by the forbiddenapis checks. Thus you
- * need to really really really be sure what you are putting in here is
- * right.
- */
-private static class ForbiddenOk {
-/**
- * Read space-separated prefixes list into map.
- * @param filename File where prefixes are.
- * @param prefixes Prefixes map.
- */
-private static void readPrefixes(String filename, Map 
prefixes) {
-try (BufferedReader br = new BufferedReader(new 
FileReader(filename))) {
-String line;
-while ((line = br.readLine()) != null) {
-String[] parts = line.split("\\s+");
-prefixes.put(parts[0], parts[1]);
-}
-} catch (FileNotFoundException e) {
-throw new RuntimeException("Bad prefix filename: " + filename);
-} catch (IOException e) {
-// not much to do here, just continue
-}
-}
-}
 }
diff 

[MediaWiki-commits] [Gerrit] wikidata...rdf[master]: Make LDF resolve known prefixes

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

Change subject: Make LDF resolve known prefixes
..

Make LDF resolve known prefixes

Bug: T158249
Change-Id: I299ecf44da2348e2100ed8df2f115876b4697650
---
M 
blazegraph/src/main/java/org/wikidata/query/rdf/blazegraph/ldf/TriplePatternElementParserForBlazegraph.java
1 file changed, 15 insertions(+), 1 deletion(-)


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

diff --git 
a/blazegraph/src/main/java/org/wikidata/query/rdf/blazegraph/ldf/TriplePatternElementParserForBlazegraph.java
 
b/blazegraph/src/main/java/org/wikidata/query/rdf/blazegraph/ldf/TriplePatternElementParserForBlazegraph.java
index 7b6af63..9a59e71 100644
--- 
a/blazegraph/src/main/java/org/wikidata/query/rdf/blazegraph/ldf/TriplePatternElementParserForBlazegraph.java
+++ 
b/blazegraph/src/main/java/org/wikidata/query/rdf/blazegraph/ldf/TriplePatternElementParserForBlazegraph.java
@@ -4,6 +4,7 @@
 import com.bigdata.rdf.model.BigdataURI;
 import com.bigdata.rdf.model.BigdataValue;
 import com.bigdata.rdf.model.BigdataValueFactory;
+import com.bigdata.rdf.sail.sparql.PrefixDeclProcessor;
 
 import org.linkeddatafragments.util.TriplePatternElementParser;
 
@@ -39,9 +40,22 @@
 return valueFactory.createBNode(label);
 }
 
+/**
+ * If URL has known prefix, resolve it.
+ * @param uri
+ * @return
+ */
+private String resolvePossiblePrefix(final String uri) {
+final String[] parts = uri.split(":", 2);
+if (PrefixDeclProcessor.defaultDecls.containsKey(parts[0])) {
+return PrefixDeclProcessor.defaultDecls.get(parts[0]) + parts[1];
+}
+return uri;
+}
+
 @Override
 public BigdataValue createURI(final String uri) {
-return valueFactory.createURI(uri);
+return valueFactory.createURI(resolvePossiblePrefix(uri));
 }
 
 @Override

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: Remove unused PrefixOptionsReverseMap

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

Change subject: Remove unused PrefixOptionsReverseMap
..


Remove unused PrefixOptionsReverseMap

Change-Id: Icad2f6d8e1187d96eafbf32e99814699736a2c55
---
M lib/config/WikitextConstants.js
1 file changed, 0 insertions(+), 7 deletions(-)

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



diff --git a/lib/config/WikitextConstants.js b/lib/config/WikitextConstants.js
index bdae1ac..c72c8b8 100644
--- a/lib/config/WikitextConstants.js
+++ b/lib/config/WikitextConstants.js
@@ -30,8 +30,6 @@
'img_class':   'class',
'img_manualthumb': 'manualthumb',
}),
-   /* filled in below, based on PrefixOptions */
-   PrefixOptionsReverseMap: new Map(),
SimpleOptions: JSUtils.mapObject({
// halign
'img_left':   'halign',
@@ -277,11 +275,6 @@
// This information is derived from WtTagWidths and set below.
ZeroWidthWikitextTags: new Set(),
 };
-
-// Fill in reverse map of prefix options.
-WikitextConstants.Image.PrefixOptions.forEach(function(v, k) {
-   WikitextConstants.Image.PrefixOptionsReverseMap.set(v, k);
-});
 
 // Derived information from 'WtTagWidths'
 WikitextConstants.WtTagWidths.forEach(function(widths, tag) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Icad2f6d8e1187d96eafbf32e99814699736a2c55
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Arlolra 
Gerrit-Reviewer: C. Scott Ananian 
Gerrit-Reviewer: Subramanya Sastry 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: Get rid of PARSOID_MOCKAPI_URL env var

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

Change subject: Get rid of PARSOID_MOCKAPI_URL env var
..


Get rid of PARSOID_MOCKAPI_URL env var

Change-Id: I1e4f1de7d41f22a2f392df37ddfde74ee51f46b6
---
M tests/mocha/api.js
M tests/mocha/apitest.localsettings.js
M tests/mocha/templatedata.js
M tests/rttest.localsettings.js
M tests/serviceWrapper.js
5 files changed, 15 insertions(+), 23 deletions(-)

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



diff --git a/tests/mocha/api.js b/tests/mocha/api.js
index d63592f..fc764c8 100644
--- a/tests/mocha/api.js
+++ b/tests/mocha/api.js
@@ -22,7 +22,7 @@
 
 describe('Parsoid API', function() {
var api, runner;
-   var mockDomain = 'mock.domain';
+   var mockDomain = 'customwiki';
 
before(function() {
return serviceWrapper.runServices({
diff --git a/tests/mocha/apitest.localsettings.js 
b/tests/mocha/apitest.localsettings.js
index d99ee0f..0549a40 100644
--- a/tests/mocha/apitest.localsettings.js
+++ b/tests/mocha/apitest.localsettings.js
@@ -1,15 +1,6 @@
 'use strict';
 
 exports.setup = function(parsoidConfig) {
-   // The URL of your MediaWiki API endpoint.
-   if (process.env.PARSOID_MOCKAPI_URL) {
-   parsoidConfig.setMwApi({
-   prefix: 'mock.prefix',
-   domain: 'mock.domain',
-   uri: process.env.PARSOID_MOCKAPI_URL,
-   });
-   }
-
// We pre-define wikipedias as 'enwiki', 'dewiki' etc. Similarly
// for other projects: 'enwiktionary', 'enwikiquote', 'enwikibooks',
// 'enwikivoyage' etc. (default false)
diff --git a/tests/mocha/templatedata.js b/tests/mocha/templatedata.js
index b0cff25..a6c83fc 100644
--- a/tests/mocha/templatedata.js
+++ b/tests/mocha/templatedata.js
@@ -17,6 +17,7 @@
 
 var api, runner;
 var defaultContentVersion = '1.3.0';
+var mockDomain = 'customwiki';
 
 function verifyTransformation(newHTML, origHTML, origWT, expectedWT, done, 
dpVersion) {
var payload = { html: newHTML };
@@ -51,7 +52,7 @@
}
 
return request(api)
-   .post('mock.domain/v3/transform/pagebundle/to/wikitext')
+   .post(mockDomain + '/v3/transform/pagebundle/to/wikitext')
.send(payload)
.expect(function(res) {
res.text.should.equal(expectedWT);
diff --git a/tests/rttest.localsettings.js b/tests/rttest.localsettings.js
index 133f848..0da6f50 100644
--- a/tests/rttest.localsettings.js
+++ b/tests/rttest.localsettings.js
@@ -1,15 +1,6 @@
 'use strict';
 
 exports.setup = function(parsoidConfig) {
-   // The URL of your MediaWiki API endpoint.
-   if (process.env.PARSOID_MOCKAPI_URL) {
-   parsoidConfig.setMwApi({
-   prefix: 'customwiki',
-   domain: 'customwiki',
-   uri: process.env.PARSOID_MOCKAPI_URL,
-   });
-   }
-
// Turn on the batching API
parsoidConfig.useBatchAPI = true;
 
diff --git a/tests/serviceWrapper.js b/tests/serviceWrapper.js
index 5e5fa48..9bae85e 100644
--- a/tests/serviceWrapper.js
+++ b/tests/serviceWrapper.js
@@ -51,14 +51,13 @@
});
}
p = p.then(function(mockURL) {
-   process.env.PARSOID_MOCKAPI_URL = mockURL;
ret.mockURL = mockURL;
});
}
 
if (!options.skipParsoid) {
p = p.then(choosePort).then(function(parsoidPort) {
-   services.push({
+   var pServ = {
module: path.resolve(__dirname, 
'../lib/index.js'),
entrypoint: 'apiServiceWorker',
conf: {
@@ -67,7 +66,17 @@
localsettings: options.localsettings ||
path.resolve(__dirname, 
'./rttest.localsettings.js'),
},
-   });
+   };
+   if (ret.mockURL) {
+   pServ.conf.mwApis = [
+   {
+   prefix: 'customwiki',
+   domain: 'customwiki',
+   uri: ret.mockURL,
+   },
+   ];
+   }
+   services.push(pServ);
ret.parsoidURL = 'http://localhost:' + parsoidPort + 
'/';
});
}

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

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: phpunit: Fix AvroFormatterTest failure on PHP 7

2017-02-22 Thread Krinkle (Code Review)
Krinkle has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/339346 )

Change subject: phpunit: Fix AvroFormatterTest failure on PHP 7
..

phpunit: Fix AvroFormatterTest failure on PHP 7

Fix the following error on PHP 7.

> MediaWiki\Logger\Monolog\AvroFormatterTest::testDoesSomethingWhenSchemaAvailable
> Only variables should be passed by reference
> includes/debug/logger/monolog/AvroFormatter.php:143

Per 
https://github.com/researchgate/avro-php/blob/1.8.0/lib/avro/schema.php#L311-L314
the default for &$schemata is null, which is filled with a plain 
AvroNamedSchemata
instance. So this parameter is obsolete.

Either it needs to be assigned here and then passed. But since we don't use
it anywhere and don't pass it any constructor arguments, the default
should suffice.

Bug: T75176
Bug: T141588
Change-Id: I144bed8a78eb267a97e41f379b89c5faaae30625
---
M includes/debug/logger/monolog/AvroFormatter.php
1 file changed, 1 insertion(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/46/339346/1

diff --git a/includes/debug/logger/monolog/AvroFormatter.php 
b/includes/debug/logger/monolog/AvroFormatter.php
index ce0cda1..2700daa 100644
--- a/includes/debug/logger/monolog/AvroFormatter.php
+++ b/includes/debug/logger/monolog/AvroFormatter.php
@@ -138,9 +138,7 @@
$this->schemas[$channel]['schema'] = 
AvroSchema::parse( $schema );
} else {
$this->schemas[$channel]['schema'] = 
AvroSchema::real_parse(
-   $schema,
-   null,
-   new AvroNamedSchemata()
+   $schema
);
}
}

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: build: Change Travis image from precise to trusty (Fix HHVM ...

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

Change subject: build: Change Travis image from precise to trusty (Fix HHVM 
build)
..


build: Change Travis image from precise to trusty (Fix HHVM build)

Follows-up 67737a267f.

Per 
using hhvm-3.12 requires a trusty image. The upstream source at
 doesn't provide it for precise.

In addition to changing to trusty, we also need to:
* Set 'sudo: required' and 'group: edge'.
  Because lightweight "sudo: false" containers are still
  precise-only. There is a beta test and I tried it, but it
  doesn't support out apt-get install commands yet.

* Change mysql user from 'travis' to 'root'.
  The fact that 'travis' supports creating databases on precise
  is undocumented. One is supposed to use 'root' for this,
  which is required on Trusty.
  
  Without this, install.php fails.

More details at .

This config was tested and passed at
.

Bug: T75175
Change-Id: Ic59936734211b68d9701119a551d3bd1b83c845e
---
M .travis.yml
1 file changed, 7 insertions(+), 1 deletion(-)

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



diff --git a/.travis.yml b/.travis.yml
index 80769dc..ec7bac3 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -7,6 +7,12 @@
 # complement that setup by testing MediaWiki on travis
 #
 language: php
+# Using HHVM-3.6+ requires Trusty (Travis default: precise)
+# https://docs.travis-ci.com/user/languages/php#HHVM-versions
+# https://github.com/travis-ci/travis-ci/issues/7368
+sudo: required
+group: edge
+dist: trusty
 
 matrix:
   fast_finish: true
@@ -44,7 +50,7 @@
   --pass travis
   --dbtype "$dbtype"
   --dbname traviswiki
-  --dbuser travis
+  --dbuser root
   --dbpass ""
   --scriptpath "/w"
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic59936734211b68d9701119a551d3bd1b83c845e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Krinkle 
Gerrit-Reviewer: BryanDavis 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: build: Change Travis image from precise to trusty (Fix HHVM ...

2017-02-22 Thread Krinkle (Code Review)
Krinkle has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/339345 )

Change subject: build: Change Travis image from precise to trusty (Fix HHVM 
build)
..

build: Change Travis image from precise to trusty (Fix HHVM build)

Follows-up 67737a267f.

Per 
using hhvm-3.12 requires a trusty image. The upstream source at
 doesn't provide it for precise.

In addition to changing to trusty, we also need to:
* Set 'sudo: required' and 'group: edge'.
  Because lightweight "sudo: false" containers are still
  precise-only. There is a beta test and I tried it, but it
  doesn't support out apt-get install commands yet.

* Change mysql user from 'travis' to 'root'.
  The fact that 'travis' supports creating databases on precise
  is undocumented. One is supposed to use 'root' for this,
  which is required on Trusty.
  
  Without this, install.php fails.

More details at .

This config was tested and passed at
.

Bug: T75175
Change-Id: Ic59936734211b68d9701119a551d3bd1b83c845e
---
M .travis.yml
1 file changed, 7 insertions(+), 1 deletion(-)


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

diff --git a/.travis.yml b/.travis.yml
index 80769dc..ec7bac3 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -7,6 +7,12 @@
 # complement that setup by testing MediaWiki on travis
 #
 language: php
+# Using HHVM-3.6+ requires Trusty (Travis default: precise)
+# https://docs.travis-ci.com/user/languages/php#HHVM-versions
+# https://github.com/travis-ci/travis-ci/issues/7368
+sudo: required
+group: edge
+dist: trusty
 
 matrix:
   fast_finish: true
@@ -44,7 +50,7 @@
   --pass travis
   --dbtype "$dbtype"
   --dbname traviswiki
-  --dbuser travis
+  --dbuser root
   --dbpass ""
   --scriptpath "/w"
 

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: Remove unused PrefixOptionsReverseMap

2017-02-22 Thread Arlolra (Code Review)
Arlolra has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/339344 )

Change subject: Remove unused PrefixOptionsReverseMap
..

Remove unused PrefixOptionsReverseMap

Change-Id: Icad2f6d8e1187d96eafbf32e99814699736a2c55
---
M lib/config/WikitextConstants.js
1 file changed, 0 insertions(+), 7 deletions(-)


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

diff --git a/lib/config/WikitextConstants.js b/lib/config/WikitextConstants.js
index bdae1ac..c72c8b8 100644
--- a/lib/config/WikitextConstants.js
+++ b/lib/config/WikitextConstants.js
@@ -30,8 +30,6 @@
'img_class':   'class',
'img_manualthumb': 'manualthumb',
}),
-   /* filled in below, based on PrefixOptions */
-   PrefixOptionsReverseMap: new Map(),
SimpleOptions: JSUtils.mapObject({
// halign
'img_left':   'halign',
@@ -277,11 +275,6 @@
// This information is derived from WtTagWidths and set below.
ZeroWidthWikitextTags: new Set(),
 };
-
-// Fill in reverse map of prefix options.
-WikitextConstants.Image.PrefixOptions.forEach(function(v, k) {
-   WikitextConstants.Image.PrefixOptionsReverseMap.set(v, k);
-});
 
 // Derived information from 'WtTagWidths'
 WikitextConstants.WtTagWidths.forEach(function(widths, tag) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Icad2f6d8e1187d96eafbf32e99814699736a2c55
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Arlolra 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: k8s: Install socat on worker nodes

2017-02-22 Thread Yuvipanda (Code Review)
Yuvipanda has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/339343 )

Change subject: k8s: Install socat on worker nodes
..


k8s: Install socat on worker nodes

Change-Id: I2f9191fa0c0565f30b0b93f739776d379062432f
---
M modules/k8s/manifests/kubelet.pp
1 file changed, 3 insertions(+), 0 deletions(-)

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



diff --git a/modules/k8s/manifests/kubelet.pp b/modules/k8s/manifests/kubelet.pp
index 2e65df4..fb46eba 100644
--- a/modules/k8s/manifests/kubelet.pp
+++ b/modules/k8s/manifests/kubelet.pp
@@ -24,6 +24,9 @@
 }
 }
 
+# Needed on k8s nodes for kubectl proxying to work
+ensure_packages(['socat'])
+
 file { '/etc/default/kubelet':
 ensure  => file,
 owner   => 'root',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2f9191fa0c0565f30b0b93f739776d379062432f
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Yuvipanda 
Gerrit-Reviewer: Yuvipanda 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: k8s: Install socat on worker nodes

2017-02-22 Thread Yuvipanda (Code Review)
Yuvipanda has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/339343 )

Change subject: k8s: Install socat on worker nodes
..

k8s: Install socat on worker nodes

Change-Id: I2f9191fa0c0565f30b0b93f739776d379062432f
---
M modules/k8s/manifests/kubelet.pp
1 file changed, 3 insertions(+), 0 deletions(-)


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

diff --git a/modules/k8s/manifests/kubelet.pp b/modules/k8s/manifests/kubelet.pp
index 2e65df4..fb46eba 100644
--- a/modules/k8s/manifests/kubelet.pp
+++ b/modules/k8s/manifests/kubelet.pp
@@ -24,6 +24,9 @@
 }
 }
 
+# Needed on k8s nodes for kubectl proxying to work
+ensure_packages(['socat'])
+
 file { '/etc/default/kubelet':
 ensure  => file,
 owner   => 'root',

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: GallerySlideshow: Always set image height, adjust according ...

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

Change subject: GallerySlideshow: Always set image height, adjust according to 
caption size
..


GallerySlideshow: Always set image height, adjust according to caption size

When the size of the caption changes (for example one word vs four lines) the
content below jumps because of the space the caption is taking.

We now adjust the height of the image based on the height of the caption to
avoid jumping.

Bug: T140596
Change-Id: I567652ff8b1483cef474493dd5bd790e95288b30
---
M resources/src/mediawiki/page/gallery-slideshow.js
1 file changed, 9 insertions(+), 10 deletions(-)

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



diff --git a/resources/src/mediawiki/page/gallery-slideshow.js 
b/resources/src/mediawiki/page/gallery-slideshow.js
index e651c9c..3cb8e9d 100644
--- a/resources/src/mediawiki/page/gallery-slideshow.js
+++ b/resources/src/mediawiki/page/gallery-slideshow.js
@@ -232,11 +232,7 @@
.removeAttr( 'height' );
 
// Stretch image to take up the required size
-   if ( this.$thumbnail.width() > this.$thumbnail.height() ) {
-   this.$img.attr( 'width', this.imageWidth + 'px' );
-   } else {
-   this.$img.attr( 'height', this.imageHeight + 'px' );
-   }
+   this.$img.attr( 'height', ( this.imageHeight - 
this.$imgCaption.outerHeight() ) + 'px' );
 
// Make the image smaller in case the current image
// size is larger than the original file size.
@@ -262,25 +258,28 @@
var imageLi = this.getCurrentImage(),
caption = imageLi.find( '.gallerytext' );
 
-   // Highlight current thumbnail
+   // The order of the following is important for size calculations
+   // 1. Highlight current thumbnail
this.$gallery
.find( '.gallerybox.slideshow-current' )
.removeClass( 'slideshow-current' );
imageLi.addClass( 'slideshow-current' );
 
-   // Show thumbnail stretched to the right size while the image 
loads
+   // 2. Show thumbnail
this.$thumbnail = imageLi.find( 'img' );
this.$img.attr( 'src', this.$thumbnail.attr( 'src' ) );
this.$img.attr( 'alt', this.$thumbnail.attr( 'alt' ) );
this.$imgLink.attr( 'href', imageLi.find( 'a' ).eq( 0 ).attr( 
'href' ) );
-   this.setImageSize();
 
-   // Copy caption
+   // 3. Copy caption
this.$imgCaption
.empty()
.append( caption.clone() );
 
-   // Load image at the required size
+   // 4. Stretch thumbnail to correct size
+   this.setImageSize();
+
+   // 5. Load image at the required size
this.loadImage( this.$thumbnail ).done( function ( info, $img ) 
{
// Show this image to the user only if its still the 
current one
if ( this.$thumbnail.attr( 'src' ) === $img.attr( 'src' 
) ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I567652ff8b1483cef474493dd5bd790e95288b30
Gerrit-PatchSet: 6
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Prtksxna 
Gerrit-Reviewer: Jack Phoenix 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: MarkTraceur 
Gerrit-Reviewer: Prtksxna 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: Support "videoinfo" in batching

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

Change subject: Support "videoinfo" in batching
..


Support "videoinfo" in batching

 * Follow up to e23a8185

 * Requires I3c651bea67b2ea29fb49edc471040bfa041473a8

 * This also keeps it disabled until the necessary changes to the
   batching api are merged and deployed.

Change-Id: Iec9b4d88aebab183277f5e1559173071fe9d5680
---
M lib/config/WikiConfig.js
M lib/mw/ApiRequest.js
M lib/mw/Batcher.js
3 files changed, 8 insertions(+), 6 deletions(-)

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



diff --git a/lib/config/WikiConfig.js b/lib/config/WikiConfig.js
index 0e12724..a08243e 100644
--- a/lib/config/WikiConfig.js
+++ b/lib/config/WikiConfig.js
@@ -822,7 +822,7 @@
this.useVideoInfo = Array.isArray(query.parameters)
&& query.parameters.some(function(o) {
return o && o.name === 'prop' && 
o.type.indexOf('videoinfo') > -1;
-   });
+   }) && !env.conf.parsoid.useBatchAPI;  // Disabled for batching 
until deployed
}.bind(this));
 };
 
diff --git a/lib/mw/ApiRequest.js b/lib/mw/ApiRequest.js
index 646e479..51f1845 100644
--- a/lib/mw/ApiRequest.js
+++ b/lib/mw/ApiRequest.js
@@ -844,7 +844,8 @@
mangled = manglePreprocessorResponse(this.env, 
itemResponse);
break;
case 'imageinfo':
-   mangled = {batchResponse: itemResponse};
+   case 'videoinfo':
+   mangled = { batchResponse: itemResponse };
break;
default:
error = new Error("BatchRequest._handleJSON: 
Invalid action");
diff --git a/lib/mw/Batcher.js b/lib/mw/Batcher.js
index db3c53d..8cee7fe 100644
--- a/lib/mw/Batcher.js
+++ b/lib/mw/Batcher.js
@@ -269,17 +269,18 @@
  */
 Batcher.prototype.imageinfo = Promise.method(function(filename, dims) {
var env = this.env;
-   var hash = Util.makeHash(["imageinfo", filename, dims.width || "", 
dims.height || "", env.page.name]);
+   var action = env.conf.wiki.useVideoInfo ? 'videoinfo' : 'imageinfo';
+   var hash = Util.makeHash([action, filename, dims.width || "", 
dims.height || "", env.page.name]);
if (hash in this.resultCache) {
return this.resultCache[hash];
} else if (!env.conf.parsoid.useBatchAPI) {
-   this.trace("Non-batched imageinfo request");
+   this.trace('Non-batched ' + action + ' request');
return this.legacyRequest(api.ImageInfoRequest, [
env, filename, dims, hash,
], hash);
} else {
var params = {
-   action: "imageinfo",
+   action: action,
filename: filename,
hash: hash,
page: env.page.name,
@@ -336,7 +337,7 @@
var apiItemParams;
for (i = 0; i < batchParams.length; i++) {
params = batchParams[i];
-   if (params.action === 'imageinfo') {
+   if (params.action === 'imageinfo' || params.action === 
'videoinfo') {
apiItemParams = {
action: params.action,
filename: params.filename,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iec9b4d88aebab183277f5e1559173071fe9d5680
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Arlolra 
Gerrit-Reviewer: C. Scott Ananian 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Subramanya Sastry 
Gerrit-Reviewer: Tim Starling 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: Add TimedMediaHandler parserTests.txt

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

Change subject: Add TimedMediaHandler parserTests.txt
..


Add TimedMediaHandler parserTests.txt

Change-Id: I207689664053d95e8eada6267c29259742090333
---
M tests/parserTests.json
A tests/timedMediaHandlerParserTests-blacklist.js
A tests/timedMediaHandlerParserTests.txt
3 files changed, 205 insertions(+), 0 deletions(-)

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



diff --git a/tests/parserTests.json b/tests/parserTests.json
index 6cee40b..f3301bf 100644
--- a/tests/parserTests.json
+++ b/tests/parserTests.json
@@ -10,5 +10,11 @@
"path": "tests/parser/citeParserTests.txt",
"expectedSHA1": "1db0e82134bfc66c2b9ba1c899fc00de50f27bcc",
"latestCommit": "440b3179086fe4e52bef28f293918381aa45ff1f"
+   },
+   "timedMediaHandlerParserTests.txt": {
+   "repo": "/wikimedia/mediawiki-extensions-TimedMediaHandler/",
+   "path": "tests/parserTests.txt",
+   "expectedSHA1": "f3bf66579002634106e59e71810ee5d493798673",
+   "latestCommit": "8b8b191624591c0f4d447cb8c6634a9dde39ffd2"
}
 }
\ No newline at end of file
diff --git a/tests/timedMediaHandlerParserTests-blacklist.js 
b/tests/timedMediaHandlerParserTests-blacklist.js
new file mode 100644
index 000..c07b61c
--- /dev/null
+++ b/tests/timedMediaHandlerParserTests-blacklist.js
@@ -0,0 +1,89 @@
+/* A map of tests which we know Parsoid currently fails.
+ *
+ * New patches which fix previously-broken tests should also patch this
+ * file to document which tests are now expected to succeed.
+ *
+ * This helps clean up 'npm test' output, documents known bugs, and helps
+ * Jenkins make sense of the parserTest output.
+ *
+ * NOTE that the selser blacklist depends on tests/selser.changes.json
+ * If the selser change list is modified, this blacklist should be refreshed.
+ *
+ * This blacklist can be automagically updated by running
+ *parserTests.js --rewrite-blacklist
+ * You might want to do this after you fix some bug that makes more tests
+ * pass.  It is still your responsibility to carefully review the blacklist
+ * diff to ensure there are no unexpected new failures (lines added).
+ */
+
+/*
+ * This should map test titles to an array of test types (wt2html, wt2wt,
+ * html2html, html2wt, selser) which are known to fail.
+ * For easier maintenance, we group each test type together, and use a
+ * helper function to create the array if needed then append the test type.
+ */
+'use strict';
+
+var testBlackList = {};
+var add = function(testtype, title, raw) {
+   if (typeof (testBlackList[title]) !== 'object') {
+   testBlackList[title] = {
+   modes: [],
+   raw: raw,
+   };
+   }
+   testBlackList[title].modes.push(testtype);
+};
+
+// ### DO NOT REMOVE THIS LINE ### (start of automatically-generated section)
+
+// Blacklist for wt2html
+add("wt2html", "Simple video element", "");
+add("wt2html", "Simple thumbed video", "");
+add("wt2html", "Video in a ", "\nFile:Video.ogv\n");
+add("wt2html", "Video with thumbtime=1:25", "");
+add("wt2html", "Video with starttime offset", "");
+add("wt2html", "Video with starttime and endtime offsets", "");
+add("wt2html", "Video with unsupported alt", "");
+add("wt2html", "Video with unsupported link", "");
+add("wt2html", "Video with different thumb image", "");
+add("wt2html", "Simple audio element", "");
+
+
+// Blacklist for wt2wt
+
+
+// Blacklist for html2html
+add("html2html", "Simple video element", "video 
poster=\"http://example.com/images/thumb/0/00/Video.ogv/320px--Video.ogv.jpg\; 
controls=\"\" preload=\"none\" style=\"width:320px;height:240px\" 
class=\"kskin\" data-durationhint=\"4.36667\" data-startoffset=\"0\" 
data-mwtitle=\"Video.ogv\" data-mwprovider=\"local\">\nsource 
src=\"http://example.com/images/0/00/Video.ogv\; type=\"video/ogg; 
codecs=quot;theoraquot;\" data-title=\"Original Ogg file, 320 × 240 
(590 kbps)\" data-shorttitle=\"Ogg source\" data-width=\"320\" 
data-height=\"240\" data-bandwidth=\"590013\" data-framerate=\"30\" 
/>/video>");
+add("html2html", "Simple thumbed video", "\n\nvideo 
id=quot;mwe_player_2quot; 
poster=quot;http://example.com/images/thumb/0/00/Video.ogv/320px--Video.ogv.jpgquot;
 controls=quot;quot; preload=quot;nonequot; 
autoplay=quot;quot; 
style=quot;width:320px;height:240pxquot; 
class=quot;kskinquot; 
data-durationhint=quot;4.36667quot; 
data-startoffset=quot;0quot; 
data-mwtitle=quot;Video.ogvquot; 
data-mwprovider=quot;localquot;>source 
src=quot;http://example.com/images/0/00/Video.ogvquot; 
type=quot;video/ogg; codecs=amp;quot;theoraamp;quot;quot; 
data-title=quot;Original Ogg file, 320 × 240 (590 kbps)quot; 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: release-notes: Add Moment.js update

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

Change subject: release-notes: Add Moment.js update
..


release-notes: Add Moment.js update

Follows-up f13a0d952.

Change-Id: Ib4692310c8abee8f6b1f69c664b373f4ea83e2dc
---
M RELEASE-NOTES-1.29
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/RELEASE-NOTES-1.29 b/RELEASE-NOTES-1.29
index a739821..a1ce9d9 100644
--- a/RELEASE-NOTES-1.29
+++ b/RELEASE-NOTES-1.29
@@ -61,6 +61,7 @@
 * Updated QUnit from v1.22.0 to v1.23.1.
 * Updated cssjanus from v1.1.2 to 1.1.3.
 * Updated psr/log from v1.0.0 to v1.0.2.
+* Update Moment.js from v2.8.4 to v2.15.0.
 
  New external libraries 
 

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...Cargo[master]: Added "Recreate data" links to Special:CargoTables

2017-02-22 Thread Yaron Koren (Code Review)
Yaron Koren has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/339342 )

Change subject: Added "Recreate data" links to Special:CargoTables
..


Added "Recreate data" links to Special:CargoTables

Change-Id: Icbdfd01c45f291c1c31a5bd6b9042ee66819f464
---
M specials/CargoTables.php
1 file changed, 12 insertions(+), 0 deletions(-)

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



diff --git a/specials/CargoTables.php b/specials/CargoTables.php
index 09d293f..ad35e83 100644
--- a/specials/CargoTables.php
+++ b/specials/CargoTables.php
@@ -194,6 +194,18 @@
$actionLinks .= ' | ' . Html::element( 'a', array( 
'href' => $drilldownURL ),
$drilldownPage->getDescription() );
 
+   // It's a bit odd to include the "Recreate data"
+   // link, since it's an action for the template and
+   // not the table (if a template defines two tables,
+   // this will recreate both of them), but for standard
+   // setups, this makes things more convenient.
+   if ( $wgUser->isAllowed( 'recreatecargodata' ) && 
array_key_exists( $tableName, $templatesThatDeclareTables ) ) {
+   $firstTemplateID = 
$templatesThatDeclareTables[$tableName][0];
+   $templateTitle = Title::newFromID( 
$firstTemplateID );
+   $actionLinks .= ' | ' . CargoUtils::makeLink( 
$linkRenderer, $templateTitle,
+   $this->msg( 'recreatedata' )->text(), 
array(), array( 'action' => 'recreatedata' ) );
+   }
+
if ( $wgUser->isAllowed( 'deletecargodata' ) ) {
$deleteTablePage = SpecialPageFactory::getPage( 
'DeleteCargoTable' );
$deleteTableURL = 
$deleteTablePage->getTitle()->getLocalURL() . '/' . $tableName;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Icbdfd01c45f291c1c31a5bd6b9042ee66819f464
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Cargo
Gerrit-Branch: master
Gerrit-Owner: Yaron Koren 
Gerrit-Reviewer: Yaron Koren 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: qunit: Make eslint config pass on qunit test files

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

Change subject: qunit: Make eslint config pass on qunit test files
..


qunit: Make eslint config pass on qunit test files

Follows-up c0fb8a8836, I890e6e49b.

* Disable 'qunit' env in general source code. And re-declare
  locally in the few src files that use it properly.

* Create separate eslint config for tests/qunit with various
  rules disabled (e.g. valid-jsdoc and es3-keywords).

Change-Id: I37ccec2019de55edfee92697eb80478df7cb6220
---
M .eslintrc.json
M Gruntfile.js
M resources/src/jquery/jquery.qunit.completenessTest.js
A tests/qunit/.eslintrc.json
M tests/qunit/data/generateJqueryMsgData.php
M tests/qunit/data/mediawiki.jqueryMsg.data.js
M tests/qunit/data/testrunner.js
M tests/qunit/suites/resources/jquery/jquery.accessKeyLabel.test.js
M tests/qunit/suites/resources/jquery/jquery.getAttrs.test.js
M tests/qunit/suites/resources/jquery/jquery.highlightText.test.js
M tests/qunit/suites/resources/jquery/jquery.localize.test.js
M tests/qunit/suites/resources/jquery/jquery.makeCollapsible.test.js
M tests/qunit/suites/resources/jquery/jquery.placeholder.test.js
M tests/qunit/suites/resources/jquery/jquery.tablesorter.parsers.test.js
M tests/qunit/suites/resources/jquery/jquery.tablesorter.test.js
M tests/qunit/suites/resources/jquery/jquery.textSelection.test.js
M tests/qunit/suites/resources/mediawiki.api/mediawiki.api.edit.test.js
M tests/qunit/suites/resources/mediawiki.api/mediawiki.api.options.test.js
M tests/qunit/suites/resources/mediawiki.api/mediawiki.api.parse.test.js
M tests/qunit/suites/resources/mediawiki.api/mediawiki.api.test.js
M tests/qunit/suites/resources/mediawiki.rcfilters/dm.FiltersViewModel.test.js
M tests/qunit/suites/resources/mediawiki/mediawiki.Title.test.js
M tests/qunit/suites/resources/mediawiki/mediawiki.cldr.test.js
M tests/qunit/suites/resources/mediawiki/mediawiki.errorLogger.test.js
M tests/qunit/suites/resources/mediawiki/mediawiki.jqueryMsg.test.js
M tests/qunit/suites/resources/mediawiki/mediawiki.language.test.js
M tests/qunit/suites/resources/mediawiki/mediawiki.loader.test.js
M tests/qunit/suites/resources/mediawiki/mediawiki.util.test.js
M tests/qunit/suites/resources/startup.test.js
29 files changed, 520 insertions(+), 487 deletions(-)

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



diff --git a/.eslintrc.json b/.eslintrc.json
index 98d0f10..64b5ea7 100644
--- a/.eslintrc.json
+++ b/.eslintrc.json
@@ -2,8 +2,7 @@
"extends": "wikimedia",
"env": {
"browser": true,
-   "jquery": true,
-   "qunit": true
+   "jquery": true
},
"globals": {
"require": false,
diff --git a/Gruntfile.js b/Gruntfile.js
index 191286a..0e1c8cb 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -24,12 +24,13 @@
all: [
'**/*.js',
'!docs/**',
-   '!tests/**',
'!node_modules/**',
'!resources/lib/**',
'!resources/src/jquery.tipsy/**',
'!resources/src/jquery/jquery.farbtastic.js',
'!resources/src/mediawiki.libs/**',
+   // Third-party code of PHPUnit coverage report
+   '!tests/coverage/**',
'!vendor/**',
// Explicitly say "**/*.js" here in case of 
symlinks
'!extensions/**/*.js',
diff --git a/resources/src/jquery/jquery.qunit.completenessTest.js 
b/resources/src/jquery/jquery.qunit.completenessTest.js
index 4353dd7..0aaa4ff 100644
--- a/resources/src/jquery/jquery.qunit.completenessTest.js
+++ b/resources/src/jquery/jquery.qunit.completenessTest.js
@@ -12,6 +12,7 @@
  *
  * @author Timo Tijhof, 2011-2012
  */
+/* eslint-env qunit */
 ( function ( mw, $ ) {
'use strict';
 
diff --git a/tests/qunit/.eslintrc.json b/tests/qunit/.eslintrc.json
new file mode 100644
index 000..b3a46f4
--- /dev/null
+++ b/tests/qunit/.eslintrc.json
@@ -0,0 +1,14 @@
+{
+   "extends": "../../.eslintrc.json",
+   "env": {
+   "qunit": true
+   },
+   "globals": {
+   "sinon": false
+   },
+   "rules": {
+   "operator-linebreak": 0,
+   "quote-props": [ "error", "as-needed" ],
+   "valid-jsdoc": 0
+   }
+}
diff --git a/tests/qunit/data/generateJqueryMsgData.php 
b/tests/qunit/data/generateJqueryMsgData.php
index d02d476..1c79f6d 100644
--- a/tests/qunit/data/generateJqueryMsgData.php
+++ b/tests/qunit/data/generateJqueryMsgData.php
@@ -133,6 +133,7 @@
. "// languages, and parser 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: qunit: Minor clean up in various tests

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

Change subject: qunit: Minor clean up in various tests
..


qunit: Minor clean up in various tests

Follows-up 5e602c613.

* jquery.byteLimit: Remove redundant setTimeout().
* jquery.byteLimit: Remove unused $elA, $elB variables.
* jquery.hidpi: Actually call bracketedDevicePixelRatio().

Change-Id: I288af22e081385fca6268a87e7b6fe1b27116706
---
M tests/qunit/suites/resources/jquery/jquery.byteLimit.test.js
M tests/qunit/suites/resources/jquery/jquery.hidpi.test.js
2 files changed, 15 insertions(+), 19 deletions(-)

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



diff --git a/tests/qunit/suites/resources/jquery/jquery.byteLimit.test.js 
b/tests/qunit/suites/resources/jquery/jquery.byteLimit.test.js
index 804d1ca..c7b7cc0 100644
--- a/tests/qunit/suites/resources/jquery/jquery.byteLimit.test.js
+++ b/tests/qunit/suites/resources/jquery/jquery.byteLimit.test.js
@@ -46,21 +46,17 @@
expected: ''
}, options );
 
-   QUnit.asyncTest( opt.description, 1, function ( assert ) {
-   setTimeout( function () {
-   opt.$input.appendTo( '#qunit-fixture' );
+   QUnit.test( opt.description, function ( assert ) {
+   opt.$input.appendTo( '#qunit-fixture' );
 
-   // Simulate pressing keys for each of the 
sample characters
-   addChars( opt.$input, opt.sample );
+   // Simulate pressing keys for each of the sample 
characters
+   addChars( opt.$input, opt.sample );
 
-   assert.equal(
-   opt.$input.val(),
-   opt.expected,
-   'New value matches the expected string'
-   );
-
-   QUnit.start();
-   } );
+   assert.equal(
+   opt.$input.val(),
+   opt.expected,
+   'New value matches the expected string'
+   );
} );
}
 
@@ -186,7 +182,7 @@
} );
 
QUnit.test( 'Confirm properties and attributes set', function ( assert 
) {
-   var $el, $elA, $elB;
+   var $el;
 
$el = $( '' ).attr( 'type', 'text' )
.attr( 'maxlength', '7' )
@@ -211,12 +207,12 @@
 
assert.strictEqual( $el.attr( 'maxlength' ), undefined, 
'maxlength attribute removed for limit with callback' );
 
-   $elA = $( '' ).attr( 'type', 'text' )
+   $( '' ).attr( 'type', 'text' )
.addClass( 'mw-test-byteLimit-foo' )
.attr( 'maxlength', '7' )
.appendTo( '#qunit-fixture' );
 
-   $elB = $( '' ).attr( 'type', 'text' )
+   $( '' ).attr( 'type', 'text' )
.addClass( 'mw-test-byteLimit-foo' )
.attr( 'maxlength', '12' )
.appendTo( '#qunit-fixture' );
@@ -231,7 +227,7 @@
QUnit.test( 'Trim from insertion when limit exceeded', function ( 
assert ) {
var $el;
 
-   // Use a new  because the bug only occurs on the first 
time
+   // Use a new  because the bug only occurs on the first 
time
// the limit it reached (T42850)
$el = $( '' ).attr( 'type', 'text' )
.appendTo( '#qunit-fixture' )
diff --git a/tests/qunit/suites/resources/jquery/jquery.hidpi.test.js 
b/tests/qunit/suites/resources/jquery/jquery.hidpi.test.js
index 2f9e960..6a265eb 100644
--- a/tests/qunit/suites/resources/jquery/jquery.hidpi.test.js
+++ b/tests/qunit/suites/resources/jquery/jquery.hidpi.test.js
@@ -7,8 +7,8 @@
} );
 
QUnit.test( 'bracketedDevicePixelRatio', function ( assert ) {
-   var devicePixelRatio = $.devicePixelRatio();
-   assert.equal( typeof devicePixelRatio, 'number', 
'$.bracketedDevicePixelRatio() returns a number' );
+   var ratio = $.bracketedDevicePixelRatio();
+   assert.equal( typeof ratio, 'number', 
'$.bracketedDevicePixelRatio() returns a number' );
} );
 
QUnit.test( 'bracketDevicePixelRatio', function ( assert ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I288af22e081385fca6268a87e7b6fe1b27116706
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Krinkle 
Gerrit-Reviewer: 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: build: Update HHVM for Travis to 3.12

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

Change subject: build: Update HHVM for Travis to 3.12
..


build: Update HHVM for Travis to 3.12

Travis defaults 'hhvm' to 3.6.6 for back-compat, however newer
versions are available. The latest supported version on Travis is 3.12,
per .
This also matches the version currently used in wmf production.

Bug: T75175
Change-Id: I1c562f61acf83aa7f558b2e11a6af81d13523dea
---
M .travis.yml
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/.travis.yml b/.travis.yml
index 9738605..80769dc 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -16,7 +16,7 @@
 - env: dbtype=postgres
   php: 5.5
 - env: dbtype=mysql
-  php: hhvm
+  php: hhvm-3.12
 - env: dbtype=mysql
   php: 7
 

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...Cargo[master]: Added "Recreate data" links to Special:CargoTables

2017-02-22 Thread Yaron Koren (Code Review)
Yaron Koren has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/339342 )

Change subject: Added "Recreate data" links to Special:CargoTables
..

Added "Recreate data" links to Special:CargoTables

Change-Id: Icbdfd01c45f291c1c31a5bd6b9042ee66819f464
---
M specials/CargoTables.php
1 file changed, 12 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Cargo 
refs/changes/42/339342/2

diff --git a/specials/CargoTables.php b/specials/CargoTables.php
index 09d293f..ad35e83 100644
--- a/specials/CargoTables.php
+++ b/specials/CargoTables.php
@@ -194,6 +194,18 @@
$actionLinks .= ' | ' . Html::element( 'a', array( 
'href' => $drilldownURL ),
$drilldownPage->getDescription() );
 
+   // It's a bit odd to include the "Recreate data"
+   // link, since it's an action for the template and
+   // not the table (if a template defines two tables,
+   // this will recreate both of them), but for standard
+   // setups, this makes things more convenient.
+   if ( $wgUser->isAllowed( 'recreatecargodata' ) && 
array_key_exists( $tableName, $templatesThatDeclareTables ) ) {
+   $firstTemplateID = 
$templatesThatDeclareTables[$tableName][0];
+   $templateTitle = Title::newFromID( 
$firstTemplateID );
+   $actionLinks .= ' | ' . CargoUtils::makeLink( 
$linkRenderer, $templateTitle,
+   $this->msg( 'recreatedata' )->text(), 
array(), array( 'action' => 'recreatedata' ) );
+   }
+
if ( $wgUser->isAllowed( 'deletecargodata' ) ) {
$deleteTablePage = SpecialPageFactory::getPage( 
'DeleteCargoTable' );
$deleteTableURL = 
$deleteTablePage->getTitle()->getLocalURL() . '/' . $tableName;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Icbdfd01c45f291c1c31a5bd6b9042ee66819f464
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Cargo
Gerrit-Branch: master
Gerrit-Owner: Yaron Koren 

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


[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: Avoid max callstack size exceeded in parserTests

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

Change subject: Avoid max callstack size exceeded in parserTests
..


Avoid max callstack size exceeded in parserTests

 * Another consequence of reusing env between tests.  The error only
   happens when multiple modes are run.

 * The page name from the previous mode in "Handle title parsing for
   subpages" is being set with a leading slash, which causes us to get
   into an infinite loop when trying to resolve the title.

Change-Id: Icc6f11e44757863fdd5d3c39dacbd049003cbfce
---
M bin/parserTests.js
M tests/parserTests.txt
2 files changed, 16 insertions(+), 16 deletions(-)

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



diff --git a/bin/parserTests.js b/bin/parserTests.js
index c7a6312..1e1dcde 100755
--- a/bin/parserTests.js
+++ b/bin/parserTests.js
@@ -665,26 +665,27 @@
item.time = {};
 
if (item.options) {
-
console.assert(item.options.extensions === undefined);
 
-   if (item.options.title !== undefined &&
-   !Array.isArray(item.options.title)) {
-   // Strip the [[]] markers.
-   var title = item.options.title.replace(/^\[\[|\]\]$/g, 
'');
-   // This sets the page name as well as the relative link 
prefix
-   // for the rest of the parse.
-   this.env.initializeForPageName(title);
-   } else {
-   // Since we are reusing the 'env' object, set it to the 
default
-   // so that relative link prefix is back to "./"
-   
this.env.initializeForPageName(this.env.defaultPageName);
-   }
+   this.env.conf.wiki.namespacesWithSubpages[0] = false;
+
+   // Since we are reusing the 'env' object, set it to the default
+   // so that relative link prefix is back to "./"
+   this.env.initializeForPageName(this.env.defaultPageName);
 
if (item.options.subpage !== undefined) {
this.env.conf.wiki.namespacesWithSubpages[0] = true;
-   } else {
-   this.env.conf.wiki.namespacesWithSubpages[0] = false;
+   }
+
+   if (item.options.title !== undefined &&
+   !Array.isArray(item.options.title)) {
+   // Strip the [[]] markers.
+   var title = item.options.title.replace(/^\[\[|\]\]$/g, 
'');
+   // This sets the page name as well as the relative link 
prefix
+   // for the rest of the parse.  Do this redundantly with 
the above
+   // so that we start from the defaultPageName when 
resolving
+   // absolute subpages.
+   this.env.initializeForPageName(title);
}
 
this.env.conf.wiki.allowExternalImages = [ '' ]; // all allowed
diff --git a/tests/parserTests.txt b/tests/parserTests.txt
index 979c8b7..be6e3a8 100644
--- a/tests/parserTests.txt
+++ b/tests/parserTests.txt
@@ -8152,7 +8152,6 @@
 !! options
 title=[[/123123]]
 subpage
-disabled
 !! wikitext
 123
 !! html/php

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Icc6f11e44757863fdd5d3c39dacbd049003cbfce
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Arlolra 
Gerrit-Reviewer: C. Scott Ananian 
Gerrit-Reviewer: Subramanya Sastry 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: Sync parserTests.txt with core

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

Change subject: Sync parserTests.txt with core
..


Sync parserTests.txt with core

 * "Handle title parsing for subpages" is temporarily disabled because
   it's crashing the test harness.  See the follow up.

 * New failures for "Definition lists: ignore colons inside tags" is
   known, filed as T153962

Change-Id: Ied189d30454ce4c376670aca3e78683effdbb47e
---
M tests/parserTests-blacklist.js
M tests/parserTests.json
M tests/parserTests.txt
3 files changed, 781 insertions(+), 692 deletions(-)

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




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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ied189d30454ce4c376670aca3e78683effdbb47e
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Arlolra 
Gerrit-Reviewer: Arlolra 
Gerrit-Reviewer: C. Scott Ananian 
Gerrit-Reviewer: Subramanya Sastry 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Remove duplicate test

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

Change subject: Remove duplicate test
..


Remove duplicate test

Change-Id: If99b0672c631e0428550a73a2a6116394ef32bb9
---
M tests/parser/parserTests.txt
1 file changed, 0 insertions(+), 19 deletions(-)

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



diff --git a/tests/parser/parserTests.txt b/tests/parser/parserTests.txt
index 35b0190..4463bf3 100644
--- a/tests/parser/parserTests.txt
+++ b/tests/parser/parserTests.txt
@@ -22558,25 +22558,6 @@
 !! end
 
 !!test
-Gallery override link with WikiLink (T36852)
-!! wikitext
-
-File:foobar.jpg|caption|alt=galleryalt|link=InterWikiLink
-
-!! html
-
-   
-   http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg; 
width="120" height="14" 
srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, 
http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" 
/>
-   
-caption
-
-   
-   
-
-
-!! end
-
-!!test
 Language parser function
 !! wikitext
 {{#language:ar}}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If99b0672c631e0428550a73a2a6116394ef32bb9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Arlolra 
Gerrit-Reviewer: C. Scott Ananian 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Subramanya Sastry 
Gerrit-Reviewer: Tim Starling 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Major gifts requests, Do not send thank you for Benevity imp...

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

Change subject: Major gifts requests, Do not send thank you for Benevity 
import, Set Restrictions, Gift Source.
..

Major gifts requests, Do not send thank you for Benevity import, Set 
Restrictions, Gift Source.

Major gifts have confirmed Benevity send out emails & we should no. This fixes 
the import to set no_thank_you on imported contributions.

This also implements the following logic:
 We would definitely want to include the Gift Data info for these donations, 
both the Restrictions and Gift Source fields. Could we have the following?
- For organization gift (i.e. matching gift portion): Restriction = Restricted 
- Foundation/ Gift Source = Matching Gift
- For individual gift under ,000: Restriction = Unrestricted - General / Gift 
Source = Community Gift
- For individual gift ,000 and over: Restriction = Unrestricted - General / 
Gift Source = Benefactor Gift

Note that Restriction has the custom field name 'Fund' but is handled as 
'restriction' in the import code.
Gift source is AKA 'Campaign' and gift_source

Bug: T115044

Change-Id: I08e4e3c9b7d72128ab93d070963a627e7eadecb0
---
M sites/all/modules/offline2civicrm/BenevityFile.php
M sites/all/modules/offline2civicrm/tests/BenevityTest.php
M sites/all/modules/offline2civicrm/tests/data/benevity_mice_no_email.csv
3 files changed, 50 insertions(+), 2 deletions(-)


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

diff --git a/sites/all/modules/offline2civicrm/BenevityFile.php 
b/sites/all/modules/offline2civicrm/BenevityFile.php
index 64c82b3..a9c8f81 100644
--- a/sites/all/modules/offline2civicrm/BenevityFile.php
+++ b/sites/all/modules/offline2civicrm/BenevityFile.php
@@ -50,6 +50,12 @@
 if (!isset($msg['gross'])) {
   $msg['gross'] = 0;
 }
+if ($msg['gross'] >= 1000) {
+  $msg['gift_source'] = 'Benefactor Gift';
+}
+else {
+  $msg['gift_source'] = 'Community Gift';
+}
 foreach ($msg as $field => $value) {
   if ($value == 'Not shared by donor') {
 $msg[$field] = '';
@@ -98,6 +104,12 @@
   'contact_type' => 'Individual',
   'country' => 'US',
   'currency' => 'USD',
+  // Setting this avoids emails going out. We could set the thank_you_date
+  // instead to reflect Benevity having sent them out
+  // but we don't actually know what date they did that on,
+  // and recording it in our system would seem to imply we know for
+  // sure it happened (as opposed to Benevity says it happens).
+  'no_thank_you' => 1,
 );
   }
 
@@ -146,6 +158,8 @@
   $matchedMsg['soft_credit_to_id'] = ($msg['contact_id'] == 
$this->getAnonymousContactID() ? NULL : $msg['contact_id']);
   $matchedMsg['gross'] = $msg['matching_amount'];
   $matchedMsg['gateway_txn_id'] = $msg['gateway_txn_id'] . '_matched';
+  $matchedMsg['gift_source'] = 'Matching Gift';
+  $matchedMsg['restrictions'] = 'Restricted - Foundation';
   $this->unsetAddressFields($matchedMsg);
   $matchingContribution = 
wmf_civicrm_contribution_message_import($matchedMsg);
 }
diff --git a/sites/all/modules/offline2civicrm/tests/BenevityTest.php 
b/sites/all/modules/offline2civicrm/tests/BenevityTest.php
index e0083cb..7f4d582 100644
--- a/sites/all/modules/offline2civicrm/tests/BenevityTest.php
+++ b/sites/all/modules/offline2civicrm/tests/BenevityTest.php
@@ -191,8 +191,42 @@
 $contributions = $this->callAPISuccess('Contribution', 'get', 
array('contact_id' => $minnie['id']));
 $this->assertEquals(0, $contributions['count']);
 
-$contributions = $this->callAPISuccess('Contribution', 'get', 
array('contact_id' => $betterMinnie['id']));
+$contributions = $this->callAPISuccess('Contribution', 'get', array(
+  'contact_id' => $betterMinnie['id'],
+  'sequential' => 1,
+  'return' => array(
+wmf_civicrm_get_custom_field_name('no_thank_you'),
+wmf_civicrm_get_custom_field_name('Fund'),
+wmf_civicrm_get_custom_field_name('Campaign')
+  ),
+));
 $this->assertEquals(2, $contributions['count']);
+$contribution1 = $contributions['values'][0];
+$this->assertEquals(1, 
$contribution1[wmf_civicrm_get_custom_field_name('no_thank_you')], 'No thank 
you should be set');
+$this->assertEquals('Community Gift', 
$contribution1[wmf_civicrm_get_custom_field_name('Campaign')]);
+$this->assertEquals('Unrestricted - General', 
$contribution1[wmf_civicrm_get_custom_field_name('Fund')]);
+
+$contribution2 = $contributions['values'][1];
+$this->assertEquals(1, 
$contribution2[wmf_civicrm_get_custom_field_name('no_thank_you')]);
+// This contribution was over $1000 & hence is a benefactor gift.
+$this->assertEquals('Benefactor Gift', 
$contribution2[wmf_civicrm_get_custom_field_name('Campaign')]);
+

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: qunit: Remove obsolete jshint/jscs options

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

Change subject: qunit: Remove obsolete jshint/jscs options
..


qunit: Remove obsolete jshint/jscs options

Follows-up c0fb8a8836.

Change-Id: I890e6e49b4801667b6eb463efec46a380a27d028
---
M tests/qunit/data/generateJqueryMsgData.php
M tests/qunit/data/mediawiki.jqueryMsg.data.js
M tests/qunit/suites/resources/jquery/jquery.tablesorter.test.js
M tests/qunit/suites/resources/mediawiki/mediawiki.Title.test.js
M tests/qunit/suites/resources/mediawiki/mediawiki.Uri.test.js
M tests/qunit/suites/resources/mediawiki/mediawiki.jqueryMsg.test.js
6 files changed, 0 insertions(+), 11 deletions(-)

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



diff --git a/tests/qunit/data/generateJqueryMsgData.php 
b/tests/qunit/data/generateJqueryMsgData.php
index 5d1f1cd..d02d476 100644
--- a/tests/qunit/data/generateJqueryMsgData.php
+++ b/tests/qunit/data/generateJqueryMsgData.php
@@ -133,7 +133,6 @@
. "// languages, and parser modes. Intended for 
use by a unit test framework by looping\n"
. "// through the object and comparing its 
parser return value with the 'result' property.\n"
. '// Last generated with ' . basename( 
__FILE__ ) . ' at ' . gmdate( 'r' ) . "\n"
-   . "//jscs:disable\n"
. "\n"
. 'mediaWiki.libs.phpParserData = ' . 
FormatJson::encode( $phpParserData, true ) . ";\n";
 
diff --git a/tests/qunit/data/mediawiki.jqueryMsg.data.js 
b/tests/qunit/data/mediawiki.jqueryMsg.data.js
index 498acc1..db723b6 100644
--- a/tests/qunit/data/mediawiki.jqueryMsg.data.js
+++ b/tests/qunit/data/mediawiki.jqueryMsg.data.js
@@ -2,7 +2,6 @@
 // languages, and parser modes. Intended for use by a unit test framework by 
looping
 // through the object and comparing its parser return value with the 'result' 
property.
 // Last generated with generateJqueryMsgData.php at Fri, 10 Jul 2015 11:44:08 
+
-//jscs:disable
 
 mediaWiki.libs.phpParserData = {
 "messages": {
diff --git a/tests/qunit/suites/resources/jquery/jquery.tablesorter.test.js 
b/tests/qunit/suites/resources/jquery/jquery.tablesorter.test.js
index 6f84945..f73d019 100644
--- a/tests/qunit/suites/resources/jquery/jquery.tablesorter.test.js
+++ b/tests/qunit/suites/resources/jquery/jquery.tablesorter.test.js
@@ -245,7 +245,6 @@
$tr.appendTo( $thead );
 
for ( i = 0; i < data.length; i++ ) {
-   /*jshint loopfunc: true */
$tr = $( '' );
$.each( data[ i ], function ( j, str ) {
var $td = $( '' );
diff --git a/tests/qunit/suites/resources/mediawiki/mediawiki.Title.test.js 
b/tests/qunit/suites/resources/mediawiki/mediawiki.Title.test.js
index ca15185..40fed08 100644
--- a/tests/qunit/suites/resources/mediawiki/mediawiki.Title.test.js
+++ b/tests/qunit/suites/resources/mediawiki/mediawiki.Title.test.js
@@ -101,7 +101,6 @@
// testing custom / localized namespace
100: 'Penguins'
},
-   // jscs: disable requireCamelCaseOrUpperCaseIdentifiers
wgNamespaceIds: {
media: -2,
special: -1,
@@ -129,7 +128,6 @@
penguins: 100,
antarctic_waterfowl: 100
},
-   // jscs: enable requireCamelCaseOrUpperCaseIdentifiers
wgCaseSensitiveNamespaces: []
}
} ) );
@@ -140,7 +138,6 @@
title = new mw.Title( cases.valid[ i ] );
}
for ( i = 0; i < cases.invalid.length; i++ ) {
-   /*jshint loopfunc:true */
title = cases.invalid[ i ];
assert.throws( function () {
return new mw.Title( title );
diff --git a/tests/qunit/suites/resources/mediawiki/mediawiki.Uri.test.js 
b/tests/qunit/suites/resources/mediawiki/mediawiki.Uri.test.js
index e20fc4c..e56c933 100644
--- a/tests/qunit/suites/resources/mediawiki/mediawiki.Uri.test.js
+++ b/tests/qunit/suites/resources/mediawiki/mediawiki.Uri.test.js
@@ -132,7 +132,6 @@
} );
assert.equal( uri.toString(), 'http://example.com/bar/baz', 
'normalize URI without protocol or // in loose mode' );
 
-   /*jshint -W001 */
uri = new mw.Uri( 
'http://example.com/index.php?key=key=hasOwnProperty=constructor=watch'
 );
assert.deepEqual(
uri.query,
@@ -144,7 +143,6 @@
   

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: release-notes: Add Moment.js update

2017-02-22 Thread Krinkle (Code Review)
Krinkle has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/339340 )

Change subject: release-notes: Add Moment.js update
..

release-notes: Add Moment.js update

Follows-up f13a0d952.

Change-Id: Ib4692310c8abee8f6b1f69c664b373f4ea83e2dc
---
M RELEASE-NOTES-1.29
1 file changed, 1 insertion(+), 0 deletions(-)


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

diff --git a/RELEASE-NOTES-1.29 b/RELEASE-NOTES-1.29
index a739821..a1ce9d9 100644
--- a/RELEASE-NOTES-1.29
+++ b/RELEASE-NOTES-1.29
@@ -61,6 +61,7 @@
 * Updated QUnit from v1.22.0 to v1.23.1.
 * Updated cssjanus from v1.1.2 to 1.1.3.
 * Updated psr/log from v1.0.0 to v1.0.2.
+* Update Moment.js from v2.8.4 to v2.15.0.
 
  New external libraries 
 

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: mediawiki.api: Tweak deprecation logging again

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

Change subject: mediawiki.api: Tweak deprecation logging again
..


mediawiki.api: Tweak deprecation logging again

Follow-up to 15b5dc5d8eecb5a1784b0b7165a90a81e071d750,
9a8e2b7124ed10db3db7f7767d532cde00935876.

Change-Id: Idf9083e81312b97e69ec786d99ea3cc46ba80123
---
M resources/src/mediawiki/api.js
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/resources/src/mediawiki/api.js b/resources/src/mediawiki/api.js
index 660064a..37c0c9b 100644
--- a/resources/src/mediawiki/api.js
+++ b/resources/src/mediawiki/api.js
@@ -489,7 +489,7 @@
'stashwrongowner',
'stashnosuchfilekey'
];
-   mw.log.deprecate( mw.Api, 'errors', mw.Api.errors, 'mw.Api.errors' );
+   mw.log.deprecate( mw.Api, 'errors', mw.Api.errors, null, 
'mw.Api.errors' );
 
/**
 * @static
@@ -501,6 +501,6 @@
'duplicate',
'exists'
];
-   mw.log.deprecate( mw.Api, 'warnings', mw.Api.warnings, 
'mw.Api.warnings' );
+   mw.log.deprecate( mw.Api, 'warnings', mw.Api.warnings, null, 
'mw.Api.warnings' );
 
 }( mediaWiki, jQuery ) );

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

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

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


[MediaWiki-commits] [Gerrit] wikidata...rdf[master]: Refactor WDQS to use standard prefixes option

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

Change subject: Refactor WDQS to use standard prefixes option
..

Refactor WDQS to use standard prefixes option

Use -Dcom.bigdata.rdf.sail.sparql.PrefixDeclProcessor.additionalDeclsFile=file 
instead of
a homebrew option.

Change-Id: Ief366782d5f8a2ec50809fbc69445ad604165aa9
---
M 
blazegraph/src/main/java/org/wikidata/query/rdf/blazegraph/WikibaseContextListener.java
M common/src/main/java/org/wikidata/query/rdf/common/uri/WikibaseUris.java
M dist/src/script/prefixes.conf
M dist/src/script/runBlazegraph.sh
4 files changed, 4 insertions(+), 70 deletions(-)


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

diff --git 
a/blazegraph/src/main/java/org/wikidata/query/rdf/blazegraph/WikibaseContextListener.java
 
b/blazegraph/src/main/java/org/wikidata/query/rdf/blazegraph/WikibaseContextListener.java
index 7bf98ff..8121eef 100644
--- 
a/blazegraph/src/main/java/org/wikidata/query/rdf/blazegraph/WikibaseContextListener.java
+++ 
b/blazegraph/src/main/java/org/wikidata/query/rdf/blazegraph/WikibaseContextListener.java
@@ -188,11 +188,6 @@
 defaultDecls.put("owl", OWL.NAMESPACE);
 defaultDecls.put("geo", GeoSparql.NAMESPACE);
 defaultDecls.put("geof", GeoSparql.FUNCTION_NAMESPACE);
-// Add supplemental prefixes
-final Map extra = uris.getExtraPrefixes();
-for (String pref: extra.keySet()) {
-defaultDecls.put(pref, extra.get(pref));
-}
 }
 
 @Override
diff --git 
a/common/src/main/java/org/wikidata/query/rdf/common/uri/WikibaseUris.java 
b/common/src/main/java/org/wikidata/query/rdf/common/uri/WikibaseUris.java
index 5c23901..68dc6b2 100644
--- a/common/src/main/java/org/wikidata/query/rdf/common/uri/WikibaseUris.java
+++ b/common/src/main/java/org/wikidata/query/rdf/common/uri/WikibaseUris.java
@@ -1,12 +1,5 @@
 package org.wikidata.query.rdf.common.uri;
 
-import java.io.BufferedReader;
-import java.io.FileNotFoundException;
-import java.io.FileReader;
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.Map;
-
 /**
  * Uris wikibase uses that are relative to the wikibase instance.
  */
@@ -22,19 +15,10 @@
 public static final String WIKIBASE_HOST_PROPERTY = "wikibaseHost";
 
 /**
- * Third-party prefixes filename.
- */
-public static final String WIKIBASE_PREFIXES = "wikibasePrefixes";
-/**
  * Current URI system. This is static since each instance has only one URI
  * system.
  */
 private static WikibaseUris uriSystem;
-
-/**
- * Extra prefixes list.
- */
-private static Map extraPrefixes;
 
 /**
  * Property types used in the ontology.
@@ -196,12 +180,6 @@
 query.append("PREFIX ").append(p.prefix()).append(": <")
 .append(prop).append(p.suffix()).append(">\n");
 }
-// Add extra prefixes
-final Map extra = getExtraPrefixes();
-for (String pref : extra.keySet()) {
-query.append("PREFIX ").append(pref).append(": <").append(prop)
-.append(extra.get(pref)).append(">\n");
-}
 return query;
 }
 
@@ -284,43 +262,4 @@
 return uriSystem;
 }
 
-/**
- * Get the list of extra prefixes.
- * @return
- */
-public static Map getExtraPrefixes() {
-if (extraPrefixes == null) {
-extraPrefixes = new HashMap<>();
-if (System.getProperty(WIKIBASE_PREFIXES) != null) {
-
ForbiddenOk.readPrefixes(System.getProperty(WIKIBASE_PREFIXES), extraPrefixes);
-}
-}
-return extraPrefixes;
-}
-
-/**
- * Methods in this class are ignored by the forbiddenapis checks. Thus you
- * need to really really really be sure what you are putting in here is
- * right.
- */
-private static class ForbiddenOk {
-/**
- * Read space-separated prefixes list into map.
- * @param filename File where prefixes are.
- * @param prefixes Prefixes map.
- */
-private static void readPrefixes(String filename, Map 
prefixes) {
-try (BufferedReader br = new BufferedReader(new 
FileReader(filename))) {
-String line;
-while ((line = br.readLine()) != null) {
-String[] parts = line.split("\\s+");
-prefixes.put(parts[0], parts[1]);
-}
-} catch (FileNotFoundException e) {
-throw new RuntimeException("Bad prefix filename: " + filename);
-} catch (IOException e) {
-// not much to do here, just continue
-}
-}
-}
 }
diff --git a/dist/src/script/prefixes.conf 

[MediaWiki-commits] [Gerrit] mediawiki/core[wmf/1.29.0-wmf.13]: mediawiki.api: Tweak deprecation logging again

2017-02-22 Thread Krinkle (Code Review)
Krinkle has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/339338 )

Change subject: mediawiki.api: Tweak deprecation logging again
..

mediawiki.api: Tweak deprecation logging again

Follow-up to 15b5dc5d8eecb5a1784b0b7165a90a81e071d750,
9a8e2b7124ed10db3db7f7767d532cde00935876.

Change-Id: Idf9083e81312b97e69ec786d99ea3cc46ba80123
---
M resources/src/mediawiki/api.js
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/38/339338/1

diff --git a/resources/src/mediawiki/api.js b/resources/src/mediawiki/api.js
index 660064a..37c0c9b 100644
--- a/resources/src/mediawiki/api.js
+++ b/resources/src/mediawiki/api.js
@@ -489,7 +489,7 @@
'stashwrongowner',
'stashnosuchfilekey'
];
-   mw.log.deprecate( mw.Api, 'errors', mw.Api.errors, 'mw.Api.errors' );
+   mw.log.deprecate( mw.Api, 'errors', mw.Api.errors, null, 
'mw.Api.errors' );
 
/**
 * @static
@@ -501,6 +501,6 @@
'duplicate',
'exists'
];
-   mw.log.deprecate( mw.Api, 'warnings', mw.Api.warnings, 
'mw.Api.warnings' );
+   mw.log.deprecate( mw.Api, 'warnings', mw.Api.warnings, null, 
'mw.Api.warnings' );
 
 }( mediaWiki, jQuery ) );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idf9083e81312b97e69ec786d99ea3cc46ba80123
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.29.0-wmf.13
Gerrit-Owner: Krinkle 
Gerrit-Reviewer: Bartosz Dziewoński 

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


[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: Support "videoinfo" in batching

2017-02-22 Thread Arlolra (Code Review)
Arlolra has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/339337 )

Change subject: Support "videoinfo" in batching
..

Support "videoinfo" in batching

 * Follow up to e23a8185

 * Requires I3c651bea67b2ea29fb49edc471040bfa041473a8

 * This also keeps it disabled until the necessary changes to the
   batching api are merged and deployed.

Change-Id: Iec9b4d88aebab183277f5e1559173071fe9d5680
---
M lib/config/WikiConfig.js
M lib/mw/ApiRequest.js
M lib/mw/Batcher.js
3 files changed, 8 insertions(+), 6 deletions(-)


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

diff --git a/lib/config/WikiConfig.js b/lib/config/WikiConfig.js
index 0e12724..a08243e 100644
--- a/lib/config/WikiConfig.js
+++ b/lib/config/WikiConfig.js
@@ -822,7 +822,7 @@
this.useVideoInfo = Array.isArray(query.parameters)
&& query.parameters.some(function(o) {
return o && o.name === 'prop' && 
o.type.indexOf('videoinfo') > -1;
-   });
+   }) && !env.conf.parsoid.useBatchAPI;  // Disabled for batching 
until deployed
}.bind(this));
 };
 
diff --git a/lib/mw/ApiRequest.js b/lib/mw/ApiRequest.js
index 646e479..51f1845 100644
--- a/lib/mw/ApiRequest.js
+++ b/lib/mw/ApiRequest.js
@@ -844,7 +844,8 @@
mangled = manglePreprocessorResponse(this.env, 
itemResponse);
break;
case 'imageinfo':
-   mangled = {batchResponse: itemResponse};
+   case 'videoinfo':
+   mangled = { batchResponse: itemResponse };
break;
default:
error = new Error("BatchRequest._handleJSON: 
Invalid action");
diff --git a/lib/mw/Batcher.js b/lib/mw/Batcher.js
index db3c53d..8cee7fe 100644
--- a/lib/mw/Batcher.js
+++ b/lib/mw/Batcher.js
@@ -269,17 +269,18 @@
  */
 Batcher.prototype.imageinfo = Promise.method(function(filename, dims) {
var env = this.env;
-   var hash = Util.makeHash(["imageinfo", filename, dims.width || "", 
dims.height || "", env.page.name]);
+   var action = env.conf.wiki.useVideoInfo ? 'videoinfo' : 'imageinfo';
+   var hash = Util.makeHash([action, filename, dims.width || "", 
dims.height || "", env.page.name]);
if (hash in this.resultCache) {
return this.resultCache[hash];
} else if (!env.conf.parsoid.useBatchAPI) {
-   this.trace("Non-batched imageinfo request");
+   this.trace('Non-batched ' + action + ' request');
return this.legacyRequest(api.ImageInfoRequest, [
env, filename, dims, hash,
], hash);
} else {
var params = {
-   action: "imageinfo",
+   action: action,
filename: filename,
hash: hash,
page: env.page.name,
@@ -336,7 +337,7 @@
var apiItemParams;
for (i = 0; i < batchParams.length; i++) {
params = batchParams[i];
-   if (params.action === 'imageinfo') {
+   if (params.action === 'imageinfo' || params.action === 
'videoinfo') {
apiItemParams = {
action: params.action,
filename: params.filename,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iec9b4d88aebab183277f5e1559173071fe9d5680
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Arlolra 

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


[MediaWiki-commits] [Gerrit] mediawiki...Gamepress[master]: Unbreak global extension tests

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

Change subject: Unbreak global extension tests
..


Unbreak global extension tests

Fixes paths for files and comments out unsupported by ResourceLoader
syntax for SVG files.

Bug: T158825
Change-Id: I70297c010e8eaa8416e223dac92e3e8dba8fa0c5
---
M resources/css/style.css
1 file changed, 25 insertions(+), 25 deletions(-)

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



diff --git a/resources/css/style.css b/resources/css/style.css
index a5f5087..4dcf1b5 100644
--- a/resources/css/style.css
+++ b/resources/css/style.css
@@ -835,51 +835,51 @@
 
 @font-face {
font-family: 'OpenSansRegular';
-   src: url('/fonts/opensans-regular.eot');
-   src: url('/fonts/opensans-regular.eot?#iefix') 
format('embedded-opentype'),
-url('/fonts/opensans-regular.woff') format('woff'),
-url('/fonts/opensans-regular.ttf') format('truetype'),
-url('/fonts/opensans-regular.svg#OpenSansRegular') 
format('svg');
+   src: url('../fonts/opensans-regular.eot');
+   src: url('../fonts/opensans-regular.eot?#iefix') 
format('embedded-opentype'),
+url('../fonts/opensans-regular.woff') format('woff'),
+url('../fonts/opensans-regular.ttf') format('truetype')/*,
+url('../fonts/opensans-regular.svg#OpenSansRegular') 
format('svg')*/;
font-weight: normal;
font-style: normal;
 }
 @font-face {
font-family: 'OpenSansSemiboldRegular';
-   src: url('/fonts/opensans-semibold.eot');
-   src: url('/fonts/opensans-semibold.eot?#iefix') 
format('embedded-opentype'),
-url('/fonts/opensans-semibold.woff') format('woff'),
-url('/fonts/opensans-semibold.ttf') format('truetype'),
-url('/fonts/opensans-semibold.svg#OpenSansSemiboldRegular') 
format('svg');
+   src: url('../fonts/opensans-semibold.eot');
+   src: url('../fonts/opensans-semibold.eot?#iefix') 
format('embedded-opentype'),
+url('../fonts/opensans-semibold.woff') format('woff'),
+url('../fonts/opensans-semibold.ttf') format('truetype')/*,
+url('../fonts/opensans-semibold.svg#OpenSansSemiboldRegular') 
format('svg')*/;
font-weight: normal;
font-style: normal;
 }
 @font-face {
font-family: 'OpenSansBold';
-   src: url('/fonts/opensans-bold.eot');
-   src: url('/fonts/opensans-bold.eot?#iefix') format('embedded-opentype'),
-url('/fonts/opensans-bold.woff') format('woff'),
-url('/fonts/opensans-bold.ttf') format('truetype'),
-url('/fonts/opensans-bold.svg#OpenSansBold') format('svg');
+   src: url('../fonts/opensans-bold.eot');
+   src: url('../fonts/opensans-bold.eot?#iefix') 
format('embedded-opentype'),
+url('../fonts/opensans-bold.woff') format('woff'),
+url('../fonts/opensans-bold.ttf') format('truetype')/*,
+url('../fonts/opensans-bold.svg#OpenSansBold') format('svg')*/;
font-weight: normal;
font-style: normal;
 }
 @font-face {
font-family: 'OpenSansItalic';
-   src: url('/fonts/opensans-italic.eot');
-   src: url('/fonts/opensans-italic.eot?#iefix') 
format('embedded-opentype'),
-url('/fonts/opensans-italic.woff') format('woff'),
-url('/fonts/opensans-italic.ttf') format('truetype'),
-url('/fonts/opensans-italic.svg#OpenSansItalic') format('svg');
+   src: url('../fonts/opensans-italic.eot');
+   src: url('../fonts/opensans-italic.eot?#iefix') 
format('embedded-opentype'),
+url('../fonts/opensans-italic.woff') format('woff'),
+url('../fonts/opensans-italic.ttf') format('truetype')/*,
+url('../fonts/opensans-italic.svg#OpenSansItalic') 
format('svg')*/;
font-weight: normal;
font-style: normal;
 }
 @font-face {
font-family: 'FrancoisOneRegular';
-   src: url('/fonts/francoisone.eot');
-   src: url('/fonts/francoisone.eot?#iefix') format('embedded-opentype'),
-url('/fonts/francoisone.woff') format('woff'),
-url('/fonts/francoisone.ttf') format('truetype'),
-url('/fonts/francoisone.svg#FrancoisOneRegular') format('svg');
+   src: url('../fonts/francoisone.eot');
+   src: url('../fonts/francoisone.eot?#iefix') format('embedded-opentype'),
+url('../fonts/francoisone.woff') format('woff'),
+url('../fonts/francoisone.ttf') format('truetype')/*,
+url('../fonts/francoisone.svg#FrancoisOneRegular') 
format('svg')*/;
font-weight: normal;
font-style: normal;
 }

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

[MediaWiki-commits] [Gerrit] mediawiki...ORES[master]: Fix task ID in comment

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

Change subject: Fix task ID in comment
..


Fix task ID in comment

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

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



diff --git a/includes/ApiHooks.php b/includes/ApiHooks.php
index a5a86c0..f4768c0 100644
--- a/includes/ApiHooks.php
+++ b/includes/ApiHooks.php
@@ -127,7 +127,7 @@
// Filter out non-damaging and unscored edits.
$conds[] = 'oresc_probability > ' . 
$dbr->addQuotes( $threshold );
 
-   // Performance hack: add STRAIGHT_JOIN (146111)
+   // Performance hack: add STRAIGHT_JOIN (T146111)
$options[] = 'STRAIGHT_JOIN';
} else {
$join = 'LEFT JOIN';

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iaadd5528e393b070aef3b0b219ffea07728815ce
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ORES
Gerrit-Branch: master
Gerrit-Owner: Gergő Tisza 
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] mediawiki...ParsoidBatchAPI[master]: Support "videoinfo" requests

2017-02-22 Thread Arlolra (Code Review)
Arlolra has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/339336 )

Change subject: Support "videoinfo" requests
..

Support "videoinfo" requests

 * Matches Parsoid commit e23a8185

 * Depends on the TimedMediaHandler extension being installed.

Change-Id: I3c651bea67b2ea29fb49edc471040bfa041473a8
---
M includes/ApiParsoidBatch.php
1 file changed, 23 insertions(+), 4 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ParsoidBatchAPI 
refs/changes/36/339336/1

diff --git a/includes/ApiParsoidBatch.php b/includes/ApiParsoidBatch.php
index 7fb456f..2528ccf 100644
--- a/includes/ApiParsoidBatch.php
+++ b/includes/ApiParsoidBatch.php
@@ -47,7 +47,16 @@
$this->assertScalar( $itemParams, 'text' );
$this->assertScalarOrMissing( $itemParams, 
'revid' );
$size += strlen( $itemParams['text'] );
-   } elseif ( $action === 'imageinfo' ) {
+   } elseif ( $action === 'imageinfo' || $action === 
'videoinfo' ) {
+   if ( $action === 'videoinfo' && !class_exists( 
'TimedMediaHandler' ) ) {
+   if ( is_callable( array( $this, 
'dieWithError' ) ) ) {
+   $this->dieWithError(
+   [ 
'apierror-parsoid-batch-invalidaction', wfEscapeWikiText( $itemIndex ) ], 
'invalid_action'
+   );
+   } else {
+   $this->dieUsage( "Invalid 
action in item index $itemIndex", 'invalid_action' );
+   }
+   }
$this->assertScalar( $itemParams, 'filename' );
if ( isset( $itemParams['txopts'] ) ) {
$this->assertArray( $itemParams, 
'txopts' );
@@ -113,12 +122,12 @@
$itemResult = 
$this->preprocess( $text, $title, $revid );
break;
}
-   } elseif ( $action === 'imageinfo' ) {
+   } elseif ( $action === 'imageinfo' || $action === 
'videoinfo' ) {
$filename = $itemParams['filename'];
$file = isset( $files[$filename] ) ? 
$files[$filename] : null;
$txopts = isset( $itemParams['txopts'] ) ? 
$itemParams['txopts'] : array();
$page = isset( $itemParams['page'] ) ? 
Title::newFromText( $itemParams['page'] ) : null;
-   $itemResult = $this->imageinfo( $filename, 
$file, $txopts, $page );
+   $itemResult = $this->imageinfo( $action, 
$filename, $file, $txopts, $page );
} else {
throw new Exception( "Invalid action despite 
validation already being done" );
}
@@ -260,6 +269,7 @@
}
 
/**
+* @param string $action
 * @param string $filename
 * @param File|null $file
 * @param array $txopts
@@ -267,7 +277,7 @@
 *
 * @return array|null
 */
-   protected function imageinfo( $filename, $file, array $txopts, $page ) {
+   protected function imageinfo( $action, $filename, $file, array $txopts, 
$page ) {
if ( !$file ) {
// Short return code for missing images
return null;
@@ -276,11 +286,20 @@
'width' => $file->getWidth(),
'height' => $file->getHeight(),
'mediatype' => $file->getMediaType(),
+   'mime' => $file->getMimeType(),
'url' => wfExpandUrl( $file->getFullUrl(), 
PROTO_CURRENT ),
'mustRender' => $file->mustRender(),
'badFile' => wfIsBadImage( $filename, $page ?: false ),
);
 
+   if ( $action === 'videoinfo' ) {
+   if ( $file->getHandler() && $file->getHandler() 
instanceof TimedMediaHandler ) {
+   $result['derivatives'] = 
WebVideoTranscode::getSources( $file, [ 'fullurl' ] );
+   } else {
+   $result['derivatives'] = [];
+   }
+   }
+
$txopts = $this->makeTransformOptions( $file, $txopts );
$mto = $file->transform( $txopts );
if ( $mto ) {

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

[MediaWiki-commits] [Gerrit] mediawiki...ORES[master]: Fix task ID in comment

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

Change subject: Fix task ID in comment
..

Fix task ID in comment

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


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ORES 
refs/changes/35/339335/1

diff --git a/includes/ApiHooks.php b/includes/ApiHooks.php
index a5a86c0..f4768c0 100644
--- a/includes/ApiHooks.php
+++ b/includes/ApiHooks.php
@@ -127,7 +127,7 @@
// Filter out non-damaging and unscored edits.
$conds[] = 'oresc_probability > ' . 
$dbr->addQuotes( $threshold );
 
-   // Performance hack: add STRAIGHT_JOIN (146111)
+   // Performance hack: add STRAIGHT_JOIN (T146111)
$options[] = 'STRAIGHT_JOIN';
} else {
$join = 'LEFT JOIN';

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iaadd5528e393b070aef3b0b219ffea07728815ce
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ORES
Gerrit-Branch: master
Gerrit-Owner: Gergő Tisza 

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


[MediaWiki-commits] [Gerrit] mediawiki...Gamepress[master]: Unbreak global extension tests

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

Change subject: Unbreak global extension tests
..

Unbreak global extension tests

Fixes paths for files and comments out unsupported bt ResourceLoader
syntax for SVG files.

Bug: T158825
Change-Id: I70297c010e8eaa8416e223dac92e3e8dba8fa0c5
---
M resources/css/style.css
1 file changed, 25 insertions(+), 25 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/Gamepress 
refs/changes/34/339334/1

diff --git a/resources/css/style.css b/resources/css/style.css
index a5f5087..4dcf1b5 100644
--- a/resources/css/style.css
+++ b/resources/css/style.css
@@ -835,51 +835,51 @@
 
 @font-face {
font-family: 'OpenSansRegular';
-   src: url('/fonts/opensans-regular.eot');
-   src: url('/fonts/opensans-regular.eot?#iefix') 
format('embedded-opentype'),
-url('/fonts/opensans-regular.woff') format('woff'),
-url('/fonts/opensans-regular.ttf') format('truetype'),
-url('/fonts/opensans-regular.svg#OpenSansRegular') 
format('svg');
+   src: url('../fonts/opensans-regular.eot');
+   src: url('../fonts/opensans-regular.eot?#iefix') 
format('embedded-opentype'),
+url('../fonts/opensans-regular.woff') format('woff'),
+url('../fonts/opensans-regular.ttf') format('truetype')/*,
+url('../fonts/opensans-regular.svg#OpenSansRegular') 
format('svg')*/;
font-weight: normal;
font-style: normal;
 }
 @font-face {
font-family: 'OpenSansSemiboldRegular';
-   src: url('/fonts/opensans-semibold.eot');
-   src: url('/fonts/opensans-semibold.eot?#iefix') 
format('embedded-opentype'),
-url('/fonts/opensans-semibold.woff') format('woff'),
-url('/fonts/opensans-semibold.ttf') format('truetype'),
-url('/fonts/opensans-semibold.svg#OpenSansSemiboldRegular') 
format('svg');
+   src: url('../fonts/opensans-semibold.eot');
+   src: url('../fonts/opensans-semibold.eot?#iefix') 
format('embedded-opentype'),
+url('../fonts/opensans-semibold.woff') format('woff'),
+url('../fonts/opensans-semibold.ttf') format('truetype')/*,
+url('../fonts/opensans-semibold.svg#OpenSansSemiboldRegular') 
format('svg')*/;
font-weight: normal;
font-style: normal;
 }
 @font-face {
font-family: 'OpenSansBold';
-   src: url('/fonts/opensans-bold.eot');
-   src: url('/fonts/opensans-bold.eot?#iefix') format('embedded-opentype'),
-url('/fonts/opensans-bold.woff') format('woff'),
-url('/fonts/opensans-bold.ttf') format('truetype'),
-url('/fonts/opensans-bold.svg#OpenSansBold') format('svg');
+   src: url('../fonts/opensans-bold.eot');
+   src: url('../fonts/opensans-bold.eot?#iefix') 
format('embedded-opentype'),
+url('../fonts/opensans-bold.woff') format('woff'),
+url('../fonts/opensans-bold.ttf') format('truetype')/*,
+url('../fonts/opensans-bold.svg#OpenSansBold') format('svg')*/;
font-weight: normal;
font-style: normal;
 }
 @font-face {
font-family: 'OpenSansItalic';
-   src: url('/fonts/opensans-italic.eot');
-   src: url('/fonts/opensans-italic.eot?#iefix') 
format('embedded-opentype'),
-url('/fonts/opensans-italic.woff') format('woff'),
-url('/fonts/opensans-italic.ttf') format('truetype'),
-url('/fonts/opensans-italic.svg#OpenSansItalic') format('svg');
+   src: url('../fonts/opensans-italic.eot');
+   src: url('../fonts/opensans-italic.eot?#iefix') 
format('embedded-opentype'),
+url('../fonts/opensans-italic.woff') format('woff'),
+url('../fonts/opensans-italic.ttf') format('truetype')/*,
+url('../fonts/opensans-italic.svg#OpenSansItalic') 
format('svg')*/;
font-weight: normal;
font-style: normal;
 }
 @font-face {
font-family: 'FrancoisOneRegular';
-   src: url('/fonts/francoisone.eot');
-   src: url('/fonts/francoisone.eot?#iefix') format('embedded-opentype'),
-url('/fonts/francoisone.woff') format('woff'),
-url('/fonts/francoisone.ttf') format('truetype'),
-url('/fonts/francoisone.svg#FrancoisOneRegular') format('svg');
+   src: url('../fonts/francoisone.eot');
+   src: url('../fonts/francoisone.eot?#iefix') format('embedded-opentype'),
+url('../fonts/francoisone.woff') format('woff'),
+url('../fonts/francoisone.ttf') format('truetype')/*,
+url('../fonts/francoisone.svg#FrancoisOneRegular') 
format('svg')*/;
font-weight: normal;
font-style: normal;
 }

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

[MediaWiki-commits] [Gerrit] wikimedia/portals[master]: Upgrade stylelint-config-wikimedia to v0.4.1

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

Change subject: Upgrade stylelint-config-wikimedia to v0.4.1
..


Upgrade stylelint-config-wikimedia to v0.4.1

Bug: T158797
Change-Id: I987dfcddcdd780b6fd698ac890e4df8c2e1a2a83
---
M dev/wikipedia.org/assets/postcss/_base.css
M dev/wikipedia.org/assets/postcss/_buttons.css
M dev/wikipedia.org/assets/postcss/_forms.css
M dev/wikipedia.org/assets/postcss/_lang-dropdown.css
M dev/wikipedia.org/assets/postcss/_search-language-picker.css
M dev/wikipedia.org/assets/postcss/_wm-portal.css
M dev/wikipedia.org/assets/postcss/_wm-typeahead.css
M package.json
8 files changed, 13 insertions(+), 11 deletions(-)

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



diff --git a/dev/wikipedia.org/assets/postcss/_base.css 
b/dev/wikipedia.org/assets/postcss/_base.css
index b34661f..a315b42 100644
--- a/dev/wikipedia.org/assets/postcss/_base.css
+++ b/dev/wikipedia.org/assets/postcss/_base.css
@@ -74,7 +74,7 @@
  * Remove excess height in iOS 5 devices.
  */
 
-audio:not([controls]) {
+audio:not( [controls] ) {
   display: none;
   height: 0;
 }
diff --git a/dev/wikipedia.org/assets/postcss/_buttons.css 
b/dev/wikipedia.org/assets/postcss/_buttons.css
index c705314..5f689c6 100644
--- a/dev/wikipedia.org/assets/postcss/_buttons.css
+++ b/dev/wikipedia.org/assets/postcss/_buttons.css
@@ -80,7 +80,7 @@
 color: #fff;
 background: #ddd;
 border: 1px solid #ddd;
-outline: none;
+outline: 0;
 cursor: default;
 box-shadow: none;
 
diff --git a/dev/wikipedia.org/assets/postcss/_forms.css 
b/dev/wikipedia.org/assets/postcss/_forms.css
index 013691e..4c729c5 100644
--- a/dev/wikipedia.org/assets/postcss/_forms.css
+++ b/dev/wikipedia.org/assets/postcss/_forms.css
@@ -127,7 +127,7 @@
 Need to separate out the :not() selector from the rest of the CSS 2.1 selectors
 since IE8 won't execute CSS that contains a CSS3 selector.
 */
-.pure-form input:not([type])[disabled] {
+.pure-form input:not( [type] )[disabled] {
 cursor: var( --cursor-base--disabled );
 background-color: #eaeded;
 color: #cad2d3;
diff --git a/dev/wikipedia.org/assets/postcss/_lang-dropdown.css 
b/dev/wikipedia.org/assets/postcss/_lang-dropdown.css
index c07db7e..4fb35c8 100644
--- a/dev/wikipedia.org/assets/postcss/_lang-dropdown.css
+++ b/dev/wikipedia.org/assets/postcss/_lang-dropdown.css
@@ -56,7 +56,7 @@
 border: var( --border-base );
 border-radius: var( --border-radius-base );
 outline: 1rem solid #fff;
-transition: outline-width 0.05s ease-in 0.5s;
+transition: outline-width 100ms ease-in 500ms;
 }
 
 .lang-list-button:hover {
diff --git a/dev/wikipedia.org/assets/postcss/_search-language-picker.css 
b/dev/wikipedia.org/assets/postcss/_search-language-picker.css
index 23fe5d0..ab7f11f 100644
--- a/dev/wikipedia.org/assets/postcss/_search-language-picker.css
+++ b/dev/wikipedia.org/assets/postcss/_search-language-picker.css
@@ -63,7 +63,7 @@
 /* All browsers */
 appearance: none;
 
-outline: none;
+outline: 0;
 cursor: pointer;
 }
 
@@ -155,7 +155,7 @@
 
 /* firefox */
 .styled-select select:focus {
-outline: none;
+outline: 0;
 box-shadow: none;
 }
 
@@ -167,6 +167,7 @@
 }
 
 /* hack to fall back in opera */
+/* stylelint-disable-next-line selector-type-no-unknown */
 _:-o-prefocus,
 .selector {
 .styled-select select {
diff --git a/dev/wikipedia.org/assets/postcss/_wm-portal.css 
b/dev/wikipedia.org/assets/postcss/_wm-portal.css
index da9d188..13b0315 100644
--- a/dev/wikipedia.org/assets/postcss/_wm-portal.css
+++ b/dev/wikipedia.org/assets/postcss/_wm-portal.css
@@ -396,7 +396,7 @@
 }
 }
 
-/* stylelint-disable media-feature-name-no-vendor-prefix */
+/* stylelint-disable media-feature-name-no-vendor-prefix, 
media-feature-name-no-unknown */
 @media ( -webkit-min-device-pixel-ratio: 1.5 ), ( min--moz-device-pixel-ratio: 
1.5 ), ( -o-min-device-pixel-ratio: 3/2 ), ( min-resolution: 1.5dppx ), ( 
min-resolution: 144dpi ) {
 .bookshelf-container .bookend {
 background-size: 40px auto;
@@ -420,7 +420,7 @@
 border-bottom-width: 0.5px;
 }
 }
-/* stylelint-enable media-feature-name-no-vendor-prefix */
+/* stylelint-enable media-feature-name-no-vendor-prefix, 
media-feature-name-no-unknown */
 
 /* Subpixel borders not supported in older releases of Blink, WebKit */
 @supports ( -webkit-marquee-style: slide ) {
diff --git a/dev/wikipedia.org/assets/postcss/_wm-typeahead.css 
b/dev/wikipedia.org/assets/postcss/_wm-typeahead.css
index 854b54a..a49bd41 100644
--- a/dev/wikipedia.org/assets/postcss/_wm-typeahead.css
+++ b/dev/wikipedia.org/assets/postcss/_wm-typeahead.css
@@ -42,7 +42,7 @@
 a.suggestion-link:active,
 a.suggestion-link:focus {
 white-space: normal;
-outline: none;
+outline: 0;
 }
 
 .suggestion-thumbnail {
diff --git a/package.json 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Revert "Temporary hax to hide cawiki's hacked in search side...

2017-02-22 Thread Krinkle (Code Review)
Hello Jack Phoenix, TTO, Jdrewniak, EBernhardson, jenkins-bot,

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

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

to review the following change.


Change subject: Revert "Temporary hax to hide cawiki's hacked in search sidebar"
..

Revert "Temporary hax to hide cawiki's hacked in search sidebar"

This reverts commit e77dbd78ab869b0db672801bca9be445c302d262.

Bug: T149806
Change-Id: Iffdd1b86c0873f3359d7134053cc09dfc19bdc56
---
M 
resources/src/mediawiki.special/mediawiki.special.search.interwikiwidget.styles.less
1 file changed, 0 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/33/339333/1

diff --git 
a/resources/src/mediawiki.special/mediawiki.special.search.interwikiwidget.styles.less
 
b/resources/src/mediawiki.special/mediawiki.special.search.interwikiwidget.styles.less
index 9ee1b0b..923b81a 100644
--- 
a/resources/src/mediawiki.special/mediawiki.special.search.interwikiwidget.styles.less
+++ 
b/resources/src/mediawiki.special/mediawiki.special.search.interwikiwidget.styles.less
@@ -220,8 +220,3 @@
 max-width: none !important;
 }
 }
-
-/* Evil temporary hax for cawiki */
-#sisterproject {
-   display: none;
-}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iffdd1b86c0873f3359d7134053cc09dfc19bdc56
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Krinkle 
Gerrit-Reviewer: EBernhardson 
Gerrit-Reviewer: Jack Phoenix 
Gerrit-Reviewer: Jdrewniak 
Gerrit-Reviewer: TTO 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: dumps: Redesign progress report page

2017-02-22 Thread Ladsgroup (Code Review)
Ladsgroup has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/339332 )

Change subject: dumps: Redesign progress report page
..

dumps: Redesign progress report page

It mostly used Wikimedia's living style guide and transparency report

Bug: T155697

Change-Id: I03f1786ef2298b9a2a87db37c5f03e54e91a74fc
---
M modules/snapshot/files/dumps/templates/report.html
1 file changed, 31 insertions(+), 13 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/32/339332/1

diff --git a/modules/snapshot/files/dumps/templates/report.html 
b/modules/snapshot/files/dumps/templates/report.html
index d121f9e..fc98be9 100644
--- a/modules/snapshot/files/dumps/templates/report.html
+++ b/modules/snapshot/files/dumps/templates/report.html
@@ -5,24 +5,30 @@
 
 
 %(db)s dump progress on %(date)s
+
 
-html, body {
-background-color: #eee;
-color: black;
-}
 .siteinfo {
 text-align: center;
 }
 li {
-background-color: #f4f4f4;
 list-style-type: none;
+padding: 0.5em 1.5em 0.5em 1.5em;
+background: #fff;
+margin-bottom: 1em;
 }
 li li {
 background-color: white;
+box-shadow: none;
+border-top: none;
+padding: 0px;
+margin-bottom: 0em;
 }
 li ul {
 margin-top: 4px;
 margin-bottom: 8px;
+box-shadow: none;
+border-top: none;
+padding: 0.5em 0px 0px;
 }
 .detail {
 font-weight: normal;
@@ -39,25 +45,37 @@
 padding-left: 1em;
 padding-right: 1em;
 }
-.in-progress {
+li.in-progress {
+border-top: 3px solid #3366cc;
+box-shadow: 0 8px 12px -8px #375baf;
 font-weight: bold;
+}
+.done {
+border-top: 3px solid #00af89;
+box-shadow: 0 8px 12px -8px #0a4337;
 }
 .failed {
-color: Maroon;
+color: #b32424;
 font-weight: bold;
-}
-.notice {
-color: Maroon;
-font-weight: normal;
+border-top: 3px solid #b32424;
+box-shadow: 0 8px 12px -8px #5a1212;
 }
 .waiting {
-color: Silver; /* Gray ? */
+color: #c8ccd1;
+box-shadow: none;
+border-top: none;
 }
 .progress {
 font-family: monospace;
-font-size: 80%%;
+font-size: 80%;
 margin-left: .5in;
 }
+.notice {
+border: none;
+background-color: transparent;
+font-weight: normal;
+color: #b32424;
+}
 
 
 

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/vagrant[master]: Added a CSP headers filter to RESTBase config.

2017-02-22 Thread Ppchelko (Code Review)
Ppchelko has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/339325 )

Change subject: Added a CSP headers filter to RESTBase config.
..


Added a CSP headers filter to RESTBase config.

Bug: T158822
Change-Id: I95612651b4a2101677171ac2f511e27ecf11ad3b
---
M puppet/modules/restbase/templates/config.yaml.erb
1 file changed, 2 insertions(+), 0 deletions(-)

Approvals:
  Krinkle: Looks good to me, approved
  Ppchelko: Verified



diff --git a/puppet/modules/restbase/templates/config.yaml.erb 
b/puppet/modules/restbase/templates/config.yaml.erb
index 51b055b..adbaaff 100644
--- a/puppet/modules/restbase/templates/config.yaml.erb
+++ b/puppet/modules/restbase/templates/config.yaml.erb
@@ -45,6 +45,8 @@
 spec:
   title: "The RESTBase root"
   # Some more general RESTBase info
+  x-request-filters:
+- path: lib/security_response_header_filter.js
   x-sub-request-filters:
 - type: default
   name: http

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I95612651b4a2101677171ac2f511e27ecf11ad3b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: master
Gerrit-Owner: Ppchelko 
Gerrit-Reviewer: GWicke 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: Mobrovac 
Gerrit-Reviewer: Ppchelko 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] wikimedia...SmashPig[master]: Throw SmashPig exception on Ingenico API errors

2017-02-22 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/339331 )

Change subject: Throw SmashPig exception on Ingenico API errors
..

Throw SmashPig exception on Ingenico API errors

Instead of letting the downstream thing look for elements that may
not exist.

Change-Id: I2df2b635e5869763b53d6c32acf1bc97e9a59e78
---
M PaymentProviders/Ingenico/Api.php
1 file changed, 11 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/SmashPig 
refs/changes/31/339331/1

diff --git a/PaymentProviders/Ingenico/Api.php 
b/PaymentProviders/Ingenico/Api.php
index 2ef21d2..24042d4 100644
--- a/PaymentProviders/Ingenico/Api.php
+++ b/PaymentProviders/Ingenico/Api.php
@@ -6,6 +6,7 @@
 use DateTimeZone;
 use SmashPig\Core\Context;
 use SmashPig\Core\Http\OutboundRequest;
+use SmashPig\Core\SmashPigException;
 
 /**
  * Prepares and sends requests to the Ingenico Connect API.
@@ -58,7 +59,16 @@
$this->authenticator->signRequest( $request );
 
$response = $request->execute();
-   // TODO error handling
+
+   if ( !empty( $response['errors'] ) ) {
+   $messages = array();
+   foreach( $response['errors'] as $error ) {
+   $messages = "Ingenico error {$error['code']}: 
{$error['message']}.";
+   }
+   $concatenated = implode( ' ', $messages );
+   throw new SmashPigException( $concatenated );
+   }
+
return $response;
}
 }

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...DonationInterface[master]: Use HashBag instead of EmptyBag

2017-02-22 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/339330 )

Change subject: Use HashBag instead of EmptyBag
..

Use HashBag instead of EmptyBag

If the local cluster cache is an EmptyBagOfStuff, fall back to a
HashBagOStuff to at least cache for the duration of the request.

Change-Id: I570cdcc7347312bb246848b5d43d22ce1720d3f1
---
M gateway_common/LocalClusterPsr6Cache.php
1 file changed, 3 insertions(+), 0 deletions(-)


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

diff --git a/gateway_common/LocalClusterPsr6Cache.php 
b/gateway_common/LocalClusterPsr6Cache.php
index 30740d8..c307100 100644
--- a/gateway_common/LocalClusterPsr6Cache.php
+++ b/gateway_common/LocalClusterPsr6Cache.php
@@ -13,6 +13,9 @@
 class LocalClusterPsr6Cache extends BagOStuffPsrCache {
public function __construct() {
$mainCache = ObjectCache::getLocalClusterInstance();
+   if ( $mainCache instanceof EmptyBagOStuff ) {
+   $mainCache = new HashBagOStuff();
+   }
parent::__construct( $mainCache );
}
 }

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

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

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Add new throttle rule, remove expired rules

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

Change subject: Add new throttle rule, remove expired rules
..


Add new throttle rule, remove expired rules

Wiki: itwikiversity
IP address: 213.26.151.190
Time: "now" (defined as 22 Feb 20:00 UTC) to 25 February 23:59:59 UTC
Attendees: unspecified, asked for limit of 200

Also do some cleanup (delete expired entries)

Bug: T158767
Change-Id: I85846d05cbd4f86041791667219ad87853f258fd
---
M wmf-config/throttle.php
1 file changed, 8 insertions(+), 32 deletions(-)

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



diff --git a/wmf-config/throttle.php b/wmf-config/throttle.php
index 0754701..5ae2b66 100644
--- a/wmf-config/throttle.php
+++ b/wmf-config/throttle.php
@@ -28,14 +28,6 @@
 # ];
 ## Add throttling definitions below.
 
-$wmgThrottlingExceptions[] = [ // T156258
-   'from' => '2017-02-09T17:00 -5:00',
-   'to' => '2017-02-09T20:00 -5:00',
-   'range' => ["152.12.0.0/16", "152.13.0.0/16", "152.14.0.0/16", 
"152.15.0.0/16", "152.16.0.0/16", "152.17.0.0/16"],
-   'dbname' => [ 'enwiki', 'commonswiki' ],
-   'value' => 30, // max 20 expected
-];
-
 $wmgThrottlingExceptions[] = [ // T157504
'from' => '2017-01-09T00:00:00 UTC',
'to' =>   '2017-06-31T23:59:59 UTC',
@@ -45,30 +37,6 @@
],
'dbname' => [ 'itwikiversity' ],
'value' => 200,
-];
-
-$wmgThrottlingExceptions[] =[ // T158040
-   'from' => '2017-02-15T14:00 +1:00',
-   'to' => '2017-02-15T18:00 +1:00',
-   'range' => [ '195.113.180.192/26', '2001:718:9::/48' ],
-   'dbname' => [ 'cswiki' ],
-   'value' => 50 // 20-30 expected
-];
-
-$wmgThrottlingExceptions[] = [ // T158171 - Royal College of Nursing
-   'from' => '2017-02-15T00:00 +0:00',
-   'to' => '2017-02-15T23:59 +0:00',
-   'IP' => '85.115.54.202',
-   'dbname' => [ 'enwiki', 'commonswiki' ],
-   'value' => 100, // expected unknown
-];
-
-$wmgThrottlingExceptions[] = [ //
-   'from' => '2017-02-20T0:00 +0:00',
-   'to' => '2017-02-20T23:59 +0:00',
-   'range' => '158.94.0.0/16',
-   'dbname' => [ 'enwiki', 'commonswiki' ],
-   'value' => 100 // unknown
 ];
 
 $wmgThrottlingExceptions[] = [ // T158312
@@ -87,6 +55,14 @@
'value' => 40 // 30 expected
 ];
 
+$wmgThrottlingExceptions[] = [ // T158767
+   'from' => '2017-02-22T20:00:00 UTC',
+   'to' =>   '2017-02-25T23:59:59 UTC',
+   'IP' =>   '213.26.151.190',
+   'dbname' => [ 'itwikiversity' ],
+   'value' => 200
+];
+
 ## Add throttling definitions above.
 
 /**

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I85846d05cbd4f86041791667219ad87853f258fd
Gerrit-PatchSet: 8
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: EddieGP 
Gerrit-Reviewer: Dereckson 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...DonationInterface[master]: Another SmashPig initialization fix

2017-02-22 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/339329 )

Change subject: Another SmashPig initialization fix
..

Another SmashPig initialization fix

Need to initialize the logger too. We should provide a logger
prefix, but the bloated gateway constructor needs SmashPig already
initialized.

Change-Id: Iaac0f061904adb559b3cb0516300c1c9601e69d8
---
M DonationInterface.class.php
M gateway_common/donation.api.php
2 files changed, 4 insertions(+), 2 deletions(-)


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

diff --git a/DonationInterface.class.php b/DonationInterface.class.php
index 40a5648..9132a26 100644
--- a/DonationInterface.class.php
+++ b/DonationInterface.class.php
@@ -89,7 +89,9 @@
 */
public static function initializeSmashPig( $view ) {
$spConfig = Configuration::createForView( $view );
-   Context::init( $spConfig );
+   // FIXME: should set a logger prefix here, but we've got a 
chicken
+   // and egg problem with the Gateway constructor
+   Context::initWithLogger( $spConfig );
return $spConfig;
}
 }
diff --git a/gateway_common/donation.api.php b/gateway_common/donation.api.php
index 447a389..9f41ded 100644
--- a/gateway_common/donation.api.php
+++ b/gateway_common/donation.api.php
@@ -15,8 +15,8 @@
// @todo FIXME: Unused local variable.
$submethod = $this->donationData['payment_submethod'];
 
-   $gatewayObj = $this->getGatewayObject();
DonationInterface::initializeSmashPig( $this->gateway );
+   $gatewayObj = $this->getGatewayObject();
 
if ( !$gatewayObj ) {
return; // already failed with a dieUsage call

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

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

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


[MediaWiki-commits] [Gerrit] wikimedia/annualreport[master]: add 2016 annual report data

2017-02-22 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/339328 )

Change subject: add 2016 annual report data
..

add 2016 annual report data

Bug: T151798
Change-Id: I7fab024516ada6b0ba9a6973993ceaaaf7748799
---
A 2016/404.html
A 2016/consider-the-facts.html
A 2016/css/.DS_Store
A 2016/css/.sass-cache/acca7529a0de89b63f72b3d9cbe988b5d21ca5bc/main.scssc
A 2016/css/.sass-cache/fc31f130fb3c5a996633c42fdec5a25d5265c46b/main.scssc
A 2016/css/build/.DS_Store
A 2016/css/build/flickity.min.css
A 2016/css/build/ie9.css
A 2016/css/build/main.css
A 2016/css/build/main.css.map
A 2016/donors.html
A 2016/fact-1.html
A 2016/fact-10.html
A 2016/fact-2.html
A 2016/fact-3.html
A 2016/fact-4.html
A 2016/fact-5.html
A 2016/fact-6.html
A 2016/fact-7.html
A 2016/fact-8.html
A 2016/fact-9.html
A 2016/financials.html
A 2016/fonts/.DS_Store
A 2016/fonts/droidsans-bold-demo.html
A 2016/fonts/droidsans-bold-webfont.woff
A 2016/fonts/droidsans-bold-webfont.woff2
A 2016/fonts/droidsans-demo.html
A 2016/fonts/droidsans-webfont.woff
A 2016/fonts/droidsans-webfont.woff2
A 2016/fonts/generator_config.txt
A 2016/fonts/lora-bold-demo.html
A 2016/fonts/lora-bold-webfont.woff
A 2016/fonts/lora-bold-webfont.woff2
A 2016/fonts/lora-bolditalic-demo.html
A 2016/fonts/lora-bolditalic-webfont.woff
A 2016/fonts/lora-bolditalic-webfont.woff2
A 2016/fonts/lora-italic-demo.html
A 2016/fonts/lora-italic-webfont.woff
A 2016/fonts/lora-italic-webfont.woff2
A 2016/fonts/lora-regular-demo.html
A 2016/fonts/lora-regular-webfont.woff
A 2016/fonts/lora-regular-webfont.woff2
A 2016/fonts/montserrat-bold-demo.html
A 2016/fonts/montserrat-bold-webfont.woff
A 2016/fonts/montserrat-bold-webfont.woff2
A 2016/fonts/montserrat-regular-demo.html
A 2016/fonts/montserrat-regular-webfont.woff
A 2016/fonts/montserrat-regular-webfont.woff2
A 2016/img/.DS_Store
A 2016/img/2016-factsbook.jpg
A 2016/img/arrow-down-dark.svg
A 2016/img/arrow-left.png
A 2016/img/arrow-nav-right.png
A 2016/img/arrow-right.png
A 2016/img/arrow-table-left.png
A 2016/img/arrow-table-right.png
A 2016/img/arrow-top-of-page-button.svg
A 2016/img/arrow-up.png
A 2016/img/arrow-up.svg
A 2016/img/arrows.svg
A 2016/img/card-arrow-right.svg
A 2016/img/contributors-header-large.jpg
A 2016/img/contributors-header-mobile.jpg
A 2016/img/contributors-header.jpg
A 2016/img/down-arrow.svg
A 2016/img/facebook-logo-dark.svg
A 2016/img/facebook-logo.svg
A 2016/img/fact-cards/.DS_Store
A 2016/img/fact-cards/1650-languages.jpg
A 2016/img/fact-cards/1650-languagesv3.jpg
A 2016/img/fact-cards/239-people-used-internet-2016.jpg
A 2016/img/fact-cards/87-percent-not-english.jpg
A 2016/img/fact-cards/bios-about-women.jpg
A 2016/img/fact-cards/bios-about-womenv2.jpg
A 2016/img/fact-cards/donate-card.jpg
A 2016/img/fact-cards/ok-globally-understood.jpg
A 2016/img/fact-cards/polar-bear.jpg
A 2016/img/fact-cards/refugees-school-age.jpg
A 2016/img/fact-cards/trillion-photos-2016.jpg
A 2016/img/fact-cards/trillion-photos-2016v2.jpg
A 2016/img/fact-cards/visited-another-country.jpg
A 2016/img/fact-cards/visited-another-countryv2.jpg
A 2016/img/fact-cards/wiki-updated-250.jpg
A 2016/img/fact-cards/wiki-updated-250v2.jpg
A 2016/img/fact-headers/.DS_Store
A 2016/img/fact-headers/1650-languages.jpg
A 2016/img/fact-headers/1650-languagesv3.jpg
A 2016/img/fact-headers/239-people-used-internet-2016.jpg
A 2016/img/fact-headers/87-percent-not-english-mobile.jpg
A 2016/img/fact-headers/87-percent-not-english.jpg
A 2016/img/fact-headers/bios-about-women.jpg
A 2016/img/fact-headers/bios-about-womenv2.jpg
A 2016/img/fact-headers/dried-lake.jpg
A 2016/img/fact-headers/ok-globally-understood.jpg
A 2016/img/fact-headers/polar-bear-original.jpg
A 2016/img/fact-headers/polar-bear.jpg
A 2016/img/fact-headers/refugees-school-age.jpg
A 2016/img/fact-headers/trillion-photos-2016.jpg
A 2016/img/fact-headers/trillion-photos-2016v2.jpg
A 2016/img/fact-headers/visited-another-country.jpg
A 2016/img/fact-headers/visited-another-countryv2.jpg
A 2016/img/fact-headers/wiki-updated-250.jpg
A 2016/img/fact-headers/wiki-updated-250v2.jpg
A 2016/img/fact-inserts/arctic-death-spiral.jpg
A 2016/img/factsbook.jpg
A 2016/img/favicon.ico
A 2016/img/four-star-logo-light.png
A 2016/img/four-star-logo-light.svg
A 2016/img/four-star-logo.png
A 2016/img/four-star-logo.svg
A 2016/img/hamburger-dark.png
A 2016/img/hamburger-dark.svg
A 2016/img/hamburger-light
A 2016/img/hamburger-light.svg
A 2016/img/impact-card.png
A 2016/img/impact-header-large.jpg
A 2016/img/jimmy-wales-article-card.png
A 2016/img/jimmy-wales-large.jpg
A 2016/img/jimmy-wales-mobile.jpg
A 2016/img/jimmy-wales-signature.svg
A 2016/img/katherine-maher-article-card.png
A 2016/img/katherine-maher-mobile.jpg
A 2016/img/katherine-maher-signature.svg
A 2016/img/katherine-maher.jpg
A 2016/img/mobile-nav-x-dark.svg
A 2016/img/mobile-nav-x-light.svg
A 2016/img/ok-emoji.png
A 2016/img/this-is-wikimedia.jpg
A 

[MediaWiki-commits] [Gerrit] mediawiki...MobileApp[master]: Update section edit pencil styles

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

Change subject: Update section edit pencil styles
..

Update section edit pencil styles

Bug: T151468
Change-Id: Ie19c48720ddd4e99ad6bf98ab7ecf819898aa911
---
M styles/editlinks.less
1 file changed, 4 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileApp 
refs/changes/27/339327/1

diff --git a/styles/editlinks.less b/styles/editlinks.less
index 3b4aa8e..e24fab9 100644
--- a/styles/editlinks.less
+++ b/styles/editlinks.less
@@ -11,10 +11,12 @@
 }
 
 a.edit_section_button.android {
-height: 48px;
-width: 48px;
+height: 28px;
+width: 28px;
+margin-right: 8px;
 border: none;
 background-image: url("file:///android_asset/images/edit.png");
+background-size: 28px 28px;
 background-position: center;
 position: relative;
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie19c48720ddd4e99ad6bf98ab7ecf819898aa911
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileApp
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] operations/mediawiki-config[master]: Update logo for bswiki (Bosnian Wikipedia)

2017-02-22 Thread DatGuy (Code Review)
DatGuy has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/339326 )

Change subject: Update logo for bswiki (Bosnian Wikipedia)
..

Update logo for bswiki (Bosnian Wikipedia)

Replace the blurry version of the bswiki image with the new, sharpened
one.

Bug: T158815
Change-Id: I17e9eed3d25bed8665c7216650caa0d27384e4d9
---
M static/images/project-logos/bswiki.png
1 file changed, 0 insertions(+), 0 deletions(-)


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

diff --git a/static/images/project-logos/bswiki.png 
b/static/images/project-logos/bswiki.png
index 10bbd71..5f83247 100644
--- a/static/images/project-logos/bswiki.png
+++ b/static/images/project-logos/bswiki.png
Binary files differ

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/vagrant[master]: Added a CSP headers filter to RESTBase config.

2017-02-22 Thread Ppchelko (Code Review)
Ppchelko has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/339325 )

Change subject: Added a CSP headers filter to RESTBase config.
..

Added a CSP headers filter to RESTBase config.

Bug: T158822
Change-Id: I95612651b4a2101677171ac2f511e27ecf11ad3b
---
M puppet/modules/restbase/templates/config.yaml.erb
1 file changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant 
refs/changes/25/339325/1

diff --git a/puppet/modules/restbase/templates/config.yaml.erb 
b/puppet/modules/restbase/templates/config.yaml.erb
index 51b055b..adbaaff 100644
--- a/puppet/modules/restbase/templates/config.yaml.erb
+++ b/puppet/modules/restbase/templates/config.yaml.erb
@@ -45,6 +45,8 @@
 spec:
   title: "The RESTBase root"
   # Some more general RESTBase info
+  x-request-filters:
+- path: lib/security_response_header_filter.js
   x-sub-request-filters:
 - type: default
   name: http

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I95612651b4a2101677171ac2f511e27ecf11ad3b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: master
Gerrit-Owner: Ppchelko 

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


[MediaWiki-commits] [Gerrit] mediawiki...WikimediaEvents[master]: Hygiene: Simplify getFirstPaintTime dependencies

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

Change subject: Hygiene: Simplify getFirstPaintTime dependencies
..


Hygiene: Simplify getFirstPaintTime dependencies

This fixes an inconsistency between the treatment of the IE and Chrome
in getFirstPaintTime: [window.]performance.timing.navigationTiming is
required for the former but not for the latter - for which we use the
value provided by Chrome.

Given that we access performance.timing in the body of the function,
drop the parameter and get performance.timing.navigationTiming directly.

Change-Id: I04928980f72d86db212e26ed698060252c0780b0
---
M modules/ext.wikimediaEvents.readingDepth.js
1 file changed, 7 insertions(+), 5 deletions(-)

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



diff --git a/modules/ext.wikimediaEvents.readingDepth.js 
b/modules/ext.wikimediaEvents.readingDepth.js
index 34c4379..d820224 100644
--- a/modules/ext.wikimediaEvents.readingDepth.js
+++ b/modules/ext.wikimediaEvents.readingDepth.js
@@ -13,14 +13,16 @@
*
* @param {PerformanceTiming} perf See
*  https://developer.mozilla.org/en-US/docs/Web/API/PerformanceTiming.
-   * @param {Float} from time in ms at which navigation commenced
-   * @return {Integer|undefined} time in ms when first paint occurred or 
undefined if not available.
+   * @return {number|undefined} Time, in milliseconds since the UNIX 
epoch, when
+   *  the document was first painted by the UA; or `undefined` if the UA 
doesn't
+   *  report first paint time or reports a first paint time that's before 
the UA
+   *  began loading the document
*/
-   function getFirstPaintTime( perf, from ) {
+   function getFirstPaintTime( perf ) {
var chromeLoadTimes,
timing = perf.timing;
 
-   if ( timing.msFirstPaint > from ) {
+   if ( timing.msFirstPaint > timing.navigationStart ) {
return timing.msFirstPaint;
/* global chrome */
} else if ( window.chrome && $.isFunction( chrome.loadTimes ) ) 
{
@@ -58,7 +60,7 @@
var now,
// will always be defined.
domInteractive = perf.timing.domInteractive,
-   fp = getFirstPaintTime( perf, navStart ),
+   fp = getFirstPaintTime( perf ),
data = $.extend( {}, EVENT, {
action: action,
domInteractiveTime: domInteractive - navStart,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I04928980f72d86db212e26ed698060252c0780b0
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/WikimediaEvents
Gerrit-Branch: master
Gerrit-Owner: Phuedx 
Gerrit-Reviewer: Bmansurov 
Gerrit-Reviewer: Jhernandez 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...WikimediaEvents[master]: Hygiene: Use mw.track to log events

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

Change subject: Hygiene: Use mw.track to log events
..


Hygiene: Use mw.track to log events

Rather than loading the ReadingDepth Event Logging schema module and
logging an event ourselves, defer to the mechanism provided by EL
itself.

This decouples the component that generates the data for the event from
the component that (lazily) logs events.

Bug: T155639
Change-Id: Ic55227b670be28989fc1a22521f50d09297a
---
M modules/ext.wikimediaEvents.readingDepth.js
1 file changed, 2 insertions(+), 3 deletions(-)

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



diff --git a/modules/ext.wikimediaEvents.readingDepth.js 
b/modules/ext.wikimediaEvents.readingDepth.js
index 34c4379..6713e6b 100644
--- a/modules/ext.wikimediaEvents.readingDepth.js
+++ b/modules/ext.wikimediaEvents.readingDepth.js
@@ -74,9 +74,8 @@
data.totalLength = Math.round( now - from );
data.visibleLength =  Math.round( now - from - msPaused 
);
}
-   mw.loader.using( 'schema.ReadingDepth' ).then( function () {
-   mw.eventLog.logEvent( 'ReadingDepth', data );
-   } );
+
+   mw.track( 'event.ReadingDepth', data );
}
 
/**

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic55227b670be28989fc1a22521f50d09297a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikimediaEvents
Gerrit-Branch: master
Gerrit-Owner: Phuedx 
Gerrit-Reviewer: Bmansurov 
Gerrit-Reviewer: Jhernandez 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: mediawiki.api: Tweak deprecation logging again

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

Change subject: mediawiki.api: Tweak deprecation logging again
..

mediawiki.api: Tweak deprecation logging again

Follow-up to 15b5dc5d8eecb5a1784b0b7165a90a81e071d750,
9a8e2b7124ed10db3db7f7767d532cde00935876.

Change-Id: Idf9083e81312b97e69ec786d99ea3cc46ba80123
---
M resources/src/mediawiki/api.js
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/24/339324/1

diff --git a/resources/src/mediawiki/api.js b/resources/src/mediawiki/api.js
index 660064a..37c0c9b 100644
--- a/resources/src/mediawiki/api.js
+++ b/resources/src/mediawiki/api.js
@@ -489,7 +489,7 @@
'stashwrongowner',
'stashnosuchfilekey'
];
-   mw.log.deprecate( mw.Api, 'errors', mw.Api.errors, 'mw.Api.errors' );
+   mw.log.deprecate( mw.Api, 'errors', mw.Api.errors, null, 
'mw.Api.errors' );
 
/**
 * @static
@@ -501,6 +501,6 @@
'duplicate',
'exists'
];
-   mw.log.deprecate( mw.Api, 'warnings', mw.Api.warnings, 
'mw.Api.warnings' );
+   mw.log.deprecate( mw.Api, 'warnings', mw.Api.warnings, null, 
'mw.Api.warnings' );
 
 }( mediaWiki, jQuery ) );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idf9083e81312b97e69ec786d99ea3cc46ba80123
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] operations/puppet[production]: mwopenstackclients: Retry for failed connection.

2017-02-22 Thread Andrew Bogott (Code Review)
Andrew Bogott has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/339323 )

Change subject: mwopenstackclients:  Retry for failed connection.
..


mwopenstackclients:  Retry for failed connection.

Partial bandaid for T156337

Change-Id: I136a8fbf05eb2d0a67038667401eeff23a9d933f
---
M modules/openstack/files/mwopenstackclients.py
1 file changed, 5 insertions(+), 3 deletions(-)

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



diff --git a/modules/openstack/files/mwopenstackclients.py 
b/modules/openstack/files/mwopenstackclients.py
index 33182fe..5d4d094 100644
--- a/modules/openstack/files/mwopenstackclients.py
+++ b/modules/openstack/files/mwopenstackclients.py
@@ -89,7 +89,7 @@
 if project not in self.keystoneclients:
 session = self.session(project)
 self.keystoneclients[project] = keystone_client.Client(
-session=session, interface='public')
+session=session, interface='public', connect_retries=5)
 return self.keystoneclients[project]
 
 def novaclient(self, project=None):
@@ -99,7 +99,8 @@
 if project not in self.novaclients:
 session = self.session(project)
 self.novaclients[project] = nova_client.Client('2',
-   session=session)
+   session=session,
+   connect_retries=5)
 return self.novaclients[project]
 
 def glanceclient(self, project=None):
@@ -109,7 +110,8 @@
 if project not in self.glanceclients:
 session = self.session(project)
 self.glanceclients[project] = glanceclient.Client('1',
-  session=session)
+  session=session,
+  
connect_retries=5)
 return self.glanceclients[project]
 
 def allprojects(self):

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I136a8fbf05eb2d0a67038667401eeff23a9d933f
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Andrew Bogott 
Gerrit-Reviewer: Andrew Bogott 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: mwopenstackclients: Retry for failed connection.

2017-02-22 Thread Andrew Bogott (Code Review)
Andrew Bogott has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/339323 )

Change subject: mwopenstackclients:  Retry for failed connection.
..

mwopenstackclients:  Retry for failed connection.

Partial bandaid for T156337

Change-Id: I136a8fbf05eb2d0a67038667401eeff23a9d933f
---
M modules/openstack/files/mwopenstackclients.py
1 file changed, 5 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/23/339323/1

diff --git a/modules/openstack/files/mwopenstackclients.py 
b/modules/openstack/files/mwopenstackclients.py
index 33182fe..5d4d094 100644
--- a/modules/openstack/files/mwopenstackclients.py
+++ b/modules/openstack/files/mwopenstackclients.py
@@ -89,7 +89,7 @@
 if project not in self.keystoneclients:
 session = self.session(project)
 self.keystoneclients[project] = keystone_client.Client(
-session=session, interface='public')
+session=session, interface='public', connect_retries=5)
 return self.keystoneclients[project]
 
 def novaclient(self, project=None):
@@ -99,7 +99,8 @@
 if project not in self.novaclients:
 session = self.session(project)
 self.novaclients[project] = nova_client.Client('2',
-   session=session)
+   session=session,
+   connect_retries=5)
 return self.novaclients[project]
 
 def glanceclient(self, project=None):
@@ -109,7 +110,8 @@
 if project not in self.glanceclients:
 session = self.session(project)
 self.glanceclients[project] = glanceclient.Client('1',
-  session=session)
+  session=session,
+  
connect_retries=5)
 return self.glanceclients[project]
 
 def allprojects(self):

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I136a8fbf05eb2d0a67038667401eeff23a9d933f
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Andrew Bogott 

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


[MediaWiki-commits] [Gerrit] mediawiki...Elastica[es5]: Update to Elastica 5.1.0

2017-02-22 Thread EBernhardson (Code Review)
EBernhardson has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/339322 )

Change subject: Update to Elastica 5.1.0
..

Update to Elastica 5.1.0

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


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Elastica 
refs/changes/22/339322/1

diff --git a/composer.json b/composer.json
index 23c7611..720fc45 100644
--- a/composer.json
+++ b/composer.json
@@ -13,6 +13,6 @@
],
"require": {
"php": ">=5.5.9",
-   "ruflin/elastica": "5.0.0"
+   "ruflin/elastica": "5.1.0"
}
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I26fa24790a95bd1d89a7df295f841e5ce735e372
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Elastica
Gerrit-Branch: es5
Gerrit-Owner: EBernhardson 

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


[MediaWiki-commits] [Gerrit] mediawiki...Popups[master]: Tests: Migrate gateway/mediawiki.test.js to node-qunit

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

Change subject: Tests: Migrate gateway/mediawiki.test.js to node-qunit
..


Tests: Migrate gateway/mediawiki.test.js to node-qunit

Change-Id: Ia47b0f793430b355eb2e39d74a05e72ea55de0b1
---
A tests/node-qunit/gateway/mediawiki.test.js
D tests/qunit/ext.popups/gateway/mediawiki.test.js
2 files changed, 220 insertions(+), 214 deletions(-)

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



diff --git a/tests/node-qunit/gateway/mediawiki.test.js 
b/tests/node-qunit/gateway/mediawiki.test.js
new file mode 100644
index 000..82b09cc
--- /dev/null
+++ b/tests/node-qunit/gateway/mediawiki.test.js
@@ -0,0 +1,220 @@
+var createModel = require( '../../../src/preview' ).createModel,
+   createMediaWikiApiGateway = require( '../../../src/gateway/mediawiki' ),
+   DEFAULT_CONSTANTS = {
+   THUMBNAIL_SIZE: 300
+   },
+   MEDIAWIKI_API_RESPONSE = {
+   query: {
+   pages: [
+   {
+   contentmodel: 'wikitext',
+   extract: 'Richard Paul "Rick" Astley 
(/\u02c8r\u026ak \u02c8\u00e6stli/; born 6 February 1966) is an English singer, 
songwriter, musician, and radio personality. His 1987 song, "Never Gonna Give 
You Up" was a No. 1 hit single in 25 countries. By the time of his retirement 
in 1993, Astley had sold approximately 40 million records worldwide.\nAstley 
made a comeback in 2007, becoming an Internet phenomenon when his video "Never 
Gonna Give You Up" became integral to the meme known as "rickrolling". Astley 
was voted "Best Act Ever" by Internet users at the...',
+   lastrevid: 748725726,
+   length: 32132,
+   fullurl: 
'https://en.wikipedia.org/wiki/Rick_Astley',
+   editurl: 
'https://en.wikipedia.org/w/index.php?title=Rick_Astley=edit',
+   canonicalurl: 
'https://en.wikipedia.org/wiki/Rick_Astley',
+   ns: 0,
+   pageid: 447541,
+   pagelanguage: 'en',
+   pagelanguagedir: 'ltr',
+   pagelanguagehtmlcode: 'en',
+   revisions: [ {
+   timestamp: 
'2016-11-10T00:14:14Z'
+   } ],
+   thumbnail: {
+   height: 300,
+   source: 
'https://upload.wikimedia.org/wikipedia/commons/thumb/6/6d/Rick_Astley_-_Pepsifest_2009.jpg/200px-Rick_Astley_-_Pepsifest_2009.jpg',
+   width: 200
+   },
+   title: 'Rick Astley',
+   touched: '2016-11-10T00:14:14Z'
+   }
+   ]
+   }
+   },
+   MEDIAWIKI_API_RESPONSE_PREVIEW_MODEL = createModel(
+   'Rick Astley',
+   'https://en.wikipedia.org/wiki/Rick_Astley',
+   'en',
+   'ltr',
+   'Richard Paul "Rick" Astley is an English singer, songwriter, 
musician, and radio personality. His 1987 song, "Never Gonna Give You Up" was a 
No. 1 hit single in 25 countries. By the time of his retirement in 1993, Astley 
had sold approximately 40 million records worldwide.\nAstley made a comeback in 
2007, becoming an Internet phenomenon when his video "Never Gonna Give You Up" 
became integral to the meme known as "rickrolling". Astley was voted "Best Act 
Ever" by Internet users at the',
+   {
+   height: 300,
+   source: 
'https://upload.wikimedia.org/wikipedia/commons/thumb/6/6d/Rick_Astley_-_Pepsifest_2009.jpg/200px-Rick_Astley_-_Pepsifest_2009.jpg',
+   width: 200
+   }
+   );
+
+QUnit.module( 'ext.popups/gateway/mediawiki' );
+
+QUnit.test( 'MediaWiki API gateway is called with correct arguments', function 
( assert ) {
+   var spy = this.sandbox.spy(),
+   api = {
+   get: spy
+   },
+   gateway = createMediaWikiApiGateway( api, DEFAULT_CONSTANTS ),
+   expectedOptions = {
+   action: 'query',
+   prop: 'info|extracts|pageimages|revisions|info',
+   formatversion: 2,
+   redirects: true,
+   exintro: true,
+ 

[MediaWiki-commits] [Gerrit] mediawiki...Popups[master]: Test: Migrate wait.test.js to node-qunit

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

Change subject: Test: Migrate wait.test.js to node-qunit
..


Test: Migrate wait.test.js to node-qunit

Don't use fake timers for now because of some problems with other async
tests.

Change-Id: If48a8c7390416938d50c9c0c39539fe4a6a9a6af
---
A tests/node-qunit/wait.test.js
D tests/qunit/ext.popups/wait.test.js
2 files changed, 26 insertions(+), 23 deletions(-)

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



diff --git a/tests/node-qunit/wait.test.js b/tests/node-qunit/wait.test.js
new file mode 100644
index 000..90d3958
--- /dev/null
+++ b/tests/node-qunit/wait.test.js
@@ -0,0 +1,26 @@
+var wait = require( '../../src/wait' );
+
+QUnit.module( 'ext.popups/wait' );
+
+QUnit.test( 'it should resolve after waiting', function ( assert ) {
+   var done = assert.async(),
+   timeout;
+
+   assert.expect( 1 );
+
+   timeout = this.sandbox.stub( global, 'setTimeout', function ( callback 
) {
+   callback();
+   } );
+
+   wait( 150 ).done( function () {
+   assert.strictEqual(
+   timeout.getCall( 0 ).args[ 1 ],
+   150,
+   'It waits for the given duration'
+   );
+
+   done();
+   } );
+
+   timeout.restore();
+} );
diff --git a/tests/qunit/ext.popups/wait.test.js 
b/tests/qunit/ext.popups/wait.test.js
deleted file mode 100644
index c5d115e..000
--- a/tests/qunit/ext.popups/wait.test.js
+++ /dev/null
@@ -1,23 +0,0 @@
-( function ( mw ) {
-
-   QUnit.module( 'ext.popups/wait' );
-
-   QUnit.test( 'it should resolve after waiting', function ( assert ) {
-   var done = assert.async();
-
-   this.sandbox.stub( window, 'setTimeout', function ( callback ) {
-   callback();
-   } );
-
-   mw.popups.wait( 150 ).done( function () {
-   assert.strictEqual(
-   window.setTimeout.getCall( 0 ).args[ 1 ],
-   150,
-   'It waits for the given duration'
-   );
-
-   done();
-   } );
-   } );
-
-}( mediaWiki ) );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If48a8c7390416938d50c9c0c39539fe4a6a9a6af
Gerrit-PatchSet: 6
Gerrit-Project: mediawiki/extensions/Popups
Gerrit-Branch: master
Gerrit-Owner: Jhernandez 
Gerrit-Reviewer: Bmansurov 
Gerrit-Reviewer: Jhernandez 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...Popups[master]: Tests: Up the min version of the node qunit runner

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

Change subject: Tests: Up the min version of the node qunit runner
..


Tests: Up the min version of the node qunit runner

It has important improvements, and we don't want dev to use a previous
version.

List of changes on the runner:
* 1.0.6 Add globals to window too
* 1.0.5 Don't reorder or run tests in parallel
* 1.0.4 Don't autostart the tests, they are manually started
* 1.0.3 Invoke sandbox restore after hooks have been called
* 1.0.2 Default fake timers and server to false

See https://github.com/joakin/mw-node-qunit/commits/master

Change-Id: Ic3283c99eb374bc9f85c703ef0b55f875d527e0b
---
M package.json
1 file changed, 2 insertions(+), 1 deletion(-)

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



diff --git a/package.json b/package.json
index 78811c2..7bd9176 100644
--- a/package.json
+++ b/package.json
@@ -18,7 +18,8 @@
 "grunt-eslint": "19.0.0",
 "grunt-jsonlint": "1.1.0",
 "grunt-stylelint": "^0.6.0",
-"mw-node-qunit": "^1.0.1",
+"mw-node-qunit": "^1.0.6",
+"mock-require": "^2.0.1",
 "redux": "3.6.0",
 "redux-thunk": "2.2.0",
 "stylelint-config-wikimedia": "0.3.0",

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic3283c99eb374bc9f85c703ef0b55f875d527e0b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Popups
Gerrit-Branch: master
Gerrit-Owner: Jhernandez 
Gerrit-Reviewer: Bmansurov 
Gerrit-Reviewer: Jhernandez 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: graphite: Unquote octal number in parameter default

2017-02-22 Thread Andrew Bogott (Code Review)
Andrew Bogott has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/339321 )

Change subject: graphite: Unquote octal number in parameter default
..


graphite: Unquote octal number in parameter default

Change-Id: I96f8a4e5240454cf17cd2ab5e19931b67bb5bca3
---
M modules/graphite/files/archive-instances
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/modules/graphite/files/archive-instances 
b/modules/graphite/files/archive-instances
index b80702b..7b7f0d0 100755
--- a/modules/graphite/files/archive-instances
+++ b/modules/graphite/files/archive-instances
@@ -41,7 +41,7 @@
 ))
 
 
-def makedirs_exist_ok(path, mode='0o777'):
+def makedirs_exist_ok(path, mode=0o777):
 try:
 os.makedirs(path, mode)
 except OSError as exc:  # Python >2.5

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I96f8a4e5240454cf17cd2ab5e19931b67bb5bca3
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Landscheidt 
Gerrit-Reviewer: Andrew Bogott 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Further Benevity fix, resolve error in 'None Provided By Don...

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

Change subject: Further Benevity fix, resolve error in 'None Provided By Donor 
fix'
..


Further Benevity fix, resolve error in 'None Provided By Donor fix'

I didn't wind up leveraging the function extraction, but still included it.

Bug: T115044
Change-Id: I76b7a3254dbd6b8b6a232132c1ae56990969c141
---
M sites/all/modules/offline2civicrm/BenevityFile.php
M sites/all/modules/offline2civicrm/ChecksFile.php
M sites/all/modules/offline2civicrm/tests/BenevityTest.php
M sites/all/modules/wmf_civicrm/wmf_civicrm.module
4 files changed, 55 insertions(+), 19 deletions(-)

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



diff --git a/sites/all/modules/offline2civicrm/BenevityFile.php 
b/sites/all/modules/offline2civicrm/BenevityFile.php
index e5fb16e..64c82b3 100644
--- a/sites/all/modules/offline2civicrm/BenevityFile.php
+++ b/sites/all/modules/offline2civicrm/BenevityFile.php
@@ -22,9 +22,6 @@
   function getRequiredData() {
 return array(
   'matching_organization_name',
-  'first_name',
-  'email',
-  'last_name',
   'currency',
   'date',
 );
@@ -55,9 +52,10 @@
 }
 foreach ($msg as $field => $value) {
   if ($value == 'Not shared by donor') {
-unset($msg['field']);
+$msg[$field] = '';
   }
 }
+
 $msg['employer_id'] = 
$this->getOrganizationID($msg['matching_organization_name']);
 // If we let this go through the individual will be treated as an 
organization.
 parent::mungeMessage($msg);
@@ -66,6 +64,31 @@
   $this->unsetAddressFields($msg);
 }
 
+  }
+
+  /**
+   * Validate that required fields are present.
+   *
+   * If a contact has already been identified name fields are not required.
+   *
+   * @param array $msg
+   *
+   * @throws \WmfException
+   */
+  protected function validateRequiredFields($msg) {
+$failed = array();
+$requiredFields = $this->getRequiredData();
+if (empty($msg['contact_id'])) {
+  $requiredFields = array_merge($requiredFields, array('first_name', 
'last_name', 'email'));
+}
+foreach ($requiredFields as $key) {
+  if (!array_key_exists($key, $msg) or empty($msg[$key])) {
+$failed[] = $key;
+  }
+}
+if ($failed) {
+  throw new WmfException('CIVI_REQ_FIELD', t("Missing required fields 
@keys during check import", array("@keys" => implode(", ", $failed;
+}
   }
 
   protected function getDefaultValues() {
@@ -185,8 +208,8 @@
* @throws \WmfException
*/
   protected function getIndividualID(&$msg) {
-if ($msg['email'] === 'Not shared by donor'
-  && ($msg['first_name'] === 'Not shared by donor' && $msg['last_name'] 
=== 'Not shared by donor')
+if (empty($msg['email'])
+  && (empty($msg['first_name']) && empty($msg['last_name']))
 ) {
   try {
 // At best we have a first name or a last name. Match this to our 
anonymous contact.
@@ -201,9 +224,9 @@
 }
 
 $params = array(
-  'email' => ($msg['email'] !== 'Not shared by donor') ? $msg['email'] : 
'',
-  'first_name' => ($msg['first_name'] !== 'Not shared by donor') ? 
$msg['first_name'] : '',
-  'last_name' => ($msg['last_name'] !== 'Not shared by donor') ? 
$msg['last_name'] : '',
+  'email' => $msg['email'],
+  'first_name' => $msg['first_name'],
+  'last_name' => $msg['last_name'],
   'contact_type' => 'Individual',
   'return' => 'current_employer',
   'sort' => 'organization_name DESC',
diff --git a/sites/all/modules/offline2civicrm/ChecksFile.php 
b/sites/all/modules/offline2civicrm/ChecksFile.php
index 30b90f6..0a9abcb 100644
--- a/sites/all/modules/offline2civicrm/ChecksFile.php
+++ b/sites/all/modules/offline2civicrm/ChecksFile.php
@@ -222,15 +222,7 @@
 
 $this->mungeMessage( $msg );
 
-$failed = array();
-foreach ( $this->getRequiredData() as $key ) {
-if ( !array_key_exists( $key, $msg ) or empty( $msg[$key] ) ) {
-$failed[] = $key;
-}
-}
-if ( $failed ) {
-throw new WmfException( 'CIVI_REQ_FIELD', t( "Missing required 
fields @keys during check import", array( "@keys" => implode( ", ", $failed ) ) 
) );
-}
+$this->validateRequiredFields($msg);
 
 wmf_common_set_message_source( $msg, 'direct', 'Offline importer: ' . 
get_class( $this ) );
 
@@ -604,4 +596,23 @@
 return $contribution;
   }
 
+  /**
+   * Validate that required fields are present.
+   *
+   * @param array $msg
+   *
+   * @throws \WmfException
+   */
+  protected function validateRequiredFields($msg) {
+$failed = array();
+foreach ($this->getRequiredData() as $key) {
+  if (!array_key_exists($key, $msg) or empty($msg[$key])) {
+$failed[] = $key;
+  }
+}
+if ($failed) {
+  throw new 

[MediaWiki-commits] [Gerrit] operations/puppet[production]: rubocop disable Style/PercentLiteralDelimiters

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

Change subject: rubocop disable Style/PercentLiteralDelimiters
..


rubocop disable Style/PercentLiteralDelimiters

The rubocop rule is quite annoying, it enforces specific delimiters in
ruby string literals. The one to delimite regex enforces curly braces
such as:

  %{my regex here}

Though curly braces are used in regex, and we have lot of examples using
an exclamation marks or percentage signs instead:

  %r!^lib/puppet\.rb$!
  %r%^lib/(.*)\.rb$%

Disable Style/PercentLiteralDelimiters so we can use whatever delimiters
we want.

Manually update .rubocop_todo.yml to drop the per file ignores now that
it is globally disabled.  We can not auto generate it via
--auto-gen-config since we already manually edited it at various places.

Style reference:
https://github.com/bbatsov/ruby-style-guide#percent-literal-braces

Change-Id: I7a1c52a1616f5efe3be77d37fa70b9a6752bc173
---
M .rubocop.yml
M .rubocop_todo.yml
2 files changed, 4 insertions(+), 11 deletions(-)

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



diff --git a/.rubocop.yml b/.rubocop.yml
index e900132..d1b0821 100644
--- a/.rubocop.yml
+++ b/.rubocop.yml
@@ -25,6 +25,10 @@
 Style/Alias:
   Enabled: false
 
+# Let us whatever delimiters we want eg: %{One Two} or %r%/tmp%
+Style/PercentLiteralDelimiters:
+  Enabled: false
+
 Style/SignalException:
   Enabled: false
 
diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml
index d96ce2c..96445cb 100644
--- a/.rubocop_todo.yml
+++ b/.rubocop_todo.yml
@@ -228,17 +228,6 @@
   Exclude:
 - 'modules/wmflib/lib/puppet/parser/functions/ipresolve.rb'
 
-# Offense count: 10
-# Cop supports --auto-correct.
-# Configuration parameters: PreferredDelimiters.
-Style/PercentLiteralDelimiters:
-  Exclude:
-- 'modules/apt/lib/facter/apt.rb'
-- 'modules/base/lib/facter/initsystem.rb'
-- 'modules/base/lib/facter/lldp.rb'
-- 'modules/ganeti/lib/facter/ganeti.rb'
-- 'modules/gridengine/lib/puppet/provider/gridengine_resource/parsed.rb'
-
 # Offense count: 2
 # Cop supports --auto-correct.
 Style/PerlBackrefs:

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7a1c52a1616f5efe3be77d37fa70b9a6752bc173
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Hashar 
Gerrit-Reviewer: Dduvall 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: Zfilipin 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: resourceloader: Avoid endless module_deps write for the same...

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

Change subject: resourceloader: Avoid endless module_deps write for the same 
value
..


resourceloader: Avoid endless module_deps write for the same value

Follows-up 047b60b96d (ref T111481).

The if-condition compared the expanded paths, not the relative paths.
This meant there were two conditions under which the code will perform
a useless write that inserts *literally* the exact same JSON value.

1. The base directory ($IP) changes after a branch upgrade.
2. Paths contain '../', '//' or other unnormalized paths.

The latter caused various Echo and ULS methods to keep writing the
same value because one of their images is referenced in CSS using
'../'. When inserted in the database as relative path and then
expanded again at run-time and compared to the input value, they
don't match ("$IP/foo/../bar.png" != "$IP/bar.png") and cause a write.

Bug: T158813
Change-Id: I223c232d3a8c4337d09ecf7ec6e5cd7cf7effbff
---
M includes/resourceloader/ResourceLoaderModule.php
1 file changed, 20 insertions(+), 6 deletions(-)

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



diff --git a/includes/resourceloader/ResourceLoaderModule.php 
b/includes/resourceloader/ResourceLoaderModule.php
index 71e5939..6d2bc0d 100644
--- a/includes/resourceloader/ResourceLoaderModule.php
+++ b/includes/resourceloader/ResourceLoaderModule.php
@@ -461,13 +461,28 @@
 * @param array $localFileRefs List of files
 */
protected function saveFileDependencies( ResourceLoaderContext 
$context, $localFileRefs ) {
-   // Normalise array
-   $localFileRefs = array_values( array_unique( $localFileRefs ) );
-   sort( $localFileRefs );
 
try {
+   // Related bugs and performance considerations:
+   // 1. Don't needlessly change the database value with 
the same list in a
+   //different order or with duplicates.
+   // 2. Use relative paths to avoid ghost entries when 
$IP changes. (T111481)
+   // 3. Don't needlessly replace the database with the 
same value
+   //just because $IP changed (e.g. when upgrading a 
wiki).
+   // 4. Don't create an endless replace loop on every 
request for this
+   //module when '../' is used anywhere. Even though 
both are expanded
+   //(one expanded by getFileDependencies from the DB, 
the other is
+   //still raw as originally read by RL), the latter 
has not
+   //been normalized yet.
+
+   // Normalise
+   $localFileRefs = array_values( array_unique( 
$localFileRefs ) );
+   sort( $localFileRefs );
+   $localPaths = self::getRelativePaths( $localFileRefs );
+
+   $storedPaths = self::getRelativePaths( 
$this->getFileDependencies( $context ) );
// If the list has been modified since last time we 
cached it, update the cache
-   if ( $localFileRefs !== $this->getFileDependencies( 
$context ) ) {
+   if ( $localPaths !== $storedPaths ) {
$vary = $context->getSkin() . '|' . 
$context->getLanguage();
$cache = ObjectCache::getLocalClusterInstance();
$key = $cache->makeKey( __METHOD__, 
$this->getName(), $vary );
@@ -476,8 +491,7 @@
return; // T124649; avoid write slams
}
 
-   // Use relative paths to avoid ghost entries 
when $IP changes (T111481)
-   $deps = FormatJson::encode( 
self::getRelativePaths( $localFileRefs ) );
+   $deps = FormatJson::encode( $localPaths );
$dbw = wfGetDB( DB_MASTER );
$dbw->upsert( 'module_deps',
[

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I223c232d3a8c4337d09ecf7ec6e5cd7cf7effbff
Gerrit-PatchSet: 5
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Krinkle 
Gerrit-Reviewer: Aaron Schulz 
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] operations/puppet[production]: graphite: Unquote octal number in parameter default

2017-02-22 Thread Tim Landscheidt (Code Review)
Hello Andrew Bogott,

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

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

to review the following change.


Change subject: graphite: Unquote octal number in parameter default
..

graphite: Unquote octal number in parameter default

Change-Id: I96f8a4e5240454cf17cd2ab5e19931b67bb5bca3
---
M modules/graphite/files/archive-instances
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/modules/graphite/files/archive-instances 
b/modules/graphite/files/archive-instances
index b80702b..7b7f0d0 100755
--- a/modules/graphite/files/archive-instances
+++ b/modules/graphite/files/archive-instances
@@ -41,7 +41,7 @@
 ))
 
 
-def makedirs_exist_ok(path, mode='0o777'):
+def makedirs_exist_ok(path, mode=0o777):
 try:
 os.makedirs(path, mode)
 except OSError as exc:  # Python >2.5

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I96f8a4e5240454cf17cd2ab5e19931b67bb5bca3
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Landscheidt 
Gerrit-Reviewer: Andrew Bogott 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Phabricator: Add systemd template

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

Change subject: Phabricator: Add systemd template
..


Phabricator: Add systemd template

This change only adds the template but does not hook it up to any puppet code 
yet.

Note there is already an existing systemd file here

https://phabricator.wikimedia.org/diffusion/OPUP/browse/production/modules/phabricator/files/systemd/phd.service

Im moving it to a new location because we are going to use base::service
class to maintain systemd and init.d for this file.
It looks in templates/initscripts

Change-Id: Ic1b3483667a0c594b521b33662c4546ffcda8b79
---
M modules/phabricator/manifests/init.pp
R modules/phabricator/templates/initscripts/phd.systemd.erb
2 files changed, 5 insertions(+), 5 deletions(-)

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



diff --git a/modules/phabricator/manifests/init.pp 
b/modules/phabricator/manifests/init.pp
index cbb7103..c371e94 100644
--- a/modules/phabricator/manifests/init.pp
+++ b/modules/phabricator/manifests/init.pp
@@ -252,11 +252,11 @@
 
 if $::initsystem == 'systemd' {
 file { '/etc/systemd/system/phd.service':
-ensure => present,
-owner  => 'root',
-group  => 'root',
-mode   => '0444',
-source => 'puppet:///modules/phabricator/systemd/phd.service',
+ensure  => present,
+owner   => 'root',
+group   => 'root',
+mode=> '0444',
+content => template('phabricator/initscripts/phd.systemd.erb'),
 }
 }
 
diff --git a/modules/phabricator/files/systemd/phd.service 
b/modules/phabricator/templates/initscripts/phd.systemd.erb
similarity index 100%
rename from modules/phabricator/files/systemd/phd.service
rename to modules/phabricator/templates/initscripts/phd.systemd.erb

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic1b3483667a0c594b521b33662c4546ffcda8b79
Gerrit-PatchSet: 17
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Paladox 
Gerrit-Reviewer: 20after4 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: Giuseppe Lavagetto 
Gerrit-Reviewer: Paladox 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...PerformanceInspector[master]: view: Increase panel max height to 600px

2017-02-22 Thread Krinkle (Code Review)
Krinkle has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/339320 )

Change subject: view: Increase panel max height to 600px
..

view: Increase panel max height to 600px

OOjs UI will still crop it to the viewport if needed, but this allows
it to take up more screenspace which should make it easier to read
the graphs and tables.

Change-Id: I44a3fd0860635e5fd2ee856c5ddad84e3b8d2663
---
M modules/ext.PerformanceInspector.view.js
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/modules/ext.PerformanceInspector.view.js 
b/modules/ext.PerformanceInspector.view.js
index e2fdac2..95f2a1e 100644
--- a/modules/ext.PerformanceInspector.view.js
+++ b/modules/ext.PerformanceInspector.view.js
@@ -91,7 +91,7 @@
};
 
PerformanceDialog.prototype.getBodyHeight = function () {
-   return 350;
+   return 600;
};
 
PerformanceDialog.prototype.getActionProcess = function ( action ) {

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: EditPage: Throw exceptions on false contentModel

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

Change subject: EditPage: Throw exceptions on false contentModel
..


EditPage: Throw exceptions on false contentModel

contentModel should always have a value here.

Change-Id: Iba2538f383de7da94bd0e0e3eb7d7eca4e6cee7c
---
M includes/EditPage.php
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/includes/EditPage.php b/includes/EditPage.php
index 34062c0..a45c889 100644
--- a/includes/EditPage.php
+++ b/includes/EditPage.php
@@ -1256,7 +1256,7 @@
$revision = $this->mArticle->getRevisionFetched();
if ( $revision === null ) {
if ( !$this->contentModel ) {
-   $this->contentModel = 
$this->getTitle()->getContentModel();
+   throw new RuntimeException( 'EditPage 
contentModel was false' );
}
$handler = ContentHandler::getForModelID( 
$this->contentModel );
 
@@ -1300,7 +1300,7 @@
 
if ( $content === false || $content === null ) {
if ( !$this->contentModel ) {
-   $this->contentModel = 
$this->getTitle()->getContentModel();
+   throw new RuntimeException( 'EditPage 
contentModel was false' );
}
$handler = ContentHandler::getForModelID( 
$this->contentModel );
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iba2538f383de7da94bd0e0e3eb7d7eca4e6cee7c
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Addshore 
Gerrit-Reviewer: Addshore 
Gerrit-Reviewer: Jackmcbarn 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Tpt 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] wikimedia...SmashPig[master]: Move Ingenico base API wrapper functions to own class

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

Change subject: Move Ingenico base API wrapper functions to own class
..


Move Ingenico base API wrapper functions to own class

Tests for higher level functions shouldn't have to mock all the way
down at the cURL response level.

Bug: T158374
Change-Id: Icafa897a0a79430170a35b5c85427527132e5baf
---
A PaymentProviders/Ingenico/Api.php
M PaymentProviders/Ingenico/BankPaymentProvider.php
M PaymentProviders/Ingenico/IngenicoPaymentProvider.php
A PaymentProviders/Ingenico/Tests/phpunit/ApiTest.php
M SmashPig.yaml
5 files changed, 138 insertions(+), 49 deletions(-)

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



diff --git a/PaymentProviders/Ingenico/Api.php 
b/PaymentProviders/Ingenico/Api.php
new file mode 100644
index 000..2ef21d2
--- /dev/null
+++ b/PaymentProviders/Ingenico/Api.php
@@ -0,0 +1,64 @@
+baseUrl = $baseUrl;
+   $this->merchantId = $merchantId;
+   // FIXME: provide objects in constructor
+   $config = Context::get()->getConfiguration();
+   $this->authenticator = $config->object( 'authenticator' );
+   }
+
+   public function makeApiCall( $path, $method = 'POST', $data = null ) {
+   if ( is_array( $data ) ) {
+   // FIXME: this is weird, maybe OutboundRequest should 
handle this part
+   if ( $method === 'GET' ) {
+   $path .= '?' . http_build_query( $data );
+   $data = null;
+   } else {
+   $data = json_encode( $data );
+   }
+   }
+   $url = $this->baseUrl . self::API_VERSION . 
"/{$this->merchantId}/$path";
+   $request = new OutboundRequest( $url, $method );
+   $request->setBody( $data );
+   if ( $method !== 'GET' ) {
+   $request->setHeader( 'Content-Type', 'application/json' 
);
+   }
+   // Set date header manually so we can use it in signature 
generation
+   $date = new DateTime( 'now', new DateTimeZone( 'UTC' ) );
+   $request->setHeader( 'Date', $date->format( 'D, d M Y H:i:s T' 
) );
+
+   // set more headers...
+
+   $this->authenticator->signRequest( $request );
+
+   $response = $request->execute();
+   // TODO error handling
+   return $response;
+   }
+}
diff --git a/PaymentProviders/Ingenico/BankPaymentProvider.php 
b/PaymentProviders/Ingenico/BankPaymentProvider.php
index 9bd376b..67bda0b 100644
--- a/PaymentProviders/Ingenico/BankPaymentProvider.php
+++ b/PaymentProviders/Ingenico/BankPaymentProvider.php
@@ -50,7 +50,7 @@
'currencyCode' => $currency
);
$path = "products/$productId/directory";
-   $response = $this->makeApiCall( $path, 'GET', $query );
+   $response = $this->api->makeApiCall( $path, 'GET', 
$query );
 
// TODO: api class should probably decode
$decoded = json_decode( $response['body'] );
diff --git a/PaymentProviders/Ingenico/IngenicoPaymentProvider.php 
b/PaymentProviders/Ingenico/IngenicoPaymentProvider.php
index 85e2c9a..9fe7ad2 100644
--- a/PaymentProviders/Ingenico/IngenicoPaymentProvider.php
+++ b/PaymentProviders/Ingenico/IngenicoPaymentProvider.php
@@ -2,12 +2,7 @@
 
 namespace SmashPig\PaymentProviders\Ingenico;
 
-use DateTime;
-use DateTimeZone;
 use SmashPig\Core\Context;
-use SmashPig\Core\Configuration;
-use SmashPig\Core\Http\OutboundRequest;
-use SmashPig\Core\UtcDate;
 
 /**
  * Base class for Ingenico payments. Each payment product group should get
@@ -15,48 +10,12 @@
  */
 abstract class IngenicoPaymentProvider {
 
-   const API_VERSION = 'v1';
-   /**
-* @var Configuration
-*/
+   protected $api;
protected $config;
 
public function __construct( $options = array() ) {
+   // FIXME: provide objects in constructor
$this->config = Context::get()->getConfiguration();
-   }
-
-   protected function makeApiCall( $path, $method = 'POST', $data = null ) 
{
-   if ( is_array( $data ) ) {
-   // FIXME: this is weird, maybe OutboundRequest should 
handle this part
-   if ( $method === 'GET' ) {
-   $path .= '?' . http_build_query( $data );
-   $data = null;
-   } else {
-   $data = json_encode( $data );
-   }
-   }
-   $base = $this->config->val( 'base-url' );
-   if ( substr( 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: AutoloadGenerator: Add support for class_alias()

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

Change subject: AutoloadGenerator: Add support for class_alias()
..


AutoloadGenerator: Add support for class_alias()

Blob, Field, DatabaseBase are now auto-detected.

Change-Id: Ib8fae2ec3fbb3f5e4aca7965f81631c5f0485ea1
---
M includes/libs/rdbms/database/Database.php
M includes/libs/rdbms/encasing/Blob.php
M includes/libs/rdbms/field/Field.php
M includes/utils/AutoloadGenerator.php
A tests/phpunit/includes/utils/ClassCollectorTest.php
M tests/phpunit/structure/AutoLoaderTest.php
6 files changed, 122 insertions(+), 13 deletions(-)

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



diff --git a/includes/libs/rdbms/database/Database.php 
b/includes/libs/rdbms/database/Database.php
index 9d800a2..1c5c77e 100644
--- a/includes/libs/rdbms/database/Database.php
+++ b/includes/libs/rdbms/database/Database.php
@@ -3467,4 +3467,4 @@
}
 }
 
-class_alias( 'Database', 'DatabaseBase' );
+class_alias( Database::class, 'DatabaseBase' );
diff --git a/includes/libs/rdbms/encasing/Blob.php 
b/includes/libs/rdbms/encasing/Blob.php
index d394692..db5b7e5 100644
--- a/includes/libs/rdbms/encasing/Blob.php
+++ b/includes/libs/rdbms/encasing/Blob.php
@@ -18,4 +18,4 @@
}
 }
 
-class_alias( 'Wikimedia\Rdbms\Blob', 'Blob' );
+class_alias( Blob::class, 'Blob' );
diff --git a/includes/libs/rdbms/field/Field.php 
b/includes/libs/rdbms/field/Field.php
index 7a25f03..7918f36 100644
--- a/includes/libs/rdbms/field/Field.php
+++ b/includes/libs/rdbms/field/Field.php
@@ -32,4 +32,4 @@
function isNullable();
 }
 
-class_alias( 'Wikimedia\Rdbms\Field', 'Field' );
+class_alias( Field::class, 'Field' );
diff --git a/includes/utils/AutoloadGenerator.php 
b/includes/utils/AutoloadGenerator.php
index 0bfd4a27..55e228a 100644
--- a/includes/utils/AutoloadGenerator.php
+++ b/includes/utils/AutoloadGenerator.php
@@ -291,15 +291,6 @@
foreach ( glob( $this->basepath . '/*.php' ) as $file ) {
$this->readFile( $file );
}
-
-   // Legacy aliases (1.28)
-   $this->forceClassPath( 'DatabaseBase',
-   $this->basepath . 
'/includes/libs/rdbms/database/Database.php' );
-   // Legacy aliases (1.29)
-   $this->forceClassPath( 'Blob',
-   $this->basepath . 
'/includes/libs/rdbms/encasing/Blob.php' );
-   $this->forceClassPath( 'Field',
-   $this->basepath . 
'/includes/libs/rdbms/field/Field.php' );
}
 }
 
@@ -329,6 +320,11 @@
protected $tokens;
 
/**
+* @var array Class alias with target/name fields
+*/
+   protected $alias;
+
+   /**
 * @var string $code PHP code (including namespace = '';
$this->classes = [];
$this->startToken = null;
+   $this->alias = null;
$this->tokens = [];
 
foreach ( token_get_all( $code ) as $token ) {
@@ -358,6 +355,8 @@
if ( is_string( $token ) ) {
return;
}
+   // Note: When changing class name discovery logic,
+   // AutoLoaderTest.php may also need to be updated.
switch ( $token[0] ) {
case T_NAMESPACE:
case T_CLASS:
@@ -365,6 +364,12 @@
case T_TRAIT:
case T_DOUBLE_COLON:
$this->startToken = $token;
+   break;
+   case T_STRING:
+   if ( $token[1] === 'class_alias' ) {
+   $this->startToken = $token;
+   $this->alias = [];
+   }
}
}
 
@@ -388,6 +393,49 @@
}
break;
 
+   case T_STRING:
+   if ( $this->alias !== null ) {
+   // Flow 1 - Two string literals:
+   // - T_STRING  class_alias
+   // - '('
+   // - T_CONSTANT_ENCAPSED_STRING 'TargetClass'
+   // - ','
+   // - T_WHITESPACE
+   // - T_CONSTANT_ENCAPSED_STRING 'AliasName'
+   // - ')'
+   // Flow 2 - Use of ::class syntax for first 
parameter
+   // - T_STRING  class_alias
+   // - '('
+   // - T_STRING TargetClass
+   // - T_DOUBLE_COLON ::
+   // - T_CLASS class
+   // - ','
+   // - T_WHITESPACE
+  

[MediaWiki-commits] [Gerrit] operations/puppet[production]: systemd: update class name in a fail() error

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

Change subject: systemd: update class name in a fail() error
..


systemd: update class name in a fail() error

systemd::service_sidekick used to in the 'base' module, a failure
message hasn't been updated when the define got moved to the new
'systemd' module.

Change-Id: I2c0f0dce626b8dd7990cf3a9fb5c6a68b0f15884
---
M modules/systemd/manifests/sidekick.pp
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/modules/systemd/manifests/sidekick.pp 
b/modules/systemd/manifests/sidekick.pp
index ecfbc5c..3868635 100644
--- a/modules/systemd/manifests/sidekick.pp
+++ b/modules/systemd/manifests/sidekick.pp
@@ -37,7 +37,7 @@
 $ensure = present,
 ) {
 if $::initsystem != 'systemd' {
-fail('base::service_sidekick only works with systemd')
+fail('systemd::service_sidekick only works with systemd')
 }
 
 validate_ensure($ensure)

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2c0f0dce626b8dd7990cf3a9fb5c6a68b0f15884
Gerrit-PatchSet: 5
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Hashar 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: Giuseppe Lavagetto 
Gerrit-Reviewer: Mobrovac 
Gerrit-Reviewer: Muehlenhoff 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: phabricator: fix missing space in sshd-phab unit file

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

Change subject: phabricator: fix missing space in sshd-phab unit file
..


phabricator: fix missing space in sshd-phab unit file

sshd-phab service would not start on jessie with systemd since this space
was missing between -f and the path to the config file.

Bug: T158434
Change-Id: I3fab14f41873c2f9c762cccb283e04e1a211419b
---
M modules/phabricator/templates/sshd-phab.service.erb
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/modules/phabricator/templates/sshd-phab.service.erb 
b/modules/phabricator/templates/sshd-phab.service.erb
index 7ea2965..dd49e77 100644
--- a/modules/phabricator/templates/sshd-phab.service.erb
+++ b/modules/phabricator/templates/sshd-phab.service.erb
@@ -6,7 +6,7 @@
 [Service]
 EnvironmentFile=-/etc/default/ssh
 Environment="PHABRICATOR_ENV=phd"
-ExecStart=/usr/sbin/sshd -D -f<%= @sshd_config %>
+ExecStart=/usr/sbin/sshd -D -f <%= @sshd_config %>
 ExecReload=/bin/kill -HUP $MAINPID
 KillMode=process
 Restart=on-failure

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3fab14f41873c2f9c762cccb283e04e1a211419b
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn 
Gerrit-Reviewer: 20after4 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: Paladox 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] pywikibot/core[master]: tools: make general function to compute file sha

2017-02-22 Thread Mpaa (Code Review)
Mpaa has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/339317 )

Change subject: tools: make general function to compute file sha
..

tools: make general function to compute file sha

It can be reused in several places:
- site.upload()
- Filepage.download() [if/when it will be merged]

Change-Id: I756c4d127274f7f6031920127850f30de3964597
---
M pywikibot/site.py
M pywikibot/tools/__init__.py
M tests/tools_tests.py
3 files changed, 89 insertions(+), 10 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/17/339317/1

diff --git a/pywikibot/site.py b/pywikibot/site.py
index bdf1fb4..52e6927 100644
--- a/pywikibot/site.py
+++ b/pywikibot/site.py
@@ -18,7 +18,6 @@
 import copy
 import datetime
 import functools
-import hashlib
 import heapq
 import itertools
 import json
@@ -68,6 +67,7 @@
 from pywikibot.family import WikimediaFamily
 from pywikibot.throttle import Throttle
 from pywikibot.tools import (
+compute_file_hash,
 itergroup, UnicodeMixin, ComparableMixin, SelfCallMixin, SelfCallString,
 deprecated, deprecate_arg, deprecated_args, remove_last_args,
 redirect_func, issue_deprecation_warning,
@@ -6027,15 +6027,7 @@
 # The SHA1 was also requested so calculate and compare it
 assert 'sha1' in stash_info, \
 'sha1 not in stash info: {0}'.format(stash_info)
-sha1 = hashlib.sha1()
-bytes_to_read = offset
-with open(source_filename, 'rb') as f:
-while bytes_to_read > 0:
-read_bytes = f.read(min(bytes_to_read, 1 << 20))
-assert read_bytes  # make sure we actually read bytes
-bytes_to_read -= len(read_bytes)
-sha1.update(read_bytes)
-sha1 = sha1.hexdigest()
+sha1 = compute_file_hash(source_filename, bytes_to_read=offset)
 if sha1 != stash_info['sha1']:
 raise ValueError(
 'The SHA1 of {0} bytes of the stashed "{1}" is {2} '
diff --git a/pywikibot/tools/__init__.py b/pywikibot/tools/__init__.py
index 526fd93..261f5ac 100644
--- a/pywikibot/tools/__init__.py
+++ b/pywikibot/tools/__init__.py
@@ -10,6 +10,7 @@
 
 import collections
 import gzip
+import hashlib
 import inspect
 import itertools
 import os
@@ -1714,3 +1715,41 @@
 # re-read and check changes
 if os.stat(filename).st_mode != st_mode:
 warn(warn_str.format(filename, st_mode - stat.S_IFREG, mode))
+
+
+def compute_file_hash(filename, sha='sha1', bytes_to_read=None):
+"""Compute file hash.
+
+Result is expressed as hexdigest().
+
+@param filename: filename path
+@type filename: basestring
+
+@param func: hashing function among the following in hashlib:
+md5(), sha1(), sha224(), sha256(), sha384(), and sha512()
+function name shall be passed as string, e.g. 'sha1'.
+@type filename: basestring
+
+@param bytes_to_read: only the first bytes_to_read will be considered;
+if file size is smaller, the whole file will be considered.
+@type bytes_to_read: None or int
+
+"""
+size = os.path.getsize(filename)
+if bytes_to_read is None:
+bytes_to_read = size
+else:
+bytes_to_read = min(bytes_to_read, size)
+step = 1 << 20
+
+shas = ['md5', 'sha1', 'sha224', 'sha256', 'sha384', 'sha512']
+assert sha in shas
+sha = getattr(hashlib, sha)()  # sha instance
+
+with open(filename, 'rb') as f:
+while bytes_to_read > 0:
+read_bytes = f.read(min(bytes_to_read, step))
+assert read_bytes  # make sure we actually read bytes
+bytes_to_read -= len(read_bytes)
+sha.update(read_bytes)
+return sha.hexdigest()
diff --git a/tests/tools_tests.py b/tests/tools_tests.py
index 6e97772..c450966 100644
--- a/tests/tools_tests.py
+++ b/tests/tools_tests.py
@@ -754,6 +754,54 @@
 self.chmod.assert_called_once_with(self.file, 0o600)
 
 
+class TestFileShaCalculator(TestCase):
+
+"""Test calculator of sha of a file."""
+
+net = False
+
+filename = join_xml_data_path('article-pear-0.10.xml')
+
+def setUp(self):
+"""Setup tests."""
+super(TestFileShaCalculator, self).setUp()
+
+def test_md5_complete_calculation(self):
+Test md5 of complete file."""
+res = tools.compute_file_hash(self.filename, sha='md5')
+self.assertEqual(res, '5d7265e290e6733e1e2020630262a6f3')
+
+def test_md5_partial_calculation(self):
+Test md5 of partial file (1024 bytes)."""
+res = tools.compute_file_hash(self.filename, sha='md5',
+  bytes_to_read=1024)
+self.assertEqual(res, 'edf6e1accead082b6b831a0a600704bc')
+
+def 

[MediaWiki-commits] [Gerrit] integration/config[master]: Add tests for css-sanitizer, and update TemplateStyles

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

Change subject: Add tests for css-sanitizer, and update TemplateStyles
..


Add tests for css-sanitizer, and update TemplateStyles

css-sanitizer is a new library, to be pulled in by composer.

Swap TemplateStyles to extension-unittests-composer, because it'll be
pulling in css-sanitizer as soon as that gets on packagist.

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

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



diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index cd90d14..0fbc46f 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -6925,7 +6925,7 @@
   - name: mediawiki/extensions/TemplateStyles
 template:
  - name: composer-test
- - name: extension-unittests-generic
+ - name: extension-unittests-composer
  - name: npm
 check:
  - jsonlint
@@ -9060,6 +9060,13 @@
 postmerge:
   - doxygen-publish
 
+  - name: css-sanitizer
+template:
+ - name: composer-test-package55
+postmerge:
+  - doxygen-publish
+  - phpunit-coverage-publish
+
   - name: php-session-serializer
 template:
  - name: composer-test-package

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I47a4753b82754b1d35f248c2321c9041ffc22e9f
Gerrit-PatchSet: 2
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Anomie 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: Krinkle 
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] mediawiki/core[master]: Add GENDER to rollback-success message

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

Change subject: Add GENDER to rollback-success message
..


Add GENDER to rollback-success message

Bug: T141250
Change-Id: I99c2b5ad5594b25928ad5bfd3f3a36b19a2c041c
---
M includes/actions/RollbackAction.php
M languages/i18n/en.json
M languages/i18n/qqq.json
3 files changed, 10 insertions(+), 4 deletions(-)

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



diff --git a/includes/actions/RollbackAction.php 
b/includes/actions/RollbackAction.php
index aa2858d..9d336e4 100644
--- a/includes/actions/RollbackAction.php
+++ b/includes/actions/RollbackAction.php
@@ -41,6 +41,7 @@
 * - confirm-rollback-button
 * - rollbackfailed
 * - rollback-missingparam
+* - rollback-success-notify
 */
 
/**
@@ -123,8 +124,13 @@
 
$old = Linker::revUserTools( $current );
$new = Linker::revUserTools( $target );
-   $this->getOutput()->addHTML( $this->msg( 'rollback-success' 
)->rawParams( $old, $new )
-   ->parseAsBlock() );
+   $this->getOutput()->addHTML(
+   $this->msg( 'rollback-success' )
+   ->rawParams( $old, $new )
+   ->params( $current->getUserText( 
Revision::FOR_THIS_USER, $user ) )
+   ->params( $target->getUserText( 
Revision::FOR_THIS_USER, $user ) )
+   ->parseAsBlock()
+   );
 
if ( $user->getBoolOption( 'watchrollback' ) ) {
$user->addWatch( $this->page->getTitle(), 
User::IGNORE_USER_RIGHTS );
diff --git a/languages/i18n/en.json b/languages/i18n/en.json
index b3781c2..8cd9eb8 100644
--- a/languages/i18n/en.json
+++ b/languages/i18n/en.json
@@ -2160,7 +2160,7 @@
"editcomment": "The edit summary was: $1.",
"revertpage": "Reverted edits by [[Special:Contributions/$2|$2]] 
([[User talk:$2|talk]]) to last revision by [[User:$1|$1]]",
"revertpage-nouser": "Reverted edits by a hidden user to last revision 
by {{GENDER:$1|[[User:$1|$1]]}}",
-   "rollback-success": "Reverted edits by $1;\nchanged back to last 
revision by $2.",
+   "rollback-success": "Reverted edits by {{GENDER:$3|$1}};\nchanged back 
to last revision by {{GENDER:$4|$2}}.",
"rollback-success-notify": "Reverted edits by $1;\nchanged back to last 
revision by $2. [$3 Show changes]",
"sessionfailure-title": "Session failure",
"sessionfailure": "There seems to be a problem with your login 
session;\nthis action has been canceled as a precaution against session 
hijacking.\nGo back to the previous page, reload that page and then try again.",
diff --git a/languages/i18n/qqq.json b/languages/i18n/qqq.json
index 4ec5cec..02188c8 100644
--- a/languages/i18n/qqq.json
+++ b/languages/i18n/qqq.json
@@ -2344,7 +2344,7 @@
"editcomment": "Only shown if there is an edit {{msg-mw|Summary}}. 
Parameters:\n* $1 - the edit summary",
"revertpage": "Parameters:\n* $1 - username 1\n* $2 - username 2\n* $3 
- (Optional) revision ID of the revision reverted to\n* $4 - (Optional) 
timestamp of the revision reverted to\n* $5 - (Optional) revision ID of the 
revision reverted from\n* $6 - (Optional) timestamp of the revision reverted 
from\nSee also:\n* {{msg-mw|Revertpage-nouser}}\n{{Identical|Revert}}",
"revertpage-nouser": "This is a confirmation message a user sees after 
reverting, when the username of the version is hidden with 
RevisionDelete.\n\nIn other cases the message {{msg-mw|Revertpage}} is 
used.\n\nParameters:\n* $1 - username 1, can be used for GENDER\n* $2 - 
(Optional) username 2\n* $3 - (Optional) revision ID of the revision reverted 
to\n* $4 - (Optional) timestamp of the revision reverted to\n* $5 - (Optional) 
revision ID of the revision reverted from\n* $6 - (Optional) timestamp of the 
revision reverted from",
-   "rollback-success": "This message shows up on screen after successful 
revert (generally visible only to admins). $1 describes user whose changes have 
been reverted, $2 describes user which produced version, which replaces 
reverted version.\n{{Identical|Revert}}\n{{Identical|Rollback}}",
+   "rollback-success": "This message shows up on screen after successful 
revert (generally visible only to admins). Parameters:\n* $1 - user whose 
changes have been reverted\n* $2 - user who produced version, which replaces 
reverted version\n* $3 - the first user's name, can be used for GENDER\n* $4 - 
the second user's name, can be used for 
GENDER\n{{Identical|Revert}}\n{{Identical|Rollback}}",
"rollback-success-notify": "Notification shown after a successful 
revert.\n* $1 - User whose changes have been reverted\n* $2 - User that made 
the edit that was 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: resourceloader: Avoid endless module_deps write for the same...

2017-02-22 Thread Krinkle (Code Review)
Krinkle has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/339316 )

Change subject: resourceloader: Avoid endless module_deps write for the same 
value
..

resourceloader: Avoid endless module_deps write for the same value

The if-condition compared the expanded paths, not the relative paths.
This meant there were two conditions under which the code will perform
a useless write that inserts *literally* the exact same JSON value.

1. The base directory ($IP) changes after a branch upgrade.
2. Paths contain '../', '//' or other unnormalized paths.

The latter caused various Echo and ULS methods to keep writing the
same value because one of their images is referenced in CSS using
'../'. When inserted in the database as relative path and then
expanded again at run-time and compared to the input value, they
don't match ("$IP/foo/../bar.png" != "$IP/bar.png") and cause a write.

Bug: T158813
Change-Id: I223c232d3a8c4337d09ecf7ec6e5cd7cf7effbff
---
M includes/resourceloader/ResourceLoaderModule.php
1 file changed, 21 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/16/339316/1

diff --git a/includes/resourceloader/ResourceLoaderModule.php 
b/includes/resourceloader/ResourceLoaderModule.php
index 71e5939..c282982 100644
--- a/includes/resourceloader/ResourceLoaderModule.php
+++ b/includes/resourceloader/ResourceLoaderModule.php
@@ -461,13 +461,29 @@
 * @param array $localFileRefs List of files
 */
protected function saveFileDependencies( ResourceLoaderContext 
$context, $localFileRefs ) {
-   // Normalise array
-   $localFileRefs = array_values( array_unique( $localFileRefs ) );
-   sort( $localFileRefs );
 
try {
// If the list has been modified since last time we 
cached it, update the cache
-   if ( $localFileRefs !== $this->getFileDependencies( 
$context ) ) {
+   //
+   // Related bugs and performance considerations:
+   // 1. Don't needlessly change the database value with 
the same list in a
+   //different order or with duplicates.
+   // 2. Use relative paths to avoid ghost entries when 
$IP changes. (T111481)
+   // 3. Don't needlessly replace the database with the 
same value
+   //just because $IP changed (e.g. when upgrading a 
wiki).
+   // 4. Don't create an endless replace loop on every 
request for this
+   //module when '../' is used anywhere. Eventhough 
both are expanded
+   //(one expanded by getFileDependencies from the DB, 
the other is
+   //still raw as originally read by RL), the latter 
has not
+   //been normalized yet.
+
+   // Normalise
+   $localFileRefs = array_values( array_unique( 
$localFileRefs ) );
+   sort( $localFileRefs );
+   $localPaths = self::getRelativePaths( $localFileRefs );
+
+   $storedPaths = self::getRelativePaths( 
$this->getFileDependencies( $context ) );
+   if ( $localPaths !== $storedPaths ) {
$vary = $context->getSkin() . '|' . 
$context->getLanguage();
$cache = ObjectCache::getLocalClusterInstance();
$key = $cache->makeKey( __METHOD__, 
$this->getName(), $vary );
@@ -476,8 +492,7 @@
return; // T124649; avoid write slams
}
 
-   // Use relative paths to avoid ghost entries 
when $IP changes (T111481)
-   $deps = FormatJson::encode( 
self::getRelativePaths( $localFileRefs ) );
+   $deps = FormatJson::encode( $localPaths );
$dbw = wfGetDB( DB_MASTER );
$dbw->upsert( 'module_deps',
[

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: phd service config needs to be a template

2017-02-22 Thread Paladox (Code Review)
Paladox has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/339311 )

Change subject: phd service config needs to be a template
..

phd service config needs to be a template

Can't use variables (erb) with plain file source => references

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


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/11/339311/1


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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: resourceloader: Optimize WikiModule preload for reqs without...

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

Change subject: resourceloader: Optimize WikiModule preload for reqs without 
wiki modules
..


resourceloader: Optimize WikiModule preload for reqs without wiki modules

Currently it was still going through fetchTitleInfo() with an empty array on
the majority of requests without wiki modules, e.g. load.php?modules=jquery.

Bug: T158813
Change-Id: Ie33a2b4da572bb30b2e7a69db07790724ec2f03f
---
M includes/resourceloader/ResourceLoaderWikiModule.php
1 file changed, 5 insertions(+), 0 deletions(-)

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



diff --git a/includes/resourceloader/ResourceLoaderWikiModule.php 
b/includes/resourceloader/ResourceLoaderWikiModule.php
index 14d6e05..e8574f4 100644
--- a/includes/resourceloader/ResourceLoaderWikiModule.php
+++ b/includes/resourceloader/ResourceLoaderWikiModule.php
@@ -357,6 +357,11 @@
}
}
 
+   if ( !$wikiModules ) {
+   // Nothing to preload
+   return;
+   }
+
$pageNames = array_keys( $allPages );
sort( $pageNames );
$hash = sha1( implode( '|', $pageNames ) );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie33a2b4da572bb30b2e7a69db07790724ec2f03f
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Krinkle 
Gerrit-Reviewer: Aaron Schulz 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: phabricator: fix missing space in sshd-phab unit file

2017-02-22 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/339312 )

Change subject: phabricator: fix missing space in sshd-phab unit file
..

phabricator: fix missing space in sshd-phab unit file

sshd-phab service would not start on jessie with systemd since this space
was missing between -f and the path to the config file.

Bug: T158434
Change-Id: I3fab14f41873c2f9c762cccb283e04e1a211419b
---
M modules/phabricator/files/sshd-phab.service
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/12/339312/1

diff --git a/modules/phabricator/files/sshd-phab.service 
b/modules/phabricator/files/sshd-phab.service
index 7ea2965..dd49e77 100644
--- a/modules/phabricator/files/sshd-phab.service
+++ b/modules/phabricator/files/sshd-phab.service
@@ -6,7 +6,7 @@
 [Service]
 EnvironmentFile=-/etc/default/ssh
 Environment="PHABRICATOR_ENV=phd"
-ExecStart=/usr/sbin/sshd -D -f<%= @sshd_config %>
+ExecStart=/usr/sbin/sshd -D -f <%= @sshd_config %>
 ExecReload=/bin/kill -HUP $MAINPID
 KillMode=process
 Restart=on-failure

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3fab14f41873c2f9c762cccb283e04e1a211419b
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] integration/config[master]: Experimental job translatewiki-rake-jessie

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

Change subject: Experimental job translatewiki-rake-jessie
..


Experimental job translatewiki-rake-jessie

Bug: T158544
Change-Id: Iba13a26afdd2ff1b6d55c3db086c995b45da7856
---
M jjb/translatewiki.yaml
M zuul/layout.yaml
2 files changed, 3 insertions(+), 0 deletions(-)

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



diff --git a/jjb/translatewiki.yaml b/jjb/translatewiki.yaml
index f013a98..9840603 100644
--- a/jjb/translatewiki.yaml
+++ b/jjb/translatewiki.yaml
@@ -34,4 +34,5 @@
  - translatewiki-composer-hhvm-jessie
  - translatewiki-puppet-validate
  - '{name}-puppetlint-strict'
+ - '{name}-rake-jessie'
  - translatewiki-shelllint
diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index eace354..cd90d14 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -2479,6 +2479,8 @@
   - translatewiki-puppetlint-strict
   - translatewiki-shelllint
   - composer-hhvm-jessie
+experimental:
+  - translatewiki-rake-jessie
 
   - name: wikimedia/discovery/relevanceForge
 template:

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: build: Enable indentation stylelint rule

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

Change subject: build: Enable indentation stylelint rule
..


build: Enable indentation stylelint rule

Enabling indentation stylelint rule and making it pass.
Also making use of mediawiki.mixins' `box-sizing()` mixin in
StashedFileWidget and change interwikiwidget rules order slightly
(example `:hover` modification after normal selector rule).

Change-Id: Ifa9ccae5518d5426b390e0f8321eb3decb211c18
---
M .stylelintrc
M 
resources/src/mediawiki.special/mediawiki.special.search.interwikiwidget.styles.less
M resources/src/mediawiki.ui/components/inputs.less
M resources/src/mediawiki.widgets/mw.widgets.StashedFileWidget.less
M resources/src/mediawiki/htmlform/styles.css
5 files changed, 115 insertions(+), 117 deletions(-)

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



diff --git a/.stylelintrc b/.stylelintrc
index 5c01b67..837e0c7 100644
--- a/.stylelintrc
+++ b/.stylelintrc
@@ -3,8 +3,6 @@
"rules": {
"declaration-no-important": null,
 
-   "indentation": null,
-
"no-descending-specificity": null,
"no-duplicate-selectors": null,
 
diff --git 
a/resources/src/mediawiki.special/mediawiki.special.search.interwikiwidget.styles.less
 
b/resources/src/mediawiki.special/mediawiki.special.search.interwikiwidget.styles.less
index 7147f04..b4629c7 100644
--- 
a/resources/src/mediawiki.special/mediawiki.special.search.interwikiwidget.styles.less
+++ 
b/resources/src/mediawiki.special/mediawiki.special.search.interwikiwidget.styles.less
@@ -8,28 +8,28 @@
 
 .iw-headline {
font-weight: bold;
-font-size: 1rem;
-font-size: 16px;
-opacity: 0.7;
+   font-size: 1rem;
+   font-size: 16px;
+   opacity: 0.7;
 }
 
 .iw-results {
-list-style: none;
+   list-style: none;
margin: 0;
 }
 
 .iw-resultset {
margin-bottom: 1.2em;
background-color: #f2f4f7;
-vertical-align: top;
-width: 100%;
-float: left;
-list-style-type: none;
+   vertical-align: top;
+   width: 100%;
+   float: left;
+   list-style-type: none;
 }
 
 /* clearfix */
 .iw-result:after {
-visibility: hidden;
+   visibility: hidden;
display: block;
font-size: 0;
content: " ";
@@ -38,10 +38,10 @@
 }
 
 * html .interwiki-result { /* IE6 */
-zoom: 1;
+   zoom: 1;
 }
 *:first-child + html .iw-resultset { /* IE7 */
-zoom: 1;
+   zoom: 1;
 }
 
 /* padding each .iw-resultset section seperately.
@@ -52,55 +52,55 @@
 .iw-result__title,
 .iw-result__content,
 .iw-result__footer {
-padding: 0.25em 0.85em;
+   padding: 0.25em 0.85em;
 }
 
 /* definition titles appear inline,
 to resemble a traditional dictionary definition */
 .iw-resultset--definition .iw-result__title {
-display: inline;
-padding: 0;
+   display: inline;
+   padding: 0;
 }
 
 .iw-resultset > div:first-child {
-padding-top: 0.85em;
+   padding-top: 0.85em;
 }
 
 .iw-resultset > div:last-child {
-padding-bottom: 0.85em;
+   padding-bottom: 0.85em;
 }
 
 .iw-result__title {
-font-size: 16px; /* rem fallback */
-font-size: 1rem;
+   font-size: 16px; /* rem fallback */
+   font-size: 1rem;
 }
 
 .iw-result__title a.extiw {
-color: #252525;
-font-weight: bold;
+   color: #252525;
+   font-weight: bold;
 }
 
 .iw-result__content:after { /* clearfix */
- visibility: hidden;
- display: block;
- font-size: 0;
- content: " ";
- clear: both;
- height: 0;
+   visibility: hidden;
+   display: block;
+   font-size: 0;
+   content: " ";
+   clear: both;
+   height: 0;
 }
 
 .iw-result__footer {
-float: right;
+   float: right;
 }
 
 .iw-result__icon {
-display: inline-block;
-width: 24px;
-height: 24px;
-vertical-align: middle;
-margin-right: 0.25em;
-background: url( images/special.search/definition-icon.svg ) no-repeat 0 0;
-background-size: 100% 100%;
+   display: inline-block;
+   width: 24px;
+   height: 24px;
+   vertical-align: middle;
+   margin-right: 0.25em;
+   background: url( images/special.search/definition-icon.svg ) no-repeat 
0 0;
+   background-size: 100% 100%;
 }
 
 @interwikiContentTypes: definition, travel, quotation, book, course, news, 
textbook, image;
@@ -108,78 +108,79 @@
 .generate-iwIcons();
 
 .generate-iwIcons( @i:1 ) when ( @i =< length( @interwikiContentTypes ) ) {
- @iwIcon: extract( @interwikiContentTypes, @i );
+   @iwIcon: extract( @interwikiContentTypes, @i );
 
-.iw-result__icon--@{iwIcon} {
-/*  stylelint-disable-next-line function-url-quotes */
-background-image: url( 'images/special.search/@{iwIcon}-icon.png' );
-/*  stylelint-disable-next-line 

[MediaWiki-commits] [Gerrit] css-sanitizer[master]: Initial checkin

2017-02-22 Thread Anomie (Code Review)
Anomie has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/339300 )

Change subject: Initial checkin
..

Initial checkin

Basic repository structure, no code yet.

Change-Id: Icfb855adf9f2088035fbc1f2c65e38299c63a451
---
A .editorconfig
A .gitattributes
A .gitignore
A .travis.yml
A Doxyfile
A LICENSE
A README.md
A composer.json
A errors.md
A phpcs.xml
A phpunit.xml.dist
11 files changed, 562 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/css-sanitizer 
refs/changes/00/339300/1

diff --git a/.editorconfig b/.editorconfig
new file mode 100644
index 000..c2dfc46
--- /dev/null
+++ b/.editorconfig
@@ -0,0 +1,6 @@
+# http://editorconfig.org
+root = true
+
+[*]
+indent_style = tab
+indent_size = tab
diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 000..b6fe658
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1,10 @@
+.editorconfig export-ignore
+.gitattributes export-ignore
+.gitignore export-ignore
+.gitreview export-ignore
+.travis.yml export-ignore
+Doxyfile export-ignore
+composer.json export-ignore
+phpcs.xml export-ignore
+phpunit.xml.dist export-ignore
+tests/ export-ignore
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000..09230da
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,11 @@
+# Editors
+*~
+.*.swp
+
+# Composer
+/vendor
+/composer.lock
+
+# Building and testing
+/coverage
+/doc
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 000..5d7b980
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,11 @@
+sudo: false
+language: php
+php:
+  - "5.5"
+  - "5.6"
+  - "7.0"
+  - "hhvm"
+install:
+  - composer install
+script:
+  - composer test
diff --git a/Doxyfile b/Doxyfile
new file mode 100644
index 000..bd370da
--- /dev/null
+++ b/Doxyfile
@@ -0,0 +1,27 @@
+# Doxyfile for css-sanitizer
+#
+# See 
+# for help on how to use this file to configure Doxygen.
+
+PROJECT_NAME   = "css-sanitizer"
+PROJECT_BRIEF  = "Classes to parse and sanitize CSS"
+OUTPUT_DIRECTORY   = doc
+JAVADOC_AUTOBRIEF  = YES
+QT_AUTOBRIEF   = YES
+WARN_NO_PARAMDOC   = YES
+INPUT  = README.md errors.md src/
+FILE_PATTERNS  = *.php
+RECURSIVE  = YES
+USE_MDFILE_AS_MAINPAGE = README.md
+HTML_DYNAMIC_SECTIONS  = YES
+GENERATE_TREEVIEW  = YES
+TREEVIEW_WIDTH = 250
+GENERATE_LATEX = NO
+HAVE_DOT   = YES
+DOT_FONTNAME   = Helvetica
+DOT_FONTSIZE   = 10
+TEMPLATE_RELATIONS = YES
+CALL_GRAPH = NO
+CALLER_GRAPH   = NO
+DOT_MULTI_TARGETS  = YES
+ALIASES += license="\par License:\n"
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 000..d645695
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,202 @@
+
+ Apache License
+   Version 2.0, January 2004
+http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+  "License" shall mean the terms and conditions for use, reproduction,
+  and distribution as defined by Sections 1 through 9 of this document.
+
+  "Licensor" shall mean the copyright owner or entity authorized by
+  the copyright owner that is granting the License.
+
+  "Legal Entity" shall mean the union of the acting entity and all
+  other entities that control, are controlled by, or are under common
+  control with that entity. For the purposes of this definition,
+  "control" means (i) the power, direct or indirect, to cause the
+  direction or management of such entity, whether by contract or
+  otherwise, or (ii) ownership of fifty percent (50%) or more of the
+  outstanding shares, or (iii) beneficial ownership of such entity.
+
+  "You" (or "Your") shall mean an individual or Legal Entity
+  exercising permissions granted by this License.
+
+  "Source" form shall mean the preferred form for making modifications,
+  including but not limited to software source code, documentation
+  source, and configuration files.
+
+  "Object" form shall mean any form resulting from mechanical
+  transformation or translation of a Source form, including but
+  not limited to compiled object code, generated documentation,
+  and conversions to other media types.
+
+  "Work" shall mean the work of authorship, whether in Source or
+  Object form, made available under the License, as indicated by a
+  copyright notice that is included in or attached to the work
+  (an example is provided in the Appendix below).
+
+  "Derivative Works" shall mean any work, whether in Source or Object
+  form, that is based on (or derived from) the Work and for which the
+  editorial revisions, annotations, elaborations, or other modifications
+  

[MediaWiki-commits] [Gerrit] integration/config[master]: Experimental job translatewiki-rake-jessie

2017-02-22 Thread Hashar (Code Review)
Hashar has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/339299 )

Change subject: Experimental job translatewiki-rake-jessie
..

Experimental job translatewiki-rake-jessie

Bug: T158544
Change-Id: Iba13a26afdd2ff1b6d55c3db086c995b45da7856
---
M jjb/translatewiki.yaml
M zuul/layout.yaml
2 files changed, 3 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/99/339299/1

diff --git a/jjb/translatewiki.yaml b/jjb/translatewiki.yaml
index f013a98..9840603 100644
--- a/jjb/translatewiki.yaml
+++ b/jjb/translatewiki.yaml
@@ -34,4 +34,5 @@
  - translatewiki-composer-hhvm-jessie
  - translatewiki-puppet-validate
  - '{name}-puppetlint-strict'
+ - '{name}-rake-jessie'
  - translatewiki-shelllint
diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index eace354..cd90d14 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -2479,6 +2479,8 @@
   - translatewiki-puppetlint-strict
   - translatewiki-shelllint
   - composer-hhvm-jessie
+experimental:
+  - translatewiki-rake-jessie
 
   - name: wikimedia/discovery/relevanceForge
 template:

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

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

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


[MediaWiki-commits] [Gerrit] translatewiki[master]: Lint puppet material using rake

2017-02-22 Thread Hashar (Code Review)
Hashar has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/339294 )

Change subject: Lint puppet material using rake
..

Lint puppet material using rake

The CI tests run for the repository are hardcoded in Wikimedia Jenkins
job, that makes it hard to reproduce locally and difficult to adjust.
This change propose to define the commands being run directly in the
repository and use ruby rake to run them.

Currently the CI runs:

translatewiki-puppet-validate: runs 'puppet parser validate' against
each of the .pp files found in the repo.

translatewiki-puppetlint-strict: runs puppet-lint with custom log format
and making sure it fails on warnings.

The first can be replaced by the ruby gem 'puppet-syntax' which does the
puppet parser validate but also check erb templates and hiera yaml
files.
puppetlabs_spec_helper provides the rake tasks for us.

puppet-lint ship with a rake task as well.

List the dependencies we need in Gemfile. Allow to easily change puppet
version with the env variable 'PUPPET_GEM_VERSION' would let us have a
job for puppet 3.7.x and another for puppet 4.8.x.

safe_yaml is added as an explicit dependency, else puppet 3.7 fails to
load when running with ruby 2.2+

The installation is made using bundler, a package manager for ruby.
Instructions are in the Rakefile but in short:

 apt-get install bundler
 bundle install
 bundle exec rake test

Running 'bundle exec rake' shows up all available tasks.

Bug: T158544
Change-Id: I6789dcf2e8cf90d1e535125989ecdb1ea9756907
---
M .gitignore
M .puppet-lint.rc
A Gemfile
A Rakefile
4 files changed, 44 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/translatewiki 
refs/changes/94/339294/1

diff --git a/.gitignore b/.gitignore
index 661c26e..a89df57 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,3 +7,4 @@
 node_modules/
 vendor/
 composer.lock
+Gemfile.lock
diff --git a/.puppet-lint.rc b/.puppet-lint.rc
index 3cd3cd8..b1e86e6 100644
--- a/.puppet-lint.rc
+++ b/.puppet-lint.rc
@@ -1,2 +1,5 @@
+--fail-on-warnings
+--log-format='%{path}:%{line} %{KIND} %{message} (%{check})'
+
 # Long lines are fine...
 --no-80chars-check
diff --git a/Gemfile b/Gemfile
new file mode 100644
index 000..88617d9
--- /dev/null
+++ b/Gemfile
@@ -0,0 +1,12 @@
+source 'https://rubygems.org'
+
+gem 'puppet', ENV['PUPPET_GEM_VERSION'] || '~> 3.7.0'
+gem 'puppet-lint', '1.1.0'
+gem 'puppetlabs_spec_helper', '< 2.0.0'
+
+# Puppet 3.7 fails on ruby 2.2+
+# https://tickets.puppetlabs.com/browse/PUP-3796
+gem 'safe_yaml', '~> 1.0.4'
+
+gem 'rake', '~> 10.4', '>= 10.4.2'
+gem 'xmlrpc' if RUBY_VERSION >= '2.4.0'
diff --git a/Rakefile b/Rakefile
new file mode 100644
index 000..9cd5ff5
--- /dev/null
+++ b/Rakefile
@@ -0,0 +1,28 @@
+# This Rakefile is meant to run linters and tests.
+#
+# You will need 'bundler' to install dependencies:
+#
+#  $ apt-get install bundler
+#  $ bundle install
+#
+# Then run rake in using bundler environment:
+#
+#  $ bundle exec rake test
+#
+# To see all available tasks:
+#
+#  $ bundle exec rake
+#
+
+require 'puppet-lint/tasks/puppet-lint'
+require 'puppet-syntax/tasks/puppet-syntax'
+
+task :default => [:help]
+
+desc 'Show the help'
+task :help do
+  system 'rake -T'
+end
+
+desc 'Run all build/tests commands (CI entry point)'
+task test: [:syntax, :lint]

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6789dcf2e8cf90d1e535125989ecdb1ea9756907
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Hashar 

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


[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: Cache generated content request when inserting templates

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

Change subject: Cache generated content request when inserting templates
..


Cache generated content request when inserting templates

We request the generated content of a template to determine
if it will be block or inline. This is the same request as
the view makes later to show the rendering, so we should cache
this repsonse.

Bug: T156698
Change-Id: I0ffd36ccd0aa821aa44d99328f2e3a2abc23dc0f
---
M modules/ve-mw/dm/models/ve.dm.MWTransclusionModel.js
1 file changed, 16 insertions(+), 5 deletions(-)

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



diff --git a/modules/ve-mw/dm/models/ve.dm.MWTransclusionModel.js 
b/modules/ve-mw/dm/models/ve.dm.MWTransclusionModel.js
index a2b4f52..b5f0288 100644
--- a/modules/ve-mw/dm/models/ve.dm.MWTransclusionModel.js
+++ b/modules/ve-mw/dm/models/ve.dm.MWTransclusionModel.js
@@ -62,10 +62,11 @@
ve.dm.MWTransclusionModel.prototype.insertTransclusionNode = function ( 
surfaceFragment, forceType ) {
var model = this,
deferred = $.Deferred(),
-   nodeClass = ve.dm.MWTransclusionNode;
+   baseNodeClass = ve.dm.MWTransclusionNode;
 
-   function insertNode( isInline ) {
-   var type = isInline ? nodeClass.static.inlineType : 
nodeClass.static.blockType,
+   function insertNode( isInline, generatedContents ) {
+   var hash, store, nodeClass,
+   type = isInline ? 
baseNodeClass.static.inlineType : baseNodeClass.static.blockType,
range = 
surfaceFragment.getSelection().getCoveringRange(),
data = [
{
@@ -76,6 +77,15 @@
},
{ type: '/' + type }
];
+
+   // If we just fetched the generated contents, put them 
in the store
+   // so we don't do a duplicate API call later.
+   if ( generatedContents ) {
+   nodeClass = ve.dm.modelRegistry.lookup( type );
+   store = 
surfaceFragment.getDocument().getStore();
+   hash = OO.getHash( [ 
nodeClass.static.getHashObjectForRendering( data[ 0 ] ), undefined ] );
+   store.index( generatedContents, hash );
+   }
 
if ( range.isCollapsed() ) {
surfaceFragment.insertContent( data );
@@ -97,7 +107,7 @@
action: 'visualeditor',
paction: 'parsefragment',
page: mw.config.get( 'wgRelevantPageName' ),
-   wikitext: nodeClass.static.getWikitext( 
this.getPlainObject() ),
+   wikitext: baseNodeClass.static.getWikitext( 
this.getPlainObject() ),
pst: 1
} )
.then( function ( response ) {
@@ -107,7 +117,8 @@
contentNodes = $.parseHTML( 
response.visualeditor.content, surfaceFragment.getDocument().getHtmlDocument() 
) || [];
contentNodes = 
ve.ce.MWTransclusionNode.static.filterRendering( contentNodes );
insertNode(
-   
nodeClass.static.isHybridInline( contentNodes, ve.dm.converter )
+   
baseNodeClass.static.isHybridInline( contentNodes, ve.dm.converter ),
+   contentNodes
);
} else {
// Request failed - just assume inline

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0ffd36ccd0aa821aa44d99328f2e3a2abc23dc0f
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Esanders 
Gerrit-Reviewer: Bartosz Dziewoński 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] maps...deploy[master]: Update kartotherian to 650a7b5

2017-02-22 Thread MaxSem (Code Review)
MaxSem has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/339093 )

Change subject: Update kartotherian to 650a7b5
..


Update kartotherian to 650a7b5

List of changes:
xxx Update node module dependencies

Change-Id: If8c192ea4b9e1c485cd3ee08512d7d82fb0565e6
---
M node_modules/fstream/node_modules/rimraf/bin.js
M node_modules/fstream/node_modules/rimraf/package.json
M node_modules/fstream/node_modules/rimraf/rimraf.js
M node_modules/heapdump/build/Makefile
M 
node_modules/heapdump/build/Release/.deps/Release/obj.target/addon/src/heapdump.o.d
M node_modules/heapdump/build/addon.target.mk
M node_modules/heapdump/build/config.gypi
M node_modules/kartotherian-autogen/package.json
M node_modules/kartotherian-cassandra/package.json
M node_modules/kartotherian-core/node_modules/xmldoc/package.json
M node_modules/kartotherian-core/package.json
M node_modules/kartotherian-demultiplexer/package.json
D 
node_modules/kartotherian-geoshapes/node_modules/topojson/node_modules/shapefile/node_modules/iconv-lite/README.md~
M node_modules/kartotherian-geoshapes/package.json
M node_modules/kartotherian-layermixer/package.json
M node_modules/kartotherian-maki/package.json
M node_modules/kartotherian-overzoom/package.json
M node_modules/kartotherian-postgres/package.json
M node_modules/kartotherian-server/package.json
M 
node_modules/kartotherian-snapshot/node_modules/geojson-mapnikify/node_modules/request/node_modules/aws-sign2/package.json
M 
node_modules/kartotherian-snapshot/node_modules/geojson-mapnikify/node_modules/request/node_modules/http-signature/node_modules/sshpk/package.json
M 
node_modules/kartotherian-snapshot/node_modules/geojson-mapnikify/node_modules/request/node_modules/stringstream/package.json
M 
node_modules/kartotherian-snapshot/node_modules/geojson-mapnikify/node_modules/request/node_modules/tunnel-agent/package.json
M node_modules/kartotherian-snapshot/node_modules/wikimedia-mapdata/package.json
M node_modules/kartotherian-snapshot/package.json
M node_modules/kartotherian-substantial/package.json
M node_modules/mime-types/node_modules/mime-db/db.json
M node_modules/mime-types/node_modules/mime-db/package.json
M node_modules/mime-types/package.json
M node_modules/ms/package.json
M node_modules/node-pre-gyp/lib/node-pre-gyp.js
M node_modules/node-pre-gyp/lib/util/abi_crosswalk.json
M node_modules/node-pre-gyp/node_modules/nopt/node_modules/abbrev/abbrev.js
M node_modules/node-pre-gyp/node_modules/nopt/node_modules/abbrev/package.json
M node_modules/node-pre-gyp/node_modules/nopt/package.json
D node_modules/node-pre-gyp/node_modules/npmlog/CHANGELOG.md~
M 
node_modules/node-pre-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/delegates/package.json
M 
node_modules/node-pre-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/LICENSE
M 
node_modules/node-pre-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/node_modules/buffer-shims/package.json
M 
node_modules/node-pre-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/node_modules/core-util-is/package.json
M 
node_modules/node-pre-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/node_modules/inherits/package.json
M 
node_modules/node-pre-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/node_modules/isarray/package.json
M 
node_modules/node-pre-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/node_modules/process-nextick-args/package.json
M 
node_modules/node-pre-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/node_modules/string_decoder/package.json
M 
node_modules/node-pre-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/node_modules/util-deprecate/package.json
M 
node_modules/node-pre-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/package.json
M 
node_modules/node-pre-gyp/node_modules/npmlog/node_modules/are-we-there-yet/package.json
D 
node_modules/node-pre-gyp/node_modules/npmlog/node_modules/console-control-strings/README.md~
M 
node_modules/node-pre-gyp/node_modules/npmlog/node_modules/console-control-strings/package.json
M node_modules/node-pre-gyp/node_modules/npmlog/node_modules/gauge/index.js
D 
node_modules/node-pre-gyp/node_modules/npmlog/node_modules/gauge/node_modules/.bin/supports-color
M 
node_modules/node-pre-gyp/node_modules/npmlog/node_modules/gauge/node_modules/aproba/index.js
M 
node_modules/node-pre-gyp/node_modules/npmlog/node_modules/gauge/node_modules/aproba/package.json
M 
node_modules/node-pre-gyp/node_modules/npmlog/node_modules/gauge/node_modules/has-unicode/package.json
M 
node_modules/node-pre-gyp/node_modules/npmlog/node_modules/gauge/node_modules/object-assign/index.js
M 

[MediaWiki-commits] [Gerrit] wikimedia...SmashPig[master]: Throw a descendent of SmashPig exception on cURL fail

2017-02-22 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/339273 )

Change subject: Throw a descendent of SmashPig exception on cURL fail
..

Throw a descendent of SmashPig exception on cURL fail

Instead of a thing that apparently doesn't exist.

Change-Id: I4f25e473e9f899340a4dfcdba490ebb02cda5dfe
---
M Core/Http/CurlWrapper.php
1 file changed, 1 insertion(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/SmashPig 
refs/changes/73/339273/1

diff --git a/Core/Http/CurlWrapper.php b/Core/Http/CurlWrapper.php
index 8f4f862..c39cc59 100644
--- a/Core/Http/CurlWrapper.php
+++ b/Core/Http/CurlWrapper.php
@@ -2,7 +2,6 @@
 
 namespace SmashPig\Core\Http;
 
-use HttpRuntimeException;
 use SmashPig\Core\Configuration;
 use SmashPig\Core\Context;
 use SmashPig\Core\Logging\Logger;
@@ -85,7 +84,7 @@
 
if ( $response === false ) {
// no valid response after multiple tries
-   throw new HttpRuntimeException(
+   throw new HttpException(
"{$method} request to {$url} failed $loopCount 
times."
);
}

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...CirrusSearch[es5]: Replace deprecated phase_prefix Match with MatchPhrasePrefix

2017-02-22 Thread EBernhardson (Code Review)
EBernhardson has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/339259 )

Change subject: Replace deprecated phase_prefix Match with MatchPhrasePrefix
..

Replace deprecated phase_prefix Match with MatchPhrasePrefix

There is only a single browser test which excercises this functionality,
so I'm not 100% certain this works as expected in all cases. That
browser test does pass with this adjustment though. The use case
itself is pretty narrow, it looks to only trigger when a quoted string
ends in a *. A few manual tests all look to have reasonable results.

Change-Id: Ie7da4a7e0ceffeeffad2af65e59c79734339467a
---
M includes/Query/FullTextQueryStringQueryBuilder.php
M includes/Search/SearchContext.php
M tests/unit/fixtures/searchText/browsertest_229.default.expected
M 
tests/unit/fixtures/searchText/browsertest_229.fullyfeatured-interwiki.expected
M tests/unit/fixtures/searchText/browsertest_229.fullyfeatured.expected
5 files changed, 13 insertions(+), 19 deletions(-)


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

diff --git a/includes/Query/FullTextQueryStringQueryBuilder.php 
b/includes/Query/FullTextQueryStringQueryBuilder.php
index 8921541..a1f0f5e 100644
--- a/includes/Query/FullTextQueryStringQueryBuilder.php
+++ b/includes/Query/FullTextQueryStringQueryBuilder.php
@@ -78,9 +78,8 @@
 
if ( !$negate && !isset( $matches[ 'fuzzy' ] ) 
&& !isset( $matches[ 'slop' ] ) &&
 preg_match( 
'/^"([^"*]+)[*]"/', $main, $matches ) ) {
-   $phraseMatch = new 
\Elastica\Query\Match( );
+   $phraseMatch = new 
\Elastica\Query\MatchPhrasePrefix( );
$phraseMatch->setFieldQuery( 
"all.plain", $matches[1] );
-   $phraseMatch->setFieldType( 
"all.plain", "phrase_prefix" );
$searchContext->addNonTextQuery( 
$phraseMatch );
 
$phraseHighlightMatch = new 
\Elastica\Query\QueryString( );
diff --git a/includes/Search/SearchContext.php 
b/includes/Search/SearchContext.php
index 81419fa..3e01645 100644
--- a/includes/Search/SearchContext.php
+++ b/includes/Search/SearchContext.php
@@ -638,11 +638,11 @@
}
 
/**
-* @param \Elastica\Query\Match $match Queries that don't use Elastic's
+* @param \Elastica\Query\AbstractQuery $match Queries that don't use 
Elastic's
 * "query string" query, for more advanced searching (e.g.
 *  match_phrase_prefix for regular quoted strings).
 */
-   public function addNonTextQuery( \Elastica\Query\Match $match ) {
+   public function addNonTextQuery( \Elastica\Query\AbstractQuery $match ) 
{
$this->nonTextQueries[] = $match;
}
 
diff --git a/tests/unit/fixtures/searchText/browsertest_229.default.expected 
b/tests/unit/fixtures/searchText/browsertest_229.default.expected
index d3f2251..8c796db 100644
--- a/tests/unit/fixtures/searchText/browsertest_229.default.expected
+++ b/tests/unit/fixtures/searchText/browsertest_229.default.expected
@@ -148,10 +148,9 @@
 ],
 "must": [
 {
-"match": {
+"match_phrase_prefix": {
 "all.plain": {
-"query": "pick",
-"type": "phrase_prefix"
+"query": "pick"
 }
 }
 }
diff --git 
a/tests/unit/fixtures/searchText/browsertest_229.fullyfeatured-interwiki.expected
 
b/tests/unit/fixtures/searchText/browsertest_229.fullyfeatured-interwiki.expected
index 8f1d18c..fcf 100644
--- 
a/tests/unit/fixtures/searchText/browsertest_229.fullyfeatured-interwiki.expected
+++ 
b/tests/unit/fixtures/searchText/browsertest_229.fullyfeatured-interwiki.expected
@@ -33,10 +33,9 @@
 ],
 "must": [
 {
-"match": {
+"match_phrase_prefix": {
 "all.plain": {
-"query": "pick",
-"type": "phrase_prefix"
+"query": "pick"
 }
 }
 }
@@ -137,10 +136,9 @@
 ],
 "must": [
 {
-"match": {
+"match_phrase_prefix": {
 "all.plain": {
-"query": "pick",
-

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Collation: Allow uppercase letters in UCA collations' names

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

Change subject: Collation: Allow uppercase letters in UCA collations' names
..


Collation: Allow uppercase letters in UCA collations' names

We have several such collations defined in IcuCollation:

* bs-Cyrl
* de-AT@collation=phonebook
* fr-CA
* sr-Latn

They couldn't actually be used.

Change-Id: I3a62073583c49d3e90910aa8240fe9fcc0682386
---
M includes/collation/Collation.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/includes/collation/Collation.php b/includes/collation/Collation.php
index 7659d6c..d67bc7e 100644
--- a/includes/collation/Collation.php
+++ b/includes/collation/Collation.php
@@ -67,7 +67,7 @@
return new CollationFa;
default:
$match = [];
-   if ( preg_match( '/^uca-([a-z@=-]+)$/', 
$collationName, $match ) ) {
+   if ( preg_match( '/^uca-([A-Za-z@=-]+)$/', 
$collationName, $match ) ) {
return new IcuCollation( $match[1] );
}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3a62073583c49d3e90910aa8240fe9fcc0682386
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński 
Gerrit-Reviewer: Brian Wolff 
Gerrit-Reviewer: Kaldari 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] labs...wikibugs2[master]: Add notifications for tools.zppixbot and quarrybot-enwiki

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

Change subject: Add notifications for tools.zppixbot and quarrybot-enwiki
..


Add notifications for tools.zppixbot and quarrybot-enwiki

Change-Id: I086f9b5a27902426c97f066c5f00583701032454
---
M channels.yaml
1 file changed, 3 insertions(+), 0 deletions(-)

Approvals:
  Zppix: Looks good to me, but someone else must approve
  Merlijn van Deen: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/channels.yaml b/channels.yaml
index a7a8976..b8c404a 100644
--- a/channels.yaml
+++ b/channels.yaml
@@ -264,6 +264,9 @@
 - ProofreadPage
 "#wikimedia-lta":
 - Tool-Labs-tools-LTA-Knowledgebase
+"##Zppix-Wikimedia":
+-Tool-Labs-tools-Zppixbot
+-QuarryBot-enwiki
 
 firehose-channel: '#mediawiki-feed'
 default-channel: '#wikimedia-dev'

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I086f9b5a27902426c97f066c5f00583701032454
Gerrit-PatchSet: 3
Gerrit-Project: labs/tools/wikibugs2
Gerrit-Branch: master
Gerrit-Owner: Zppix 
Gerrit-Reviewer: Addshore 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Merlijn van Deen 
Gerrit-Reviewer: Yuvipanda 
Gerrit-Reviewer: Zppix 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] wikimedia/portals[master]: Fixing all eslint errors

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

Change subject: Fixing all eslint errors
..


Fixing all eslint errors

Fixing all vars to be at the top of functions.

Bug: T152616
Change-Id: I54ef7ca00bae8fd8df9f3597eb4c548d47a550d3
---
M .eslintrc.json
M dev/wikipedia.org/assets/js/event-logging-lite.js
M dev/wikipedia.org/assets/js/lang-dropdown.js
M dev/wikipedia.org/assets/js/page-localized.js
M dev/wikipedia.org/assets/js/search-language-picker.js
M dev/wikipedia.org/assets/js/topten-localized.js
M dev/wikipedia.org/assets/js/wikipedia-org-event-logging.js
M dev/wikipedia.org/assets/js/wm-portal.js
M dev/wikipedia.org/assets/js/wm-test.js
M dev/wikipedia.org/assets/js/wm-typeahead.js
M dev/wikipedia.org/controller.js
M gulpfile.js
M hbs-helpers.global.js
13 files changed, 221 insertions(+), 158 deletions(-)

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



diff --git a/.eslintrc.json b/.eslintrc.json
index fc98626..404c59e 100644
--- a/.eslintrc.json
+++ b/.eslintrc.json
@@ -10,6 +10,7 @@
"mediaWiki": false
},
"rules": {
+   "no-sequences": "error",
"vars-on-top": 1,
"one-var": 1,
"dot-notation": [ "error", { "allowKeywords": true } ]
diff --git a/dev/wikipedia.org/assets/js/event-logging-lite.js 
b/dev/wikipedia.org/assets/js/event-logging-lite.js
index 06761fd..3a4c0a3 100644
--- a/dev/wikipedia.org/assets/js/event-logging-lite.js
+++ b/dev/wikipedia.org/assets/js/event-logging-lite.js
@@ -16,7 +16,7 @@
 
var baseUrl = '/beacon/event',
byteToHex = [],
-   self, helpers;
+   self, helpers, i;
 
helpers = {
// replaces $.extend
@@ -43,7 +43,7 @@
 
// byte to hex from
// 
https://github.com/wikimedia/mediawiki/blob/e87668e86ce9ad20df05c1baa8e7cf3f58900524/resources/src/mediawiki/mediawiki.user.js
-   for ( var i = 0; i < 256; i++ ) {
+   for ( i = 0; i < 256; i++ ) {
// Padding: Add a full byte (0x100, 256) and strip the extra 
character
byteToHex[ i ] = ( i + 256 ).toString( 16 ).slice( 1 );
}
diff --git a/dev/wikipedia.org/assets/js/lang-dropdown.js 
b/dev/wikipedia.org/assets/js/lang-dropdown.js
index dcc41e0..547d493 100644
--- a/dev/wikipedia.org/assets/js/lang-dropdown.js
+++ b/dev/wikipedia.org/assets/js/lang-dropdown.js
@@ -27,11 +27,12 @@
 
function userLangWikiMissing( langs ) {
var anchors = document.getElementsByTagName( 'a' ),
-   langMissing = true; // being pessimistic
+   langMissing = true, // being pessimistic
+   i, anchor, langAttr;
 
-   for ( var i = 0; i < anchors.length && langMissing; i++ ) {
-   var anchor = anchors[ i ],
-   langAttr = anchor.getAttribute( 'lang' );
+   for ( i = 0; i < anchors.length && langMissing; i++ ) {
+   anchor = anchors[ i ];
+   langAttr = anchor.getAttribute( 'lang' );
 
if ( langAttr && langs.indexOf( langAttr ) >= 0 ) {
langMissing = false; // lang exists
diff --git a/dev/wikipedia.org/assets/js/page-localized.js 
b/dev/wikipedia.org/assets/js/page-localized.js
index 0c02ede..b2034c8 100644
--- a/dev/wikipedia.org/assets/js/page-localized.js
+++ b/dev/wikipedia.org/assets/js/page-localized.js
@@ -16,6 +16,8 @@
var primaryLang = wmTest.userLangs[ 0 ],
storedTranslationHash,
storedTranslations,
+   l10nReq,
+   l10nInfo,
rtlLangs = [
'ar',
'arc',
@@ -100,11 +102,10 @@
 * @return {Object}
 */
function getPropFromPath( obj, path ) {
+   var index = 0, length;
 
path = path.split( '.' );
-
-   var index = 0,
-   length = path.length;
+   length = path.length;
 
while ( obj && index < length ) {
obj = obj[ path[ index++ ] ];
@@ -120,15 +121,16 @@
 */
function replacel10nText( l10nInfo ) {
var domEls = document.querySelectorAll( '.jsl10n' ),
-   validAnchor = new RegExp( /]*>([^<]+)<\/a>/ );
+   validAnchor = new RegExp( /]*>([^<]+)<\/a>/ ),
+   i, domEl, l10nAttr, textValue, termsHref, privacyHref;
 
-   for ( var i = 0; i < domEls.length; i++ ) {
+   for ( i = 0; i < domEls.length; i++ ) {
 
-   var domEl = domEls[ i ],
-   l10nAttr = domEl.getAttribute( 'data-jsl10n' ),
-   

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: resourceloader: Optimize WikiModule preload for reqs without...

2017-02-22 Thread Krinkle (Code Review)
Krinkle has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/339260 )

Change subject: resourceloader: Optimize WikiModule preload for reqs without 
wiki modules
..

resourceloader: Optimize WikiModule preload for reqs without wiki modules

Currently it was still going through fetchTitleInfo() with an empty array on
the majority of requests without wiki modules, e.g. load.php?modules=jquery.

Change-Id: Ie33a2b4da572bb30b2e7a69db07790724ec2f03f
---
M includes/resourceloader/ResourceLoaderWikiModule.php
1 file changed, 5 insertions(+), 0 deletions(-)


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

diff --git a/includes/resourceloader/ResourceLoaderWikiModule.php 
b/includes/resourceloader/ResourceLoaderWikiModule.php
index 14d6e05..e8574f4 100644
--- a/includes/resourceloader/ResourceLoaderWikiModule.php
+++ b/includes/resourceloader/ResourceLoaderWikiModule.php
@@ -357,6 +357,11 @@
}
}
 
+   if ( !$wikiModules ) {
+   // Nothing to preload
+   return;
+   }
+
$pageNames = array_keys( $allPages );
sort( $pageNames );
$hash = sha1( implode( '|', $pageNames ) );

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...CirrusSearch[es5]: setMinimumNumberShouldMatch was renamed to setMinimumShouldM...

2017-02-22 Thread EBernhardson (Code Review)
EBernhardson has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/339258 )

Change subject: setMinimumNumberShouldMatch was renamed to setMinimumShouldMatch
..

setMinimumNumberShouldMatch was renamed to setMinimumShouldMatch

Change-Id: Id06c64c66c1bb9c0e792c33cdc635c2e62cd8c0f
---
M includes/Query/FullTextQueryStringQueryBuilder.php
M includes/Query/FullTextSimpleMatchQueryBuilder.php
M tests/unit/fixtures/searchText/boost_templates_002.default.expected
M 
tests/unit/fixtures/searchText/boost_templates_002.fullyfeatured-interwiki.expected
M tests/unit/fixtures/searchText/boost_templates_002.fullyfeatured.expected
M tests/unit/fixtures/searchText/browsertest_001.default.expected
M 
tests/unit/fixtures/searchText/browsertest_001.fullyfeatured-interwiki.expected
M tests/unit/fixtures/searchText/browsertest_001.fullyfeatured.expected
M tests/unit/fixtures/searchText/browsertest_002.default.expected
M 
tests/unit/fixtures/searchText/browsertest_002.fullyfeatured-interwiki.expected
M tests/unit/fixtures/searchText/browsertest_002.fullyfeatured.expected
M tests/unit/fixtures/searchText/browsertest_005.default.expected
M 
tests/unit/fixtures/searchText/browsertest_005.fullyfeatured-interwiki.expected
M tests/unit/fixtures/searchText/browsertest_005.fullyfeatured.expected
M tests/unit/fixtures/searchText/browsertest_007.default.expected
M 
tests/unit/fixtures/searchText/browsertest_007.fullyfeatured-interwiki.expected
M tests/unit/fixtures/searchText/browsertest_007.fullyfeatured.expected
M tests/unit/fixtures/searchText/browsertest_010.default.expected
M 
tests/unit/fixtures/searchText/browsertest_010.fullyfeatured-interwiki.expected
M tests/unit/fixtures/searchText/browsertest_010.fullyfeatured.expected
M tests/unit/fixtures/searchText/browsertest_013.default.expected
M 
tests/unit/fixtures/searchText/browsertest_013.fullyfeatured-interwiki.expected
M tests/unit/fixtures/searchText/browsertest_013.fullyfeatured.expected
M tests/unit/fixtures/searchText/browsertest_014.default.expected
M 
tests/unit/fixtures/searchText/browsertest_014.fullyfeatured-interwiki.expected
M tests/unit/fixtures/searchText/browsertest_014.fullyfeatured.expected
M tests/unit/fixtures/searchText/browsertest_015.default.expected
M 
tests/unit/fixtures/searchText/browsertest_015.fullyfeatured-interwiki.expected
M tests/unit/fixtures/searchText/browsertest_015.fullyfeatured.expected
M tests/unit/fixtures/searchText/browsertest_016.default.expected
M 
tests/unit/fixtures/searchText/browsertest_016.fullyfeatured-interwiki.expected
M tests/unit/fixtures/searchText/browsertest_016.fullyfeatured.expected
M tests/unit/fixtures/searchText/browsertest_017.default.expected
M 
tests/unit/fixtures/searchText/browsertest_017.fullyfeatured-interwiki.expected
M tests/unit/fixtures/searchText/browsertest_017.fullyfeatured.expected
M tests/unit/fixtures/searchText/browsertest_018.default.expected
M 
tests/unit/fixtures/searchText/browsertest_018.fullyfeatured-interwiki.expected
M tests/unit/fixtures/searchText/browsertest_018.fullyfeatured.expected
M tests/unit/fixtures/searchText/browsertest_019.default.expected
M 
tests/unit/fixtures/searchText/browsertest_019.fullyfeatured-interwiki.expected
M tests/unit/fixtures/searchText/browsertest_019.fullyfeatured.expected
M tests/unit/fixtures/searchText/browsertest_020.default.expected
M 
tests/unit/fixtures/searchText/browsertest_020.fullyfeatured-interwiki.expected
M tests/unit/fixtures/searchText/browsertest_020.fullyfeatured.expected
M tests/unit/fixtures/searchText/browsertest_021.default.expected
M 
tests/unit/fixtures/searchText/browsertest_021.fullyfeatured-interwiki.expected
M tests/unit/fixtures/searchText/browsertest_021.fullyfeatured.expected
M tests/unit/fixtures/searchText/browsertest_023.default.expected
M 
tests/unit/fixtures/searchText/browsertest_023.fullyfeatured-interwiki.expected
M tests/unit/fixtures/searchText/browsertest_023.fullyfeatured.expected
M tests/unit/fixtures/searchText/browsertest_024.default.expected
M 
tests/unit/fixtures/searchText/browsertest_024.fullyfeatured-interwiki.expected
M tests/unit/fixtures/searchText/browsertest_024.fullyfeatured.expected
M tests/unit/fixtures/searchText/browsertest_026.default.expected
M 
tests/unit/fixtures/searchText/browsertest_026.fullyfeatured-interwiki.expected
M tests/unit/fixtures/searchText/browsertest_026.fullyfeatured.expected
M tests/unit/fixtures/searchText/browsertest_027.default.expected
M 
tests/unit/fixtures/searchText/browsertest_027.fullyfeatured-interwiki.expected
M tests/unit/fixtures/searchText/browsertest_027.fullyfeatured.expected
M tests/unit/fixtures/searchText/browsertest_028.default.expected
M 
tests/unit/fixtures/searchText/browsertest_028.fullyfeatured-interwiki.expected
M tests/unit/fixtures/searchText/browsertest_028.fullyfeatured.expected
M tests/unit/fixtures/searchText/browsertest_029.default.expected
M 

[MediaWiki-commits] [Gerrit] integration/config[master]: Clean out puppet-validate leftover

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

Change subject: Clean out puppet-validate leftover
..


Clean out puppet-validate leftover

Only keep translatewiki-puppet-validate

Remove triggers from mediawiki/vagrant, the repo has been migrated to
puppet-syntax via:
https://gerrit.wikimedia.org/r/#/c/337858/
https://gerrit.wikimedia.org/r/#/c/338415/

Also remove a Zuul filter for integration-config-puppet-validate which
no more exists.

JJB job template '{name}-puppet-validate' is no more needed.

Bug: T158544
Change-Id: I91129cf33ab4a3e8b417e0a284836ae6fe6b60dc
---
M jjb/job-templates.yaml
M jjb/mediawiki-misc.yaml
M tests/test_zuul_scheduler.py
M zuul/layout.yaml
4 files changed, 1 insertion(+), 23 deletions(-)

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



diff --git a/jjb/job-templates.yaml b/jjb/job-templates.yaml
index 8f5baf4..e515c99 100644
--- a/jjb/job-templates.yaml
+++ b/jjb/job-templates.yaml
@@ -321,17 +321,6 @@
 builders:
  - phplint
 
-- job-template:
-name: '{name}-puppet-validate'
-defaults: use-remote-zuul-no-submodules
-node: contintLabsSlave
-concurrent: true
-triggers:
- - zuul
-builders:
- - shell: |
-find . -type f -name '*.pp' -print0 | xargs -0 puppet parser validate
-
 # Verify whether there is any leading tabs in files matching 'fileselector'.
 #
 # 'fileselector': the parameter is passed to grep --include= option and is
diff --git a/jjb/mediawiki-misc.yaml b/jjb/mediawiki-misc.yaml
index e23fc84..154a838 100644
--- a/jjb/mediawiki-misc.yaml
+++ b/jjb/mediawiki-misc.yaml
@@ -31,7 +31,6 @@
 - project:
 name: 'mediawiki-vagrant'
 jobs:
- - '{name}-puppet-validate'
  - 'mediawiki-vagrant-puppet-doc-publish'
 
 - project:
diff --git a/tests/test_zuul_scheduler.py b/tests/test_zuul_scheduler.py
index c40a46e..8b28055 100644
--- a/tests/test_zuul_scheduler.py
+++ b/tests/test_zuul_scheduler.py
@@ -319,7 +319,7 @@
 '.*-(jshint|jsonlint)',
 '.*-(js|shell|php5[35]|)lint',
 '.*-(tabs|typos)',
-'.*-puppet-validate',
+'translatewiki-puppet-validate',
 '.*-puppetlint-strict',
 '.*-whitespaces',
 'noop',
diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index e5170c1..eace354 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -697,10 +697,6 @@
   - project: '^operations/software/cumin$'
 branch: ^master$
 
-  - name: 'integration-config-puppet-validate'
-files:
- - '^.*\.pp$'
-
   - name: ^composer-validate$
 files:
  - '^composer.json$'
@@ -2096,12 +2092,6 @@
   - name: mediawiki/vagrant
 template:
   - name: rake
-check:
-  - mediawiki-vagrant-puppet-validate
-test:
-  - mediawiki-vagrant-puppet-validate
-gate-and-submit:
-  - mediawiki-vagrant-puppet-validate
 postmerge:
   - mediawiki-vagrant-puppet-doc-publish
 

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

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

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


[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: [Facepalm?] Correctly pass CentralAuth cookies to Wikidata.

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

Change subject: [Facepalm?] Correctly pass CentralAuth cookies to Wikidata.
..


[Facepalm?] Correctly pass CentralAuth cookies to Wikidata.

When the user logs in through the app, we receive a CentralAuth cookie
which has a domainSpec of ".wikipedia.org".

Then, when making requests to edit Wikidata descriptions, we pass that
same cookie to the wikidata.org domain. However, our code that determines
whether to pass the cookie was checking if the domainSpec *equals*
wikipedia.org, rather than *ends with* wikipedia.org, so the cookie wasn't
getting passed, and the edit not going through successfully.

I'm... not sure how/why this worked before. Did something change on the
server side?

Change-Id: I91c73238467d3d54bbf06373fb0534baace9c438
---
M app/src/main/java/org/wikipedia/dataclient/SharedPreferenceCookieManager.java
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git 
a/app/src/main/java/org/wikipedia/dataclient/SharedPreferenceCookieManager.java 
b/app/src/main/java/org/wikipedia/dataclient/SharedPreferenceCookieManager.java
index 05deee0..36d57f1 100644
--- 
a/app/src/main/java/org/wikipedia/dataclient/SharedPreferenceCookieManager.java
+++ 
b/app/src/main/java/org/wikipedia/dataclient/SharedPreferenceCookieManager.java
@@ -58,7 +58,7 @@
 // For sites outside the wikipedia.org domain, like wikidata.org,
 // transfer the centralauth cookies from wikipedia.org, too, if 
the user is logged in
 if (User.isLoggedIn()
-&& domain.equals("www.wikidata.org") && 
domainSpec.equals("wikipedia.org")) {
+&& domain.equals("www.wikidata.org") && 
domainSpec.endsWith("wikipedia.org")) {
 cookiesList.addAll(makeCookieList(cookieJar.get(domainSpec), 
CENTRALAUTH_PREFIX));
 }
 

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

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

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


[MediaWiki-commits] [Gerrit] integration/config[master]: Clean out puppet-validate leftover

2017-02-22 Thread Hashar (Code Review)
Hashar has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/339257 )

Change subject: Clean out puppet-validate leftover
..

Clean out puppet-validate leftover

Only keep translatewiki-puppet-validate

Remove triggers from mediawiki/vagrant, the repo has been migrated to
puppet-syntax via:
https://gerrit.wikimedia.org/r/#/c/337858/
https://gerrit.wikimedia.org/r/#/c/338415/

Also remove a Zuul filter for integration-config-puppet-validate which
no more exists.

JJB job template '{name}-puppet-validate' is no more needed.

Bug: T158544
Change-Id: I91129cf33ab4a3e8b417e0a284836ae6fe6b60dc
---
M jjb/job-templates.yaml
M jjb/mediawiki-misc.yaml
M tests/test_zuul_scheduler.py
M zuul/layout.yaml
4 files changed, 1 insertion(+), 23 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/57/339257/1

diff --git a/jjb/job-templates.yaml b/jjb/job-templates.yaml
index 8f5baf4..e515c99 100644
--- a/jjb/job-templates.yaml
+++ b/jjb/job-templates.yaml
@@ -321,17 +321,6 @@
 builders:
  - phplint
 
-- job-template:
-name: '{name}-puppet-validate'
-defaults: use-remote-zuul-no-submodules
-node: contintLabsSlave
-concurrent: true
-triggers:
- - zuul
-builders:
- - shell: |
-find . -type f -name '*.pp' -print0 | xargs -0 puppet parser validate
-
 # Verify whether there is any leading tabs in files matching 'fileselector'.
 #
 # 'fileselector': the parameter is passed to grep --include= option and is
diff --git a/jjb/mediawiki-misc.yaml b/jjb/mediawiki-misc.yaml
index e23fc84..154a838 100644
--- a/jjb/mediawiki-misc.yaml
+++ b/jjb/mediawiki-misc.yaml
@@ -31,7 +31,6 @@
 - project:
 name: 'mediawiki-vagrant'
 jobs:
- - '{name}-puppet-validate'
  - 'mediawiki-vagrant-puppet-doc-publish'
 
 - project:
diff --git a/tests/test_zuul_scheduler.py b/tests/test_zuul_scheduler.py
index c40a46e..8b28055 100644
--- a/tests/test_zuul_scheduler.py
+++ b/tests/test_zuul_scheduler.py
@@ -319,7 +319,7 @@
 '.*-(jshint|jsonlint)',
 '.*-(js|shell|php5[35]|)lint',
 '.*-(tabs|typos)',
-'.*-puppet-validate',
+'translatewiki-puppet-validate',
 '.*-puppetlint-strict',
 '.*-whitespaces',
 'noop',
diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index e5170c1..eace354 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -697,10 +697,6 @@
   - project: '^operations/software/cumin$'
 branch: ^master$
 
-  - name: 'integration-config-puppet-validate'
-files:
- - '^.*\.pp$'
-
   - name: ^composer-validate$
 files:
  - '^composer.json$'
@@ -2096,12 +2092,6 @@
   - name: mediawiki/vagrant
 template:
   - name: rake
-check:
-  - mediawiki-vagrant-puppet-validate
-test:
-  - mediawiki-vagrant-puppet-validate
-gate-and-submit:
-  - mediawiki-vagrant-puppet-validate
 postmerge:
   - mediawiki-vagrant-puppet-doc-publish
 

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

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

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


[MediaWiki-commits] [Gerrit] integration/config[master]: Remove pplint-HEAD

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

Change subject: Remove pplint-HEAD
..


Remove pplint-HEAD

Replacement is to use rake and the puppet-syntax gem.

Bug: T154894
Change-Id: I489cf26a691b390f551f38a25c86c941e3d8cae5
---
M jjb/job-templates.yaml
M tests/test_zuul_scheduler.py
M zuul/layout.yaml
3 files changed, 0 insertions(+), 27 deletions(-)

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



diff --git a/jjb/job-templates.yaml b/jjb/job-templates.yaml
index 170512b..8f5baf4 100644
--- a/jjb/job-templates.yaml
+++ b/jjb/job-templates.yaml
@@ -269,28 +269,6 @@
  - puppet-lint
 
 - job:
-name: 'pplint-HEAD'
-node: contintLabsSlave && UbuntuTrusty
-concurrent: true
-scm:
- - git:
- url: '$ZUUL_URL/$ZUUL_PROJECT'
- branches:
-  - '$ZUUL_COMMIT'
- refspec: '$ZUUL_REF'
- wipe-workspace: true
- submodule:
- disable: true
-
-triggers:
- - zuul
-builders:
- - shell: |
-puppet --version
-/srv/deployment/integration/slave-scripts/bin/git-changed-in-head pp \
-| xargs -n1 -t puppet parser validate
-
-- job:
 name: 'php53lint'
 node: contintLabsSlave && phpflavor-php53
 defaults: use-remote-zuul-shallow-clone
diff --git a/tests/test_zuul_scheduler.py b/tests/test_zuul_scheduler.py
index e0d179c..c40a46e 100644
--- a/tests/test_zuul_scheduler.py
+++ b/tests/test_zuul_scheduler.py
@@ -318,7 +318,6 @@
 'jshint',
 '.*-(jshint|jsonlint)',
 '.*-(js|shell|php5[35]|)lint',
-'pplint-HEAD',
 '.*-(tabs|typos)',
 '.*-puppet-validate',
 '.*-puppetlint-strict',
diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index ff0a8d2..e5170c1 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -697,10 +697,6 @@
   - project: '^operations/software/cumin$'
 branch: ^master$
 
-  - name: pplint-HEAD
-files:
- - '^.*\.pp$'
-
   - name: 'integration-config-puppet-validate'
 files:
  - '^.*\.pp$'

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

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

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


  1   2   3   4   >