[MediaWiki-commits] [Gerrit] mediawiki...WikibaseQualityConstraints[master]: Check constraints on qualifiers+references by default

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

Change subject: Check constraints on qualifiers+references by default
..


Check constraints on qualifiers+references by default

Bug: T168532
Change-Id: I0ba0e6d073dc02423c2b083a919a73fefb4ef2f6
---
M extension.json
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/extension.json b/extension.json
index eb3ba73..1c4b6f1 100644
--- a/extension.json
+++ b/extension.json
@@ -125,12 +125,12 @@
"public": true
},
"WBQualityConstraintsCheckQualifiers": {
-   "value": false,
+   "value": true,
"description": "Whether to check constraints on 
qualifiers.",
"public": true
},
"WBQualityConstraintsCheckReferences": {
-   "value": false,
+   "value": true,
"description": "Whether to check constraints on 
references.",
"public": true
},

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0ba0e6d073dc02423c2b083a919a73fefb4ef2f6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikibaseQualityConstraints
Gerrit-Branch: master
Gerrit-Owner: Lucas Werkmeister (WMDE) 
Gerrit-Reviewer: WMDE-leszek 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...Echo[master]: Use centralIdsFromNames() method to get central ids.

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

Change subject: Use centralIdsFromNames() method to get central ids.
..


Use centralIdsFromNames() method to get central ids.

The centralIdsFromNames() includes optimizations and error checking
that was not in the original version.

Bug: T178313
Change-Id: I3d6334f2e81f3cee66b36690734f70958fdcefdb
---
M maintenance/updatePerUserBlacklist.php
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/maintenance/updatePerUserBlacklist.php 
b/maintenance/updatePerUserBlacklist.php
index 94e2aaa..1ed9ac7 100644
--- a/maintenance/updatePerUserBlacklist.php
+++ b/maintenance/updatePerUserBlacklist.php
@@ -66,12 +66,12 @@
}
 
$user = User::newFromId( $row->up_user );
-   $ids = $lookup->lookupUserNames( array_flip( 
$names ), $user );
+   $ids = $lookup->centralIdsFromNames( $names, 
$user );
 
$dbw->update(
'user_properties',
[
-   'up_value'  => implode( "\n", 
array_values( $ids ) ),
+   'up_value'  => implode( "\n", 
$ids ),
],
[
'up_user' => $row->up_user,

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...ContentTranslation[master]: Use OOjs UI widget for discard button

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

Change subject: Use OOjs UI widget for discard button
..


Use OOjs UI widget for discard button

Change-Id: Iab6ffbfcb55b035ca7e1e863ca9d869321bd57dc
---
M modules/source/ext.cx.source.selector.js
M modules/source/styles/ext.cx.source.selector.less
2 files changed, 11 insertions(+), 22 deletions(-)

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



diff --git a/modules/source/ext.cx.source.selector.js 
b/modules/source/ext.cx.source.selector.js
index f928135..c5358db 100644
--- a/modules/source/ext.cx.source.selector.js
+++ b/modules/source/ext.cx.source.selector.js
@@ -50,7 +50,7 @@
this.$languageFilter = null;
this.$sourceLanguage = null;
this.$targetLanguage = null;
-   this.$discardButton = null;
+   this.discardButton = null;
this.$sourceInputs = null;
this.$searchResults = null;
this.$searchResultsMessage = null;
@@ -470,7 +470,7 @@
$.debounce( 600, false, this.check.bind( this ) 
)
);
} else {
-   this.$discardButton.click( 
this.discardEmbeddedDialog.bind( this ) );
+   this.discardButton.connect( this, { click: 
this.discardEmbeddedDialog } );
this.sourcePageSelector.onLookupMenuItemChoose = 
this.setSelectedItem.bind( this );
 
// Unbind event handlers so search results don't 
disappear when focus is lost
@@ -1007,7 +1007,7 @@
this.$container.addClass( 
'cx-sourceselector-embedded--selected' );
this.isArticleSelected = true;
 
-   this.$selectedItem.append( this.$languageFilter, 
this.$discardButton );
+   this.$selectedItem.append( this.$languageFilter, 
this.discardButton.$element );
 
// Check will display a warning if target language (which is 
default,
// up to the first article selection) already has an article.
@@ -1029,7 +1029,7 @@
this.$container.removeClass( 
'cx-sourceselector-embedded--selected' );
this.isArticleSelected = false;
 
-   this.$sourceInputs.append( this.$languageFilter, 
this.$discardButton );
+   this.$sourceInputs.append( this.$languageFilter, 
this.discardButton.$element );
 
// Reset source titles, as there is no selected item
this.sourceTitles = {};
@@ -1365,15 +1365,18 @@
$container: this.$searchResults
} );
 
-   this.$discardButton = $( '' )
-   .addClass( 'cx-sourceselector-embedded-discard' );
+   this.discardButton = new OO.ui.ButtonWidget( {
+   framed: false,
+   icon: 'close',
+   classes: [ 'cx-sourceselector-embedded-discard' ]
+   } );
 
this.$sourceInputs = $( '' )
.addClass( 'cx-sourceselector-embedded__source-inputs' )
.append(
this.sourcePageSelector.$element,
this.$languageFilter,
-   this.$discardButton
+   this.discardButton.$element
);
this.$selectedItemImage = $( '' )
.addClass( 
'cx-sourceselector-embedded-selected-item__image' );
diff --git a/modules/source/styles/ext.cx.source.selector.less 
b/modules/source/styles/ext.cx.source.selector.less
index 91fc940..9e56eba 100644
--- a/modules/source/styles/ext.cx.source.selector.less
+++ b/modules/source/styles/ext.cx.source.selector.less
@@ -215,21 +215,7 @@
}
 
.cx-sourceselector-embedded-discard {
-   .background-image-svg('../../tools/images/clear.svg', 
'../../tools/images/clear.png');
-   background-position: center center;
-   background-repeat: no-repeat;
-   background-size: 16px;
-   opacity: 0.8;
-
-   float: right;
-   width: 24px;
-   height: 24px;
-   margin: 0 8px 0 16px;
-   cursor: pointer;
-
-   &:hover {
-   opacity: 1;
-   }
+   margin-left: 8px;
}
 
.cx-sourceselector__license,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iab6ffbfcb55b035ca7e1e863ca9d869321bd57dc
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/ContentTranslation
Gerrit-Branch: master
Gerrit-Owner: Petar.petkovic 
Gerrit-Reviewer: Catrope 
Gerrit-

[MediaWiki-commits] [Gerrit] mediawiki...ContentTranslation[master]: Fix message widget again after OOUI update

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

Change subject: Fix message widget again after OOUI update
..


Fix message widget again after OOUI update

Change-Id: I277b0f7f52a089d48eb5867b393d3aeef6b86fdd
---
M modules/ui/styles/widgets/mw.cx.ui.MessageWidget.less
M modules/ui/widgets/mw.cx.ui.MessageWidget.js
2 files changed, 4 insertions(+), 2 deletions(-)

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



diff --git a/modules/ui/styles/widgets/mw.cx.ui.MessageWidget.less 
b/modules/ui/styles/widgets/mw.cx.ui.MessageWidget.less
index cd563ae..db6c189 100644
--- a/modules/ui/styles/widgets/mw.cx.ui.MessageWidget.less
+++ b/modules/ui/styles/widgets/mw.cx.ui.MessageWidget.less
@@ -7,10 +7,12 @@
margin-bottom: 10px;
position: relative;
 
-   .oo-ui-iconElement-icon {
+   &.oo-ui-iconElement > .oo-ui-iconElement-icon {
+   position: static;
display: inline-block;
float: left;
vertical-align: middle;
+   padding: 0.2em 0;
}
 
&.cx-message-error {
diff --git a/modules/ui/widgets/mw.cx.ui.MessageWidget.js 
b/modules/ui/widgets/mw.cx.ui.MessageWidget.js
index c9f4dea..5d25615 100644
--- a/modules/ui/widgets/mw.cx.ui.MessageWidget.js
+++ b/modules/ui/widgets/mw.cx.ui.MessageWidget.js
@@ -81,5 +81,5 @@
}
}
 
-   return $( '' ).append( $message, $details );
+   return $message.add( $details );
 };

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I277b0f7f52a089d48eb5867b393d3aeef6b86fdd
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ContentTranslation
Gerrit-Branch: master
Gerrit-Owner: Esanders 
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/mediawiki-config[master]: Revert "db-codfw.php: Depool db2035"

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

Change subject: Revert "db-codfw.php: Depool db2035"
..


Revert "db-codfw.php: Depool db2035"

This reverts commit fbb9e1fd69d6b0416fe11a8e543362821c791d8c.

Change-Id: I6b098655590e7c031d815c5a3692488856b75c39
---
M wmf-config/db-codfw.php
1 file changed, 7 insertions(+), 7 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 3fef086..089dd33 100644
--- a/wmf-config/db-codfw.php
+++ b/wmf-config/db-codfw.php
@@ -114,9 +114,9 @@
],
's2' => [
'db2017' => 0,   # B6 2.9TB  96GB, master
-   # 'db2035' => 50,  # C6 2.9TB 160GB, rc, log #T178359
+   'db2035' => 50,  # C6 2.9TB 160GB, rc, log
'db2041' => 100, # C6 2.9TB 160GB, api
-   'db2049' => 400, # C6 2.9TB 160GB, #temporary rc #T178359
+   'db2049' => 400, # C6 2.9TB 160GB,
'db2056' => 50,  # D6 3.3TB 160GB, dump (inactive), vslow 
#innodb compressed
'db2063' => 100, # D6 3.3TB 160GB, api
'db2064' => 400, # D6 3.3TB 160GB
@@ -281,19 +281,19 @@
],
's2' => [
'watchlist' => [
-   'db2049' => 1,
+   'db2035' => 1,
],
'recentchanges' => [
-   'db2049' => 1,
+   'db2035' => 1,
],
'recentchangeslinked' => [
-   'db2049' => 1,
+   'db2035' => 1,
],
'contributions' => [
-   'db2049' => 1,
+   'db2035' => 1,
],
'logpager' => [
-   'db2049' => 1,
+   'db2035' => 1,
],
'dump' => [
'db2056' => 1,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6b098655590e7c031d815c5a3692488856b75c39
Gerrit-PatchSet: 3
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Marostegui 
Gerrit-Reviewer: Jcrespo 
Gerrit-Reviewer: Marostegui 
Gerrit-Reviewer: Urbanecm 
Gerrit-Reviewer: Zoranzoki21 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Revert "db-eqiad.php: Depool db1065"

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

Change subject: Revert "db-eqiad.php: Depool db1065"
..


Revert "db-eqiad.php: Depool db1065"

This reverts commit 02c04c07bd1723808a1667e35ddd062add579d01.

Change-Id: If0fa726daaaf3b390394c2f2ba6ed0a7027e5f84
---
M wmf-config/db-eqiad.php
1 file changed, 4 insertions(+), 4 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 f3f19b3..c7052bc 100644
--- a/wmf-config/db-eqiad.php
+++ b/wmf-config/db-eqiad.php
@@ -102,10 +102,10 @@
 'sectionLoads' => [
's1' => [
'db1052' => 0,   # B3 2.8TB  96GB, master
-   'db1067' => 0,   # D1 2.8TB 160GB, old master #temporary vslow 
T174509
+   'db1067' => 0,   # D1 2.8TB 160GB, old master
'db1051' => 1,  # B3 2.8TB  96GB, watchlist, recentchanges, 
contributions, logpager
'db1055' => 1,   # C2 2.8TB  96GB, watchlist, recentchanges, 
contributions, logpager
-   # 'db1065' => 0,   # D1 2.8TB 160GB, vslow, dump, master for 
sanitarium #T174509
+   'db1065' => 0,   # D1 2.8TB 160GB, vslow, dump, master for 
sanitarium
'db1066' => 50,  # D1 2.8TB 160GB, api
'db1073' => 50,  # B3 2.8TB 160GB, api
'db1080' => 300, # A2 3.6TB 512GB, api #T172679#3650005
@@ -266,10 +266,10 @@
'db1055' => 1,
],
'dump' => [
-   'db1067' => 1,
+   'db1065' => 1,
],
'vslow' => [
-   'db1067' => 1,
+   'db1065' => 1,
],
'api' => [
'db1080' => 1,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If0fa726daaaf3b390394c2f2ba6ed0a7027e5f84
Gerrit-PatchSet: 2
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Marostegui 
Gerrit-Reviewer: Jcrespo 
Gerrit-Reviewer: Marostegui 
Gerrit-Reviewer: Urbanecm 
Gerrit-Reviewer: Zoranzoki21 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Revert "db-codfw.php: Depool db2035"

2017-10-24 Thread Marostegui (Code Review)
Hello Urbanecm, jenkins-bot, Jcrespo, Zoranzoki21,

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

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

to review the following change.


Change subject: Revert "db-codfw.php: Depool db2035"
..

Revert "db-codfw.php: Depool db2035"

This reverts commit fbb9e1fd69d6b0416fe11a8e543362821c791d8c.

Change-Id: I6b098655590e7c031d815c5a3692488856b75c39
---
M wmf-config/db-codfw.php
1 file changed, 7 insertions(+), 7 deletions(-)


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

diff --git a/wmf-config/db-codfw.php b/wmf-config/db-codfw.php
index 3fef086..089dd33 100644
--- a/wmf-config/db-codfw.php
+++ b/wmf-config/db-codfw.php
@@ -114,9 +114,9 @@
],
's2' => [
'db2017' => 0,   # B6 2.9TB  96GB, master
-   # 'db2035' => 50,  # C6 2.9TB 160GB, rc, log #T178359
+   'db2035' => 50,  # C6 2.9TB 160GB, rc, log
'db2041' => 100, # C6 2.9TB 160GB, api
-   'db2049' => 400, # C6 2.9TB 160GB, #temporary rc #T178359
+   'db2049' => 400, # C6 2.9TB 160GB,
'db2056' => 50,  # D6 3.3TB 160GB, dump (inactive), vslow 
#innodb compressed
'db2063' => 100, # D6 3.3TB 160GB, api
'db2064' => 400, # D6 3.3TB 160GB
@@ -281,19 +281,19 @@
],
's2' => [
'watchlist' => [
-   'db2049' => 1,
+   'db2035' => 1,
],
'recentchanges' => [
-   'db2049' => 1,
+   'db2035' => 1,
],
'recentchangeslinked' => [
-   'db2049' => 1,
+   'db2035' => 1,
],
'contributions' => [
-   'db2049' => 1,
+   'db2035' => 1,
],
'logpager' => [
-   'db2049' => 1,
+   'db2035' => 1,
],
'dump' => [
'db2056' => 1,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6b098655590e7c031d815c5a3692488856b75c39
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Marostegui 
Gerrit-Reviewer: Jcrespo 
Gerrit-Reviewer: Urbanecm 
Gerrit-Reviewer: Zoranzoki21 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Revert "db-eqiad.php: Depool db1065"

2017-10-24 Thread Marostegui (Code Review)
Hello Urbanecm, jenkins-bot, Jcrespo, Zoranzoki21,

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

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

to review the following change.


Change subject: Revert "db-eqiad.php: Depool db1065"
..

Revert "db-eqiad.php: Depool db1065"

This reverts commit 02c04c07bd1723808a1667e35ddd062add579d01.

Change-Id: If0fa726daaaf3b390394c2f2ba6ed0a7027e5f84
---
M wmf-config/db-eqiad.php
1 file changed, 4 insertions(+), 4 deletions(-)


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

diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php
index be05471..f58388f 100644
--- a/wmf-config/db-eqiad.php
+++ b/wmf-config/db-eqiad.php
@@ -102,10 +102,10 @@
 'sectionLoads' => [
's1' => [
'db1052' => 0,   # B3 2.8TB  96GB, master
-   'db1067' => 0,   # D1 2.8TB 160GB, old master #temporary vslow 
T174509
+   'db1067' => 0,   # D1 2.8TB 160GB, old master
'db1051' => 1,  # B3 2.8TB  96GB, watchlist, recentchanges, 
contributions, logpager
'db1055' => 1,   # C2 2.8TB  96GB, watchlist, recentchanges, 
contributions, logpager
-   # 'db1065' => 0,   # D1 2.8TB 160GB, vslow, dump, master for 
sanitarium #T174509
+   'db1065' => 0,   # D1 2.8TB 160GB, vslow, dump, master for 
sanitarium
'db1066' => 50,  # D1 2.8TB 160GB, api
'db1073' => 50,  # B3 2.8TB 160GB, api
'db1080' => 300, # A2 3.6TB 512GB, api #T172679#3650005
@@ -266,10 +266,10 @@
'db1055' => 1,
],
'dump' => [
-   'db1067' => 1,
+   'db1065' => 1,
],
'vslow' => [
-   'db1067' => 1,
+   'db1065' => 1,
],
'api' => [
'db1080' => 1,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If0fa726daaaf3b390394c2f2ba6ed0a7027e5f84
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Marostegui 
Gerrit-Reviewer: Jcrespo 
Gerrit-Reviewer: Urbanecm 
Gerrit-Reviewer: Zoranzoki21 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: db-eqiad.php: Depool db1077

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

Change subject: db-eqiad.php: Depool db1077
..


db-eqiad.php: Depool db1077

Going to checksum db1077's data

Bug: T164488
Change-Id: I06d48674d11e4dd8ec1a0ba37ef9e9a73e845c0d
---
M wmf-config/db-eqiad.php
1 file changed, 7 insertions(+), 7 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 be05471..f3f19b3 100644
--- a/wmf-config/db-eqiad.php
+++ b/wmf-config/db-eqiad.php
@@ -126,8 +126,8 @@
# 'db1038' => 0,   # B2 1.4TB  64GB, vslow, dump, old master # 
T172679
'db1044' => 0,   # B2 1.4TB  64GB, #Temporary master for db1095 
- new sanitarium #T150802
'db1072' => 0,  # B2 2.8TB 160GB, vslow, dump, old master
-   'db1077' => 400, # B1 3.6TB 512GB #temporary special slave - 
T172679
-   'db1078' => 500, # C3 3.6TB 512GB
+   # 'db1077' => 400, # B1 3.6TB 512GB #temporary special slave - 
T172679 #T164488
+   'db1078' => 500, # C3 3.6TB 512GB #temporary special slave 
#T164488
# 'db1103' => 0,  # A3 3.6TB 512GB, # not needed on s3 - has 
db1035's data that we have to checksum
],
's4' => [
@@ -312,19 +312,19 @@
'db1072' => 1,
],
'watchlist' => [
-   'db1077' => 1,
+   'db1078' => 1,
],
'recentchanges' => [
-   'db1077' => 1,
+   'db1078' => 1,
],
'recentchangeslinked' => [
-   'db1077' => 1,
+   'db1078' => 1,
],
'contributions' => [
-   'db1077' => 1,
+   'db1078' => 1,
],
'logpager' => [
-   'db1077' => 1,
+   'db1078' => 1,
],
],
's4' => [

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[REL1_30]: Add primary keys to site_stats

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

Change subject: Add primary keys to site_stats
..


Add primary keys to site_stats

As discussed in I7d42aae434852a56b6f8dd559d8a5f3bce416021 primary keys
are needed to perform various schema changes on  the site_stats table.
This patch aims to introduce primary keys for all supported dbms.

The respective *.sql patch files were tested locally against Postgres
and SQL Server 2016. Please note that neither the patch file for Oracle
DB nor the mediawiki upgrade through update.php was tested.

Bug: T56888
Change-Id: Id10e221f0dc120bc09afc22596fd1dbecbf6a61d
(cherry picked from commit 49f7be39e1cd3ca89db47a3fe320db5c4b23fa6b)
---
M includes/installer/MssqlUpdater.php
M includes/installer/OracleUpdater.php
M includes/installer/PostgresUpdater.php
A maintenance/mssql/archives/patch-site_stats-pk.sql
M maintenance/mssql/tables.sql
A maintenance/oracle/archives/patch-site_stats-pk.sql
M maintenance/oracle/tables.sql
A maintenance/postgres/archives/patch-site_stats-pk.sql
M maintenance/postgres/tables.sql
9 files changed, 15 insertions(+), 7 deletions(-)

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



diff --git a/includes/installer/MssqlUpdater.php 
b/includes/installer/MssqlUpdater.php
index a2aa8c0..411d2c8 100644
--- a/includes/installer/MssqlUpdater.php
+++ b/includes/installer/MssqlUpdater.php
@@ -104,6 +104,7 @@
 
// 1.30
[ 'modifyField', 'image', 'img_media_type', 
'patch-add-3d.sql' ],
+   [ 'addIndex', 'site_stats', 'PRIMARY', 
'patch-site_stats-pk.sql' ],
];
}
 
diff --git a/includes/installer/OracleUpdater.php 
b/includes/installer/OracleUpdater.php
index 00b9661..040b54a 100644
--- a/includes/installer/OracleUpdater.php
+++ b/includes/installer/OracleUpdater.php
@@ -125,6 +125,7 @@
 
// 1.30
[ 'doAutoIncrementTriggers' ],
+   [ 'addIndex', 'site_stats', 'PRIMARY', 
'patch-site_stats-pk.sql' ],
 
// KEEP THIS AT THE BOTTOM!!
[ 'doRebuildDuplicateFunction' ],
diff --git a/includes/installer/PostgresUpdater.php 
b/includes/installer/PostgresUpdater.php
index 07aeb13..92331ea 100644
--- a/includes/installer/PostgresUpdater.php
+++ b/includes/installer/PostgresUpdater.php
@@ -481,6 +481,7 @@
[ 'changeNullableField', 'protected_titles', 
'pt_reason', 'NOT NULL', true ],
[ 'addPgField', 'protected_titles', 'pt_reason_id', 
'INTEGER NOT NULL DEFAULT 0' ],
[ 'addTable', 'comment', 'patch-comment-table.sql' ],
+   [ 'addIndex', 'site_stats', 'PRIMARY', 
'patch-site_stats-pk.sql' ],
];
}
 
diff --git a/maintenance/mssql/archives/patch-site_stats-pk.sql 
b/maintenance/mssql/archives/patch-site_stats-pk.sql
new file mode 100644
index 000..7533719
--- /dev/null
+++ b/maintenance/mssql/archives/patch-site_stats-pk.sql
@@ -0,0 +1,2 @@
+DROP INDEX ss_row_id ON site_stats;
+ALTER TABLE /*_*/site_stats ADD CONSTRAINT /*i*/ss_row_id PRIMARY KEY 
(ss_row_id);
diff --git a/maintenance/mssql/tables.sql b/maintenance/mssql/tables.sql
index 2a67294..119cd5b 100644
--- a/maintenance/mssql/tables.sql
+++ b/maintenance/mssql/tables.sql
@@ -450,7 +450,7 @@
 --
 CREATE TABLE /*_*/site_stats (
   -- The single row should contain 1 here.
-  ss_row_id int NOT NULL,
+  ss_row_id int NOT NULL CONSTRAINT /*i*/ss_row_id PRIMARY KEY,
 
   -- Total number of edits performed.
   ss_total_edits bigint default 0,
@@ -474,9 +474,6 @@
   -- Number of images, equivalent to SELECT COUNT(*) FROM image
   ss_images int default 0
 );
-
--- Pointless index to assuage developer superstitions
-CREATE UNIQUE INDEX /*i*/ss_row_id ON /*_*/site_stats (ss_row_id);
 
 
 --
diff --git a/maintenance/oracle/archives/patch-site_stats-pk.sql 
b/maintenance/oracle/archives/patch-site_stats-pk.sql
new file mode 100644
index 000..a288c08
--- /dev/null
+++ b/maintenance/oracle/archives/patch-site_stats-pk.sql
@@ -0,0 +1,4 @@
+define mw_prefix='{$wgDBprefix}';
+
+ALTER TABLE &mw_prefix.site_stats DROP CONSTRAINT &mw_prefix.site_stats_u01;
+ALTER TABLE &mw_prefix.site_stats ADD CONSTRAINT &mw_prefix.site_stats_pk 
PRIMARY KEY(ss_row_id);
diff --git a/maintenance/oracle/tables.sql b/maintenance/oracle/tables.sql
index 44c907c..e6e2e56 100644
--- a/maintenance/oracle/tables.sql
+++ b/maintenance/oracle/tables.sql
@@ -321,7 +321,7 @@
 CREATE UNIQUE INDEX &mw_prefix.iwlinks_ui02 ON &mw_prefix.iwlinks (iwl_prefix, 
iwl_title, iwl_from);
 
 CREATE TABLE &mw_prefix.site_stats (
-  ss_row_id NUMBER  NOT NULL ,
+  ss_row_id NUMBER  NOT NULL PRIMARY KEY,
   ss_total_editsNUMBERDEFAULT 0,
   ss_good_articles  NUMBERDE

[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: db-eqiad.php: Depool db1077

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

Change subject: db-eqiad.php: Depool db1077
..

db-eqiad.php: Depool db1077

Going to checksum db1077's data

Bug: T164488
Change-Id: I06d48674d11e4dd8ec1a0ba37ef9e9a73e845c0d
---
M wmf-config/db-eqiad.php
1 file changed, 7 insertions(+), 7 deletions(-)


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

diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php
index be05471..f3f19b3 100644
--- a/wmf-config/db-eqiad.php
+++ b/wmf-config/db-eqiad.php
@@ -126,8 +126,8 @@
# 'db1038' => 0,   # B2 1.4TB  64GB, vslow, dump, old master # 
T172679
'db1044' => 0,   # B2 1.4TB  64GB, #Temporary master for db1095 
- new sanitarium #T150802
'db1072' => 0,  # B2 2.8TB 160GB, vslow, dump, old master
-   'db1077' => 400, # B1 3.6TB 512GB #temporary special slave - 
T172679
-   'db1078' => 500, # C3 3.6TB 512GB
+   # 'db1077' => 400, # B1 3.6TB 512GB #temporary special slave - 
T172679 #T164488
+   'db1078' => 500, # C3 3.6TB 512GB #temporary special slave 
#T164488
# 'db1103' => 0,  # A3 3.6TB 512GB, # not needed on s3 - has 
db1035's data that we have to checksum
],
's4' => [
@@ -312,19 +312,19 @@
'db1072' => 1,
],
'watchlist' => [
-   'db1077' => 1,
+   'db1078' => 1,
],
'recentchanges' => [
-   'db1077' => 1,
+   'db1078' => 1,
],
'recentchangeslinked' => [
-   'db1077' => 1,
+   'db1078' => 1,
],
'contributions' => [
-   'db1077' => 1,
+   'db1078' => 1,
],
'logpager' => [
-   'db1077' => 1,
+   'db1078' => 1,
],
],
's4' => [

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I06d48674d11e4dd8ec1a0ba37ef9e9a73e845c0d
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] mediawiki...mobileapps[master]: Next gen definitions parsing, using section tags

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

Change subject: Next gen definitions parsing, using section tags
..

Next gen definitions parsing, using section tags

Prep definitions parsing for Parsoid sections, part 3.

* Four nested loops instead of three:
  * one for language sections (NEW),
  * another for partsOfSpeech sections,
  * a third for definitions,
  * a fourth for examples
* Extracted a method for iterating over definitions
* Moved some variable definitions to places where they can be made const

Bug: T178708
Change-Id: Ia52db9e08252667af800d9cdf00f06ce132e1635
---
M lib/parseDefinitionsUsingSectionTags.js
1 file changed, 44 insertions(+), 52 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/mobileapps 
refs/changes/36/386336/1

diff --git a/lib/parseDefinitionsUsingSectionTags.js 
b/lib/parseDefinitionsUsingSectionTags.js
index 5bca2e7..38f833c 100644
--- a/lib/parseDefinitionsUsingSectionTags.js
+++ b/lib/parseDefinitionsUsingSectionTags.js
@@ -4,7 +4,7 @@
  * English Wiktionary entry layout guide:
  * https://en.wiktionary.org/wiki/Wiktionary:Entry_layout
  *
- * V2: to be updated with new implementation (currently the same as V1)
+ * This version is for when Parsoid emits  tags.
  */
 
 'use strict';
@@ -68,36 +68,62 @@
  * actual definitions on a wiki-by-wiki basis and pluck them out; this is
  * usually at least *internally* consistent.
  */
-function getDefnList(doc, id, wikiLangCode) {
+function getDefnList(parentNode, wikiLangCode) {
 let defnList;
 if (wikiLangCode === 'en') {
-defnList = doc.querySelectorAll(`div[id=${id}] li`);
+defnList = parentNode.querySelectorAll('li');
 }
 return defnList;
 }
 
 function constructDefinition(element, wikiLangCode) {
 const currentDefinition = {};
-
-let example;
-let examples;
-let j;
-
 if (hasUsageExamples(element.innerHTML, wikiLangCode)) {
 const html = element.innerHTML;
 const selector = wikiLangCode === 'en' ? 'dd' : 'li';
 
 currentDefinition.definition = html.substring(0, 
html.indexOf('h3,section>h4');
+for (let j = 0; j < partsOfSpeechHeadings.length; j++) {
+const partsOfSpeechHeading = partsOfSpeechHeadings[j];
+const partsOfSpeechSection = partsOfSpeechHeading.parentNode;
+const header = partsOfSpeechHeading.textContent;
+
+/* Parse definitions from part-of-speech sections */
+if (partsOfSpeech[wikiLangCode].indexOf(header) > -1) {
+const definitionSection = {};
+definitionSection.partOfSpeech = header;
+definitionSection.language = currentLang;
+definitionSection.definitions = [];
+const defnList = getDefnList(partsOfSpeechSection, wikiLangCode);
+for (let i = 0; i < defnList.length; i++) {
+
definitionSection.definitions.push(constructDefinition(defnList[i], 
wikiLangCode));
+}
+
+if (!definitions[defnLangCode]) {
+definitions[defnLangCode] = [];
+}
+
+definitions[defnLangCode].push(definitionSection);
+}
+}
 }
 
 /**
@@ -109,18 +135,11 @@
  * for supported partOfSpeeches (Noun, Verb, ...) of all language headings 
found on the given
  * Wiktionary page
  */
-function parse(doc, domain, title) {
-// TODO: update once Parsoid emits section tags, see 
https://phabricator.wikimedia.org/T114072#1711063
-let currentLang;
-let currentSectionDiv;
+function iterateOverLanguageSections(doc, domain, title) {
 const definitions = {};
-let definitionSection;
-let defnList;
-let defnLangCode = null;
-let header;
-let i;
-let j;
-const sectionDivs = doc.querySelectorAll('div[id^="section_"]');
+
+// H2 headings are language names per the English Wiktionary style guide 
(link above)
+const languageHeadings = doc.querySelectorAll('section > h2');
 const wikiLangCode = domain.split('.')[0];
 
 // Language-specific transforms
@@ -128,35 +147,8 @@
 transforms.rmElementsWithSelector(doc, 'ul');
 }
 
-for (j = 0; j < sectionDivs.length; j++) {
-currentSectionDiv = sectionDivs[j];
-header = currentSectionDiv.title;
-
-/* Get the language from the first H2 header, and begin iterating over 
sections.
-   Per the English Wiktionary style guide (linked in header above), H2 
headings
-   are language names. */
-if (currentSectionDiv.className.substring('toclevel_'.length) === "1") 
{
-currentLang = header;
-defnLangCode = getLanguageCode(header, wikiLangCode) || 'other';
-}
-
-/* Parse definitions from part-of-speech sections */
-if (partsOfSpeech[wikiLangCode].indexOf(header) > -1) {
-definitionSection = {};
-definitionSection.partOfSpeech = hea

[MediaWiki-commits] [Gerrit] mediawiki...mobileapps[master]: Hygiene: rename parseDefinitions to parseDefinitionsUsingDivs

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

Change subject: Hygiene: rename parseDefinitions to parseDefinitionsUsingDivs
..

Hygiene: rename parseDefinitions to parseDefinitionsUsingDivs

Prep definitions parsing for Parsoid sections, part 1.

Bug: T178708
Change-Id: I03dbd6aff94db7460c8c746f4f167972817edafb
---
R lib/parseDefinitionsUsingDivs.js
M lib/parsoid-access.js
2 files changed, 8 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/mobileapps 
refs/changes/34/386334/1

diff --git a/lib/parseDefinition.js b/lib/parseDefinitionsUsingDivs.js
similarity index 93%
rename from lib/parseDefinition.js
rename to lib/parseDefinitionsUsingDivs.js
index 9b67809..1bf40d7 100644
--- a/lib/parseDefinition.js
+++ b/lib/parseDefinitionsUsingDivs.js
@@ -99,9 +99,13 @@
 }
 
 /**
+ * Parses Wiktionary definitions.
  * @param {!document} doc the parsed DOM Document of the Parsoid output
- * @return {!definitions[]} an array of objects, organized by part of speech,
- * containing definitions (with examples, where available) from Wiktionary
+ * @param {!string} domain the domain the request was directed to
+ * @param {!string} title the title of the page requested
+ * @return {Object} an object structure with definitions (with examples, where 
available)
+ * for supported partOfSpeeches (Noun, Verb, ...) of all language headings 
found on the given
+ * Wiktionary page
  */
 function parse(doc, domain, title) {
 // TODO: update once Parsoid emits section tags, see 
https://phabricator.wikimedia.org/T114072#1711063
diff --git a/lib/parsoid-access.js b/lib/parsoid-access.js
index 0f063e8..efea1ac 100644
--- a/lib/parsoid-access.js
+++ b/lib/parsoid-access.js
@@ -9,7 +9,7 @@
 const api = require('./api-util');
 const mwapi = require('./mwapi');
 const parseProperty = require('./parseProperty');
-const parseDefinition = require('./parseDefinition');
+const parseDefinitions = require('./parseDefinitionsUsingDivs');
 const parsoidSections = require('./parsoidSections');
 const parsoidSectionsForDefinitions = require('./parsoidSectionsUsingDivs');
 const transforms = require('./transforms');
@@ -184,7 +184,7 @@
 parsoidSectionsForDefinitions.addSectionDivs(doc);
 transforms.addRequiredMarkup(doc);
 return {
-payload: parseDefinition(doc, req.params.domain, 
req.params.title),
+payload: parseDefinitions(doc, req.params.domain, 
req.params.title),
 meta: {
 revision: getRevisionFromEtag(response.headers)
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I03dbd6aff94db7460c8c746f4f167972817edafb
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/mobileapps
Gerrit-Branch: master
Gerrit-Owner: BearND 

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


[MediaWiki-commits] [Gerrit] mediawiki...mobileapps[master]: Hygiene: split up definitions parsing into two implementations

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

Change subject: Hygiene: split up definitions parsing into two implementations
..

Hygiene: split up definitions parsing into two implementations

Prep definitions parsing for Parsoid sections, part 2.

Bug: T178708
Change-Id: I1be1128e6df351eefce41a355a20437c0da1c2ff
---
A lib/parseDefinitions.js
A lib/parseDefinitionsUsingSectionTags.js
M lib/parsoid-access.js
3 files changed, 201 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/mobileapps 
refs/changes/35/386335/1

diff --git a/lib/parseDefinitions.js b/lib/parseDefinitions.js
new file mode 100644
index 000..e8c55f9
--- /dev/null
+++ b/lib/parseDefinitions.js
@@ -0,0 +1,25 @@
+'use strict';
+
+const parseDefinitionsUsingDivs = require('./parseDefinitionsUsingDivs');
+const parseDefinitionsUsingSectionTags = 
require('./parseDefinitionsUsingSectionTags');
+const parsoidSectionsUsingDivs = require('./parsoidSectionsUsingDivs');
+
+/**
+ * Parses Wiktionary definitions. Delegates to the correct implementation.
+ * @param {!document} doc the parsed DOM Document of the Parsoid output
+ * @param {!string} domain the domain the request was directed to
+ * @param {!string} title the title of the page requested
+ * @return {Object} an object structure with definitions (with examples, where 
available)
+ * for supported partOfSpeeches (Noun, Verb, ...) of all language headings 
found on the given
+ * Wiktionary page
+ */
+function parseDefinitions(doc, domain, title) {
+if (doc.querySelector('section')) {
+return parseDefinitionsUsingSectionTags(doc, domain, title);
+} else {
+parsoidSectionsUsingDivs.addSectionDivs(doc);
+return parseDefinitionsUsingDivs(doc, domain, title);
+}
+}
+
+module.exports = parseDefinitions;
diff --git a/lib/parseDefinitionsUsingSectionTags.js 
b/lib/parseDefinitionsUsingSectionTags.js
new file mode 100644
index 000..5bca2e7
--- /dev/null
+++ b/lib/parseDefinitionsUsingSectionTags.js
@@ -0,0 +1,175 @@
+/**
+ * Parse definitions from Wiktionary Parsoid HTML.
+ *
+ * English Wiktionary entry layout guide:
+ * https://en.wiktionary.org/wiki/Wiktionary:Entry_layout
+ *
+ * V2: to be updated with new implementation (currently the same as V1)
+ */
+
+'use strict';
+
+const sUtil = require('./util');
+const transforms = require('./transforms');
+const languageList = require('../private/languages_list.json');
+
+/* This list has expanded beyond parts of speech to something more like 
"whatever
+   categories of terms the Wiktionary editors decided to include", but we'll
+   retain the variable name/response field since this is now what the app 
expects
+   and changing it will require a coordinated service deployment/app 
release/RESTBase
+   cache purge. */
+const partsOfSpeech = {
+'en':['Abbreviation',
+'Acronym',
+'Adjective',
+'Adverb',
+'Article',
+'Conjunction',
+'Contraction',
+'Determiner',
+'Idiom',
+'Infix',
+'Initialism',
+'Interjection',
+'Letter',
+'Noun',
+'Numeral',
+'Participle',
+'Particle',
+'Phrase',
+'Prefix',
+'Preposition',
+'Prepositional phrase',
+'Pronoun',
+'Proper noun',
+'Proverb',
+'Punctuation mark',
+'Romanization',
+'Suffix',
+'Syllable',
+'Symbol',
+'Verb' ]
+};
+
+function hasUsageExamples(text, langCode) {
+return langCode === 'en' ? text.indexOf(' -1 : text.indexOf(' -1;
+}
+
+function getLanguageCode(langName, wikiLangCode) {
+if (langName === "Translingual") {
+return wikiLangCode;
+}
+return languageList[langName];
+}
+
+/**
+ * This is where the sausage is made.  It seems no two Wiktionaries are
+ * formatted the same way, so we'll figure out where they (usually) keep the
+ * actual definitions on a wiki-by-wiki basis and pluck them out; this is
+ * usually at least *internally* consistent.
+ */
+function getDefnList(doc, id, wikiLangCode) {
+let defnList;
+if (wikiLangCode === 'en') {
+defnList = doc.querySelectorAll(`div[id=${id}] li`);
+}
+return defnList;
+}
+
+function constructDefinition(element, wikiLangCode) {
+const currentDefinition = {};
+
+let example;
+let examples;
+let j;
+
+if (hasUsageExamples(element.innerHTML, wikiLangCode)) {
+const html = element.innerHTML;
+const selector = wikiLangCode === 'en' ? 'dd' : 'li';
+
+currentDefinition.definition = html.substring(0, 
html.indexOf('https://phabricator.wikimedia.org/T114072#1711063
+let currentLang;
+let currentSectionDiv;
+const definitions = {};
+let definitionSection;
+let defnList;
+let defnLangCode = null;
+let header;
+let i;
+let j;

[MediaWiki-commits] [Gerrit] mediawiki...FundraiserLandingPage[master]: Drop ContributionTracking* settings from "config" in extensi...

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

Change subject: Drop ContributionTracking* settings from "config" in 
extension.json
..


Drop ContributionTracking* settings from "config" in extension.json

They don't belong to this extension, they're from the ContributionTracking
extension. And this extension already depends upon that extension for the
redirect to Special:FundraiserMaintenance so it's OK to depend upon it for
the two other configuration settings.

Bug: T178940
Change-Id: I628cc4f4b7212c26947f457fd3a02d5ddbd63720
---
M extension.json
1 file changed, 2 insertions(+), 4 deletions(-)

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



diff --git a/extension.json b/extension.json
index 1258d5e..c6fe9b7 100644
--- a/extension.json
+++ b/extension.json
@@ -45,9 +45,7 @@
"DE": "fundraiserlandingpage-wmde-landing-page",
"_merge_strategy": "array_plus"
},
-   "FundraiserLandingPageMaxAge": 600,
-   "ContributionTrackingFundraiserMaintenance": false,
-   "ContributionTrackingFundraiserMaintenanceUnsched": false
+   "FundraiserLandingPageMaxAge": 600
},
"manifest_version": 1
-}
\ No newline at end of file
+}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I628cc4f4b7212c26947f457fd3a02d5ddbd63720
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/FundraiserLandingPage
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Chad 
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...PageForms[master]: Fixes issue for OutputPage.php: Title is null

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

Change subject: Fixes issue for OutputPage.php: Title is null
..


Fixes issue for OutputPage.php: Title is null

Code change as suggested by Yaron Koren

Bug: T165148
Change-Id: I4a66d597ead66656529414b7f2a3271c552ec188
---
M includes/PF_FormPrinter.php
1 file changed, 5 insertions(+), 3 deletions(-)

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



diff --git a/includes/PF_FormPrinter.php b/includes/PF_FormPrinter.php
index e2228ad..551e748 100644
--- a/includes/PF_FormPrinter.php
+++ b/includes/PF_FormPrinter.php
@@ -770,9 +770,11 @@
}
} else {
$form_is_disabled = true;
-   $wgOut->setPageTitle( wfMessage( 'badaccess' )->text() 
);
-   $wgOut->addWikiText( 
$wgOut->formatPermissionsErrorMessage( $permissionErrors, 'edit' ) );
-   $wgOut->addHTML( "\n\n" );
+   if ( $wgOut->getTitle() != null ) {
+   $wgOut->setPageTitle( wfMessage( 'badaccess' 
)->text() );
+   $wgOut->addWikiText( 
$wgOut->formatPermissionsErrorMessage( $permissionErrors, 'edit' ) );
+   $wgOut->addHTML( "\n\n" );
+   }
}
 
 // $oldParser = $wgParser;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4a66d597ead66656529414b7f2a3271c552ec188
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/PageForms
Gerrit-Branch: master
Gerrit-Owner: Kghbln 
Gerrit-Reviewer: Kghbln 
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...FundraiserLandingPage[master]: Drop ContributionTracking* settings from "config" in extensi...

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

Change subject: Drop ContributionTracking* settings from "config" in 
extension.json
..

Drop ContributionTracking* settings from "config" in extension.json

They don't belong to this extension, they're from the ContributionTracking
extension. And this extension already depends upon that extension for the
redirect to Special:FundraiserMaintenance so it's OK to depend upon it for
the two other configuration settings.

Bug: T178940
Change-Id: I628cc4f4b7212c26947f457fd3a02d5ddbd63720
---
M extension.json
1 file changed, 2 insertions(+), 4 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/FundraiserLandingPage 
refs/changes/33/386333/1

diff --git a/extension.json b/extension.json
index 1258d5e..c6fe9b7 100644
--- a/extension.json
+++ b/extension.json
@@ -45,9 +45,7 @@
"DE": "fundraiserlandingpage-wmde-landing-page",
"_merge_strategy": "array_plus"
},
-   "FundraiserLandingPageMaxAge": 600,
-   "ContributionTrackingFundraiserMaintenance": false,
-   "ContributionTrackingFundraiserMaintenanceUnsched": false
+   "FundraiserLandingPageMaxAge": 600
},
"manifest_version": 1
-}
\ No newline at end of file
+}

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: Remove deep clone from selser parserTests

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

Change subject: Remove deep clone from selser parserTests
..


Remove deep clone from selser parserTests

A deep clone of the subtree isn't necessary here, and it slows down
the selser parserTests.

Change-Id: If346c38ab8f2292ee452669b5b4d997895002b71
---
M bin/parserTests.js
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/bin/parserTests.js b/bin/parserTests.js
index b02ac28..01e2ac5 100755
--- a/bin/parserTests.js
+++ b/bin/parserTests.js
@@ -315,7 +315,7 @@
}
 
// Clone the array since it could be modified below
-   var nodes = Util.clone(node.childNodes);
+   var nodes = Array.from(node.childNodes);
 
for (var i = 0; i < changes.length; i++) {
var child = nodes[i];

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If346c38ab8f2292ee452669b5b4d997895002b71
Gerrit-PatchSet: 5
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: C. Scott Ananian 
Gerrit-Reviewer: Arlolra 
Gerrit-Reviewer: Sbailey 
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] apps...wikipedia[master]: List all trending posts

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

Change subject: List all trending posts
..

List all trending posts

- Added a view to display an option to view all the posts
- Added an Activity and a Fragment to list all posts
- UI details : Added right chevron for the option
 Added Date String for the title
 Items on the full list screen have the standard overflow 
menu
Screenshot: https://drive.google.com/open?id=0B_maM54cPModUHZPUlh3VzlWaE0

Bug: T170884
Change-Id: Idb1189ab9b2c65528d47c5c75f2f612ba53961e8
---
M app/src/main/AndroidManifest.xml
A app/src/main/java/org/wikipedia/feed/mostread/MostReadArticlesActivity.java
M app/src/main/java/org/wikipedia/feed/mostread/MostReadCardView.java
A app/src/main/java/org/wikipedia/feed/mostread/MostReadFragment.java
M app/src/main/java/org/wikipedia/feed/mostread/MostReadListCard.java
M app/src/main/java/org/wikipedia/feed/view/ListCardView.java
A app/src/main/res/drawable/ic_chevron_forward_gray.xml
A app/src/main/res/layout/fragment_most_read.xml
M app/src/main/res/layout/view_list_card.xml
M app/src/main/res/values-qq/strings.xml
M app/src/main/res/values/strings.xml
11 files changed, 251 insertions(+), 8 deletions(-)


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

diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 97396a3..604f341 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -225,6 +225,10 @@
 android:name=".offline.OfflineTutorialActivity"
 android:theme="@style/AppTheme.TranslucentStatus"/>
 
+
+
  {
+protected static final String MOST_READ_CARD = "item";
+
+@Override
+public void onCreate(@Nullable Bundle savedInstanceState) {
+super.onCreate(savedInstanceState);
+setSharedElementTransitions();
+if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
+
getWindow().clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
+getWindow().setStatusBarColor(Color.TRANSPARENT);
+}
+}
+
+@Override
+public MostReadFragment createFragment() {
+return 
MostReadFragment.newInstance(GsonUnmarshaller.unmarshal(MostReadItemCard.class, 
getIntent().getStringExtra(MOST_READ_CARD)));
+}
+
+
+}
diff --git 
a/app/src/main/java/org/wikipedia/feed/mostread/MostReadCardView.java 
b/app/src/main/java/org/wikipedia/feed/mostread/MostReadCardView.java
index a0cc35e..d9f8701 100644
--- a/app/src/main/java/org/wikipedia/feed/mostread/MostReadCardView.java
+++ b/app/src/main/java/org/wikipedia/feed/mostread/MostReadCardView.java
@@ -1,23 +1,30 @@
 package org.wikipedia.feed.mostread;
 
 import android.content.Context;
+import android.content.Intent;
 import android.support.annotation.NonNull;
 import android.support.annotation.Nullable;
 
 import org.wikipedia.R;
+import org.wikipedia.WikipediaApp;
 import org.wikipedia.feed.view.CardHeaderView;
 import org.wikipedia.feed.view.ListCardItemView;
 import org.wikipedia.feed.view.ListCardRecyclerAdapter;
 import org.wikipedia.feed.view.ListCardView;
 import org.wikipedia.history.HistoryEntry;
+import org.wikipedia.json.GsonMarshaller;
 import org.wikipedia.util.ResourceUtil;
 import org.wikipedia.views.DefaultViewHolder;
 import org.wikipedia.views.ItemTouchHelperSwipeAdapter;
 
 import java.util.List;
 
+import static 
org.wikipedia.feed.mostread.MostReadArticlesActivity.MOST_READ_CARD;
+
 public class MostReadCardView extends ListCardView
-implements ItemTouchHelperSwipeAdapter.SwipeableView {
+implements ItemTouchHelperSwipeAdapter.SwipeableView, 
ListCardView.Callback {
+private static final int EVENTS_SHOWN = 5;
+private MostReadListCard card;
 public MostReadCardView(Context context) {
 super(context);
 }
@@ -25,8 +32,19 @@
 @Override public void setCard(@NonNull MostReadListCard card) {
 super.setCard(card);
 header(card);
-set(new RecyclerAdapter(card.items()));
+this.card = card;
+set(new RecyclerAdapter(card.items().subList(0, 
Math.min(card.items().size(), EVENTS_SHOWN;
+
setMoreEventsTextView(String.format(getContext().getString(R.string.all_trending_text),
 card.subtitle()), this);
 }
+
+
+private void launchMoreEventsActivity() {
+Context context = WikipediaApp.getInstance();
+Intent intent = new Intent(context, MostReadArticlesActivity.class);
+intent.putExtra(MOST_READ_CARD, GsonMarshaller.marshal(card));
+context.startActivity(intent);
+}
+
 
 private void header(@NonNull MostReadListCard card) {
 CardHeaderView header = new CardHeaderView(getContext())
@@ -37,6 +55,11 @@
 .setCard(card)
 .setCallback(getCallback());
   

[MediaWiki-commits] [Gerrit] operations/puppet[production]: git-sync-upstream: perform rebase in a sepaarate, temporary ...

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

Change subject: git-sync-upstream: perform rebase in a sepaarate, temporary 
workdir
..

git-sync-upstream: perform rebase in a sepaarate, temporary workdir

This madness allows us to do the rebase away from the puppet
checkout that puppet is actually using.  This prevents puppet
from compiling catalogs out of a repo mid-rebase.

Bug: 386318
Change-Id: I4f56f4339c5440281fd7e9821d026ebc5265507a
---
M modules/puppetmaster/files/git-sync-upstream
1 file changed, 41 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/31/386331/1

diff --git a/modules/puppetmaster/files/git-sync-upstream 
b/modules/puppetmaster/files/git-sync-upstream
index 6723c89..66cfab2 100755
--- a/modules/puppetmaster/files/git-sync-upstream
+++ b/modules/puppetmaster/files/git-sync-upstream
@@ -3,6 +3,7 @@
 import datetime
 import logging
 import os
+import shutil
 import sys
 
 # Send all git output to stdout
@@ -14,6 +15,9 @@
 
 
 def rebase_repo(repo_path, track_branch):
+tagname = "snapshot-%s" % datetime.datetime.now().strftime('%Y%m%d%H%M')
+tempdir = "/tmp/%s" % tagname
+
 repo = git.Repo(repo_path)
 assert not repo.bare
 
@@ -26,6 +30,7 @@
 
 repo.remotes.origin.fetch()
 
+latest_commit = repo.git.rev_parse(track_branch)
 latest_upstream_commit = repo.git.show_ref("-s", upstream_branch)
 latest_merged_commit = repo.git.merge_base(upstream_branch, "HEAD")
 
@@ -34,19 +39,47 @@
 return
 
 try:
-repo.git.rebase("--preserve-merges",
-"--stat",
-"--strategy=recursive",
-"--strategy-option=patience",
-upstream_branch)
+# Rebase in a tempdir to avoid changing the state of the current 
workdir.
+#  (Rebasing in place causes an occasional puppet race)
+#
+# This next bit is largely cribbed from
+#  https://github.com/encukou/bin/blob/master/oot-rebase
+#
+os.makedirs(tempdir)
+
+tmprepo = git.Repo.init(tempdir)
+
+with open(os.path.join(tempdir,".git/objects/info/alternates"), "w") 
as alternates:
+alternates.write("%s/.git/objects" % repo_path)
+
+tmprepo.git.fetch("-n", repo_path,
+  "%s:oot-rebase/%s" % (track_branch, track_branch),
+  "%s:oot-rebase/%s" % (upstream_branch, 
upstream_branch))
+tmprepo.git.checkout("oot-rebase/%s" % track_branch)
+tmprepo.git.rebase("--preserve-merges",
+   "--stat",
+   "--strategy=recursive",
+   "--strategy-option=patience",
+   "oot-rebase/%s" % upstream_branch)
+
+# Now that we have a rebase, push to branch 'tagname' in the original 
repo
+tmprepo.git.push("--force-with-lease=%s:%s" % (track_branch, 
latest_commit),
+ repo_path,
+ "oot-rebase/%s:%s" % (track_branch,tagname))
+
+# And reset our original repo to this new branch and discard the 
'tagname' branch
+repo.git.reset("--hard", tagname)
+repo.git.branch("-D", tagname)
+
 except git.exc.GitCommandError:
-print("Rebase failed! Reverting rebase attempt.", file=sys.stderr)
-repo.git.rebase("--abort")
+print("Rebase failed!")
+shutil.rmtree(tempdir)
 return(2)
+
+shutil.rmtree(tempdir)
 
 repo.git.submodule("update", "--init", "--recursive")
 
-tagname = "snapshot-%s" % datetime.datetime.now().strftime('%Y%m%d%H%M')
 repo.create_tag(tagname)
 print("Tagged as %s" % tagname)
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4f56f4339c5440281fd7e9821d026ebc5265507a
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] wikimedia/portals[master]: Fix nonsecure link to CC license page on Wikipedia portal.

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

Change subject: Fix nonsecure link to CC license page on Wikipedia portal.
..


Fix nonsecure link to CC license page on Wikipedia portal.

Bug: T178954
Change-Id: I86ab5582152078bf2e2b27e1f67547adc276b147
---
M prod/wikipedia.org/index.html
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/prod/wikipedia.org/index.html b/prod/wikipedia.org/index.html
index fde00ed..ef5efe9 100644
--- a/prod/wikipedia.org/index.html
+++ b/prod/wikipedia.org/index.html
@@ -738,7 +738,7 @@
 
 
 
-This page is available under the 
http://creativecommons.org/licenses/by-sa/3.0/";>Creative Commons 
Attribution-ShareAlike License.
+This page is available under the 
Creative Commons 
Attribution-ShareAlike License.
 Terms of Use •
 Privacy Policy
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I86ab5582152078bf2e2b27e1f67547adc276b147
Gerrit-PatchSet: 2
Gerrit-Project: wikimedia/portals
Gerrit-Branch: master
Gerrit-Owner: MacFan4000 
Gerrit-Reviewer: BBlack 
Gerrit-Reviewer: Jdrewniak 
Gerrit-Reviewer: MaxSem 
Gerrit-Reviewer: Mxn 
Gerrit-Reviewer: Zoranzoki21 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Switch Installer to the new execution framework

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

Change subject: Switch Installer to the new execution framework
..

Switch Installer to the new execution framework

Change-Id: Id04ba0751ff94e9614852e351377405f65b6ea1c
---
M includes/installer/Installer.php
1 file changed, 5 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/30/386330/1

diff --git a/includes/installer/Installer.php b/includes/installer/Installer.php
index 012b477..17adfcf 100644
--- a/includes/installer/Installer.php
+++ b/includes/installer/Installer.php
@@ -24,6 +24,7 @@
  * @ingroup Deployment
  */
 use MediaWiki\MediaWikiServices;
+use MediaWiki\Shell\Shell;
 
 /**
  * This documentation group collects source code files with deployment 
functionality.
@@ -995,17 +996,17 @@
}
 
# Get a list of available locales.
-   $ret = false;
-   $lines = wfShellExec( '/usr/bin/locale -a', $ret );
+   $result = Shell::command( '/usr/bin/locale', '-a' )
+   ->execute();
 
-   if ( $ret ) {
+   if ( $result->getExitCode() != 0 ) {
return true;
}
 
+   $lines = $result->getStdout();
$lines = array_map( 'trim', explode( "\n", $lines ) );
$candidatesByLocale = [];
$candidatesByLang = [];
-
foreach ( $lines as $line ) {
if ( $line === '' ) {
continue;

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Switch ServiceWiring to the new execution framework

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

Change subject: Switch ServiceWiring to the new execution framework
..

Switch ServiceWiring to the new execution framework

To test:

$wgMimeDetectorCommand = 'file -bi';
echo MimeMagic::singleton()->guessMimeType('/vagrant/mediawiki/README');

Change-Id: Iaf124901c68292736e5588636f5ec746147f6a54
---
M includes/ServiceWiring.php
1 file changed, 8 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/29/386329/1

diff --git a/includes/ServiceWiring.php b/includes/ServiceWiring.php
index 75ce8ec..2434a0d 100644
--- a/includes/ServiceWiring.php
+++ b/includes/ServiceWiring.php
@@ -266,8 +266,14 @@
 
$detectorCmd = $mainConfig->get( 'MimeDetectorCommand' );
if ( $detectorCmd ) {
-   $params['detectCallback'] = function ( $file ) use ( 
$detectorCmd ) {
-   return wfShellExec( "$detectorCmd " . 
wfEscapeShellArg( $file ) );
+   $params['detectCallback'] = function ( $file ) use ( 
$detectorCmd, $services ) {
+   $result = $services->getShellCommandFactory()
+   ->create()
+   // $wgMimeDetectorCommand can contain 
commands with parameters
+   ->unsafeParams( $detectorCmd )
+   ->params( $file )
+   ->execute();
+   return $result->getStdout();
};
}
 

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Rename some cache keys with odd virtual hierarchies

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

Change subject: Rename some cache keys with odd virtual hierarchies
..

Rename some cache keys with odd virtual hierarchies

This makes automatic statsd metrics more useful.

Change-Id: I07d87dcb8ce9b42cc2f1c84ac4c06d177d463b1d
---
M includes/Block.php
M includes/page/WikiPage.php
M maintenance/populateContentModel.php
3 files changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/28/386328/1

diff --git a/includes/Block.php b/includes/Block.php
index 5a4c43e..8d69d9a 100644
--- a/includes/Block.php
+++ b/includes/Block.php
@@ -709,7 +709,7 @@
// than getting the msg raw and explode()'ing it.
$cache = 
MediaWikiServices::getInstance()->getMainWANObjectCache();
$lines = $cache->getWithSetCallback(
-   $cache->makeKey( 'ipb', 'autoblock', 'whitelist' ),
+   $cache->makeKey( 'ip-autoblock', 'whitelist' ),
$cache::TTL_DAY,
function ( $curValue, &$ttl, array &$setOpts ) {
$setOpts += Database::getCacheSetOptions( 
wfGetDB( DB_REPLICA ) );
diff --git a/includes/page/WikiPage.php b/includes/page/WikiPage.php
index e875df5..aa26105 100644
--- a/includes/page/WikiPage.php
+++ b/includes/page/WikiPage.php
@@ -512,7 +512,7 @@
$cache = ObjectCache::getMainWANInstance();
 
return $cache->getWithSetCallback(
-   $cache->makeKey( 'page', 'content-model', 
$this->getLatest() ),
+   $cache->makeKey( 'page-content-model', 
$this->getLatest() ),
$cache::TTL_MONTH,
function () {
$rev = $this->getRevision();
diff --git a/maintenance/populateContentModel.php 
b/maintenance/populateContentModel.php
index 74a918a..d99f70a 100644
--- a/maintenance/populateContentModel.php
+++ b/maintenance/populateContentModel.php
@@ -69,7 +69,7 @@
}
 
protected function clearCache( $page_id, $rev_id ) {
-   $contentModelKey = $this->wanCache->makeKey( 'page', 
'content-model', $rev_id );
+   $contentModelKey = $this->wanCache->makeKey( 
'page-content-model', $rev_id );
$revisionKey =
$this->wanCache->makeGlobalKey( 'revision', 
$this->wikiId, $page_id, $rev_id );
 

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: API: Include setupSkinUserCss in prop=modules for useskin mode

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

Change subject: API: Include setupSkinUserCss in prop=modules for useskin mode
..

API: Include setupSkinUserCss in prop=modules for useskin mode

Follows-up 90c95fc7f290f, which included result of Skin::getDefaultModules
in the prop=modules list. All hardcoded modules in OutputPage and Parser
were also subsequently moved into Skin::getDefaultModules.

However, a number of modules cannot be moved there because fundamentally
Skin::getDefaultModules can only load modules via OutputPage::addModules().

For style modules, addModuleStyles() must be used.

Fortunately, there is already a centralised place for that, namely
Skin::setupSkinUserCss(). Include that in the ApiParse return as well.
That should resolve the last bit of inconsistency between ApiParse
and OutputPage when it comes to the module queue.

Bug: T140664
Change-Id: I35e2e3bbdccdd1aa2a259b8e624daa80c609ba8c
---
M includes/api/ApiParse.php
M tests/phpunit/includes/api/ApiParseTest.php
2 files changed, 8 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/27/386327/1

diff --git a/includes/api/ApiParse.php b/includes/api/ApiParse.php
index 7cbd353..15b94fb 100644
--- a/includes/api/ApiParse.php
+++ b/includes/api/ApiParse.php
@@ -329,6 +329,8 @@
$context->setOutput( $outputPage );
 
if ( $skin ) {
+   // Based on OutputPage::headElement()
+   $skin->setupSkinUserCss( $outputPage );
// Based on OutputPage::output()
foreach ( $skin->getDefaultModules() as $group 
) {
$outputPage->addModules( $group );
diff --git a/tests/phpunit/includes/api/ApiParseTest.php 
b/tests/phpunit/includes/api/ApiParseTest.php
index 7d33fbc..07bf299 100644
--- a/tests/phpunit/includes/api/ApiParseTest.php
+++ b/tests/phpunit/includes/api/ApiParseTest.php
@@ -134,13 +134,17 @@
$factory = new SkinFactory();
$factory->register( 'testing', 'Testing', function () {
$skin = $this->getMockBuilder( SkinFallback::class )
-   ->setMethods( [ 'getDefaultModules' ] )
+   ->setMethods( [ 'getDefaultModules', 
'setupSkinUserCss' ] )
->getMock();
$skin->expects( $this->once() )->method( 
'getDefaultModules' )
->willReturn( [
'core' => [ 'foo', 'bar' ],
'content' => [ 'baz' ]
] );
+   $skin->expects( $this->once() )->method( 
'setupSkinUserCss' )
+   ->will( $this->returnCallback( function ( 
OutputPage $out ) {
+   $out->addModuleStyles( 'foo.styles' );
+   } ) );
return $skin;
} );
$this->setService( 'SkinFactory', $factory );
@@ -162,7 +166,7 @@
'resp.parse.modulescripts'
);
$this->assertSame(
-   [],
+   [ 'foo.styles' ],
$res[0]['parse']['modulestyles'],
'resp.parse.modulestyles'
);

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I35e2e3bbdccdd1aa2a259b8e624daa80c609ba8c
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]: API: Add tests for useskin parameter of ApiParse

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

Change subject: API: Add tests for useskin parameter of ApiParse
..

API: Add tests for useskin parameter of ApiParse

Change-Id: If3dff7be5ccb6791f95d37c06998fcbadf1f469f
---
M tests/phpunit/includes/api/ApiParseTest.php
1 file changed, 38 insertions(+), 0 deletions(-)


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

diff --git a/tests/phpunit/includes/api/ApiParseTest.php 
b/tests/phpunit/includes/api/ApiParseTest.php
index 028d3b4..7d33fbc 100644
--- a/tests/phpunit/includes/api/ApiParseTest.php
+++ b/tests/phpunit/includes/api/ApiParseTest.php
@@ -129,4 +129,42 @@
);
}
}
+
+   public function testSkinModules() {
+   $factory = new SkinFactory();
+   $factory->register( 'testing', 'Testing', function () {
+   $skin = $this->getMockBuilder( SkinFallback::class )
+   ->setMethods( [ 'getDefaultModules' ] )
+   ->getMock();
+   $skin->expects( $this->once() )->method( 
'getDefaultModules' )
+   ->willReturn( [
+   'core' => [ 'foo', 'bar' ],
+   'content' => [ 'baz' ]
+   ] );
+   return $skin;
+   } );
+   $this->setService( 'SkinFactory', $factory );
+
+   $res = $this->doApiRequest( [
+   'action' => 'parse',
+   'pageid' => self::$pageId,
+   'useskin' => 'testing',
+   'prop' => 'modules',
+   ] );
+   $this->assertSame(
+   [ 'foo', 'bar', 'baz' ],
+   $res[0]['parse']['modules'],
+   'resp.parse.modules'
+   );
+   $this->assertSame(
+   [],
+   $res[0]['parse']['modulescripts'],
+   'resp.parse.modulescripts'
+   );
+   $this->assertSame(
+   [],
+   $res[0]['parse']['modulestyles'],
+   'resp.parse.modulestyles'
+   );
+   }
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If3dff7be5ccb6791f95d37c06998fcbadf1f469f
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]: Setup: Merge PreConfigSetup into Setup.php

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

Change subject: Setup: Merge PreConfigSetup into Setup.php
..


Setup: Merge PreConfigSetup into Setup.php

Follows-up 41ea7e2fefff65.

The following previously happened between PreConfigSetup and Setup
and must now happen either before it, after it, or moved inside it.

* WebStart: Detect missing composer.
  This must be after Autoloader/Vendor but before the first call to
  wfDebugLog (or other loggers) so that we can output a more descriptive
  error instead of a generic "Unknown class" fatal error.
  Moving it to before Setup is too early, and after is too late.
  Move it to within Setup.php and make it work in CLI mode.

* WebStart: Install header callback
  Moving it to before Setup is too early, and after is too late.
  Move it to within Setup.php (no-op in CLI mode).

* WebStart/Maintenance: Load LocalSetings.
  Must be between PreConfigSetup and Setup.
  Move to Setup.php to maintain execution order.
  Utilise MW_CONFIG_File for custom handling in Maintenance.php.

* WebStart: Initialise output buffering
  Utilise (new) MW_SETUP_CALLBACK hook.

* WebStart: Display NoLocalSettings.php
  Utilise MW_CONFIG_CALLBACK hook.

* Maintenance: Setting $wgLocalisationCacheConf, calling 
Maintenance::finalSetup.
  Utilise (new) MW_SETUP_CALLBACK hook.

Change-Id: I633a6ff235b4275391c48034c0525d2fbfa3fecd
---
M includes/NoLocalSettings.php
D includes/PreConfigSetup.php
M includes/Setup.php
M includes/WebStart.php
M maintenance/doMaintenance.php
5 files changed, 125 insertions(+), 113 deletions(-)

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



diff --git a/includes/NoLocalSettings.php b/includes/NoLocalSettings.php
index 50950ef..b8bfd6a 100644
--- a/includes/NoLocalSettings.php
+++ b/includes/NoLocalSettings.php
@@ -50,6 +50,7 @@
 
 # Render error page if no LocalSettings file can be found
 try {
+   global $wgVersion;
echo $templateParser->processTemplate(
'NoLocalSettings',
[
diff --git a/includes/PreConfigSetup.php b/includes/PreConfigSetup.php
deleted file mode 100644
index bda7886..000
--- a/includes/PreConfigSetup.php
+++ /dev/null
@@ -1,54 +0,0 @@
-http://www.gnu.org/copyleft/gpl.html
- *
- *
- * @file
- */
-
-if ( !defined( 'MEDIAWIKI' ) ) {
-   // Not an entry point
-   exit( 1 );
-}
-
-// Grab profiling functions
-require_once "$IP/includes/profiler/ProfilerFunctions.php";
-
-// Start the autoloader, so that extensions can derive classes from core files
-require_once "$IP/includes/AutoLoader.php";
-
-// Load up some global defines.
-require_once "$IP/includes/Defines.php";
-
-// Start the profiler
-$wgProfiler = [];
-if ( file_exists( "$IP/StartProfiler.php" ) ) {
-   require "$IP/StartProfiler.php";
-}
-
-// Load default settings
-require_once "$IP/includes/DefaultSettings.php";
-
-// Load global functions
-require_once "$IP/includes/GlobalFunctions.php";
-
-// Load composer's autoloader if present
-if ( is_readable( "$IP/vendor/autoload.php" ) ) {
-   require_once "$IP/vendor/autoload.php";
-}
diff --git a/includes/Setup.php b/includes/Setup.php
index d4612dd..e4396ba 100644
--- a/includes/Setup.php
+++ b/includes/Setup.php
@@ -33,6 +33,85 @@
exit( 1 );
 }
 
+/**
+ * Pre-config setup: Before loading LocalSettings.php
+ */
+
+// Grab profiling functions
+require_once "$IP/includes/profiler/ProfilerFunctions.php";
+
+// Start the autoloader, so that extensions can derive classes from core files
+require_once "$IP/includes/AutoLoader.php";
+
+// Load up some global defines
+require_once "$IP/includes/Defines.php";
+
+// Start the profiler
+$wgProfiler = [];
+if ( file_exists( "$IP/StartProfiler.php" ) ) {
+   require "$IP/StartProfiler.php";
+}
+
+// Load default settings
+require_once "$IP/includes/DefaultSettings.php";
+
+// Load global functions
+require_once "$IP/includes/GlobalFunctions.php";
+
+// Load composer's autoloader if present
+if ( is_readable( "$IP/vendor/autoload.php" ) ) {
+   require_once "$IP/vendor/autoload.php";
+}
+
+// Assert that composer dependencies were successfully loaded
+// Purposely no leading \ due to it breaking HHVM RepoAuthorative mode
+// PHP works fine with both versions
+// See https://github.com/facebook/hhvm/issues/5833
+if ( !interface_exists( 'Psr\Log\LoggerInterface' ) ) {
+   $message = (
+   'MediaWiki requires the https://github.com/php-fig/log";>PSR-3 logging ' .
+   "library to be present. This library is not embedded 
directly in MediaWiki's " .
+   "git repository and must be installed separately by the end 
user.\n\n" .
+   'Please see https://www.mediawiki.org/wiki/Download_from_Git' .
+   '#Fetch_external_libraries">mediawiki.org for help on 
installing ' .
+   'the required components.'
+  

[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Fix: Incorrect variant when read article from preview links

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

Change subject: Fix: Incorrect variant when read article from preview links
..

Fix: Incorrect variant when read article from preview links

Adjust the priorities of "zh", "zh-hant", and "zh-hants"

BUG: T178852
Change-Id: Id8823bfcf65fa6a0e603bd073673809b72a3713d
---
M app/src/main/java/org/wikipedia/language/AcceptLanguageUtil.java
1 file changed, 5 insertions(+), 0 deletions(-)


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

diff --git a/app/src/main/java/org/wikipedia/language/AcceptLanguageUtil.java 
b/app/src/main/java/org/wikipedia/language/AcceptLanguageUtil.java
index 0499750..91cc1aa 100644
--- a/app/src/main/java/org/wikipedia/language/AcceptLanguageUtil.java
+++ b/app/src/main/java/org/wikipedia/language/AcceptLanguageUtil.java
@@ -34,6 +34,11 @@
 return languageCode;
 }
 
+// If the article is a Chinese article, then the "zh-hant" or 
"zh-hans" language code should be the first priority instead of "zh"
+if 
(acceptLanguage.equals(AppLanguageLookUpTable.CHINESE_LANGUAGE_CODE)) {
+return String.format(Locale.ROOT, "%s,%s;q=%.1f", languageCode, 
acceptLanguage, quality);
+}
+
 // Accept-language is nonempty, append the language.
 return String.format(Locale.ROOT, "%s,%s;q=%.1f", acceptLanguage, 
languageCode, quality);
 }

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...Vector[master]: Optimize SVGs and align to WikimediaUI color palette

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

Change subject: Optimize SVGs and align to WikimediaUI color palette
..


Optimize SVGs and align to WikimediaUI color palette

Optimize and unify markup of SVGs and align to
WikimediaUI color palette where easily applicable.
Also removing three unused image files.

Bug: T153043
Bug: T178867
Change-Id: Ied457ef84357374e66db9e1936ce1b754d53cfdb
---
D images/arrow-collapsed-ltr.svg
D images/arrow-collapsed-rtl.svg
M images/arrow-down.svg
D images/arrow-expanded.svg
M images/bullet-icon.svg
M images/external-link-ltr-icon.svg
M images/external-link-rtl-icon.svg
M images/search-ltr.svg
M images/search-rtl.svg
M images/unwatch-icon-hl.svg
M images/unwatch-icon.svg
M images/user-icon.svg
M images/watch-icon-hl.svg
M images/watch-icon-loading.svg
M images/watch-icon.svg
15 files changed, 69 insertions(+), 25 deletions(-)

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



diff --git a/images/arrow-collapsed-ltr.svg b/images/arrow-collapsed-ltr.svg
deleted file mode 100644
index b943caa..000
--- a/images/arrow-collapsed-ltr.svg
+++ /dev/null
@@ -1 +0,0 @@
-http://www.w3.org/2000/svg"; 
width="16" height="16">
\ No newline at end of file
diff --git a/images/arrow-collapsed-rtl.svg b/images/arrow-collapsed-rtl.svg
deleted file mode 100644
index 5faf356..000
--- a/images/arrow-collapsed-rtl.svg
+++ /dev/null
@@ -1 +0,0 @@
-http://www.w3.org/2000/svg"; 
width="16" height="16">
\ No newline at end of file
diff --git a/images/arrow-down.svg b/images/arrow-down.svg
index 1988df1..21f6111 100644
--- a/images/arrow-down.svg
+++ b/images/arrow-down.svg
@@ -1,4 +1,4 @@
-
+
 http://www.w3.org/2000/svg"; width="12" height="12" viewBox="0 0 12 
12">

 
diff --git a/images/arrow-expanded.svg b/images/arrow-expanded.svg
deleted file mode 100644
index e744ec3..000
--- a/images/arrow-expanded.svg
+++ /dev/null
@@ -1 +0,0 @@
-http://www.w3.org/2000/svg"; 
width="16" height="16">
\ No newline at end of file
diff --git a/images/bullet-icon.svg b/images/bullet-icon.svg
index dede350..6705328 100644
--- a/images/bullet-icon.svg
+++ b/images/bullet-icon.svg
@@ -1,4 +1,4 @@
 
-http://www.w3.org/2000/svg"; version="1.1" width="5" height="13">
-
+http://www.w3.org/2000/svg"; width="5" height="13">
+   
 
diff --git a/images/external-link-ltr-icon.svg 
b/images/external-link-ltr-icon.svg
index 6d5677c..137638e 100644
--- a/images/external-link-ltr-icon.svg
+++ b/images/external-link-ltr-icon.svg
@@ -1 +1,6 @@
-http://www.w3.org/2000/svg"; width="12" height="12">
\ No newline at end of file
+
+http://www.w3.org/2000/svg"; width="12" height="12">
+   
+   
+   
+
diff --git a/images/external-link-rtl-icon.svg 
b/images/external-link-rtl-icon.svg
index e13eb2a..50ba28a 100644
--- a/images/external-link-rtl-icon.svg
+++ b/images/external-link-rtl-icon.svg
@@ -1 +1,6 @@
-http://www.w3.org/2000/svg"; width="12" height="12">
\ No newline at end of file
+
+http://www.w3.org/2000/svg"; width="12" height="12">
+   
+   
+   
+
diff --git a/images/search-ltr.svg b/images/search-ltr.svg
index 0720f20..1fa942e 100644
--- a/images/search-ltr.svg
+++ b/images/search-ltr.svg
@@ -1 +1,7 @@
-http://www.w3.org/2000/svg"; 
width="12" height="13">
\ No newline at end of file
+
+http://www.w3.org/2000/svg"; width="12" height="13">
+   
+   
+   
+   
+
diff --git a/images/search-rtl.svg b/images/search-rtl.svg
index 622d5f9..637493f 100644
--- a/images/search-rtl.svg
+++ b/images/search-rtl.svg
@@ -1 +1,7 @@
-http://www.w3.org/2000/svg"; 
width="12" height="13">
\ No newline at end of file
+
+http://www.w3.org/2000/svg"; width="12" height="13">
+   
+   
+   
+   
+
diff --git a/images/unwatch-icon-hl.svg b/images/unwatch-icon-hl.svg
index d52d547..c44d1e9 100644
--- a/images/unwatch-icon-hl.svg
+++ b/images/unwatch-icon-hl.svg
@@ -1 +1,12 @@
-http://www.w3.org/2000/svg"; 
xmlns:xlink="http://www.w3.org/1999/xlink"; width="16" 
height="16">
\ No newline at end of file
+
+http://www.w3.org/2000/svg"; width="16" height="16" 
xmlns:xlink="http://www.w3.org/1999/xlink";>
+   
+   
+   
+   
+   
+   
+   
+   
+   
+
diff --git a/images/unwatch-icon.svg b/images/unwatch-icon.svg
index cde7bc5..c7ae884 100644
--- a/images/unwatch-icon.svg
+++ b/images/unwatch-icon.svg
@@ -1 +1,12 @@
-http://www.w3.org/2000/svg"; 
xmlns:xlink="http://www.w3.org/1999/xlink"; width="16" 
height="16">
\ No newline at end of file
+
+http://www.w3.org/2000/svg"; width="16" height="16" 
xmlns:xlink="http://www.w3.org/1999/xlink";>
+   
+   
+   
+   
+   
+   
+   
+   
+   
+
di

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Add action/user tracking to link refresh jobs

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

Change subject: Add action/user tracking to link refresh jobs
..


Add action/user tracking to link refresh jobs

Change-Id: Ie7261eacddb869988b005ba2f17968df88c7003e
---
M includes/api/ApiPurge.php
M includes/deferred/DataUpdate.php
M includes/deferred/LinksUpdate.php
M includes/filerepo/file/LocalFile.php
M includes/jobqueue/jobs/RefreshLinksJob.php
M includes/page/WikiPage.php
6 files changed, 73 insertions(+), 11 deletions(-)

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



diff --git a/includes/api/ApiPurge.php b/includes/api/ApiPurge.php
index 35f93e0..4b8ce7f 100644
--- a/includes/api/ApiPurge.php
+++ b/includes/api/ApiPurge.php
@@ -93,6 +93,7 @@
$updates = 
$content->getSecondaryDataUpdates(
$title, null, 
$forceRecursiveLinkUpdate, $p_result );
foreach ( $updates as $update ) 
{
+   $update->setCause( 
'api-purge', $this->getUser()->getName() );

DeferredUpdates::addUpdate( $update, DeferredUpdates::PRESEND );
}
 
diff --git a/includes/deferred/DataUpdate.php b/includes/deferred/DataUpdate.php
index d2d8bd7..ed9a746 100644
--- a/includes/deferred/DataUpdate.php
+++ b/includes/deferred/DataUpdate.php
@@ -28,6 +28,10 @@
 abstract class DataUpdate implements DeferrableUpdate {
/** @var mixed Result from LBFactory::getEmptyTransactionTicket() */
protected $ticket;
+   /** @var string Short update cause action description */
+   protected $causeAction = 'unknown';
+   /** @var string Short update cause user description */
+   protected $causeAgent = 'unknown';
 
public function __construct() {
// noop
@@ -42,6 +46,29 @@
}
 
/**
+* @param string $action Action type
+* @param string $user User name
+*/
+   public function setCause( $action, $user ) {
+   $this->causeAction = $action;
+   $this->causeAgent = $user;
+   }
+
+   /**
+* @return string
+*/
+   public function getCauseAction() {
+   return $this->causeAction;
+   }
+
+   /**
+* @return string
+*/
+   public function getCauseAgent() {
+   return $this->causeAgent;
+   }
+
+   /**
 * Convenience method, calls doUpdate() on every DataUpdate in the 
array.
 *
 * @param DataUpdate[] $updates A list of DataUpdate instances
diff --git a/includes/deferred/LinksUpdate.php 
b/includes/deferred/LinksUpdate.php
index dfe89ba..c27826d 100644
--- a/includes/deferred/LinksUpdate.php
+++ b/includes/deferred/LinksUpdate.php
@@ -306,10 +306,13 @@
 * using the job queue.
 */
protected function queueRecursiveJobs() {
-   self::queueRecursiveJobsForTable( $this->mTitle, 
'templatelinks' );
+   $action = $this->getCauseAction();
+   $agent = $this->getCauseAgent();
+
+   self::queueRecursiveJobsForTable( $this->mTitle, 
'templatelinks', $action, $agent );
if ( $this->mTitle->getNamespace() == NS_FILE ) {
// Process imagelinks in case the title is or was a 
redirect
-   self::queueRecursiveJobsForTable( $this->mTitle, 
'imagelinks' );
+   self::queueRecursiveJobsForTable( $this->mTitle, 
'imagelinks', $action, $agent );
}
 
$bc = $this->mTitle->getBacklinkCache();
@@ -320,7 +323,13 @@
// Which ever runs first generally no-ops the other one.
$jobs = [];
foreach ( $bc->getCascadeProtectedLinks() as $title ) {
-   $jobs[] = RefreshLinksJob::newPrioritized( $title, [] );
+   $jobs[] = RefreshLinksJob::newPrioritized(
+   $title,
+   [
+   'causeAction' => $action,
+   'causeAgent' => $agent
+   ]
+   );
}
JobQueueGroup::singleton()->push( $jobs );
}
@@ -330,8 +339,12 @@
 *
 * @param Title $title Title to do job for
 * @param string $table Table to use (e.g. 'templatelinks')
+* @param string $action Triggering action
+* @param string $userName Triggering user name
 */
-   public static function queueRecursiveJobsForTable( Title $title, $table 
) {
+   public static function queueRecursiveJobsForTable(
+

[MediaWiki-commits] [Gerrit] mediawiki...deploy[master]: Bump src/ to 8e99708a + upgrade domino

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

Change subject: Bump src/ to 8e99708a + upgrade domino
..


Bump src/ to 8e99708a + upgrade domino

Change-Id: Ie1e5b5c6faccec6630edcf962cb9300421d86478
---
D node_modules/domino/.npmignore
M node_modules/domino/.travis.yml
M node_modules/domino/CHANGELOG.md
M node_modules/domino/lib/Node.js
M node_modules/domino/lib/URLUtils.js
M node_modules/domino/lib/htmlelts.js
M node_modules/domino/package.json
D node_modules/domino/test/.npmignore
A node_modules/domino/tools/bump-version.js
A node_modules/domino/tools/update-changelog.js
M src
11 files changed, 93 insertions(+), 42 deletions(-)

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



diff --git a/node_modules/domino/.npmignore b/node_modules/domino/.npmignore
deleted file mode 100644
index dd9d743..000
--- a/node_modules/domino/.npmignore
+++ /dev/null
@@ -1,4 +0,0 @@
-.DS_Store
-node_modules
-npm-debug.log
-v8.log
diff --git a/node_modules/domino/.travis.yml b/node_modules/domino/.travis.yml
index 9563d77..b4fa8e8 100644
--- a/node_modules/domino/.travis.yml
+++ b/node_modules/domino/.travis.yml
@@ -3,7 +3,12 @@
   - 0.8
   - 0.10
   - 0.12
-  - "stable"
+  - "4"
+  - "6"
+  - "8"
+  # From the nvm docs, "this installs the latest version of node".
+  - "node"
+
 before_install:
   - NODE_VERSION=$(node -e 'console.log(process.version.replace(/[.][0-9]+$/, 
""))')
   - if [ "v0.8" = "$NODE_VERSION" ]; then npm install -g npm@2.7.3 ; fi
diff --git a/node_modules/domino/CHANGELOG.md b/node_modules/domino/CHANGELOG.md
index bacc645..5892cc8 100644
--- a/node_modules/domino/CHANGELOG.md
+++ b/node_modules/domino/CHANGELOG.md
@@ -1,3 +1,8 @@
+# domino 1.0.30 (24 Oct 2017)
+* Fix regexp capitalization in URLUtils (#101)
+* Fix O(N^2) slowdown in initial tree traversal using nextSibling/prevSibling
+* Update `mocha` dependency to 4.0.x and `should` to 13.1.x.
+
 # domino 1.0.29 ( 7 Aug 2017)
 * Fix "#id" optimization in querySelectorAll() when 0 or 2 matches for
   `id`. (#99)
diff --git a/node_modules/domino/lib/Node.js b/node_modules/domino/lib/Node.js
index 18c4ae4..e25543f 100644
--- a/node_modules/domino/lib/Node.js
+++ b/node_modules/domino/lib/Node.js
@@ -484,8 +484,13 @@
 utils.assert(this.parentNode);
 var kids = this.parentNode.childNodes;
 if (this._index === undefined || kids[this._index] !== this) {
-  this._index = kids.indexOf(this);
-  utils.assert(this._index !== -1);
+  // Ensure that we don't have an O(N^2) blowup if none of the
+  // kids have defined indices yet and we're traversing via
+  // nextSibling or prevSibling
+  for (var i=0; i 0) {
 url.scheme = v;
 output = url.toString();
@@ -128,7 +128,7 @@
 var output = this.href;
 var url = new URL(output);
 if (url.isAbsolute() && url.isAuthorityBased()) {
-  v = v.replace(/[^-+\._~!$&'()*,;:=a-zA-z0-9]/g, URL.percentEncode);
+  v = v.replace(/[^-+\._~!$&'()*,;:=a-zA-Z0-9]/g, URL.percentEncode);
   if (v.length > 0) {
 url.host = v;
 delete url.port;
@@ -143,7 +143,7 @@
 var url = new URL(output);
 if (url.isAbsolute() && url.isAuthorityBased()) {
   v = v.replace(/^\/+/, "");
-  v = v.replace(/[^-+\._~!$&'()*,;:=a-zA-z0-9]/g, URL.percentEncode);
+  v = v.replace(/[^-+\._~!$&'()*,;:=a-zA-Z0-9]/g, URL.percentEncode);
   if (v.length > 0) {
 url.host = v;
 output = url.toString();
@@ -174,7 +174,7 @@
 if (url.isAbsolute() && url.isHierarchical()) {
   if (v.charAt(0) !== "/")
 v = "/" + v;
-  v = v.replace(/[^-+\._~!$&'()*,;:=@\/a-zA-z0-9]/g, URL.percentEncode);
+  v = v.replace(/[^-+\._~!$&'()*,;:=@\/a-zA-Z0-9]/g, URL.percentEncode);
   url.path = v;
   output = url.toString();
 }
@@ -186,7 +186,7 @@
 var url = new URL(output);
 if (url.isAbsolute() && url.isHierarchical()) {
   if (v.charAt(0) === "?") v = v.substring(1);
-  v = v.replace(/[^-+\._~!$&'()*,;:=@\/?a-zA-z0-9]/g, URL.percentEncode);
+  v = v.replace(/[^-+\._~!$&'()*,;:=@\/?a-zA-Z0-9]/g, URL.percentEncode);
   url.query = v;
   output = url.toString();
 }
@@ -198,7 +198,7 @@
 var url = new URL(output);
 if (url.isAbsolute()) {
   if (v.charAt(0) === "#") v = v.substring(1);
-  v = v.replace(/[^-+\._~!$&'()*,;:=@\/?a-zA-z0-9]/g, URL.percentEncode);
+  v = v.replace(/[^-+\._~!$&'()*,;:=@\/?a-zA-Z0-9]/g, URL.percentEncode);
   url.fragment = v;
   output = url.toString();
 }
diff --git a/node_modules/domino/lib/htmlelts.js 
b/node_modules/domino/lib/htmlelts.js
index b4ff0ad..d499b5e 100644
--- a/node_modules/domino/lib/htmlelts.js
+++ b/node_modules/domino/lib/htmlelts.js
@@ -65,6 +65,11 @@
   "SELECT":true, "TEXTAREA":true, "COMMAND":true
 };
 
+var HTMLFormElement = function(doc, localName, prefix

[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Fixing interwiki sort order for Northern Sami

2017-10-24 Thread Code Review
Jon Harald Søby has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/386324 )

Change subject: Fixing interwiki sort order for Northern Sami
..

Fixing interwiki sort order for Northern Sami

Since the native language name for Northern Sami was changed
from "Sámegiella" to "Davvisámegiella" in T156589, the interwiki
sort order should also be updated to reflect this.

Bug: T178965
Change-Id: Idea9c545b475e097b3ae8f16066bed4d7a71fde2
---
M wmf-config/InterwikiSortOrders.php
1 file changed, 8 insertions(+), 8 deletions(-)


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

diff --git a/wmf-config/InterwikiSortOrders.php 
b/wmf-config/InterwikiSortOrders.php
index e5df248..9153fd0 100644
--- a/wmf-config/InterwikiSortOrders.php
+++ b/wmf-config/InterwikiSortOrders.php
@@ -6,7 +6,7 @@
'roa-rup', 'frp', 'as', 'ast', 'atj', 'gn', 'av', 'ay', 'az', 
'azb', 'bm', 'bn', 'bjn',
'zh-min-nan', 'nan', 'map-bms', 'ba', 'be', 'be-x-old', 'bh', 
'bcl', 'bi',
'bg', 'bar', 'bo', 'bs', 'br', 'bxr', 'ca', 'cv', 'ceb', 'cs', 
'ch',
-   'cbk-zam', 'ny', 'sn', 'tum', 'cho', 'co', 'cy', 'da', 'dk', 
'pdc', 'de',
+   'cbk-zam', 'ny', 'sn', 'tum', 'cho', 'co', 'cy', 'da', 'dk', 
'se', 'pdc', 'de',
'dv', 'nv', 'dsb', 'dz', 'mh', 'et', 'el', 'eml', 'en', 'myv', 
'es', 'eo',
'ext', 'eu', 'ee', 'fa', 'hif', 'fo', 'fr', 'fy', 'ff', 'fur', 
'ga', 'gv',
'gag', 'gd', 'gl', 'gan', 'ki', 'glk', 'gu', 'got', 'gom', 
'hak', 'xal', 'ko',
@@ -21,7 +21,7 @@
'mhr', 'or', 'om', 'ng', 'hz', 'uz', 'pa', 'pi', 'pfl', 'pag', 
'pnb', 'pap', 'ps',
'jam', 'koi', 'km', 'pcd', 'pms', 'tpi', 'nds', 'pl', 
'tokipona', 'tp', 'pnt', 'pt',
'aa', 'kaa', 'crh', 'ty', 'ksh', 'ro', 'rmy', 'rm', 'qu', 
'rue', 'ru', 'sah',
-   'se', 'sm', 'sa', 'sg', 'sc', 'sco', 'stq', 'st', 'nso', 'tn', 
'sq', 'scn',
+   'sm', 'sa', 'sg', 'sc', 'sco', 'stq', 'st', 'nso', 'tn', 'sq', 
'scn',
'si', 'simple', 'sd', 'ss', 'sk', 'sl', 'cu', 'szl', 'so', 
'ckb', 'srn', 'sr',
'sh', 'su', 'fi', 'sv', 'tl', 'ta', 'shi', 'kab', 'roa-tara', 
'tt', 'te', 'tet',
'th', 'ti', 'tg', 'to', 'chr', 'chy', 've', 'tcy', 'tr', 'tk', 
'tw', 'tyv', 'din', 'udm', 'bug',
@@ -34,7 +34,7 @@
'frp', 'as', 'ast', 'atj', 'gn', 'av', 'ay', 'az', 'azb', 
'bjn', 'id', 'ms', 'bm', 'bn',
'zh-min-nan', 'nan', 'map-bms', 'jv', 'su', 'ba', 'min', 'be', 
'be-x-old', 'bh',
'bcl', 'bi', 'bar', 'bo', 'bs', 'br', 'bug', 'bg', 'bxr', 'ca', 
'ceb', 'cv', 'cs',
-   'ch', 'cbk-zam', 'ny', 'sn', 'tum', 'cho', 'co', 'cy', 'da', 
'dk', 'pdc', 'de',
+   'ch', 'cbk-zam', 'ny', 'sn', 'tum', 'cho', 'co', 'cy', 'da', 
'dk', 'se', 'pdc', 'de',
'dv', 'nv', 'dsb', 'na', 'dz', 'mh', 'et', 'el', 'eml', 'en', 
'myv', 'es', 'eo',
'ext', 'eu', 'ee', 'fa', 'hif', 'fo', 'fr', 'fy', 'ff', 'fur', 
'ga', 'gv', 'sm',
'gag', 'gd', 'gl', 'gan', 'ki', 'glk', 'gu', 'got', 'gom', 
'hak', 'xal', 'ko',
@@ -48,7 +48,7 @@
'nb', 'nn', 'nrm', 'nov', 'ii', 'oc', 'mhr', 'or', 'om', 'ng', 
'hz', 'uz', 'pa',
'pi', 'pfl', 'pag', 'pnb', 'pap', 'ps', 'jam', 'km', 'pcd', 
'pms', 'nds', 'pl', 'pnt',
'pt', 'aa', 'kaa', 'crh', 'ty', 'ksh', 'ro', 'rmy', 'rm', 'qu', 
'ru', 'rue', 'sah',
-   'se', 'sa', 'sg', 'sc', 'sco', 'stq', 'st', 'nso', 'tn', 'sq', 
'scn', 'si',
+   'sa', 'sg', 'sc', 'sco', 'stq', 'st', 'nso', 'tn', 'sq', 'scn', 
'si',
'simple', 'sd', 'ss', 'sk', 'sl', 'cu', 'szl', 'so', 'ckb', 
'srn', 'sr', 'sh',
'fi', 'sv', 'tl', 'ta', 'shi', 'kab', 'roa-tara', 'tt', 'te', 
'tet', 'din', 'th', 'vi',
'ti', 'tg', 'tpi', 'tokipona', 'tp', 'chr', 'chy', 've', 'tcy', 
'tr', 'tk', 'tw',
@@ -62,7 +62,7 @@
'ms', 'bg', 'bm', 'zh-min-nan', 'nan', 'map-bms', 'jv', 'su', 
'ba', 'be',
'be-x-old', 'bh', 'bcl', 'bi', 'bn', 'bo', 'bar', 'bs', 'bpy', 
'br', 'bug',
'bxr', 'ca', 'ceb', 'ch', 'cbk-zam', 'sn', 'tum', 'ny', 'cho', 
'chr', 'co',
-   'cy', 'cv', 'cs', 'da', 'dk', 'pdc', 'de', 'nv', 'dsb', 'na', 
'dv', 'dz',
+   'cy', 'cv', 'cs', 'da', 'dk', 'se', 'pdc', 'de', 'nv', 'dsb', 
'na', 'dv', 'dz',
'mh', 'et', 'el', 'eml', 'en', 'myv', 'es', 'eo', 'ext', 'eu', 
'ee', 'fa',
'hif', 'fo', 'fr', 'fy', 'ff', 'fur', 'ga', 'gv', 'sm', 'gag', 
'gd', 'gl',
'gan', 'ki', 'glk', 'got', 'gom', 'gu', 'ha', 'hak', 'xal', 
'haw', 'he',
@@ -76,7 +76,7 @@
'frr', 'pih', 'no', 'nb', 'nn', 'nrm', 'nov', 'oc', 'mhr', 
'or', 'om', 'ng',
'hz', 'uz', 'pa', 

[MediaWiki-commits] [Gerrit] analytics...WDCM[master]: Semantics - t-SNE Maps

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

Change subject: Semantics - t-SNE Maps
..


Semantics - t-SNE Maps

Change-Id: I9d3c5ec541ceb4fd7041dfed75907b5de8398843
---
M WDCM_OverviewDashboard/ui.R
M WDCM_SemanticsDashboard/server.R
M WDCM_SemanticsDashboard/ui.R
M WDCM_ShinyServerFrontPage/wdcm_ShinyFront.html
M WDCM_TechDocumentation/WikidataConcepts_TechDocumentation.odt
M WDCM_UsageDashboard/server.R
M WDCM_UsageDashboard/ui.R
7 files changed, 277 insertions(+), 182 deletions(-)

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



diff --git a/WDCM_OverviewDashboard/ui.R b/WDCM_OverviewDashboard/ui.R
index 25b0bdb..7ae997d 100644
--- a/WDCM_OverviewDashboard/ui.R
+++ b/WDCM_OverviewDashboard/ui.R
@@ -4,7 +4,7 @@
 ### ---
 
 ### --- Setup
-rm(list=ls())
+rm(list = ls())
 ### --- general
 library(shiny)
 library(shinydashboard)
@@ -238,7 +238,9 @@

N.B. The current Wikidata item usage statistic definition is 
the count of the number of pages in a particular client project
where the respective 
Wikidata item is used. Thus, the current definition ignores the usage 
aspects completely. This definition is motivated by the currently 
-   present constraints in 
Wikidata usage tracking across the client projects. With more mature Wikidata 
usage tracking systems, the definition will become a subject 
+   present constraints in 
Wikidata usage tracking across the client projects 
+   (see https://www.mediawiki.org/wiki/Wikibase/Schema/wbc_entity_usage"; target = 
"_blank">Wikibase/Schema/wbc entity usage). 
+   With more mature Wikidata 
usage tracking systems, the definition will become a subject 
of change. The term 
Wikidata usage volume is reserved for total Wikidata usage (i.e. the sum 
of usage statistics) in a particular 
client project, group of 
client projects, or semantic categories. By a Wikidata semantic category 
we mean a selection of Wikidata items that is 
that is operationally 
defined by a respective SPARQL query returning a selection of items that 
intuitivelly match a human, natural semantic category. 
@@ -247,7 +249,10 @@
categories in WDCM is not 
necessarily exhaustive (i.e. they do not necessarily cover all Wikidata items), 
neither the categories are necessarily 
mutually exclusive. The 
Wikidata ontology is very complex and a product of work of many people, so 
there is an optimization price to be paid in every attempt to 
adapt or simplify its 
present structure to the needs of a statistical analytical system such as WDCM. 
The current set of WDCM semantic categories is thus not 
-   normative in any sense and 
a subject  of change in any moment, depending upon the analytical needs of the 
community.
+   normative in any sense and 
can become a subject of change in any moment, depending upon the analytical 
needs of the community.
+   The 
currently used WDCM Taxonomy of Wikidata items encompasses the following 
14 semantic categories: Geographical Object, Organization, 
Architectural Structure, 
+   Human, 
Wikimedia, Work of Art, Book, Gene, Scientific 
Article, Chemical Entities, Astronomical Object, 
Thoroughfare, Event, 
+   and Taxon.

Wikidata Usage 
Overview

@@ -258,10 +263,10 @@
of the client project 
pairwise Euclidean distances derived from the Projects x Categories contingency 
table. Given that the original higher-dimensional space 
from which the 2D map is 
derived is rather constrained by the choice of a small number of semantic 
categories, the similarity mapping is somewhat 
imprecise and should be 
taken as an attempt at an approximate big picture of the cl

[MediaWiki-commits] [Gerrit] analytics...WDCM[master]: Semantics - t-SNE Maps

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

Change subject: Semantics - t-SNE Maps
..

Semantics - t-SNE Maps

Change-Id: I9d3c5ec541ceb4fd7041dfed75907b5de8398843
---
M WDCM_OverviewDashboard/ui.R
M WDCM_SemanticsDashboard/server.R
M WDCM_SemanticsDashboard/ui.R
M WDCM_ShinyServerFrontPage/wdcm_ShinyFront.html
M WDCM_TechDocumentation/WikidataConcepts_TechDocumentation.odt
M WDCM_UsageDashboard/server.R
M WDCM_UsageDashboard/ui.R
7 files changed, 277 insertions(+), 182 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/analytics/wmde/WDCM 
refs/changes/23/386323/1

diff --git a/WDCM_OverviewDashboard/ui.R b/WDCM_OverviewDashboard/ui.R
index 25b0bdb..7ae997d 100644
--- a/WDCM_OverviewDashboard/ui.R
+++ b/WDCM_OverviewDashboard/ui.R
@@ -4,7 +4,7 @@
 ### ---
 
 ### --- Setup
-rm(list=ls())
+rm(list = ls())
 ### --- general
 library(shiny)
 library(shinydashboard)
@@ -238,7 +238,9 @@

N.B. The current Wikidata item usage statistic definition is 
the count of the number of pages in a particular client project
where the respective 
Wikidata item is used. Thus, the current definition ignores the usage 
aspects completely. This definition is motivated by the currently 
-   present constraints in 
Wikidata usage tracking across the client projects. With more mature Wikidata 
usage tracking systems, the definition will become a subject 
+   present constraints in 
Wikidata usage tracking across the client projects 
+   (see https://www.mediawiki.org/wiki/Wikibase/Schema/wbc_entity_usage"; target = 
"_blank">Wikibase/Schema/wbc entity usage). 
+   With more mature Wikidata 
usage tracking systems, the definition will become a subject 
of change. The term 
Wikidata usage volume is reserved for total Wikidata usage (i.e. the sum 
of usage statistics) in a particular 
client project, group of 
client projects, or semantic categories. By a Wikidata semantic category 
we mean a selection of Wikidata items that is 
that is operationally 
defined by a respective SPARQL query returning a selection of items that 
intuitivelly match a human, natural semantic category. 
@@ -247,7 +249,10 @@
categories in WDCM is not 
necessarily exhaustive (i.e. they do not necessarily cover all Wikidata items), 
neither the categories are necessarily 
mutually exclusive. The 
Wikidata ontology is very complex and a product of work of many people, so 
there is an optimization price to be paid in every attempt to 
adapt or simplify its 
present structure to the needs of a statistical analytical system such as WDCM. 
The current set of WDCM semantic categories is thus not 
-   normative in any sense and 
a subject  of change in any moment, depending upon the analytical needs of the 
community.
+   normative in any sense and 
can become a subject of change in any moment, depending upon the analytical 
needs of the community.
+   The 
currently used WDCM Taxonomy of Wikidata items encompasses the following 
14 semantic categories: Geographical Object, Organization, 
Architectural Structure, 
+   Human, 
Wikimedia, Work of Art, Book, Gene, Scientific 
Article, Chemical Entities, Astronomical Object, 
Thoroughfare, Event, 
+   and Taxon.

Wikidata Usage 
Overview

@@ -258,10 +263,10 @@
of the client project 
pairwise Euclidean distances derived from the Projects x Categories contingency 
table. Given that the original higher-dimensional space 
from which the 2D map is 
derived is rather constrained by the choice of a small number of semantic 
categories, the similarity mapping is somewhat 
imprecise and should be 
taken as an attempt at an approximate big pictu

[MediaWiki-commits] [Gerrit] mediawiki...deploy[master]: Bump src/ to 8e99708a + upgrade domino

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

Change subject: Bump src/ to 8e99708a + upgrade domino
..

Bump src/ to 8e99708a + upgrade domino

Change-Id: Ie1e5b5c6faccec6630edcf962cb9300421d86478
---
D node_modules/domino/.npmignore
M node_modules/domino/.travis.yml
M node_modules/domino/CHANGELOG.md
M node_modules/domino/lib/Node.js
M node_modules/domino/lib/URLUtils.js
M node_modules/domino/lib/htmlelts.js
M node_modules/domino/package.json
D node_modules/domino/test/.npmignore
A node_modules/domino/tools/bump-version.js
A node_modules/domino/tools/update-changelog.js
M src
11 files changed, 93 insertions(+), 42 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid/deploy 
refs/changes/22/386322/1

diff --git a/node_modules/domino/.npmignore b/node_modules/domino/.npmignore
deleted file mode 100644
index dd9d743..000
--- a/node_modules/domino/.npmignore
+++ /dev/null
@@ -1,4 +0,0 @@
-.DS_Store
-node_modules
-npm-debug.log
-v8.log
diff --git a/node_modules/domino/.travis.yml b/node_modules/domino/.travis.yml
index 9563d77..b4fa8e8 100644
--- a/node_modules/domino/.travis.yml
+++ b/node_modules/domino/.travis.yml
@@ -3,7 +3,12 @@
   - 0.8
   - 0.10
   - 0.12
-  - "stable"
+  - "4"
+  - "6"
+  - "8"
+  # From the nvm docs, "this installs the latest version of node".
+  - "node"
+
 before_install:
   - NODE_VERSION=$(node -e 'console.log(process.version.replace(/[.][0-9]+$/, 
""))')
   - if [ "v0.8" = "$NODE_VERSION" ]; then npm install -g npm@2.7.3 ; fi
diff --git a/node_modules/domino/CHANGELOG.md b/node_modules/domino/CHANGELOG.md
index bacc645..5892cc8 100644
--- a/node_modules/domino/CHANGELOG.md
+++ b/node_modules/domino/CHANGELOG.md
@@ -1,3 +1,8 @@
+# domino 1.0.30 (24 Oct 2017)
+* Fix regexp capitalization in URLUtils (#101)
+* Fix O(N^2) slowdown in initial tree traversal using nextSibling/prevSibling
+* Update `mocha` dependency to 4.0.x and `should` to 13.1.x.
+
 # domino 1.0.29 ( 7 Aug 2017)
 * Fix "#id" optimization in querySelectorAll() when 0 or 2 matches for
   `id`. (#99)
diff --git a/node_modules/domino/lib/Node.js b/node_modules/domino/lib/Node.js
index 18c4ae4..e25543f 100644
--- a/node_modules/domino/lib/Node.js
+++ b/node_modules/domino/lib/Node.js
@@ -484,8 +484,13 @@
 utils.assert(this.parentNode);
 var kids = this.parentNode.childNodes;
 if (this._index === undefined || kids[this._index] !== this) {
-  this._index = kids.indexOf(this);
-  utils.assert(this._index !== -1);
+  // Ensure that we don't have an O(N^2) blowup if none of the
+  // kids have defined indices yet and we're traversing via
+  // nextSibling or prevSibling
+  for (var i=0; i 0) {
 url.scheme = v;
 output = url.toString();
@@ -128,7 +128,7 @@
 var output = this.href;
 var url = new URL(output);
 if (url.isAbsolute() && url.isAuthorityBased()) {
-  v = v.replace(/[^-+\._~!$&'()*,;:=a-zA-z0-9]/g, URL.percentEncode);
+  v = v.replace(/[^-+\._~!$&'()*,;:=a-zA-Z0-9]/g, URL.percentEncode);
   if (v.length > 0) {
 url.host = v;
 delete url.port;
@@ -143,7 +143,7 @@
 var url = new URL(output);
 if (url.isAbsolute() && url.isAuthorityBased()) {
   v = v.replace(/^\/+/, "");
-  v = v.replace(/[^-+\._~!$&'()*,;:=a-zA-z0-9]/g, URL.percentEncode);
+  v = v.replace(/[^-+\._~!$&'()*,;:=a-zA-Z0-9]/g, URL.percentEncode);
   if (v.length > 0) {
 url.host = v;
 output = url.toString();
@@ -174,7 +174,7 @@
 if (url.isAbsolute() && url.isHierarchical()) {
   if (v.charAt(0) !== "/")
 v = "/" + v;
-  v = v.replace(/[^-+\._~!$&'()*,;:=@\/a-zA-z0-9]/g, URL.percentEncode);
+  v = v.replace(/[^-+\._~!$&'()*,;:=@\/a-zA-Z0-9]/g, URL.percentEncode);
   url.path = v;
   output = url.toString();
 }
@@ -186,7 +186,7 @@
 var url = new URL(output);
 if (url.isAbsolute() && url.isHierarchical()) {
   if (v.charAt(0) === "?") v = v.substring(1);
-  v = v.replace(/[^-+\._~!$&'()*,;:=@\/?a-zA-z0-9]/g, URL.percentEncode);
+  v = v.replace(/[^-+\._~!$&'()*,;:=@\/?a-zA-Z0-9]/g, URL.percentEncode);
   url.query = v;
   output = url.toString();
 }
@@ -198,7 +198,7 @@
 var url = new URL(output);
 if (url.isAbsolute()) {
   if (v.charAt(0) === "#") v = v.substring(1);
-  v = v.replace(/[^-+\._~!$&'()*,;:=@\/?a-zA-z0-9]/g, URL.percentEncode);
+  v = v.replace(/[^-+\._~!$&'()*,;:=@\/?a-zA-Z0-9]/g, URL.percentEncode);
   url.fragment = v;
   output = url.toString();
 }
diff --git a/node_modules/domino/lib/htmlelts.js 
b/node_modules/domino/lib/htmlelts.js
index b4ff0ad..d499b5e 100644
--- a/node_modules/domino/lib/htmlelts.js
+++ b/node_modules/domino/lib/htmlelts.js
@@ -65,6 +65,11 @@
   "SELECT":true, "TEXTAREA":true, "COMMAND":true
 };
 
+var HTMLFormElement = function(doc, localName

[MediaWiki-commits] [Gerrit] mediawiki...QuickSurveys[master]: tests: Replace QUnit.expect with assert.expect

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

Change subject: tests: Replace QUnit.expect with assert.expect
..


tests: Replace QUnit.expect with assert.expect

Change-Id: Ie786f3cd3faf0182c3964fac7de5000847b6ea07
---
M tests/qunit/ext.quicksurveys.lib/test_lib.js
1 file changed, 5 insertions(+), 5 deletions(-)

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



diff --git a/tests/qunit/ext.quicksurveys.lib/test_lib.js 
b/tests/qunit/ext.quicksurveys.lib/test_lib.js
index bef8312..b777e14 100644
--- a/tests/qunit/ext.quicksurveys.lib/test_lib.js
+++ b/tests/qunit/ext.quicksurveys.lib/test_lib.js
@@ -12,7 +12,7 @@
}
} );
 
-   QUnit.test( 'showSurvey: Placement (infobox)', 3, function ( assert ) {
+   QUnit.test( 'showSurvey: Placement (infobox)', function ( assert ) {
var minervaTemplate = mw.template.get( 
'ext.quicksurveys.lib.tests', 'minerva-1.html' ),
$locationVector = mw.template.get( 
'ext.quicksurveys.lib.tests', 'vector-1.html' ).render(),
$locationMinerva = minervaTemplate.render(),
@@ -30,7 +30,7 @@
'Check on mobile page it is inserted in correct place 
(before infobox)' );
} );
 
-   QUnit.test( 'showSurvey: Placement (image)', 3, function ( assert ) {
+   QUnit.test( 'showSurvey: Placement (image)', function ( assert ) {
var template = mw.template.get( 'ext.quicksurveys.lib.tests', 
'minerva-2.html' ),
$locationVector = mw.template.get( 
'ext.quicksurveys.lib.tests', 'vector-2.html' ).render(),
$locationMinerva = template.render(),
@@ -49,7 +49,7 @@
'Check it is inserted in correct place (before image)' 
);
} );
 
-   QUnit.test( 'showSurvey: Placement (no headings)', 6, function ( assert 
) {
+   QUnit.test( 'showSurvey: Placement (no headings)', function ( assert ) {
var template = mw.template.get( 'ext.quicksurveys.lib.tests', 
'minerva-3.html' ),
$locationVector = mw.template.get( 
'ext.quicksurveys.lib.tests', 'vector-3.html' ).render(),
$locationMinerva = template.render(),
@@ -126,10 +126,10 @@
assert.ok( qSurveys.surveyMatchesPlatform( { platforms: 
test[0] }, 'stable' ) === test[2] );
assert.ok( qSurveys.surveyMatchesPlatform( { platforms: 
test[0] }, 'beta' ) === test[3] );
} );
-   QUnit.expect( testCases.length * 3 );
+   assert.expect( testCases.length * 3 );
} );
 
-   QUnit.test( 'showSurvey: Placement (plain)', 3, function ( assert ) {
+   QUnit.test( 'showSurvey: Placement (plain)', function ( assert ) {
var template = mw.template.get( 'ext.quicksurveys.lib.tests', 
'minerva-4.html' ),
$locationVector = mw.template.get( 
'ext.quicksurveys.lib.tests', 'vector-4.html' ).render(),
$locationMinerva = template.render(),

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie786f3cd3faf0182c3964fac7de5000847b6ea07
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/QuickSurveys
Gerrit-Branch: master
Gerrit-Owner: 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] search/MjoLniR[master]: Delete training output dir if empty on exception

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

Change subject: Delete training output dir if empty on exception
..

Delete training output dir if empty on exception

It's a bit annoying to have to manually delete this directory
if some error happens when running the first training. Delete
it when an exception is thrown and it's still empty.

Change-Id: I1e425fc7b809a8c5e7cdb6ce2f0a1c8744a2c7b5
---
M mjolnir/cli/training_pipeline.py
1 file changed, 20 insertions(+), 11 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/search/MjoLniR 
refs/changes/20/386320/1

diff --git a/mjolnir/cli/training_pipeline.py b/mjolnir/cli/training_pipeline.py
index dc32bd7..0e9ae75 100644
--- a/mjolnir/cli/training_pipeline.py
+++ b/mjolnir/cli/training_pipeline.py
@@ -11,6 +11,7 @@
 
 from __future__ import absolute_import
 import argparse
+import glob
 import logging
 import mjolnir.training.xgboost
 import os
@@ -23,16 +24,6 @@
 
 def main(sc, sqlContext, input_dir, output_dir, wikis, initial_num_trees, 
final_num_trees,
  num_workers, num_cv_jobs, num_folds, test_dir, zero_features):
-
-if os.path.exists(output_dir):
-logging.error('Output directory (%s) already exists' % (output_dir))
-sys.exit(1)
-
-# Maybe this is a bit early to create the path ... but should be fine.
-# The annoyance might be that an error in training requires deleting
-# this directory to try again.
-os.mkdir(output_dir)
-
 for wiki in wikis:
 print 'Training wiki: %s' % (wiki)
 df_hits_with_features = (
@@ -174,4 +165,22 @@
 sc = SparkContext(appName="MLR: training pipeline")
 sc.setLogLevel('WARN')
 sqlContext = HiveContext(sc)
-main(sc, sqlContext, **args)
+
+output_dir = args['output_dir']
+if os.path.exists(output_dir):
+logging.error('Output directory (%s) already exists' % (output_dir))
+sys.exit(1)
+
+# Maybe this is a bit early to create the path ... but should be fine.
+# The annoyance might be that an error in training requires deleting
+# this directory to try again.
+os.mkdir(output_dir)
+
+try:
+main(sc, sqlContext, **args)
+except:
+# If the directory we created is still empty delete it
+# so it doesn't need to be manually re-created
+if not len(glob.glob(os.path.join(output_dir, '*'))):
+os.rmdir(output_dir)
+raise

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1e425fc7b809a8c5e7cdb6ce2f0a1c8744a2c7b5
Gerrit-PatchSet: 1
Gerrit-Project: search/MjoLniR
Gerrit-Branch: master
Gerrit-Owner: EBernhardson 

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


[MediaWiki-commits] [Gerrit] search/MjoLniR[master]: Add additional metadata to training output

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

Change subject: Add additional metadata to training output
..

Add additional metadata to training output

For privacy reasons we need to delete the training data
within a reasonably short time period after training has
occured. To allow comparing newly trained models to previous
rounds of training add some more metadata to the training
output, which can be kept indefinately.

Change-Id: I49ee7df4a2b81ed0075d031c49d6c2955a446bff
---
M mjolnir/cirrus.py
M mjolnir/cli/training_pipeline.py
M mjolnir/feature_engineering.py
3 files changed, 47 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/search/MjoLniR 
refs/changes/21/386321/1

diff --git a/mjolnir/cirrus.py b/mjolnir/cirrus.py
index 860991a..78d3ccc 100644
--- a/mjolnir/cirrus.py
+++ b/mjolnir/cirrus.py
@@ -68,7 +68,7 @@
 for stats in res['nodes'].values():
 if stats['os']['cpu']['percent'] > 10:
 busy_nodes += 1
-except:
+except:  # noqa: E722
 failed.append(parsed.netloc)
 #  Host depooled/unavailable? No big deal check another.
 pass
diff --git a/mjolnir/cli/training_pipeline.py b/mjolnir/cli/training_pipeline.py
index 0e9ae75..0539858 100644
--- a/mjolnir/cli/training_pipeline.py
+++ b/mjolnir/cli/training_pipeline.py
@@ -11,8 +11,11 @@
 
 from __future__ import absolute_import
 import argparse
+import collections
+import datetime
 import glob
 import logging
+import mjolnir.feature_engineering
 import mjolnir.training.xgboost
 import os
 import pickle
@@ -20,6 +23,31 @@
 from pyspark import SparkContext
 from pyspark.sql import HiveContext
 from pyspark.sql import functions as F
+
+
+def summarize_training_df(df, data_size):
+"""Generate a summary of min/max/stddev/mean of data frame
+
+Parameters
+--
+df : pyspark.sql.DataFrame
+DataFrame used for training
+data_size : int
+Number of rows in df
+
+Returns
+---
+dict
+Map from field name to a map of statistics about the field
+"""
+if data_size > 1000:
+df = df.repartition(200)
+summary = collections.defaultdict(dict)
+for row in 
mjolnir.feature_engineering.explode_features(df.describe().collect()):
+statistic = row.summary
+for field, value in (x for x in row.asDict().items() if x[0] != 
'summary'):
+summary[field][statistic] = value
+return dict(summary)
 
 
 def main(sc, sqlContext, input_dir, output_dir, wikis, initial_num_trees, 
final_num_trees,
@@ -49,6 +77,17 @@
 print 'CV  test-ndcg@10: %.4f' % (tune_results['metrics']['cv-test'])
 print 'CV train-ndcg@10: %.4f' % (tune_results['metrics']['cv-train'])
 
+tune_results['metadata'] = {
+'wiki': wiki,
+'input_dir': input_dir,
+'training_datetime': datetime.datetime.now().isoformat(),
+'num_observations': data_size,
+'num_queries': 
df_hits_with_features.select('query').drop_duplicates().count(),
+'num_norm_queries': 
df_hits_with_features.select('norm_query_id').drop_duplicates().count(),
+'features': 
df_hits_with_features.schema['features'].metdata['features'],
+'summary': summarize_training_df(df_hits_with_features, data_size)
+}
+
 # Train a model over all data with best params. Use a copy
 # so j_groups doesn't end up inside tune_results and prevent
 # pickle from serializing it.
@@ -70,7 +109,7 @@
 df_test = sqlContext.read.parquet(test_dir)
 tune_results['metrics']['test'] = model.eval(df_test)
 print 'test-ndcg@10: %.5f' % (tune_results['metrics']['test'])
-except:
+except:  # noqa: E722
 # It has probably taken some time to get this far. Don't bail
 # because the user input an invalid test dir.
 logging.exception('Could not evaluate test_dir: %s' % 
(test_dir))
@@ -81,6 +120,10 @@
 # some more work before they can be json encoded.
 tune_output_pickle = os.path.join(output_dir, 'tune_%s.pickle' % 
(wiki))
 with open(tune_output_pickle, 'w') as f:
+# TODO: This includes special hyperopt and mjolnir objects, it 
would
+# be nice if those could be converted to something simple like 
dicts
+# and output json instead of pickle. This would greatly simplify
+# post-processing.
 f.write(pickle.dumps(tune_results))
 print 'Wrote tuning results to %s' % (tune_output_pickle)
 
@@ -178,7 +221,7 @@
 
 try:
 main(sc, sqlContext, **args)
-except:
+except:  # noqa: E722
 # If the directory we created is still empty delete 

[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: Add DOMUtils.hasNChildren() for quickly testing # of child n...

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

Change subject: Add DOMUtils.hasNChildren() for quickly testing # of child nodes
..


Add DOMUtils.hasNChildren() for quickly testing # of child nodes

When testing whether a node has a small number of children (for example,
0, 1, or 2) we can avoid paying the O(# children) cost of potentially
creating a backing array for Node#childNodes by simply walking a
short distance down the linked list of children.

Change-Id: I16eca1e5c088a94acfb64177a9ce8545eb487401
---
M lib/html2wt/DOMHandlers.js
M lib/utils/DOMUtils.js
M lib/wt2html/pp/handlers/cleanup.js
M tests/mocha/parse.js
4 files changed, 22 insertions(+), 8 deletions(-)

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



diff --git a/lib/html2wt/DOMHandlers.js b/lib/html2wt/DOMHandlers.js
index 9ac2547..f1731b7 100644
--- a/lib/html2wt/DOMHandlers.js
+++ b/lib/html2wt/DOMHandlers.js
@@ -1166,7 +1166,7 @@
return 
nativeExt.serialHandler.handle(node, state, wrapperUnmodified);
} else if 
(/(?:^|\s)mw:(?:Image|Video|Audio)(\/(Frame|Frameless|Thumb))?/.test(type)) {
return 
state.serializer.figureHandler(node);
-   } else if (/(?:^|\s)mw\:Entity/.test(type) && 
node.childNodes.length === 1) {
+   } else if (/(?:^|\s)mw\:Entity/.test(type) && 
DU.hasNChildren(node, 1)) {
// handle a new mw:Entity (not handled 
by selser) by
// serializing its children
if (dp.src !== undefined && contentSrc 
=== dp.srcContent) {
@@ -1183,7 +1183,7 @@
if (dp.src !== undefined) {
return emitPlaceholderSrc(node, 
state);
} else if (/(^|\s)mw:Placeholder(\s|$)/ 
&&
-   node.childNodes.length === 1 &&
+   DU.hasNChildren(node, 1) &&
DU.isText(node.firstChild) &&
// See the DisplaySpace hack in 
the urltext rule
// in the tokenizer.
@@ -1286,7 +1286,7 @@
} else {
// Trigger separator
if (state.sep.constraints && 
state.sep.constraints.min === 2 &&
-   
node.parentNode.childNodes.length === 1) {
+   
DU.hasNChildren(node.parentNode, 1)) {
// p/br pair
// Hackhack ;)
 
diff --git a/lib/utils/DOMUtils.js b/lib/utils/DOMUtils.js
index dc221ce..7d7407f 100644
--- a/lib/utils/DOMUtils.js
+++ b/lib/utils/DOMUtils.js
@@ -90,6 +90,20 @@
},
 
/**
+* Test the number of children this node has without using
+* `Node#childNodes.length`.  This walks the sibling list and so
+* takes O(`nchildren`) time -- so `nchildren` is expected to be small
+* (say: 0, 1, or 2).
+*/
+   hasNChildren: function(node, nchildren) {
+   for (var child = node.firstChild; child; child = 
child.nextSibling) {
+   if (nchildren <= 0) { return false; }
+   nchildren -= 1;
+   }
+   return (nchildren === 0);
+   },
+
+   /**
 * Is 'node' a block node that is also visible in wikitext?
 * An example of an invisible block node is a ``-tag that
 * Parsoid generated, or a ``, `` tag.
diff --git a/lib/wt2html/pp/handlers/cleanup.js 
b/lib/wt2html/pp/handlers/cleanup.js
index d761aba..a546282 100644
--- a/lib/wt2html/pp/handlers/cleanup.js
+++ b/lib/wt2html/pp/handlers/cleanup.js
@@ -87,7 +87,7 @@
// template/extension content OR nodes with templated-attributes
!DU.hasParsoidAboutId(node) && (
(!node.hasChildNodes()) || (
-   node.childNodes.length === 1 && 
!DU.isElt(node.firstChild) &&
+   DU.hasNChildren(node, 1) && 
!DU.isElt(node.firstChild) &&
/^\s*$/.test(node.textContent)
)
)) {
diff --git a/tests/mocha/parse.js b/tests/mocha/parse.js
index de145c2..7f7f8bc 100644
--- a/tests/mocha/parse.js
+++ b/tests/mocha/parse.js
@@ -33,12 +33,12 @@
doc.outerHTML.startsWith('').should.equal(true);
// verify tha

[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: Only use our hacked Node#normalize if domino is old

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

Change subject: Only use our hacked Node#normalize if domino is old
..


Only use our hacked Node#normalize if domino is old

We used a hacky reimplementation of Node#normalize to work around
a slow array-based DOM implementation in domino; if domino is
new enough, this will break (because Node#childNodes isn't writable).
Use the built-in Node#normalize in that case instead.

Change-Id: Ifdf176e6876bb9f8d861d21feedeea913d36841c
---
M lib/wt2html/pp/processors/normalize.js
1 file changed, 19 insertions(+), 1 deletion(-)

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



diff --git a/lib/wt2html/pp/processors/normalize.js 
b/lib/wt2html/pp/processors/normalize.js
index 22b12ac..b87d29e 100644
--- a/lib/wt2html/pp/processors/normalize.js
+++ b/lib/wt2html/pp/processors/normalize.js
@@ -1,6 +1,18 @@
 'use strict';
 
 var domino = require('domino');
+
+// Test for domino > 1.0.30, where childNodes was made a proper read-only
+// property. Not coincidentally, the workaround below for a slow implementation
+// of Node#normalize in domino became unnecessary after 1.0.30.
+var DOMINO_AFTER_1_0_30 = false;
+try {
+   domino.createDocument('test').body.childNodes = new 
domino.impl.NodeList();
+} catch (e) {
+   DOMINO_AFTER_1_0_30 = true;
+}
+
+
 var DU = require('../../../utils/DOMUtils').DOMUtils;
 
 // Like Node.normalize() but it clones the childNodes arrays in order to avoid
@@ -56,12 +68,18 @@
newChunks.push(kids.slice(chunkStart));
}
// Clone childNodes by concatenating the chunks
+   // XXX: childNodes isn't really writable in DOM; this only works
+   // for domino <= 1.0.30
parent.childNodes = new 
domino.impl.NodeList([].concat.apply([], newChunks));
}
 }
 
 function normalize(body, env) {
-   normalizeNode(body);
+   if (DOMINO_AFTER_1_0_30) {
+   body.normalize();
+   } else {
+   normalizeNode(body);
+   }
 }
 
 if (typeof module === "object") {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ifdf176e6876bb9f8d861d21feedeea913d36841c
Gerrit-PatchSet: 5
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: C. Scott Ananian 
Gerrit-Reviewer: Arlolra 
Gerrit-Reviewer: Sbailey 
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]: T176728: Deleting nodes is slow ...

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

Change subject: T176728: Deleting nodes is slow ...
..

T176728: Deleting nodes is slow ...

 * This shaves a minute off the slow skwiki posts Google is sending us.

 * Should probably wait for the linked list domino implementation which
   makes deleting cheap, since this patch is incomplete.

Change-Id: I990d2ae947e4d833acefe981478f9c8e1f68f506
---
M lib/wt2html/pp/processors/wrapTemplates.js
1 file changed, 4 insertions(+), 2 deletions(-)


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

diff --git a/lib/wt2html/pp/processors/wrapTemplates.js 
b/lib/wt2html/pp/processors/wrapTemplates.js
index 15eb165..bab1a6d 100644
--- a/lib/wt2html/pp/processors/wrapTemplates.js
+++ b/lib/wt2html/pp/processors/wrapTemplates.js
@@ -878,10 +878,12 @@
// it is guaranteed to be a marker meta added to mark the start
// of the template.
if (DU.isTplMarkerMeta(startElem)) {
-   DU.deleteNode(startElem);
+   var t1 = startElem.ownerDocument.createTextNode('');
+   startElem.parentNode.replaceChild(t1, startElem);
}
 
-   DU.deleteNode(range.endElem);
+   var t2 = range.endElem.ownerDocument.createTextNode('');
+   range.endElem.parentNode.replaceChild(t2, range.endElem);
}
 }
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I990d2ae947e4d833acefe981478f9c8e1f68f506
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...parsoid[master]: Remove unnecessary calls to Node#childNodes

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

Change subject: Remove unnecessary calls to Node#childNodes
..


Remove unnecessary calls to Node#childNodes

These calls force us to allocate a backing array for childNodes,
deoptimizing a linked list DOM representation.  Iterate over the
children using Node#firstChild / Node#nextSibling instead, which
can be efficiently done w/o allocating a backing array.

Change-Id: Ibed52d3d82a7fc54796d7ef6f1cf771a6f48b974
---
M lib/utils/DOMUtils.js
M lib/wt2html/XMLSerializer.js
M lib/wt2html/pp/processors/computeDSR.js
M lib/wt2html/pp/processors/handlePres.js
4 files changed, 20 insertions(+), 30 deletions(-)

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



diff --git a/lib/utils/DOMUtils.js b/lib/utils/DOMUtils.js
index c9cd9fb..dc221ce 100644
--- a/lib/utils/DOMUtils.js
+++ b/lib/utils/DOMUtils.js
@@ -815,9 +815,8 @@
 * Check whether a node has any children that are elements.
 */
hasElementChild: function(node) {
-   var children = node.childNodes;
-   for (var i = 0, n = children.length; i < n; i++) {
-   if (DU.isElt(children[i])) {
+   for (var child = node.firstChild; child; child = 
child.nextSibling) {
+   if (DU.isElt(child)) {
return true;
}
}
@@ -829,9 +828,7 @@
 * Check if a node has a block-level element descendant.
 */
hasBlockElementDescendant: function(node) {
-   var children = node.childNodes;
-   for (var i = 0, n = children.length; i < n; i++) {
-   var child = children[i];
+   for (var child = node.firstChild; child; child = 
child.nextSibling) {
if (DU.isElt(child) &&
// Is a block-level node
(this.isBlockNode(child) ||
@@ -997,15 +994,14 @@
switch (node.nodeType) {
case node.ELEMENT_NODE:
var nodeName = node.nodeName.toLowerCase();
-   var children = node.childNodes;
var attrInfo = 
domAttrsToTagAttrs(node.attributes);
 
if (Util.isVoidElement(nodeName)) {
tokBuf.push(new 
pd.SelfclosingTagTk(nodeName, attrInfo.attrs, attrInfo.dataAttrs));
} else {
tokBuf.push(new pd.TagTk(nodeName, 
attrInfo.attrs, attrInfo.dataAttrs));
-   for (var i = 0, n = children.length; i 
< n; i++) {
-   tokBuf = 
this.convertDOMtoTokens(tokBuf, children[i]);
+   for (var child = node.firstChild; 
child; child = child.nextSibling) {
+   tokBuf = 
this.convertDOMtoTokens(tokBuf, child);
}
var endTag = new pd.EndTagTk(nodeName);
// Keep stx parity
@@ -1966,15 +1962,16 @@
 *See encapsulateExpansionHTML's doc. for more info about these 
options.
 */
buildDOMFragmentTokens: function(env, token, docOrHTML, addAttrsCB, 
opts) {
-   var body;
+   var body, nodes;
if (docOrHTML.constructor === String) {
body = DU.ppToDOM(docOrHTML);
} else {
body = docOrHTML.body;
}
 
-   var nodes = body.childNodes;
-   if (nodes.length === 0) {
+   if (body.hasChildNodes()) {
+   nodes = body.childNodes;
+   } else {
// RT extensions expanding to nothing.
nodes = [body.ownerDocument.createElement('link')];
}
diff --git a/lib/wt2html/XMLSerializer.js b/lib/wt2html/XMLSerializer.js
index a1b1864..2c2a993 100644
--- a/lib/wt2html/XMLSerializer.js
+++ b/lib/wt2html/XMLSerializer.js
@@ -238,9 +238,8 @@
var accum = options.captureOffsets ?
accumOffsets.bind(null, out) : function(bit) { out.str += bit; 
};
if (options.innerXML) {
-   var children = node.childNodes;
-   for (var i = 0; i < children.length; i++) {
-   serializeToString(children[i], options, accum);
+   for (var child = node.firstChild; child; child = 
child.nextSibling) {
+   serializeToString(child, options, accum);
}
} else {
   

[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: Remove unnecessary calls to Node#childNodes.length

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

Change subject: Remove unnecessary calls to Node#childNodes.length
..


Remove unnecessary calls to Node#childNodes.length

These calls force us to allocate a backing array for childNodes,
deoptimizing a linked list representation.  Use the standard
Node#hasChildNodes() method instead, which can be efficiently
implemented without allocating a backing array.

Change-Id: I1706bfa15263564bc981d689947835a3d0d4a68f
---
M lib/api/apiUtils.js
M lib/ext/Cite/index.js
M lib/ext/Nowiki/index.js
M lib/html2wt/DOMDiff.js
M lib/html2wt/DOMHandlers.js
M lib/html2wt/LinkHandler.js
M lib/html2wt/WikitextSerializer.js
M lib/html2wt/escapeWikitext.js
M lib/utils/DOMTraverser.js
M lib/utils/DOMUtils.js
M lib/wt2html/pp/handlers/cleanup.js
M lib/wt2html/pp/processors/markFosteredContent.js
M lib/wt2html/pp/processors/migrateTemplateMarkerMetas.js
M tests/mocha/api.js
14 files changed, 41 insertions(+), 37 deletions(-)

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



diff --git a/lib/api/apiUtils.js b/lib/api/apiUtils.js
index c2ac472..68b3337 100644
--- a/lib/api/apiUtils.js
+++ b/lib/api/apiUtils.js
@@ -197,19 +197,17 @@
out = out.replace(/\n*$/, '');
 
// Emit base href so all relative urls resolve properly
-   var hNodes = doc.head.childNodes;
var headNodes = "";
-   for (var i = 0; i < hNodes.length; i++) {
-   if (hNodes[i].nodeName.toLowerCase() === 'base') {
-   headNodes += DU.toXML(hNodes[i]);
+   for (var hNode = doc.head.firstChild; hNode; hNode = 
hNode.nextSibling) {
+   if (hNode.nodeName.toLowerCase() === 'base') {
+   headNodes += DU.toXML(hNode);
break;
}
}
 
-   var bNodes = doc.body.childNodes;
var bodyNodes = "";
-   for (var j = 0; j < bNodes.length; j++) {
-   bodyNodes += DU.toXML(bNodes[j]);
+   for (var bNode = doc.body.firstChild; bNode; bNode = 
bNode.nextSibling) {
+   bodyNodes += DU.toXML(bNode);
}
 
var htmlSpeChars = htmlSpecialChars(out);
diff --git a/lib/ext/Cite/index.js b/lib/ext/Cite/index.js
index 658a243..72c7f5c 100644
--- a/lib/ext/Cite/index.js
+++ b/lib/ext/Cite/index.js
@@ -643,7 +643,7 @@
cite.references.extractRefFromNode(child, 
refsData,
_processRefs.bind(null, cite, refsData),
referencesId, referencesGroup, 
nestedRefsHTML);
-   } else if (child.childNodes.length > 0) {
+   } else if (child.hasChildNodes()) {
_processRefsInReferences(cite, refsData,
child, referencesId, referencesGroup, 
nestedRefsHTML);
}
@@ -705,7 +705,7 @@
dmw.caption = 
DU.ppToXML(captionDOM, { innerXML: true });
}
}
-   if (child.childNodes.length > 0) {
+   if (child.hasChildNodes()) {
_processRefs(cite, refsData, child);
}
}
diff --git a/lib/ext/Nowiki/index.js b/lib/ext/Nowiki/index.js
index 1219853..c818ae1 100644
--- a/lib/ext/Nowiki/index.js
+++ b/lib/ext/Nowiki/index.js
@@ -45,7 +45,7 @@
 
 var serialHandler = {
handle: Promise.method(function(node, state, wrapperUnmodified) {
-   if (!node.childNodes.length) {
+   if (!node.hasChildNodes()) {
state.hasSelfClosingNowikis = true;
state.emitChunk('', node);
return;
diff --git a/lib/html2wt/DOMDiff.js b/lib/html2wt/DOMDiff.js
index 153c39d..dc7aa65 100644
--- a/lib/html2wt/DOMDiff.js
+++ b/lib/html2wt/DOMDiff.js
@@ -179,18 +179,24 @@
 
// Passed all tests, element node itself is equal.
if (deep) {
-   // Compare children too
-   if (nodeA.childNodes.length !== 
nodeB.childNodes.length) {
-   return false;
+   var childA, childB;
+   // Compare # of children, since that's fast.
+   // (Avoid de-optimizing DOM by using node#childNodes)
+   for (childA = nodeA.firstChild, childB = 
nodeB.firstChild;
+   childA && childB;
+

[MediaWiki-commits] [Gerrit] operations/puppet[production]: git-sync-upstream: rewrite in python

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

Change subject: git-sync-upstream: rewrite in python
..

git-sync-upstream: rewrite in python

This is fairly meaningless but I'm hoping to fix this up
shortly and may as well do so in python.

Bug: T177944
Change-Id: Ib75ba70e93b34087b72e2ce9ecdc0e5183598008
---
M modules/puppetmaster/files/git-sync-upstream
1 file changed, 47 insertions(+), 50 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/18/386318/1

diff --git a/modules/puppetmaster/files/git-sync-upstream 
b/modules/puppetmaster/files/git-sync-upstream
old mode 100644
new mode 100755
index 9d57054..358cefb
--- a/modules/puppetmaster/files/git-sync-upstream
+++ b/modules/puppetmaster/files/git-sync-upstream
@@ -1,64 +1,61 @@
-#!/usr/bin/env bash
-# Update the local puppet checkout
+#!/usr/bin/python3
 
-set -e
-#set -x
+import datetime
+import logging
+import os
 
-# TODO: rewrite in python?
+# Send all git output to stdout
+# This has to be set before git is imported.
+os.environ["GIT_PYTHON_TRACE"] = 'full'
+logging.basicConfig(level=logging.INFO)
 
-# Run script as root
-[[ ${UID} -ne 0 ]] && exec sudo ${0} "${@}"
+import git
 
-echo "--- ${0} $(date +%Y-%m-%dT%H:%M:%S)"
 
-function rebase_repo() {
-REPO_PATH="${1}"
-TRACK_BRANCH="${2}"
-REBASE_OPTS=(
-'--preserve-merges'
-'--stat'
-'--strategy=recursive'
-'--strategy-option=patience'
-)
+def rebase_repo(repo_path, track_branch):
+repo = git.Repo(repo_path)
+assert not repo.bare
 
-cd "${REPO_PATH}"
+upstream_branch = "origin/%s" % track_branch
 
-DIFF=$(git diff)
-if [ -n "${DIFF}" ]; then
-echo "Local diffs detected.  Commit your changes!"
-return 2
-fi
+index = repo.index
 
-# Fetch new changes from origin
-git fetch --verbose origin
+# diff index against working copy
+if(index.diff(None)):
+print("Local diffs detected.  Commit your changes!")
+return(2)
 
-# Abort early when already on tip of upstream
-git merge-base --is-ancestor "origin/${TRACK_BRANCH}" HEAD && {
-echo "Up-to-date: ${REPO_PATH}"
-return 0
-}
+repo.remotes.origin.fetch()
 
-# Rebase locally commited changes on top of tracked origin branch
-if ! git rebase "${REBASE_OPTS[@]}" "origin/${TRACK_BRANCH}"; then
-echo "Rebase failed! See error messages above." 1>&2
-echo "Reverting rebase attempt" 1>&2
-git rebase --abort
-return 2
-fi
+latest_upstream_commit = repo.git.show_ref("-s", upstream_branch)
+latest_merged_commit = repo.git.merge_base(upstream_branch, "HEAD")
 
-# Ensure that submodule changes are applied to the local checkout
-git submodule update --init --recursive
+if latest_upstream_commit == latest_merged_commit:
+print("Up-to-date: %s" % repo_path)
+return
 
-# Tag the local repo state for rollback and troubleshooting
-TAG="snapshot-$(date +%Y%m%dT%H%M)"
-git tag "${TAG}"
-echo "Tagged as: ${TAG}"
+try:
+repo.git.rebase("--preserve-merges",
+"--stat",
+"--strategy=recursive",
+"--strategy-option=patience",
+upstream_branch)
+except git.exc.GitCommandError:
+print("Rebase failed! Reverting rebase attempt.", file=sys.stderr)
+repo.git.rebase("--abort", file=sys.stderr)
+return(2)
 
-# Display local commits
-echo "Local hacks:"
-git log --color --pretty=oneline --abbrev-commit origin/HEAD..HEAD |
-sed 's/^/  /'
-}
+repo.git.submodule("update", "--init", "--recursive")
 
-rebase_repo /var/lib/git/operations/puppet production
-rebase_repo /var/lib/git/labs/private master
+tagname = "snapshot-%s" % datetime.datetime.now().strftime('%Y%m%d%H%M')
+repo.create_tag(tagname)
+print("Tagged as %s" % tagname)
+
+print("Local hacks:")
+repo.git.log("--color",
+ "--pretty=oneline",
+ "--abbrev-commit",
+ "origin/HEAD..HEAD")
+
+rebase_repo("/var/lib/git/operations/puppet", "production")
+rebase_repo("/var/lib/git/labs/private", "master")

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib75ba70e93b34087b72e2ce9ecdc0e5183598008
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] VisualEditor/VisualEditor[master]: Scroll to the next highlight after find and replace has repl...

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

Change subject: Scroll to the next highlight after find and replace has 
replaced text
..


Scroll to the next highlight after find and replace has replaced text

Right now when you're doing find and replace, each time you replace, the
next occurrence of the term is highlighted, but not scrolled to. This is
unexpected, and can lead to you being quite far away from the highlighted
text if you keep replacing things. This patch fixes that by scrolling to
the highlighted text each time something is replaced.

Bug: T177514
Change-Id: Ic5a39f681260c910668bb1ea3a27aa2c62f14383
---
M src/ui/dialogs/ve.ui.FindAndReplaceDialog.js
1 file changed, 3 insertions(+), 0 deletions(-)

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



diff --git a/src/ui/dialogs/ve.ui.FindAndReplaceDialog.js 
b/src/ui/dialogs/ve.ui.FindAndReplaceDialog.js
index 0b547d9..ac3e622 100644
--- a/src/ui/dialogs/ve.ui.FindAndReplaceDialog.js
+++ b/src/ui/dialogs/ve.ui.FindAndReplaceDialog.js
@@ -598,6 +598,9 @@
 
this.clearRenderedResultsCache();
this.renderFragments();
+
+   // Wherever we end up, scroll to whatever we've got focused
+   this.highlightFocused( true );
 };
 
 /**

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic5a39f681260c910668bb1ea3a27aa2c62f14383
Gerrit-PatchSet: 4
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Deskana 
Gerrit-Reviewer: Deskana 
Gerrit-Reviewer: Esanders 
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] operations/puppet[production]: Add types to some fields used by nginx

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

Change subject: Add types to some fields used by nginx
..

Add types to some fields used by nginx

That would help doing proper checks and aggregations
on them, such as finding requests that take longer than X, etc.

Bug: T178530
Change-Id: Ifed4d654ec5d2e76cfe5fe923439b1efc01b9432
---
M modules/role/files/logstash/elasticsearch-template.json
1 file changed, 12 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/17/386317/1

diff --git a/modules/role/files/logstash/elasticsearch-template.json 
b/modules/role/files/logstash/elasticsearch-template.json
index 78f3ad2..eaffcc6 100644
--- a/modules/role/files/logstash/elasticsearch-template.json
+++ b/modules/role/files/logstash/elasticsearch-template.json
@@ -137,6 +137,18 @@
   "type" : "keyword",
   "index" : true,
   "doc_values": true
+},
+"request_time" : {
+"type" : "float",
+"doc_values": true
+},
+"upstream_time" : {
+"type" : "float",
+"doc_values": true
+},
+"response_size" : {
+"type" : "long",
+"doc_values": true
 }
   }
 }

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Make runJobs.php treat --json value as case insensitive

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

Change subject: Make runJobs.php treat --json value as case insensitive
..

Make runJobs.php treat --json value as case insensitive

The docs mentioned "JSON", which did not actually work.

Change-Id: Ie9802551d05f7d80d1db0fd316e36f4b35bbc521
---
M maintenance/runJobs.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/maintenance/runJobs.php b/maintenance/runJobs.php
index 929b5c9..f53b2ef 100644
--- a/maintenance/runJobs.php
+++ b/maintenance/runJobs.php
@@ -68,7 +68,7 @@
}
}
 
-   $outputJSON = ( $this->getOption( 'result' ) === 'json' );
+   $outputJSON = ( strlower( $this->getOption( 'result' ) ) === 
'json' );
$wait = $this->hasOption( 'wait' );
 
$runner = new JobRunner( LoggerFactory::getInstance( 'runJobs' 
) );

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...WikiForum[master]: Use CaptchaTriggers attribute to declare wikiforum Captcha t...

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

Change subject: Use CaptchaTriggers attribute to declare wikiforum Captcha 
trigger
..


Use CaptchaTriggers attribute to declare wikiforum Captcha trigger

Instead of overwriting the existing configuration, depending on the
load order of WikiForum and ConfirmEdit.

Bug: T152929
Change-Id: I53f75190d49fbab0c6f947c04e7d5f19594b9e5f
Depends-on: I4c5eaf87657f5dc07787480a2f1a56a1db8c714f
---
M extension.json
1 file changed, 4 insertions(+), 4 deletions(-)

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



diff --git a/extension.json b/extension.json
index eec1e7f..2df8521 100644
--- a/extension.json
+++ b/extension.json
@@ -76,12 +76,12 @@
"ParserFirstCallInit": "WikiForumHooks::registerParserHooks",
"LoadExtensionSchemaUpdates": "WikiForumHooks::addTables"
},
+   "CaptchaTriggers": {
+   "wikiforum": true
+   },
"config": {
"WikiForumAllowAnonymous": true,
-   "WikiForumLogInRC": true,
-   "CaptchaTriggers": {
-   "wikiforum": true
-   }
+   "WikiForumLogInRC": true
},
"manifest_version": 1
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I53f75190d49fbab0c6f947c04e7d5f19594b9e5f
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/WikiForum
Gerrit-Branch: master
Gerrit-Owner: Florianschmidtwelzow 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Reception123 
Gerrit-Reviewer: SamanthaNguyen 
Gerrit-Reviewer: UltrasonicNXT 
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]: Bump to domino@1.0.30

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

Change subject: Bump to domino@1.0.30
..


Bump to domino@1.0.30

This gives us the performance fix in
https://github.com/fgnass/domino/commit/056cb4ea5e50e68b65974e5f2f1e9e22ccd8a7ef
avoiding an O(n^2) slowdown.

Change-Id: I9d24d119530f3b762a313640ef05022112cf82b9
---
M npm-shrinkwrap.json
M package.json
2 files changed, 4 insertions(+), 4 deletions(-)

Approvals:
  C. Scott Ananian: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json
index 3bffe3f..0d2a3fc 100644
--- a/npm-shrinkwrap.json
+++ b/npm-shrinkwrap.json
@@ -730,9 +730,9 @@
   "dev": true
 },
 "domino": {
-  "version": "1.0.29",
-  "from": "domino@1.0.29",
-  "resolved": "https://registry.npmjs.org/domino/-/domino-1.0.29.tgz";
+  "version": "1.0.30",
+  "from": "domino@1.0.30",
+  "resolved": "https://registry.npmjs.org/domino/-/domino-1.0.30.tgz";
 },
 "domutils": {
   "version": "1.5.1",
diff --git a/package.json b/package.json
index f405822..95f9bcd 100644
--- a/package.json
+++ b/package.json
@@ -12,7 +12,7 @@
 "content-type": "git+https://github.com/wikimedia/content-type#master";,
 "core-js": "^2.5.1",
 "diff": "^1.0.7",
-"domino": "^1.0.29",
+"domino": "^1.0.30",
 "entities": "^1.1.1",
 "express": "^4.15.5",
 "express-handlebars": "^3.0.0",

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9d24d119530f3b762a313640ef05022112cf82b9
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Arlolra 
Gerrit-Reviewer: C. Scott Ananian 
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]: T176728: Use replaceChild instead of insertBefore

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

Change subject: T176728: Use replaceChild instead of insertBefore
..


T176728: Use replaceChild instead of insertBefore

Change-Id: I855b7d3c67859a35eb411701f4f14450ca939988
---
M lib/wt2html/pp/processors/wrapTemplates.js
1 file changed, 1 insertion(+), 3 deletions(-)

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



diff --git a/lib/wt2html/pp/processors/wrapTemplates.js 
b/lib/wt2html/pp/processors/wrapTemplates.js
index 8181605..15eb165 100644
--- a/lib/wt2html/pp/processors/wrapTemplates.js
+++ b/lib/wt2html/pp/processors/wrapTemplates.js
@@ -664,9 +664,7 @@
if (!DU.isFosterablePosition(n)) {
var span = doc.createElement('span');
span.setAttribute('about', about);
-   // attach the new span to the DOM
-   n.parentNode.insertBefore(span, n);
-   // move the text node into the span
+   n.parentNode.replaceChild(span, n);
span.appendChild(n);
n = span;
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I855b7d3c67859a35eb411701f4f14450ca939988
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Arlolra 
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...Html2Wiki[master]: Remove bogus $wgNamespacesWithSubpages from extension.json

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

Change subject: Remove bogus $wgNamespacesWithSubpages from extension.json
..


Remove bogus $wgNamespacesWithSubpages from extension.json

This setting is a core configuration setting, and doesn't belong to this
extension. If this extension needs to modify a core setting there should
probably be a hook or it needs to be done in a extension.json "callback".

Bug: T178944
Change-Id: I625b0d38813875d71edf01408b710c36abd9ae12
---
M extension.json
1 file changed, 1 insertion(+), 26 deletions(-)

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



diff --git a/extension.json b/extension.json
index 66218d3..571e62f 100644
--- a/extension.json
+++ b/extension.json
@@ -67,32 +67,7 @@
},
"config": {
"H2WEliminateDuplicateImages": false,
-   "H2WProcessImages": true,
-   "NamespacesWithSubpages": {
-   "0": true,
-   "1": true,
-   "2": true,
-   "3": true,
-   "4": true,
-   "5": true,
-   "6": true,
-   "7": true,
-   "8": 0,
-   "9": true,
-   "10": true,
-   "11": true,
-   "12": true,
-   "13": true,
-   "14": true,
-   "15": true,
-   "100": true,
-   "101": true,
-   "828": true,
-   "829": true,
-   "103": true,
-   "105": true,
-   "109": true
-   }
+   "H2WProcessImages": true
},
"load_composer_autoloader": true,
"manifest_version": 1,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I625b0d38813875d71edf01408b710c36abd9ae12
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Html2Wiki
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Chad 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: MaxSem 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: Bump to domino@1.0.30

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

Change subject: Bump to domino@1.0.30
..

Bump to domino@1.0.30

Change-Id: I9d24d119530f3b762a313640ef05022112cf82b9
---
M npm-shrinkwrap.json
M package.json
2 files changed, 4 insertions(+), 4 deletions(-)


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

diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json
index 3bffe3f..0d2a3fc 100644
--- a/npm-shrinkwrap.json
+++ b/npm-shrinkwrap.json
@@ -730,9 +730,9 @@
   "dev": true
 },
 "domino": {
-  "version": "1.0.29",
-  "from": "domino@1.0.29",
-  "resolved": "https://registry.npmjs.org/domino/-/domino-1.0.29.tgz";
+  "version": "1.0.30",
+  "from": "domino@1.0.30",
+  "resolved": "https://registry.npmjs.org/domino/-/domino-1.0.30.tgz";
 },
 "domutils": {
   "version": "1.5.1",
diff --git a/package.json b/package.json
index f405822..95f9bcd 100644
--- a/package.json
+++ b/package.json
@@ -12,7 +12,7 @@
 "content-type": "git+https://github.com/wikimedia/content-type#master";,
 "core-js": "^2.5.1",
 "diff": "^1.0.7",
-"domino": "^1.0.29",
+"domino": "^1.0.30",
 "entities": "^1.1.1",
 "express": "^4.15.5",
 "express-handlebars": "^3.0.0",

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9d24d119530f3b762a313640ef05022112cf82b9
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...InputBox[master]: Don't use deprecated Sanitizer::escapeId()

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

Change subject: Don't use deprecated Sanitizer::escapeId()
..


Don't use deprecated Sanitizer::escapeId()

Change-Id: I99ce7bdea39c0b6fe0daed7c0be5fec0c8680321
---
M InputBox.classes.php
M extension.json
2 files changed, 9 insertions(+), 6 deletions(-)

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



diff --git a/InputBox.classes.php b/InputBox.classes.php
index b96e8d6..f504468 100644
--- a/InputBox.classes.php
+++ b/InputBox.classes.php
@@ -138,13 +138,13 @@
$this->mSearchButtonLabel = wfMessage( 
'inputbox-searchfulltext' )->text();
}
if ( $this->mID !== '' ) {
-   $idArray = [ 'id' => Sanitizer::escapeId( $this->mID ) 
];
+   $idArray = [ 'id' => Sanitizer::escapeIdForAttribute( 
$this->mID ) ];
} else {
$idArray = [];
}
// We need a unqiue id to link  to checkboxes, but also
// want multiple 's to not be invalid html
-   $idRandStr = Sanitizer::escapeId( '-' . $this->mID . 
wfRandom(), 'noninitial' );
+   $idRandStr = Sanitizer::escapeIdForAttribute( '-' . $this->mID 
. wfRandom() );
 
// Build HTML
$htmlOut = Xml::openElement( 'div',
@@ -309,7 +309,7 @@
// having conflicts.
$unescapedID = wfRandom();
}
-   $id = Sanitizer::escapeId( $unescapedID, 'noninitial' );
+   $id = Sanitizer::escapeIdForAttribute( $unescapedID );
$htmlLabel = '';
if ( isset( $this->mLabelText ) && strlen( trim( 
$this->mLabelText ) ) ) {
$this->mLabelText = $this->mParser->recursiveTagParse( 
$this->mLabelText );
@@ -400,7 +400,7 @@
'method' => 'get'
];
if ( $this->mID !== '' ) {
-   $createBoxParams['id'] = Sanitizer::escapeId( 
$this->mID );
+   $createBoxParams['id'] = 
Sanitizer::escapeIdForAttribute( $this->mID );
}
$htmlOut .= Xml::openElement( 'form', $createBoxParams );
$editArgs = $this->getEditActionArgs();
@@ -483,7 +483,7 @@
'method' => 'get'
];
if ( $this->mID !== '' ) {
-   $moveBoxParams['id'] = Sanitizer::escapeId( $this->mID 
);
+   $moveBoxParams['id'] = Sanitizer::escapeIdForAttribute( 
$this->mID );
}
$htmlOut .= Xml::openElement( 'form', $moveBoxParams );
$htmlOut .= Html::hidden( 'title',
@@ -540,7 +540,7 @@
'method' => 'get'
];
if ( $this->mID !== '' ) {
-   $commentFormParams['id'] = Sanitizer::escapeId( 
$this->mID );
+   $commentFormParams['id'] = 
Sanitizer::escapeIdForAttribute( $this->mID );
}
$htmlOut .= Xml::openElement( 'form', $commentFormParams );
$editArgs = $this->getEditActionArgs();
diff --git a/extension.json b/extension.json
index 01ef0d7..1017c0e 100644
--- a/extension.json
+++ b/extension.json
@@ -10,6 +10,9 @@
],
"url": "https://www.mediawiki.org/wiki/Extension:InputBox";,
"descriptionmsg": "inputbox-desc",
+   "requires": {
+   "MediaWiki": ">= 1.30.0"
+   },
"license-name": "MIT",
"type": "parserhook",
"MessagesDirs": {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I99ce7bdea39c0b6fe0daed7c0be5fec0c8680321
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/InputBox
Gerrit-Branch: master
Gerrit-Owner: MaxSem 
Gerrit-Reviewer: Fomafix 
Gerrit-Reviewer: Jackmcbarn 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: MaxSem 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...Html2Wiki[master]: Remove bogus $wgNamespacesWithSubpages from extension.json

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

Change subject: Remove bogus $wgNamespacesWithSubpages from extension.json
..

Remove bogus $wgNamespacesWithSubpages from extension.json

This setting is a core configuration setting, and doesn't belong to this
extension. If this extension needs to modify a core setting there should
probably be a hook or it needs to be done in a extension.json "callback".

Bug: T178944
Change-Id: I625b0d38813875d71edf01408b710c36abd9ae12
---
M extension.json
1 file changed, 1 insertion(+), 26 deletions(-)


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

diff --git a/extension.json b/extension.json
index 66218d3..571e62f 100644
--- a/extension.json
+++ b/extension.json
@@ -67,32 +67,7 @@
},
"config": {
"H2WEliminateDuplicateImages": false,
-   "H2WProcessImages": true,
-   "NamespacesWithSubpages": {
-   "0": true,
-   "1": true,
-   "2": true,
-   "3": true,
-   "4": true,
-   "5": true,
-   "6": true,
-   "7": true,
-   "8": 0,
-   "9": true,
-   "10": true,
-   "11": true,
-   "12": true,
-   "13": true,
-   "14": true,
-   "15": true,
-   "100": true,
-   "101": true,
-   "828": true,
-   "829": true,
-   "103": true,
-   "105": true,
-   "109": true
-   }
+   "H2WProcessImages": true
},
"load_composer_autoloader": true,
"manifest_version": 1,

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: T176728: Use replaceChild instead of insertBefore

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

Change subject: T176728: Use replaceChild instead of insertBefore
..

T176728: Use replaceChild instead of insertBefore

Change-Id: I855b7d3c67859a35eb411701f4f14450ca939988
---
M lib/wt2html/pp/processors/wrapTemplates.js
1 file changed, 1 insertion(+), 3 deletions(-)


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

diff --git a/lib/wt2html/pp/processors/wrapTemplates.js 
b/lib/wt2html/pp/processors/wrapTemplates.js
index 8181605..15eb165 100644
--- a/lib/wt2html/pp/processors/wrapTemplates.js
+++ b/lib/wt2html/pp/processors/wrapTemplates.js
@@ -664,9 +664,7 @@
if (!DU.isFosterablePosition(n)) {
var span = doc.createElement('span');
span.setAttribute('about', about);
-   // attach the new span to the DOM
-   n.parentNode.insertBefore(span, n);
-   // move the text node into the span
+   n.parentNode.replaceChild(span, n);
span.appendChild(n);
n = span;
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I855b7d3c67859a35eb411701f4f14450ca939988
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...Babel[master]: We don't support Toki Pona anymore

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

Change subject: We don't support Toki Pona anymore
..

We don't support Toki Pona anymore

Change-Id: I904dd82cbf9fe36c000a4c743710cd16576eccea
---
D i18n/tokipona.json
1 file changed, 0 insertions(+), 19 deletions(-)


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

diff --git a/i18n/tokipona.json b/i18n/tokipona.json
deleted file mode 100644
index 4dc9dac..000
--- a/i18n/tokipona.json
+++ /dev/null
@@ -1,19 +0,0 @@
-{
-   "@metadata": {
-   "authors": [
-   "Purodha"
-   ]
-   },
-   "babel-0": "jan ni li [[$1|toki ala]] e [[$2|$3]].",
-   "babel-1": "jan ni li [[$1|toki lili]] e [[$2|$3]].",
-   "babel-2": "jan ni li [[$1|toki]] e [[$2|$3]].",
-   "babel-3": "jan ni li [[$1|toki pona]] e [[$2|$3]].",
-   "babel-4": "jan ni li [[$1|toki pona mute]] e [[$2|$3]].",
-   "babel-N": "[[$1|tenpo ona ali]] la jan ni li toki e [[$2|$3]].",
-   "babel-0-n": "jan ni li [[$1|toki ala]] e [[$2|toki pona]].",
-   "babel-1-n": "jan ni li [[$1|toki lili]] e [[$2|toki pona]].",
-   "babel-2-n": "jan ni li [[$1|toki]] e [[$2|toki pona]].",
-   "babel-3-n": "jan ni li [[$1|toki pona]] e [[$2|toki pona]].",
-   "babel-4-n": "jan ni li [[$1|toki pona mute]] e [[$2|toki pona]].",
-   "babel-N-n": "[[$1|tenpo ona ali]] la jan ni li toki e [[$2|toki 
pona]]."
-}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I904dd82cbf9fe36c000a4c743710cd16576eccea
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Babel
Gerrit-Branch: master
Gerrit-Owner: MaxSem 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[REL1_30]: Removed Toki Pona localization files

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

Change subject: Removed Toki Pona localization files
..

Removed Toki Pona localization files

Bug: T132899
Bug: T178730
Change-Id: I4c61b3ef42cdc24fee74587965240ca08242867e
(cherry picked from commit f0828ff4757c4c05790e0c274418cbd2a45b508b)
---
M RELEASE-NOTES-1.30
D includes/installer/i18n/tokipona.json
M languages/data/Names.php
D languages/i18n/tokipona.json
M tests/phpunit/languages/LanguageTest.php
5 files changed, 1 insertion(+), 123 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/11/386311/1

diff --git a/RELEASE-NOTES-1.30 b/RELEASE-NOTES-1.30
index bcdd436..f79ae83 100644
--- a/RELEASE-NOTES-1.30
+++ b/RELEASE-NOTES-1.30
@@ -124,6 +124,7 @@
 * Added: kbp (Kabɩyɛ / Kabiyè)
 * Added: skr (Saraiki, سرائیکی)
 * Added: tay (Tayal / Atayal)
+* Removed: tokipona (Toki Pona)
 
  Pig Latin added 
 * (T45547) Added Pig Latin, a made-up English variant (en-x-piglatin),
diff --git a/includes/installer/i18n/tokipona.json 
b/includes/installer/i18n/tokipona.json
deleted file mode 100644
index 348380f..000
--- a/includes/installer/i18n/tokipona.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
-   "@metadata": {
-   "authors": [
-   "Robin0van0der0vliet"
-   ]
-   },
-   "config-page-language": "toki"
-}
diff --git a/languages/data/Names.php b/languages/data/Names.php
index e2ed910..2026799 100644
--- a/languages/data/Names.php
+++ b/languages/data/Names.php
@@ -418,7 +418,6 @@
'tly' => 'толышә зывон', # Talysh
'tn' => 'Setswana', # Setswana
'to' => 'lea faka-Tonga', # Tonga (Tonga Islands)
-   'tokipona' => 'Toki Pona', # Toki Pona
'tpi' => 'Tok Pisin', # Tok Pisin
'tr' => 'Türkçe', # Turkish
'tru' => 'Ṫuroyo', # Turoyo
diff --git a/languages/i18n/tokipona.json b/languages/i18n/tokipona.json
deleted file mode 100644
index 67f4b5f..000
--- a/languages/i18n/tokipona.json
+++ /dev/null
@@ -1,113 +0,0 @@
-{
-   "@metadata": {
-   "authors": [
-   "http://tokipona.wikia.com sysops"
-   ]
-   },
-   "january": "tenpo mun pi nanpa wan",
-   "february": "tenpo mun pi nanpa tu",
-   "march": "tenpo mun pi nanpa tu wan",
-   "april": "tenpo mun pi nanpa tu tu",
-   "may_long": "tenpo mun pi nanpa luka",
-   "june": "tenpo mun pi nanpa luka wan",
-   "july": "tenpo mun pi nanpa luka tu",
-   "august": "tenpo mun pi nanpa luka tu wan",
-   "september": "tenpo mun pi nanpa luka tu tu",
-   "october": "tenpo mun pi nanpa luka luka",
-   "november": "tenpo mun pi nanpa luka luka wan",
-   "december": "tenpo mun pi nanpa luka luka tu",
-   "category_header": "lipu lon kulupu lipu \"$1\"",
-   "subcategories": "kulupu lipu lili",
-   "listingcontinuesabbrev": " li awen",
-   "article": "lipu sona",
-   "newwindow": "(ona li open e lupa sin)",
-   "cancel": "ike",
-   "mytalk": "toki mi",
-   "navigation": "lipu suli",
-   "help": "mi sona ala",
-   "search": "o lukin jo",
-   "go": "o tawa",
-   "history": "o lukin e lipu ni pi tenpo pini",
-   "history_short": "lipu ni pi tenpo pini",
-   "printableversion": "lipu ni o kama lipu len",
-   "permalink": "nimi open kiwen",
-   "edit": "o ante",
-   "editthispage": "o ante e lipu ni",
-   "delete": "o weka",
-   "deletethispage": "o weka e lipu ni",
-   "protect": "mi taso o ken ante",
-   "protectthispage": "mi taso o ken ante e lipu ni",
-   "unprotect": "jan ali o ken ante",
-   "unprotectthispage": "jan ale o ken ante e lipu ni",
-   "talkpage": "Talk page",
-   "specialpage": "lipu suli",
-   "talk": "o toki",
-   "toolbox": "ilo",
-   "otherlanguages": "toki ante",
-   "redirectedfrom": "(tan $1)",
-   "aboutsite": "lipu sona pi toki pona li seme?",
-   "aboutpage": "Project:lipu sona pi toki pona li seme?",
-   "copyright": "lipu ken $1 li lawa e lipu ni.",
-   "currentevents": "seme li sin lon ma?",
-   "disclaimers": "wile ala",
-   "edithelp": "mi sona ala e ante",
-   "mainpage": "lipu lawa",
-   "mainpage-description": "lipu lawa",
-   "portal": "lipu pi kulupu ni",
-   "privacy": "ken pi awen weka",
-   "ok": "pona",
-   "retrievedfrom": "tan $1",
-   "editsection": "o ante",
-   "toc": "poki lawa",
-   "showtoc": "o suli e poki ni.",
-   "hidetoc": "o lili e poki ni",
-   "nstab-main": "lipu sona",
-   "nstab-user": "lipu jan",
-   "nstab-special": "suli",
-   "nstab-image": "lipu nanpa",
-   "nstab-mediawiki": "nimi",
-   "nstab-template": "lipu mama",
-   "nstab-help": "pana pona",
-   "nstab-catego

[MediaWiki-commits] [Gerrit] wikidata...gui[master]: Allow passing options to Result Views

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

Change subject: Allow passing options to Result Views
..


Allow passing options to Result Views

Introduces syntax to pass options to result views like this:
#defaultView:[VIEW][JSON]

Bug: T155973
Change-Id: I8d87f21e19e576db8ad5b6433b6f5c4684f7aae3
---
M wikibase/queryService/ui/ResultView.js
M wikibase/queryService/ui/resultBrowser/AbstractResultBrowser.js
2 files changed, 53 insertions(+), 10 deletions(-)

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



diff --git a/wikibase/queryService/ui/ResultView.js 
b/wikibase/queryService/ui/ResultView.js
index a643abe..882348e 100644
--- a/wikibase/queryService/ui/ResultView.js
+++ b/wikibase/queryService/ui/ResultView.js
@@ -344,22 +344,32 @@
SELF.prototype._createResultBrowsers = function( resultData ) {
var self = this;
 
-   var defaultBrowser = this._getDefaultResultBrowser();
+   var defaultBrowserOptions = this._getDefaultBrowserOptions();
+   var defaultBrowser = null;
 
-   this._track( 'result.browser.' + ( defaultBrowser || 'default' 
) );
+   if ( defaultBrowserOptions !== null ) {
+   this._track( 'result.browser.' + 
defaultBrowserOptions.name );
+   } else {
+   this._track( 'result.browser.default' );
+   }
 
// instantiate
$.each( this._resultBrowsers, function( key, b ) {
var instance = new 
wikibase.queryService.ui.resultBrowser[b.class]();
instance.setSparqlApi( self._sparqlApi );
 
-   if ( defaultBrowser === null || defaultBrowser === key 
) {
+   if ( defaultBrowserOptions !== null && 
defaultBrowserOptions.name === key ) {
self._setSelectedDisplayType( b );
-
defaultBrowser = instance;
+   if ( 'options' in defaultBrowserOptions ) {
+   instance.setOptions( 
defaultBrowserOptions.options );
+   }
}
b.object = instance;
} );
+   if ( defaultBrowser === null ) {
+   defaultBrowser = this._resultBrowsers.Table.object;
+   }
 
defaultBrowser.resetVisitors();
 
@@ -374,15 +384,24 @@
 
/**
 * @private
+* @return {?{name: string, options: ?Object}}
 */
-   SELF.prototype._getDefaultResultBrowser = function() {
-   var match = this._query.match( /#defaultView:(\w+)/ );
+   SELF.prototype._getDefaultBrowserOptions = function() {
+   var match = this._query.match( /#defaultView:(\w+)(\{.*\})?/ );
 
-   if ( match && this._resultBrowsers[match[1]] ) {
-   return match[1];
+   if ( match && this._resultBrowsers.hasOwnProperty( match[1] ) ) 
{
+   var result = { name: match[1] };
+   if ( match[2] ) {
+   try {
+   result.options = JSON.parse( match[2] );
+   } catch ( e ) {
+   window.console.error( e );
+   }
+   }
+   return result;
+   } else {
+   return null;
}
-
-   return null;
};
 
/**
diff --git a/wikibase/queryService/ui/resultBrowser/AbstractResultBrowser.js 
b/wikibase/queryService/ui/resultBrowser/AbstractResultBrowser.js
index 44da2aa..cbd2faf 100644
--- a/wikibase/queryService/ui/resultBrowser/AbstractResultBrowser.js
+++ b/wikibase/queryService/ui/resultBrowser/AbstractResultBrowser.js
@@ -32,6 +32,12 @@
SELF.prototype._result = null;
 
/**
+* @property {Object}
+* @protected
+*/
+   SELF.prototype._options = {};
+
+   /**
 * @property {Function}
 * List of visitor callbacks
 */
@@ -61,6 +67,24 @@
};
 
/**
+* Sets the options
+*
+* @param {Object} options set
+*/
+   SELF.prototype.setOptions = function( options ) {
+   this._options = options;
+   };
+
+   /**
+* Get options
+*
+* @return {Object} options set
+*/
+   SELF.prototype.getOptions = function() {
+   return this._options || {};
+   };
+
+   /**
 * Sets the SPARQL API
 *
 * @param {wikibase.queryService.api.Sparql} sparqlApi

-- 
To view, visit https:/

[MediaWiki-commits] [Gerrit] labs/icinga2[master]: Fix service again

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

Change subject: Fix service again
..

Fix service again

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


  git pull ssh://gerrit.wikimedia.org:29418/labs/icinga2 
refs/changes/10/386310/1


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic0a1f9ad8181cb9341b161136170c1459e483c64
Gerrit-PatchSet: 1
Gerrit-Project: labs/icinga2
Gerrit-Branch: master
Gerrit-Owner: Paladox 

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


[MediaWiki-commits] [Gerrit] labs/icinga2[master]: Fix service again

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

Change subject: Fix service again
..


Fix service again

Change-Id: Ic0a1f9ad8181cb9341b161136170c1459e483c64
---
M templates/commands.conf.erb
M templates/hosts.conf.erb
M templates/services.conf.erb
3 files changed, 4 insertions(+), 5 deletions(-)

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



diff --git a/templates/commands.conf.erb b/templates/commands.conf.erb
index 0814619..5d92f99 100644
--- a/templates/commands.conf.erb
+++ b/templates/commands.conf.erb
@@ -159,7 +159,7 @@
 object CheckCommand "check_ssh_port" {
 import "migration-check-command"
 import "plugin-check-command"
-command = "$USER1$/check_ssh -p $port$ $host.address_ip$"
+command = "$USER1$/check_ssh -p $port$ $address$"
 }
 
 object CheckCommand "check_http" {
diff --git a/templates/hosts.conf.erb b/templates/hosts.conf.erb
index 6be7825..b14ba15 100644
--- a/templates/hosts.conf.erb
+++ b/templates/hosts.conf.erb
@@ -129,8 +129,6 @@
 import "generic-host"
 address = "gerrit-test3.git.eqiad.wmflabs"
 // floating ip
-vars.ssh_port = "29418"
-vars.address_ip = "208.80.155.149"
 vars.os = "Linux OS"
 vars.sla = "24x7"
 vars.host_name = "gerrit-test3.git.eqiad.wmflabs"
@@ -165,6 +163,7 @@
 object Host "gerrit2.git.wmflabs.org" {
  import "generic-host"
  address = "gerrit2.git.wmflabs.org"
+ vars.ssh_port = "29418"
  vars.os = "Linux OS"
  vars.sla = "24x7"
  vars.load_check = "disable"
diff --git a/templates/services.conf.erb b/templates/services.conf.erb
index 2019cf0..55ac3a2 100644
--- a/templates/services.conf.erb
+++ b/templates/services.conf.erb
@@ -56,8 +56,8 @@
   import "generic-service"
   check_command = "check_ssh_port"
   vars.port = host.vars.ssh_port
-  vars.address_ip = host.vars.address_ip
-  assign where host.address == "gerrit-test3.git.eqiad.wmflabs"
+  vars.address = host.address
+  assign where host.address == "gerrit2.git.wmflabs.org"
 }
 
 apply Service for (http_vhost => config in host.vars.http_vhosts) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic0a1f9ad8181cb9341b161136170c1459e483c64
Gerrit-PatchSet: 2
Gerrit-Project: labs/icinga2
Gerrit-Branch: master
Gerrit-Owner: Paladox 
Gerrit-Reviewer: Paladox 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Removed Toki Pona localization files

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

Change subject: Removed Toki Pona localization files
..


Removed Toki Pona localization files

Bug: T132899
Bug: T178730
Change-Id: I4c61b3ef42cdc24fee74587965240ca08242867e
---
M RELEASE-NOTES-1.30
D includes/installer/i18n/tokipona.json
M languages/data/Names.php
D languages/i18n/tokipona.json
M tests/phpunit/languages/LanguageTest.php
5 files changed, 1 insertion(+), 123 deletions(-)

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



diff --git a/RELEASE-NOTES-1.30 b/RELEASE-NOTES-1.30
index bec7b86..a7585ea 100644
--- a/RELEASE-NOTES-1.30
+++ b/RELEASE-NOTES-1.30
@@ -124,6 +124,7 @@
 * Added: kbp (Kabɩyɛ / Kabiyè)
 * Added: skr (Saraiki, سرائیکی)
 * Added: tay (Tayal / Atayal)
+* Removed: tokipona (Toki Pona)
 
  Pig Latin added 
 * (T45547) Added Pig Latin, a made-up English variant (en-x-piglatin),
diff --git a/includes/installer/i18n/tokipona.json 
b/includes/installer/i18n/tokipona.json
deleted file mode 100644
index 348380f..000
--- a/includes/installer/i18n/tokipona.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
-   "@metadata": {
-   "authors": [
-   "Robin0van0der0vliet"
-   ]
-   },
-   "config-page-language": "toki"
-}
diff --git a/languages/data/Names.php b/languages/data/Names.php
index 1266561..281be2b 100644
--- a/languages/data/Names.php
+++ b/languages/data/Names.php
@@ -418,7 +418,6 @@
'tly' => 'толышә зывон', # Talysh
'tn' => 'Setswana', # Setswana
'to' => 'lea faka-Tonga', # Tonga (Tonga Islands)
-   'tokipona' => 'Toki Pona', # Toki Pona
'tpi' => 'Tok Pisin', # Tok Pisin
'tr' => 'Türkçe', # Turkish
'tru' => 'Ṫuroyo', # Turoyo
diff --git a/languages/i18n/tokipona.json b/languages/i18n/tokipona.json
deleted file mode 100644
index 67f4b5f..000
--- a/languages/i18n/tokipona.json
+++ /dev/null
@@ -1,113 +0,0 @@
-{
-   "@metadata": {
-   "authors": [
-   "http://tokipona.wikia.com sysops"
-   ]
-   },
-   "january": "tenpo mun pi nanpa wan",
-   "february": "tenpo mun pi nanpa tu",
-   "march": "tenpo mun pi nanpa tu wan",
-   "april": "tenpo mun pi nanpa tu tu",
-   "may_long": "tenpo mun pi nanpa luka",
-   "june": "tenpo mun pi nanpa luka wan",
-   "july": "tenpo mun pi nanpa luka tu",
-   "august": "tenpo mun pi nanpa luka tu wan",
-   "september": "tenpo mun pi nanpa luka tu tu",
-   "october": "tenpo mun pi nanpa luka luka",
-   "november": "tenpo mun pi nanpa luka luka wan",
-   "december": "tenpo mun pi nanpa luka luka tu",
-   "category_header": "lipu lon kulupu lipu \"$1\"",
-   "subcategories": "kulupu lipu lili",
-   "listingcontinuesabbrev": " li awen",
-   "article": "lipu sona",
-   "newwindow": "(ona li open e lupa sin)",
-   "cancel": "ike",
-   "mytalk": "toki mi",
-   "navigation": "lipu suli",
-   "help": "mi sona ala",
-   "search": "o lukin jo",
-   "go": "o tawa",
-   "history": "o lukin e lipu ni pi tenpo pini",
-   "history_short": "lipu ni pi tenpo pini",
-   "printableversion": "lipu ni o kama lipu len",
-   "permalink": "nimi open kiwen",
-   "edit": "o ante",
-   "editthispage": "o ante e lipu ni",
-   "delete": "o weka",
-   "deletethispage": "o weka e lipu ni",
-   "protect": "mi taso o ken ante",
-   "protectthispage": "mi taso o ken ante e lipu ni",
-   "unprotect": "jan ali o ken ante",
-   "unprotectthispage": "jan ale o ken ante e lipu ni",
-   "talkpage": "Talk page",
-   "specialpage": "lipu suli",
-   "talk": "o toki",
-   "toolbox": "ilo",
-   "otherlanguages": "toki ante",
-   "redirectedfrom": "(tan $1)",
-   "aboutsite": "lipu sona pi toki pona li seme?",
-   "aboutpage": "Project:lipu sona pi toki pona li seme?",
-   "copyright": "lipu ken $1 li lawa e lipu ni.",
-   "currentevents": "seme li sin lon ma?",
-   "disclaimers": "wile ala",
-   "edithelp": "mi sona ala e ante",
-   "mainpage": "lipu lawa",
-   "mainpage-description": "lipu lawa",
-   "portal": "lipu pi kulupu ni",
-   "privacy": "ken pi awen weka",
-   "ok": "pona",
-   "retrievedfrom": "tan $1",
-   "editsection": "o ante",
-   "toc": "poki lawa",
-   "showtoc": "o suli e poki ni.",
-   "hidetoc": "o lili e poki ni",
-   "nstab-main": "lipu sona",
-   "nstab-user": "lipu jan",
-   "nstab-special": "suli",
-   "nstab-image": "lipu nanpa",
-   "nstab-mediawiki": "nimi",
-   "nstab-template": "lipu mama",
-   "nstab-help": "pana pona",
-   "nstab-category": "kulupu lipu",
-   "logout": "mi o tawa",
-   "userlogo

[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[wmf/1.31.0-wmf.5]: MWInternalLinkContextItem: increase specificity to override ...

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

Change subject: MWInternalLinkContextItem: increase specificity to override 
OOUI changes
..

MWInternalLinkContextItem: increase specificity to override OOUI changes

OOUI 8e31b2f273 increased changed various icon CSS rules, and increased their
specificity. Increase ours to match. This restores the correct size/ratio of
the images in the link context item.

Bug: T178933
Change-Id: I4f1a6dde363cf99f7665dc83f4b0fa6b1dd3c29e
(cherry picked from commit ab1e5d58d41699c47b5e3ce2ba6d42930347d7e8)
---
M modules/ve-mw/ui/styles/contextitems/ve.ui.MWInternalLinkContextItem.css
1 file changed, 2 insertions(+), 2 deletions(-)


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

diff --git 
a/modules/ve-mw/ui/styles/contextitems/ve.ui.MWInternalLinkContextItem.css 
b/modules/ve-mw/ui/styles/contextitems/ve.ui.MWInternalLinkContextItem.css
index 60c38a1..4f4f569 100644
--- a/modules/ve-mw/ui/styles/contextitems/ve.ui.MWInternalLinkContextItem.css
+++ b/modules/ve-mw/ui/styles/contextitems/ve.ui.MWInternalLinkContextItem.css
@@ -10,7 +10,7 @@
white-space: normal;
 }
 
-.ve-ui-mwInternalLinkContextItem-withImage .oo-ui-iconElement-icon {
+.ve-ui-mwInternalLinkContextItem-withImage > 
.oo-ui-iconElement.oo-ui-iconElement-icon {
float: left;
width: 3.75em;
height: 3.75em;
@@ -25,7 +25,7 @@
background-size: cover;
 }
 
-.ve-ui-mwInternalLinkContextItem-withImage 
.ve-ui-mwInternalLinkContextItem-hasImage {
+.ve-ui-mwInternalLinkContextItem-withImage > 
.ve-ui-mwInternalLinkContextItem-hasImage.oo-ui-iconElement-icon {
border: 0;
background-size: cover;
opacity: 1;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4f1a6dde363cf99f7665dc83f4b0fa6b1dd3c29e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: wmf/1.31.0-wmf.5
Gerrit-Owner: Jforrester 
Gerrit-Reviewer: DLynch 

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


[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[wmf/1.31.0-wmf.4]: MWInternalLinkContextItem: increase specificity to override ...

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

Change subject: MWInternalLinkContextItem: increase specificity to override 
OOUI changes
..

MWInternalLinkContextItem: increase specificity to override OOUI changes

OOUI 8e31b2f273 increased changed various icon CSS rules, and increased their
specificity. Increase ours to match. This restores the correct size/ratio of
the images in the link context item.

Bug: T178933
Change-Id: I4f1a6dde363cf99f7665dc83f4b0fa6b1dd3c29e
(cherry picked from commit ab1e5d58d41699c47b5e3ce2ba6d42930347d7e8)
---
M modules/ve-mw/ui/styles/contextitems/ve.ui.MWInternalLinkContextItem.css
1 file changed, 2 insertions(+), 2 deletions(-)


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

diff --git 
a/modules/ve-mw/ui/styles/contextitems/ve.ui.MWInternalLinkContextItem.css 
b/modules/ve-mw/ui/styles/contextitems/ve.ui.MWInternalLinkContextItem.css
index 60c38a1..4f4f569 100644
--- a/modules/ve-mw/ui/styles/contextitems/ve.ui.MWInternalLinkContextItem.css
+++ b/modules/ve-mw/ui/styles/contextitems/ve.ui.MWInternalLinkContextItem.css
@@ -10,7 +10,7 @@
white-space: normal;
 }
 
-.ve-ui-mwInternalLinkContextItem-withImage .oo-ui-iconElement-icon {
+.ve-ui-mwInternalLinkContextItem-withImage > 
.oo-ui-iconElement.oo-ui-iconElement-icon {
float: left;
width: 3.75em;
height: 3.75em;
@@ -25,7 +25,7 @@
background-size: cover;
 }
 
-.ve-ui-mwInternalLinkContextItem-withImage 
.ve-ui-mwInternalLinkContextItem-hasImage {
+.ve-ui-mwInternalLinkContextItem-withImage > 
.ve-ui-mwInternalLinkContextItem-hasImage.oo-ui-iconElement-icon {
border: 0;
background-size: cover;
opacity: 1;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4f1a6dde363cf99f7665dc83f4b0fa6b1dd3c29e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: wmf/1.31.0-wmf.4
Gerrit-Owner: Jforrester 
Gerrit-Reviewer: DLynch 

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


[MediaWiki-commits] [Gerrit] labs/icinga2[master]: fix Error: Closing $ not found in macro format string.

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

Change subject: fix Error: Closing $ not found in macro format string.
..


fix Error: Closing $ not found in macro format string.

Change-Id: I629b9bf115de64221e3891a78a388ddba535eea1
---
M templates/commands.conf.erb
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/templates/commands.conf.erb b/templates/commands.conf.erb
index b5cce45..0814619 100644
--- a/templates/commands.conf.erb
+++ b/templates/commands.conf.erb
@@ -159,7 +159,7 @@
 object CheckCommand "check_ssh_port" {
 import "migration-check-command"
 import "plugin-check-command"
-command = "$USER1$/check_ssh -p $port $host.address_ip$"
+command = "$USER1$/check_ssh -p $port$ $host.address_ip$"
 }
 
 object CheckCommand "check_http" {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I629b9bf115de64221e3891a78a388ddba535eea1
Gerrit-PatchSet: 2
Gerrit-Project: labs/icinga2
Gerrit-Branch: master
Gerrit-Owner: Paladox 
Gerrit-Reviewer: Paladox 

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


[MediaWiki-commits] [Gerrit] labs/icinga2[master]: fix Error: Closing $ not found in macro format string.

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

Change subject: fix Error: Closing $ not found in macro format string.
..

fix Error: Closing $ not found in macro format string.

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


  git pull ssh://gerrit.wikimedia.org:29418/labs/icinga2 
refs/changes/07/386307/1


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I629b9bf115de64221e3891a78a388ddba535eea1
Gerrit-PatchSet: 1
Gerrit-Project: labs/icinga2
Gerrit-Branch: master
Gerrit-Owner: Paladox 

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


[MediaWiki-commits] [Gerrit] labs/icinga2[master]: Fix host name

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

Change subject: Fix host name
..

Fix host name

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


  git pull ssh://gerrit.wikimedia.org:29418/labs/icinga2 
refs/changes/06/386306/1


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Icaa9faa34b6783c51f62b1ceb0b1939ba3de3103
Gerrit-PatchSet: 1
Gerrit-Project: labs/icinga2
Gerrit-Branch: master
Gerrit-Owner: Paladox 

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


[MediaWiki-commits] [Gerrit] labs/icinga2[master]: Fix host name

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

Change subject: Fix host name
..


Fix host name

Change-Id: Icaa9faa34b6783c51f62b1ceb0b1939ba3de3103
---
M templates/services.conf.erb
1 file changed, 1 insertion(+), 2 deletions(-)

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



diff --git a/templates/services.conf.erb b/templates/services.conf.erb
index daf9f96..2019cf0 100644
--- a/templates/services.conf.erb
+++ b/templates/services.conf.erb
@@ -54,10 +54,9 @@
 
 apply Service "check gerrit ssh" {
   import "generic-service"
-  check_command = "nrpe-check-1arg"
+  check_command = "check_ssh_port"
   vars.port = host.vars.ssh_port
   vars.address_ip = host.vars.address_ip
-  vars.check = "check_ssh"
   assign where host.address == "gerrit-test3.git.eqiad.wmflabs"
 }
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Icaa9faa34b6783c51f62b1ceb0b1939ba3de3103
Gerrit-PatchSet: 2
Gerrit-Project: labs/icinga2
Gerrit-Branch: master
Gerrit-Owner: Paladox 
Gerrit-Reviewer: Paladox 

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


[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: MWInternalLinkContextItem: increase specificity to override ...

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

Change subject: MWInternalLinkContextItem: increase specificity to override 
OOUI changes
..


MWInternalLinkContextItem: increase specificity to override OOUI changes

OOUI 8e31b2f273 increased changed various icon CSS rules, and increased their
specificity. Increase ours to match. This restores the correct size/ratio of
the images in the link context item.

Bug: T178933
Change-Id: I4f1a6dde363cf99f7665dc83f4b0fa6b1dd3c29e
---
M modules/ve-mw/ui/styles/contextitems/ve.ui.MWInternalLinkContextItem.css
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git 
a/modules/ve-mw/ui/styles/contextitems/ve.ui.MWInternalLinkContextItem.css 
b/modules/ve-mw/ui/styles/contextitems/ve.ui.MWInternalLinkContextItem.css
index 60c38a1..4f4f569 100644
--- a/modules/ve-mw/ui/styles/contextitems/ve.ui.MWInternalLinkContextItem.css
+++ b/modules/ve-mw/ui/styles/contextitems/ve.ui.MWInternalLinkContextItem.css
@@ -10,7 +10,7 @@
white-space: normal;
 }
 
-.ve-ui-mwInternalLinkContextItem-withImage .oo-ui-iconElement-icon {
+.ve-ui-mwInternalLinkContextItem-withImage > 
.oo-ui-iconElement.oo-ui-iconElement-icon {
float: left;
width: 3.75em;
height: 3.75em;
@@ -25,7 +25,7 @@
background-size: cover;
 }
 
-.ve-ui-mwInternalLinkContextItem-withImage 
.ve-ui-mwInternalLinkContextItem-hasImage {
+.ve-ui-mwInternalLinkContextItem-withImage > 
.ve-ui-mwInternalLinkContextItem-hasImage.oo-ui-iconElement-icon {
border: 0;
background-size: cover;
opacity: 1;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4f1a6dde363cf99f7665dc83f4b0fa6b1dd3c29e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: DLynch 
Gerrit-Reviewer: Bartosz Dziewoński 
Gerrit-Reviewer: Esanders 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: VolkerE 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] labs/icinga2[master]: Fix service

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

Change subject: Fix service
..


Fix service

Change-Id: If6c93d48cd472b9cdc8b38e515c749779322a537
---
M templates/commands.conf.erb
M templates/services.conf.erb
2 files changed, 9 insertions(+), 2 deletions(-)

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



diff --git a/templates/commands.conf.erb b/templates/commands.conf.erb
index 99948fa..b5cce45 100644
--- a/templates/commands.conf.erb
+++ b/templates/commands.conf.erb
@@ -156,6 +156,12 @@
 command = "$USER1$/check_dns -t 60 -H $host$ -s $address$"
 }
 
+object CheckCommand "check_ssh_port" {
+import "migration-check-command"
+import "plugin-check-command"
+command = "$USER1$/check_ssh -p $port $host.address_ip$"
+}
+
 object CheckCommand "check_http" {
 import "migration-check-command"
 import "plugin-check-command"
diff --git a/templates/services.conf.erb b/templates/services.conf.erb
index 183ee3a..daf9f96 100644
--- a/templates/services.conf.erb
+++ b/templates/services.conf.erb
@@ -54,9 +54,10 @@
 
 apply Service "check gerrit ssh" {
   import "generic-service"
+  check_command = "nrpe-check-1arg"
   vars.port = host.vars.ssh_port
-  vars.host = host.vars.address_ip
-  vars.check = "ssh"
+  vars.address_ip = host.vars.address_ip
+  vars.check = "check_ssh"
   assign where host.address == "gerrit-test3.git.eqiad.wmflabs"
 }
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If6c93d48cd472b9cdc8b38e515c749779322a537
Gerrit-PatchSet: 2
Gerrit-Project: labs/icinga2
Gerrit-Branch: master
Gerrit-Owner: Paladox 
Gerrit-Reviewer: Awight 
Gerrit-Reviewer: Paladox 

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


[MediaWiki-commits] [Gerrit] mediawiki...CirrusSearch[master]: SearchContext should allow setting plain rescore profiles

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

Change subject: SearchContext should allow setting plain rescore profiles
..


SearchContext should allow setting plain rescore profiles

Bug: T178906
Change-Id: Ib467e7033d47b7378a6a791eb8de281ad83c2ac0
---
M includes/Search/SearchContext.php
1 file changed, 8 insertions(+), 3 deletions(-)

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



diff --git a/includes/Search/SearchContext.php 
b/includes/Search/SearchContext.php
index b05b8a9..51fb04a 100644
--- a/includes/Search/SearchContext.php
+++ b/includes/Search/SearchContext.php
@@ -64,7 +64,7 @@
private $preferRecentHalfLife = 0;
 
/**
-* @var string rescore profile to use
+* @var string|array rescore profile to use
 */
private $rescoreProfile;
 
@@ -389,14 +389,14 @@
}
 
/**
-* @return string the rescore profile to use
+* @return string|array the rescore profile to use
 */
public function getRescoreProfile() {
return $this->rescoreProfile;
}
 
/**
-* @param string $rescoreProfile the rescore profile to use
+* @param string|array $rescoreProfile the rescore profile to use
 */
public function setRescoreProfile( $rescoreProfile ) {
$this->isDirty = true;
@@ -626,6 +626,11 @@
 */
public function getRescore() {
$result = [];
+   // XXX: remove this hack once Searcher::installBoosts is removed
+   if ( empty( $this->rescore ) ) {
+   $builder = new RescoreBuilder( $this );
+   $this->rescore = $builder->build();
+   }
foreach ( $this->rescore as $rescore ) {
$rescore['query']['rescore_query'] = 
$rescore['query']['rescore_query']->toArray();
$result[] = $rescore;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib467e7033d47b7378a6a791eb8de281ad83c2ac0
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/CirrusSearch
Gerrit-Branch: master
Gerrit-Owner: DCausse 
Gerrit-Reviewer: Cindy-the-browser-test-bot 
Gerrit-Reviewer: EBernhardson 
Gerrit-Reviewer: Gehel 
Gerrit-Reviewer: Smalyshev 
Gerrit-Reviewer: Tjones 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] wikimedia...crm[deployment]: More debugging for orphan rectifier

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

Change subject: More debugging for orphan rectifier
..


More debugging for orphan rectifier

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

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



diff --git a/vendor b/vendor
index ee12ae2..a59dbec 16
--- a/vendor
+++ b/vendor
@@ -1 +1 @@
-Subproject commit ee12ae2f1ac19d67e88d16cb9366a06bb503c2de
+Subproject commit a59dbec33176d79280621e9c5dbf47382ad251dd

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

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

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


[MediaWiki-commits] [Gerrit] analytics/kafkatee[master]: fix missing " in kafkatee.upstart

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

Change subject: fix missing " in kafkatee.upstart
..


fix missing " in kafkatee.upstart

Change-Id: Id755c7fdca19419705ef8a0afb42b9074dc9de0f
---
M debian/kafkatee.upstart
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/debian/kafkatee.upstart b/debian/kafkatee.upstart
index d991079..4aea276 100644
--- a/debian/kafkatee.upstart
+++ b/debian/kafkatee.upstart
@@ -1,4 +1,4 @@
-description "kafkatee
+description "kafkatee"
 
 setuid kafkatee
 setgid kafkatee

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id755c7fdca19419705ef8a0afb42b9074dc9de0f
Gerrit-PatchSet: 1
Gerrit-Project: analytics/kafkatee
Gerrit-Branch: master
Gerrit-Owner: Jgreen 
Gerrit-Reviewer: Elukey 
Gerrit-Reviewer: Nuria 
Gerrit-Reviewer: Ottomata 

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


[MediaWiki-commits] [Gerrit] wikimedia...vendor[master]: More debugging

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

Change subject: More debugging
..


More debugging

Change-Id: I580fc86a4eaaabf526ee29050174643a5c464f18
---
M wikimedia/donation-interface/gateway_common/gateway.adapter.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/wikimedia/donation-interface/gateway_common/gateway.adapter.php 
b/wikimedia/donation-interface/gateway_common/gateway.adapter.php
index 554a7e4..c035be7 100644
--- a/wikimedia/donation-interface/gateway_common/gateway.adapter.php
+++ b/wikimedia/donation-interface/gateway_common/gateway.adapter.php
@@ -1304,7 +1304,7 @@
$enableCurlVerboseLogging = $this->getGlobal( 'CurlVerboseLog' 
);
 
curl_setopt_array( $ch, $curl_opts );
-
+   $this->logger->info( "URL: " . $curl_opts[CURLOPT_URL]);
// As suggested in the PayPal developer forum sample code, try 
more than once to get a
// response in case there is a general network issue
$continue = true;

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: mw.widgets.DateInputWidget: Fix unexpected MMMMM or ddddd da...

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

Change subject: mw.widgets.DateInputWidget: Fix unexpected M or d date 
format
..

mw.widgets.DateInputWidget: Fix unexpected M or d date format

In some locale data in moment.js such as zh,  date format already
uses  and . The original attempt to expand MMM to  and ddd
to  inadvertently expands  to M and  to d, which is
then interpreted as  or  followed by an unexpected single M or d.

Change-Id: I2634dfbaaf9615a13dce7b8f4ba3c3bea6863a91
---
M resources/src/mediawiki.widgets/mw.widgets.DateInputWidget.js
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/05/386305/1

diff --git a/resources/src/mediawiki.widgets/mw.widgets.DateInputWidget.js 
b/resources/src/mediawiki.widgets/mw.widgets.DateInputWidget.js
index f10c93d..0e7fc30 100644
--- a/resources/src/mediawiki.widgets/mw.widgets.DateInputWidget.js
+++ b/resources/src/mediawiki.widgets/mw.widgets.DateInputWidget.js
@@ -465,7 +465,8 @@
format = .replace( lll.replace( ll, '' ), '' );
 
if ( this.longDisplayFormat ) {
-   format = format.replace( 'MMM', '' 
).replace( 'ddd', '' );
+   format = format.replace( '', 'MMM' 
).replace( 'MMM', '' );
+   format = format.replace( '', 'ddd' 
).replace( 'ddd', '' );
}
 
return format;

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

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

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


[MediaWiki-commits] [Gerrit] labs/icinga2[master]: Revert "Fix service"

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

Change subject: Revert "Fix service"
..

Revert "Fix service"

This reverts commit 5f62805e5aeb1a798533b6a45b37be1073ea7cfc.

Change-Id: If6c93d48cd472b9cdc8b38e515c749779322a537
---
M templates/services.conf.erb
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/icinga2 
refs/changes/04/386304/1

diff --git a/templates/services.conf.erb b/templates/services.conf.erb
index 183ee3a..663f3a5 100644
--- a/templates/services.conf.erb
+++ b/templates/services.conf.erb
@@ -54,9 +54,10 @@
 
 apply Service "check gerrit ssh" {
   import "generic-service"
+  check_command = "nrpe-check-1arg"
   vars.port = host.vars.ssh_port
   vars.host = host.vars.address_ip
-  vars.check = "ssh"
+  vars.check = "check_ssh"
   assign where host.address == "gerrit-test3.git.eqiad.wmflabs"
 }
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If6c93d48cd472b9cdc8b38e515c749779322a537
Gerrit-PatchSet: 1
Gerrit-Project: labs/icinga2
Gerrit-Branch: master
Gerrit-Owner: Paladox 

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


[MediaWiki-commits] [Gerrit] labs/icinga2[master]: Fix service

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

Change subject: Fix service
..


Fix service

Change-Id: I5def6500d5c5a7a5cef129780509dac92c7d
---
M templates/services.conf.erb
1 file changed, 1 insertion(+), 2 deletions(-)

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



diff --git a/templates/services.conf.erb b/templates/services.conf.erb
index 663f3a5..183ee3a 100644
--- a/templates/services.conf.erb
+++ b/templates/services.conf.erb
@@ -54,10 +54,9 @@
 
 apply Service "check gerrit ssh" {
   import "generic-service"
-  check_command = "nrpe-check-1arg"
   vars.port = host.vars.ssh_port
   vars.host = host.vars.address_ip
-  vars.check = "check_ssh"
+  vars.check = "ssh"
   assign where host.address == "gerrit-test3.git.eqiad.wmflabs"
 }
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5def6500d5c5a7a5cef129780509dac92c7d
Gerrit-PatchSet: 2
Gerrit-Project: labs/icinga2
Gerrit-Branch: master
Gerrit-Owner: Paladox 
Gerrit-Reviewer: Paladox 

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


[MediaWiki-commits] [Gerrit] labs/icinga2[master]: Fix service

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

Change subject: Fix service
..

Fix service

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


  git pull ssh://gerrit.wikimedia.org:29418/labs/icinga2 
refs/changes/01/386301/1


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5def6500d5c5a7a5cef129780509dac92c7d
Gerrit-PatchSet: 1
Gerrit-Project: labs/icinga2
Gerrit-Branch: master
Gerrit-Owner: Paladox 

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


[MediaWiki-commits] [Gerrit] wikimedia...crm[deployment]: More debugging for orphan rectifier

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

Change subject: More debugging for orphan rectifier
..

More debugging for orphan rectifier

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


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/03/386303/1

diff --git a/vendor b/vendor
index ee12ae2..a59dbec 16
--- a/vendor
+++ b/vendor
@@ -1 +1 @@
-Subproject commit ee12ae2f1ac19d67e88d16cb9366a06bb503c2de
+Subproject commit a59dbec33176d79280621e9c5dbf47382ad251dd

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

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

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


[MediaWiki-commits] [Gerrit] wikimedia...vendor[master]: More debugging

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

Change subject: More debugging
..

More debugging

Change-Id: I580fc86a4eaaabf526ee29050174643a5c464f18
---
M wikimedia/donation-interface/gateway_common/gateway.adapter.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm/vendor 
refs/changes/02/386302/1

diff --git a/wikimedia/donation-interface/gateway_common/gateway.adapter.php 
b/wikimedia/donation-interface/gateway_common/gateway.adapter.php
index 554a7e4..c035be7 100644
--- a/wikimedia/donation-interface/gateway_common/gateway.adapter.php
+++ b/wikimedia/donation-interface/gateway_common/gateway.adapter.php
@@ -1304,7 +1304,7 @@
$enableCurlVerboseLogging = $this->getGlobal( 'CurlVerboseLog' 
);
 
curl_setopt_array( $ch, $curl_opts );
-
+   $this->logger->info( "URL: " . $curl_opts[CURLOPT_URL]);
// As suggested in the PayPal developer forum sample code, try 
more than once to get a
// response in case there is a general network issue
$continue = true;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I580fc86a4eaaabf526ee29050174643a5c464f18
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm/vendor
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] labs/icinga2[master]: Fix syntax error

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

Change subject: Fix syntax error
..

Fix syntax error

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


  git pull ssh://gerrit.wikimedia.org:29418/labs/icinga2 
refs/changes/00/386300/1


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I164a4cc6164bebb6f1ea66f035a194e02df2b6e0
Gerrit-PatchSet: 1
Gerrit-Project: labs/icinga2
Gerrit-Branch: master
Gerrit-Owner: Paladox 

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


[MediaWiki-commits] [Gerrit] labs/icinga2[master]: Fix syntax error

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

Change subject: Fix syntax error
..


Fix syntax error

Change-Id: I164a4cc6164bebb6f1ea66f035a194e02df2b6e0
---
M templates/services.conf.erb
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/templates/services.conf.erb b/templates/services.conf.erb
index 40bfbc9..663f3a5 100644
--- a/templates/services.conf.erb
+++ b/templates/services.conf.erb
@@ -58,7 +58,7 @@
   vars.port = host.vars.ssh_port
   vars.host = host.vars.address_ip
   vars.check = "check_ssh"
-  assign where host.address === "gerrit-test3.git.eqiad.wmflabs"
+  assign where host.address == "gerrit-test3.git.eqiad.wmflabs"
 }
 
 apply Service for (http_vhost => config in host.vars.http_vhosts) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I164a4cc6164bebb6f1ea66f035a194e02df2b6e0
Gerrit-PatchSet: 2
Gerrit-Project: labs/icinga2
Gerrit-Branch: master
Gerrit-Owner: Paladox 
Gerrit-Reviewer: Paladox 

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


[MediaWiki-commits] [Gerrit] mediawiki...PageForms[master]: Fixes issue for OutputPage.php: Title is null

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

Change subject: Fixes issue for OutputPage.php: Title is null
..

Fixes issue for OutputPage.php: Title is null

Code change as suggested by Yaron Koren

Bug: T165148
Change-Id: I4a66d597ead66656529414b7f2a3271c552ec188
---
M includes/PF_FormPrinter.php
1 file changed, 5 insertions(+), 3 deletions(-)


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

diff --git a/includes/PF_FormPrinter.php b/includes/PF_FormPrinter.php
index e2228ad..551e748 100644
--- a/includes/PF_FormPrinter.php
+++ b/includes/PF_FormPrinter.php
@@ -770,9 +770,11 @@
}
} else {
$form_is_disabled = true;
-   $wgOut->setPageTitle( wfMessage( 'badaccess' )->text() 
);
-   $wgOut->addWikiText( 
$wgOut->formatPermissionsErrorMessage( $permissionErrors, 'edit' ) );
-   $wgOut->addHTML( "\n\n" );
+   if ( $wgOut->getTitle() != null ) {
+   $wgOut->setPageTitle( wfMessage( 'badaccess' 
)->text() );
+   $wgOut->addWikiText( 
$wgOut->formatPermissionsErrorMessage( $permissionErrors, 'edit' ) );
+   $wgOut->addHTML( "\n\n" );
+   }
}
 
 // $oldParser = $wgParser;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4a66d597ead66656529414b7f2a3271c552ec188
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/PageForms
Gerrit-Branch: master
Gerrit-Owner: Kghbln 

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


[MediaWiki-commits] [Gerrit] labs/icinga2[master]: Add check gerrit ssh to service

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

Change subject: Add check gerrit ssh to service
..


Add check gerrit ssh to service

This is similar to mutante patch
https://gerrit.wikimedia.org/r/#/c/386258/

Change-Id: I62ebb4b5f41f554332a9a3a6268bb8a156af76c9
---
M templates/hosts.conf.erb
M templates/services.conf.erb
2 files changed, 12 insertions(+), 0 deletions(-)

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



diff --git a/templates/hosts.conf.erb b/templates/hosts.conf.erb
index 0e0ec30..6be7825 100644
--- a/templates/hosts.conf.erb
+++ b/templates/hosts.conf.erb
@@ -128,6 +128,9 @@
 object Host "gerrit-test3.git.eqiad.wmflabs" {
 import "generic-host"
 address = "gerrit-test3.git.eqiad.wmflabs"
+// floating ip
+vars.ssh_port = "29418"
+vars.address_ip = "208.80.155.149"
 vars.os = "Linux OS"
 vars.sla = "24x7"
 vars.host_name = "gerrit-test3.git.eqiad.wmflabs"
diff --git a/templates/services.conf.erb b/templates/services.conf.erb
index 87f9c46..40bfbc9 100644
--- a/templates/services.conf.erb
+++ b/templates/services.conf.erb
@@ -52,6 +52,15 @@
   assign where (host.address || host.address6) && (host.vars.os == "Linux" 
|| host.vars.os == "Linux OS") && host.vars.ssh_check != "disable"
 }
 
+apply Service "check gerrit ssh" {
+  import "generic-service"
+  check_command = "nrpe-check-1arg"
+  vars.port = host.vars.ssh_port
+  vars.host = host.vars.address_ip
+  vars.check = "check_ssh"
+  assign where host.address === "gerrit-test3.git.eqiad.wmflabs"
+}
+
 apply Service for (http_vhost => config in host.vars.http_vhosts) {
   import "generic-service"
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I62ebb4b5f41f554332a9a3a6268bb8a156af76c9
Gerrit-PatchSet: 3
Gerrit-Project: labs/icinga2
Gerrit-Branch: master
Gerrit-Owner: Paladox 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: Paladox 

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


[MediaWiki-commits] [Gerrit] wikimedia...crm[deployment]: Debugging for orphan rectifier

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

Change subject: Debugging for orphan rectifier
..


Debugging for orphan rectifier

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

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



diff --git a/vendor b/vendor
index 51a302b..ee12ae2 16
--- a/vendor
+++ b/vendor
@@ -1 +1 @@
-Subproject commit 51a302b1d763058b13fbe700488eac4bf97a46da
+Subproject commit ee12ae2f1ac19d67e88d16cb9366a06bb503c2de

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

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

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


[MediaWiki-commits] [Gerrit] wikimedia...vendor[master]: Debugging for orphan rectifier

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

Change subject: Debugging for orphan rectifier
..


Debugging for orphan rectifier

Change-Id: I8836cd995246160656f941ac6a9f642a8191d80f
---
M wikimedia/donation-interface/gateway_common/gateway.adapter.php
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/wikimedia/donation-interface/gateway_common/gateway.adapter.php 
b/wikimedia/donation-interface/gateway_common/gateway.adapter.php
index 396648a..554a7e4 100644
--- a/wikimedia/donation-interface/gateway_common/gateway.adapter.php
+++ b/wikimedia/donation-interface/gateway_common/gateway.adapter.php
@@ -1280,6 +1280,7 @@
 * that association outside of this log line.
 */
$this->logger->info( "Initiating cURL for donor $email" );
+   $this->logger->info( "Data: " . print_r( $data, true) );
 
// Initialize cURL and construct operation (also run filter)
$ch = curl_init();

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

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

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


[MediaWiki-commits] [Gerrit] wikimedia...crm[deployment]: Debugging for orphan rectifier

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

Change subject: Debugging for orphan rectifier
..

Debugging for orphan rectifier

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


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/91/386291/1

diff --git a/vendor b/vendor
index 51a302b..ee12ae2 16
--- a/vendor
+++ b/vendor
@@ -1 +1 @@
-Subproject commit 51a302b1d763058b13fbe700488eac4bf97a46da
+Subproject commit ee12ae2f1ac19d67e88d16cb9366a06bb503c2de

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[fundraising/REL1_27]: Update DI with revertion of PaymentNotIntiated

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

Change subject: Update DI with revertion of PaymentNotIntiated
..


Update DI with revertion of PaymentNotIntiated

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

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



diff --git a/extensions/DonationInterface b/extensions/DonationInterface
index 42943d0..214aecc 16
--- a/extensions/DonationInterface
+++ b/extensions/DonationInterface
@@ -1 +1 @@
-Subproject commit 42943d070b108320af1d5534a2bae91955f0526b
+Subproject commit 214aecc426c90336a1ea37729beb9fbec76afda2

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

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

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


[MediaWiki-commits] [Gerrit] wikimedia...vendor[master]: Debugging for orphan rectifier

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

Change subject: Debugging for orphan rectifier
..

Debugging for orphan rectifier

Change-Id: I8836cd995246160656f941ac6a9f642a8191d80f
---
M wikimedia/donation-interface/gateway_common/gateway.adapter.php
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm/vendor 
refs/changes/89/386289/1

diff --git a/wikimedia/donation-interface/gateway_common/gateway.adapter.php 
b/wikimedia/donation-interface/gateway_common/gateway.adapter.php
index 396648a..554a7e4 100644
--- a/wikimedia/donation-interface/gateway_common/gateway.adapter.php
+++ b/wikimedia/donation-interface/gateway_common/gateway.adapter.php
@@ -1280,6 +1280,7 @@
 * that association outside of this log line.
 */
$this->logger->info( "Initiating cURL for donor $email" );
+   $this->logger->info( "Data: " . print_r( $data, true) );
 
// Initialize cURL and construct operation (also run filter)
$ch = curl_init();

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8836cd995246160656f941ac6a9f642a8191d80f
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm/vendor
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...VisualEditor[master]: MWInternalLinkContextItem: increase specificity to override ...

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

Change subject: MWInternalLinkContextItem: increase specificity to override 
OOUI changes
..

MWInternalLinkContextItem: increase specificity to override OOUI changes

OOUI 8e31b2f273 increased changed various icon CSS rules, and increased their
specificity. Increase ours to match. This restores the correct size/ratio of
the images in the link context item.

Bug: T178933
Change-Id: I4f1a6dde363cf99f7665dc83f4b0fa6b1dd3c29e
---
M modules/ve-mw/ui/styles/contextitems/ve.ui.MWInternalLinkContextItem.css
1 file changed, 2 insertions(+), 2 deletions(-)


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

diff --git 
a/modules/ve-mw/ui/styles/contextitems/ve.ui.MWInternalLinkContextItem.css 
b/modules/ve-mw/ui/styles/contextitems/ve.ui.MWInternalLinkContextItem.css
index 60c38a1..4f4f569 100644
--- a/modules/ve-mw/ui/styles/contextitems/ve.ui.MWInternalLinkContextItem.css
+++ b/modules/ve-mw/ui/styles/contextitems/ve.ui.MWInternalLinkContextItem.css
@@ -10,7 +10,7 @@
white-space: normal;
 }
 
-.ve-ui-mwInternalLinkContextItem-withImage .oo-ui-iconElement-icon {
+.ve-ui-mwInternalLinkContextItem-withImage > 
.oo-ui-iconElement.oo-ui-iconElement-icon {
float: left;
width: 3.75em;
height: 3.75em;
@@ -25,7 +25,7 @@
background-size: cover;
 }
 
-.ve-ui-mwInternalLinkContextItem-withImage 
.ve-ui-mwInternalLinkContextItem-hasImage {
+.ve-ui-mwInternalLinkContextItem-withImage > 
.ve-ui-mwInternalLinkContextItem-hasImage.oo-ui-iconElement-icon {
border: 0;
background-size: cover;
opacity: 1;

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[fundraising/REL1_27]: Update DI with revertion of PaymentNotIntiated

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

Change subject: Update DI with revertion of PaymentNotIntiated
..

Update DI with revertion of PaymentNotIntiated

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


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/83/386283/1

diff --git a/extensions/DonationInterface b/extensions/DonationInterface
index 42943d0..214aecc 16
--- a/extensions/DonationInterface
+++ b/extensions/DonationInterface
@@ -1 +1 @@
-Subproject commit 42943d070b108320af1d5534a2bae91955f0526b
+Subproject commit 214aecc426c90336a1ea37729beb9fbec76afda2

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...DonationInterface[deployment]: Revert "Handle payment not initiated"

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

Change subject: Revert "Handle payment not initiated"
..


Revert "Handle payment not initiated"

This reverts commit 2eff18302b1736bef07428ea8e15fac84c7a43ab.

Change-Id: I70a45cbdfc5d3883aeb8502080d9778f646b5650
---
M paypal_gateway/express_checkout/paypal_express.adapter.php
1 file changed, 16 insertions(+), 28 deletions(-)

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



diff --git a/paypal_gateway/express_checkout/paypal_express.adapter.php 
b/paypal_gateway/express_checkout/paypal_express.adapter.php
index 8796f13..a509b37 100644
--- a/paypal_gateway/express_checkout/paypal_express.adapter.php
+++ b/paypal_gateway/express_checkout/paypal_express.adapter.php
@@ -440,16 +440,6 @@
case 'GetExpressCheckoutDetails':
$this->checkResponseAck( $response );
 
-   if ( $response['CHECKOUTSTATUS'] && 
$response['CHECKOUTSTATUS'] === 'PaymentActionNotInitiated' ) {
-   $this->finalizeInternalStatus( 
FinalStatus::PENDING );
-   
$this->transaction_response->setRedirect(
-   
$this->account_config['RedirectURL'] .
-   
$this->getData_Unstaged_Escaped( 'gateway_session_id' )
-   );
-   $fatal = false;
-   break;
-   }
-
// Merge response into our transaction data.
// TODO: Use getFormattedData instead.
// FIXME: We don't want to allow overwriting of 
ctid, need a
@@ -565,24 +555,22 @@
ResponseCodes::UNKNOWN );
}
 
-   if ( $this->getFinalStatus() !== FinalStatus::PENDING ) {
-   if ( $this->getData_Unstaged_Escaped( 'recurring' ) ) {
-   // Set up recurring billing agreement.
-   $this->addRequestData( array(
-   'date' => time()
-   ) );
-   $resultData = $this->do_transaction( 
'CreateRecurringPaymentsProfile' );
-   if ( !$resultData->getCommunicationStatus() ) {
-   throw new ResponseProcessingException(
-   'Failed to create a recurring 
profile', ResponseCodes::UNKNOWN );
-   }
-   } else {
-   // One-time payment, or initial payment in a 
subscription.
-   $resultData = $this->do_transaction( 
'DoExpressCheckoutPayment' );
-   if ( !$resultData->getCommunicationStatus() ) {
-   $this->finalizeInternalStatus( 
FinalStatus::FAILED );
-   return PaymentResult::newFailure();
-   }
+   if ( $this->getData_Unstaged_Escaped( 'recurring' ) ) {
+   // Set up recurring billing agreement.
+   $this->addRequestData( array(
+   'date' => time()
+   ) );
+   $resultData = $this->do_transaction( 
'CreateRecurringPaymentsProfile' );
+   if ( !$resultData->getCommunicationStatus() ) {
+   throw new ResponseProcessingException(
+   'Failed to create a recurring profile', 
ResponseCodes::UNKNOWN );
+   }
+   } else {
+   // One-time payment, or initial payment in a 
subscription.
+   $resultData = $this->do_transaction( 
'DoExpressCheckoutPayment' );
+   if ( !$resultData->getCommunicationStatus() ) {
+   $this->finalizeInternalStatus( 
FinalStatus::FAILED );
+   return PaymentResult::newFailure();
}
}
return PaymentResult::fromResults(

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I70a45cbdfc5d3883aeb8502080d9778f646b5650
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/DonationInterface
Gerrit-Branch: deployment
Gerrit-Owner: Mepps 
Gerrit-Reviewer: AndyRussG 
Gerrit-Reviewer: Ejegg 
Gerrit-Reviewer: Mepps 
Gerrit-Reviewer: XenoRyet 

___
MediaWiki-commits mail

[MediaWiki-commits] [Gerrit] operations/puppet[production]: beta: hieradata for varnish caches

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

Change subject: beta: hieradata for varnish caches
..


beta: hieradata for varnish caches

On labs the hieradata for roles are not looked up (T136080 T120165),
that causes the beta cluster caches to be half configured and fail.

Set cache::fe_transient_gb / be_transient_gb to 0
Add LE subjects which are required to generate a proper certificate.
Bunch of others settings required to generate the proper VCL
configuration.

Hiera configuration comes from Alex Monk.

Bug: T178841
Signed-off-by: Alex Monk 
Change-Id: I8e33fe82ef4eb09bd1ce1630b4028cb8d34e23ee
---
M hieradata/labs/deployment-prep/common.yaml
A hieradata/labs/deployment-prep/host/deployment-cache-text04.yaml
A hieradata/labs/deployment-prep/host/deployment-cache-upload04.yaml
3 files changed, 112 insertions(+), 0 deletions(-)

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



diff --git a/hieradata/labs/deployment-prep/common.yaml 
b/hieradata/labs/deployment-prep/common.yaml
index b4f7436..529dff7 100644
--- a/hieradata/labs/deployment-prep/common.yaml
+++ b/hieradata/labs/deployment-prep/common.yaml
@@ -356,3 +356,6 @@
 
 thumbor::logstash_host: 'deployment-logstash2.deployment-prep.eqiad.wmflabs'
 thumbor::logstash_port: 11514
+
+cache::be_transient_gb: 0
+cache::fe_transient_gb: 0
diff --git a/hieradata/labs/deployment-prep/host/deployment-cache-text04.yaml 
b/hieradata/labs/deployment-prep/host/deployment-cache-text04.yaml
new file mode 100644
index 000..a4e902a
--- /dev/null
+++ b/hieradata/labs/deployment-prep/host/deployment-cache-text04.yaml
@@ -0,0 +1,102 @@
+profile::cache::base::varnish_version: 5
+nginx::variant: extras
+cache::lua_support: true
+cluster: cache_text
+"cache::cluster": text
+"profile::cache::ssl::unified::le_subjects":
+- beta.wmflabs.org
+- www.wikimedia.beta.wmflabs.org
+- www.wikipedia.beta.wmflabs.org
+- www.wikibooks.beta.wmflabs.org
+- www.wiktionary.beta.wmflabs.org
+- commons.wikimedia.beta.wmflabs.org
+- commons.m.wikimedia.beta.wmflabs.org
+- deployment.wikimedia.beta.wmflabs.org
+- deployment.m.wikimedia.beta.wmflabs.org
+- en.wikibooks.beta.wmflabs.org
+- en.m.wikibooks.beta.wmflabs.org
+- en.wikinews.beta.wmflabs.org
+- en.m.wikinews.beta.wmflabs.org
+- en.wikiquote.beta.wmflabs.org
+- en.m.wikiquote.beta.wmflabs.org
+- en.wikisource.beta.wmflabs.org
+- en.m.wikisource.beta.wmflabs.org
+- en.wikiversity.beta.wmflabs.org
+- en.m.wikiversity.beta.wmflabs.org
+- en.wikivoyage.beta.wmflabs.org
+- en.m.wikivoyage.beta.wmflabs.org
+- en.wiktionary.beta.wmflabs.org
+- en.m.wiktionary.beta.wmflabs.org
+- login.wikimedia.beta.wmflabs.org
+- login.m.wikimedia.beta.wmflabs.org
+- meta.wikimedia.beta.wmflabs.org
+- meta.m.wikimedia.beta.wmflabs.org
+- test.wikimedia.beta.wmflabs.org
+- test.m.wikimedia.beta.wmflabs.org
+- wikidata.beta.wmflabs.org
+- m.wikidata.beta.wmflabs.org
+- zero.wikimedia.beta.wmflabs.org
+- zero.m.wikimedia.beta.wmflabs.org
+- aa.wikipedia.beta.wmflabs.org
+- aa.m.wikipedia.beta.wmflabs.org
+- aa.zero.wikipedia.beta.wmflabs.org
+- ar.wikipedia.beta.wmflabs.org
+- ar.m.wikipedia.beta.wmflabs.org
+- ar.zero.wikipedia.beta.wmflabs.org
+- ca.wikipedia.beta.wmflabs.org
+- ca.m.wikipedia.beta.wmflabs.org
+- ca.zero.wikipedia.beta.wmflabs.org
+- de.wikipedia.beta.wmflabs.org
+- de.m.wikipedia.beta.wmflabs.org
+- de.zero.wikipedia.beta.wmflabs.org
+- de.wiktionary.beta.wmflabs.org
+- de.m.wiktionary.beta.wmflabs.org
+- en-rtl.wikipedia.beta.wmflabs.org
+- en-rtl.m.wikipedia.beta.wmflabs.org
+- en-rtl.zero.wikipedia.beta.wmflabs.org
+- en.wikipedia.beta.wmflabs.org
+- en.m.wikipedia.beta.wmflabs.org
+- en.zero.wikipedia.beta.wmflabs.org
+- eo.wikipedia.beta.wmflabs.org
+- eo.m.wikipedia.beta.wmflabs.org
+- eo.zero.wikipedia.beta.wmflabs.org
+- es.wikipedia.beta.wmflabs.org
+- es.m.wikipedia.beta.wmflabs.org
+- es.zero.wikipedia.beta.wmflabs.org
+- fa.wikipedia.beta.wmflabs.org
+- fa.m.wikipedia.beta.wmflabs.org
+- fa.zero.wikipedia.beta.wmflabs.org
+- he.wikipedia.beta.wmflabs.org
+- he.m.wikipedia.beta.wmflabs.org
+- he.zero.wikipedia.beta.wmflabs.org
+- he.wiktionary.beta.wmflabs.org
+- he.m.wiktionary.beta.wmflabs.org
+- hi.wikipedia.beta.wmflabs.org
+- hi.m.wikipedia.beta.wmflabs.org
+- hi.zero.wikipedia.beta.wmflabs.org
+- ja.wikipedia.beta.wmflabs.org
+- ja.m.wikipedia.beta.wmflabs.org
+- ja.zero.wikipedia.beta.wmflabs.org
+- ko.wikipedia.beta.wmflabs.org
+- ko.m.wikipedia.beta.wmflabs.org
+- ko.zero.wikipedia.beta.wmflabs.org
+- nl.wikipedia.beta.wmflabs.org
+- nl.m.wikipedia.beta.wmflabs.org
+- n

[MediaWiki-commits] [Gerrit] analytics/kafkatee[master]: fix missing " in kafkatee.upstart

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

Change subject: fix missing " in kafkatee.upstart
..

fix missing " in kafkatee.upstart

Change-Id: Id755c7fdca19419705ef8a0afb42b9074dc9de0f
---
M debian/kafkatee.upstart
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/analytics/kafkatee 
refs/changes/77/386277/1

diff --git a/debian/kafkatee.upstart b/debian/kafkatee.upstart
index d991079..4aea276 100644
--- a/debian/kafkatee.upstart
+++ b/debian/kafkatee.upstart
@@ -1,4 +1,4 @@
-description "kafkatee
+description "kafkatee"
 
 setuid kafkatee
 setgid kafkatee

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id755c7fdca19419705ef8a0afb42b9074dc9de0f
Gerrit-PatchSet: 1
Gerrit-Project: analytics/kafkatee
Gerrit-Branch: master
Gerrit-Owner: Jgreen 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Gerrit: move LDAP spaces around for hostnames

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

Change subject: Gerrit: move LDAP spaces around for hostnames
..


Gerrit: move LDAP spaces around for hostnames

Current syntax leaves us with a trailing space which fights with
Gerrit's init process. This ends up leaving us with pointless diffs
on the subsequent puppet run after an upgrade.

Change-Id: I19ef45c1853ebb87bc3f3db4936f73dd960b22ca
---
M modules/gerrit/templates/gerrit.config.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/gerrit/templates/gerrit.config.erb 
b/modules/gerrit/templates/gerrit.config.erb
index 6133a9b..bd85289 100644
--- a/modules/gerrit/templates/gerrit.config.erb
+++ b/modules/gerrit/templates/gerrit.config.erb
@@ -116,7 +116,7 @@
 commentOnPatchSetCreated = false
 commentOnRefUpdatedGitWeb = false
 [ldap]
-server = <% @ldap_hosts.each do |ldap_host| %>ldaps://<%= ldap_host %> <% 
end %>
+server =<% @ldap_hosts.each do |ldap_host| %> ldaps://<%= ldap_host %><% 
end %>
 accountBase = ou=people,<%= @ldap_base_dn %>
 accountPattern = (&(objectClass=person)(cn=${username}))
 accountFullName = cn

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I19ef45c1853ebb87bc3f3db4936f73dd960b22ca
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Chad 
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] apps...wikipedia[master]: New: load another random article via floating action button.

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

Change subject: New: load another random article via floating action button.
..


New: load another random article via floating action button.

Bug: T158788
Change-Id: I63230aa16581f3f1f2cf6950ab176d126aa6dde5
---
M app/src/main/java/org/wikipedia/page/PageFragment.java
M app/src/main/java/org/wikipedia/page/PageToolbarHideHandler.java
M app/src/main/java/org/wikipedia/page/ViewHideHandler.java
M app/src/main/java/org/wikipedia/page/action/PageActionToolbarHideHandler.java
M app/src/main/res/layout/fragment_page.xml
M app/src/main/res/values-qq/strings.xml
M app/src/main/res/values/strings.xml
7 files changed, 98 insertions(+), 11 deletions(-)

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



diff --git a/app/src/main/java/org/wikipedia/page/PageFragment.java 
b/app/src/main/java/org/wikipedia/page/PageFragment.java
index dd71e8c..b9fe660 100755
--- a/app/src/main/java/org/wikipedia/page/PageFragment.java
+++ b/app/src/main/java/org/wikipedia/page/PageFragment.java
@@ -11,6 +11,8 @@
 import android.support.annotation.Nullable;
 import android.support.design.widget.BottomSheetDialog;
 import android.support.design.widget.BottomSheetDialogFragment;
+import android.support.design.widget.FloatingActionButton;
+import android.support.design.widget.Snackbar;
 import android.support.design.widget.TabLayout;
 import android.support.v4.app.Fragment;
 import android.support.v4.app.FragmentActivity;
@@ -61,6 +63,7 @@
 import org.wikipedia.page.shareafact.ShareHandler;
 import org.wikipedia.page.tabs.Tab;
 import org.wikipedia.page.tabs.TabsProvider;
+import org.wikipedia.random.RandomArticleRequestHandler;
 import org.wikipedia.readinglist.AddToReadingListDialog;
 import org.wikipedia.readinglist.ReadingList;
 import org.wikipedia.readinglist.ReadingListBookmarkMenu;
@@ -159,6 +162,8 @@
 private WikiDrawerLayout tocDrawer;
 private ConfigurableTabLayout tabLayout;
 private ToCHandler tocHandler;
+private FloatingActionButton randomButton;
+
 private CommunicationBridge bridge;
 private DarkModeSwitch darkModeSwitch;
 private LinkHandler linkHandler;
@@ -315,10 +320,20 @@
 tabLayout = rootView.findViewById(R.id.page_actions_tab_layout);
 tabLayout.addOnTabSelectedListener(pageActionTabListener);
 
-PageActionToolbarHideHandler pageActionToolbarHideHandler = new 
PageActionToolbarHideHandler(tabLayout);
-pageActionToolbarHideHandler.setScrollView(webView);
-
 errorView = rootView.findViewById(R.id.page_error);
+
+randomButton = rootView.findViewById(R.id.page_random_button);
+FeedbackUtil.setToolbarButtonLongPressToast(randomButton);
+randomButton.setOnClickListener(new View.OnClickListener() {
+@Override
+public void onClick(View v) {
+loadRandomPage();
+}
+});
+
+PageActionToolbarHideHandler pageActionToolbarHideHandler
+= new PageActionToolbarHideHandler(tabLayout, randomButton);
+pageActionToolbarHideHandler.setScrollView(webView);
 
 return rootView;
 }
@@ -692,6 +707,14 @@
 closePageScrollFunnel();
 pageFragmentLoadState.load(pushBackStack, stagedScrollY);
 updateBookmarkAndMenuOptions();
+
+if (entry.getSource() == HistoryEntry.SOURCE_RANDOM
+|| entry.getSource() == HistoryEntry.SOURCE_FEED_RANDOM
+|| entry.getSource() == 
HistoryEntry.SOURCE_APP_SHORTCUT_RANDOM) {
+randomButton.show();
+} else {
+randomButton.hide();
+}
 }
 
 public Bitmap getLeadImageBitmap() {
@@ -1006,6 +1029,40 @@
 }
 }
 
+private void loadRandomPage() {
+updateProgressBar(true, true, 0);
+randomButton.hide();
+RandomArticleRequestHandler.getRandomPage(new 
RandomArticleRequestHandler.Callback() {
+@Override
+public void onSuccess(@NonNull PageTitle pageTitle) {
+if (!isAdded()) {
+return;
+}
+updateProgressBar(false, true, 0);
+loadPage(pageTitle, new HistoryEntry(pageTitle, 
HistoryEntry.SOURCE_RANDOM));
+}
+
+@Override
+public void onError(Throwable t) {
+if (!isAdded()) {
+return;
+}
+updateProgressBar(false, true, 0);
+randomButton.show();
+Snackbar snackbar = FeedbackUtil.makeSnackbar(getActivity(), 
ThrowableUtil.isOffline(t)
+? 
getString(R.string.view_wiki_error_message_offline) : t.getMessage(),
+FeedbackUtil.LENGTH_DEFAULT);
+snackbar.setAction(R.string.page_error_retry, new 
View.OnCli

[MediaWiki-commits] [Gerrit] operations/puppet[production]: role::discovery: Fix stats/ML classes

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

Change subject: role::discovery: Fix stats/ML classes
..

role::discovery: Fix stats/ML classes

- Switches from py3 to py2 versions of packages (pip3 is not
  available as a provider in puppet 3.8.5 that we use)
- Removes python-pymc package (only available on Jessie, not
  Stretch)

Bug: T178096
Change-Id: Ifdf5b4f80c5e6522bfed09acc999530c63b36d02
---
M modules/profile/manifests/discovery_computing/base.pp
M modules/profile/manifests/discovery_computing/bayesian_statistics.pp
M modules/profile/manifests/discovery_computing/deep_learning.pp
M modules/profile/manifests/discovery_computing/forecasting.pp
M modules/profile/manifests/discovery_computing/machine_learning.pp
5 files changed, 34 insertions(+), 41 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/71/386271/1

diff --git a/modules/profile/manifests/discovery_computing/base.pp 
b/modules/profile/manifests/discovery_computing/base.pp
index b1e5b87..4c56d77 100644
--- a/modules/profile/manifests/discovery_computing/base.pp
+++ b/modules/profile/manifests/discovery_computing/base.pp
@@ -1,6 +1,6 @@
 # Provision for statistical computing and number crunching
 #
-# Install and configure R and install Discovery-specific essential R/Python
+# Install and configure R and install Discovery-specific essential R/Python2
 # packages for doing computationally-heavy statistics and machine learning.
 #
 # Due to the outdated version of R on the currently available Ubuntu version
@@ -16,18 +16,18 @@
 }
 
 $essentials = [
-'build-essential',# for building stuff
-'virtualenv', # Python virtual environment creator
-'python3-pip',# for installing py libs
-'python3-setuptools', # also for installing py libs
-'python3-wheel',  # built-package format for Python
-'liblapack-dev',  # Library of linear algebra routines
-'libgsl0-dev',# GNU Scientific Library
-'python3-dev',# header files and a static library for Python
-'python3-numpy',  # numerical library for Python
-'python3-scipy',  # scientific tools for Python
-'python3-pandas', # data structures for "relational" or "labeled" 
data
-'python3-requests',   # HTTP library for Python
+'build-essential',   # for building stuff
+'virtualenv',# Python virtual environment creator
+'python-pip',# for installing py libs
+'python-setuptools', # also for installing py libs
+'python-wheel',  # built-package format for Python
+'liblapack-dev', # Library of linear algebra routines
+'libgsl0-dev',   # GNU Scientific Library
+'python-dev',# header files and a static library for Python
+'python-numpy',  # numerical library for Python
+'python-scipy',  # scientific tools for Python
+'python-pandas', # data structures for "relational" or "labeled" 
data
+'python-requests',   # HTTP library for Python
 ]
 require_package($essentials)
 
diff --git 
a/modules/profile/manifests/discovery_computing/bayesian_statistics.pp 
b/modules/profile/manifests/discovery_computing/bayesian_statistics.pp
index b37758d..a00ba73 100644
--- a/modules/profile/manifests/discovery_computing/bayesian_statistics.pp
+++ b/modules/profile/manifests/discovery_computing/bayesian_statistics.pp
@@ -1,6 +1,6 @@
 # Provision for Bayesian statistics
 #
-# Install and configure R and install Discovery-specific essential R/Python
+# Install and configure R and install Discovery-specific essential R/Python2
 # packages for Markov chain Monte Carlo (MCMC) sampling when performing
 # Bayesian inference.
 #
@@ -17,11 +17,6 @@
 # filtertags: labs-project-discovery-stats
 class profile::discovery_computing::bayesian_statistics {
 require profile::discovery_computing::base
-
-$python_packages = [
-'python-pymc', # Bayesian Stochastic Modelling in Python 
(http://pymc-devs.github.io/pymc/)
-]
-require_package($python_packages)
 
 $r_packages = [
 'rstan',# R Interface to Stan
diff --git a/modules/profile/manifests/discovery_computing/deep_learning.pp 
b/modules/profile/manifests/discovery_computing/deep_learning.pp
index 5160423..c2edf4a 100644
--- a/modules/profile/manifests/discovery_computing/deep_learning.pp
+++ b/modules/profile/manifests/discovery_computing/deep_learning.pp
@@ -1,6 +1,6 @@
 # Provision for deep learning
 #
-# Install and configure R and install Discovery-specific essential R/Python
+# Install and configure R and install Discovery-specific essential R/Python2
 # packages for learning with deep neural networks. The R interfaces are
 # available through RStudio's reticulate 
(https://rstudio.github.io/reticulate/)
 #
@@ 

[MediaWiki-commits] [Gerrit] wikimedia/portals[master]: Fix nonsecure link to CC license page on Wikipedia portal.

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

Change subject: Fix nonsecure link to CC license page on Wikipedia portal.
..

Fix nonsecure link to CC license page on Wikipedia portal.

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


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/portals 
refs/changes/70/386270/1


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I86ab5582152078bf2e2b27e1f67547adc276b147
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/portals
Gerrit-Branch: master
Gerrit-Owner: MacFan4000 

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


[MediaWiki-commits] [Gerrit] wikimedia...tools[master]: Export civicrm_contact.hash to silverpop

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

Change subject: Export civicrm_contact.hash to silverpop
..


Export civicrm_contact.hash to silverpop

As contact_hash

Bug: T177663
Change-Id: I6e0ac25c1361d38946e2f9b35149ecd6f0ffbd93
---
M silverpop_export/tests/minimal_schema.sql
M silverpop_export/tests/test_update.py
M silverpop_export/update_table.sql
3 files changed, 26 insertions(+), 4 deletions(-)

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



diff --git a/silverpop_export/tests/minimal_schema.sql 
b/silverpop_export/tests/minimal_schema.sql
index 8d904bf..14dc894 100644
--- a/silverpop_export/tests/minimal_schema.sql
+++ b/silverpop_export/tests/minimal_schema.sql
@@ -20,6 +20,7 @@
 do_not_trade tinyint(4) default '1',
 is_opt_out tinyint(4) default '0',
 preferred_language varchar(32) COLLATE utf8_unicode_ci,
+hash varchar(32) COLLATE utf8_unicode_ci,
 first_name varchar(64) COLLATE utf8_unicode_ci,
 middle_name varchar(64) COLLATE utf8_unicode_ci,
 last_name varchar(64) COLLATE utf8_unicode_ci,
diff --git a/silverpop_export/tests/test_update.py 
b/silverpop_export/tests/test_update.py
index d9f9c19..8db6bca 100644
--- a/silverpop_export/tests/test_update.py
+++ b/silverpop_export/tests/test_update.py
@@ -250,6 +250,24 @@
 assert actual == expected
 
 
+def test_export_hash():
+'''
+Test that we export one record for a duplicate contact.
+'''
+
+run_update_with_fixtures(fixture_queries=["""
+insert into civicrm_email (contact_id, email, is_primary, on_hold) values
+(1, 'person1@localhost', 1, 0);
+""", """
+insert into civicrm_contact (id, hash) values
+(1, 'abfe829234baa87s76d');
+"""])
+
+cursor = conn.db_conn.cursor()
+cursor.execute("select contact_hash from silverpop_export")
+assert cursor.fetchone() == ('abfe829234baa87s76d',)
+
+
 def run_update_with_fixtures(fixture_path=None, fixture_queries=None):
 with mock.patch("database.db.Connection") as MockConnection:
 
diff --git a/silverpop_export/update_table.sql 
b/silverpop_export/update_table.sql
index 61e5ca5..4ca34ae 100755
--- a/silverpop_export/update_table.sql
+++ b/silverpop_export/update_table.sql
@@ -19,6 +19,7 @@
 
   -- General information about the contact
   contact_id int unsigned,
+  contact_hash varchar(32),
   first_name varchar(128),
   last_name varchar(128),
   preferred_language varchar(12),
@@ -68,9 +69,9 @@
 -- have an email address. ID is civicrm_email.id.
 -- (15 minutes)
 INSERT INTO silverpop_export_staging
-  (id, contact_id, email, first_name, last_name, preferred_language, opted_out)
+  (id, contact_id, contact_hash, email, first_name, last_name, 
preferred_language, opted_out)
   SELECT
-e.id, e.contact_id, e.email, c.first_name, c.last_name,
+e.id, e.contact_id, c.hash, e.email, c.first_name, c.last_name,
 REPLACE(c.preferred_language, '_', '-'),
 (c.is_opt_out OR c.do_not_email OR e.on_hold OR COALESCE(d.do_not_solicit, 
0))
   FROM civicrm.civicrm_email e
@@ -346,6 +347,7 @@
 
   -- General information about the contact
   contact_id int unsigned,
+  contact_hash varchar(32),
   first_name varchar(128),
   last_name varchar(128),
   preferred_language varchar(12),
@@ -386,12 +388,12 @@
 -- Move the data from the staging table into the persistent one
 -- (12 minutes)
 INSERT INTO silverpop_export (
-  id,contact_id,first_name,last_name,preferred_language,email,
+  id,contact_id,contact_hash,first_name,last_name,preferred_language,email,
   has_recurred_donation,highest_usd_amount,highest_native_amount,
   
highest_native_currency,highest_donation_date,lifetime_usd_total,donation_count,
   
latest_currency,latest_currency_symbol,latest_native_amount,latest_usd_amount,
   latest_donation, first_donation_date,city,country,state,postal_code,timezone 
)
-SELECT id,contact_id,first_name,last_name,preferred_language,email,
+SELECT 
id,contact_id,contact_hash,first_name,last_name,preferred_language,email,
   has_recurred_donation,highest_usd_amount,highest_native_amount,
   
highest_native_currency,highest_donation_date,lifetime_usd_total,donation_count,
   
latest_currency,latest_currency_symbol,latest_native_amount,latest_usd_amount,
@@ -403,6 +405,7 @@
 CREATE OR REPLACE VIEW silverpop_export_view AS
   SELECT
 contact_id ContactID,
+contact_hash,
 email,
 IFNULL(first_name, '') firstname,
 IFNULL(last_name, '') lastname,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6e0ac25c1361d38946e2f9b35149ecd6f0ffbd93
Gerrit-PatchSet: 2
Gerrit-Project: wikimedia/fundraising/tools
Gerrit-Branch: master
Gerrit-Owner: Ejegg 
Gerrit-Reviewer: Ejegg 
Gerrit-Reviewer: XenoRyet 
Gerrit-Reviewer: jenkins-bot <>


[MediaWiki-commits] [Gerrit] mediawiki...mobileapps[master]: Revert "Add fundraising test via announcement cards in France"

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

Change subject: Revert "Add fundraising test via announcement cards in France"
..

Revert "Add fundraising test via announcement cards in France"

The announcement period is over. No need to serve this anymore.

This reverts most of commit 5c32b64.
Left some of the test improvements and a useful comment in the route.

Bug: T177001
Change-Id: Ib32b954eff14779145877cbe9db98bd664482166
---
M lib/mobile-util.js
M routes/announcements.js
M spec.yaml
M test/features/announcements/announcements.js
4 files changed, 78 insertions(+), 66 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/mobileapps 
refs/changes/68/386268/1

diff --git a/lib/mobile-util.js b/lib/mobile-util.js
index 1653a98..cee4c5d 100644
--- a/lib/mobile-util.js
+++ b/lib/mobile-util.js
@@ -119,10 +119,6 @@
 return (domain === 'en.wikipedia.org' || domain === 
'en.wikipedia.beta.wmflabs.org');
 };
 
-mUtil.isFrenchWikipedia = function(domain) {
-return (domain === 'fr.wikipedia.org');
-};
-
 mUtil.removeFragment = function(href) {
 if (href.indexOf('#') > -1) {
 return href.substring(0, href.indexOf('#'));
diff --git a/routes/announcements.js b/routes/announcements.js
index 7007029..f37b786 100644
--- a/routes/announcements.js
+++ b/routes/announcements.js
@@ -8,53 +8,63 @@
  */
 const router = sUtil.router();
 
-function getFrwikiAnnouncements() {
+/* eslint-disable max-len */
+function getEnwikiAnnouncements() {
 // Notes: for iOS 'text' and 'action.title': HTML is not supported.
 // iOS uses image_url instead of the image Android uses.
 // iOS caption_HTML should be wrapped in  tag.
-
-// image_url: 
"https://upload.wikimedia.org/wikipedia/commons/8/8f/Reading_list_survey_-_iOS.png";,
-// image: 
"https://upload.wikimedia.org/wikipedia/commons/5/52/Reading_list_survey.png";,
-
 return [
-{
-id: "FR1017FRIOS",
-type: "fundraising",
-start_time: "2017-10-05T00:00:00Z",
-end_time: "2017-10-19T00:00:00Z",
-platforms: [
-"iOSApp",
-],
-text: "Le moment est venu de faire appel à vous.\n\nChers lecteurs 
en France, nous irons droit au but : aujourd’hui, nous vous demandons d’aider 
Wikipédia. Afin de protéger notre indépendance, nous ne diffuserons jamais de 
publicité. Nous sommes soutenus par des dons d’environ 10 € en moyenne. Nos 
lecteurs sont très peu nombreux à faire des dons. Si chaque personne qui lit ce 
message donnait 2 €, cela permettrait à Wikipédia de continuer à prospérer de 
nombreuses années. Le prix d’un café, c’est tout ce dont nous avons besoin. Si 
Wikipédia vous est utile, prenez une minute afin de maintenir cette plate-forme 
en ligne et lui permettre de continuer de croître. Merci.", // 
eslint-disable-line max-len
-action: {
-title: "Continuer",
-url: 
"https://donate.wikimedia.org/?uselang=fr&utm_medium=WikipediaAppFeed&utm_campaign=iOS&utm_source=app_201710_FR_control";
-},
-caption_HTML: "Un
 problème pour faire un don ? | Autres
 façons de donner | Questions
 fréquentes",
-countries: [
-"FR"
-]
-},
-{
-id: "FR1017FRANDROID",
-type: "fundraising",
-start_time: "2017-10-05T00:00:00Z",
-end_time: "2017-10-19T00:00:00Z",
-platforms: [
-"AndroidApp"
-],
-text: "Le moment est venu de faire appel à vous.Chers 
lecteurs en France, nous irons droit au but : aujourd’hui, nous vous demandons 
d’aider Wikipédia. Afin de protéger notre indépendance, nous ne diffuserons 
jamais de publicité. Nous sommes soutenus par des dons d’environ 10 € en 
moyenne. Nos lecteurs sont très peu nombreux à faire des dons. Si chaque 
personne qui lit ce message donnait 2 €, cela permettrait à Wikipédia de 
continuer à prospérer de nombreuses années. Le prix d’un café, c’est tout ce 
dont nous avons besoin. Si Wikipédia vous est utile, prenez une minute afin de 
maintenir cette plate-forme en ligne et lui permettre de continuer de croître. 
Merci.", // eslint-disable-line max-len
-action: {
-title: "Continuer",
-url: 
"https://donate.wikimedia.org/?uselang=fr&utm_medium=WikipediaAppFeed&utm_campaign=Android&utm_source=app_201710_FR_control";
-},
-caption_HTML: "Un
 problème pour faire un don ? | Autres
 façons de donner | Questions
 fréquentes",
-countries: [
-"FR"
-]
-}
+// {
+// id: "EN0517SURVEYIOS",
+// type: "survey",
+// start_time: "2017-05-26T00:00:00Z",
+// end_time: "2017-05-29T00:00:00Z",
+// platforms: [
+   

[MediaWiki-commits] [Gerrit] mediawiki/core[fundraising/REL1_27]: Update DonationInterface submodule

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

Change subject: Update DonationInterface submodule
..

Update DonationInterface submodule

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


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/69/386269/1

diff --git a/extensions/DonationInterface b/extensions/DonationInterface
index 42943d0..214aecc 16
--- a/extensions/DonationInterface
+++ b/extensions/DonationInterface
@@ -1 +1 @@
-Subproject commit 42943d070b108320af1d5534a2bae91955f0526b
+Subproject commit 214aecc426c90336a1ea37729beb9fbec76afda2

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

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

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


  1   2   3   4   >