[MediaWiki-commits] [Gerrit] Update restbase to 406a2c1 - change (mediawiki...deploy)

2016-05-23 Thread Mobrovac (Code Review)
Mobrovac has uploaded a new change for review.

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

Change subject: Update restbase to 406a2c1
..

Update restbase to 406a2c1

List of changes:
7830d3a Made revision parameter an integer (#617)
406a2c1 Removed summary and definition updates (#616)
xxx Update node module dependencies

Change-Id: Ifa17978cceb74e999afa5413abe2926a5b65
---
M node_modules/bl/package.json
M node_modules/content-type/package.json
M node_modules/hyperswitch/node_modules/json-stable-stringify/package.json
M node_modules/hyperswitch/node_modules/swagger-ui/package.json
M node_modules/json-stable-stringify/package.json
R node_modules/pinkie-promise/index.js
R node_modules/pinkie-promise/license
R node_modules/pinkie-promise/node_modules/pinkie/index.js
R node_modules/pinkie-promise/node_modules/pinkie/license
R node_modules/pinkie-promise/node_modules/pinkie/package.json
R node_modules/pinkie-promise/package.json
M 
node_modules/restbase-mod-table-cassandra/node_modules/cassandra-driver/package.json
M 
node_modules/restbase-mod-table-cassandra/node_modules/json-stable-stringify/package.json
M node_modules/service-runner/lib/base_service.js
M node_modules/service-runner/lib/docker.js
M node_modules/service-runner/lib/master.js
D node_modules/service-runner/node_modules/bluebird/js/browser/bluebird.core.js
D 
node_modules/service-runner/node_modules/bluebird/js/browser/bluebird.core.min.js
D node_modules/service-runner/node_modules/bluebird/js/browser/bluebird.js
D node_modules/service-runner/node_modules/bluebird/js/browser/bluebird.min.js
D node_modules/service-runner/node_modules/bluebird/js/release/any.js
D node_modules/service-runner/node_modules/bluebird/js/release/assert.js
D node_modules/service-runner/node_modules/bluebird/js/release/async.js
D node_modules/service-runner/node_modules/bluebird/js/release/bind.js
D node_modules/service-runner/node_modules/bluebird/js/release/bluebird.js
D node_modules/service-runner/node_modules/bluebird/js/release/call_get.js
D node_modules/service-runner/node_modules/bluebird/js/release/cancel.js
D node_modules/service-runner/node_modules/bluebird/js/release/catch_filter.js
D node_modules/service-runner/node_modules/bluebird/js/release/context.js
D node_modules/service-runner/node_modules/bluebird/js/release/debuggability.js
D node_modules/service-runner/node_modules/bluebird/js/release/direct_resolve.js
D node_modules/service-runner/node_modules/bluebird/js/release/each.js
D node_modules/service-runner/node_modules/bluebird/js/release/errors.js
D node_modules/service-runner/node_modules/bluebird/js/release/es5.js
D node_modules/service-runner/node_modules/bluebird/js/release/filter.js
D node_modules/service-runner/node_modules/bluebird/js/release/finally.js
D node_modules/service-runner/node_modules/bluebird/js/release/generators.js
D node_modules/service-runner/node_modules/bluebird/js/release/join.js
D node_modules/service-runner/node_modules/bluebird/js/release/map.js
D node_modules/service-runner/node_modules/bluebird/js/release/method.js
D node_modules/service-runner/node_modules/bluebird/js/release/nodeback.js
D node_modules/service-runner/node_modules/bluebird/js/release/nodeify.js
D node_modules/service-runner/node_modules/bluebird/js/release/promise.js
D node_modules/service-runner/node_modules/bluebird/js/release/promise_array.js
D node_modules/service-runner/node_modules/bluebird/js/release/promisify.js
D node_modules/service-runner/node_modules/bluebird/js/release/props.js
D node_modules/service-runner/node_modules/bluebird/js/release/queue.js
D node_modules/service-runner/node_modules/bluebird/js/release/race.js
D node_modules/service-runner/node_modules/bluebird/js/release/reduce.js
D node_modules/service-runner/node_modules/bluebird/js/release/schedule.js
D node_modules/service-runner/node_modules/bluebird/js/release/settle.js
D node_modules/service-runner/node_modules/bluebird/js/release/some.js
D 
node_modules/service-runner/node_modules/bluebird/js/release/synchronous_inspection.js
D node_modules/service-runner/node_modules/bluebird/js/release/thenables.js
D node_modules/service-runner/node_modules/bluebird/js/release/timers.js
D node_modules/service-runner/node_modules/bluebird/js/release/using.js
D node_modules/service-runner/node_modules/bluebird/js/release/util.js
D node_modules/service-runner/node_modules/bluebird/package.json
M node_modules/service-runner/node_modules/bunyan/package.json
D 
node_modules/service-runner/node_modules/limitation/node_modules/bluebird/LICENSE
D 
node_modules/service-runner/node_modules/limitation/node_modules/bluebird/js/browser/bluebird.core.js
D 
node_modules/service-runner/node_modules/limitation/node_modules/bluebird/js/browser/bluebird.core.min.js
D 
node_modules/service-runner/node_modules/limitation/node_modules/bluebird/js/browser/bluebird.js
D 

[MediaWiki-commits] [Gerrit] Remove prefixed box-shadow rules - change (mediawiki...Translate)

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

Change subject: Remove prefixed box-shadow rules
..


Remove prefixed box-shadow rules

These are optional and support is very wide spread. No point having
them increasing the file size.

Change-Id: I89548be6c655cb82307bba69a0bf07f689586e57
---
M resources/css/ext.translate.dropdownmenu.css
M resources/css/ext.translate.groupselector.css
M resources/css/ext.translate.messagetable.less
M resources/css/ext.translate.special.translate.css
4 files changed, 0 insertions(+), 8 deletions(-)

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



diff --git a/resources/css/ext.translate.dropdownmenu.css 
b/resources/css/ext.translate.dropdownmenu.css
index e2e5450..7133dcc 100644
--- a/resources/css/ext.translate.dropdownmenu.css
+++ b/resources/css/ext.translate.dropdownmenu.css
@@ -1,8 +1,6 @@
 .tux-dropdown-menu {
border: 1px solid #c9c9c9;
/* @noflip */
-   -webkit-box-shadow: 0 3px 3px -3px rgba(0, 0, 0, 0.5);
-   /* @noflip */
box-shadow: 0 3px 3px -3px rgba(0, 0, 0, 0.5);
font-size: 14px;
margin: 0;
diff --git a/resources/css/ext.translate.groupselector.css 
b/resources/css/ext.translate.groupselector.css
index 3b764a1..46096f1 100644
--- a/resources/css/ext.translate.groupselector.css
+++ b/resources/css/ext.translate.groupselector.css
@@ -15,8 +15,6 @@
border: 1px solid #888;
background-color: #F0F0F0;
border-radius: 5px;
-   -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
-   -moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
-webkit-background-clip: padding-box;
-moz-background-clip: padding;
diff --git a/resources/css/ext.translate.messagetable.less 
b/resources/css/ext.translate.messagetable.less
index 0378926..ca96d5b 100644
--- a/resources/css/ext.translate.messagetable.less
+++ b/resources/css/ext.translate.messagetable.less
@@ -106,7 +106,6 @@
padding: 15px;
top: 0;
background: #F0F0F0 16px 50%;
-   -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3), 0 0 20px rgba(0, 0, 
0, 0.1) inset;
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3), 0 0 20px rgba(0, 0, 0, 0.1) 
inset;
 }
 
@@ -119,7 +118,6 @@
 .tux-action-bar {
background-color: #F0F0F0;
color: #252525;
-   -webkit-box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
transition: width 250ms;
 }
diff --git a/resources/css/ext.translate.special.translate.css 
b/resources/css/ext.translate.special.translate.css
index 2c6e667..68f5bc3 100644
--- a/resources/css/ext.translate.special.translate.css
+++ b/resources/css/ext.translate.special.translate.css
@@ -180,8 +180,6 @@
padding-top: 5px;
border-bottom: 1px solid #777;
/* @noflip */
-   -webkit-box-shadow: 0 3px 3px -3px rgba(0, 0, 0, 0.5);
-   /* @noflip */
box-shadow: 0 3px 3px -3px rgba(0, 0, 0, 0.5);
font-size: 14px;
margin: 0;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I89548be6c655cb82307bba69a0bf07f689586e57
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Translate
Gerrit-Branch: master
Gerrit-Owner: Nikerabbit 
Gerrit-Reviewer: Santhosh 
Gerrit-Reviewer: Siebrand 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Use .background-image-svg mixin in message table - change (mediawiki...Translate)

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

Change subject: Use .background-image-svg mixin in message table
..


Use .background-image-svg mixin in message table

Fixes a bug where the fallback PNG image was wrong for this style:
  .tux-action-bar .page-mode-button.down:before

Change-Id: Ieeaa2bdfbe886aa5831f0cd434c97bd4db3fa455
---
M resources/css/ext.translate.messagetable.less
1 file changed, 14 insertions(+), 40 deletions(-)

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



diff --git a/resources/css/ext.translate.messagetable.less 
b/resources/css/ext.translate.messagetable.less
index fb59bc0..0378926 100644
--- a/resources/css/ext.translate.messagetable.less
+++ b/resources/css/ext.translate.messagetable.less
@@ -1,3 +1,5 @@
+@import "mediawiki.mixins";
+
 /* Default colors */
 .tux-messagelist {
color: #252525;
@@ -79,32 +81,22 @@
 }
 
 .tux-status-unsaved {
-   background-image: url(../images/label-pen.png);
-   background-image: -webkit-linear-gradient(transparent, transparent), 
url(../images/label-pen.svg);
-   /* @embed */
-   background-image: linear-gradient(transparent, transparent), 
url(../images/label-pen.svg);
+   .background-image-svg( '../images/label-pen.svg', 
'../images/label-pen.png' );
 }
 
 .tux-status-translated,
 .tux-status-proofread {
-   background-image: url(../images/label-tick.png);
-   background-image: -webkit-linear-gradient(transparent, transparent), 
url(../images/label-tick.svg);
-   /* @embed */
-   background-image: linear-gradient(transparent, transparent), 
url(../images/label-tick.svg);
+   .background-image-svg( '../images/label-tick.svg', 
'../images/label-tick.png' );
 }
 
 .tux-status-fuzzy {
-   background-image: url(../images/label-clock.png);
-   background-image: -webkit-linear-gradient(transparent, transparent), 
url(../images/label-clock.svg);
-   /* @embed */
-   background-image: linear-gradient(transparent, transparent), 
url(../images/label-clock.svg);
+   .background-image-svg( '../images/label-clock.svg', 
'../images/label-clock.png' );
 }
 
 .tux-list-edit a {
-   background: transparent url(../images/action-edit.png) left center 
no-repeat;
-   background-image: -webkit-linear-gradient(transparent, transparent), 
url(../images/action-edit.svg);
-   /* @embed */
-   background-image: linear-gradient(transparent, transparent), 
url(../images/action-edit.svg);
+   .background-image-svg( '../images/action-edit.svg', 
'../images/action-edit.png' );
+   background-position: left center;
+   background-repeat: no-repeat;
background-size: 18px 18px;
padding-left: 19px;
 }
@@ -206,17 +198,11 @@
 }
 
 .tux-action-bar .translate-mode-button:before {
-   background: transparent url(../images/view-list.png) center center 
no-repeat;
-   background-image: -webkit-linear-gradient(transparent, transparent), 
url(../images/view-list.svg);
-   /* @embed */
-   background-image: linear-gradient(transparent, transparent), 
url(../images/view-list.svg);
+   .background-image-svg( '../images/view-list.svg', 
'../images/view-list.png' );
 }
 
 .tux-action-bar .translate-mode-button.down:before {
-   background: transparent url(../images/view-list-hi.png) center center 
no-repeat;
-   background-image: -webkit-linear-gradient(transparent, transparent), 
url(../images/view-list-hi.svg);
-   /* @embed */
-   background-image: linear-gradient(transparent, transparent), 
url(../images/view-list-hi.svg);
+   .background-image-svg( '../images/view-list-hi.svg', 
'../images/view-list-hi.png' );
 }
 
 .tux-action-bar .page-mode-button {
@@ -224,17 +210,11 @@
 }
 
 .tux-action-bar .page-mode-button:before {
-   background: transparent url(../images/view-page.png) center center 
no-repeat;
-   background-image: -webkit-linear-gradient(transparent, transparent), 
url(../images/view-page.svg);
-   /* @embed */
-   background-image: linear-gradient(transparent, transparent), 
url(../images/view-page.svg);
+   .background-image-svg( '../images/view-page.svg', 
'../images/view-page.png' );
 }
 
 .tux-action-bar .page-mode-button.down:before {
-   background: transparent url(../images/view-list-hi.png) center center 
no-repeat;
-   background-image: -webkit-linear-gradient(transparent, transparent), 
url(../images/view-page-hi.svg);
-   /* @embed */
-   background-image: linear-gradient(transparent, transparent), 
url(../images/view-page-hi.svg);
+   .background-image-svg( '../images/view-page-hi.svg', 
'../images/view-page-hi.png' );
 }
 
 .tux-action-bar .proofread-mode-button {
@@ -242,17 +222,11 @@
 }
 
 .tux-action-bar .proofread-mode-button:before {
-   background: transparent url(../images/view-proofread.png) center center 
no-repeat;
-   background-image: 

[MediaWiki-commits] [Gerrit] Use less for messagetable styles - change (mediawiki...Translate)

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

Change subject: Use less for messagetable styles
..


Use less for messagetable styles

Required for future commits that use less features.

Change-Id: Ia6bd7461a0ed9c1e3687343608ccfa3f0b789254
---
M Resources.php
R resources/css/ext.translate.messagetable.less
2 files changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/Resources.php b/Resources.php
index 99c564a..55b3e71 100644
--- a/Resources.php
+++ b/Resources.php
@@ -151,7 +151,7 @@
 
 $wgResourceModules['ext.translate.messagetable'] = array(
'scripts' => 'resources/js/ext.translate.messagetable.js',
-   'styles' => 'resources/css/ext.translate.messagetable.css',
+   'styles' => 'resources/css/ext.translate.messagetable.less',
'position' => 'bottom',
'dependencies' => array(
'ext.translate.base',
diff --git a/resources/css/ext.translate.messagetable.css 
b/resources/css/ext.translate.messagetable.less
similarity index 100%
rename from resources/css/ext.translate.messagetable.css
rename to resources/css/ext.translate.messagetable.less

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia6bd7461a0ed9c1e3687343608ccfa3f0b789254
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Translate
Gerrit-Branch: master
Gerrit-Owner: Nikerabbit 
Gerrit-Reviewer: Santhosh 
Gerrit-Reviewer: Siebrand 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Use FormatJson in font repo generator script - change (mediawiki...UniversalLanguageSelector)

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

Change subject: Use FormatJson in font repo generator script
..


Use FormatJson in font repo generator script

The benefit of this is that '/' is no longer escaped, making
ext.uls.webfonts.repository.js file 376 bytes smaller. I expect
that the difference in compressed size is neglible.

Change-Id: I77c0b88fa23f2245f09615c354546b6a9ebf650c
---
M resources/js/ext.uls.webfonts.repository.js
M scripts/compile-font-repo.php
2 files changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/resources/js/ext.uls.webfonts.repository.js 
b/resources/js/ext.uls.webfonts.repository.js
index 850edca..caf3193 100644
--- a/resources/js/ext.uls.webfonts.repository.js
+++ b/resources/js/ext.uls.webfonts.repository.js
@@ -1,5 +1,5 @@
 // Do not edit! This file is generated from data/fontrepo by 
data/fontrepo/scripts/compile.php
 ( function ( $ ) {
$.webfonts = $.webfonts || {};
-   $.webfonts.repository = 
{"base":"..\/data\/fontrepo\/fonts\/","languages":{"adx":["Jomolhari"],"af":["system","OpenDyslexic"],"ahr":["Lohit
 
Marathi"],"akk":["Akkadian"],"am":["AbyssinicaSIL"],"ang":["system","Junicode"],"ar":["system","Amiri"],"arb":["system","Amiri"],"arc":["Estrangelo
 Edessa","East Syriac Adiabene","SertoUrhoy"],"as":["system","Lohit 
Assamese"],"bbc":["system","Pangururan"],"bh":["Lohit 
Devanagari"],"bho":["Lohit 
Devanagari"],"bk":["system","OpenDyslexic"],"bn":["Siyam Rupali","Lohit 
Bengali"],"bo":["Jomolhari"],"bod":["Jomolhari"],"bpy":["Siyam Rupali","Lohit 
Bengali"],"btk":["system","Pangururan"],"bug":["Saweri"],"ca":["system","OpenDyslexic"],"cdo":["system","CharisSIL"],"ckb":["system","Lateef","Scheherazade","Amiri"],"cr":["OskiEast"],"cy":["system","ComicNeue","OpenDyslexic"],"da":["system","OpenDyslexic"],"de":["system","OpenDyslexic"],"dre":["Jomolhari"],"dv":["FreeFont-Thaana"],"dz":["Jomolhari"],"en":["system","ComicNeue","OpenDyslexic"],"es":["system","OpenDyslexic"],"et":["system","OpenDyslexic"],"fa":["system","Iranian
 Sans","Iranian 
Serif","Lateef","Nazli","Scheherazade"],"fi":["system","OpenDyslexic"],"fo":["system","OpenDyslexic"],"fr":["system","OpenDyslexic"],"fy":["system","OpenDyslexic"],"ga":["system","OpenDyslexic"],"gd":["system","OpenDyslexic"],"gez":["AbyssinicaSIL"],"gl":["system","OpenDyslexic"],"goe":["Jomolhari"],"gom":["Lohit
 Devanagari"],"got":["system","Skeirs 
II"],"grc":["system","GentiumPlus"],"gu":["Lohit Gujarati"],"hbo":["Taamey 
Frank CLM","Alef"],"he":["system","Alef","Miriam CLM","Taamey Frank 
CLM"],"hi":["Lohit 
Devanagari"],"hu":["system","OpenDyslexic"],"hut":["Jomolhari"],"id":["system","ComicNeue","OpenDyslexic"],"ii":["Nuosu
 
SIL"],"is":["system","OpenDyslexic"],"it":["system","OpenDyslexic"],"iu":["system","OskiEast"],"jv":["system","Tuladha
 Jejeg"],"jv-java":["Tuladha 
Jejeg"],"kbg":["Jomolhari"],"khg":["Jomolhari"],"km":["KhmerOSbattambang","Hanuman","KhmerOS","Nokora
 Regular","Suwannaphum"],"kn":["Lohit Kannada","Gubbi"],"kok":["Lohit 
Devanagari"],"kte":["Jomolhari"],"lb":["system","OpenDyslexic"],"lbj":["Jomolhari"],"lhm":["Jomolhari"],"li":["system","OpenDyslexic"],"lo":["Phetsarath"],"loy":["Jomolhari"],"luk":["Jomolhari"],"lya":["Jomolhari"],"mai":["Lohit
 
Devanagari"],"mak":["Saweri"],"mi":["system","OpenDyslexic"],"ml":["system","AnjaliOldLipi","Meera"],"mr":["Lohit
 
Marathi"],"ms":["system","ComicNeue","OpenDyslexic"],"muk":["Jomolhari"],"mul":["system","Autonym"],"my":["TharLon","Myanmar3","Padauk"],"nan":["system","CharisSIL","Doulos
 SIL"],"nb":["system","OpenDyslexic"],"ne":["Lohit 
Nepali","Madan"],"nl":["system","ComicNeue","OpenDyslexic"],"oc":["system","OpenDyslexic"],"ola":["Jomolhari"],"or":["Lohit
 Odia","Utkal"],"otb":["Jomolhari"],"pa":["Lohit 
Punjabi","Saab"],"pal":["Shapour"],"peo":["Artaxerxes"],"pl":["system","OpenDyslexic"],"pt":["system","OpenDyslexic"],"sa":["Lohit
 
Devanagari"],"saz":["Pagul"],"si":["system","lklug"],"sq":["system","OpenDyslexic"],"sux":["Akkadian"],"sv":["system","OpenDyslexic"],"sw":["system","ComicNeue","OpenDyslexic"],"syc":["Estrangelo
 Edessa","East Syriac Adiabene","SertoUrhoy"],"ta":["system","Lohit 
Tamil","Lohit Tamil 
Classical","Thendral","Thenee"],"tcn":["Jomolhari"],"tcy":["Lohit 
Kannada","Gubbi"],"te":["Lohit 
Telugu"],"thw":["Jomolhari"],"ti":["AbyssinicaSIL"],"tig":["AbyssinicaSIL"],"tl":["system","ComicNeue","OpenDyslexic"],"tr":["system","OpenDyslexic"],"tsk":["Jomolhari"],"ur":["system","Hussaini
 

[MediaWiki-commits] [Gerrit] Increase the number of stored previously selected languages ... - change (mediawiki...UniversalLanguageSelector)

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

Change subject: Increase the number of stored previously selected languages to 9
..


Increase the number of stored previously selected languages to 9

Discussion about the magic number in the task.

Bug: T135487
Change-Id: I5d0900f191cf277faa19d73de9cf393216d5e6ea
---
M resources/js/ext.uls.init.js
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/resources/js/ext.uls.init.js b/resources/js/ext.uls.init.js
index 1f70448..5fd58ee 100644
--- a/resources/js/ext.uls.init.js
+++ b/resources/js/ext.uls.init.js
@@ -72,7 +72,7 @@
try {
localStorage.setItem(
mw.uls.previousLanguagesStorageKey,
-   JSON.stringify( previousLanguages.slice( 0, 5 ) 
)
+   JSON.stringify( previousLanguages.slice( 0, 9 ) 
)
);
} catch ( e ) {}
};
@@ -87,7 +87,7 @@
);
} catch ( e ) {}
 
-   return previousLanguages.slice( 0, 5 );
+   return previousLanguages.slice( 0, 9 );
};
 
/**

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5d0900f191cf277faa19d73de9cf393216d5e6ea
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector
Gerrit-Branch: master
Gerrit-Owner: Nikerabbit 
Gerrit-Reviewer: Santhosh 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Remove dependency on jquery.uls.compact - change (mediawiki...ContentTranslation)

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

Change subject: Remove dependency on jquery.uls.compact
..


Remove dependency on jquery.uls.compact

This was dropped from ULS and is now the default.

Change-Id: Ie0e35d1efa6f9a659e7dc7be76c8d33f972e7ae3
---
M extension.json
M modules/source/ext.cx.source.selector.js
2 files changed, 2 insertions(+), 5 deletions(-)

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



diff --git a/extension.json b/extension.json
index 7dcd870..01731a1 100644
--- a/extension.json
+++ b/extension.json
@@ -387,7 +387,6 @@
"ext.uls.mediawiki",
"jquery.suggestions",
"jquery.throttle-debounce",
-   "jquery.uls.compact",
"mediawiki.storage",
"mediawiki.ui.button"
],
diff --git a/modules/source/ext.cx.source.selector.js 
b/modules/source/ext.cx.source.selector.js
index a6b1533..6357bf0 100644
--- a/modules/source/ext.cx.source.selector.js
+++ b/modules/source/ext.cx.source.selector.js
@@ -276,8 +276,7 @@
return mw.uls.getFrequentLanguageList().filter( 
function ( n ) {
return targetLanguageCodes.indexOf( n ) 
!== -1;
} );
-   },
-   compact: true
+   }
} );
};
 
@@ -778,8 +777,7 @@
return mw.uls.getFrequentLanguageList().filter( 
function ( n ) {
return 
cxSourceSelector.sourceLanguages.indexOf( n ) !== -1;
} );
-   },
-   compact: true
+   }
} );
 
$sourceLanguageContainer = $( '' )

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie0e35d1efa6f9a659e7dc7be76c8d33f972e7ae3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ContentTranslation
Gerrit-Branch: master
Gerrit-Owner: Nikerabbit 
Gerrit-Reviewer: Santhosh 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Make previous languages have most recent in the beginning - change (mediawiki...UniversalLanguageSelector)

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

Change subject: Make previous languages have most recent in the beginning
..


Make previous languages have most recent in the beginning

This is already expected by the callers. Added addPreviousLanguage
to make updating the list easier.

Change-Id: Ie4f888235ea4de4a2ce6bf5a9f24955e423e8c48
---
M resources/js/ext.uls.compactlinks.js
M resources/js/ext.uls.init.js
M resources/js/ext.uls.interface.js
3 files changed, 24 insertions(+), 13 deletions(-)

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



diff --git a/resources/js/ext.uls.compactlinks.js 
b/resources/js/ext.uls.compactlinks.js
index 5fddbbb..9bcd2fb 100644
--- a/resources/js/ext.uls.compactlinks.js
+++ b/resources/js/ext.uls.compactlinks.js
@@ -121,13 +121,8 @@
 * @param {string} language language code
 */
onSelect: function ( language ) {
-   var previousLanguages = 
mw.uls.getPreviousLanguages();
-
self.$trigger.removeClass( 
'selector-open' );
-
-   previousLanguages.push( language );
-   previousLanguages = unique( 
previousLanguages );
-   mw.uls.setPreviousLanguages( 
previousLanguages );
+   mw.uls.addPreviousLanguage( language );
location.href = self.interlanguageList[ 
language ].href;
},
onVisible: function () {
diff --git a/resources/js/ext.uls.init.js b/resources/js/ext.uls.init.js
index 6cf4eee..1f70448 100644
--- a/resources/js/ext.uls.init.js
+++ b/resources/js/ext.uls.init.js
@@ -72,7 +72,7 @@
try {
localStorage.setItem(
mw.uls.previousLanguagesStorageKey,
-   JSON.stringify( previousLanguages.slice( -5 ) )
+   JSON.stringify( previousLanguages.slice( 0, 5 ) 
)
);
} catch ( e ) {}
};
@@ -87,7 +87,24 @@
);
} catch ( e ) {}
 
-   return previousLanguages.slice( -5 );
+   return previousLanguages.slice( 0, 5 );
+   };
+
+   /**
+* Add a selected language to the list of previously selected languages.
+*
+* @param {string} language Language code.
+* @since 2016.05
+*/
+   mw.uls.addPreviousLanguage = function ( language ) {
+   var languages = mw.uls.getPreviousLanguages();
+
+   // Avoid duplicates
+   languages = $.map( languages, function ( element ) {
+   return element === language ? undefined : element;
+   } );
+   languages.unshift( language );
+   mw.uls.setPreviousLanguages( languages );
};
 
/**
diff --git a/resources/js/ext.uls.interface.js 
b/resources/js/ext.uls.interface.js
index db6e662..5f9ed09 100644
--- a/resources/js/ext.uls.interface.js
+++ b/resources/js/ext.uls.interface.js
@@ -203,14 +203,14 @@
}
 
function userHasChangedLanguage() {
-   var previousLang = mw.uls.getPreviousLanguages().slice( -1 )[ 0 
],
+   var previousLang = mw.uls.getPreviousLanguages()[ 0 ],
currentLang = mw.config.get( 'wgUserLanguage' );
 
// Changed language is saved in showUndoTooltip, which is never
// called if previousLang is not defined, which will never be
// defined unless we do it now.
if ( previousLang === undefined ) {
-   mw.uls.setPreviousLanguages( [ currentLang ] );
+   mw.uls.addPreviousLanguage( currentLang );
}
 
return previousLang && previousLang !== currentLang;
@@ -275,10 +275,9 @@
}
 
previousLanguages = mw.uls.getPreviousLanguages();
-   previousLang = previousLanguages.slice( -1 )[ 0 ];
+   previousLang = previousLanguages[ 0 ];
 
-   previousLanguages.push( currentLang );
-   mw.uls.setPreviousLanguages( previousLanguages );
+   mw.uls.addPreviousLanguage( currentLang );
 
getUndoAutonym( previousLang ).done( function ( autonym ) {
// Attach a tipsy tooltip to the trigger

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie4f888235ea4de4a2ce6bf5a9f24955e423e8c48
Gerrit-PatchSet: 4
Gerrit-Project: 

[MediaWiki-commits] [Gerrit] Contributionsmenu campaign: avoid raw html message - change (mediawiki...ContentTranslation)

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

Change subject: Contributionsmenu campaign: avoid raw html message
..


Contributionsmenu campaign: avoid raw html message

The new parseDom method can be used to mimic the PHP side rawParams().

Change-Id: I6149427302bc7f7d7a794d35cf7d618f7f4d9aec
---
M extension.json
M modules/campaigns/ext.cx.campaigns.contributionsmenu.js
2 files changed, 4 insertions(+), 3 deletions(-)

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



diff --git a/extension.json b/extension.json
index 7dcd870..2e0be9a 100644
--- a/extension.json
+++ b/extension.json
@@ -1060,6 +1060,7 @@
"dependencies": [
"ext.cx.widgets.callout",
"jquery.client",
+   "mediawiki.jqueryMsg",
"mediawiki.ui.button",
"mediawiki.Uri",
"mediawiki.util"
diff --git a/modules/campaigns/ext.cx.campaigns.contributionsmenu.js 
b/modules/campaigns/ext.cx.campaigns.contributionsmenu.js
index cf6067c..81fff6a 100644
--- a/modules/campaigns/ext.cx.campaigns.contributionsmenu.js
+++ b/modules/campaigns/ext.cx.campaigns.contributionsmenu.js
@@ -34,10 +34,10 @@
 
$expansion = $( '' )
.addClass( 
'cx-campaign-contributionsmenu__expansion' )
-   .html( mw.msg(
+   .append( mw.message(

'cx-campaign-contributionsmenu-might-be-available',
-   $pageTitle[ 0 ].outerHTML
-   ) );
+   $pageTitle
+   ).parseDom() );
 
cxUrlParams.targettitle = mw.config.get( 'wgTitle' );
} else {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6149427302bc7f7d7a794d35cf7d618f7f4d9aec
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ContentTranslation
Gerrit-Branch: master
Gerrit-Owner: Nikerabbit 
Gerrit-Reviewer: Amire80 
Gerrit-Reviewer: Nikerabbit 
Gerrit-Reviewer: Santhosh 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Use PROTO_CURRENT for paypal urls - change (mediawiki...DonationInterface)

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

Change subject: Use PROTO_CURRENT for paypal urls
..


Use PROTO_CURRENT for paypal urls

I was getting ones that start with // and the api pukes.
This is due to a weird vagrant override in settings.d
Either way, we should never send URLs that start with //

Bug: T131811
Change-Id: Ibee3d9b4605b77dfcabee12b42e80ca88588e698
---
M gateway_common/ResultPages.php
M globalcollect_gateway/globalcollect.adapter.php
M paypal_gateway/express_checkout/PaypalExpressReturnUrl.php
3 files changed, 3 insertions(+), 3 deletions(-)

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



diff --git a/gateway_common/ResultPages.php b/gateway_common/ResultPages.php
index d7d02ba..8c743f5 100644
--- a/gateway_common/ResultPages.php
+++ b/gateway_common/ResultPages.php
@@ -136,7 +136,7 @@
return $url;
} else { // this isn't a url yet.
$returnTitle = Title::newFromText( $url );
-   $url = $returnTitle->getFullURL();
+   $url = $returnTitle->getFullURL( false, false, 
PROTO_CURRENT );
return $url;
}
}
diff --git a/globalcollect_gateway/globalcollect.adapter.php 
b/globalcollect_gateway/globalcollect.adapter.php
index bbd83ef..75c5f0d 100644
--- a/globalcollect_gateway/globalcollect.adapter.php
+++ b/globalcollect_gateway/globalcollect.adapter.php
@@ -64,7 +64,7 @@
 */
function setGatewayDefaults( $options = array ( ) ) {
$returnTitle = isset( $options['returnTitle'] ) ? 
$options['returnTitle'] : Title::newFromText( 
'Special:GlobalCollectGatewayResult' );
-   $returnTo = isset( $options['returnTo'] ) ? 
$options['returnTo'] : $returnTitle->getFullURL();
+   $returnTo = isset( $options['returnTo'] ) ? 
$options['returnTo'] : $returnTitle->getFullURL( false, false, PROTO_CURRENT );
 
$defaults = array (
'returnto' => $returnTo,
diff --git a/paypal_gateway/express_checkout/PaypalExpressReturnUrl.php 
b/paypal_gateway/express_checkout/PaypalExpressReturnUrl.php
index 76b32b4..dbd1985 100644
--- a/paypal_gateway/express_checkout/PaypalExpressReturnUrl.php
+++ b/paypal_gateway/express_checkout/PaypalExpressReturnUrl.php
@@ -6,6 +6,6 @@
$staged['returnto'] = $returnTitle->getFullURL( array(
'order_id' => $normalized['order_id'],
'wmf_token' => $adapter->token_getSaltedSessionToken(),
-   ) );
+   ), false, PROTO_CURRENT );
}
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibee3d9b4605b77dfcabee12b42e80ca88588e698
Gerrit-PatchSet: 6
Gerrit-Project: mediawiki/extensions/DonationInterface
Gerrit-Branch: master
Gerrit-Owner: Cdentinger 
Gerrit-Reviewer: AndyRussG 
Gerrit-Reviewer: Cdentinger 
Gerrit-Reviewer: Ejegg 
Gerrit-Reviewer: Ssmith 
Gerrit-Reviewer: XenoRyet 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Implement IsoDate - change (mediawiki...DonationInterface)

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

Change subject: Implement IsoDate
..


Implement IsoDate

Stages and unstages for any gateway that talks in ISO 8601 dates.

Change-Id: I83f2ab6ea8dab6b528553140511a5a09460ba806
---
M DonationInterface.php
A gateway_common/IsoDate.php
M paypal_gateway/express_checkout/config/transformers.yaml
3 files changed, 23 insertions(+), 0 deletions(-)

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



diff --git a/DonationInterface.php b/DonationInterface.php
index 118e9fa..5343d6c 100644
--- a/DonationInterface.php
+++ b/DonationInterface.php
@@ -59,6 +59,7 @@
 $wgAutoloadClasses['GatewayAdapter'] = __DIR__ . 
'/gateway_common/gateway.adapter.php';
 $wgAutoloadClasses['GatewayPage'] = __DIR__ . 
'/gateway_common/GatewayPage.php';
 $wgAutoloadClasses['GatewayType'] = __DIR__ . 
'/gateway_common/GatewayType.php';
+$wgAutoloadClasses['IsoDate'] = __DIR__ . '/gateway_common/IsoDate.php';
 $wgAutoloadClasses['DataValidator'] = __DIR__ . 
'/gateway_common/DataValidator.php';
 $wgAutoloadClasses['LogPrefixProvider'] = __DIR__ . 
'/gateway_common/gateway.adapter.php';
 $wgAutoloadClasses['MessageUtils'] = __DIR__ . 
'/gateway_common/MessageUtils.php';
diff --git a/gateway_common/IsoDate.php b/gateway_common/IsoDate.php
new file mode 100644
index 000..3a374d9
--- /dev/null
+++ b/gateway_common/IsoDate.php
@@ -0,0 +1,21 @@
+https://gerrit.wikimedia.org/r/287171
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I83f2ab6ea8dab6b528553140511a5a09460ba806
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/DonationInterface
Gerrit-Branch: master
Gerrit-Owner: Awight 
Gerrit-Reviewer: AndyRussG 
Gerrit-Reviewer: Awight 
Gerrit-Reviewer: Cdentinger 
Gerrit-Reviewer: Ejegg 
Gerrit-Reviewer: Ssmith 
Gerrit-Reviewer: XenoRyet 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Rough PayPal Express Checkout integration - change (mediawiki...DonationInterface)

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

Change subject: Rough PayPal Express Checkout integration
..


Rough PayPal Express Checkout integration

This patch exposes a paypal_ec gateway, capable of getting a donation through
to completion.  Many ridiculously sharp edges.

Bug: T131811
Change-Id: I65deb86ef32dfd61ad6be85e15214d41aa563508
---
M DonationInterface.php
M gateway_common/gateway.adapter.php
A paypal_gateway/express_checkout/PaypalExpressReturnUrl.php
A paypal_gateway/express_checkout/config/account.yaml
A paypal_gateway/express_checkout/config/currencies.yaml
A paypal_gateway/express_checkout/config/payment_methods.yaml
A paypal_gateway/express_checkout/config/transformers.yaml
A paypal_gateway/express_checkout/config/var_map.yaml
A paypal_gateway/express_checkout/paypal_express.adapter.php
A paypal_gateway/express_checkout/paypal_express_gateway.body.php
A paypal_gateway/express_checkout/paypal_express_resultswitcher.body.php
M paypal_gateway/paypal_gateway.alias.php
A tests/Adapter/PayPal/PayPalExpressTest.php
13 files changed, 409 insertions(+), 2 deletions(-)

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



diff --git a/DonationInterface.php b/DonationInterface.php
index 072baea..118e9fa 100644
--- a/DonationInterface.php
+++ b/DonationInterface.php
@@ -116,8 +116,12 @@
 
 // Paypal
 $wgAutoloadClasses['CleanupRecurringLength'] = __DIR__ . 
'/paypal_gateway/CleanupRecurringLength.php';
-$wgAutoloadClasses['PaypalLegacyGateway'] = __DIR__ . 
'/paypal_gateway/legacy/paypal_legacy_gateway.body.php';
+$wgAutoloadClasses['PaypalExpressAdapter'] = __DIR__ . 
'/paypal_gateway/express_checkout/paypal_express.adapter.php';
+$wgAutoloadClasses['PaypalExpressGateway'] = __DIR__ . 
'/paypal_gateway/express_checkout/paypal_express_gateway.body.php';
+$wgAutoloadClasses['PaypalExpressGatewayResult'] = __DIR__ . 
'/paypal_gateway/express_checkout/paypal_express_resultswitcher.body.php';
+$wgAutoloadClasses['PaypalExpressReturnUrl'] = __DIR__ . 
'/paypal_gateway/express_checkout/PaypalExpressReturnUrl.php';
 $wgAutoloadClasses['PaypalLegacyAdapter'] = __DIR__ . 
'/paypal_gateway/legacy/paypal_legacy.adapter.php';
+$wgAutoloadClasses['PaypalLegacyGateway'] = __DIR__ . 
'/paypal_gateway/legacy/paypal_legacy_gateway.body.php';
 $wgAutoloadClasses['PaypalLegacyLocale'] = __DIR__ . 
'/paypal_gateway/legacy/PaypalLegacyLocale.php';
 
 // Worldpay
@@ -403,6 +407,20 @@
 #  $wgPaypalGatewayAccountInfo['example'] = array(
 #  'AccountEmail' => "",
 #  );
+
+$wgPaypalExpressGatewayAccountInfo['test'] = array(
+   //'User' => 'abc',
+   //'Password' => '12345',
+   //'Signature' => 'or 123123123',
+   //TODO: credential authentication is not supported, yet.
+   //XXX 'Credential' => '123123123123', #OR
+   // TODO: Use parameter substitution.
+   'RedirectURL' => 
'https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_express-checkout=commit=',
+);
+# FIXME: These are only for signature authentication.
+# https://developer.paypal.com/docs/classic/api/endpoints/
+$wgPaypalExpressGatewayURL = 'https://api-3t.paypal.com/nvp';
+$wgPaypalExpressGatewayTestingURL = 'https://api-3t.sandbox.paypal.com/nvp';
 
 $wgAdyenGatewayHtmlFormDir = __DIR__ . '/adyen_gateway/forms/html';
 
@@ -842,6 +860,7 @@
 $wgAmazonGatewayEnabled = false;
 $wgAdyenGatewayEnabled = false;
 $wgAstroPayGatewayEnabled = false;
+$wgPaypalExpressGatewayEnabled = false;
 $wgPaypalGatewayEnabled = false;
 $wgWorldpayGatewayEnabled = false;
 
@@ -880,9 +899,12 @@
 $wgSpecialPages['AstroPayGatewayResult'] = 'AstroPayGatewayResult';
 $wgDonationInterfaceGatewayAdapters[] = 'AstroPayAdapter';
 
-# FIXME: deprecated
+$wgSpecialPages['PaypalExpressGateway'] = 'PaypalExpressGateway';
+$wgSpecialPages['PaypalExpressGatewayResult'] = 'PaypalExpressGatewayResult';
+# FIXME: This alias is deprecated.
 $wgSpecialPages['PaypalGateway'] = 'PaypalLegacyGateway';
 $wgSpecialPages['PaypalLegacyGateway'] = 'PaypalLegacyGateway';
+$wgDonationInterfaceGatewayAdapters[] = 'PaypalExpressAdapter';
 $wgDonationInterfaceGatewayAdapters[] = 'PaypalLegacyAdapter';
 
 $wgSpecialPages['WorldpayGateway'] = 'WorldpayGateway';
diff --git a/gateway_common/gateway.adapter.php 
b/gateway_common/gateway.adapter.php
index 1db7fb9..74a3e05 100644
--- a/gateway_common/gateway.adapter.php
+++ b/gateway_common/gateway.adapter.php
@@ -1719,6 +1719,8 @@
);
 
// Add the rest of the relevant data
+   // FIXME: This is "normalized" data.  We should refer to it as 
such,
+   // and rename the getData_Unstaged_Escaped function.
$stomp_data = array_intersect_key(
$this->getData_Unstaged_Escaped(),
array_flip( $this->dataObj->getMessageFields() )
diff --git a/paypal_gateway/express_checkout/PaypalExpressReturnUrl.php 

[MediaWiki-commits] [Gerrit] Add LinkRenderer (rewrite of Linker::link()) - change (mediawiki/core)

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

Change subject: Add LinkRenderer (rewrite of Linker::link())
..


Add LinkRenderer (rewrite of Linker::link())

This is a rewrite of Linker::link() to a non-static, LinkTarget-based
interface. Users of plain Linker::link() with no options can use the
LinkRenderer instance provided by MediaWikiServices. Others that
have specific options should create and configure their own instance,
which can be used to create as many links as necessary.

The main entrypoints for making links are:
* ->makeLink( $target, $text, $attribs, $query );
* ->makeKnownLink( $target, $text, $attribs, $query );
* ->makeBrokenLink( $target, $text, $attribs, $query );

The order of the parameters are the same as Linker::link(), except
$options are now part of the LinkRenderer instance, and
known/broken status requires calling the function explicitly.
Additionally, instead of passing in raw $html for the link text, the
$text parameter will automatically be escaped unless it is specially
marked as safe HTML using the MediaWiki\Linker\HtmlArmor class.

The LinkBegin and LinkEnd hooks are now deprecated, but still function
for backwards-compatability. Clients should migrate to the nearly-
equivalent LinkRendererBegin and LinkRendererEnd hooks.
The main differences between the hooks are:
* Passing HtmlPageLinkRenderer object instead of deprecated DummyLinker
* Using LinkTarget instead of Title
* Begin hook can no longer change known/broken status of link. Use the
TitleIsAlwaysKnown hook for that.
* $options are no longer passed, they can be read (but shouldn't be
modified!) from the LinkRenderer object.

Bug: T469
Change-Id: I057cc86ae6404a080aa3c8e0e956ecbb10a897d5
---
M autoload.php
M docs/hooks.txt
M includes/Linker.php
M includes/MediaWikiServices.php
M includes/ServiceWiring.php
A includes/libs/HtmlArmor.php
A includes/linker/LinkRenderer.php
A includes/linker/LinkRendererFactory.php
M tests/parser/parserTest.inc
M tests/phpunit/includes/MediaWikiServicesTest.php
A tests/phpunit/includes/libs/HtmlArmorTest.php
A tests/phpunit/includes/linker/LinkRendererFactoryTest.php
A tests/phpunit/includes/linker/LinkRendererTest.php
13 files changed, 945 insertions(+), 170 deletions(-)

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



diff --git a/autoload.php b/autoload.php
index fe37fe9..56061f8 100644
--- a/autoload.php
+++ b/autoload.php
@@ -557,6 +557,7 @@
'HistoryPager' => __DIR__ . '/includes/actions/HistoryAction.php',
'Hooks' => __DIR__ . '/includes/Hooks.php',
'Html' => __DIR__ . '/includes/Html.php',
+   'HtmlArmor' => __DIR__ . '/includes/libs/HtmlArmor.php',
'HtmlFormatter' => __DIR__ . '/includes/HtmlFormatter.php',
'Http' => __DIR__ . '/includes/HttpFunctions.php',
'HttpError' => __DIR__ . '/includes/exception/HttpError.php',
@@ -834,6 +835,8 @@
'MediaWiki\\Diff\\WordAccumulator' => __DIR__ . 
'/includes/diff/WordAccumulator.php',
'MediaWiki\\Languages\\Data\\Names' => __DIR__ . 
'/languages/data/Names.php',
'MediaWiki\\Languages\\Data\\ZhConversion' => __DIR__ . 
'/languages/data/ZhConversion.php',
+   'MediaWiki\\Linker\\LinkRenderer' => __DIR__ . 
'/includes/linker/LinkRenderer.php',
+   'MediaWiki\\Linker\\LinkRendererFactory' => __DIR__ . 
'/includes/linker/LinkRendererFactory.php',
'MediaWiki\\Linker\\LinkTarget' => __DIR__ . 
'/includes/linker/LinkTarget.php',
'MediaWiki\\Logger\\LegacyLogger' => __DIR__ . 
'/includes/debug/logger/LegacyLogger.php',
'MediaWiki\\Logger\\LegacySpi' => __DIR__ . 
'/includes/debug/logger/LegacySpi.php',
diff --git a/docs/hooks.txt b/docs/hooks.txt
index f652786..554dc46 100644
--- a/docs/hooks.txt
+++ b/docs/hooks.txt
@@ -1783,7 +1783,8 @@
 $out: The output page.
 $cssClassName: CSS class name of the language selector.
 
-'LinkBegin': Used when generating internal and interwiki links in
+'LinkBegin': DEPRECATED! Use HtmlPageLinkRendererBegin instead.
+Used when generating internal and interwiki links in
 Linker::link(), before processing starts.  Return false to skip default
 processing and return $ret. See documentation for Linker::link() for details on
 the expected meanings of parameters.
@@ -1800,7 +1801,8 @@
 &$options: array of options.  Can include 'known', 'broken', 'noclasses'.
 &$ret: the value to return if your hook returns false.
 
-'LinkEnd': Used when generating internal and interwiki links in Linker::link(),
+'LinkEnd': DEPRECATED! Use HtmlPageLinkRendererEnd hook instead
+Used when generating internal and interwiki links in Linker::link(),
 just before the function returns a value.  If you return true, an  element
 with HTML attributes $attribs and contents $html will be returned.  If you
 return false, $ret will be returned.
@@ -1835,6 +1837,35 @@
 &$attribs: the attributes to be applied
 &$ret: the value to return 

[MediaWiki-commits] [Gerrit] We don't care to get failmail when banner history import fails - change (wikimedia...crm)

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

Change subject: We don't care to get failmail when banner history import fails
..


We don't care to get failmail when banner history import fails

TODO: We should still have something monitoring the volume of these failures
however.

Change-Id: I64992d31e07325a924ce141f0818aabef2f38dd0
---
M sites/all/modules/wmf_common/WmfException.php
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/sites/all/modules/wmf_common/WmfException.php 
b/sites/all/modules/wmf_common/WmfException.php
index 4da6bbc..a39d0d2 100644
--- a/sites/all/modules/wmf_common/WmfException.php
+++ b/sites/all/modules/wmf_common/WmfException.php
@@ -71,6 +71,7 @@
 ),
 'BANNER_HISTORY' => array(
  'reject' => TRUE,
+ 'no-email' => TRUE,
 ),
 
 // other errors

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I64992d31e07325a924ce141f0818aabef2f38dd0
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: master
Gerrit-Owner: Awight 
Gerrit-Reviewer: AndyRussG 
Gerrit-Reviewer: Awight 
Gerrit-Reviewer: Cdentinger 
Gerrit-Reviewer: Eileen 
Gerrit-Reviewer: Ejegg 
Gerrit-Reviewer: Katie Horn 
Gerrit-Reviewer: Pcoombe 
Gerrit-Reviewer: XenoRyet 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Update test for API change in PS10 of I17ef1f5197 - change (mediawiki...Thanks)

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

Change subject: Update test for API change in PS10 of I17ef1f5197
..


Update test for API change in PS10 of I17ef1f5197

Use $this->getMutableTestUser() instead of $this->getTestUser( true ).

Change-Id: Idb41b4842d0c95801dcd5476fa2f3e45153f9c71
---
M tests/ApiFlowThankIntegrationTest.php
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Ori.livneh: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/tests/ApiFlowThankIntegrationTest.php 
b/tests/ApiFlowThankIntegrationTest.php
index 94348ff..6d62e3c 100644
--- a/tests/ApiFlowThankIntegrationTest.php
+++ b/tests/ApiFlowThankIntegrationTest.php
@@ -36,8 +36,8 @@
 
// mock topic and post
if ( method_exists( $this, 'getTestUser' ) ) {
-   $this->meUser = $this->getTestUser( true )->getUser();
-   $this->otherUser = $this->getTestUser( true 
)->getUser();
+   $this->meUser = $this->getMutableTestUser()->getUser();
+   $this->otherUser = 
$this->getMutableTestUser()->getUser();
} else {
$this->meUser = self::$users[ 'sysop' ]->getUser();
$this->otherUser = self::$users[ 'uploader' 
]->getUser();

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Idb41b4842d0c95801dcd5476fa2f3e45153f9c71
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Thanks
Gerrit-Branch: master
Gerrit-Owner: Ori.livneh 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Ori.livneh 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Avoid invidual LinkCache lookups in Linker::makeBrokenImageL... - change (mediawiki/core)

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

Change subject: Avoid invidual LinkCache lookups in 
Linker::makeBrokenImageLinkObj()
..


Avoid invidual LinkCache lookups in Linker::makeBrokenImageLinkObj()

Change-Id: I29ab072519937b770e75a40382d2f77cbabe098b
---
M includes/Linker.php
M tests/parser/parserTests.txt
2 files changed, 11 insertions(+), 3 deletions(-)

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



diff --git a/includes/Linker.php b/includes/Linker.php
index 20dc9b2..66cf325 100644
--- a/includes/Linker.php
+++ b/includes/Linker.php
@@ -940,7 +940,15 @@
$redir = 
RepoGroup::singleton()->getLocalRepo()->checkRedirect( $title );
 
if ( $redir ) {
-   return self::linkKnown( $title, $encLabel, [], 
wfCgiToArray( $query ) );
+   // We already know it's a redirect, so mark it
+   // accordingly
+   return self::link(
+   $title,
+   $encLabel,
+   [ 'class' => 'mw-redirect' ],
+   wfCgiToArray( $query ),
+   [ 'known', 'noclasses' ]
+   );
}
 
$href = self::getUploadUrl( $title, $query );
@@ -950,7 +958,7 @@
$encLabel . '';
}
 
-   return self::linkKnown( $title, $encLabel, [], wfCgiToArray( 
$query ) );
+   return self::link( $title, $encLabel, [], wfCgiToArray( $query 
), [ 'known', 'noclasses' ] );
}
 
/**
diff --git a/tests/parser/parserTests.txt b/tests/parser/parserTests.txt
index 930c879..e93aa7e 100644
--- a/tests/parser/parserTests.txt
+++ b/tests/parser/parserTests.txt
@@ -13944,7 +13944,7 @@
 !! wikitext
 [[Image:Barfoo.jpg]]
 !! html/php
-File:Barfoo.jpg
+File:Barfoo.jpg
 
 !! end
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I29ab072519937b770e75a40382d2f77cbabe098b
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Aaron Schulz 
Gerrit-Reviewer: Daniel Kinzler 
Gerrit-Reviewer: Jackmcbarn 
Gerrit-Reviewer: TheDJ 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Cleanup Special:PrefixIndex::showPrefixChunk() - change (mediawiki/core)

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

Change subject: Cleanup Special:PrefixIndex::showPrefixChunk()
..


Cleanup Special:PrefixIndex::showPrefixChunk()

* Title::makeTitle() cannot return null or false
* Use foreach loop instead of while and $res->fetchObject()
* Select extra fields for LinkCache, and add existence into it
* Let Linker handle generation of mw-redirect class

Change-Id: I23f09956b5a39badbfa05d1188466180935cf411
---
M includes/specials/SpecialPrefixindex.php
1 file changed, 23 insertions(+), 18 deletions(-)

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



diff --git a/includes/specials/SpecialPrefixindex.php 
b/includes/specials/SpecialPrefixindex.php
index 9891f86..6db4f2c 100644
--- a/includes/specials/SpecialPrefixindex.php
+++ b/includes/specials/SpecialPrefixindex.php
@@ -20,6 +20,7 @@
  * @file
  * @ingroup SpecialPage
  */
+use MediaWiki\MediaWikiServices;
 
 /**
  * Implements Special:Prefixindex
@@ -191,7 +192,10 @@
}
 
$res = $dbr->select( 'page',
-   [ 'page_namespace', 'page_title', 
'page_is_redirect' ],
+   array_merge(
+   [ 'page_namespace', 'page_title' ],
+   LinkCache::getSelectFields()
+   ),
$conds,
__METHOD__,
[
@@ -206,26 +210,27 @@
$n = 0;
if ( $res->numRows() > 0 ) {
$out = Html::openElement( 'ul', [ 'class' => 
'mw-prefixindex-list' ] );
+   $linkCache = 
MediaWikiServices::getInstance()->getLinkCache();
 
$prefixLength = strlen( $prefix );
-   while ( ( $n < $this->maxPerPage ) && ( $s = 
$res->fetchObject() ) ) {
-   $t = Title::makeTitle( 
$s->page_namespace, $s->page_title );
-   if ( $t ) {
-   $displayed = $t->getText();
-   // Try not to generate 
unclickable links
-   if ( $this->stripPrefix && 
$prefixLength !== strlen( $displayed ) ) {
-   $displayed = substr( 
$displayed, $prefixLength );
-   }
-   $link = ( $s->page_is_redirect 
? '' : '' ) .
-   Linker::linkKnown(
-   $t,
-   
htmlspecialchars( $displayed ),
-   
$s->page_is_redirect ? [ 'class' => 'mw-redirect' ] : []
-   ) .
-   ( $s->page_is_redirect 
? '' : '' );
-   } else {
-   $link = '[[' . 
htmlspecialchars( $s->page_title ) . ']]';
+   foreach ( $res as $row ) {
+   if ( $n >= $this->maxPerPage ) {
+   break;
}
+   $title = Title::newFromRow( $row );
+   // Make sure it gets into LinkCache
+   $linkCache->addGoodLinkObjFromRow( 
$title, $row );
+   $displayed = $title->getText();
+   // Try not to generate unclickable links
+   if ( $this->stripPrefix && 
$prefixLength !== strlen( $displayed ) ) {
+   $displayed = substr( 
$displayed, $prefixLength );
+   }
+   $link = ( $title->isRedirect() ? '' : '' ) .
+   Linker::linkKnown(
+   $title,
+   htmlspecialchars( 
$displayed )
+   ) .
+   ( $title->isRedirect() ? 
'' : '' );
 
$out .= "$link\n";
$n++;

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

Gerrit-MessageType: 

[MediaWiki-commits] [Gerrit] Update test for API change in PS10 of I17ef1f5197 - change (mediawiki...Thanks)

2016-05-23 Thread Ori.livneh (Code Review)
Ori.livneh has uploaded a new change for review.

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

Change subject: Update test for API change in PS10 of I17ef1f5197
..

Update test for API change in PS10 of I17ef1f5197

Use $this->getMutableTestUser() instead of $this->getTestUser( true ).

Change-Id: Idb41b4842d0c95801dcd5476fa2f3e45153f9c71
---
M tests/ApiFlowThankIntegrationTest.php
1 file changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/tests/ApiFlowThankIntegrationTest.php 
b/tests/ApiFlowThankIntegrationTest.php
index 94348ff..6d62e3c 100644
--- a/tests/ApiFlowThankIntegrationTest.php
+++ b/tests/ApiFlowThankIntegrationTest.php
@@ -36,8 +36,8 @@
 
// mock topic and post
if ( method_exists( $this, 'getTestUser' ) ) {
-   $this->meUser = $this->getTestUser( true )->getUser();
-   $this->otherUser = $this->getTestUser( true 
)->getUser();
+   $this->meUser = $this->getMutableTestUser()->getUser();
+   $this->otherUser = 
$this->getMutableTestUser()->getUser();
} else {
$this->meUser = self::$users[ 'sysop' ]->getUser();
$this->otherUser = self::$users[ 'uploader' 
]->getUser();

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idb41b4842d0c95801dcd5476fa2f3e45153f9c71
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Thanks
Gerrit-Branch: master
Gerrit-Owner: Ori.livneh 

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


[MediaWiki-commits] [Gerrit] TraditionalImageGallery: Preload Titles being linked into Li... - change (mediawiki/core)

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

Change subject: TraditionalImageGallery: Preload Titles being linked into 
LinkCache
..


TraditionalImageGallery: Preload Titles being linked into LinkCache

Change-Id: Ie8b2508a52c1c1476f34f0b8e16184bed15310e1
---
M includes/gallery/TraditionalImageGallery.php
1 file changed, 11 insertions(+), 0 deletions(-)

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



diff --git a/includes/gallery/TraditionalImageGallery.php 
b/includes/gallery/TraditionalImageGallery.php
index f00e260..2fb2281 100644
--- a/includes/gallery/TraditionalImageGallery.php
+++ b/includes/gallery/TraditionalImageGallery.php
@@ -59,6 +59,16 @@
$output .= "\n\t{$this->mCaption}";
}
 
+   if ( $this->mShowFilename ) {
+   // Preload LinkCache info for when generating links
+   // of the filename below
+   $lb = new LinkBatch();
+   foreach ( $this->mImages as $img ) {
+   $lb->addObj( $img[0] );
+   }
+   $lb->execute();
+   }
+
$lang = $this->getRenderLang();
# Output each image...
foreach ( $this->mImages as $pair ) {
@@ -176,6 +186,7 @@
}
 
$textlink = $this->mShowFilename ?
+   // Preloaded into LinkCache above
Linker::linkKnown(
$nt,
htmlspecialchars( $lang->truncate( 
$nt->getText(), $this->mCaptionLength ) )

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie8b2508a52c1c1476f34f0b8e16184bed15310e1
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Aaron Schulz 
Gerrit-Reviewer: Daniel Kinzler 
Gerrit-Reviewer: TheDJ 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Remove 'noclasses' from Linker::linkKnown() defaults - change (mediawiki/core)

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

Change subject: Remove 'noclasses' from Linker::linkKnown() defaults
..


Remove 'noclasses' from Linker::linkKnown() defaults

The intention for Linker::linkKnown() was to be used when the caller had
already preloaded the target's existence ('known') and called
Linker::getLinkColour() directly ('noclasses'). However, nearly all
usage of linkKnown() only did the first part, and not the latter.

So do what people actually ended up using the function for, and remove
'noclasses' from the default parameters. As long as the target the link
is being created for is already in LinkCache, this shouldn't cause any
extra database queries.

Change-Id: Ia5a4c2f18ec780627146617a1498bd04fcfbb3ee
---
M includes/DummyLinker.php
M includes/Linker.php
M tests/parser/parserTests.txt
3 files changed, 3 insertions(+), 3 deletions(-)

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



diff --git a/includes/DummyLinker.php b/includes/DummyLinker.php
index 6545c4a..d9330ee 100644
--- a/includes/DummyLinker.php
+++ b/includes/DummyLinker.php
@@ -72,7 +72,7 @@
$html = null,
$customAttribs = [],
$query = [],
-   $options = [ 'known', 'noclasses' ]
+   $options = [ 'known' ]
) {
return Linker::linkKnown(
$target,
diff --git a/includes/Linker.php b/includes/Linker.php
index 6a869dd..20dc9b2 100644
--- a/includes/Linker.php
+++ b/includes/Linker.php
@@ -269,7 +269,7 @@
 */
public static function linkKnown(
$target, $html = null, $customAttribs = [],
-   $query = [], $options = [ 'known', 'noclasses' ]
+   $query = [], $options = [ 'known' ]
) {
return self::link( $target, $html, $customAttribs, $query, 
$options );
}
diff --git a/tests/parser/parserTests.txt b/tests/parser/parserTests.txt
index 7051b4f..930c879 100644
--- a/tests/parser/parserTests.txt
+++ b/tests/parser/parserTests.txt
@@ -13944,7 +13944,7 @@
 !! wikitext
 [[Image:Barfoo.jpg]]
 !! html/php
-File:Barfoo.jpg
+File:Barfoo.jpg
 
 !! end
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia5a4c2f18ec780627146617a1498bd04fcfbb3ee
Gerrit-PatchSet: 5
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Aaron Schulz 
Gerrit-Reviewer: Cscott 
Gerrit-Reviewer: Jackmcbarn 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Tim Starling 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Update tests for I17ef1f519 - change (mediawiki...Thanks)

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

Change subject: Update tests for I17ef1f519
..


Update tests for I17ef1f519

This is a prerequisite for I17ef1f519, since the tests break otherwise. The
change is backward-compatible since it checks for the presence of the
getTestUser method introduced by that change.

Change-Id: I8bbc9ebf32a89157fa9c60fd33151a10e7598af8
---
M tests/ApiFlowThankIntegrationTest.php
1 file changed, 13 insertions(+), 4 deletions(-)

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



diff --git a/tests/ApiFlowThankIntegrationTest.php 
b/tests/ApiFlowThankIntegrationTest.php
index 7ee6e0e..94348ff 100644
--- a/tests/ApiFlowThankIntegrationTest.php
+++ b/tests/ApiFlowThankIntegrationTest.php
@@ -22,6 +22,8 @@
 * @var PostRevision
 */
public $topic,
+   $meUser,
+   $otherUser,
$postByOtherUser,
$postByMe;
 
@@ -33,13 +35,20 @@
}
 
// mock topic and post
+   if ( method_exists( $this, 'getTestUser' ) ) {
+   $this->meUser = $this->getTestUser( true )->getUser();
+   $this->otherUser = $this->getTestUser( true 
)->getUser();
+   } else {
+   $this->meUser = self::$users[ 'sysop' ]->getUser();
+   $this->otherUser = self::$users[ 'uploader' 
]->getUser();
+   }
$this->topic = $this->generateObject();
$this->postByOtherUser = $this->generateObject( [
-   'tree_orig_user_id' => self::$users[ 'uploader' 
]->getUser()->getId(),
+   'tree_orig_user_id' => 
$this->otherUser->getId(),
'tree_parent_id' => 
$this->topic->getPostId()->getBinary(),
], [], 1 );
$this->postByMe = $this->generateObject( [
-   'tree_orig_user_id' => self::$users[ 'sysop' 
]->getUser()->getId(),
+   'tree_orig_user_id' => $this->meUser->getId(),
'tree_parent_id' => 
$this->topic->getPostId()->getBinary(),
], [], 1 );
 
@@ -138,7 +147,7 @@
list( $result,, ) = $this->doApiRequestWithToken( [
'action' => 'flowthank',
'postid' => 
$this->postByMe->getPostId()->getAlphadecimal(),
-   ] );
+   ], null, $this->meUser );
}
 
protected function assertSuccess( $result ) {
@@ -162,7 +171,7 @@
$uuidPost = UUID::create();
$uuidRevision = UUID::create();
 
-   $user = User::newFromName( 'UTSysop' );
+   $user = $this->meUser;
$userId = $user->getId();
$userIp = null;
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8bbc9ebf32a89157fa9c60fd33151a10e7598af8
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/Thanks
Gerrit-Branch: master
Gerrit-Owner: Ori.livneh 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] manage error message in upload window when file is too large - change (mediawiki...SemanticForms)

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

Change subject: manage error message in upload window when file is too large
..


manage error message in upload window when file is too large

Change-Id: Id10f08f41446c996c23259781906d05a45e76615
---
M specials/SF_UploadWindow.php
1 file changed, 3 insertions(+), 0 deletions(-)

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



diff --git a/specials/SF_UploadWindow.php b/specials/SF_UploadWindow.php
index 7a02541..9f3800d 100644
--- a/specials/SF_UploadWindow.php
+++ b/specials/SF_UploadWindow.php
@@ -513,6 +513,9 @@
break;
 
/** Statuses that require reuploading **/
+   case UploadBase::FILE_TOO_LARGE:
+   $this->showUploadForm(  $this->getUploadForm( 
wfMessage( 'file-too-large' )->escaped() ) );
+   break;
case UploadBase::EMPTY_FILE:
$this->showUploadForm( $this->getUploadForm( 
wfMessage( 'emptyfile' )->escaped() ) );
break;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id10f08f41446c996c23259781906d05a45e76615
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SemanticForms
Gerrit-Branch: master
Gerrit-Owner: Pyro 
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] Update tests for I17ef1f519 - change (mediawiki...Thanks)

2016-05-23 Thread Ori.livneh (Code Review)
Ori.livneh has uploaded a new change for review.

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

Change subject: Update tests for I17ef1f519
..

Update tests for I17ef1f519

This is a prerequisite for I17ef1f519, since the tests break otherwise. The
change is backward-compatible since it's checks for the presence of the
getTestUser method introduced by that change.

Change-Id: I8bbc9ebf32a89157fa9c60fd33151a10e7598af8
---
M tests/ApiFlowThankIntegrationTest.php
1 file changed, 13 insertions(+), 4 deletions(-)


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

diff --git a/tests/ApiFlowThankIntegrationTest.php 
b/tests/ApiFlowThankIntegrationTest.php
index 7ee6e0e..021ab31 100644
--- a/tests/ApiFlowThankIntegrationTest.php
+++ b/tests/ApiFlowThankIntegrationTest.php
@@ -22,6 +22,8 @@
 * @var PostRevision
 */
public $topic,
+   $meUser,
+   $otherUser,
$postByOtherUser,
$postByMe;
 
@@ -33,13 +35,20 @@
}
 
// mock topic and post
+   if ( method_exists( $this, 'getTestUser' ) ) {
+   $this->meUser = $this->getTestUser( true )->getUser();
+   $this->otherUser = $this->getTestUser( true 
)->getUser();
+   } else {
+   $this->meUser = self::$users[ 'sysop' ]->getUser();
+   $this->otherUser = self::$users[ 'uploader' 
]->getUser();
+   }
$this->topic = $this->generateObject();
$this->postByOtherUser = $this->generateObject( [
-   'tree_orig_user_id' => self::$users[ 'uploader' 
]->getUser()->getId(),
+   'tree_orig_user_id' => 
$this->otherUser->getId(),
'tree_parent_id' => 
$this->topic->getPostId()->getBinary(),
], [], 1 );
$this->postByMe = $this->generateObject( [
-   'tree_orig_user_id' => self::$users[ 'sysop' 
]->getUser()->getId(),
+   'tree_orig_user_id' => $this->meUser->getId(),
'tree_parent_id' => 
$this->topic->getPostId()->getBinary(),
], [], 1 );
 
@@ -138,7 +147,7 @@
list( $result,, ) = $this->doApiRequestWithToken( [
'action' => 'flowthank',
'postid' => 
$this->postByMe->getPostId()->getAlphadecimal(),
-   ] );
+   ], null, $this->meUser );
}
 
protected function assertSuccess( $result ) {
@@ -162,7 +171,7 @@
$uuidPost = UUID::create();
$uuidRevision = UUID::create();
 
-   $user = User::newFromName( 'UTSysop' );
+   $user = $this->getTestUser()->getUser();
$userId = $user->getId();
$userIp = null;
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8bbc9ebf32a89157fa9c60fd33151a10e7598af8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Thanks
Gerrit-Branch: master
Gerrit-Owner: Ori.livneh 

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


[MediaWiki-commits] [Gerrit] Archive extension - change (mediawiki...Gather)

2016-05-23 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review.

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

Change subject: Archive extension
..

Archive extension

Per ,
the extension is now unmaintained, and should be archived to avoid
increasing maintainence burden.

Change-Id: Id6224db35259778ceb44be00f5e8702ca5d76571
---
D .jsbeautifyrc
D .jscsrc
D .jscsrctest.js
D .jshintignore
D .jshintrc
D .rubocop.yml
D .svgo.yml
D Gather.alias.php
M Gather.php
D Gemfile.lock
D Gruntfile.js
M README.txt
D Rakefile
M composer.json
M extension.json
D i18n/ady-cyrl.json
D i18n/ar.json
D i18n/arq.json
D i18n/ba.json
D i18n/bcl.json
D i18n/bgn.json
D i18n/bho.json
D i18n/bn.json
D i18n/bs.json
D i18n/ca.json
D i18n/ce.json
D i18n/ckb.json
D i18n/cs.json
D i18n/da.json
D i18n/de.json
D i18n/diq.json
D i18n/ee.json
D i18n/el.json
D i18n/en-gb.json
D i18n/en.json
D i18n/eo.json
D i18n/es.json
D i18n/eu.json
D i18n/fa.json
D i18n/fi.json
D i18n/fo.json
D i18n/fr.json
D i18n/frp.json
D i18n/fy.json
D i18n/gd.json
D i18n/gl.json
D i18n/gom-deva.json
D i18n/gom-latn.json
D i18n/he.json
D i18n/hi.json
D i18n/ht.json
D i18n/hu.json
D i18n/hy.json
D i18n/inh.json
D i18n/it.json
D i18n/ja.json
D i18n/jv.json
D i18n/ka.json
D i18n/khw.json
D i18n/kk-cyrl.json
D i18n/km.json
D i18n/kn.json
D i18n/ko.json
D i18n/krl.json
D i18n/ksh.json
D i18n/ku-latn.json
D i18n/la.json
D i18n/lb.json
D i18n/lki.json
D i18n/lo.json
D i18n/lrc.json
D i18n/lt.json
D i18n/lv.json
D i18n/mai.json
D i18n/mg.json
D i18n/mk.json
D i18n/mr.json
D i18n/ms.json
D i18n/nb.json
D i18n/nds-nl.json
D i18n/ne.json
D i18n/nl.json
D i18n/oc.json
D i18n/om.json
D i18n/pam.json
D i18n/pl.json
D i18n/ps.json
D i18n/pt-br.json
D i18n/pt.json
D i18n/qqq.json
D i18n/roa-tara.json
D i18n/ru.json
D i18n/sa.json
D i18n/sco.json
D i18n/sd.json
D i18n/sh.json
D i18n/si.json
D i18n/so.json
D i18n/su.json
D i18n/sv.json
D i18n/sw.json
D i18n/ta.json
D i18n/te.json
D i18n/tg-cyrl.json
D i18n/tl.json
D i18n/tr.json
D i18n/uk.json
D i18n/ur.json
D i18n/vi.json
D i18n/vo.json
D i18n/xmf.json
D i18n/yi.json
D i18n/zh-hans.json
D i18n/zh-hant.json
D images/beta-feature-ltr.svg
D images/beta-feature-rtl.svg
D includes/EchoGatherModerationHidePresentationModel.php
D includes/EchoGatherModerationPresentationModel.php
D includes/Gather.hooks.php
D includes/api/ApiEditList.php
D includes/api/ApiMixinListAccess.php
D includes/api/ApiQueryListMembership.php
D includes/api/ApiQueryListPages.php
D includes/api/ApiQueryLists.php
D includes/models/ArraySerializable.php
D includes/models/Collection.php
D includes/models/CollectionBase.php
D includes/models/CollectionFeed.php
D includes/models/CollectionFeedItem.php
D includes/models/CollectionInfo.php
D includes/models/CollectionItem.php
D includes/models/CollectionsList.php
D includes/models/Image.php
D includes/models/WithImage.php
D includes/specials/SpecialGather.php
D includes/specials/SpecialGatherEditFeed.php
D includes/specials/SpecialGatherLists.php
D includes/views/Collection.php
D includes/views/CollectionFeed.php
D includes/views/CollectionFeedItem.php
D includes/views/CollectionItemCard.php
D includes/views/CollectionsList.php
D includes/views/CollectionsListItemCard.php
D includes/views/Image.php
D includes/views/NoPublic.php
D includes/views/NotFound.php
D includes/views/Pagination.php
D includes/views/ReportTable.php
D includes/views/ReportTableRow.php
D includes/views/Tabs.php
D includes/views/View.php
D includes/views/helpers/CSS.php
D includes/views/helpers/Template.php
D maintenance/updateCounts.php
M package.json
D phpcs.xml
D resources/ext.gather.api/CollectionsGateway.js
D resources/ext.gather.api/RelatedPagesGateway.js
D resources/ext.gather.buttonspinner/ButtonWithSpinner.js
D resources/ext.gather.buttonspinner/button.less
D resources/ext.gather.collection.base/CollectionsContentOverlayBase.js
D resources/ext.gather.collection.confirm/ConfirmationOverlay.js
D resources/ext.gather.collection.confirm/confirmationOverlay.hogan
D resources/ext.gather.collection.confirm/confirmationOverlay.less
D resources/ext.gather.collection.confirm/vector.less
D resources/ext.gather.collection.contentOverlay/CollectionsContentOverlay.js
D resources/ext.gather.collection.contentOverlay/content.hogan
D resources/ext.gather.collection.contentOverlay/contentOverlay.less
D resources/ext.gather.collection.contentOverlay/header.hogan
D resources/ext.gather.collection.contentOverlay/images/noimage.png
D resources/ext.gather.collection.contentOverlay/images/noimage.svg
D resources/ext.gather.collection.contentOverlay/images/watchstar.svg
D resources/ext.gather.collection.contentOverlay/vector.less
D resources/ext.gather.collection.delete/CollectionDeleteOverlay.js
D resources/ext.gather.collection.editor/CollectionEditOverlay.js
D resources/ext.gather.collection.editor/SearchTutorialOverlay.hogan
D 

[MediaWiki-commits] [Gerrit] Using a queue for what gets scored next - change (wikimedia...discernatron)

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

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

Change subject: Using a queue for what gets scored next
..

Using a queue for what gets scored next

Randomized scoring seems sub-optimal. The problem is that we can't get
the desired number of queries scored and can end up with some queries
scored many more times than others.  By using a queue we have much more
control over how many times each query gets scored.

Change-Id: I84f70674100b7a1cf37c8db7051298c523241a52
---
M app.php
M schema.mysql.sql
A src/RelevanceScoring/Console/UpdateScoringQueue.php
M src/RelevanceScoring/Controller/QueriesController.php
M src/RelevanceScoring/Import/Importer.php
M src/RelevanceScoring/RelevanceScoringProvider.php
M src/RelevanceScoring/Repository/QueriesRepository.php
M src/RelevanceScoring/Repository/ScoresRepository.php
A src/RelevanceScoring/Repository/ScoringQueueRepository.php
A src/RelevanceScoring/Util/Calendar.php
M tests/unit/RelevanceScoring/Repository/BaseRepositoryTest.php
M tests/unit/RelevanceScoring/Repository/ResultsRepositoryTest.php
A tests/unit/RelevanceScoring/Repository/ScoringQueueRepositoryTest.php
M views/instructions.twig
M views/layout.twig
15 files changed, 596 insertions(+), 15 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/discovery/discernatron 
refs/changes/78/290378/1

diff --git a/app.php b/app.php
index 5a41cf1..bbd2896 100644
--- a/app.php
+++ b/app.php
@@ -70,6 +70,7 @@
 'search.wikis' => [
 'enwiki' => 'https://en.wikipedia.org/w/api.php',
 ],
+'search.scores_per_query' => 5,
 ]);
 $app->mount('/', $relevanceScoringProvider);
 
@@ -141,11 +142,15 @@
 });
 
 $app->get('/', function () use ($app) {
-return $app->redirect($app->path('random_query'));
+return $app->redirect($app->path('next_query'));
 })
 ->bind('root');
 
 $app->get('/login', function () use ($app) {
+if ($app['session']->has('user')) {
+return $app->redirect($app->path('next_query'));
+}
+
 return $app['twig']->render('splash.twig', [
 'domain' => parse_url($app['oauth.base_url'], PHP_URL_HOST),
 ]);
diff --git a/schema.mysql.sql b/schema.mysql.sql
index 4b49596..773bf3c 100644
--- a/schema.mysql.sql
+++ b/schema.mysql.sql
@@ -61,3 +61,12 @@
 FOREIGN KEY `queries_skipped_query_id` (query_id) REFERENCES queries(id),
 UNIQUE KEY `queries_skipped_user_query` (`user_id`, `query_id`)
 ) CHARSET=utf8mb4;
+CREATE TABLE IF NOT EXISTS `scoring_queue` (
+id INTEGER UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
+user_id INTEGER UNSIGNED,
+query_id INTEGER UNSIGNED NOT NULL,
+last_assigned INTEGER UNSIGNED,
+FOREIGN KEY `queries_skipped_user_id` (user_id) REFERENCES users(id),
+FOREIGN KEY `queries_skipped_query_id` (query_id) REFERENCES queries(id),
+KEY `last_assigned_sort_key` (`last_assigned`)
+) CHARSET=utf8mb4;
diff --git a/src/RelevanceScoring/Console/UpdateScoringQueue.php 
b/src/RelevanceScoring/Console/UpdateScoringQueue.php
new file mode 100644
index 000..707eda3
--- /dev/null
+++ b/src/RelevanceScoring/Console/UpdateScoringQueue.php
@@ -0,0 +1,85 @@
+queriesRepo = $queriesRepo;
+$this->scoringQueueRepo = $scoringQueueRepo;
+}
+
+protected function configure()
+{
+$this->setDescription('Manage the scoring queue');
+$this->addOption(
+'num',
+null,
+InputOption::VALUE_OPTIONAL,
+'Total number of scores desired'
+);
+$this->addArgument(
+'wiki',
+InputArgument::OPTIONAL,
+'Only update the specified wiki'
+);
+$this->addArgument(
+'query',
+InputArgument::OPTIONAL,
+'Only update the specified query. Wiki must be provided.'
+);
+}
+
+protected function execute(InputInterface $input, OutputInterface $output)
+{
+$num = $input->getOption('num');
+$wiki = $input->getArgument('wiki');
+$query = $input->getArgument('query');
+
+if ($query !== null) {
+if ($wiki === null) {
+$output->writeln('wiki is required.');
+
+return 1;
+}
+
+$maybeQueryId = $this->queriesRepo->findQueryId($wiki, $query);
+if ($maybeQueryId->isEmpty()) {
+$output->writeln('Unknown query');
+
+return 1;
+}
+$queryIds = [$maybeQueryId->get()];
+} elseif ($wiki !== null) {
+$queryIds = $this->queriesRepo->findQueryIdsForWiki($wiki);
+} else {
+$queryIds = $this->queriesRepo->findAllQueryIds();
+}
+
+$count = 0;
+foreach ($queryIds as $queryId) {
+$count += $this->scoringQueueRepo->insert($queryId, $num);
+}
+
+$output->writeln("Added $count items to queue for 

[MediaWiki-commits] [Gerrit] Bump versionCode - change (apps...wikipedia)

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

Change subject: Bump versionCode
..


Bump versionCode

Change-Id: I596b8241c5519a9626c51688f476950b7bec06d9
---
M app/build.gradle
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/app/build.gradle b/app/build.gradle
index a2f7ff6..7cd107f 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -53,7 +53,7 @@
 applicationId 'org.wikipedia'
 minSdkVersion 15
 targetSdkVersion 23
-versionCode 145
+versionCode 146
 testApplicationId 'org.wikipedia.test'
 testInstrumentationRunner 
'android.support.test.runner.AndroidJUnitRunner'
 vectorDrawables.useSupportLibrary = true

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

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

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


[MediaWiki-commits] [Gerrit] Bump versionCode - change (apps...wikipedia)

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

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

Change subject: Bump versionCode
..

Bump versionCode

Change-Id: I596b8241c5519a9626c51688f476950b7bec06d9
---
M app/build.gradle
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/app/build.gradle b/app/build.gradle
index a2f7ff6..7cd107f 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -53,7 +53,7 @@
 applicationId 'org.wikipedia'
 minSdkVersion 15
 targetSdkVersion 23
-versionCode 145
+versionCode 146
 testApplicationId 'org.wikipedia.test'
 testInstrumentationRunner 
'android.support.test.runner.AndroidJUnitRunner'
 vectorDrawables.useSupportLibrary = true

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

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

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


[MediaWiki-commits] [Gerrit] Add button to hide/show all snippets - change (wikimedia...discernatron)

2016-05-23 Thread EBernhardson (Code Review)
EBernhardson has submitted this change and it was merged.

Change subject: Add button to hide/show all snippets
..


Add button to hide/show all snippets

One complaint was that it takes too many clicks to judge a set of
results. This should reduce the number of clicks it takes, at the
expense of screen real estate.  Might be worthwhile to have different
default states depending on if the user is on mobile or desktop, but
havn't decided.

Change-Id: Ibe8541b35f9f0968c927ddf0bee73dad1814a504
---
M public/js/scoring.js
M views/score_query.twig
2 files changed, 30 insertions(+), 11 deletions(-)

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



diff --git a/public/js/scoring.js b/public/js/scoring.js
index a293cbf..0fd03ee 100644
--- a/public/js/scoring.js
+++ b/public/js/scoring.js
@@ -39,22 +39,36 @@
 onChange.apply(row.find('input[value=' + (next) + 
']').prop('checked', true));
 }
 },
-onShowSnippet = function (evt) {
-$(this).toggle(false);
-
$(this).siblings('.hide-snippet').removeClass('hidden').toggle(true);
-
$(this).closest('.result').find('.snippet').removeClass('hidden').toggle(true);
+showSnippet = function ($target) {
+$target.toggle(false);
+$target.siblings('.hide-snippet').toggle(true);
+$target.closest('.result').find('.snippet').toggle(true);
 },
-onHideSnippet = function (evt) {
-$(this).toggle(false);
-$(this).siblings('.show-snippet').toggle(true);
-$(this).closest('.result').find('.snippet').toggle(false);
+hideSnippet = function ($target) {
+$target.toggle(false);
+
$target.siblings('.show-snippet').removeClass('hidden').toggle(true);
+$target.closest('.result').find('.snippet').toggle(false);
 };
 
 $(document).ready(function () {
 $('input:checked').each(onChange);
 $('input[type=radio]').change(onChange);
 $('.click-for-next').click(onClickForNext);
-$('.show-snippet').removeClass('hidden').click(onShowSnippet);
-$('.hide-snippet').click(onHideSnippet);
+$('.show-snippet').click(function () {
+showSnippet($(this));
+});
+$('.show-all-snippets').click(function () {
+showSnippet($('.show-snippet'));
+$(this).toggle(false);
+$('.hide-all-snippets').toggle(true);
+});
+$('.hide-snippet').removeClass('hidden').click(function () {
+hideSnippet($(this));
+});
+$('.hide-all-snippets').removeClass('hidden').click(function () {
+hideSnippet($('.hide-snippet'));
+$(this).toggle(false);
+$('.show-all-snippets').removeClass('hidden').toggle(true);
+});
 });
 }(jQuery));
diff --git a/views/score_query.twig b/views/score_query.twig
index 32d295a..411da76 100644
--- a/views/score_query.twig
+++ b/views/score_query.twig
@@ -68,6 +68,11 @@
 
 Results
 
+
+Show all 
snippets
+Hide all 
snippets
+
+
 
 {{ form_errors(form) }}
 {{ form_widget(form._token) }}
@@ -93,7 +98,7 @@
 {% endfor %}
 
 
-
+
 
 {{ results[child.vars.name].snippet }}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibe8541b35f9f0968c927ddf0bee73dad1814a504
Gerrit-PatchSet: 2
Gerrit-Project: wikimedia/discovery/discernatron
Gerrit-Branch: master
Gerrit-Owner: EBernhardson 
Gerrit-Reviewer: EBernhardson 

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


[MediaWiki-commits] [Gerrit] Do import logging via monolog - change (wikimedia...discernatron)

2016-05-23 Thread EBernhardson (Code Review)
EBernhardson has submitted this change and it was merged.

Change subject: Do import logging via monolog
..


Do import logging via monolog

Some temporary hacks logged data during import with echo. Instead make
things a little more explicit by adding a logger to log through. By
default this does nothing on web requests, and sends all log messages
to stderr on console apps.

Change-Id: I992749b7a45822a0b1ffaab72cc9a7b1b3b3a119
---
M app.php
M console.php
M src/RelevanceScoring/RelevanceScoringProvider.php
M src/RelevanceScoring/Repository/ResultsRepository.php
4 files changed, 24 insertions(+), 3 deletions(-)

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



diff --git a/app.php b/app.php
index 803e259..dc50c5c 100644
--- a/app.php
+++ b/app.php
@@ -77,6 +77,14 @@
 return [];
 };
 
+// By default (web reqs) the logger isn't hooked up to any output. Additionally
+// search.logger is used rather than logger to prevent silex/symfony from
+// logging through it. `console.php` pushes a handler which sends this output
+// to stderr.
+$app['search.logger'] = function () {
+return new Monolog\Logger('search');
+};
+
 $ini = parse_ini_file(__DIR__.'/app.ini');
 foreach ($ini as $key => $value) {
 $app[$key] = $value;
diff --git a/console.php b/console.php
index dcfed65..7310db5 100644
--- a/console.php
+++ b/console.php
@@ -2,6 +2,11 @@
 extend('search.logger', function ($logger) {
+$logger->pushHandler(new Monolog\Handler\StreamHandler('php://stderr'));
+
+return $logger;
+});
 $app->register(new Knp\Provider\ConsoleServiceProvider(), [
 'console.name' => 'Wikimedia Relevance Scorer',
 'console.version' => '0.0.1',
diff --git a/src/RelevanceScoring/RelevanceScoringProvider.php 
b/src/RelevanceScoring/RelevanceScoringProvider.php
index 715c870..a485433 100644
--- a/src/RelevanceScoring/RelevanceScoringProvider.php
+++ b/src/RelevanceScoring/RelevanceScoringProvider.php
@@ -67,7 +67,10 @@
 return new Repository\QueriesRepository($app['db']);
 };
 $app['search.repository.results'] = function () use ($app) {
-return new Repository\ResultsRepository($app['db']);
+$repo = new Repository\ResultsRepository($app['db']);
+$repo->setLogger($app['search.logger']);
+
+return $repo;
 };
 $app['search.repository.scores'] = function () use ($app) {
 return new Repository\ScoresRepository($app['db']);
diff --git a/src/RelevanceScoring/Repository/ResultsRepository.php 
b/src/RelevanceScoring/Repository/ResultsRepository.php
index 6ab26d7..6d0f6d5 100644
--- a/src/RelevanceScoring/Repository/ResultsRepository.php
+++ b/src/RelevanceScoring/Repository/ResultsRepository.php
@@ -6,18 +6,23 @@
 use PlasmaConduit\option\None;
 use PlasmaConduit\option\Option;
 use PlasmaConduit\option\Some;
+use Psr\Log\LoggerAwareTrait;
+use Psr\Log\NullLogger;
 use WikiMedia\OAuth\User;
 use WikiMedia\RelevanceScoring\Exception\RuntimeException;
 use WikiMedia\RelevanceScoring\Import\ImportedResult;
 
 class ResultsRepository
 {
+use LoggerAwareTrait;
+
 /** @var Connection */
 private $db;
 
 public function __construct(Connection $db)
 {
 $this->db = $db;
+$this->logger = new NullLogger();
 }
 
 /**
@@ -163,11 +168,11 @@
 throw new RuntimeException('Expected 1 inserted row but 
got: '.$affected);
 }
 $resultIds[$title] = $this->db->lastInsertId();
-echo "Created $title as {$resultIds[$title]}\n";
+$this->logger->debug("Created $title as {$resultIds[$title]}");
 }
 }
 foreach ($results as $result) {
-echo "Inserting {$result->getSource()}: 
{$resultIds[$result->getTitle()]} {$result->getTitle()}\n";
+$this->logger->debug("Inserting {$result->getSource()}: 
{$resultIds[$result->getTitle()]} {$result->getTitle()}");
 $affected = $this->db->insert('results_sources', [
 'query_id' => $queryId,
 'results_id' => $resultIds[$result->getTitle()],

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I992749b7a45822a0b1ffaab72cc9a7b1b3b3a119
Gerrit-PatchSet: 2
Gerrit-Project: wikimedia/discovery/discernatron
Gerrit-Branch: master
Gerrit-Owner: EBernhardson 
Gerrit-Reviewer: EBernhardson 

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


[MediaWiki-commits] [Gerrit] build: Upgrade stylelint-config-wikimedia to 0.2.0 and make ... - change (oojs/ui)

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

Change subject: build: Upgrade stylelint-config-wikimedia to 0.2.0 and make pass
..


build: Upgrade stylelint-config-wikimedia to 0.2.0 and make pass

Change-Id: I4e5c988c1e0b2f1b80c60126dd044ef9f292915b
---
M .stylelintrc
M Gruntfile.js
M package.json
M src/themes/apex/layouts.less
M src/themes/apex/tools.less
M src/themes/apex/widgets.less
M src/themes/mediawiki/tools.less
M src/themes/mediawiki/widgets.less
8 files changed, 11 insertions(+), 11 deletions(-)

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



diff --git a/.stylelintrc b/.stylelintrc
index fe97663..5595bb6 100644
--- a/.stylelintrc
+++ b/.stylelintrc
@@ -8,7 +8,6 @@
"declaration-no-important": null,
"font-family-name-quotes": [ "double-where-recommended" ],
"no-descending-specificity": null,
-   "selector-pseudo-element-colon-notation": [ "single" ],
"string-no-newline": true,
"string-quotes": null
}
diff --git a/Gruntfile.js b/Gruntfile.js
index aec68cb..a0b5108 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -367,7 +367,8 @@
dev: [
'{demos,src}/**/*.css',
'{demos,src}/**/*.less',
-   '!demos/dist/**'
+   '!demos/dist/**',
+   '!demos/styles/demo.rtl.css'
]
},
 
diff --git a/package.json b/package.json
index 7d06a8f..3a946d6 100644
--- a/package.json
+++ b/package.json
@@ -56,6 +56,6 @@
 "karma-qunit": "0.1.9",
 "q": "1.4.1",
 "qunitjs": "1.22.0",
-"stylelint-config-wikimedia": "^0.1.0"
+"stylelint-config-wikimedia": "0.2.0"
   }
 }
diff --git a/src/themes/apex/layouts.less b/src/themes/apex/layouts.less
index 0ff3fa9..5a3af47 100644
--- a/src/themes/apex/layouts.less
+++ b/src/themes/apex/layouts.less
@@ -104,7 +104,7 @@
 .theme-oo-ui-fieldsetLayout () {
margin: 0;
padding: 0;
-   border: none;
+   border: 0;
 
+ .oo-ui-fieldsetLayout,
+ .oo-ui-formLayout {
diff --git a/src/themes/apex/tools.less b/src/themes/apex/tools.less
index 8a48ec9..0c662e9 100644
--- a/src/themes/apex/tools.less
+++ b/src/themes/apex/tools.less
@@ -6,7 +6,7 @@
.oo-ui-vertical-gradient(#fff, #F1F7FB);
 
.oo-ui-toolbar-bar {
-   border: none;
+   border: 0;
background: none;
}
}
diff --git a/src/themes/apex/widgets.less b/src/themes/apex/widgets.less
index 8a41159..8f30907 100644
--- a/src/themes/apex/widgets.less
+++ b/src/themes/apex/widgets.less
@@ -514,7 +514,7 @@
}
 
> .oo-ui-capsuleMultiselectWidget-content > input {
-   border: none;
+   border: 0;
line-height: 1.675em;
margin: 0;
margin-left: 0.2em;
@@ -611,7 +611,7 @@
 
 .theme-oo-ui-optionWidget () {
padding: 0.25em 0.5em;
-   border: none;
+   border: 0;
 
&-highlighted {
background-color: #e1f3ff;
@@ -772,7 +772,7 @@
padding: 0.5em 1em;
margin: 0.5em 0 0 0.75em;
border: 1px solid transparent;
-   border-bottom: none;
+   border-bottom: 0;
border-top-left-radius: 0.5em;
border-top-right-radius: 0.5em;
 
diff --git a/src/themes/mediawiki/tools.less b/src/themes/mediawiki/tools.less
index dca3667..c635029 100644
--- a/src/themes/mediawiki/tools.less
+++ b/src/themes/mediawiki/tools.less
@@ -57,7 +57,7 @@
}
 
> .oo-ui-toolGroup {
-   border-right: none;
+   border-right: 0;
}
 
> .oo-ui-popupToolGroup > .oo-ui-popupToolGroup-handle {
@@ -89,7 +89,7 @@
 
.oo-ui-toolGroup {
.oo-ui-widget-enabled {
-   border-right: none !important;
+   border-right: 0 !important;
}
}
 }
diff --git a/src/themes/mediawiki/widgets.less 
b/src/themes/mediawiki/widgets.less
index 1a80c2b..bf80133 100644
--- a/src/themes/mediawiki/widgets.less
+++ b/src/themes/mediawiki/widgets.less
@@ -1007,7 +1007,7 @@
padding: 0.35em 1em;
margin: 0.5em 0 0 0.75em;
border: 1px solid transparent;
-   border-bottom: none;
+   border-bottom: 0;
border-top-left-radius: @border-radius-default;
border-top-right-radius: @border-radius-default;
color: @color-default;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4e5c988c1e0b2f1b80c60126dd044ef9f292915b
Gerrit-PatchSet: 2

[MediaWiki-commits] [Gerrit] Upgrade Gradle to v2.13 - change (apps...wikipedia)

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

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

Change subject: Upgrade Gradle to v2.13
..

Upgrade Gradle to v2.13

https://docs.gradle.org/2.13/release-notes

Change-Id: If2b2ae1a69d177743c643250020f9c317ec9b136
---
M gradle/wrapper/gradle-wrapper.jar
M gradle/wrapper/gradle-wrapper.properties
M gradlew
M gradlew.bat
4 files changed, 30 insertions(+), 26 deletions(-)


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

diff --git a/gradle/wrapper/gradle-wrapper.jar 
b/gradle/wrapper/gradle-wrapper.jar
index 2c6137b..ca78035 100644
--- a/gradle/wrapper/gradle-wrapper.jar
+++ b/gradle/wrapper/gradle-wrapper.jar
Binary files differ
diff --git a/gradle/wrapper/gradle-wrapper.properties 
b/gradle/wrapper/gradle-wrapper.properties
index d5bbaed..648a876 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,6 @@
-#Thu Mar 17 16:09:18 MDT 2016
+#Mon May 23 16:27:19 MDT 2016
 distributionBase=GRADLE_USER_HOME
 distributionPath=wrapper/dists
 zipStoreBase=GRADLE_USER_HOME
 zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-2.12-all.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-2.13-all.zip
diff --git a/gradlew b/gradlew
index 9d82f78..27309d9 100755
--- a/gradlew
+++ b/gradlew
@@ -6,11 +6,29 @@
 ##
 ##
 
-# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to 
pass JVM options to this script.
-DEFAULT_JVM_OPTS=""
+# Attempt to set APP_HOME
+# Resolve links: $0 may be a link
+PRG="$0"
+# Need this for relative symlinks.
+while [ -h "$PRG" ] ; do
+ls=`ls -ld "$PRG"`
+link=`expr "$ls" : '.*-> \(.*\)$'`
+if expr "$link" : '/.*' > /dev/null; then
+PRG="$link"
+else
+PRG=`dirname "$PRG"`"/$link"
+fi
+done
+SAVED="`pwd`"
+cd "`dirname \"$PRG\"`/" >/dev/null
+APP_HOME="`pwd -P`"
+cd "$SAVED" >/dev/null
 
 APP_NAME="Gradle"
 APP_BASE_NAME=`basename "$0"`
+
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to 
pass JVM options to this script.
+DEFAULT_JVM_OPTS=""
 
 # Use the maximum available, or set MAX_FD != -1 to use that value.
 MAX_FD="maximum"
@@ -30,6 +48,7 @@
 cygwin=false
 msys=false
 darwin=false
+nonstop=false
 case "`uname`" in
   CYGWIN* )
 cygwin=true
@@ -40,25 +59,10 @@
   MINGW* )
 msys=true
 ;;
+  NONSTOP* )
+nonstop=true
+;;
 esac
-
-# Attempt to set APP_HOME
-# Resolve links: $0 may be a link
-PRG="$0"
-# Need this for relative symlinks.
-while [ -h "$PRG" ] ; do
-ls=`ls -ld "$PRG"`
-link=`expr "$ls" : '.*-> \(.*\)$'`
-if expr "$link" : '/.*' > /dev/null; then
-PRG="$link"
-else
-PRG=`dirname "$PRG"`"/$link"
-fi
-done
-SAVED="`pwd`"
-cd "`dirname \"$PRG\"`/" >/dev/null
-APP_HOME="`pwd -P`"
-cd "$SAVED" >/dev/null
 
 CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
 
@@ -85,7 +89,7 @@
 fi
 
 # Increase the maximum file descriptors if we can.
-if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
+if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; 
then
 MAX_FD_LIMIT=`ulimit -H -n`
 if [ $? -eq 0 ] ; then
 if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
diff --git a/gradlew.bat b/gradlew.bat
index 72d362d..f6d5974 100644
--- a/gradlew.bat
+++ b/gradlew.bat
@@ -8,14 +8,14 @@
 @rem Set local scope for the variables with windows NT shell
 if "%OS%"=="Windows_NT" setlocal
 
-@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS 
to pass JVM options to this script.
-set DEFAULT_JVM_OPTS=
-
 set DIRNAME=%~dp0
 if "%DIRNAME%" == "" set DIRNAME=.
 set APP_BASE_NAME=%~n0
 set APP_HOME=%DIRNAME%
 
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS 
to pass JVM options to this script.
+set DEFAULT_JVM_OPTS=
+
 @rem Find java.exe
 if defined JAVA_HOME goto findJavaFromJavaHome
 

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

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

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


[MediaWiki-commits] [Gerrit] build: Bump various devDependencies to latest - change (oojs/ui)

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

Change subject: build: Bump various devDependencies to latest
..


build: Bump various devDependencies to latest

 grunt0.4.5  →  1.0.1
 grunt-banana-checker 0.4.0  →  0.5.0
 grunt-cli   0.1.13  →  1.2.0
 grunt-contrib-concat 1.0.0  →  1.0.1
 grunt-contrib-less   1.2.0  →  1.3.0
 grunt-cssjanus   0.2.4  →  0.3.2
 grunt-exec   0.4.6  →  0.4.7
 grunt-file-exists0.1.3  →  0.1.4
 grunt-image  1.3.0  →  1.5.1
 grunt-karma 0.12.2  →  1.0.0
 karma-chrome-launcher0.2.2  →  1.0.1
 karma-coverage   0.5.5  →  1.0.0
 karma-firefox-launcher   0.1.7  →  1.0.0
 karma-qunit  0.1.9  →  1.0.0

Move grunt-csscomb and grunt-promise-q, both semi-mothballed projects
without recent commits, to use a personal fork that supports newer
versions of grunt. Oy. :-(

Change-Id: I1bc16b6d4084a1914a9d7d485fd42c3204eaf823
---
M package.json
1 file changed, 16 insertions(+), 16 deletions(-)

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



diff --git a/package.json b/package.json
index 7d06a8f..883e1f3 100644
--- a/package.json
+++ b/package.json
@@ -26,34 +26,34 @@
 "oojs": "1.1.10"
   },
   "devDependencies": {
-"grunt": "0.4.5",
-"grunt-banana-checker": "0.4.0",
-"grunt-cli": "0.1.13",
+"grunt": "1.0.1",
+"grunt-banana-checker": "0.5.0",
+"grunt-cli": "1.2.0",
 "grunt-contrib-clean": "1.0.0",
-"grunt-contrib-concat": "1.0.0",
+"grunt-contrib-concat": "1.0.1",
 "grunt-contrib-copy": "1.0.0",
 "grunt-contrib-cssmin": "1.0.1",
 "grunt-contrib-jshint": "1.0.0",
-"grunt-contrib-less": "1.2.0",
+"grunt-contrib-less": "1.3.0",
 "grunt-contrib-uglify": "1.0.1",
 "grunt-contrib-watch": "1.0.0",
-"grunt-csscomb": "3.1.0",
-"grunt-cssjanus": "0.2.4",
-"grunt-exec": "0.4.6",
-"grunt-file-exists": "0.1.3",
-"grunt-image": "1.3.0",
+"grunt-csscomb": 
"git://github.com/jdforrester/grunt-csscomb.git#v3.1.0-wmf.1",
+"grunt-cssjanus": "0.3.2",
+"grunt-exec": "0.4.7",
+"grunt-file-exists": "0.1.4",
+"grunt-image": "1.5.1",
 "grunt-jscs": "2.8.0",
 "grunt-jsonlint": "1.0.7",
-"grunt-karma": "0.12.2",
-"grunt-promise-q": "0.1.1",
+"grunt-karma": "1.0.0",
+"grunt-promise-q": 
"git://github.com/jdforrester/grunt-promise-q.git#v0.1.1-wmf.1",
 "grunt-stylelint": "0.3.0",
 "grunt-svg2png": 
"git://github.com/jdforrester/grunt-svg2png.git#v0.2.7-wmf.1",
 "grunt-tyops": "0.1.0",
 "karma": "0.13.22",
-"karma-chrome-launcher": "0.2.2",
-"karma-coverage": "0.5.5",
-"karma-firefox-launcher": "0.1.7",
-"karma-qunit": "0.1.9",
+"karma-chrome-launcher": "1.0.1",
+"karma-coverage": "1.0.0",
+"karma-firefox-launcher": "1.0.0",
+"karma-qunit": "1.0.0",
 "q": "1.4.1",
 "qunitjs": "1.22.0",
 "stylelint-config-wikimedia": "^0.1.0"

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1bc16b6d4084a1914a9d7d485fd42c3204eaf823
Gerrit-PatchSet: 4
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: Jforrester 
Gerrit-Reviewer: Bartosz Dziewoński 
Gerrit-Reviewer: Esanders 
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] Include ApiEchoMarkReadTest in @Database group - change (mediawiki...Echo)

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

Change subject: Include ApiEchoMarkReadTest in @Database group
..


Include ApiEchoMarkReadTest in @Database group

This gets the database reset upon completion, which is needed for some reason I
can't quite locate. I17ef1f51 passes with this change.

Change-Id: I12759772001048a3be69a80adbb2572b7d9f0397
---
M tests/phpunit/api/ApiEchoMarkReadTest.php
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/tests/phpunit/api/ApiEchoMarkReadTest.php 
b/tests/phpunit/api/ApiEchoMarkReadTest.php
index 104e0b0..8857e6c 100644
--- a/tests/phpunit/api/ApiEchoMarkReadTest.php
+++ b/tests/phpunit/api/ApiEchoMarkReadTest.php
@@ -3,6 +3,7 @@
 /**
  * @group medium
  * @group API
+ * @group Database
  * @covers ApiQuery
  */
 class ApiEchoMarkReadTest extends ApiTestCase {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I12759772001048a3be69a80adbb2572b7d9f0397
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: Ori.livneh 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Fix spline smoothing when NAs are present - change (wikimedia...polloi)

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

Change subject: Fix spline smoothing when NAs are present
..


Fix spline smoothing when NAs are present

Bug: T132711
Change-Id: I9c1ab207a3f43dedfc2a08ca6621cb02d9974434
---
M R/smoothing.R
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/R/smoothing.R b/R/smoothing.R
index 16e0941..a1443d2 100644
--- a/R/smoothing.R
+++ b/R/smoothing.R
@@ -55,7 +55,7 @@
  return(NA)
}))
  })))
-   return(cbind(date = dataset$date, smoothed))
+   return(cbind(date = dataset$date, smoothed + (1 * is.na(dataset[, 
-1])) * dataset[, -1]))
  },
  {
return(dataset)

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

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

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


[MediaWiki-commits] [Gerrit] Fix spline smoothing when NAs are present - change (wikimedia...polloi)

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

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

Change subject: Fix spline smoothing when NAs are present
..

Fix spline smoothing when NAs are present

Bug: T132711
Change-Id: I9c1ab207a3f43dedfc2a08ca6621cb02d9974434
---
M R/smoothing.R
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/discovery/polloi 
refs/changes/75/290375/1

diff --git a/R/smoothing.R b/R/smoothing.R
index 16e0941..a1443d2 100644
--- a/R/smoothing.R
+++ b/R/smoothing.R
@@ -55,7 +55,7 @@
  return(NA)
}))
  })))
-   return(cbind(date = dataset$date, smoothed))
+   return(cbind(date = dataset$date, smoothed + (1 * is.na(dataset[, 
-1])) * dataset[, -1]))
  },
  {
return(dataset)

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

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

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


[MediaWiki-commits] [Gerrit] Stylelint: Add no duplicate selectors rule - change (mediawiki...MobileFrontend)

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

Change subject: Stylelint: Add no duplicate selectors rule
..


Stylelint: Add no duplicate selectors rule

Change-Id: Ieb2ac43aa67cbf357166f7476c34b7ff4baa7b53
---
M .stylelintrc
M resources/skins.minerva.special.styles/common.less
M resources/skins.minerva.tablet.styles/common.less
3 files changed, 14 insertions(+), 19 deletions(-)

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



diff --git a/.stylelintrc b/.stylelintrc
index d6f0e25..33f1f00 100644
--- a/.stylelintrc
+++ b/.stylelintrc
@@ -5,6 +5,8 @@
"no-eol-whitespace": true,
"no-missing-eof-newline": true,
 
+   "no-duplicate-selectors": true,
+
"color-hex-case": [ "lower" ],
"color-hex-length": [ "short" ],
"color-named": [ "never" ],
diff --git a/resources/skins.minerva.special.styles/common.less 
b/resources/skins.minerva.special.styles/common.less
index 6b26f61..e01c984 100644
--- a/resources/skins.minerva.special.styles/common.less
+++ b/resources/skins.minerva.special.styles/common.less
@@ -2,21 +2,6 @@
 @import 'minerva.mixins';
 
 // FIXME: Apply these styles to all special pages
-.mw-mf-special {
-   .content-header {
-   padding: 0 0 20px;
-   border-bottom: 1px solid @headerBorderBottom;
-
-   h2 {
-   padding: 0;
-   font-size: 1.1em;
-   font-weight: bold;
-   border-bottom: none;
-   text-align: center;
-   }
-   }
-}
-
 .mw-mf-special #content {
@verticalPadding: .5em;
#section_0 {
@@ -31,10 +16,21 @@
padding: 0;
border-bottom: none;
}
-
 }
 
 .mw-mf-special {
+   .content-header {
+   padding: 0 0 20px;
+   border-bottom: 1px solid @headerBorderBottom;
+
+   h2 {
+   padding: 0;
+   font-size: 1.1em;
+   font-weight: bold;
+   border-bottom: none;
+   text-align: center;
+   }
+   }
 
.content {
// don't apply these styles to headings in message boxes
diff --git a/resources/skins.minerva.tablet.styles/common.less 
b/resources/skins.minerva.tablet.styles/common.less
index ec2a8ef..f4dba46 100644
--- a/resources/skins.minerva.tablet.styles/common.less
+++ b/resources/skins.minerva.tablet.styles/common.less
@@ -35,9 +35,6 @@
 
.heading-holder {
padding: 20px 0;
-   }
-
-   .heading-holder {
position: relative;
 
#section_0 {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ieb2ac43aa67cbf357166f7476c34b7ff4baa7b53
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Esanders 
Gerrit-Reviewer: Jdlrobson 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Stylelint: Add remaining media and @rule whitespace rules - change (mediawiki...MobileFrontend)

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

Change subject: Stylelint: Add remaining media and @rule whitespace rules
..


Stylelint: Add remaining media and @rule whitespace rules

Change-Id: I7fed5b19a9d3993a47a5c9b760c401da85bca378
---
M .stylelintrc
M resources/mobile.search/SearchOverlay.less
M resources/skins.minerva.base.styles/images.less
3 files changed, 26 insertions(+), 1 deletion(-)

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



diff --git a/.stylelintrc b/.stylelintrc
index 1f5e2dd..d6f0e25 100644
--- a/.stylelintrc
+++ b/.stylelintrc
@@ -65,6 +65,25 @@
"selector-list-comma-space-after": [ "always-single-line" ],
"selector-list-comma-space-before": [ "never" ],
 
-   "media-query-parentheses-space-inside": [ "always" ]
+   "media-feature-colon-space-after": [ "always" ],
+   "media-feature-colon-space-before": [ "never" ],
+   "media-feature-name-no-vendor-prefix": true,
+   "media-feature-no-missing-punctuation": true,
+   "media-feature-range-operator-space-after": [ "always" ],
+   "media-feature-range-operator-space-before": [ "always" ],
+
+   "media-query-parentheses-space-inside": [ "always" ],
+
+   "media-query-list-comma-newline-after": [ "always-multi-line" ],
+   "media-query-list-comma-newline-before": [ "never-multi-line" ],
+   "media-query-list-comma-space-after": [ "always-single-line" ],
+   "media-query-list-comma-space-before": [ "never" ],
+
+   "at-rule-empty-line-before": [ "always", {
+   except: [ "blockless-group", "first-nested" ],
+   ignore: ["after-comment"],
+   } ],
+   "at-rule-name-case": "lower",
+   "at-rule-name-space-after": "always-single-line"
}
 }
diff --git a/resources/mobile.search/SearchOverlay.less 
b/resources/mobile.search/SearchOverlay.less
index 02b5829..61f4b95 100644
--- a/resources/mobile.search/SearchOverlay.less
+++ b/resources/mobile.search/SearchOverlay.less
@@ -115,6 +115,7 @@
opacity: 1;
}
 }
+
 @keyframes fadeIn {
from {
opacity: 0;
@@ -123,6 +124,7 @@
opacity: 1;
}
 }
+
 @-webkit-keyframes fadeOut {
from {
opacity: 1;
@@ -131,6 +133,7 @@
opacity: 0;
}
 }
+
 @keyframes fadeOut {
from {
opacity: 1;
@@ -139,6 +142,7 @@
opacity: 0;
}
 }
+
 .animations {
.search-overlay {
&.visible {
diff --git a/resources/skins.minerva.base.styles/images.less 
b/resources/skins.minerva.base.styles/images.less
index 525b423..a3e35ed 100644
--- a/resources/skins.minerva.base.styles/images.less
+++ b/resources/skins.minerva.base.styles/images.less
@@ -52,6 +52,7 @@
opacity: 1;
}
 }
+
 @keyframes fadeInImage {
from {
opacity: 0;
@@ -69,6 +70,7 @@
background-color: transparent;
}
 }
+
 @keyframes fadeOutContainer {
from {
background-color: @colorGray14;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7fed5b19a9d3993a47a5c9b760c401da85bca378
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Esanders 
Gerrit-Reviewer: Jdlrobson 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Stylelint: Add selector whitespace rules - change (mediawiki...MobileFrontend)

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

Change subject: Stylelint: Add selector whitespace rules
..


Stylelint: Add selector whitespace rules

Change-Id: Ia8ddfa9cdc92e9829b1e17940131dd70342e8666
---
M .stylelintrc
M resources/mobile.backtotop/backtotop.less
M resources/skins.minerva.content.styles/lists.less
3 files changed, 12 insertions(+), 3 deletions(-)

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



diff --git a/.stylelintrc b/.stylelintrc
index 176090e..1f5e2dd 100644
--- a/.stylelintrc
+++ b/.stylelintrc
@@ -56,6 +56,15 @@
"block-opening-brace-space-after": [ "always-single-line" ],
"block-opening-brace-space-before": [ "always" ],
 
+   "selector-combinator-space-after": [ "always" ],
+   "selector-combinator-space-before": [ "always" ],
+   "selector-no-vendor-prefix": true,
+   "selector-root-no-composition": true,
+
+   "selector-list-comma-newline-before": [ "never-multi-line" ],
+   "selector-list-comma-space-after": [ "always-single-line" ],
+   "selector-list-comma-space-before": [ "never" ],
+
"media-query-parentheses-space-inside": [ "always" ]
}
 }
diff --git a/resources/mobile.backtotop/backtotop.less 
b/resources/mobile.backtotop/backtotop.less
index 7528fce..28d72a6 100644
--- a/resources/mobile.backtotop/backtotop.less
+++ b/resources/mobile.backtotop/backtotop.less
@@ -33,7 +33,7 @@
transform: translate( 50%, -50% );
}
 
-   >.arrow-up {
+   > .arrow-up {
width: 0;
height: 0;
border-left: 7px solid transparent;
diff --git a/resources/skins.minerva.content.styles/lists.less 
b/resources/skins.minerva.content.styles/lists.less
index aad4ce0..d1df734 100644
--- a/resources/skins.minerva.content.styles/lists.less
+++ b/resources/skins.minerva.content.styles/lists.less
@@ -18,9 +18,9 @@
}
ul {
list-style: square inside;
-   &>li>ul {
+   & > li > ul {
list-style-type: disc;
-   &>li>ul {
+   & > li > ul {
list-style-type: circle;
}
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia8ddfa9cdc92e9829b1e17940131dd70342e8666
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Esanders 
Gerrit-Reviewer: Esanders 
Gerrit-Reviewer: Jdlrobson 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Dont override permissions inside vagrant - change (wikimedia...discernatron)

2016-05-23 Thread EBernhardson (Code Review)
EBernhardson has submitted this change and it was merged.

Change subject: Dont override permissions inside vagrant
..


Dont override permissions inside vagrant

This was causing the vendor/bin/phpunit command to be non-executable.
I don't think we have to worry too much about file permissions here,
just let Vagrant inherit the host permissions.

Change-Id: Icab3307f6c7798ae04ff286b0d7e36fb89fbf1e5
---
M Vagrantfile
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/Vagrantfile b/Vagrantfile
index 300ff72..e96de40 100644
--- a/Vagrantfile
+++ b/Vagrantfile
@@ -5,7 +5,7 @@
 override.vm.box_url = 
'https://cloud-images.ubuntu.com/vagrant/trusty/current/trusty-server-cloudimg-amd64-vagrant-disk1.box'
 override.vm.box_download_insecure = true
 override.vm.network "private_network", ip: "192.168.33.10"
-override.vm.synced_folder ".", "/vagrant", :mount_options => 
["dmode=777", "fmode=666"]
+override.vm.synced_folder ".", "/vagrant", :mount_options => 
["dmode=777"]
 end
 
 config.vm.provider :lxc do |_lxc, override|

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Icab3307f6c7798ae04ff286b0d7e36fb89fbf1e5
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/discovery/discernatron
Gerrit-Branch: master
Gerrit-Owner: EBernhardson 
Gerrit-Reviewer: EBernhardson 

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


[MediaWiki-commits] [Gerrit] Add a place for local hacks - change (wikimedia...discernatron)

2016-05-23 Thread EBernhardson (Code Review)
EBernhardson has submitted this change and it was merged.

Change subject: Add a place for local hacks
..


Add a place for local hacks

Change-Id: Ie19545ddcb105ca9eb0eb04f8b63ce6d6b4b2f66
---
M .gitignore
M app.php
2 files changed, 6 insertions(+), 0 deletions(-)

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



diff --git a/.gitignore b/.gitignore
index ec39186..580e235 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,6 +2,7 @@
 .*.sw?
 /app.db
 /app.ini
+/app.debug.php
 /public/vendor/bootstrap
 /composer.lock
 /cache
diff --git a/app.php b/app.php
index b067ab2..803e259 100644
--- a/app.php
+++ b/app.php
@@ -153,4 +153,9 @@
 })
 ->bind('logout');
 
+// Place for local hacks
+if (file_exists(__DIR__.'/app.debug.php')) {
+require __DIR__.'/app.debug.php';
+}
+
 return $app;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie19545ddcb105ca9eb0eb04f8b63ce6d6b4b2f66
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/discovery/discernatron
Gerrit-Branch: master
Gerrit-Owner: EBernhardson 
Gerrit-Reviewer: EBernhardson 

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


[MediaWiki-commits] [Gerrit] dependencies: Update es5-shim to v4.5.8 - change (oojs/ui)

2016-05-23 Thread Jforrester (Code Review)
Jforrester has uploaded a new change for review.

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

Change subject: dependencies: Update es5-shim to v4.5.8
..

dependencies: Update es5-shim to v4.5.8

Project site
* https://github.com/es-shims/es5-shim

File source
* https://github.com/es-shims/es5-shim/tree/v4.5.8

Changelog
* https://github.com/es-shims/es5-shim/blob/v4.5.8/CHANGES

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


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/74/290374/1

diff --git a/package.json b/package.json
index 7d06a8f..8b6aa6b 100644
--- a/package.json
+++ b/package.json
@@ -21,7 +21,7 @@
 "demos": "grunt publish-build && grunt demos"
   },
   "dependencies": {
-"es5-shim": "4.1.14",
+"es5-shim": "4.5.8",
 "jquery": "1.11.3",
 "oojs": "1.1.10"
   },

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

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

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


[MediaWiki-commits] [Gerrit] Merge remote-tracking branch 'origin/master' into es2.x - change (mediawiki...CirrusSearch)

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

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

Change subject: Merge remote-tracking branch 'origin/master' into es2.x
..

Merge remote-tracking branch 'origin/master' into es2.x

Change-Id: I14f2a0d7baf8b4b98baa17dfeac5b55b2c71f481
---
M includes/DataSender.php
M includes/ElasticsearchIntermediary.php
2 files changed, 1 insertion(+), 36 deletions(-)


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

diff --git a/includes/DataSender.php b/includes/DataSender.php
index b8e5e97..b500a87 100644
--- a/includes/DataSender.php
+++ b/includes/DataSender.php
@@ -349,29 +349,10 @@
continue;
}
 
-<<< HEAD   (8fef8a Merge "Update classifyError to comply with new error 
handlin)
$error = $bulkResponse->getFullError();
if ( $error['type'] !== 'document_missing_exception' ) {
$justDocumentMissing = false;
} elseif ( $logCallback ) {
-===
-   $error = $bulkResponse->getError();
-   if ( is_string( $error ) ) {
-   // es 1.x cluster
-   if ( false === strpos( $error, 
'DocumentMissingException' ) ) {
-   $justDocumentMissing = false;
-   continue;
-   }
-   } else {
-   // es 2.x cluster
-   if ( $error['type'] !== 
'document_missing_exception' ) {
-   $justDocumentMissing = false;
-   continue;
-   }
-   }
-
-   if ( $logCallback ) {
->>> BRANCH (5dea0f Localisation updates from https://translatewiki.net.)
// This is generally not an error but we should
// log it to see how many we get
$action = $bulkResponse->getAction();
diff --git a/includes/ElasticsearchIntermediary.php 
b/includes/ElasticsearchIntermediary.php
index a915518..b55019a 100644
--- a/includes/ElasticsearchIntermediary.php
+++ b/includes/ElasticsearchIntermediary.php
@@ -474,13 +474,8 @@
list( $status, $message ) = $this->extractMessageAndStatus( 
$exception );
$context['message'] = $message;
 
-<<< HEAD   (8fef8a Merge "Update classifyError to comply with new error 
handlin)
-   $stats = RequestContext::getMain()->getStats();
-   $type = self::classifyError( $exception );
-===
$stats = 
MediaWikiServices::getInstance()->getStatsdDataFactory();
-   $type = self::classifyErrorMessage( $message );
->>> BRANCH (5dea0f Localisation updates from https://translatewiki.net.)
+   $type = self::classifyError( $exception );
$clusterName = $this->connection->getClusterName();
$stats->increment( 
"CirrusSearch.$clusterName.backend_failure.$type" );
 
@@ -595,7 +590,6 @@
);
}
 
-<<< HEAD   (8fef8a Merge "Update classifyError to comply with new error 
handlin)
return $exception->getResponse()->getFullError();
}
 
@@ -607,16 +601,6 @@
$error = self::extractFullError( $exception );
 
return $error['type'] . ': ' .$error['reason'];
-===
-   // We must be talking to an es2.x cluster. Don't do anything 
particularly
-   // fancy, encode the error so it can be logged as a generic 
unknown error.
-   $error = $exception->getResponse()->getError();
-   if ( is_array( $error ) ) {
-   return json_encode( $error );
-   }
-
-   return $exception->getElasticsearchException()->getMessage();
->>> BRANCH (5dea0f Localisation updates from https://translatewiki.net.)
}
 
/**

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I14f2a0d7baf8b4b98baa17dfeac5b55b2c71f481
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CirrusSearch
Gerrit-Branch: es2.x
Gerrit-Owner: EBernhardson 

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


[MediaWiki-commits] [Gerrit] Clear the queue when logging is done - change (mediawiki...SpamBlacklist)

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

Change subject: Clear the queue when logging is done
..


Clear the queue when logging is done

Follows-up 5910bfd7ba.

* Remove one-off $domain variable.
* Rename $urlChanges to highlight that urlChanges is a log of changes,
  not a list of changes to be applied.
* Rename doEventLogging() to isLoggingEnabled().

Change-Id: Idbd6551502362422beea4d86b912128a43e9c96b
---
M SpamBlacklist_body.php
1 file changed, 13 insertions(+), 15 deletions(-)

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



diff --git a/SpamBlacklist_body.php b/SpamBlacklist_body.php
index 7cbca64..b0e94bb 100644
--- a/SpamBlacklist_body.php
+++ b/SpamBlacklist_body.php
@@ -10,7 +10,7 @@
 * Changes to external links, for logging purposes
 * @var array[]
 */
-   private $urlChanges = array();
+   private $urlChangeLog = array();
 
/**
 * Returns the code for the blacklist implementation
@@ -123,7 +123,7 @@
return $retVal;
}
 
-   private function shouldDoEventLogging() {
+   private function isLoggingEnabled() {
global $wgSpamBlacklistEventLogging;
return $wgSpamBlacklistEventLogging && class_exists( 
'EventLogging' );
}
@@ -136,7 +136,7 @@
 * @param string[] $addedLinks
 */
private function logUrlChanges( $oldLinks, $newLinks, $addedLinks ) {
-   if ( !$this->shouldDoEventLogging() ) {
+   if ( !$this->isLoggingEnabled() ) {
return;
}
 
@@ -158,7 +158,7 @@
 * @param Revision $rev
 */
public function doLogging( User $user, Title $title, Revision $rev ) {
-   if ( !$this->shouldDoEventLogging() ) {
+   if ( !$this->isLoggingEnabled() ) {
return;
}
 
@@ -169,7 +169,9 @@
'userId' => $user->getId(),
'userText' => $user->getName(),
);
-   $changes = $this->urlChanges;
+   $changes = $this->urlChangeLog;
+   // Empty the changes queue in case this function gets called 
more than once
+   $this->urlChangeLog = array();
 
DeferredUpdates::addCallableUpdate( function() use ( $changes, 
$baseInfo ) {
foreach ( $changes as $change ) {
@@ -180,30 +182,26 @@
);
}
} );
-
-   // Empty the changes queue in case this function gets called 
more than once
-   $this->urlChanges = array();
}
 
/**
-* Generate events for each url addition or removal
+* Queue log data about change for a url addition or removal
 *
 * @param string $url
-* @param string $type 'insert' or 'remove'
+* @param string $action 'insert' or 'remove'
 */
-   private function logUrlChange( $url, $type ) {
+   private function logUrlChange( $url, $action ) {
$parsed = wfParseUrl( $url );
-   $domain = $parsed['host'];
$info = array(
-   'action' => $type,
+   'action' => $action,
'protocol' => $parsed['scheme'],
-   'domain' => $domain,
+   'domain' => $parsed['host'],
'path' => $parsed['path'],
'query' => $parsed['query'],
'fragment' => $parsed['fragment'],
);
 
-   $this->urlChanges[] = $info;
+   $this->urlChangeLog[] = $info;
}
 
/**

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Idbd6551502362422beea4d86b912128a43e9c96b
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/SpamBlacklist
Gerrit-Branch: master
Gerrit-Owner: Krinkle 
Gerrit-Reviewer: Jackmcbarn 
Gerrit-Reviewer: Kaldari 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Milimetric 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] We don't care to get failmail when banner history import fails - change (wikimedia...crm)

2016-05-23 Thread Awight (Code Review)
Awight has uploaded a new change for review.

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

Change subject: We don't care to get failmail when banner history import fails
..

We don't care to get failmail when banner history import fails

TODO: We should still have something monitoring the volume of these failures
however.

Change-Id: I64992d31e07325a924ce141f0818aabef2f38dd0
---
M sites/all/modules/wmf_common/WmfException.php
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/72/290372/1

diff --git a/sites/all/modules/wmf_common/WmfException.php 
b/sites/all/modules/wmf_common/WmfException.php
index 4da6bbc..a39d0d2 100644
--- a/sites/all/modules/wmf_common/WmfException.php
+++ b/sites/all/modules/wmf_common/WmfException.php
@@ -71,6 +71,7 @@
 ),
 'BANNER_HISTORY' => array(
  'reject' => TRUE,
+ 'no-email' => TRUE,
 ),
 
 // other errors

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I64992d31e07325a924ce141f0818aabef2f38dd0
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: master
Gerrit-Owner: Awight 

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


[MediaWiki-commits] [Gerrit] Update es5-shim to v4.5.8 - change (mediawiki/core)

2016-05-23 Thread Jforrester (Code Review)
Jforrester has uploaded a new change for review.

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

Change subject: Update es5-shim to v4.5.8
..

Update es5-shim to v4.5.8

Project site
* https://github.com/es-shims/es5-shim

File source
* https://github.com/es-shims/es5-shim/tree/v4.5.8

Changelog
* https://github.com/es-shims/es5-shim/blob/v4.5.8/CHANGES

Change-Id: I4a6a703d7db00d7eaaeb1365c1c19f3ae055c440
---
M resources/lib/es5-shim/es5-shim.js
1 file changed, 917 insertions(+), 327 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/71/290371/1

diff --git a/resources/lib/es5-shim/es5-shim.js 
b/resources/lib/es5-shim/es5-shim.js
index 85f51e2..91a7a39 100644
--- a/resources/lib/es5-shim/es5-shim.js
+++ b/resources/lib/es5-shim/es5-shim.js
@@ -10,11 +10,11 @@
 ;
 
 // UMD (Universal Module Definition)
-// see https://github.com/umdjs/umd/blob/master/returnExports.js
+// see https://github.com/umdjs/umd/blob/master/templates/returnExports.js
 (function (root, factory) {
 'use strict';
 
-/*global define, exports, module */
+/* global define, exports, module */
 if (typeof define === 'function' && define.amd) {
 // AMD. Register as an anonymous module.
 define(factory);
@@ -39,65 +39,60 @@
  */
 
 // Shortcut to an often accessed properties, in order to avoid multiple
-// dereference that costs universally.
-var ArrayPrototype = Array.prototype;
-var ObjectPrototype = Object.prototype;
-var FunctionPrototype = Function.prototype;
-var StringPrototype = String.prototype;
-var NumberPrototype = Number.prototype;
+// dereference that costs universally. This also holds a reference to 
known-good
+// functions.
+var $Array = Array;
+var ArrayPrototype = $Array.prototype;
+var $Object = Object;
+var ObjectPrototype = $Object.prototype;
+var $Function = Function;
+var FunctionPrototype = $Function.prototype;
+var $String = String;
+var StringPrototype = $String.prototype;
+var $Number = Number;
+var NumberPrototype = $Number.prototype;
 var array_slice = ArrayPrototype.slice;
 var array_splice = ArrayPrototype.splice;
 var array_push = ArrayPrototype.push;
 var array_unshift = ArrayPrototype.unshift;
 var array_concat = ArrayPrototype.concat;
+var array_join = ArrayPrototype.join;
 var call = FunctionPrototype.call;
+var apply = FunctionPrototype.apply;
+var max = Math.max;
+var min = Math.min;
 
 // Having a toString local variable name breaks in Opera so use to_string.
 var to_string = ObjectPrototype.toString;
 
-var isArray = Array.isArray || function isArray(obj) {
-return to_string.call(obj) === '[object Array]';
-};
-
+/* global Symbol */
+/* eslint-disable one-var-declaration-per-line, no-redeclare, 
max-statements-per-line */
 var hasToStringTag = typeof Symbol === 'function' && typeof Symbol.toStringTag 
=== 'symbol';
-var isCallable; /* inlined from https://npmjs.com/is-callable */ var fnToStr = 
Function.prototype.toString, tryFunctionObject = function 
tryFunctionObject(value) { try { fnToStr.call(value); return true; } catch (e) 
{ return false; } }, fnClass = '[object Function]', genClass = '[object 
GeneratorFunction]'; isCallable = function isCallable(value) { if (typeof value 
!== 'function') { return false; } if (hasToStringTag) { return 
tryFunctionObject(value); } var strClass = to_string.call(value); return 
strClass === fnClass || strClass === genClass; };
+var isCallable; /* inlined from https://npmjs.com/is-callable */ var fnToStr = 
Function.prototype.toString, constructorRegex = /^\s*class /, isES6ClassFn = 
function isES6ClassFn(value) { try { var fnStr = fnToStr.call(value); var 
singleStripped = fnStr.replace(/\/\/.*\n/g, ''); var multiStripped = 
singleStripped.replace(/\/\*[.\s\S]*\*\//g, ''); var spaceStripped = 
multiStripped.replace(/\n/mg, ' ').replace(/ {2}/g, ' '); return 
constructorRegex.test(spaceStripped); } catch (e) { return false; /* not a 
function */ } }, tryFunctionObject = function tryFunctionObject(value) { try { 
if (isES6ClassFn(value)) { return false; } fnToStr.call(value); return true; } 
catch (e) { return false; } }, fnClass = '[object Function]', genClass = 
'[object GeneratorFunction]', isCallable = function isCallable(value) { if 
(!value) { return false; } if (typeof value !== 'function' && typeof value !== 
'object') { return false; } if (hasToStringTag) { return 
tryFunctionObject(value); } if (isES6ClassFn(value)) { return false; } var 
strClass = to_string.call(value); return strClass === fnClass || strClass === 
genClass; };
+
 var isRegex; /* inlined from https://npmjs.com/is-regex */ var regexExec = 
RegExp.prototype.exec, tryRegexExec = function tryRegexExec(value) { try { 
regexExec.call(value); return true; } catch (e) { return false; } }, regexClass 
= '[object RegExp]'; isRegex = function isRegex(value) { if (typeof value !== 
'object') { return false; } return hasToStringTag ? tryRegexExec(value) : 

[MediaWiki-commits] [Gerrit] Set $wgSpamBlacklistEventLogging to true on testwiki - change (operations/mediawiki-config)

2016-05-23 Thread Kaldari (Code Review)
Kaldari has uploaded a new change for review.

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

Change subject: Set $wgSpamBlacklistEventLogging to true on testwiki
..

Set $wgSpamBlacklistEventLogging to true on testwiki

Change-Id: I6e12a3bf7784b4af135edd0404346169930753c7
---
M wmf-config/CommonSettings.php
M wmf-config/InitialiseSettings.php
2 files changed, 5 insertions(+), 0 deletions(-)


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

diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index 594868e..ae74c90 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -763,6 +763,7 @@
],
];
$wgLogSpamBlacklistHits = true;
+   $wgSpamBlacklistEventLogging = $wmgSpamBlacklistEventLogging;
 }
 
 include( $IP . '/extensions/TitleBlacklist/TitleBlacklist.php' );
diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 5eaa881..51a6df0 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -11721,6 +11721,10 @@
'private' => false,
'fishbowl' => false, // not needed, private editing...
 ],
+'wmgSpamBlacklistEventLogging' => [
+   'default' => false,
+   'testwiki' => true,
+],
 
 'wmgUseGlobalTitleBlacklist' => [
'default' => true,

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

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

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


[MediaWiki-commits] [Gerrit] Upgrade version minor hardcodes to v2.2.x - change (apps...wikipedia)

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

Change subject: Upgrade version minor hardcodes to v2.2.x
..


Upgrade version minor hardcodes to v2.2.x

Change-Id: Iff90b6418553e2ef12c17f2024b1ea4445e72280
---
M app/build.gradle
M scripts/make-release.py
2 files changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/app/build.gradle b/app/build.gradle
index ec9bf53..a2f7ff6 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -35,7 +35,7 @@
 }
 
 def computeVersionName(label) {
-return "2.1.${android.defaultConfig.versionCode}-${label}-${date}"
+return "2.2.${android.defaultConfig.versionCode}-${label}-${date}"
 }
 
 final JavaVersion JAVA_VERSION = JavaVersion.VERSION_1_7
diff --git a/scripts/make-release.py b/scripts/make-release.py
index 7ae7116..65e215b 100755
--- a/scripts/make-release.py
+++ b/scripts/make-release.py
@@ -41,7 +41,7 @@
 
 PATH_PREFIX = os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))
 GRADLEW = './gradlew'
-VERSION_START = '2.1'
+VERSION_START = '2.2'
 
 
 def p(*path_fragments):

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

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

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


[MediaWiki-commits] [Gerrit] More reliable post sorting - change (mediawiki...Flow)

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

Change subject: More reliable post sorting
..


More reliable post sorting

Children need to be deleted before parents are, because one of the
listeners need to be able to fetch ids from the parents (which would
fail if those had been deleted already)

It seemed pretty safe to assume that a higher UUID would mean it was
created later, but it turns out to not always be the case.

ptwikibooks, for example, has a parent 'rp6m2xaut4127f99' with
child 'rp6m2wy4h0fzr14t', both of which were created on 20140214053720
(probably caused by randomizing part of the UUID to ensure uniques
for the same timestamp)

Instead of the earlier naive sorting method, this will iterate the
tree, thus guaranteeing we know which is child & which is parent.

Bug: T119509
Change-Id: I8bb08215f9d502122e2704836563861cbc79c6e6
(cherry picked from commit 26dd95bfc981e6f60fb3c5d6fa83f83f25e00e45)
---
M includes/Data/Index/BoardHistoryIndex.php
M maintenance/FlowRemoveOldTopics.php
2 files changed, 29 insertions(+), 8 deletions(-)

Approvals:
  Matthias Mullie: Looks good to me, but someone else must approve
  Dereckson: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/Data/Index/BoardHistoryIndex.php 
b/includes/Data/Index/BoardHistoryIndex.php
index 9c1fc54..e96bb89 100644
--- a/includes/Data/Index/BoardHistoryIndex.php
+++ b/includes/Data/Index/BoardHistoryIndex.php
@@ -11,6 +11,7 @@
 use Flow\Model\PostSummary;
 use Flow\Model\PostRevision;
 use Flow\Model\TopicListEntry;
+use Flow\Model\UUID;
 use Flow\Model\Workflow;
 
 /**
diff --git a/maintenance/FlowRemoveOldTopics.php 
b/maintenance/FlowRemoveOldTopics.php
index 12b20c0..4d92be0 100644
--- a/maintenance/FlowRemoveOldTopics.php
+++ b/maintenance/FlowRemoveOldTopics.php
@@ -240,17 +240,37 @@
}
}
 
-   protected function removePosts( Workflow $workflow ) {
-   // fetch all children (posts) from a topic
-   $subtree = $this->treeRepo->fetchSubtreeIdentityMap( 
$workflow->getId() );
+   /**
+* @param UUID $parentId
+* @param array $subtree
+* @return array
+*/
+   protected function sortSubtree( UUID $parentId, array $subtree ) {
+   $flat = array();
 
-   // reverse-sort all nodes: that way we'll never delete a parent 
before
-   // having already deleted a child (which will always be more 
recent)
-   krsort( $subtree );
+   // first recursively process all children, so they come first 
in $flat
+   foreach ( $subtree['children'] as $id => $data ) {
+   $flat = array_merge(
+   $flat,
+   $this->sortSubtree( UUID::create( $id ), $data )
+   );
+   }
+
+   // then add parent, which should come last in $flat
+   $flat[] = $parentId;
+
+   return $flat;
+   }
+
+   protected function removePosts( Workflow $workflow ) {
+   // fetch all children (posts) from a topic & reverse-sort all 
the posts:
+   // deepest-nested children should come first, parents last
+   $subtree = $this->treeRepo->fetchSubtree( $workflow->getId() );
+   $uuids = $this->sortSubtree( $workflow->getId(), $subtree );
 
$conds = array();
-   foreach ( $subtree as $id => $data ) {
-   $conds[] = array( 'rev_type_id' => UUID::create( $id ) 
);
+   foreach ( $uuids as $id ) {
+   $conds[] = array( 'rev_type_id' => $id );
}
 
$posts = $this->storage->findMulti( 'PostRevision', $conds );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8bb08215f9d502122e2704836563861cbc79c6e6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: wmf/1.28.0-wmf.2
Gerrit-Owner: Matthias Mullie 
Gerrit-Reviewer: Dereckson 
Gerrit-Reviewer: Matthias Mullie 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Include ApiEchoMarkReadTest in @Database group - change (mediawiki...Echo)

2016-05-23 Thread Ori.livneh (Code Review)
Ori.livneh has uploaded a new change for review.

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

Change subject: Include ApiEchoMarkReadTest in @Database group
..

Include ApiEchoMarkReadTest in @Database group

This gets the database reset upon completion, which is needed for some reason I
can't quite locate. I17ef1f51 passes with this change.

Change-Id: I12759772001048a3be69a80adbb2572b7d9f0397
---
M tests/phpunit/api/ApiEchoMarkReadTest.php
1 file changed, 1 insertion(+), 0 deletions(-)


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

diff --git a/tests/phpunit/api/ApiEchoMarkReadTest.php 
b/tests/phpunit/api/ApiEchoMarkReadTest.php
index 104e0b0..8857e6c 100644
--- a/tests/phpunit/api/ApiEchoMarkReadTest.php
+++ b/tests/phpunit/api/ApiEchoMarkReadTest.php
@@ -3,6 +3,7 @@
 /**
  * @group medium
  * @group API
+ * @group Database
  * @covers ApiQuery
  */
 class ApiEchoMarkReadTest extends ApiTestCase {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I12759772001048a3be69a80adbb2572b7d9f0397
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: Ori.livneh 

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


[MediaWiki-commits] [Gerrit] Enable Flow beta feature on frwikivoyage - change (operations/mediawiki-config)

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

Change subject: Enable Flow beta feature on frwikivoyage
..


Enable Flow beta feature on frwikivoyage

Bug: T135702
Change-Id: Ic5ef440b754348af14838c81b5bb1b9ff43ad1a8
---
M wmf-config/InitialiseSettings.php
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 0bc08eb..cb4e269 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -15635,6 +15635,7 @@
'bswiki' => true,
'cawiki' => true, // T120829
'frwikisource' => true, // T132914
+   'frwikivoyage' => true, // T135702
'nowiki' => true, // T132693
'urwiki' => true,
'zhwiki' => true,

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

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

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


[MediaWiki-commits] [Gerrit] Fix exception type thrown - change (apps...wikipedia)

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

Change subject: Fix exception type thrown
..


Fix exception type thrown

A follow up to 72f465c, change the exception type thrown to the one
expected.

Bug: T136037
Change-Id: If1b4146731a571d2461d37850c9f27e503094b67
---
M 
app/src/main/java/org/wikipedia/useroption/dataclient/DefaultUserOptionDataClient.java
1 file changed, 3 insertions(+), 6 deletions(-)

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



diff --git 
a/app/src/main/java/org/wikipedia/useroption/dataclient/DefaultUserOptionDataClient.java
 
b/app/src/main/java/org/wikipedia/useroption/dataclient/DefaultUserOptionDataClient.java
index ae94859..599743f 100644
--- 
a/app/src/main/java/org/wikipedia/useroption/dataclient/DefaultUserOptionDataClient.java
+++ 
b/app/src/main/java/org/wikipedia/useroption/dataclient/DefaultUserOptionDataClient.java
@@ -7,10 +7,9 @@
 
 import org.wikipedia.Site;
 import org.wikipedia.WikipediaApp;
-import org.wikipedia.dataclient.retrofit.RetrofitException;
-import org.wikipedia.dataclient.retrofit.RetrofitFactory;
 import org.wikipedia.dataclient.mwapi.MwPostResponse;
 import org.wikipedia.dataclient.mwapi.MwQueryResponse;
+import org.wikipedia.dataclient.retrofit.RetrofitFactory;
 import org.wikipedia.editing.FetchEditTokenTask;
 import org.wikipedia.useroption.UserOption;
 
@@ -111,15 +110,13 @@
 return options;
 }
 
-public void check(@NonNull Site site) {
+public void check(@NonNull Site site) throws IOException {
 if (!success(options)) {
 if (badToken()) {
 app().getEditTokenStorage().token(site, null);
 }
 
-throw RetrofitException.unexpectedError(
-new RuntimeException("Bad response for site " + 
site.host()
-+ " = " + result()));
+throw new IOException("Bad response for site " + site.host() + 
" = " + result());
 }
 }
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If1b4146731a571d2461d37850c9f27e503094b67
Gerrit-PatchSet: 2
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Niedzielski 
Gerrit-Reviewer: BearND 
Gerrit-Reviewer: Brion VIBBER 
Gerrit-Reviewer: Dbrant 
Gerrit-Reviewer: Mholloway 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Add http recording when running tests - change (mediawiki...mobileapps)

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

Change subject: Add http recording when running tests
..


Add http recording when running tests

VCR_MODE=cache npm test # run the tests using the recorded fixtures and record
# new http requests

npm test # Same as using VCR_MODE=cache (default)

VCR_MODE=record npm test # run the tests and record http requests without using
 # fixtures

VCR_MODE=playback npm test # run the tests using the recorded fixtures, going
   # to network for other requests

In my macbook air 11', running the tests takes around 40s, with the cached
fixtures it takes between 700ms and 1s. A lot better if you are doing TDD or
frequently running the tests.

npm test defaults to using the *cache* mode, so that tests run faster by
default.

Fixtures are stored in the `fixtures` folder. Remove them to get fresh ones.

In CI, http fixtures are not used because tests run for the first time.

Bug: T132902
Change-Id: I75b1e5c0b10bf72f6d64ac6f1c6b2a30a7563bcf
---
M .gitignore
M README.md
M package.json
M test/utils/server.js
4 files changed, 29 insertions(+), 2 deletions(-)

Approvals:
  BearND: Looks good to me, approved
  Mholloway: Looks good to me, but someone else must approve
  Niedzielski: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/.gitignore b/.gitignore
index 7402d4e..77ec4b4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -6,3 +6,4 @@
 npm-debug.log
 .DS_Store
 tmp/
+fixtures/
diff --git a/README.md b/README.md
index 9074b31..f955bd9 100644
--- a/README.md
+++ b/README.md
@@ -85,10 +85,33 @@
 is an important aspect of service development, there is also a bundled tool
 reporting the percentage of code covered. Start it with:
 
+After the first run http interactions should be cached in the `fixtures/`
+folder. If you re-run the tests, they should use the cached fixtures and run
+faster (and offline).
+
+For getting fresh fixtures just remove the `fixtures` folder and re-run the
+tests.
+
+Here are some other options regarding http caching:
+
+```
+npm test # Run tests with cached http interactions (same as VCR_MODE=cache),
+caches new requests. Should be a lot faster, also VCR_MODE=playback plays using
+cached http interactions but goes to network for uncached ones (without caching
+them).
+VCR_MODE=record npm test # Run tests recording http interactions
+```
+
+See [sepia](https://www.npmjs.com/package/sepia) for more documentation about
+the http recording.
+
 ```
 npm run-script coverage
 ```
 
+If you're going to run the tests many times, you can record the external HTTP
+interactions for running the tests faster:
+
 ### Troubleshooting
 
 In a lot of cases when there is an issue with node it helps to recreate the
diff --git a/package.json b/package.json
index 5bcb6f6..972522b 100644
--- a/package.json
+++ b/package.json
@@ -57,7 +57,8 @@
 "istanbul": "^0.4.3",
 "mocha": "^2.4.5",
 "mocha-jshint": "^2.3.1",
-"mocha-lcov-reporter": "^1.2.0"
+"mocha-lcov-reporter": "^1.2.0",
+"sepia": "^2.0.1"
   },
   "deploy": {
 "node": "4.3.0",
diff --git a/test/utils/server.js b/test/utils/server.js
index a67d1e8..262e822 100644
--- a/test/utils/server.js
+++ b/test/utils/server.js
@@ -1,6 +1,8 @@
 'use strict';
 
-
+// Default to recording+replaying http fixtures
+process.env.VCR_MODE = process.env.VCR_MODE || 'cache';
+var sepia = require('sepia');
 var BBPromise = require('bluebird');
 var ServiceRunner = require('service-runner');
 var logStream = require('./logStream');

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I75b1e5c0b10bf72f6d64ac6f1c6b2a30a7563bcf
Gerrit-PatchSet: 8
Gerrit-Project: mediawiki/services/mobileapps
Gerrit-Branch: master
Gerrit-Owner: Jhernandez 
Gerrit-Reviewer: BearND 
Gerrit-Reviewer: Dbrant 
Gerrit-Reviewer: Fjalapeno 
Gerrit-Reviewer: GWicke 
Gerrit-Reviewer: Jhernandez 
Gerrit-Reviewer: Mholloway 
Gerrit-Reviewer: Mhurd 
Gerrit-Reviewer: Mobrovac 
Gerrit-Reviewer: Niedzielski 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Use TitleIsAlwaysKnown hook instead of LinkBegin - change (mediawiki...Translate)

2016-05-23 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review.

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

Change subject: Use TitleIsAlwaysKnown hook instead of LinkBegin
..

Use TitleIsAlwaysKnown hook instead of LinkBegin

The LinkBegin hook is being deprecated in I057cc86ae6404, and the
preferred way to control whether a link should be known or unknown is to
utilize the TitleIsAlwaysKnown hook.

Change-Id: I52adad6de6b8d3f1a26ba60b8dcf2eb55df89b51
---
M Translate.php
M TranslateHooks.php
2 files changed, 14 insertions(+), 28 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Translate 
refs/changes/68/290368/1

diff --git a/Translate.php b/Translate.php
index bb23f0d..13feaad 100644
--- a/Translate.php
+++ b/Translate.php
@@ -143,7 +143,7 @@
 $wgHooks['SpecialSearchProfileForm'][] = 'TranslateHooks::searchProfileForm';
 $wgHooks['SpecialSearchSetupEngine'][] = 
'TranslateHooks::searchProfileSetupEngine';
 
-$wgHooks['LinkBegin'][] = 'TranslateHooks::linkfix';
+$wgHooks['TitleIsAlwaysKnown'][] = 'TranslateHooks::onTitleIsAlwaysKnown';
 
 // Stats table manipulation
 $wgHooks['Translate:MessageGroupStats:isIncluded'][] =
diff --git a/TranslateHooks.php b/TranslateHooks.php
index 01573ff..625f2fb 100644
--- a/TranslateHooks.php
+++ b/TranslateHooks.php
@@ -664,53 +664,39 @@
}
 
/**
-* Hook: LinkBegin
-* Make Special:MyLanguage links red if the target page doesn't exists.
+* Hook: TitleIsAlwaysKnown
+* Make Special:MyLanguage links red if the target page doesn't exist.
 * A bit hacky because the core code is not so flexible.
 *
-* @param $dummy
 * @param Title $target
-* @param string $html
-* @param array $customAttribs
-* @param array $query
-* @param array $options
-* @param string|null $ret
+* @param bool &$isKnown
+* @return bool
 */
-   public static function linkfix(
-   /*unused*/$dummy,
+   public static function onTitleIsAlwaysKnown(
Title $target,
-   /*string*/$html,
-   /*array*/$customAttribs,
-   array $query,
-   array &$options,
-   $ret
+   &$isKnown
) {
if ( !$target->inNamespace( NS_SPECIAL ) ) {
-   return;
+   return true;
}
 
list( $name, $subpage ) = SpecialPageFactory::resolveAlias( 
$target->getDBkey() );
if ( $name !== 'MyLanguage' ) {
-   return;
+   return true;
}
 
if ( (string)$subpage === '' ) {
-   return;
+   return true;
}
 
$realTarget = Title::newFromText( $subpage );
if ( !$realTarget || !$realTarget->exists() ) {
-   $options[] = 'broken';
-   $index = array_search( 'known', $options, true );
-   if ( $index !== false ) {
-   unset( $options[$index] );
-   }
+   $isKnown = false;
 
-   $index = array_search( 'noclasses', $options, true );
-   if ( $index !== false ) {
-   unset( $options[$index] );
-   }
+   return false;
}
+
+   return true;
}
 
/**

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I52adad6de6b8d3f1a26ba60b8dcf2eb55df89b51
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Translate
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] Small optimization to IcuCollation::fetchFirstLetterData() - change (mediawiki/core)

2016-05-23 Thread Ori.livneh (Code Review)
Hello Krinkle, Hashar,

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

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

to review the following change.

Change subject: Small optimization to IcuCollation::fetchFirstLetterData()
..

Small optimization to IcuCollation::fetchFirstLetterData()

Suppress / restore warnings once per alphabet rather than once per letter.
This works because nested calls to MediaWiki\suppressWarnings() /
MediaWiki\restoreWarnings() don't change PHP's error reporting.

Change-Id: Idd41a509858c0887df4f632b480b387bd74027b2
---
M includes/collation/IcuCollation.php
1 file changed, 10 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/67/290367/1

diff --git a/includes/collation/IcuCollation.php 
b/includes/collation/IcuCollation.php
index a374b13..7725aaf 100644
--- a/includes/collation/IcuCollation.php
+++ b/includes/collation/IcuCollation.php
@@ -290,9 +290,17 @@
 *
 * We also take this opportunity to remove primary collisions.
 */
-   $letterMap = [];
+   $keyMap = [];
+   MediaWiki\suppressWarnings();
foreach ( $letters as $letter ) {
-   $key = $this->getPrimarySortKey( $letter );
+   $keyMap[$letter] = $this->getPrimarySortKey( $letter );
+   }
+   MediaWiki\restoreWarnings();
+
+   $letterMap = [];
+
+   foreach ( $letters as $letter ) {
+   $key = $keyMap[$letter];
if ( isset( $letterMap[$key] ) ) {
// Primary collision
// Keep whichever one sorts first in the main 
collator

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idd41a509858c0887df4f632b480b387bd74027b2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Ori.livneh 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: Krinkle 

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


[MediaWiki-commits] [Gerrit] Stylelint: Add block whitespace and semicolon rules - change (mediawiki...MobileFrontend)

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

Change subject: Stylelint: Add block whitespace and semicolon rules
..


Stylelint: Add block whitespace and semicolon rules

Change-Id: If4fd415ec4a5ec5f00cb66a9bca8d19b4f2a5f72
---
M .stylelintrc
M minerva.less/minerva.mixins.less
M resources/mobile.drawers/drawer.less
M resources/mobile.overlays/Overlay.less
M resources/mobile.search/SearchOverlay.less
M resources/skins.minerva.base.styles/footer.less
M resources/skins.minerva.base.styles/images.less
7 files changed, 69 insertions(+), 20 deletions(-)

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



diff --git a/.stylelintrc b/.stylelintrc
index 7987d68..176090e 100644
--- a/.stylelintrc
+++ b/.stylelintrc
@@ -39,6 +39,23 @@
"declaration-block-no-duplicate-properties": [ true, { ignore: 
[ "consecutive-duplicates" ] } ],
"declaration-block-no-shorthand-property-overrides": true,
 
+   "declaration-block-semicolon-newline-after": [ "always" ],
+   "declaration-block-semicolon-newline-before": [ 
"never-multi-line" ],
+   "declaration-block-semicolon-space-after": [ 
"always-single-line" ],
+   "declaration-block-semicolon-space-before": [ "never" ],
+   "declaration-block-single-line-max-declarations": 1,
+   "declaration-block-trailing-semicolon": [ "always" ],
+
+   "block-closing-brace-newline-after": [ "always" ],
+   "block-closing-brace-newline-before": [ "always-multi-line" ],
+   "block-closing-brace-space-after": [ "always-single-line" ],
+   "block-closing-brace-space-before": [ "always-single-line" ],
+   "block-no-empty": true,
+   "block-no-single-line": true,
+   "block-opening-brace-newline-after": [ "always-multi-line" ],
+   "block-opening-brace-space-after": [ "always-single-line" ],
+   "block-opening-brace-space-before": [ "always" ],
+
"media-query-parentheses-space-inside": [ "always" ]
}
 }
diff --git a/minerva.less/minerva.mixins.less b/minerva.less/minerva.mixins.less
index e885e30..5bfc062 100644
--- a/minerva.less/minerva.mixins.less
+++ b/minerva.less/minerva.mixins.less
@@ -8,7 +8,7 @@
 .m-background-image( @url ) {
&:after,
&:before {
-   .background-image( @url )
+   .background-image( @url );
}
 }
 
diff --git a/resources/mobile.drawers/drawer.less 
b/resources/mobile.drawers/drawer.less
index 5ba8248..ece7c4f 100644
--- a/resources/mobile.drawers/drawer.less
+++ b/resources/mobile.drawers/drawer.less
@@ -51,7 +51,7 @@
 }
 
 // When overlays are opened drawers do not look good
-.overlay-enabled  {
+.overlay-enabled {
.drawer {
// !important to override rules set by animations
display: none !important;
diff --git a/resources/mobile.overlays/Overlay.less 
b/resources/mobile.overlays/Overlay.less
index e43a135..d1e4bfe 100644
--- a/resources/mobile.overlays/Overlay.less
+++ b/resources/mobile.overlays/Overlay.less
@@ -186,7 +186,7 @@
> * {
position: absolute;
top: 50%;
-   margin-top: -50%
+   margin-top: -50%;
}
}
 }
diff --git a/resources/mobile.search/SearchOverlay.less 
b/resources/mobile.search/SearchOverlay.less
index ed3d47f..02b5829 100644
--- a/resources/mobile.search/SearchOverlay.less
+++ b/resources/mobile.search/SearchOverlay.less
@@ -108,20 +108,36 @@
 }
 
 @-webkit-keyframes fadeIn {
-   from { opacity: 0; }
-   to { opacity: 1; }
+   from {
+   opacity: 0;
+   }
+   to {
+   opacity: 1;
+   }
 }
 @keyframes fadeIn {
-   from { opacity: 0; }
-   to { opacity: 1; }
+   from {
+   opacity: 0;
+   }
+   to {
+   opacity: 1;
+   }
 }
 @-webkit-keyframes fadeOut {
-   from { opacity: 1; }
-   to { opacity: 0; }
+   from {
+   opacity: 1;
+   }
+   to {
+   opacity: 0;
+   }
 }
 @keyframes fadeOut {
-   from { opacity: 1; }
-   to { opacity: 0; }
+   from {
+   opacity: 1;
+   }
+   to {
+   opacity: 0;
+   }
 }
 .animations {
.search-overlay {
diff --git a/resources/skins.minerva.base.styles/footer.less 
b/resources/skins.minerva.base.styles/footer.less
index bf211e6..6f2903d 100644
--- a/resources/skins.minerva.base.styles/footer.less
+++ b/resources/skins.minerva.base.styles/footer.less
@@ -31,7 +31,7 @@
}
 
ul {
-   display: inline
+   display: inline;
}
 

[MediaWiki-commits] [Gerrit] Stylelint: Add duplicate properties rules - change (mediawiki...MobileFrontend)

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

Change subject: Stylelint: Add duplicate properties rules
..


Stylelint: Add duplicate properties rules

Change-Id: I8781aef8d05eef11e2734c7baf7288af2500ce39
---
M .stylelintrc
M resources/mobile.notifications.overlay/NotificationsOverlay.less
M resources/mobile.special.mobileoptions.styles/mobileoptions.less
M resources/skins.minerva.base.reset/reset.less
M resources/skins.minerva.base.styles/images.less
M resources/skins.minerva.special.userlogin.styles/userlogin.less
6 files changed, 5 insertions(+), 5 deletions(-)

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



diff --git a/.stylelintrc b/.stylelintrc
index 9841c75..7987d68 100644
--- a/.stylelintrc
+++ b/.stylelintrc
@@ -36,6 +36,9 @@
"string-no-newline": true,
"string-quotes": [ "single" ],
 
+   "declaration-block-no-duplicate-properties": [ true, { ignore: 
[ "consecutive-duplicates" ] } ],
+   "declaration-block-no-shorthand-property-overrides": true,
+
"media-query-parentheses-space-inside": [ "always" ]
}
 }
diff --git a/resources/mobile.notifications.overlay/NotificationsOverlay.less 
b/resources/mobile.notifications.overlay/NotificationsOverlay.less
index 5b51f65..85034b7 100644
--- a/resources/mobile.notifications.overlay/NotificationsOverlay.less
+++ b/resources/mobile.notifications.overlay/NotificationsOverlay.less
@@ -21,7 +21,6 @@
.mw-echo-ui-actionMenuPopupWidget-menu {
padding: 0.5em;
font-size: 1.5em;
-   border: 0;
box-shadow: none;
border: 1px solid #666;
// Override the positioning of the menu
diff --git a/resources/mobile.special.mobileoptions.styles/mobileoptions.less 
b/resources/mobile.special.mobileoptions.styles/mobileoptions.less
index f8032a9..8c344fb 100644
--- a/resources/mobile.special.mobileoptions.styles/mobileoptions.less
+++ b/resources/mobile.special.mobileoptions.styles/mobileoptions.less
@@ -19,7 +19,6 @@
.option-description {
font-weight: normal;
font-size: 0.8em;
-   line-height: 1.8em;
padding-right: 8px;
line-height: 2em;
vertical-align: middle;
diff --git a/resources/skins.minerva.base.reset/reset.less 
b/resources/skins.minerva.base.reset/reset.less
index 84acd4a..f748f73 100644
--- a/resources/skins.minerva.base.reset/reset.less
+++ b/resources/skins.minerva.base.reset/reset.less
@@ -17,8 +17,8 @@
margin: 0;
padding: 0;
border: 0;
-   font-size: 100%;
font: inherit;
+   font-size: 100%;
vertical-align: baseline;
background: none;
 }
diff --git a/resources/skins.minerva.base.styles/images.less 
b/resources/skins.minerva.base.styles/images.less
index a8f9205..63f7b7c 100644
--- a/resources/skins.minerva.base.styles/images.less
+++ b/resources/skins.minerva.base.styles/images.less
@@ -4,7 +4,6 @@
 @animationDuration: 0.3s;
 
 .lazy-image-placeholder {
-   display: inline-block;
// The image placeholder for shouldn't show for no-js devices
.client-nojs & {
display: none;
@@ -20,6 +19,7 @@
// overflowing on smaller images
overflow: hidden;
 
+   display: inline-block;
// Center spinner vertically and horizontally
display: flex;
justify-content: center;
diff --git a/resources/skins.minerva.special.userlogin.styles/userlogin.less 
b/resources/skins.minerva.special.userlogin.styles/userlogin.less
index bfb22b3..080d988 100644
--- a/resources/skins.minerva.special.userlogin.styles/userlogin.less
+++ b/resources/skins.minerva.special.userlogin.styles/userlogin.less
@@ -85,7 +85,6 @@
 
// CAPTCHA style improvements
.captcha {
-   border-radius: 2px;
margin: .8em 0 0;
border: solid 1px @colorGray12;
border-radius: 5px;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8781aef8d05eef11e2734c7baf7288af2500ce39
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Esanders 
Gerrit-Reviewer: Jdlrobson 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Stylelint: Property and value whitespace rules - change (mediawiki...MobileFrontend)

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

Change subject: Stylelint: Property and value whitespace rules
..


Stylelint: Property and value whitespace rules

Change-Id: I313b68844aa3865ae23842725d31e03b0528bfd9
---
M .stylelintrc
M resources/mobile.fontchanger/FontChanger.less
M resources/mobile.languages.structured/LanguageOverlay.less
3 files changed, 13 insertions(+), 3 deletions(-)

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



diff --git a/.stylelintrc b/.stylelintrc
index 8c4e88a..9841c75 100644
--- a/.stylelintrc
+++ b/.stylelintrc
@@ -23,6 +23,16 @@
"function-url-quotes": [ "none" ],
"function-whitespace-after": [ "always" ],
 
+   "value-list-comma-newline-after": [ "never-multi-line" ],
+   "value-list-comma-newline-before": [ "never-multi-line" ],
+   "value-list-comma-space-after": [ "always-single-line" ],
+   "value-list-comma-space-before": [ "never" ],
+
+   "declaration-bang-space-after": [ "never" ],
+   "declaration-bang-space-before": [ "always" ],
+   "declaration-colon-space-after": [ "always" ],
+   "declaration-colon-space-before": [ "never" ],
+
"string-no-newline": true,
"string-quotes": [ "single" ],
 
diff --git a/resources/mobile.fontchanger/FontChanger.less 
b/resources/mobile.fontchanger/FontChanger.less
index 0248f38..0ccb791 100644
--- a/resources/mobile.fontchanger/FontChanger.less
+++ b/resources/mobile.fontchanger/FontChanger.less
@@ -7,7 +7,7 @@
 .fontchanger {
&.enableMessage {
font-size: 18px;
-   font-weight:bold;
+   font-weight: bold;
}
 
.option-description {
diff --git a/resources/mobile.languages.structured/LanguageOverlay.less 
b/resources/mobile.languages.structured/LanguageOverlay.less
index 6d48b2d..c423a42 100644
--- a/resources/mobile.languages.structured/LanguageOverlay.less
+++ b/resources/mobile.languages.structured/LanguageOverlay.less
@@ -62,7 +62,7 @@
border-radius: 2px;
color: #fff;
display: block;
-   margin-right:0.75em;
+   margin-right: 0.75em;
min-width: @langMinWidth;  // so that the 2 
letter language codes don't...
//... have different widths due to different 
letter width
padding: 0.5em;
@@ -70,7 +70,7 @@
text-transform: uppercase;
// prevent breaking the lang code at a hyphen
white-space: nowrap;
-   letter-spacing:1px;
+   letter-spacing: 1px;
}
 
.autonym,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I313b68844aa3865ae23842725d31e03b0528bfd9
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Esanders 
Gerrit-Reviewer: Esanders 
Gerrit-Reviewer: Jdlrobson 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Adding Support and Safety and update OIT Bug: T136046 - change (operations/mediawiki-config)

2016-05-23 Thread Foks (Code Review)
Foks has uploaded a new change for review.

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

Change subject: Adding Support and Safety and update OIT Bug: T136046
..

Adding Support and Safety
and update OIT
Bug: T136046

Change-Id: If725272a6be8a4c3c0b77262362e3e544cbf9bcc
---
M wmf-config/InitialiseSettings.php
1 file changed, 7 insertions(+), 0 deletions(-)


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 0bc08eb..69c8f88 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -8230,6 +8230,13 @@
'createaccount' => true,
'noratelimit' => true,
'tboverride' => true,
+   'globalgroupmembership' => true,
+   ],
+   'wmf-supportsafety' => [ // T136046
+   'userrights-interwiki' => true,
+   'centralauth-lock' => true,
+   'globalblock' => true,
+   'centralauth-rename' => true,
],
],
'mkwiki' => [

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

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

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


[MediaWiki-commits] [Gerrit] Bump yargs to latest - change (mediawiki...parsoid)

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

Change subject: Bump yargs to latest
..


Bump yargs to latest

 * So that in bin/parser.js, options get reset after exporting the
   defaultOptions.  Also, use `strict()` instead of our homegrown
   unknown arguments checker.

Change-Id: Ie389869f41bc58816fd51c30c9eae273ccc56ae2
---
M bin/parse.js
M bin/parserTests.js
M bin/roundtrip-test.js
M lib/utils/Util.js
M npm-shrinkwrap.json
M package.json
6 files changed, 369 insertions(+), 25 deletions(-)

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



diff --git a/bin/parse.js b/bin/parse.js
index f60b238..a326223 100755
--- a/bin/parse.js
+++ b/bin/parse.js
@@ -312,7 +312,7 @@
var opts = yargs.usage(
'Usage: echo wikitext | $0 [options]\n\n' + 
defaultModeStr,
standardOpts
-   ).check(Util.checkUnknownArgs.bind(null, standardOpts));
+   ).strict();
 
var argv = opts.argv;
 
diff --git a/bin/parserTests.js b/bin/parserTests.js
index 67f600a..8d9c2d3 100755
--- a/bin/parserTests.js
+++ b/bin/parserTests.js
@@ -281,14 +281,14 @@
'Usage: $0 [options] [tests-file]\n\n' + defaultArgs.join("\n"),
standardOpts
).check(function(argv, aliases) {
-   Util.checkUnknownArgs(standardOpts, argv, aliases);
if (argv.filter === true) {
throw "--filter needs an argument";
}
if (argv.regex === true) {
throw "--regex needs an argument";
}
-   });
+   return true;
+   }).strict();
 };
 
 /**
diff --git a/bin/roundtrip-test.js b/bin/roundtrip-test.js
index dc75a75..93240ca 100755
--- a/bin/roundtrip-test.js
+++ b/bin/roundtrip-test.js
@@ -691,7 +691,7 @@
 
var opts = yargs.usage(
'Usage: $0 [options]  \n\n', options
-   ).check(Util.checkUnknownArgs.bind(null, options));
+   ).strict();
 
var argv = opts.argv;
if (!argv._.length) {
diff --git a/lib/utils/Util.js b/lib/utils/Util.js
index 1995c2f..d186993 100644
--- a/lib/utils/Util.js
+++ b/lib/utils/Util.js
@@ -357,24 +357,6 @@
},
 
/**
-* Ensures that the supplied command line args were
-* options passed to yargs during setup.
-*/
-   checkUnknownArgs: function(standardOpts, argv, aliases) {
-   var knownArgs = Object.keys(aliases).reduce(function(prev, 
next) {
-   return prev.concat(aliases[next]);
-   }, ["_", 
"$0"].concat(Object.keys(standardOpts).map(function(arg) {
-   return arg.split(" ")[0];
-   })));
-
-   Object.keys(argv).forEach(function(arg) {
-   if (knownArgs.indexOf(arg) < 0) {
-   throw "Unknown argument: " + arg;
-   }
-   });
-   },
-
-   /**
 * @method
 *
 * Update only those properties that are undefined or null in the 
target.
diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json
index 8a375c5..f1c314d 100644
--- a/npm-shrinkwrap.json
+++ b/npm-shrinkwrap.json
@@ -4543,8 +4543,370 @@
   }
 },
 "yargs": {
-  "version": "1.3.1",
-  "resolved": "https://registry.npmjs.org/yargs/-/yargs-1.3.1.tgz;
+  "version": "4.7.1",
+  "resolved": "https://registry.npmjs.org/yargs/-/yargs-4.7.1.tgz;,
+  "dependencies": {
+"camelcase": {
+  "version": "3.0.0",
+  "resolved": 
"https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz;
+},
+"cliui": {
+  "version": "3.2.0",
+  "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz;,
+  "dependencies": {
+"strip-ansi": {
+  "version": "3.0.1",
+  "resolved": 
"https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz;,
+  "dependencies": {
+"ansi-regex": {
+  "version": "2.0.0",
+  "resolved": 
"https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.0.0.tgz;
+}
+  }
+},
+"wrap-ansi": {
+  "version": "2.0.0",
+  "resolved": 
"https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.0.0.tgz;
+}
+  }
+},
+"decamelize": {
+  "version": "1.2.0",
+  "resolved": 
"https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz;
+},
+"lodash.assign": {
+  "version": "4.0.9",
+  "resolved": 
"https://registry.npmjs.org/lodash.assign/-/lodash.assign-4.0.9.tgz;,
+  "dependencies": {
+"lodash.keys": {
+  "version": "4.0.7",
+  "resolved": 

[MediaWiki-commits] [Gerrit] [WIP] Pretty topic urls - change (mediawiki...Flow)

2016-05-23 Thread Matthias Mullie (Code Review)
Matthias Mullie has uploaded a new change for review.

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

Change subject: [WIP] Pretty topic urls
..

[WIP] Pretty topic urls

Todo:
* Make sure generated titles can not contain invalid chars
  (though I believe Title::makeTitleSafe cleans up)
* Add canonical metatag, or redirect to canonical url
* Find other places where urls are generated & prettify those

Bug: T59154
Change-Id: I8705dd0cfb7a4a8e6c6277beb883d978e507f6d6
---
M Hooks.php
M includes/Formatter/CategoryViewerQuery.php
M includes/Formatter/RevisionFormatter.php
M includes/Model/Workflow.php
M includes/UrlGenerator.php
M includes/WorkflowLoaderFactory.php
6 files changed, 41 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow 
refs/changes/65/290365/1

diff --git a/Hooks.php b/Hooks.php
index dcbc216..672f580 100644
--- a/Hooks.php
+++ b/Hooks.php
@@ -1175,17 +1175,21 @@
 *
 * @param User $user
 * @param WikiPage $page
-* $param Status $status
+* @param Status $status
+* @return bool
+* @throws \Flow\Exception\InvalidInputException
 */
public static function onWatchArticle( &$user, WikiPage &$page, 
&$status ) {
$title = $page->getTitle();
if ( $title->getNamespace() == NS_TOPIC ) {
+   $uuid = WorkflowLoaderFactory::uuidFromTitle( $title );
+
// @todo - use !$title->exists()?
/** @var Flow\Data\ManagerGroup $storage */
$storage = Container::get( 'storage' );
$found = $storage->find(
'PostRevision',
-   array( 'rev_type_id' => strtolower( 
$title->getDBkey() ) ),
+   array( 'rev_type_id' => $uuid ),
array( 'sort' => 'rev_id', 'order' => 'DESC', 
'limit' => 1 )
);
if ( !$found ) {
@@ -1458,7 +1462,7 @@
if ( $type !== 'page' || $title->getNamespace() !== NS_TOPIC ) {
return true;
}
-   $uuid = UUID::create( strtolower( $title->getDBkey() ) );
+   $uuid = WorkflowLoaderFactory::uuidFromTitle( $title );
if ( !$uuid ) {
return true;
}
diff --git a/includes/Formatter/CategoryViewerQuery.php 
b/includes/Formatter/CategoryViewerQuery.php
index 1bb2168..727b58c 100644
--- a/includes/Formatter/CategoryViewerQuery.php
+++ b/includes/Formatter/CategoryViewerQuery.php
@@ -5,6 +5,7 @@
 use Flow\Data\ManagerGroup;
 use Flow\Exception\FlowException;
 use Flow\Model\UUID;
+use Flow\WorkflowLoaderFactory;
 
 /**
  * This class is necessary so we can inject the name of
@@ -46,7 +47,7 @@
if ( $row->page_namespace != NS_TOPIC ) {
continue;
}
-   $uuid = UUID::create( strtolower( $row->page_title ) );
+   $uuid = WorkflowLoaderFactory::uuidFromTitlePair( 
NS_TOPIC, $row->page_title );
if ( $uuid ) {
$alpha = $uuid->getAlphadecimal();
$neededPosts[$alpha] = array( 'rev_type_id' => 
$uuid );
diff --git a/includes/Formatter/RevisionFormatter.php 
b/includes/Formatter/RevisionFormatter.php
index 4a68ef5..3e07f22 100644
--- a/includes/Formatter/RevisionFormatter.php
+++ b/includes/Formatter/RevisionFormatter.php
@@ -680,7 +680,20 @@
public function buildLinks( FormatterRow $row ) {
$workflow = $row->workflow;
$revision = $row->revision;
+   $root = $row->rootPost;
$title = $workflow->getArticleTitle();
+
+   // slight hack: we'll want pretty urls, who include the topic 
title
+   if ( $title->getNamespace() === NS_TOPIC && $root instanceof 
PostRevision ) {
+   $board = $workflow->getOwnerTitle();
+   $title = \Title::makeTitleSafe(
+   $title->getNamespace(),
+   $title->getDBkey() . '/' . 
$board->getPrefixedDBkey() . '/' . $root->getContentInWikitext(),
+   $title->getFragment(),
+   $title->getInterwiki()
+   );
+   }
+
$action = $revision->getChangeType();
$workflowId = $workflow->getId();
$revId = $revision->getRevisionId();
diff --git a/includes/Model/Workflow.php b/includes/Model/Workflow.php
index 347a588..fb21d10 100644
--- a/includes/Model/Workflow.php
+++ b/includes/Model/Workflow.php
@@ -6,6 +6,7 @@
 use Flow\Exception\DataModelException;
 use 

[MediaWiki-commits] [Gerrit] Lowered incrTableUpdate() batch size to $wgUpdateRowsPerQuery - change (mediawiki/core)

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

Change subject: Lowered incrTableUpdate() batch size to $wgUpdateRowsPerQuery
..


Lowered incrTableUpdate() batch size to $wgUpdateRowsPerQuery

Change-Id: I05787b6e9ace26e7a20c228fbc3502983dfed777
---
M includes/deferred/LinksUpdate.php
1 file changed, 5 insertions(+), 5 deletions(-)

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



diff --git a/includes/deferred/LinksUpdate.php 
b/includes/deferred/LinksUpdate.php
index 1f7f3b0..bd4238c 100644
--- a/includes/deferred/LinksUpdate.php
+++ b/includes/deferred/LinksUpdate.php
@@ -84,8 +84,6 @@
 */
private $user;
 
-   const BATCH_SIZE = 500; // try to keep typical updates in a single 
transaction
-
/**
 * Constructor
 *
@@ -338,6 +336,8 @@
 * @param array $insertions Rows to insert
 */
private function incrTableUpdate( $table, $prefix, $deletions, 
$insertions ) {
+   $bSize = RequestContext::getMain()->getConfig()->get( 
'UpdateRowsPerQuery' );
+
if ( $table === 'page_props' ) {
$fromField = 'pp_page';
} else {
@@ -354,7 +354,7 @@
foreach ( $deletions as $ns => $dbKeys ) {
foreach ( $dbKeys as $dbKey => $unused ) {
$curDeletionBatch[$ns][$dbKey] = 1;
-   if ( ++$curBatchSize >= 
self::BATCH_SIZE ) {
+   if ( ++$curBatchSize >= $bSize ) {
$deletionBatches[] = 
$curDeletionBatch;
$curDeletionBatch = [];
$curBatchSize = 0;
@@ -380,7 +380,7 @@
$toField = $prefix . '_to';
}
 
-   $deletionBatches = array_chunk( array_keys( $deletions 
), self::BATCH_SIZE );
+   $deletionBatches = array_chunk( array_keys( $deletions 
), $bSize );
foreach ( $deletionBatches as $deletionBatch ) {
$deleteWheres[] = [ $fromField => $this->mId, 
$toField => $deletionBatch ];
}
@@ -392,7 +392,7 @@
wfGetLBFactory()->waitForReplication( [ 'wiki' => 
$this->mDb->getWikiID() ] );
}
 
-   $insertBatches = array_chunk( $insertions, self::BATCH_SIZE );
+   $insertBatches = array_chunk( $insertions, $bSize );
foreach ( $insertBatches as $insertBatch ) {
$this->mDb->insert( $table, $insertBatch, __METHOD__, 
'IGNORE' );
$this->mDb->commit( __METHOD__, 'flush' );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I05787b6e9ace26e7a20c228fbc3502983dfed777
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz 
Gerrit-Reviewer: Addshore 
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] Hygiene: replace error logging with crash on beta - change (apps...wikipedia)

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

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

Change subject: Hygiene: replace error logging with crash on beta
..

Hygiene: replace error logging with crash on beta

Resolve todo that exceptions logged should cause crashes on non-prod
builds.

Change-Id: I1f0dc8724cec90f88e839ed07c437d4bb642fb6d
---
M app/src/main/java/org/wikipedia/json/TabUnmarshaller.java
1 file changed, 1 insertion(+), 2 deletions(-)


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

diff --git a/app/src/main/java/org/wikipedia/json/TabUnmarshaller.java 
b/app/src/main/java/org/wikipedia/json/TabUnmarshaller.java
index f73aa61..744c278 100644
--- a/app/src/main/java/org/wikipedia/json/TabUnmarshaller.java
+++ b/app/src/main/java/org/wikipedia/json/TabUnmarshaller.java
@@ -21,8 +21,7 @@
 object = GsonUnmarshaller.unmarshal(TYPE_TOKEN, json);
 } catch (Exception e) {
 // Catch all. Any Exception can be thrown when unmarshalling.
-// TODO: replace with logRemoteErrorIfProd after 2.1.135 beta 
releases.
-L.logRemoteError(new RemoteLogException(e).put("json", json));
+L.logRemoteErrorIfProd(new RemoteLogException(e).put("json", 
json));
 }
 if (object == null) {
 object = Collections.emptyList();

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

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

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


[MediaWiki-commits] [Gerrit] Upgrade version minor hardcodes to v2.2.x - change (apps...wikipedia)

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

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

Change subject: Upgrade version minor hardcodes to v2.2.x
..

Upgrade version minor hardcodes to v2.2.x

Change-Id: Iff90b6418553e2ef12c17f2024b1ea4445e72280
---
M app/build.gradle
M scripts/make-release.py
2 files changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/app/build.gradle b/app/build.gradle
index ec9bf53..a2f7ff6 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -35,7 +35,7 @@
 }
 
 def computeVersionName(label) {
-return "2.1.${android.defaultConfig.versionCode}-${label}-${date}"
+return "2.2.${android.defaultConfig.versionCode}-${label}-${date}"
 }
 
 final JavaVersion JAVA_VERSION = JavaVersion.VERSION_1_7
diff --git a/scripts/make-release.py b/scripts/make-release.py
index 7ae7116..65e215b 100755
--- a/scripts/make-release.py
+++ b/scripts/make-release.py
@@ -41,7 +41,7 @@
 
 PATH_PREFIX = os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))
 GRADLEW = './gradlew'
-VERSION_START = '2.1'
+VERSION_START = '2.2'
 
 
 def p(*path_fragments):

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

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

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


[MediaWiki-commits] [Gerrit] Don't fallback from uk to ru - change (mediawiki/core)

2016-05-23 Thread Awight (Code Review)
Awight has uploaded a new change for review.

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

Change subject: Don't fallback from uk to ru
..

Don't fallback from uk to ru

We've gotten many complaints about this, from Ukranian donors.  This should
be reviewed by community liasons.

Bug: T135254
Change-Id: I7c72702524bb75bb939a30b6c8e451ae8f89e906
---
M languages/messages/MessagesUk.php
1 file changed, 0 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/62/290362/1

diff --git a/languages/messages/MessagesUk.php 
b/languages/messages/MessagesUk.php
index 369e0be..797c9f1 100644
--- a/languages/messages/MessagesUk.php
+++ b/languages/messages/MessagesUk.php
@@ -58,7 +58,6 @@
'.' => ','
 ];
 
-$fallback = 'ru';
 $fallback8bitEncoding = 'windows-1251';
 $linkPrefixExtension = true;
 

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

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

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


[MediaWiki-commits] [Gerrit] ext.centralNotice.display: API for registering tests - change (mediawiki...CentralNotice)

2016-05-23 Thread AndyRussG (Code Review)
AndyRussG has uploaded a new change for review.

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

Change subject: ext.centralNotice.display: API for registering tests
..

ext.centralNotice.display: API for registering tests

Bug: T134286
Change-Id: I2957e8e42a4b6618959d4b11443232250c4ef594
---
M resources/subscribing/ext.centralNotice.display.js
M resources/subscribing/ext.centralNotice.display.state.js
2 files changed, 29 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CentralNotice 
refs/changes/61/290361/1

diff --git a/resources/subscribing/ext.centralNotice.display.js 
b/resources/subscribing/ext.centralNotice.display.js
index 4db323c..3cb6026 100644
--- a/resources/subscribing/ext.centralNotice.display.js
+++ b/resources/subscribing/ext.centralNotice.display.js
@@ -547,6 +547,15 @@
},
 
/**
+* Register that the current page view is included in a test.
+ * @param {string} identifier A string to identify the test. 
Should not contain
+*   commas.
+*/
+   registerTest( identifier ) {
+   cn.internal.state.registerTest( identifier );
+   },
+
+   /**
 * Get the value of a property used in campaign/banner 
selection and
 * display, and for recording the results of that process.
 */
diff --git a/resources/subscribing/ext.centralNotice.display.state.js 
b/resources/subscribing/ext.centralNotice.display.state.js
index 4173440..638b9b9 100644
--- a/resources/subscribing/ext.centralNotice.display.state.js
+++ b/resources/subscribing/ext.centralNotice.display.state.js
@@ -221,6 +221,7 @@
if ( cleanForURLSerialization ) {
delete dataCopy.getVars;
delete dataCopy.mixins;
+   delete dataCopy.tests;
}
 
return dataCopy;
@@ -352,6 +353,25 @@
state.data.recordImpressionSampleRate = rate;
},
 
+   /**
+* Register that the current page view is included in a test.
+ * @param {string} identifier A string to identify the test. 
Should not contain
+*   commas.
+*/
+   registerTest( identifier ) {
+   var tests = state.data.tests = state.data.tests || [];
+
+   if ( $.inArray( identifier, tests ) !== -1 ) {
+   tests.push( identifier );
+
+   if ( tests.length === 1 ) {
+   state.data.testIdentifiers = identifier;
+   } else {
+   state.data.testIdentifiers.concat( ',' 
+ identifier );
+   }
+   }
+   },
+
lookupReasonCode: function( reasonName ) {
if ( reasonName in REASONS ) {
return REASONS[reasonName];

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2957e8e42a4b6618959d4b11443232250c4ef594
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CentralNotice
Gerrit-Branch: master
Gerrit-Owner: AndyRussG 

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


[MediaWiki-commits] [Gerrit] Refactor BoardMover so there is one transaction for all unde... - change (mediawiki...Flow)

2016-05-23 Thread Mattflaschen (Code Review)
Mattflaschen has uploaded a new change for review.

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

Change subject: Refactor BoardMover so there is one transaction for all 
undeleted revs
..

Refactor BoardMover so there is one transaction for all undeleted revs

Bug: T135883
Change-Id: I3f225ca5e4e299763ae6a8650e5ce46c3735545c
---
M Flow.php
M Hooks.php
M includes/BoardMover.php
3 files changed, 52 insertions(+), 15 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow 
refs/changes/60/290360/1

diff --git a/Flow.php b/Flow.php
index ea36504..e84ce9b 100644
--- a/Flow.php
+++ b/Flow.php
@@ -151,7 +151,9 @@
 $wgHooks['ArticleConfirmDelete'][] = 'FlowHooks::onArticleConfirmDelete';
 $wgHooks['ArticleDelete'][] = 'FlowHooks::onArticleDelete';
 $wgHooks['ArticleDeleteComplete'][] = 'FlowHooks::onArticleDeleteComplete';
+$wgHooks['UndeleteForm::undelete'][] = 'FlowHooks::onUndeleteFormUndelete';
 $wgHooks['ArticleRevisionUndeleted'][] = 
'FlowHooks::onArticleRevisionUndeleted';
+$wgHooks['ArticleUndelete'][] = 'FlowHooks::onArticleUndelete';
 $wgHooks['SearchableNamespaces'][] = 'FlowHooks::onSearchableNamespaces';
 $wgHooks['ImportHandleToplevelXMLTag'][] = 
'FlowHooks::onImportHandleToplevelXMLTag';
 
diff --git a/Hooks.php b/Hooks.php
index dcbc216..e5be8a6 100644
--- a/Hooks.php
+++ b/Hooks.php
@@ -1584,6 +1584,17 @@
}
 
/**
+* Starts the transaction for the undelete operation
+*
+* @param {PageArchive} $archive Undeletion helper class
+* @param {Title} $title Title of page about to be (partially) undeleted
+*/
+   public static function onUndeleteFormUndelete( $archive, $title ) {
+   $boardMover = Container::get( 'board_mover' );
+   $boardMover->begin();
+   }
+
+   /**
 * @param Title $title Title corresponding to the article restored
 * @param Revision $revision Revision just undeleted
 * @param string $oldPageId Old page ID stored with that revision when 
it was in the archive table
@@ -1594,13 +1605,26 @@
// complete hack to make sure that when the page is 
saved to new
// location and rendered it doesn't throw an error 
about the wrong title
Container::get( 'factory.loader.workflow' 
)->pageMoveInProgress();
-   // open a database transaction and prepare everything 
for the move & commit
+
+   // Reassociate the Flow board associated with this 
undeleted revision.
$boardMover = Container::get( 'board_mover' );
-   $boardMover->prepareMove( intval( $oldPageId ), $title 
);
-   $boardMover->commit();
+   $boardMover->move( intval( $oldPageId ), $title );
}
 
return true;
+   }
+
+   /**
+* @param Title $title Title corresponding to the article restored
+* @param bool $created Whether or not the restoration caused the page 
to be created (i.e. it didn't exist before).
+* @param string $comment The comment associated with the undeletion.
+* @param int $oldPageId ID of page previously deleted (from archive 
table)
+* @throws InvalidUndeleteException
+* @return bool
+*/
+   public static function onArticleUndelete( Title $title, $create, 
$comment, $oldPageId ) {
+   $boardMover = Container::get( 'board_mover' );
+   $boardMover->commit();
}
 
/**
@@ -1626,7 +1650,9 @@
Container::get( 'factory.loader.workflow' 
)->pageMoveInProgress();
// open a database transaction and prepare everything 
for the move, but
// don't commit yet. That is done below in 
self::onTitleMoveCompleting
-   Container::get( 'board_mover' )->prepareMove( 
$oldTitle->getArticleID(), $bogusTitle );
+   $boardMover =Container::get( 'board_mover' );
+   $boardMover->begin();
+   $boardMover->move( $oldTitle->getArticleID(), 
$bogusTitle );
}
 
return true;
diff --git a/includes/BoardMover.php b/includes/BoardMover.php
index a8a50c8..4b2d591 100644
--- a/includes/BoardMover.php
+++ b/includes/BoardMover.php
@@ -40,19 +40,11 @@
}
 
/**
-* Collects the workflow and header (if it exists) and puts them into 
the database. Does
-* not commit yet. It is intended for prepareMove to be called from the 
TitleMove hook,
-* and committed from TitleMoveComplete hook. This ensures that if some 
error prevents the
-* core transaction from committing this transaction is also not 
committed.
-*
-* @param int $oldPageId Page ID before move/change
-* @param Title 

[MediaWiki-commits] [Gerrit] Fix float on wikis with long settings messages - change (mediawiki...Popups)

2016-05-23 Thread Jdlrobson (Code Review)
Jdlrobson has uploaded a new change for review.

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

Change subject: Fix float on wikis with long settings messages
..

Fix float on wikis with long settings messages

The floated text is never cleared.

Bug: T135629
Change-Id: I3bfaf137e4d02f0dc809c809edac9b28cb4bdc3a
---
M resources/ext.popups.settings.less
1 file changed, 3 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Popups 
refs/changes/59/290359/1

diff --git a/resources/ext.popups.settings.less 
b/resources/ext.popups.settings.less
index 8ae8f42..6c04756 100644
--- a/resources/ext.popups.settings.less
+++ b/resources/ext.popups.settings.less
@@ -53,6 +53,8 @@
font-size: 17px;
margin: 34px 0;
margin-left: 10px;
+   // Undo float on the label
+   clear: left;
}
 
form {
@@ -75,6 +77,7 @@
margin-right: 110px;
line-height: 18px;
width: 185px;
+   margin-bottom: 18px;
 
> span {
color: #000;

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

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

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


[MediaWiki-commits] [Gerrit] Making logging code less fragile and using better function name - change (mediawiki...SpamBlacklist)

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

Change subject: Making logging code less fragile and using better function name
..


Making logging code less fragile and using better function name

These changes are in responce to code comments at
https://gerrit.wikimedia.org/r/#/c/263145/4/SpamBlacklist_body.php

Change-Id: I328d7cd473b692c6cdeb170bcc579c9e3154617c
---
M SpamBlacklist_body.php
1 file changed, 7 insertions(+), 3 deletions(-)

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



diff --git a/SpamBlacklist_body.php b/SpamBlacklist_body.php
index 647a1fc..7cbca64 100644
--- a/SpamBlacklist_body.php
+++ b/SpamBlacklist_body.php
@@ -7,6 +7,7 @@
 class SpamBlacklist extends BaseBlacklist {
 
/**
+* Changes to external links, for logging purposes
 * @var array[]
 */
private $urlChanges = array();
@@ -122,7 +123,7 @@
return $retVal;
}
 
-   private function doEventLogging() {
+   private function shouldDoEventLogging() {
global $wgSpamBlacklistEventLogging;
return $wgSpamBlacklistEventLogging && class_exists( 
'EventLogging' );
}
@@ -135,7 +136,7 @@
 * @param string[] $addedLinks
 */
private function logUrlChanges( $oldLinks, $newLinks, $addedLinks ) {
-   if ( !$this->doEventLogging() ) {
+   if ( !$this->shouldDoEventLogging() ) {
return;
}
 
@@ -157,7 +158,7 @@
 * @param Revision $rev
 */
public function doLogging( User $user, Title $title, Revision $rev ) {
-   if ( !$this->doEventLogging() ) {
+   if ( !$this->shouldDoEventLogging() ) {
return;
}
 
@@ -179,6 +180,9 @@
);
}
} );
+
+   // Empty the changes queue in case this function gets called 
more than once
+   $this->urlChanges = array();
}
 
/**

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I328d7cd473b692c6cdeb170bcc579c9e3154617c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SpamBlacklist
Gerrit-Branch: master
Gerrit-Owner: Kaldari 
Gerrit-Reviewer: Alex Monk 
Gerrit-Reviewer: Jackmcbarn 
Gerrit-Reviewer: Kaldari 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Sync parserTests with core - change (mediawiki...parsoid)

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

Change subject: Sync parserTests with core
..


Sync parserTests with core

Change-Id: Icd28eed4091483edae49cc3e4fcc3846a1e3473c
---
M tests/parserTests.txt
M tools/fetch-parserTests.txt.js
2 files changed, 15 insertions(+), 4 deletions(-)

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



diff --git a/tests/parserTests.txt b/tests/parserTests.txt
index 7051b4f..90e6265 100644
--- a/tests/parserTests.txt
+++ b/tests/parserTests.txt
@@ -2266,6 +2266,17 @@
 !! end
 
 !! test
+ inside of #tag:pre
+!! wikitext
+{{#tag:pre|Foo bar}}
+!! html/php
+Foo bar
+
+!! html/parsoid
+Foo →bar
+!! end
+
+!! test
  and  preference (first one wins)
 !! wikitext
 
@@ -13150,7 +13161,7 @@
 !! config
 wgExternalLinkTarget='foobar'
 !! html/php
-http://example.com/; target="foobar" rel="nofollow">http://example.com/images/3/3a/Foobar.jpg; width="1941" 
height="220" />
+http://example.com/; target="foobar" rel="nofollow noreferrer 
noopener">http://example.com/images/3/3a/Foobar.jpg; 
width="1941" height="220" />
 
 !! end
 
@@ -13184,7 +13195,7 @@
 !! config
 wgExternalLinkTarget='foobar'
 !! html/php
-http://example.com/; title="Title" target="foobar" 
rel="nofollow">http://example.com/images/3/3a/Foobar.jpg; 
width="1941" height="220" />
+http://example.com/; title="Title" target="foobar" rel="nofollow 
noreferrer noopener">http://example.com/images/3/3a/Foobar.jpg; width="1941" height="220" />
 
 !! end
 
diff --git a/tools/fetch-parserTests.txt.js b/tools/fetch-parserTests.txt.js
index 049f366..bd924d2 100755
--- a/tools/fetch-parserTests.txt.js
+++ b/tools/fetch-parserTests.txt.js
@@ -12,9 +12,9 @@
 // and update these hashes automatically.
 //
 // You can use 'sha1sum -b tests/parser/parserTests.txt' to compute this value:
-var expectedSHA1 = "8e19c2371b24bd1ab2f468c43e9e371770d4c324";
+var expectedSHA1 = "94c66b4f3c5998b6d5280ec645b695a89bb6baef";
 // git log --pretty=oneline -1 tests/parser/parserTests.txt
-var latestCommit = "7654867bbc071091e38aa783ee5ecec6ee431bb2";
+var latestCommit = "13ece3550e4935865a410009e060b4f4b036f949";
 
 var fs = require('fs');
 var path = require('path');

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Icd28eed4091483edae49cc3e4fcc3846a1e3473c
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] Show Special:Nearby error messages correctly - change (mediawiki...MobileFrontend)

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

Change subject: Show Special:Nearby error messages correctly
..


Show Special:Nearby error messages correctly

Also hide the spinner when the error message is shown.

Bug: T125820
Change-Id: Ib3d89e2d266cd3e244044d12658161a2f1db78a0
---
M resources/mobile.nearby/Nearby.js
1 file changed, 4 insertions(+), 2 deletions(-)

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



diff --git a/resources/mobile.nearby/Nearby.js 
b/resources/mobile.nearby/Nearby.js
index a81901e..21dc755 100644
--- a/resources/mobile.nearby/Nearby.js
+++ b/resources/mobile.nearby/Nearby.js
@@ -257,7 +257,8 @@
_super.call( self, options );
} );
} ).fail( function ( errorType ) {
-   options.errorType = errorType;
+   options.errorOptions = 
self._errorOptions( errorType );
+   self._isLoading = false;
_super.call( self, options );
} );
} else if ( ( options.latitude && options.longitude ) 
|| options.pageTitle ) {
@@ -268,7 +269,8 @@
this._find( options ).done( function ( options 
) {
_super.call( self, options );
} ).fail( function ( errorType ) {
-   options.errorType = errorType;
+   options.errorOptions = 
self._errorOptions( errorType );
+   self._isLoading = false;
_super.call( self, options );
} );
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib3d89e2d266cd3e244044d12658161a2f1db78a0
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Bmansurov 
Gerrit-Reviewer: Bmansurov 
Gerrit-Reviewer: Jdlrobson 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] build: Align to stylelint-config-wikimedia for string quotes - change (oojs/ui)

2016-05-23 Thread Jforrester (Code Review)
Jforrester has uploaded a new change for review.

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

Change subject: build: Align to stylelint-config-wikimedia for string quotes
..

build: Align to stylelint-config-wikimedia for string quotes

Change-Id: Ia5f30ee286cb2936cb564b540fa9000b7826dcde
---
M .stylelintrc
M demos/styles/demo.css
M src/styles/common.less
M src/styles/layouts/FieldLayout.less
M src/styles/widgets/NumberInputWidget.less
M src/styles/widgets/SelectFileWidget.less
M src/styles/widgets/TextInputWidget.less
M src/themes/apex/widgets.less
M src/themes/mediawiki/widgets.less
9 files changed, 20 insertions(+), 22 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/57/290357/1

diff --git a/.stylelintrc b/.stylelintrc
index 5595bb6..6f232ea 100644
--- a/.stylelintrc
+++ b/.stylelintrc
@@ -6,9 +6,7 @@
"block-no-empty": null,
"block-no-single-line": null,
"declaration-no-important": null,
-   "font-family-name-quotes": [ "double-where-recommended" ],
"no-descending-specificity": null,
-   "string-no-newline": true,
-   "string-quotes": null
+   "string-no-newline": true
}
 }
diff --git a/demos/styles/demo.css b/demos/styles/demo.css
index 1e3fda9..8a872dc 100644
--- a/demos/styles/demo.css
+++ b/demos/styles/demo.css
@@ -136,7 +136,7 @@
line-height: 1.6em;
color: #999;
text-align: center;
-   content: "→";
+   content: '→';
 }
 
 .oo-ui-demo-console-toggle:hover::after,
@@ -146,7 +146,7 @@
 }
 
 .oo-ui-demo-console-expanded .oo-ui-demo-console-toggle::after {
-   content: "↑";
+   content: '↑';
 }
 
 .oo-ui-demo-console-collapsed .oo-ui-demo-console-log,
@@ -180,7 +180,7 @@
width: 20px;
text-align: center;
bottom: 0;
-   content: "→";
+   content: '→';
 }
 
 .oo-ui-demo-console-log-line-error {
diff --git a/src/styles/common.less b/src/styles/common.less
index 0f45c39..ddc26eb 100644
--- a/src/styles/common.less
+++ b/src/styles/common.less
@@ -39,14 +39,14 @@
 }
 
 .oo-ui-animation( @value1, @value2: X, ... ) {
-   @value: ~`"@{arguments}".replace( /[\[\]]|\,\sX/g, '' )`; // 
stylelint-disable-line function-comma-space-after, function-whitespace-after
+   @value: ~`"@{arguments}".replace( /[\[\]]|\,\sX/g, '' )`; // 
stylelint-disable-line function-comma-space-after, function-whitespace-after, 
string-quotes
-webkit-animation: @value;
-moz-animation: @value;
animation: @value;
 }
 
 .oo-ui-transition( @value1, @value2: X, ... ) {
-   @value: ~`"@{arguments}".replace( /[\[\]]|\,\sX/g, '' )`; // 
stylelint-disable-line function-comma-space-after, function-whitespace-after
+   @value: ~`"@{arguments}".replace( /[\[\]]|\,\sX/g, '' )`; // 
stylelint-disable-line function-comma-space-after, function-whitespace-after, 
string-quotes
-webkit-transition: @value;
-moz-transition: @value;
transition: @value;
@@ -81,7 +81,7 @@
// accept them.
@start-ie: argb( rgba( red( @start ), green( @start ), blue( @start ), 
alpha( @start ) ) );
@stop-ie: argb( rgba( red( @stop ), green( @stop ), blue( @stop ), 
alpha( @stop ) ) );
-   -ms-filter: "progid:DXImageTransform.Microsoft.gradient( 
startColorstr='@{start-ie}', endColorstr='@{stop-ie}' )";
+   -ms-filter: "progid:DXImageTransform.Microsoft.gradient( 
startColorstr='@{start-ie}', endColorstr='@{stop-ie}' )"; // 
stylelint-disable-line string-quotes
 }
 
 .oo-ui-unselectable() {
diff --git a/src/styles/layouts/FieldLayout.less 
b/src/styles/layouts/FieldLayout.less
index 799f9f4..dd15d3d 100644
--- a/src/styles/layouts/FieldLayout.less
+++ b/src/styles/layouts/FieldLayout.less
@@ -5,7 +5,7 @@
 
&:before,
&:after {
-   content: " ";
+   content: ' ';
display: table;
}
 
diff --git a/src/styles/widgets/NumberInputWidget.less 
b/src/styles/widgets/NumberInputWidget.less
index 2a9ea3d..23107fb 100644
--- a/src/styles/widgets/NumberInputWidget.less
+++ b/src/styles/widgets/NumberInputWidget.less
@@ -19,13 +19,13 @@
&-field > .oo-ui-textInputWidget {
width: 100%;
 
-   [type="number"]::-webkit-outer-spin-button,
-   [type="number"]::-webkit-inner-spin-button {
+   [type='number']::-webkit-outer-spin-button,
+   [type='number']::-webkit-inner-spin-button {
-webkit-appearance: none;
margin: 0;
}
 
-   [type="number"] {
+   [type='number'] {
-moz-appearance: textfield;
}
}
diff --git a/src/styles/widgets/SelectFileWidget.less 
b/src/styles/widgets/SelectFileWidget.less
index d8d14c1..150b54e 100644
--- 

[MediaWiki-commits] [Gerrit] build: Align to stylelint-config-wikimedia for !important - change (oojs/ui)

2016-05-23 Thread Jforrester (Code Review)
Jforrester has uploaded a new change for review.

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

Change subject: build: Align to stylelint-config-wikimedia for !important
..

build: Align to stylelint-config-wikimedia for !important

Change-Id: I861dda02dfcff3304cd29b9ef03304b9d96ef9cb
---
M .stylelintrc
M demos/styles/demo.css
M src/styles/Element.less
M src/styles/layouts/MenuLayout.less
M src/styles/widgets/ComboBoxInputWidget.less
M src/themes/mediawiki/tools.less
6 files changed, 9 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/58/290358/1

diff --git a/.stylelintrc b/.stylelintrc
index 6f232ea..f35ae1a 100644
--- a/.stylelintrc
+++ b/.stylelintrc
@@ -5,7 +5,6 @@
"block-closing-brace-space-after": null,
"block-no-empty": null,
"block-no-single-line": null,
-   "declaration-no-important": null,
"no-descending-specificity": null,
"string-no-newline": true
}
diff --git a/demos/styles/demo.css b/demos/styles/demo.css
index 8a872dc..cce929e 100644
--- a/demos/styles/demo.css
+++ b/demos/styles/demo.css
@@ -82,7 +82,7 @@
 
 .oo-ui-demo-icons .oo-ui-fieldLayout .oo-ui-buttonElement-button 
.oo-ui-labelElement-label {
text-transform: capitalize;
-   display: inline !important;
+   display: inline !important; /* stylelint-disable-line 
declaration-no-important */
 }
 
 .oo-ui-demo-icons .oo-ui-fieldLayout .oo-ui-buttonElement-button:hover {
diff --git a/src/styles/Element.less b/src/styles/Element.less
index f8f3389..837d7b0 100644
--- a/src/styles/Element.less
+++ b/src/styles/Element.less
@@ -2,7 +2,7 @@
 
 .oo-ui-element {
&-hidden {
-   display: none !important;
+   display: none !important; /* stylelint-disable-line 
declaration-no-important */
}
 
.theme-oo-ui-element();
diff --git a/src/styles/layouts/MenuLayout.less 
b/src/styles/layouts/MenuLayout.less
index 8374eb4..fd8fa6e 100644
--- a/src/styles/layouts/MenuLayout.less
+++ b/src/styles/layouts/MenuLayout.less
@@ -27,6 +27,9 @@
bottom: 18em;
}
 
+   /* FIXME: Find a way to use fewer !important over-rides */
+   /* stylelint-disable declaration-no-important */
+
&.oo-ui-menuLayout-hideMenu {
> .oo-ui-menuLayout-menu {
width: 0 !important;
@@ -104,5 +107,7 @@
}
}
 
+   /* stylelint-enable declaration-no-important */
+
.theme-oo-ui-menuLayout();
 }
diff --git a/src/styles/widgets/ComboBoxInputWidget.less 
b/src/styles/widgets/ComboBoxInputWidget.less
index 8360913..9657bb0 100644
--- a/src/styles/widgets/ComboBoxInputWidget.less
+++ b/src/styles/widgets/ComboBoxInputWidget.less
@@ -19,7 +19,7 @@
// Hide the Chrome dropdown arrow for PHP widget, but keep its 
functionality.
// It lines up with our own indicator almost perfectly this way.
input::-webkit-calendar-picker-indicator {
-   opacity: 0 !important;
+   opacity: 0 !important; /* stylelint-disable-line 
declaration-no-important */
position: absolute;
right: 0;
top: 0;
diff --git a/src/themes/mediawiki/tools.less b/src/themes/mediawiki/tools.less
index c635029..5c5b601 100644
--- a/src/themes/mediawiki/tools.less
+++ b/src/themes/mediawiki/tools.less
@@ -89,7 +89,7 @@
 
.oo-ui-toolGroup {
.oo-ui-widget-enabled {
-   border-right: 0 !important;
+   border-right: 0 !important; /* stylelint-disable-line 
declaration-no-important */
}
}
 }

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

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

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


[MediaWiki-commits] [Gerrit] Add a small artificial delay after saving an edit. - change (apps...wikipedia)

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

Change subject: Add a small artificial delay after saving an edit.
..


Add a small artificial delay after saving an edit.

After an edit is saved in the app, the change on the server side is not
immediate, and takes a few moments to start appearing in the response when
fetching the page content again.

Until this is fixed on the server side, we can work around it by forcing a
short delay right after a successful edit, before we attempt to read back
the updated page content.

Bug: T132803
Change-Id: I56758654aa5dd6890eb397de139140600c45bdbe
---
M app/src/main/java/org/wikipedia/editing/EditTask.java
1 file changed, 7 insertions(+), 0 deletions(-)

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



diff --git a/app/src/main/java/org/wikipedia/editing/EditTask.java 
b/app/src/main/java/org/wikipedia/editing/EditTask.java
index 0217cc5..85763ef 100644
--- a/app/src/main/java/org/wikipedia/editing/EditTask.java
+++ b/app/src/main/java/org/wikipedia/editing/EditTask.java
@@ -10,6 +10,8 @@
 import org.wikipedia.page.PageTitle;
 import org.wikipedia.WikipediaApp;
 
+import java.util.concurrent.TimeUnit;
+
 public class EditTask extends ApiTask {
 private final PageTitle title;
 private final String sectionWikitext;
@@ -57,6 +59,11 @@
 JSONObject edit = resultJSON.optJSONObject("edit");
 String status = edit.optString("result");
 if (status.equals("Success")) {
+
+// TODO: remove when the server reflects the updated page content 
immediately
+// after submitting the edit, instead of a short while after.
+Thread.sleep(TimeUnit.SECONDS.toMillis(2));
+
 return new SuccessEditResult(edit.optInt("newrevid"));
 } else if (status.equals("Failure")) {
 if (edit.has("captcha")) {

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

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

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


[MediaWiki-commits] [Gerrit] Make ChangeOpStatement work with StatementListProvider w/o i... - change (mediawiki...Wikibase)

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

Change subject: Make ChangeOpStatement work with StatementListProvider w/o 
index param
..


Make ChangeOpStatement work with StatementListProvider w/o index param

As discussed in T133853 the index feature is not used in our code base.
This patch makes the ChangeOp work with MediaInfo as long as there is no
custom index provided.

This does not block T134882. We can still track usage of the index
feature. At the moment it can not be used on non-MediaInfo entity types
anyway.

Bug: T134884
Change-Id: I37563c102dc5f94f73e6583ad6b446f8b46fa368
---
M repo/includes/ChangeOp/ChangeOpStatement.php
M repo/tests/phpunit/includes/ChangeOp/ChangeOpStatementTest.php
A repo/tests/phpunit/includes/ChangeOp/StatementListProviderDummy.php
3 files changed, 181 insertions(+), 65 deletions(-)

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



diff --git a/repo/includes/ChangeOp/ChangeOpStatement.php 
b/repo/includes/ChangeOp/ChangeOpStatement.php
index 80e7ad0..1282a19 100644
--- a/repo/includes/ChangeOp/ChangeOpStatement.php
+++ b/repo/includes/ChangeOp/ChangeOpStatement.php
@@ -7,12 +7,14 @@
 use ValueValidators\Result;
 use Wikibase\DataModel\ByPropertyIdArray;
 use Wikibase\DataModel\Entity\EntityDocument;
+use Wikibase\DataModel\Entity\EntityId;
 use Wikibase\DataModel\Services\Statement\GuidGenerator;
 use Wikibase\DataModel\Services\Statement\StatementGuidParser;
 use Wikibase\DataModel\Services\Statement\StatementGuidValidator;
 use Wikibase\DataModel\Statement\Statement;
 use Wikibase\DataModel\Statement\StatementList;
 use Wikibase\DataModel\Statement\StatementListHolder;
+use Wikibase\DataModel\Statement\StatementListProvider;
 use Wikibase\Repo\Validators\SnakValidator;
 use Wikibase\Summary;
 
@@ -65,7 +67,7 @@
 * @param StatementGuidValidator $guidValidator
 * @param StatementGuidParser $guidParser
 * @param SnakValidator $snakValidator
-* @param int|null $index Where the claim should be placed among the 
other claims.
+* @param int|null $index Where the statement should be placed among 
the other statements.
 *
 * @throws InvalidArgumentException
 */
@@ -77,8 +79,8 @@
SnakValidator $snakValidator,
$index = null
) {
-   if ( !is_int( $index ) && $index !== null ) {
-   throw new InvalidArgumentException( '$index must be an 
integer or null' );
+   if ( $index !== null && ( !is_int( $index ) || $index < 0 ) ) {
+   throw new InvalidArgumentException( '$index must be an 
non-negative integer or null' );
}
 
$this->statement = $statement;
@@ -99,54 +101,79 @@
 * @throws ChangeOpException
 */
public function apply( EntityDocument $entity, Summary $summary = null 
) {
-   if ( !( $entity instanceof StatementListHolder ) ) {
-   throw new InvalidArgumentException( '$entity must be a 
StatementListHolder' );
+   $entityId = $entity->getId();
+
+   if ( !( $entity instanceof StatementListProvider ) ) {
+   throw new InvalidArgumentException( '$entity must be a 
StatementListProvider' );
}
 
if ( $this->statement->getGuid() === null ) {
-   $this->statement->setGuid( 
$this->guidGenerator->newGuid( $entity->getId() ) );
+   $this->statement->setGuid( 
$this->guidGenerator->newGuid( $entityId ) );
}
 
+   $this->validateStatementGuid( $entityId );
+
+   if ( $this->index !== null ) {
+   if ( !( $entity instanceof StatementListHolder ) ) {
+   throw new ChangeOpException( 'Setting an index 
is not supported on this entity type' );
+   }
+
+   $this->applyStatementToEntity( $entity, $summary );
+   } else {
+   $oldIndex = $this->removeStatement( 
$entity->getStatements(), $summary );
+   // TODO: Use StatementList::addStatement( …, $index ). 
This will require DataModel 6.1.
+   if ( $oldIndex !== null ) {
+   $this->addStatementAtIndex( 
$entity->getStatements(), $oldIndex );
+   } else {
+   $entity->getStatements()->addStatement( 
$this->statement );
+   }
+   }
+   }
+
+   /**
+* @param EntityId $entityId
+*
+* @throws ChangeOpException
+*/
+   private function validateStatementGuid( EntityId $entityId ) {
$guid = $this->guidParser->parse( $this->statement->getGuid() );
 
-   if 

[MediaWiki-commits] [Gerrit] build: Upgrade stylelint-config-wikimedia to 0.2.0 and make ... - change (oojs/ui)

2016-05-23 Thread Jforrester (Code Review)
Jforrester has uploaded a new change for review.

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

Change subject: build: Upgrade stylelint-config-wikimedia to 0.2.0 and make pass
..

build: Upgrade stylelint-config-wikimedia to 0.2.0 and make pass

Change-Id: I4e5c988c1e0b2f1b80c60126dd044ef9f292915b
---
M Gruntfile.js
M package.json
M src/themes/apex/layouts.less
M src/themes/apex/tools.less
M src/themes/apex/widgets.less
M src/themes/mediawiki/tools.less
M src/themes/mediawiki/widgets.less
7 files changed, 11 insertions(+), 10 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/56/290356/1

diff --git a/Gruntfile.js b/Gruntfile.js
index aec68cb..a0b5108 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -367,7 +367,8 @@
dev: [
'{demos,src}/**/*.css',
'{demos,src}/**/*.less',
-   '!demos/dist/**'
+   '!demos/dist/**',
+   '!demos/styles/demo.rtl.css'
]
},
 
diff --git a/package.json b/package.json
index 7d06a8f..3a946d6 100644
--- a/package.json
+++ b/package.json
@@ -56,6 +56,6 @@
 "karma-qunit": "0.1.9",
 "q": "1.4.1",
 "qunitjs": "1.22.0",
-"stylelint-config-wikimedia": "^0.1.0"
+"stylelint-config-wikimedia": "0.2.0"
   }
 }
diff --git a/src/themes/apex/layouts.less b/src/themes/apex/layouts.less
index 0ff3fa9..5a3af47 100644
--- a/src/themes/apex/layouts.less
+++ b/src/themes/apex/layouts.less
@@ -104,7 +104,7 @@
 .theme-oo-ui-fieldsetLayout () {
margin: 0;
padding: 0;
-   border: none;
+   border: 0;
 
+ .oo-ui-fieldsetLayout,
+ .oo-ui-formLayout {
diff --git a/src/themes/apex/tools.less b/src/themes/apex/tools.less
index 8a48ec9..0c662e9 100644
--- a/src/themes/apex/tools.less
+++ b/src/themes/apex/tools.less
@@ -6,7 +6,7 @@
.oo-ui-vertical-gradient(#fff, #F1F7FB);
 
.oo-ui-toolbar-bar {
-   border: none;
+   border: 0;
background: none;
}
}
diff --git a/src/themes/apex/widgets.less b/src/themes/apex/widgets.less
index 8a41159..8f30907 100644
--- a/src/themes/apex/widgets.less
+++ b/src/themes/apex/widgets.less
@@ -514,7 +514,7 @@
}
 
> .oo-ui-capsuleMultiselectWidget-content > input {
-   border: none;
+   border: 0;
line-height: 1.675em;
margin: 0;
margin-left: 0.2em;
@@ -611,7 +611,7 @@
 
 .theme-oo-ui-optionWidget () {
padding: 0.25em 0.5em;
-   border: none;
+   border: 0;
 
&-highlighted {
background-color: #e1f3ff;
@@ -772,7 +772,7 @@
padding: 0.5em 1em;
margin: 0.5em 0 0 0.75em;
border: 1px solid transparent;
-   border-bottom: none;
+   border-bottom: 0;
border-top-left-radius: 0.5em;
border-top-right-radius: 0.5em;
 
diff --git a/src/themes/mediawiki/tools.less b/src/themes/mediawiki/tools.less
index dca3667..c635029 100644
--- a/src/themes/mediawiki/tools.less
+++ b/src/themes/mediawiki/tools.less
@@ -57,7 +57,7 @@
}
 
> .oo-ui-toolGroup {
-   border-right: none;
+   border-right: 0;
}
 
> .oo-ui-popupToolGroup > .oo-ui-popupToolGroup-handle {
@@ -89,7 +89,7 @@
 
.oo-ui-toolGroup {
.oo-ui-widget-enabled {
-   border-right: none !important;
+   border-right: 0 !important;
}
}
 }
diff --git a/src/themes/mediawiki/widgets.less 
b/src/themes/mediawiki/widgets.less
index 1a80c2b..bf80133 100644
--- a/src/themes/mediawiki/widgets.less
+++ b/src/themes/mediawiki/widgets.less
@@ -1007,7 +1007,7 @@
padding: 0.35em 1em;
margin: 0.5em 0 0 0.75em;
border: 1px solid transparent;
-   border-bottom: none;
+   border-bottom: 0;
border-top-left-radius: @border-radius-default;
border-top-right-radius: @border-radius-default;
color: @color-default;

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

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

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


[MediaWiki-commits] [Gerrit] Sync parserTests with core - change (mediawiki...parsoid)

2016-05-23 Thread Arlolra (Code Review)
Arlolra has uploaded a new change for review.

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

Change subject: Sync parserTests with core
..

Sync parserTests with core

Change-Id: Icd28eed4091483edae49cc3e4fcc3846a1e3473c
---
M tests/parserTests.txt
M tools/fetch-parserTests.txt.js
2 files changed, 15 insertions(+), 4 deletions(-)


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

diff --git a/tests/parserTests.txt b/tests/parserTests.txt
index 7051b4f..90e6265 100644
--- a/tests/parserTests.txt
+++ b/tests/parserTests.txt
@@ -2266,6 +2266,17 @@
 !! end
 
 !! test
+ inside of #tag:pre
+!! wikitext
+{{#tag:pre|Foo bar}}
+!! html/php
+Foo bar
+
+!! html/parsoid
+Foo →bar
+!! end
+
+!! test
  and  preference (first one wins)
 !! wikitext
 
@@ -13150,7 +13161,7 @@
 !! config
 wgExternalLinkTarget='foobar'
 !! html/php
-http://example.com/; target="foobar" rel="nofollow">http://example.com/images/3/3a/Foobar.jpg; width="1941" 
height="220" />
+http://example.com/; target="foobar" rel="nofollow noreferrer 
noopener">http://example.com/images/3/3a/Foobar.jpg; 
width="1941" height="220" />
 
 !! end
 
@@ -13184,7 +13195,7 @@
 !! config
 wgExternalLinkTarget='foobar'
 !! html/php
-http://example.com/; title="Title" target="foobar" 
rel="nofollow">http://example.com/images/3/3a/Foobar.jpg; 
width="1941" height="220" />
+http://example.com/; title="Title" target="foobar" rel="nofollow 
noreferrer noopener">http://example.com/images/3/3a/Foobar.jpg; width="1941" height="220" />
 
 !! end
 
diff --git a/tools/fetch-parserTests.txt.js b/tools/fetch-parserTests.txt.js
index 049f366..bd924d2 100755
--- a/tools/fetch-parserTests.txt.js
+++ b/tools/fetch-parserTests.txt.js
@@ -12,9 +12,9 @@
 // and update these hashes automatically.
 //
 // You can use 'sha1sum -b tests/parser/parserTests.txt' to compute this value:
-var expectedSHA1 = "8e19c2371b24bd1ab2f468c43e9e371770d4c324";
+var expectedSHA1 = "94c66b4f3c5998b6d5280ec645b695a89bb6baef";
 // git log --pretty=oneline -1 tests/parser/parserTests.txt
-var latestCommit = "7654867bbc071091e38aa783ee5ecec6ee431bb2";
+var latestCommit = "13ece3550e4935865a410009e060b4f4b036f949";
 
 var fs = require('fs');
 var path = require('path');

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Icd28eed4091483edae49cc3e4fcc3846a1e3473c
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] Add 'rcc' as a payment method in formsettings - change (mediawiki...DonationInterface)

2016-05-23 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review.

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

Change subject: Add 'rcc' as a payment method in formsettings
..

Add 'rcc' as a payment method in formsettings

Change-Id: I2f0de1f0ba0172dafd0b8f629f65ea8d7190e06e
---
M DonationInterfaceFormSettings.php
1 file changed, 25 insertions(+), 7 deletions(-)


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

diff --git a/DonationInterfaceFormSettings.php 
b/DonationInterfaceFormSettings.php
index f55e6f9..2e27d7d 100644
--- a/DonationInterfaceFormSettings.php
+++ b/DonationInterfaceFormSettings.php
@@ -355,7 +355,10 @@
 $forms_whitelist['rcc-vmad'] = array(
'file' => $form_dirs['gc'] . '/rcc/rcc-vmad.html',
'gateway' => 'globalcollect',
-   'payment_methods' => array('cc' => array( 'visa', 'mc', 'amex', 
'discover' )),
+   'payment_methods' => array(
+   'cc' => array( 'visa', 'mc', 'amex', 'discover' ),
+   'rcc' => array( 'visa', 'mc', 'amex', 'discover' ),
+   ),
'recurring',
'countries' => array(
'+' => $forms_whitelist['cc-vmad']['countries']['+']
@@ -365,7 +368,10 @@
 $forms_whitelist['rcc-vmaj'] = array(
'file' => $form_dirs['gc'] . '/rcc/rcc-vmaj.html',
'gateway' => 'globalcollect',
-   'payment_methods' => array('cc' => array( 'visa', 'mc', 'amex', 'jcb' 
)),
+   'payment_methods' => array(
+   'cc' => array( 'visa', 'mc', 'amex', 'jcb' ),
+   'rcc' => array( 'visa', 'mc', 'amex', 'jcb' ),
+   ),
'recurring',
'countries' => array(
'+' => $forms_whitelist['cc-vmaj']['countries']['+']
@@ -375,7 +381,10 @@
 $forms_whitelist['rcc-vmd'] = array(
'file' => $form_dirs['gc'] . '/rcc/rcc-vmd.html',
'gateway' => 'globalcollect',
-   'payment_methods' => array('cc' => array( 'visa', 'mc', 'discover' )),
+   'payment_methods' => array(
+   'cc' => array( 'visa', 'mc', 'discover' ),
+   'rcc' => array( 'visa', 'mc', 'discover' ),
+   ),
'recurring',
'countries' => array(
'+' => $forms_whitelist['cc-vmd']['countries']['+']
@@ -385,7 +394,10 @@
 $forms_whitelist['rcc-vmj'] = array(
'file' => $form_dirs['gc'] . '/rcc/rcc-vmj.html',
'gateway' => 'globalcollect',
-   'payment_methods' => array('cc' => array( 'visa', 'mc', 'jcb' )),
+   'payment_methods' => array(
+   'cc' => array( 'visa', 'mc', 'jcb' ),
+   'rcc' => array( 'visa', 'mc', 'jcb' ),
+   ),
'recurring',
'countries' => array(
'+' => $forms_whitelist['cc-vmj']['countries']['+']
@@ -395,7 +407,10 @@
 $forms_whitelist['rcc-vma'] = array(
'file' => $form_dirs['gc'] . '/rcc/rcc-vma.html',
'gateway' => 'globalcollect',
-   'payment_methods' => array('cc' => array( 'visa', 'mc', 'amex' )),
+   'payment_methods' => array(
+   'cc' => array( 'visa', 'mc', 'amex' ),
+   'rcc' => array( 'visa', 'mc', 'amex' ),
+   ),
'recurring',
'countries' => array(
'+' => $forms_whitelist['cc-vma']['countries']['+']
@@ -405,7 +420,10 @@
 $forms_whitelist['rcc-vm'] = array(
'file' => $form_dirs['gc'] . '/rcc/rcc-vm.html',
'gateway' => 'globalcollect',
-   'payment_methods' => array('cc' => array( 'visa', 'mc' )),
+   'payment_methods' => array(
+   'cc' => array( 'visa', 'mc' ),
+   'rcc' => array( 'visa', 'mc' ),
+   ),
'recurring',
'countries' => array(
'+' => $forms_whitelist['cc-vm']['countries']['+']
@@ -415,7 +433,7 @@
 $forms_whitelist['rcc'] = array(
'file' => $form_dirs['gc'] . '/rcc/rcc.html',
'gateway' => 'globalcollect',
-   'payment_methods' => array('cc' => 'ALL'),
+   'payment_methods' => array( 'cc' => 'ALL', 'rcc' => 'ALL' ),
'recurring'
 );
 

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

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

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


[MediaWiki-commits] [Gerrit] Fix exception type thrown - change (apps...wikipedia)

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

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

Change subject: Fix exception type thrown
..

Fix exception type thrown

A follow up to 72f465c, change the exception type thrown to the one
expected.

Bug: T136037
Change-Id: If1b4146731a571d2461d37850c9f27e503094b67
---
M 
app/src/main/java/org/wikipedia/useroption/dataclient/DefaultUserOptionDataClient.java
1 file changed, 4 insertions(+), 6 deletions(-)


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

diff --git 
a/app/src/main/java/org/wikipedia/useroption/dataclient/DefaultUserOptionDataClient.java
 
b/app/src/main/java/org/wikipedia/useroption/dataclient/DefaultUserOptionDataClient.java
index ae94859..3279ede 100644
--- 
a/app/src/main/java/org/wikipedia/useroption/dataclient/DefaultUserOptionDataClient.java
+++ 
b/app/src/main/java/org/wikipedia/useroption/dataclient/DefaultUserOptionDataClient.java
@@ -7,12 +7,12 @@
 
 import org.wikipedia.Site;
 import org.wikipedia.WikipediaApp;
-import org.wikipedia.dataclient.retrofit.RetrofitException;
-import org.wikipedia.dataclient.retrofit.RetrofitFactory;
 import org.wikipedia.dataclient.mwapi.MwPostResponse;
 import org.wikipedia.dataclient.mwapi.MwQueryResponse;
+import org.wikipedia.dataclient.retrofit.RetrofitFactory;
 import org.wikipedia.editing.FetchEditTokenTask;
 import org.wikipedia.useroption.UserOption;
+import org.wikipedia.util.log.L;
 
 import java.io.IOException;
 import java.util.concurrent.Executor;
@@ -111,15 +111,13 @@
 return options;
 }
 
-public void check(@NonNull Site site) {
+public void check(@NonNull Site site) throws IOException {
 if (!success(options)) {
 if (badToken()) {
 app().getEditTokenStorage().token(site, null);
 }
 
-throw RetrofitException.unexpectedError(
-new RuntimeException("Bad response for site " + 
site.host()
-+ " = " + result()));
+throw new IOException("Bad response for site " + site.host() + 
" = " + result());
 }
 }
 }

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

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

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


[MediaWiki-commits] [Gerrit] Rename Holmium to labservices1002 - change (operations/puppet)

2016-05-23 Thread Andrew Bogott (Code Review)
Andrew Bogott has submitted this change and it was merged.

Change subject: Rename Holmium to labservices1002
..


Rename Holmium to labservices1002

Depends-On: I88d74bcc13d0cf6fb765f1332bd59addf596302e
bug: T106303
Change-Id: I8e43e6a9c050d630c4e7e90913e7117ae95ee523
---
M files/misc/rolematcher.py
M hieradata/common.yaml
R hieradata/hosts/labservices1002.yaml
M manifests/site.pp
M modules/install_server/files/autoinstall/netboot.cfg
M modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200
M modules/openstack/templates/kilo/designate/designate.conf.erb
M modules/openstack/templates/liberty/designate/designate.conf.erb
M templates/mariadb/production-grants-m5.sql.erb
9 files changed, 17 insertions(+), 24 deletions(-)

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



diff --git a/files/misc/rolematcher.py b/files/misc/rolematcher.py
index 7f00f6d..f77bd7d 100644
--- a/files/misc/rolematcher.py
+++ b/files/misc/rolematcher.py
@@ -172,14 +172,8 @@
 start, end = determine_start_end_range(section, hostname)
 prefix = determine_hostname_prefix(hostname)
 suffix = determine_hostname_suffix(hostname)
-if prefix in ['holmium']:
-if '%s-%s' % (dc, role) not in elements:
-matcher = RoleMatcher('%s_%s_elements' % (dc, 
role), 'holmium')
-elements['%s-%s' % (dc, role)] = True
-matchers.append(matcher)
-else:
-matcher = RoleMatcher('%s_%s_%s' % (dc, role, prefix), 
'%s([0-9]+)\.%s' % (prefix, suffix), start, end)
-matchers.append(matcher)
+matcher = RoleMatcher('%s_%s_%s' % (dc, role, prefix), 
'%s([0-9]+)\.%s' % (prefix, suffix), start, end)
+matchers.append(matcher)
 return matchers
 
 
diff --git a/hieradata/common.yaml b/hieradata/common.yaml
index acc89d0..3161c26 100644
--- a/hieradata/common.yaml
+++ b/hieradata/common.yaml
@@ -291,7 +291,7 @@
 labs_tld: "wmflabs"
 labs_private_ips_reverse_dns: "68.10.in-addr.arpa"
 labs_designate_hostname:  "labservices1001.wikimedia.org"
-labs_designate_hostname_secondary: _designate_hostname_secondary 
"holmium.wikimedia.org"
+labs_designate_hostname_secondary: _designate_hostname_secondary 
"labservices1002.wikimedia.org"
 labs_nova_api_host:  "labnet1002.eqiad.wmnet"
 labs_nova_network_host:  "labnet1002"
 labs_nova_network_ip:  "10.64.20.25"
diff --git a/hieradata/hosts/holmium.yaml b/hieradata/hosts/labservices1002.yaml
similarity index 100%
rename from hieradata/hosts/holmium.yaml
rename to hieradata/hosts/labservices1002.yaml
diff --git a/manifests/site.pp b/manifests/site.pp
index 21bd823..58b7aa6 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -1190,8 +1190,7 @@
 include standard
 }
 
-# Holmium will soon be renamed labservices1002
-node 'holmium.wikimedia.org' {
+node 'labservices1002.wikimedia.org' {
 role labs::dns, labs::openstack::designate::server, labs::dnsrecursor
 include standard
 include base::firewall
diff --git a/modules/install_server/files/autoinstall/netboot.cfg 
b/modules/install_server/files/autoinstall/netboot.cfg
index 9189813..e484c5e 100755
--- a/modules/install_server/files/autoinstall/netboot.cfg
+++ b/modules/install_server/files/autoinstall/netboot.cfg
@@ -57,7 +57,7 @@
 
antimony|arsenic|heze|magnesium|neodymium|oxygen|palladium|promethium|strontium|terbium)
 echo partman/lvm.cfg ;; \
 
bast1001|bast2001|copper|neon|ruthenium|subra|suhail|titanium|ytterbium|ocg1003)
 echo partman/raid1-lvm.cfg ;; \
 bast4001) echo partman/lvm.cfg ;; \
-californium|dbproxy10[0-1][0-9]|holmium|install2001|iridium) echo 
partman/raid1.cfg ;; \
+californium|dbproxy10[0-1][0-9]|install2001|iridium) echo 
partman/raid1.cfg ;; \
 boron|chromium|hydrogen) echo partman/lvm.cfg ;; \
 helium|potassium|tmh1002) echo partman/raid1-1partition.cfg ;; \
 
lawrencium|netmon1001|notebook1001|notebook1002|stat1002|tungsten|labsdb1008) 
echo partman/db.cfg ;; \
@@ -115,7 +115,7 @@
 mw1259|mw1260) echo partman/raid1-1partition.cfg ;; \
 mw[0-9]*|osmium|rcs[0-9]*) echo partman/mw.cfg ;; \
 mx1001|mx2001) echo partman/flat.cfg virtual.cfg ;; \
-labservices1001|radium|scandium|silver|uranium) echo partman/raid1.cfg 
;; \
+labservices1001|labservices1002|radium|scandium|silver|uranium) echo 
partman/raid1.cfg ;; \
 rdb100[7-8]) echo partman/raid1.cfg ;; \
 osm-cp*) echo partman/mw.cfg ;; \
 pc100[1-3]) echo partman/mw.cfg ;; \
diff --git a/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 
b/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200
index 554a363..b49f143 100644
--- 

[MediaWiki-commits] [Gerrit] Remove unused import in MediaWikiServices - change (mediawiki/core)

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

Change subject: Remove unused import in MediaWikiServices
..


Remove unused import in MediaWikiServices

Change-Id: I6760f33cd40eb150f42caa0f6b5fc79872299772
---
M includes/MediaWikiServices.php
1 file changed, 0 insertions(+), 1 deletion(-)

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



diff --git a/includes/MediaWikiServices.php b/includes/MediaWikiServices.php
index 4028aa2..1b8a759 100644
--- a/includes/MediaWikiServices.php
+++ b/includes/MediaWikiServices.php
@@ -15,7 +15,6 @@
 use MediaWiki\Services\ServiceContainer;
 use MWException;
 use ObjectCache;
-use ResourceLoader;
 use SearchEngine;
 use SearchEngineConfig;
 use SearchEngineFactory;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6760f33cd40eb150f42caa0f6b5fc79872299772
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aude 
Gerrit-Reviewer: Addshore 
Gerrit-Reviewer: Daniel Kinzler 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Rename holmium to labservices1002. - change (operations/dns)

2016-05-23 Thread Andrew Bogott (Code Review)
Andrew Bogott has submitted this change and it was merged.

Change subject: Rename holmium to labservices1002.
..


Rename holmium to labservices1002.

Bug: T106303
Change-Id: I88d74bcc13d0cf6fb765f1332bd59addf596302e
---
M templates/10.in-addr.arpa
M templates/154.80.208.in-addr.arpa
M templates/wikimedia.org
M templates/wmnet
4 files changed, 4 insertions(+), 5 deletions(-)

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



diff --git a/templates/10.in-addr.arpa b/templates/10.in-addr.arpa
index fe62967..e9c9b96 100644
--- a/templates/10.in-addr.arpa
+++ b/templates/10.in-addr.arpa
@@ -1860,7 +1860,7 @@
 118 1H  IN PTR  tin.mgmt.eqiad.wmnet.
 119 1H  IN PTR  wmf4074.mgmt.eqiad.wmnet.
 119 1H  IN PTR  antimony.mgmt.eqiad.wmnet.
-120 1H  IN PTR  holmium.mgmt.eqiad.wmnet.
+120 1H  IN PTR  labservices1002.mgmt.eqiad.wmnet.
 120 1H  IN PTR  wmf4075.mgmt.eqiad.wmnet.
 121 1H  IN PTR  barium.mgmt.eqiad.wmnet.
 121 1H  IN PTR  wmf4076.mgmt.eqiad.wmnet.
diff --git a/templates/154.80.208.in-addr.arpa 
b/templates/154.80.208.in-addr.arpa
index 798a52e..b674ac2 100644
--- a/templates/154.80.208.in-addr.arpa
+++ b/templates/154.80.208.in-addr.arpa
@@ -25,8 +25,7 @@
 7   1H  IN PTR  antimony.wikimedia.org.
 10  1H  IN PTR  carbon.wikimedia.org.
 11  1H  IN PTR  dataset1001.wikimedia.org.
-12  1H  IN PTR  holmium.wikimedia.org.
-
+12  1H  IN PTR  labservices1002.wikimedia.org.
 14  1H  IN PTR  neon.wikimedia.org.
 
 16  1H  IN PTR  ms1001.wikimedia.org.
diff --git a/templates/wikimedia.org b/templates/wikimedia.org
index dae04eb..9a8910e 100644
--- a/templates/wikimedia.org
+++ b/templates/wikimedia.org
@@ -129,7 +129,7 @@
 fundraising-eqiad 1H  IN A208.80.155.14
 
 gallium 1H  IN A208.80.154.135
-holmium 1H  IN A208.80.154.12
+labservices1002 1H  IN A208.80.154.12
 hydrogen1H  IN A208.80.154.50
 1H  IN  2620:0:861:1:208:80:154:50
 install1001 1H  IN A208.80.154.83
diff --git a/templates/wmnet b/templates/wmnet
index 19bae6f..d6dd0d8 100644
--- a/templates/wmnet
+++ b/templates/wmnet
@@ -1982,7 +1982,7 @@
 WMF4074 1H  IN A10.65.3.119
 antimony1H  IN A10.65.3.119
 WMF4075 1H  IN A10.65.3.120
-holmium 1H  IN A10.65.3.120
+labservices1002 1H  IN A10.65.3.120
 WMF4076 1H  IN A10.65.3.121
 barium  1H  IN A10.65.3.121
 WMF4077 1H  IN A10.65.3.122

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I88d74bcc13d0cf6fb765f1332bd59addf596302e
Gerrit-PatchSet: 3
Gerrit-Project: operations/dns
Gerrit-Branch: master
Gerrit-Owner: Andrew Bogott 
Gerrit-Reviewer: Andrew Bogott 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Bump yargs to latest - change (mediawiki...parsoid)

2016-05-23 Thread Arlolra (Code Review)
Arlolra has uploaded a new change for review.

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

Change subject: Bump yargs to latest
..

Bump yargs to latest

 * So that in bin/parser.js, options get reset after exporting the
   defaultOptions.  Also, use `strict()` instead of our homegrown
   unknown arguments checker.

Change-Id: Ie389869f41bc58816fd51c30c9eae273ccc56ae2
---
M bin/parse.js
M bin/parserTests.js
M bin/roundtrip-test.js
M lib/utils/Util.js
M npm-shrinkwrap.json
M package.json
6 files changed, 369 insertions(+), 25 deletions(-)


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

diff --git a/bin/parse.js b/bin/parse.js
index f60b238..a326223 100755
--- a/bin/parse.js
+++ b/bin/parse.js
@@ -312,7 +312,7 @@
var opts = yargs.usage(
'Usage: echo wikitext | $0 [options]\n\n' + 
defaultModeStr,
standardOpts
-   ).check(Util.checkUnknownArgs.bind(null, standardOpts));
+   ).strict();
 
var argv = opts.argv;
 
diff --git a/bin/parserTests.js b/bin/parserTests.js
index 67f600a..8d9c2d3 100755
--- a/bin/parserTests.js
+++ b/bin/parserTests.js
@@ -281,14 +281,14 @@
'Usage: $0 [options] [tests-file]\n\n' + defaultArgs.join("\n"),
standardOpts
).check(function(argv, aliases) {
-   Util.checkUnknownArgs(standardOpts, argv, aliases);
if (argv.filter === true) {
throw "--filter needs an argument";
}
if (argv.regex === true) {
throw "--regex needs an argument";
}
-   });
+   return true;
+   }).strict();
 };
 
 /**
diff --git a/bin/roundtrip-test.js b/bin/roundtrip-test.js
index dc75a75..93240ca 100755
--- a/bin/roundtrip-test.js
+++ b/bin/roundtrip-test.js
@@ -691,7 +691,7 @@
 
var opts = yargs.usage(
'Usage: $0 [options]  \n\n', options
-   ).check(Util.checkUnknownArgs.bind(null, options));
+   ).strict();
 
var argv = opts.argv;
if (!argv._.length) {
diff --git a/lib/utils/Util.js b/lib/utils/Util.js
index 1995c2f..d186993 100644
--- a/lib/utils/Util.js
+++ b/lib/utils/Util.js
@@ -357,24 +357,6 @@
},
 
/**
-* Ensures that the supplied command line args were
-* options passed to yargs during setup.
-*/
-   checkUnknownArgs: function(standardOpts, argv, aliases) {
-   var knownArgs = Object.keys(aliases).reduce(function(prev, 
next) {
-   return prev.concat(aliases[next]);
-   }, ["_", 
"$0"].concat(Object.keys(standardOpts).map(function(arg) {
-   return arg.split(" ")[0];
-   })));
-
-   Object.keys(argv).forEach(function(arg) {
-   if (knownArgs.indexOf(arg) < 0) {
-   throw "Unknown argument: " + arg;
-   }
-   });
-   },
-
-   /**
 * @method
 *
 * Update only those properties that are undefined or null in the 
target.
diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json
index 8a375c5..f1c314d 100644
--- a/npm-shrinkwrap.json
+++ b/npm-shrinkwrap.json
@@ -4543,8 +4543,370 @@
   }
 },
 "yargs": {
-  "version": "1.3.1",
-  "resolved": "https://registry.npmjs.org/yargs/-/yargs-1.3.1.tgz;
+  "version": "4.7.1",
+  "resolved": "https://registry.npmjs.org/yargs/-/yargs-4.7.1.tgz;,
+  "dependencies": {
+"camelcase": {
+  "version": "3.0.0",
+  "resolved": 
"https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz;
+},
+"cliui": {
+  "version": "3.2.0",
+  "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz;,
+  "dependencies": {
+"strip-ansi": {
+  "version": "3.0.1",
+  "resolved": 
"https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz;,
+  "dependencies": {
+"ansi-regex": {
+  "version": "2.0.0",
+  "resolved": 
"https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.0.0.tgz;
+}
+  }
+},
+"wrap-ansi": {
+  "version": "2.0.0",
+  "resolved": 
"https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.0.0.tgz;
+}
+  }
+},
+"decamelize": {
+  "version": "1.2.0",
+  "resolved": 
"https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz;
+},
+"lodash.assign": {
+  "version": "4.0.9",
+  "resolved": 
"https://registry.npmjs.org/lodash.assign/-/lodash.assign-4.0.9.tgz;,
+  "dependencies": {
+"lodash.keys": {
+  "version": "4.0.7",
+

[MediaWiki-commits] [Gerrit] Batch updateNotificationTimestamp() UPDATE queries (without ... - change (mediawiki/core)

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

Change subject: Batch updateNotificationTimestamp() UPDATE queries (without 
wl_id)
..


Batch updateNotificationTimestamp() UPDATE queries (without wl_id)

The new primary key is not usable in production (T130067), so batch the
query using the old where condition.

Some code ideas from I3dbe1de4cf39499728a2077a71157d4bcc203e44

Bug: T134613
Change-Id: Ic12926a5166f7578a1136c7944d883c2fe1f3b3a
---
M includes/WatchedItemStore.php
1 file changed, 18 insertions(+), 9 deletions(-)

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



diff --git a/includes/WatchedItemStore.php b/includes/WatchedItemStore.php
index f0619d6..6486955 100644
--- a/includes/WatchedItemStore.php
+++ b/includes/WatchedItemStore.php
@@ -744,15 +744,24 @@
$fname = __METHOD__;
$dbw->onTransactionIdle(
function () use ( $dbw, $timestamp, $watchers, 
$target, $fname ) {
-   $dbw->update( 'watchlist',
-   [ /* SET */
-   
'wl_notificationtimestamp' => $dbw->timestamp( $timestamp )
-   ], [ /* WHERE */
-   'wl_user' => $watchers,
-   'wl_namespace' => 
$target->getNamespace(),
-   'wl_title' => 
$target->getDBkey(),
-   ], $fname
-   );
+   global $wgUpdateRowsPerQuery;
+
+   $watchersChunks = array_chunk( 
$watchers, $wgUpdateRowsPerQuery );
+   foreach ( $watchersChunks as 
$watchersChunk ) {
+   $dbw->update( 'watchlist',
+   [ /* SET */
+   
'wl_notificationtimestamp' => $dbw->timestamp( $timestamp )
+   ], [ /* WHERE - TODO 
Use wl_id T130067 */
+   'wl_user' => 
$watchersChunk,
+   'wl_namespace' 
=> $target->getNamespace(),
+   'wl_title' => 
$target->getDBkey(),
+   ], $fname
+   );
+   if ( count( $watchersChunks ) > 
1 ) {
+   $dbw->commit( 
__METHOD__, 'flush' );
+   
wfGetLBFactory()->waitForReplication( [ 'wiki' => $dbw->getWikiID() ] );
+   }
+   }
$this->uncacheLinkTarget( $target );
}
);

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

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

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


[MediaWiki-commits] [Gerrit] RollbackAction: Implement AJAX interface and require POST - change (mediawiki/core)

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

Change subject: RollbackAction: Implement AJAX interface and require POST
..


RollbackAction: Implement AJAX interface and require POST

Similar to WatchAction (converted in commit 77cdf1919).

* Make FormAction::getFormFields not abstract.
  In most cases this will just be an empty array.

* Convert RollbackAction from FormlessAction to FormAction and implement the
  required error handling scenarios (mostly moved out of from the old method, or
  duplicated from the WikiPage method where necessary).

* In most cases the in-between form is never used since a JavaScript handler
  takes over the link and uses the API over AJAX instead. In the no-js fallback
  (as well as for any existing tokenless rollback links) copy the GET parameters
  into the form for re-submission as POST (plus token, added by HTMLForm).

* Remove the distinction between WebUI and API tokens. This stronger token salt 
made it
  unnecessarily complex and was only there because it used GET until now. This 
streamlining of
  tokens matches what we already do for 'watch', 'edit', 'patrol' and other 
actions.

* Fix form submission bugs when 'from' query parameter is missing.

  - Ensure the required 'from' query parameter is present before showing a form.
No need for the user to submit a form we know will fail.

  - Plain GET request to action=rollback (with no parameters) is now a 400 Bad 
Request
instead of a form that would fail when submitted.

  - Submitting the form without 'form' field now correctly says why it failed.
Previously it emitted a session error, which was a lie.

Bug: T88044
Change-Id: Ia457802fec2e90573c8e7d552bc1f3cee258f10b
---
M RELEASE-NOTES-1.28
M includes/Linker.php
M includes/actions/RollbackAction.php
M includes/api/ApiRollback.php
M includes/page/WikiPage.php
M languages/i18n/en.json
M languages/i18n/qqq.json
M resources/Resources.php
A resources/src/mediawiki/api/rollback.js
M resources/src/mediawiki/page/patrol.ajax.js
A resources/src/mediawiki/page/rollback.js
M resources/src/mediawiki/page/watch.js
12 files changed, 247 insertions(+), 70 deletions(-)

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



diff --git a/RELEASE-NOTES-1.28 b/RELEASE-NOTES-1.28
index e365486..76728c8 100644
--- a/RELEASE-NOTES-1.28
+++ b/RELEASE-NOTES-1.28
@@ -13,7 +13,7 @@
 === New features in 1.28 ===
 * User::isBot() method for checking if an account is a bot role account.
 * Added a new hook, 'UserIsBot', to aid in determining if a user is a bot.
-
+* (T88044) Implemented one-click rollback handling via AJAX.
 
 === External library changes in 1.28 ===
 
diff --git a/includes/Linker.php b/includes/Linker.php
index 6a869dd..b81218f 100644
--- a/includes/Linker.php
+++ b/includes/Linker.php
@@ -1872,7 +1872,9 @@
 * work if $wgShowRollbackEditCount is disabled, so this can only 
function
 * as an additional check.
 *
-* If the option noBrackets is set the rollback link wont be enclosed 
in []
+* If the option noBrackets is set the rollback link wont be enclosed 
in "[]".
+*
+* See the "mediawiki.page.rollback" module for the client-side 
handling of this link.
 *
 * @since 1.16.3. $context added in 1.20. $options added in 1.21
 *
@@ -1901,6 +1903,8 @@
if ( !in_array( 'noBrackets', $options, true ) ) {
$inner = $context->msg( 'brackets' )->rawParams( $inner 
)->escaped();
}
+
+   $context->getOutput()->addModules( 'mediawiki.page.rollback' );
 
return '' . $inner . '';
}
@@ -1996,11 +2000,13 @@
$query = [
'action' => 'rollback',
'from' => $rev->getUserText(),
-   'token' => $context->getUser()->getEditToken( [
-   $title->getPrefixedText(),
-   $rev->getUserText()
-   ] ),
];
+   $attrs = [
+   'data-mw' => 'interface',
+   'title' => $context->msg( 'tooltip-rollback' )->text(),
+   ];
+   $options = [ 'known', 'noclasses' ];
+
if ( $context->getRequest()->getBool( 'bot' ) ) {
$query['bot'] = '1';
$query['hidediff'] = '1'; // bug 15999
@@ -2025,27 +2031,16 @@
}
 
if ( $editCount > $wgShowRollbackEditCount ) {
-   $editCount_output = $context->msg( 
'rollbacklinkcount-morethan' )
+   $html = $context->msg( 
'rollbacklinkcount-morethan' )
->numParams( $wgShowRollbackEditCount 
)->parse();
} else {
-  

[MediaWiki-commits] [Gerrit] Labs instances: Use labs-recursor0 as the primary. - change (operations/puppet)

2016-05-23 Thread Andrew Bogott (Code Review)
Andrew Bogott has submitted this change and it was merged.

Change subject: Labs instances:  Use labs-recursor0 as the primary.
..


Labs instances:  Use labs-recursor0 as the primary.

This is just part of getting everything consistently
using the '0' dns servers as first resort.

Change-Id: Iaa237318a5872b95a69205ebbe2f31e3d4316020
---
M hieradata/labs.yaml
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/hieradata/labs.yaml b/hieradata/labs.yaml
index c3f9d9f..c2bbf31 100644
--- a/hieradata/labs.yaml
+++ b/hieradata/labs.yaml
@@ -15,8 +15,8 @@
 
 # dns
 labsdnsconfig:
-  recursor: 'labs-recursor1.wikimedia.org'
-  recursor_secondary: 'labs-recursor0.wikimedia.org'
+  recursor: 'labs-recursor0.wikimedia.org'
+  recursor_secondary: 'labs-recursor1.wikimedia.org'
 
 # Additional base overrides
 standard::has_admin: false

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

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

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


[MediaWiki-commits] [Gerrit] labtestweb2001: add IPv6 like on silver - change (operations/puppet)

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

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

Change subject: labtestweb2001: add IPv6 like on silver
..

labtestweb2001: add IPv6 like on silver

To make it identical to silver which has all the same
roles but not this. They should be the same, right?

Change-Id: Ia0b6164da628cfe4285ae22fa91a1c1a37b2c47c
---
M manifests/site.pp
1 file changed, 3 insertions(+), 0 deletions(-)


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

diff --git a/manifests/site.pp b/manifests/site.pp
index 21bd823..109a42a 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -1432,10 +1432,13 @@
 include ldap::role::client::labs
 }
 
+# like silver (wikitech.wikimedia.org)
 node 'labtestweb2001.wikimedia.org' {
 role labs::openstack::nova::manager, mariadb::wikitech, horizon
 include base::firewall
 include standard
+
+interface::add_ip6_mapped { 'main': }
 }
 
 # Labs Graphite and StatsD host

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

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

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


[MediaWiki-commits] [Gerrit] Labs instances: Use labs-recursor0 as the primary. - change (operations/puppet)

2016-05-23 Thread Andrew Bogott (Code Review)
Andrew Bogott has uploaded a new change for review.

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

Change subject: Labs instances:  Use labs-recursor0 as the primary.
..

Labs instances:  Use labs-recursor0 as the primary.

This is just part of getting everything consistently
using the '0' dns servers as first resort.

Change-Id: Iaa237318a5872b95a69205ebbe2f31e3d4316020
---
M hieradata/labs.yaml
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/50/290350/1

diff --git a/hieradata/labs.yaml b/hieradata/labs.yaml
index c3f9d9f..c2bbf31 100644
--- a/hieradata/labs.yaml
+++ b/hieradata/labs.yaml
@@ -15,8 +15,8 @@
 
 # dns
 labsdnsconfig:
-  recursor: 'labs-recursor1.wikimedia.org'
-  recursor_secondary: 'labs-recursor0.wikimedia.org'
+  recursor: 'labs-recursor0.wikimedia.org'
+  recursor_secondary: 'labs-recursor1.wikimedia.org'
 
 # Additional base overrides
 standard::has_admin: false

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iaa237318a5872b95a69205ebbe2f31e3d4316020
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] Add a small artificial delay after saving an edit. - change (apps...wikipedia)

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

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

Change subject: Add a small artificial delay after saving an edit.
..

Add a small artificial delay after saving an edit.

After an edit is saved in the app, the change on the server side is not
immediate, and takes a few moments to start appearing in the response when
fetching the page content again.

Until this is fixed on the server side, we can work around it by forcing a
short delay right after a successful edit, before we attempt to read back
the updated page content.

Bug: T132803
Change-Id: I56758654aa5dd6890eb397de139140600c45bdbe
---
M app/src/main/java/org/wikipedia/editing/EditTask.java
1 file changed, 7 insertions(+), 0 deletions(-)


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

diff --git a/app/src/main/java/org/wikipedia/editing/EditTask.java 
b/app/src/main/java/org/wikipedia/editing/EditTask.java
index 0217cc5..85763ef 100644
--- a/app/src/main/java/org/wikipedia/editing/EditTask.java
+++ b/app/src/main/java/org/wikipedia/editing/EditTask.java
@@ -10,6 +10,8 @@
 import org.wikipedia.page.PageTitle;
 import org.wikipedia.WikipediaApp;
 
+import java.util.concurrent.TimeUnit;
+
 public class EditTask extends ApiTask {
 private final PageTitle title;
 private final String sectionWikitext;
@@ -57,6 +59,11 @@
 JSONObject edit = resultJSON.optJSONObject("edit");
 String status = edit.optString("result");
 if (status.equals("Success")) {
+
+// TODO: remove when the server reflects the updated page content 
immediately
+// after submitting the edit, instead of a short while after.
+Thread.sleep(TimeUnit.SECONDS.toMillis(2));
+
 return new SuccessEditResult(edit.optInt("newrevid"));
 } else if (status.equals("Failure")) {
 if (edit.has("captcha")) {

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

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

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


[MediaWiki-commits] [Gerrit] Stylelint: Add function rules and whitespace inside brackets - change (mediawiki...MobileFrontend)

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

Change subject: Stylelint: Add function rules and whitespace inside brackets
..


Stylelint: Add function rules and whitespace inside brackets

Change-Id: Idfc53aee2da50f31ddd9f26d968c583069c1
---
M .stylelintrc
M minerva.less/minerva.mixins.less
M minerva.less/minerva.variables.less
M resources/mobile.ajax/spinner.less
M resources/mobile.backtotop/backtotop.less
M resources/mobile.buttonWithSpinner/buttonWithSpinner.less
M resources/mobile.categories.overlays/categories.less
M resources/mobile.contentOverlays/tutorials.less
M resources/mobile.drawers/drawer.less
M resources/mobile.editor.common/editor.less
M resources/mobile.editor.ve/VisualEditorOverlay.less
M resources/mobile.gallery/gallery.less
M resources/mobile.issues/issues.less
M resources/mobile.languages.structured/LanguageOverlay.less
M resources/mobile.mainMenu/mainmenu.less
M resources/mobile.notifications.overlay/NotificationsOverlay.less
M resources/mobile.overlays/Overlay.less
M resources/mobile.pagelist.styles/pagelist.less
M resources/mobile.pagesummary.styles/pagesummary.less
M resources/mobile.references/references.less
M resources/mobile.search/SearchOverlay.less
M resources/mobile.special.mobilediff.styles/icons.less
M resources/mobile.special.mobilediff.styles/mobilediff.less
M resources/mobile.special.uploads.styles/uploads.less
M resources/mobile.toast/toast.less
M resources/mobile.toc/toc.less
M resources/mobile.watchstar/watchstar.less
M resources/skins.minerva.base.styles/common.less
M resources/skins.minerva.base.styles/icons.less
M resources/skins.minerva.base.styles/images.less
M resources/skins.minerva.base.styles/pageactions.less
M resources/skins.minerva.base.styles/ui.less
M resources/skins.minerva.beta.styles/pageactions.less
M resources/skins.minerva.content.styles/hacks.less
M resources/skins.minerva.content.styles/main.less
M resources/skins.minerva.special.userlogin.styles/userlogin.less
M resources/skins.minerva.special.watchlist.styles/specialWatchlist.less
M resources/skins.minerva.tablet.styles/common.less
M resources/skins.minerva.tablet.styles/hacks.less
M resources/skins.minerva.talk/talk.less
40 files changed, 103 insertions(+), 91 deletions(-)

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



diff --git a/.stylelintrc b/.stylelintrc
index 47048b4..8c4e88a 100644
--- a/.stylelintrc
+++ b/.stylelintrc
@@ -13,7 +13,19 @@
"font-family-name-quotes": [ "single-unless-keyword" ],
"font-weight-notation": [ "named-where-possible" ],
 
+   "function-calc-no-unspaced-operator": true,
+   "function-comma-newline-after": "never-multi-line",
+   "function-comma-newline-before": "never-multi-line",
+   "function-comma-space-after": [ "always" ],
+   "function-comma-space-before": [ "never" ],
+   "function-parentheses-newline-inside": [ "never-multi-line" ],
+   "function-parentheses-space-inside": [ "always" ],
+   "function-url-quotes": [ "none" ],
+   "function-whitespace-after": [ "always" ],
+
"string-no-newline": true,
-   "string-quotes": [ "single" ]
+   "string-quotes": [ "single" ],
+
+   "media-query-parentheses-space-inside": [ "always" ]
}
 }
diff --git a/minerva.less/minerva.mixins.less b/minerva.less/minerva.mixins.less
index 06f5f29..e885e30 100644
--- a/minerva.less/minerva.mixins.less
+++ b/minerva.less/minerva.mixins.less
@@ -8,7 +8,7 @@
 .m-background-image( @url ) {
&:after,
&:before {
-   .background-image(@url)
+   .background-image( @url )
}
 }
 
diff --git a/minerva.less/minerva.variables.less 
b/minerva.less/minerva.variables.less
index 07f1d66..8638fb5 100644
--- a/minerva.less/minerva.variables.less
+++ b/minerva.less/minerva.variables.less
@@ -43,7 +43,7 @@
 // colors
 @chromeColor: #f2f2f2;
 @chromeContentSeparator: @colorGray13;
-@semiTransparent: rgba(255, 255, 255, .8);
+@semiTransparent: rgba( 255, 255, 255, .8 );
 // note this is also used for red links
 @redBase: @colorErrorText;
 @colorTutorial: #2e76ff;
diff --git a/resources/mobile.ajax/spinner.less 
b/resources/mobile.ajax/spinner.less
index 5a76a5e..2410077 100644
--- a/resources/mobile.ajax/spinner.less
+++ b/resources/mobile.ajax/spinner.less
@@ -5,11 +5,11 @@
 // FIXME: Standardise on a loading class (update ConfirmEdit extension)
 .fancycaptcha-reload-loading,
 .mw-ui-icon-spinner {
-   .m-background-image('ajax-loader.gif');
+   .m-background-image( 'ajax-loader.gif' );
 }
 
 .mw-ui-icon-refresh {
-   .m-background-image('refresh.png');
+   .m-background-image( 'refresh.png' );
 }
 
 // Asynchronous loading
diff --git a/resources/mobile.backtotop/backtotop.less 
b/resources/mobile.backtotop/backtotop.less
index 

[MediaWiki-commits] [Gerrit] scap: add labtestwikitech to mediawiki-installation group - change (operations/puppet)

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

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

Change subject: scap: add labtestwikitech to mediawiki-installation group
..

scap: add labtestwikitech to mediawiki-installation group

Change-Id: I6dc39d91d48a1ace08ef05e9d40dc14b7ee976e5
---
M modules/scap/files/dsh/group/mediawiki-installation
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/48/290348/1

diff --git a/modules/scap/files/dsh/group/mediawiki-installation 
b/modules/scap/files/dsh/group/mediawiki-installation
index 0dfee8c..ee1d552 100644
--- a/modules/scap/files/dsh/group/mediawiki-installation
+++ b/modules/scap/files/dsh/group/mediawiki-installation
@@ -10,6 +10,7 @@
 
 # wikitech
 silver.wikimedia.org
+labtestweb2001.wikimedia.org
 
 # eqiad
 snapshot1001.eqiad.wmnet

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6dc39d91d48a1ace08ef05e9d40dc14b7ee976e5
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Alex Monk 

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


[MediaWiki-commits] [Gerrit] let chromium use jessie installer - change (operations/puppet)

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

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

Change subject: let chromium use jessie installer
..

let chromium use jessie installer

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


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/47/290347/1

diff --git a/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 
b/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200
index 554a363..081ed0e 100644
--- a/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200
+++ b/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200
@@ -330,6 +330,8 @@
 host chromium {
 hardware ethernet 78:2b:cb:08:aa:48;
 fixed-address chromium.wikimedia.org;
+option pxelinux.pathprefix "jessie-installer/";
+filename "jessie-installer/debian-installer/amd64/pxelinux.0";
 }
 
 host conf1001 {

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

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

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


[MediaWiki-commits] [Gerrit] Stylelint: Add newline and indent rules - change (mediawiki...MobileFrontend)

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

Change subject: Stylelint: Add newline and indent rules
..


Stylelint: Add newline and indent rules

Change-Id: I04d3304493ea2e99143cf018ed017bab313d325f
---
M .stylelintrc
M resources/mobile.ajax/spinner.less
M resources/mobile.betaoptin/panel.less
M resources/mobile.categories.overlays/categories.less
M resources/mobile.contentOverlays/tutorials.less
M resources/mobile.drawers/drawer.less
M resources/mobile.mainMenu/mainmenu.less
M resources/mobile.special.mobilediff.styles/icons.less
M resources/mobile.talk.overlays/TalkOverlay.less
M resources/mobile.toast/toast.less
M resources/skins.minerva.base.styles/common.less
M resources/skins.minerva.base.styles/icons.less
M resources/skins.minerva.beta.styles/ui.less
M resources/skins.minerva.content.styles/blockquotes.less
M resources/skins.minerva.content.styles/galleries.less
M resources/skins.minerva.content.styles/links.less
M resources/skins.minerva.content.styles/thumbnails.less
M resources/skins.minerva.special.styles/common.less
M resources/skins.minerva.userpage.styles/userpage.less
19 files changed, 16 insertions(+), 19 deletions(-)

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



diff --git a/.stylelintrc b/.stylelintrc
index 8866695..47048b4 100644
--- a/.stylelintrc
+++ b/.stylelintrc
@@ -1,5 +1,10 @@
 {
"rules": {
+   "indentation": [ "tab" ],
+   "max-empty-lines": 1,
+   "no-eol-whitespace": true,
+   "no-missing-eof-newline": true,
+
"color-hex-case": [ "lower" ],
"color-hex-length": [ "short" ],
"color-named": [ "never" ],
diff --git a/resources/mobile.ajax/spinner.less 
b/resources/mobile.ajax/spinner.less
index 49bedf2..5a76a5e 100644
--- a/resources/mobile.ajax/spinner.less
+++ b/resources/mobile.ajax/spinner.less
@@ -2,7 +2,6 @@
 @import 'minerva.mixins';
 @import 'mediawiki.mixins.less';
 
-
 // FIXME: Standardise on a loading class (update ConfirmEdit extension)
 .fancycaptcha-reload-loading,
 .mw-ui-icon-spinner {
diff --git a/resources/mobile.betaoptin/panel.less 
b/resources/mobile.betaoptin/panel.less
index 040c96d..01e9084 100644
--- a/resources/mobile.betaoptin/panel.less
+++ b/resources/mobile.betaoptin/panel.less
@@ -5,4 +5,4 @@
&.visible {
display: block;
}
-}
\ No newline at end of file
+}
diff --git a/resources/mobile.categories.overlays/categories.less 
b/resources/mobile.categories.overlays/categories.less
index 68be2e6..e928f7a 100644
--- a/resources/mobile.categories.overlays/categories.less
+++ b/resources/mobile.categories.overlays/categories.less
@@ -47,4 +47,4 @@
border-bottom: 3px solid transparent;
}
}
-}
\ No newline at end of file
+}
diff --git a/resources/mobile.contentOverlays/tutorials.less 
b/resources/mobile.contentOverlays/tutorials.less
index a31bf4d..202a469 100644
--- a/resources/mobile.contentOverlays/tutorials.less
+++ b/resources/mobile.contentOverlays/tutorials.less
@@ -1,7 +1,6 @@
 @import 'minerva.variables';
 @import 'minerva.mixins';
 
-
 @media all and (min-width: @deviceWidthTablet) {
// Take into account padding in width of pointer overlay so that it
// can point to anything in the containing content area and avoid
diff --git a/resources/mobile.drawers/drawer.less 
b/resources/mobile.drawers/drawer.less
index 734773b..b7f7bf0 100644
--- a/resources/mobile.drawers/drawer.less
+++ b/resources/mobile.drawers/drawer.less
@@ -1,7 +1,6 @@
 @import 'minerva.variables';
 @import 'minerva.mixins';
 
-
 // Drawers
 //
 // Drawers appear at the bottom of the page and contain CTAs
diff --git a/resources/mobile.mainMenu/mainmenu.less 
b/resources/mobile.mainMenu/mainmenu.less
index b0d051a..a80ce55 100644
--- a/resources/mobile.mainMenu/mainmenu.less
+++ b/resources/mobile.mainMenu/mainmenu.less
@@ -239,7 +239,6 @@
}
 }
 
-
 .navigation-enabled.animations {
// FIXME: Menu shouldn't need to know about drawers but a cta drawer 
might be open
.drawer .position-fixed,
diff --git a/resources/mobile.special.mobilediff.styles/icons.less 
b/resources/mobile.special.mobilediff.styles/icons.less
index a621d7a..9900d48 100644
--- a/resources/mobile.special.mobilediff.styles/icons.less
+++ b/resources/mobile.special.mobilediff.styles/icons.less
@@ -3,7 +3,6 @@
 @import 'minerva.mixins';
 @import 'mediawiki.mixins';
 
-
 // Diffs set
 .mw-ui-icon-bytesadded {
.m-background-image('positive.png');
@@ -15,4 +14,4 @@
 
 .mw-ui-icon-bytesneutral {
.m-background-image('neutral.png');
-}
\ No newline at end of file
+}
diff --git a/resources/mobile.talk.overlays/TalkOverlay.less 
b/resources/mobile.talk.overlays/TalkOverlay.less
index 1490496..7a8f726 100644
--- 

[MediaWiki-commits] [Gerrit] Revert "Don't override labsdnsconfig for labs." - change (operations/puppet)

2016-05-23 Thread Andrew Bogott (Code Review)
Andrew Bogott has uploaded a new change for review.

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

Change subject: Revert "Don't override labsdnsconfig for labs."
..

Revert "Don't override labsdnsconfig for labs."

This reverts commit 1fb7916555a706744de0c0722b305e9d2422af59.

Change-Id: I554e52e1a24484e7600c9fbd91ae52ebd2f14b56
---
M hieradata/labs.yaml
1 file changed, 6 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/46/290346/1

diff --git a/hieradata/labs.yaml b/hieradata/labs.yaml
index cf90015..c3f9d9f 100644
--- a/hieradata/labs.yaml
+++ b/hieradata/labs.yaml
@@ -12,6 +12,12 @@
   mathoid: "%{::site}"
   aqs: 'eqiad'
 
+
+# dns
+labsdnsconfig:
+  recursor: 'labs-recursor1.wikimedia.org'
+  recursor_secondary: 'labs-recursor0.wikimedia.org'
+
 # Additional base overrides
 standard::has_admin: false
 base::remote_syslog::enable: false

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I554e52e1a24484e7600c9fbd91ae52ebd2f14b56
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] Revert "Don't override labsdnsconfig for labs." - change (operations/puppet)

2016-05-23 Thread Andrew Bogott (Code Review)
Andrew Bogott has submitted this change and it was merged.

Change subject: Revert "Don't override labsdnsconfig for labs."
..


Revert "Don't override labsdnsconfig for labs."

This reverts commit 1fb7916555a706744de0c0722b305e9d2422af59.

Change-Id: I554e52e1a24484e7600c9fbd91ae52ebd2f14b56
---
M hieradata/labs.yaml
1 file changed, 6 insertions(+), 0 deletions(-)

Approvals:
  Andrew Bogott: Verified; Looks good to me, approved



diff --git a/hieradata/labs.yaml b/hieradata/labs.yaml
index cf90015..c3f9d9f 100644
--- a/hieradata/labs.yaml
+++ b/hieradata/labs.yaml
@@ -12,6 +12,12 @@
   mathoid: "%{::site}"
   aqs: 'eqiad'
 
+
+# dns
+labsdnsconfig:
+  recursor: 'labs-recursor1.wikimedia.org'
+  recursor_secondary: 'labs-recursor0.wikimedia.org'
+
 # Additional base overrides
 standard::has_admin: false
 base::remote_syslog::enable: false

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I554e52e1a24484e7600c9fbd91ae52ebd2f14b56
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Andrew Bogott 
Gerrit-Reviewer: Andrew Bogott 

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


[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: e85d457..cc1eb58 - change (mediawiki/extensions)

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

Change subject: Syncronize VisualEditor: e85d457..cc1eb58
..


Syncronize VisualEditor: e85d457..cc1eb58

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

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



diff --git a/VisualEditor b/VisualEditor
index e85d457..cc1eb58 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit e85d4574b05915330ab8c7549c797ab234293453
+Subproject commit cc1eb58a6138815a7e4a605481d1788afd1fad46

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

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

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


[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: e85d457..cc1eb58 - change (mediawiki/extensions)

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

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

Change subject: Syncronize VisualEditor: e85d457..cc1eb58
..

Syncronize VisualEditor: e85d457..cc1eb58

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


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions 
refs/changes/45/290345/1

diff --git a/VisualEditor b/VisualEditor
index e85d457..cc1eb58 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit e85d4574b05915330ab8c7549c797ab234293453
+Subproject commit cc1eb58a6138815a7e4a605481d1788afd1fad46

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

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

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


[MediaWiki-commits] [Gerrit] Corrected search request URL in MathEngineBaseX.php - change (mediawiki...MathSearch)

2016-05-23 Thread Plato2000 (Code Review)
Plato2000 has uploaded a new change for review.

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

Change subject: Corrected search request URL in MathEngineBaseX.php
..

Corrected search request URL in MathEngineBaseX.php

The URL at which the BaseX server runs is at
/restd/api/mwsquery, as opposed to /api/mwsquery. This
change is now reflected in MathEngineBaseX.php.

Change-Id: If84771c927ee934db5d0a4f49bf296adfb884651

Change-Id: I52d922378a5415ea40e2d833a2ff253a4369d2f4
---
M includes/engines/MathEngineBaseX.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MathSearch 
refs/changes/44/290344/1

diff --git a/includes/engines/MathEngineBaseX.php 
b/includes/engines/MathEngineBaseX.php
index 34dd444..a2b3d5b 100644
--- a/includes/engines/MathEngineBaseX.php
+++ b/includes/engines/MathEngineBaseX.php
@@ -16,7 +16,7 @@
 
function __construct( $query = null ) {
global $wgMathSearchBaseXBackendUrl;
-   parent::__construct( $query, $wgMathSearchBaseXBackendUrl . 
'api/mwsquery' );
+   parent::__construct( $query, $wgMathSearchBaseXBackendUrl . 
'restd/api/mwsquery' );
}
 
/**

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I52d922378a5415ea40e2d833a2ff253a4369d2f4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MathSearch
Gerrit-Branch: master
Gerrit-Owner: Plato2000 

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


[MediaWiki-commits] [Gerrit] Update mobileapps to cd76f5a - change (mediawiki...deploy)

2016-05-23 Thread BearND (Code Review)
BearND has submitted this change and it was merged.

Change subject: Update mobileapps to cd76f5a
..


Update mobileapps to cd76f5a

List of changes:
6d4a51f Fix tests to reflect updated page protection response format
d236f4d Fix isEmpty util
72b65f4 Fix geo prop
aabaf36 Remove sanitizeEmptyProtection
xxx Update node module dependencies

Change-Id: Iac633de4359a86c5ec984bd655228859d685545f
---
M node_modules/bluebird/js/browser/bluebird.core.js
M node_modules/bluebird/js/browser/bluebird.core.min.js
M node_modules/bluebird/js/browser/bluebird.js
M node_modules/bluebird/js/browser/bluebird.min.js
M node_modules/bluebird/js/release/map.js
M node_modules/bluebird/js/release/promise.js
M node_modules/bluebird/js/release/thenables.js
M node_modules/bluebird/js/release/using.js
M node_modules/bluebird/package.json
M 
node_modules/body-parser/node_modules/http-errors/node_modules/statuses/LICENSE
M 
node_modules/body-parser/node_modules/http-errors/node_modules/statuses/codes.json
M 
node_modules/body-parser/node_modules/http-errors/node_modules/statuses/index.js
M 
node_modules/body-parser/node_modules/http-errors/node_modules/statuses/package.json
M node_modules/body-parser/node_modules/qs/package.json
D 
node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/inflight/.eslintrc
M 
node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/inflight/package.json
D 
node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/inflight/test.js
M 
node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/wrappy/package.json
D 
node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/wrappy/test/basic.js
R node_modules/bytes/LICENSE
R node_modules/bytes/index.js
R node_modules/bytes/package.json
M node_modules/compression/index.js
M 
node_modules/compression/node_modules/accepts/node_modules/mime-types/package.json
M node_modules/compression/node_modules/accepts/package.json
D node_modules/compression/node_modules/bytes/index.js
D node_modules/compression/node_modules/bytes/package.json
M node_modules/compression/node_modules/compressible/index.js
M 
node_modules/compression/node_modules/compressible/node_modules/mime-db/package.json
M node_modules/compression/node_modules/compressible/package.json
M node_modules/compression/package.json
M node_modules/domino/lib/EventTarget.js
M node_modules/domino/lib/HTMLParser.js
M node_modules/domino/lib/select.js
M node_modules/domino/package.json
M node_modules/domino/test/domino.js
M 
node_modules/domino/test/htmlwg/submission/Ms2ger/events/event-handler-spec-example.html
M node_modules/express/node_modules/accepts/node_modules/mime-types/package.json
M node_modules/js-yaml/bin/js-yaml.js
M node_modules/js-yaml/dist/js-yaml.js
M node_modules/js-yaml/dist/js-yaml.min.js
M node_modules/js-yaml/package.json
R node_modules/pinkie-promise/index.js
R node_modules/pinkie-promise/license
R node_modules/pinkie-promise/node_modules/pinkie/index.js
R node_modules/pinkie-promise/node_modules/pinkie/license
R node_modules/pinkie-promise/node_modules/pinkie/package.json
R node_modules/pinkie-promise/package.json
M node_modules/preq/node_modules/request/node_modules/qs/package.json
M node_modules/service-runner/lib/base_service.js
M node_modules/service-runner/lib/docker.js
M node_modules/service-runner/lib/master.js
D node_modules/service-runner/node_modules/bluebird/js/browser/bluebird.core.js
D 
node_modules/service-runner/node_modules/bluebird/js/browser/bluebird.core.min.js
D node_modules/service-runner/node_modules/bluebird/js/browser/bluebird.js
D node_modules/service-runner/node_modules/bluebird/js/browser/bluebird.min.js
D node_modules/service-runner/node_modules/bluebird/js/release/any.js
D node_modules/service-runner/node_modules/bluebird/js/release/assert.js
D node_modules/service-runner/node_modules/bluebird/js/release/async.js
D node_modules/service-runner/node_modules/bluebird/js/release/bind.js
D node_modules/service-runner/node_modules/bluebird/js/release/bluebird.js
D node_modules/service-runner/node_modules/bluebird/js/release/call_get.js
D node_modules/service-runner/node_modules/bluebird/js/release/cancel.js
D node_modules/service-runner/node_modules/bluebird/js/release/catch_filter.js
D node_modules/service-runner/node_modules/bluebird/js/release/context.js
D node_modules/service-runner/node_modules/bluebird/js/release/debuggability.js
D node_modules/service-runner/node_modules/bluebird/js/release/direct_resolve.js
D node_modules/service-runner/node_modules/bluebird/js/release/each.js
D node_modules/service-runner/node_modules/bluebird/js/release/errors.js
D node_modules/service-runner/node_modules/bluebird/js/release/es5.js
D node_modules/service-runner/node_modules/bluebird/js/release/filter.js
D 

[MediaWiki-commits] [Gerrit] phabricator: Load vhost before MediaWiki's vhost - change (mediawiki/vagrant)

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

Change subject: phabricator: Load vhost before MediaWiki's vhost
..


phabricator: Load vhost before MediaWiki's vhost

Helpful in a Labs setting where the wildcard vhost for MediaWiki
installs is likely to mask the phabricator vhost if loaded first.

Change-Id: Ia3c7b0550394e4fecd8d708c62c96ad75ab575fc
---
M puppet/modules/phabricator/manifests/init.pp
1 file changed, 6 insertions(+), 3 deletions(-)

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



diff --git a/puppet/modules/phabricator/manifests/init.pp 
b/puppet/modules/phabricator/manifests/init.pp
index e8c95b1..ebf57a9 100644
--- a/puppet/modules/phabricator/manifests/init.pp
+++ b/puppet/modules/phabricator/manifests/init.pp
@@ -39,9 +39,12 @@
 
 # Add our vhost
 apache::site { $vhost_name:
-ensure  => present,
-content => template('phabricator/apache.conf.erb'),
-require => Class['::apache::mod::rewrite'],
+ensure   => present,
+# Load before MediaWiki vhost for Labs where the MediaWiki wildcard
+# vhost is likely to conflict with our hostname.
+priority => 40,
+content  => template('phabricator/apache.conf.erb'),
+require  => Class['::apache::mod::rewrite'],
 }
 
 phabricator::config { 'mysql.host':

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

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

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


[MediaWiki-commits] [Gerrit] Don't override labsdnsconfig for labs. - change (operations/puppet)

2016-05-23 Thread Andrew Bogott (Code Review)
Andrew Bogott has submitted this change and it was merged.

Change subject: Don't override labsdnsconfig for labs.
..


Don't override labsdnsconfig for labs.

The default settings for eqiad should serve us just fine here.

Change-Id: I20784571f5e3bb61eabec0f16534dafe3d98f48d
---
M hieradata/labs.yaml
1 file changed, 0 insertions(+), 6 deletions(-)

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



diff --git a/hieradata/labs.yaml b/hieradata/labs.yaml
index c3f9d9f..cf90015 100644
--- a/hieradata/labs.yaml
+++ b/hieradata/labs.yaml
@@ -12,12 +12,6 @@
   mathoid: "%{::site}"
   aqs: 'eqiad'
 
-
-# dns
-labsdnsconfig:
-  recursor: 'labs-recursor1.wikimedia.org'
-  recursor_secondary: 'labs-recursor0.wikimedia.org'
-
 # Additional base overrides
 standard::has_admin: false
 base::remote_syslog::enable: false

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

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

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


  1   2   3   4   >