[MediaWiki-commits] [Gerrit] Depool esams - change (operations/dns)

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

Change subject: Depool esams
..


Depool esams

Change-Id: I8a17462a58e3d9e82705e8beb0a45eb4bf7f17c0
---
M admin_state
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/admin_state b/admin_state
index 7295eeb..d338253 100644
--- a/admin_state
+++ b/admin_state
@@ -69,3 +69,4 @@
 # geoip/text-*/ulsfo => UP # ... this overrides the line above completely
 #
 ##
+geoip/generic-map/esams => DOWN

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8a17462a58e3d9e82705e8beb0a45eb4bf7f17c0
Gerrit-PatchSet: 1
Gerrit-Project: operations/dns
Gerrit-Branch: master
Gerrit-Owner: BBlack 
Gerrit-Reviewer: BBlack 

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


[MediaWiki-commits] [Gerrit] Depool esams - change (operations/dns)

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

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

Change subject: Depool esams
..

Depool esams

Change-Id: I8a17462a58e3d9e82705e8beb0a45eb4bf7f17c0
---
M admin_state
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/dns 
refs/changes/17/289817/1

diff --git a/admin_state b/admin_state
index 7295eeb..d338253 100644
--- a/admin_state
+++ b/admin_state
@@ -69,3 +69,4 @@
 # geoip/text-*/ulsfo => UP # ... this overrides the line above completely
 #
 ##
+geoip/generic-map/esams => DOWN

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

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

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


[MediaWiki-commits] [Gerrit] Add missing CVE ID to changelog - change (operations...linux44)

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

Change subject: Add missing CVE ID to changelog
..


Add missing CVE ID to changelog

Change-Id: I47166efbef72b1cfa3973f94885157fc0dcb3679
---
M debian/changelog
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/debian/changelog b/debian/changelog
index 4dae3ef..987ccd5 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -10,6 +10,7 @@
 - CVE-2016-4557 [8358b02bf67d3a5d8a825070e1aa73f25fb2e4c7]
 - CVE-2016-4558 [92117d8443bc5afacc8d5ba82e541946310f106e]
 - CVE-2016-2117 [f43bfaeddc79effbf3d0fcb53ca477cca66f3db8]
+- CVE-2016-4913 [99d825822eade8d827a1817357cbf3f889a552d6]
 Remove CVE-2016-4557.patch, now part of 4.4.11
 
  -- Moritz Muehlenhoff   Thu, 12 May 2016 16:10:22 
+0200

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I47166efbef72b1cfa3973f94885157fc0dcb3679
Gerrit-PatchSet: 1
Gerrit-Project: operations/debs/linux44
Gerrit-Branch: master
Gerrit-Owner: Muehlenhoff 
Gerrit-Reviewer: Muehlenhoff 

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


[MediaWiki-commits] [Gerrit] Add missing CVE ID to changelog - change (operations...linux44)

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

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

Change subject: Add missing CVE ID to changelog
..

Add missing CVE ID to changelog

Change-Id: I47166efbef72b1cfa3973f94885157fc0dcb3679
---
M debian/changelog
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/debs/linux44 
refs/changes/16/289816/1

diff --git a/debian/changelog b/debian/changelog
index 4dae3ef..987ccd5 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -10,6 +10,7 @@
 - CVE-2016-4557 [8358b02bf67d3a5d8a825070e1aa73f25fb2e4c7]
 - CVE-2016-4558 [92117d8443bc5afacc8d5ba82e541946310f106e]
 - CVE-2016-2117 [f43bfaeddc79effbf3d0fcb53ca477cca66f3db8]
+- CVE-2016-4913 [99d825822eade8d827a1817357cbf3f889a552d6]
 Remove CVE-2016-4557.patch, now part of 4.4.11
 
  -- Moritz Muehlenhoff   Thu, 12 May 2016 16:10:22 
+0200

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I47166efbef72b1cfa3973f94885157fc0dcb3679
Gerrit-PatchSet: 1
Gerrit-Project: operations/debs/linux44
Gerrit-Branch: master
Gerrit-Owner: Muehlenhoff 

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


[MediaWiki-commits] [Gerrit] registry: Yandex Mt non-default for fr and es - change (mediawiki...cxserver)

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

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

Change subject: registry: Yandex Mt non-default for fr and es
..

registry: Yandex Mt non-default for fr and es

Change-Id: Iadbe7329223719f3e650cb84124e503254e85ec2
---
M registry.wikimedia.yaml
1 file changed, 0 insertions(+), 50 deletions(-)


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

diff --git a/registry.wikimedia.yaml b/registry.wikimedia.yaml
index 16e4212..c1b4aac 100644
--- a/registry.wikimedia.yaml
+++ b/registry.wikimedia.yaml
@@ -4923,56 +4923,6 @@
 'he-la': source-mt
 'hu-la': source-mt
 'it-la': source-mt
-'af-es': source-mt
-'ar-es': source-mt
-'cs-es': source-mt
-'da-es': source-mt
-'de-es': source-mt
-'el-es': source-mt
-'fi-es': source-mt
-'he-es': source-mt
-'hu-es': source-mt
-'id-es': source-mt
-'ja-es': source-mt
-'lt-es': source-mt
-'nl-es': source-mt
-'pl-es': source-mt
-'ru-es': source-mt
-'sh-es': source-mt
-'sv-es': source-mt
-'th-es': source-mt
-'tr-es': source-mt
-'uk-es': source-mt
-'zh-es': source-mt
-'ar-fr': source-mt
-'az-fr': source-mt
-'cs-fr': source-mt
-'da-fr': source-mt
-'de-fr': source-mt
-'el-fr': source-mt
-'en-fr': source-mt
-'fa-fr': source-mt
-'he-fr': source-mt
-'hr-fr': source-mt
-'hu-fr': source-mt
-'id-fr': source-mt
-'is-fr': source-mt
-'it-fr': source-mt
-'ja-fr': source-mt
-'ka-fr': source-mt
-'lv-fr': source-mt
-'mg-fr': source-mt
-'nl-fr': source-mt
-'pl-fr': source-mt
-'pt-fr': source-mt
-'ro-fr': source-mt
-'ru-fr': source-mt
-'sh-fr': source-mt
-'sv-fr': source-mt
-'tr-fr': source-mt
-'vi-fr': source-mt
-'uk-fr': source-mt
-'zh-fr': source-mt
 'ar-sv': source-mt
 'da-sv': source-mt
 'de-sv': source-mt

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iadbe7329223719f3e650cb84124e503254e85ec2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/cxserver
Gerrit-Branch: master
Gerrit-Owner: KartikMistry 

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


[MediaWiki-commits] [Gerrit] Unswap langcode and langdir variables in popup.mustache - change (mediawiki...Popups)

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

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

Change subject: Unswap langcode and langdir variables in popup.mustache
..

Unswap langcode and langdir variables in popup.mustache

Broken by commit 27d811a1737e64f3aa26361337297b8a9f2b5b03

Bug: T135758
Change-Id: Ia9b92b4c91e54f921ad220b7818af6f245e29b61
---
M resources/popup.mustache
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/resources/popup.mustache b/resources/popup.mustache
index 163de28..064e85e 100644
--- a/resources/popup.mustache
+++ b/resources/popup.mustache
@@ -2,7 +2,7 @@
{{#hasThumbnail}}

{{/hasThumbnail}}
-   
+   

{{lastModified}}

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

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

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


[MediaWiki-commits] [Gerrit] Revert "Compress PNGs with zopflipng" - change (mediawiki...SemanticPageMaker)

2016-05-19 Thread Tim Starling (Code Review)
Tim Starling has submitted this change and it was merged.

Change subject: Revert "Compress PNGs with zopflipng"
..


Revert "Compress PNGs with zopflipng"

This reverts commit d966fdcf612c3e846c234b947fc8d7ce42444d69.

Change-Id: I66cf2992c859c491ced1dcaffd2c15fc58b7bcd8
---
M helps/img/0.png
M helps/img/1-0.png
M helps/img/1.png
M helps/img/2.png
M helps/img/3-1.png
M helps/img/3-2.png
M helps/img/3.png
M helps/img/4.png
M helps/img/5.png
M helps/img/6.png
M helps/img/7.png
M helps/img/acl.png
M helps/img/acl_assign.png
M helps/img/acl_csa.png
M helps/img/acl_csa_form.png
M helps/img/acl_cus.png
M helps/img/acl_cus_form.png
M helps/img/acl_sub.png
M helps/img/common_possible.png
M helps/img/common_possible2.png
M helps/img/con_allows.png
M helps/img/con_allows2.png
M helps/img/con_allows2_form.png
M helps/img/con_allows2_form2.png
M helps/img/con_allows3.png
M helps/img/con_allows3_form2.png
M helps/img/con_allows_form.png
M helps/img/con_allows_form2.png
M helps/img/connector.png
M helps/img/connector2.png
M helps/img/connector3.png
M helps/img/date.png
M helps/img/date_form.png
M helps/img/f1.png
M helps/img/f2.png
M helps/img/file.png
M helps/img/file2.png
M helps/img/file_form.png
M helps/img/file_form2.png
M helps/img/file_page.png
M helps/img/number.png
M helps/img/number_1.png
M helps/img/number_form.png
M helps/img/page.png
M helps/img/page2.png
M helps/img/page3.png
M helps/img/page_1form.png
M helps/img/page_2form.png
M helps/img/section.png
M helps/img/string.png
M helps/img/text.png
M helps/img/uid.png
M helps/img/widget.png
M helps/img/widget_form.png
M helps/img/widget_section.png
M helps/img/widget_table.png
M helps/img/widget_view.png
M helps/video/FirstFrame.png
M maintenance/Sample.png
M scripts/colorpicker/images/colorpicker_background.png
M scripts/colorpicker/images/colorpicker_hex.png
M scripts/colorpicker/images/colorpicker_hsb_b.png
M scripts/colorpicker/images/colorpicker_hsb_h.png
M scripts/colorpicker/images/colorpicker_hsb_s.png
M scripts/colorpicker/images/colorpicker_overlay.png
M scripts/colorpicker/images/colorpicker_rgb_b.png
M scripts/colorpicker/images/colorpicker_rgb_g.png
M scripts/colorpicker/images/colorpicker_rgb_r.png
M scripts/colorpicker/images/colorpicker_submit.png
M scripts/colorpicker/images/custom_background.png
M scripts/colorpicker/images/custom_hex.png
M scripts/colorpicker/images/custom_hsb_b.png
M scripts/colorpicker/images/custom_hsb_h.png
M scripts/colorpicker/images/custom_hsb_s.png
M scripts/colorpicker/images/custom_rgb_b.png
M scripts/colorpicker/images/custom_rgb_g.png
M scripts/colorpicker/images/custom_rgb_r.png
M scripts/colorpicker/images/custom_submit.png
M scripts/colorpicker/images/select.png
M scripts/colorpicker/images/select2.png
M scripts/colorpicker/images/slider.png
M scripts/fancybox/fancy_close.png
M scripts/fancybox/fancy_loading.png
M scripts/fancybox/fancy_nav_left.png
M scripts/fancybox/fancy_nav_right.png
M scripts/fancybox/fancy_shadow_e.png
M scripts/fancybox/fancy_shadow_n.png
M scripts/fancybox/fancy_shadow_ne.png
M scripts/fancybox/fancy_shadow_nw.png
M scripts/fancybox/fancy_shadow_s.png
M scripts/fancybox/fancy_shadow_se.png
M scripts/fancybox/fancy_shadow_sw.png
M scripts/fancybox/fancy_shadow_w.png
M scripts/fancybox/fancy_title_over.png
M scripts/fancybox/fancybox-x.png
M scripts/fancybox/fancybox-y.png
M scripts/fancybox/fancybox.png
M scripts/wysiwyg/ckeditor/_source/plugins/about/dialogs/logo_ckeditor.png
M scripts/wysiwyg/ckeditor/_source/plugins/flash/images/placeholder.png
M scripts/wysiwyg/ckeditor/_source/plugins/showblocks/images/block_address.png
M 
scripts/wysiwyg/ckeditor/_source/plugins/showblocks/images/block_blockquote.png
M scripts/wysiwyg/ckeditor/_source/plugins/showblocks/images/block_div.png
M scripts/wysiwyg/ckeditor/_source/plugins/showblocks/images/block_h1.png
M scripts/wysiwyg/ckeditor/_source/plugins/showblocks/images/block_h2.png
M scripts/wysiwyg/ckeditor/_source/plugins/showblocks/images/block_h3.png
M scripts/wysiwyg/ckeditor/_source/plugins/showblocks/images/block_h4.png
M scripts/wysiwyg/ckeditor/_source/plugins/showblocks/images/block_h5.png
M scripts/wysiwyg/ckeditor/_source/plugins/showblocks/images/block_h6.png
M scripts/wysiwyg/ckeditor/_source/plugins/showblocks/images/block_p.png
M scripts/wysiwyg/ckeditor/_source/plugins/showblocks/images/block_pre.png
M scripts/wysiwyg/ckeditor/_source/plugins/uicolor/yui/assets/hue_bg.png
M scripts/wysiwyg/ckeditor/_source/plugins/uicolor/yui/assets/hue_thumb.png
M scripts/wysiwyg/ckeditor/_source/plugins/uicolor/yui/assets/picker_mask.png
M scripts/wysiwyg/ckeditor/_source/plugins/uicolor/yui/assets/picker_thumb.png
M scripts/wysiwyg/ckeditor/_source/skins/kama/icons.png
M scripts/wysiwyg/ckeditor/_source/skins/kama/icons_rtl.png
M scripts/wysiwyg/ckeditor/_source/skins/kama/images/dialog_sides.png
M scripts/wysiwyg/ckeditor/_source/skins/kama/images/dialog_sides_rtl.png
M 

[MediaWiki-commits] [Gerrit] mw.loader: Optimise hot code paths in addEmbeddedCSS() - change (mediawiki/core)

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

Change subject: mw.loader: Optimise hot code paths in addEmbeddedCSS()
..


mw.loader: Optimise hot code paths in addEmbeddedCSS()

addEmbeddedCSS() is a big part of the hot code path that moves a module from
state "loaded" to "ready". Especially on repeat views (where most loads
are cache hits from local storage), this is the main thing that JS spends time
on before running scripts (which must wait for the styles to apply first).

* newStyleTag: Avoid use of jQuery.
  Before
  - jQuery()
- jQuery#init
  - jQuery#before
- jQuery#domManip, jQuery#buildFragment, jQuery#inArray
- Node#insertBefore
  - Node#appendChild
  After
  - Node#insertBefore
  - Node#appendChild

* getMarker: Store raw Node instead of jQuery object. Makes it easy for other
  code to avoid jQuery. And for those that don't, creating a jQuery object is 
cheap.
  Also use querySelector directly since it's ensured by our feature test.
  The only cases jQuery/Sizzle accounts with querySelector is IE8 (already 
excluded
  by our feature test), and Opera 12 (in an edge case that doesn't apply to this
  selector).

  Before
  - jQuery
- jQuery#init
  - jQuery#find
- Sizzle
- querySelectorAll
  - jQuery#pushStack
  After
  - querySelector

* addEmbeddedCSS: This was needlessly calling the fairly slow .data() method for
  all style tags in all browsers. It should've been guarded by IE<=9 
if-statement.
  The consumer of this data property already had that check. The setter did not.

  Before:
  - getMarker
- ..
  - newStyleTag
- ..
  - jQuery#data
- jQuery#each, jQuery#data, internalData, ..
  - fireCallbacks
- ..
  After
  - getMarker
  - newStyleTag
  - fireCallbacks
- ..

Change-Id: Ie5b5195d337b5d88f0c2ca69d15b13a4fb9d87e2
---
M jsduck.json
M resources/src/mediawiki/mediawiki.js
2 files changed, 41 insertions(+), 42 deletions(-)

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



diff --git a/jsduck.json b/jsduck.json
index 53300c5..a75c9f0 100644
--- a/jsduck.json
+++ b/jsduck.json
@@ -7,7 +7,7 @@
"--builtin-classes": true,
"--processes": "0",
"--warnings-exit-nonzero": true,
-   "--external": 
"HTMLElement,HTMLDocument,Window,Blob,File,MouseEvent,KeyboardEvent,HTMLIframeElement,HTMLInputElement,XMLDocument",
+   "--external": 
"HTMLElement,HTMLDocument,Window,Blob,File,MouseEvent,KeyboardEvent,HTMLIframeElement,HTMLInputElement,XMLDocument,Node",
"--output": "docs/js",
"--": [
"maintenance/jsduck/external.js",
diff --git a/resources/src/mediawiki/mediawiki.js 
b/resources/src/mediawiki/mediawiki.js
index 4aad2ba..1203b6a 100644
--- a/resources/src/mediawiki/mediawiki.js
+++ b/resources/src/mediawiki/mediawiki.js
@@ -796,24 +796,26 @@
 */
jobs = [],
 
-   // Selector cache for the marker element. Use 
getMarker() to get/use the marker!
-   $marker = null,
+   // For getMarker()
+   marker = null,
 
-   // For #addEmbeddedCSS
+   // For addEmbeddedCSS()
cssBuffer = '',
cssBufferTimer = null,
-   cssCallbacks = $.Callbacks();
+   cssCallbacks = $.Callbacks(),
+   isIEto9 = 'documentMode' in document && 
document.documentMode <= 9,
+   isIE9 = document.documentMode === 9;
 
function getMarker() {
-   if ( !$marker ) {
+   if ( !marker ) {
// Cache
-   $marker = $( 
'meta[name="ResourceLoaderDynamicStyles"]' );
-   if ( !$marker.length ) {
-   mw.log( 'No  found, inserting dynamically' );
-   $marker = $( '' ).attr( 
'name', 'ResourceLoaderDynamicStyles' ).appendTo( 'head' );
+   marker = document.querySelector( 
'meta[name="ResourceLoaderDynamicStyles"]' );
+   if ( !marker ) {
+   mw.log( 'Create  dynamically' );
+   marker = $( '' ).attr( 
'name', 'ResourceLoaderDynamicStyles' ).appendTo( 'head' )[ 0 ];
}
}
-   return $marker;
+   return marker;
}
 
/**
@@ -821,16 +823,16 @@
 

[MediaWiki-commits] [Gerrit] Avoid master connection in recacheMessageCount() - change (mediawiki...LiquidThreads)

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

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

Change subject: Avoid master connection in recacheMessageCount()
..

Avoid master connection in recacheMessageCount()

Bug: T92357
Change-Id: I9e1a2b0b7555a3f7c822c3e78c10900dffe5f192
---
M classes/NewMessagesController.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/classes/NewMessagesController.php 
b/classes/NewMessagesController.php
index b59d262..af83c52 100644
--- a/classes/NewMessagesController.php
+++ b/classes/NewMessagesController.php
@@ -407,7 +407,7 @@
global $wgMemc;
 
$wgMemc->delete( wfMemcKey( 'lqt-new-messages-count', $uid ) );
-   User::newFromId( $uid )->invalidateCache();
+   User::newFromId( $uid )->clearSharedCache( 'refresh' );
}
 
static function watchedThreadsForUser( $user ) {

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

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

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


[MediaWiki-commits] [Gerrit] Fix geo prop - change (mediawiki...mobileapps)

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

Change subject: Fix geo prop
..


Fix geo prop

• Don't return a null geo property or geo with a null latitude or
  longitude.

• Be more permissive in geo parser.

Bug: T135571
Change-Id: I22606b85bd60e1cc46105eae4b18e7be86d02ef4
---
M lib/parseProperty.js
M test/features/mobile-sections-lead/pagecontent.js
2 files changed, 24 insertions(+), 5 deletions(-)

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



diff --git a/lib/parseProperty.js b/lib/parseProperty.js
index 171745d..161b5bb 100644
--- a/lib/parseProperty.js
+++ b/lib/parseProperty.js
@@ -67,10 +67,11 @@
  * @returns {Geo} if latitude or longitude is truthy, else undefined.
  */
 function latLngStrToGeo(latLngStr) {
-var latLng = latLngStr && latLngStr.split('; ') || [];
-return latLng.length
-&& { "latitude": latLng[0] && parseFloat(latLng[0]),
-"longitude": latLng[1] && parseFloat(latLng[1]) };
+var latLng = latLngStr && latLngStr.split(/[;, ]+/) || [];
+var geo = latLng.length &&
+  { latitude: latLng[0] && parseFloat(latLng[0]),
+longitude: latLng[1] && parseFloat(latLng[1]) };
+return mUtil.defaultVal(mUtil.filterEmpty(geo));
 }
 
 /**
@@ -78,7 +79,10 @@
  */
 function parseGeo(lead, page) {
 var coordinates = lead.querySelector('span#coordinates .geo');
-page.geo = coordinates && latLngStrToGeo(coordinates.innerHTML);
+var geo = coordinates && latLngStrToGeo(coordinates.textContent);
+if (geo) {
+page.geo = geo;
+}
 }
 
 /**
diff --git a/test/features/mobile-sections-lead/pagecontent.js 
b/test/features/mobile-sections-lead/pagecontent.js
index dd3893e..572a515 100644
--- a/test/features/mobile-sections-lead/pagecontent.js
+++ b/test/features/mobile-sections-lead/pagecontent.js
@@ -71,6 +71,21 @@
 assert.deepEqual(lead.geo.longitude, -122.417);
 });
 });
+it('es Savonlinna should have a lead object with a geo property', 
function() {
+return preq.get({ uri: server.config.uri + 
'es.wikipedia.org/v1/page/mobile-sections-lead/Savonlinna' })
+.then(function(res) {
+var lead = res.body;
+assert.deepEqual(lead.geo.latitude, 61.8667);
+assert.deepEqual(lead.geo.longitude, 28.88305556);
+});
+});
+it('es Gogland should not have a lead object with a geo property', 
function() {
+return preq.get({ uri: server.config.uri + 
'es.wikipedia.org/v1/page/mobile-sections-lead/Gogland' })
+.then(function(res) {
+var lead = res.body;
+assert.ok(!lead.hasOwnProperty('geo'));
+});
+});
 it('Barack Obama should have a pronunciation', function() {
 return preq.get({ uri: server.config.uri + 
'en.wikipedia.org/v1/page/mobile-sections-lead/Barack_Obama' })
 .then(function(res) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I22606b85bd60e1cc46105eae4b18e7be86d02ef4
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/services/mobileapps
Gerrit-Branch: master
Gerrit-Owner: Niedzielski 
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] Limit DELETE in purgeExpiredRestrictions() and use primary key - change (mediawiki/core)

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

Change subject: Limit DELETE in purgeExpiredRestrictions() and use primary key
..


Limit DELETE in purgeExpiredRestrictions() and use primary key

This should help reduce contention in some cases.
If too many rows are expired, subsequent updates will
clear them out.

Bug: T135470
Change-Id: Iada496d0db9b00e77037320d7c65124a8c8f68c0
---
M includes/Title.php
1 file changed, 17 insertions(+), 2 deletions(-)

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



diff --git a/includes/Title.php b/includes/Title.php
index 25fbce3..3a5b62b 100644
--- a/includes/Title.php
+++ b/includes/Title.php
@@ -2971,6 +2971,8 @@
 
/**
 * Purge expired restrictions from the page_restrictions table
+*
+* This will purge no more than $wgUpdateRowsPerQuery page_restrictions 
rows
 */
static function purgeExpiredRestrictions() {
if ( wfReadOnly() ) {
@@ -2981,11 +2983,24 @@
wfGetDB( DB_MASTER ),
__METHOD__,
function ( IDatabase $dbw, $fname ) {
-   $dbw->delete(
+   $config = 
MediaWikiServices::getInstance()->getMainConfig();
+   $ids = $dbw->selectFieldValues(
'page_restrictions',
+   'pr_id',
[ 'pr_expiry < ' . $dbw->addQuotes( 
$dbw->timestamp() ) ],
-   $fname
+   $fname,
+   [ 'LIMIT' => $config->get( 
'UpdateRowsPerQuery' ) ] // T135470
);
+   if ( $ids ) {
+   $dbw->delete( 'page_restrictions', [ 
'pr_id' => $ids ], $fname );
+   }
+   }
+   ) );
+
+   DeferredUpdates::addUpdate( new AtomicSectionUpdate(
+   wfGetDB( DB_MASTER ),
+   __METHOD__,
+   function ( IDatabase $dbw, $fname ) {
$dbw->delete(
'protected_titles',
[ 'pt_expiry < ' . $dbw->addQuotes( 
$dbw->timestamp() ) ],

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iada496d0db9b00e77037320d7c65124a8c8f68c0
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz 
Gerrit-Reviewer: Addshore 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Use ArticleRevisionUndeleted instead of ArticleUndelete - change (mediawiki...Flow)

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

Change subject: Use ArticleRevisionUndeleted instead of ArticleUndelete
..


Use ArticleRevisionUndeleted instead of ArticleUndelete

No longer block undeleting things on top of Flow (T104591)

That restriction was put in place to handle the scenario from T104591,
but we just handle that (and similar scenarios) correctly now.

ArticleUndelete was broken (meaning it causes inconsistent state) in
the following scenarios (but possibly also others)

1.
1a. Create as Flow
1b. Delete Flow
1c. Create as wikitext
1d. Delete wikitext
1e. Create as wikitext
1f. Undelete both together

In #1, the Title's content model both before and after the undeletion
is wikitext.

Thus, (because of the content model check on Title), the workflows are
not updated, leading to inconsistent state.

AFAICT, a similar theme to #1 (Flow board restored when a wikitext page
was already top-most revision (and the wikitext would remain top-most
after the restore)) caused the most recent production undeletion issue.

2.
2a. Create page as wikitext.
2b. Delete wikitext
2c. Use Special:EnableFlow to create as Flow
2d. Delete Flow
2e. Restore just the wikitext
2f. Restore Flow using revision checkbox

In #2, because of dc579d27da7b86ff46dc972eb54ea31cba561c26
(getContentModel excess caching), it didn't recognize that the new
top-level revision would be Flow, so it didn't know to update the
Flow workflows).

However, fixing that content model check then caused it to reject the
change, since the current Title's ID (from the wikitext revision) is
different from the old page ID.  It's actually Flow on top of wikitext,
but it wrongly detects it.

To solve both problems, we check every undeleted revision for
'flow-board'.

Processing every revision should avoid inconsistent state.

Since I'm removing InvalidUndeleteException, also regenerate
autoload.php (there were a couple other unrelated things missing).

Bug: T122262
Change-Id: I552c119b47268a7888cf78d2fd1d5a9d98d51856
---
M Flow.php
M FlowActions.php
M Hooks.php
M autoload.php
M includes/Exception/ExceptionHandling.php
5 files changed, 10 insertions(+), 32 deletions(-)

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



diff --git a/Flow.php b/Flow.php
index b380656..ea36504 100644
--- a/Flow.php
+++ b/Flow.php
@@ -151,7 +151,7 @@
 $wgHooks['ArticleConfirmDelete'][] = 'FlowHooks::onArticleConfirmDelete';
 $wgHooks['ArticleDelete'][] = 'FlowHooks::onArticleDelete';
 $wgHooks['ArticleDeleteComplete'][] = 'FlowHooks::onArticleDeleteComplete';
-$wgHooks['ArticleUndelete'][] = 'FlowHooks::onArticleUndelete';
+$wgHooks['ArticleRevisionUndeleted'][] = 
'FlowHooks::onArticleRevisionUndeleted';
 $wgHooks['SearchableNamespaces'][] = 'FlowHooks::onSearchableNamespaces';
 $wgHooks['ImportHandleToplevelXMLTag'][] = 
'FlowHooks::onImportHandleToplevelXMLTag';
 
diff --git a/FlowActions.php b/FlowActions.php
index 790a640..1cfe0fc 100644
--- a/FlowActions.php
+++ b/FlowActions.php
@@ -22,7 +22,8 @@
  * * root-permissions: similar to 'permissions', but applies to the last 
revision
  *   of the root post (= the topic) for the revision the action is executed 
against.
  * * core-delete-permissions: array of rights, where any of those rights will
- *   give you permission to do the action on a deleted board (isAllowedAny).
+ * give you permission to do the action on a deleted board (isAllowedAny).
+ * Empty string and omitted behave like 'permissions'.
  * * links: the set of read links to generate and return in API responses
  * * actions: the set of write links to generate and return in API responses
  * * history: all history-related information:
diff --git a/Hooks.php b/Hooks.php
index 2bb4d5f..dcbc216 100644
--- a/Hooks.php
+++ b/Hooks.php
@@ -5,7 +5,6 @@
 use Flow\Conversion\Utils;
 use Flow\Exception\FlowException;
 use Flow\Exception\PermissionException;
-use Flow\Exception\InvalidUndeleteException;
 use Flow\Data\Listener\RecentChangesListener;
 use Flow\Formatter\CheckUserQuery;
 use Flow\Import\OptInUpdate;
@@ -1586,24 +1585,18 @@
 
/**
 * @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
+* @param Revision $revision Revision just undeleted
+* @param string $oldPageId Old page ID stored with that revision when 
it was in the archive table
 * @return bool
 */
-   public static function onArticleUndelete( Title $title, $created, 
$comment, $oldPageId ) {
-   if ( $title->getContentModel() === CONTENT_MODEL_FLOW_BOARD ) {
-   

[MediaWiki-commits] [Gerrit] Fire IP velocity filter early - change (mediawiki...DonationInterface)

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

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

Change subject: Fire IP velocity filter early
..

Fire IP velocity filter early

Run the first time we see them, let them get one attempt on that
credit, and then fire again on every subsequent attempt.

Change-Id: Ibccebdccf4f6758dc7c9f07d467eaeb74a619edd
---
M DonationInterface.php
M extras/custom_filters/filters/ip_velocity/ip_velocity.body.php
2 files changed, 34 insertions(+), 2 deletions(-)


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

diff --git a/DonationInterface.php b/DonationInterface.php
index 40426b7..d256e91 100644
--- a/DonationInterface.php
+++ b/DonationInterface.php
@@ -896,6 +896,7 @@
 $wgHooks['GatewayValidate'][] = array( 
'Gateway_Extras_CustomFilters::onValidate' );
 
 $wgHooks['GatewayInitialFilter'][] = array( 
'Gateway_Extras_CustomFilters_Functions::onFilter' );
+$wgHooks['GatewayInitialFilter'][] = array( 
'Gateway_Extras_CustomFilters_IP_Velocity::onInitialFilter' );
 
 $wgHooks['GatewayCustomFilter'][] = array( 
'Gateway_Extras_CustomFilters_Referrer::onFilter' );
 $wgHooks['GatewayCustomFilter'][] = array( 
'Gateway_Extras_CustomFilters_Source::onFilter' );
diff --git a/extras/custom_filters/filters/ip_velocity/ip_velocity.body.php 
b/extras/custom_filters/filters/ip_velocity/ip_velocity.body.php
index 9188ede..fc05da2 100644
--- a/extras/custom_filters/filters/ip_velocity/ip_velocity.body.php
+++ b/extras/custom_filters/filters/ip_velocity/ip_velocity.body.php
@@ -154,16 +154,47 @@
$new_velocity_records[] = $nowstamp;
return $new_velocity_records;
}
-   
 
+
+   /**
+* This is called when we're actually talking to the processor.
+* We don't call on the first attempt in this session, since
+* onInitialFilter already struck once.
+* @param GatewayType $gateway_adapter
+* @param Gateway_Extras_CustomFilters $custom_filter_object
+* @return bool
+*/
static function onFilter( $gateway_adapter, $custom_filter_object ) {
if ( !$gateway_adapter->getGlobal( 'EnableIPVelocityFilter' ) ){
+   return true;
+   }
+   if ( !$gateway_adapter->getRequest()->getSessionData( 
'numAttempt' ) ) {
+   // We're on the first attempt, already counted in 
onInitialFilter
return true;
}
$gateway_adapter->debugarray[] = 'IP Velocity onFilter hook!';
return self::singleton( $gateway_adapter, $custom_filter_object 
)->filter();
}
-   
+
+   /**
+* Run the filter if we haven't for this session, and set a flag
+* @param GatewayType $gateway_adapter
+* @param Gateway_Extras_CustomFilters $custom_filter_object
+* @return bool
+*/
+   static function onInitialFilter( $gateway_adapter, 
$custom_filter_object ) {
+   if ( !$gateway_adapter->getGlobal( 'EnableIPVelocityFilter' ) ){
+   return true;
+   }
+   if ( $gateway_adapter->getRequest()->getSessionData( 
'initialIPVelocity' ) ) {
+   return true;
+   }
+
+   $gateway_adapter->getRequest()->setSessionData( 
'initialIPVelocity', true );
+   $gateway_adapter->debugarray[] = 'IP Velocity onFilter hook!';
+   return self::singleton( $gateway_adapter, $custom_filter_object 
)->filter();
+   }
+
static function onPostProcess( GatewayType $gateway_adapter ) {
if ( !$gateway_adapter->getGlobal( 'EnableIPVelocityFilter' ) ){
return true;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibccebdccf4f6758dc7c9f07d467eaeb74a619edd
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] TraditionalImageGallery: Preload Titles being linked into Li... - change (mediawiki/core)

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

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

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(-)


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

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: newchange
Gerrit-Change-Id: Ie8b2508a52c1c1476f34f0b8e16184bed15310e1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
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] LinkCache: Don't try looking up NS_SPECIAL - change (mediawiki/core)

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

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

Change subject: LinkCache: Don't try looking up NS_SPECIAL
..

LinkCache: Don't try looking up NS_SPECIAL

Change-Id: I1afe8c780c3b12ae806ac19c4efb37c7033951ca
---
M includes/cache/LinkCache.php
1 file changed, 3 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/08/289808/1

diff --git a/includes/cache/LinkCache.php b/includes/cache/LinkCache.php
index de44f9b..3fd29f3 100644
--- a/includes/cache/LinkCache.php
+++ b/includes/cache/LinkCache.php
@@ -230,7 +230,9 @@
 */
public function addLinkObj( LinkTarget $nt ) {
$key = $this->titleFormatter->getPrefixedDBkey( $nt );
-   if ( $this->isBadLink( $key ) || $nt->isExternal() ) {
+   if ( $this->isBadLink( $key ) || $nt->isExternal()
+   || $nt->inNamespace( NS_SPECIAL )
+   ) {
return 0;
}
$id = $this->getGoodLinkID( $key );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1afe8c780c3b12ae806ac19c4efb37c7033951ca
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
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] Avoid invidual LinkCache lookups in Linker::makeBrokenImageL... - change (mediawiki/core)

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

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

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

Avoid invidual LinkCache lookups in Linker::makeBrokenImageLinkObj()

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


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/07/289807/1

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' ] );
}
 
/**

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I29ab072519937b770e75a40382d2f77cbabe098b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
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] Cleanup Special:PrefixIndex::showPrefixChunk() - change (mediawiki/core)

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

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

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(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/06/289806/1

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 

[MediaWiki-commits] [Gerrit] RT: loading mod_fastcgi wasnt puppetized - change (operations/puppet)

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

Change subject: RT: loading mod_fastcgi wasnt puppetized
..


RT: loading mod_fastcgi wasnt puppetized

On the old RT server, mod_fastcgi and mod_fcgid
are installed but only mod_fastcgi is enabled.

It wasn't puppetized so the new server did not get it.

Bug:T119112
Change-Id: I1823777b30c4e461985b560c58b0ae382358bbe2
---
M modules/requesttracker/manifests/apache.pp
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/modules/requesttracker/manifests/apache.pp 
b/modules/requesttracker/manifests/apache.pp
index 05e3fdd..13deba8 100644
--- a/modules/requesttracker/manifests/apache.pp
+++ b/modules/requesttracker/manifests/apache.pp
@@ -5,6 +5,7 @@
 include ::apache::mod::perl
 include ::apache::mod::rewrite
 include ::apache::mod::headers
+include ::apache::mod::fastcgi
 
 if os_version('debian >= jessie') {
 $rt_apache_conf = 'requesttracker/rt4.apache.httponly.erb'

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

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

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


[MediaWiki-commits] [Gerrit] Undo translations of message changes from 6ffabb26 - change (mediawiki/core)

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

Change subject: Undo translations of message changes from 6ffabb26
..


Undo translations of message changes from 6ffabb26

I reverted them all on translatewiki.net by hand, then imported here with
a quick script: https://phabricator.wikimedia.org/F4032850.
(Changes were then reviewed and some weird ones undone by hand.)

All the important work was on translatewiki.net, this commit could as well
be done by the localisation bot, but we want it now to deploy it.

Bug: T135773
Change-Id: Iaa6797939fa52619d1bbd8d7e0dad8409687d3cd
---
M languages/i18n/anp.json
M languages/i18n/ast.json
M languages/i18n/azb.json
M languages/i18n/be-tarask.json
M languages/i18n/be.json
M languages/i18n/bgn.json
M languages/i18n/bn.json
M languages/i18n/ca.json
M languages/i18n/cs.json
M languages/i18n/da.json
M languages/i18n/diq.json
M languages/i18n/el.json
M languages/i18n/eo.json
M languages/i18n/es.json
M languages/i18n/eu.json
M languages/i18n/fa.json
M languages/i18n/fi.json
M languages/i18n/fr.json
M languages/i18n/gl.json
M languages/i18n/he.json
M languages/i18n/ia.json
M languages/i18n/id.json
M languages/i18n/inh.json
M languages/i18n/it.json
M languages/i18n/ja.json
M languages/i18n/jut.json
M languages/i18n/jv.json
M languages/i18n/ko.json
M languages/i18n/ksh.json
M languages/i18n/ku-latn.json
M languages/i18n/lb.json
M languages/i18n/lt.json
M languages/i18n/mk.json
M languages/i18n/nds-nl.json
M languages/i18n/nds.json
M languages/i18n/olo.json
M languages/i18n/pl.json
M languages/i18n/pms.json
M languages/i18n/ps.json
M languages/i18n/pt-br.json
M languages/i18n/pt.json
M languages/i18n/ru.json
M languages/i18n/shn.json
M languages/i18n/sl.json
M languages/i18n/sr-ec.json
M languages/i18n/sr-el.json
M languages/i18n/sv.json
M languages/i18n/th.json
M languages/i18n/tr.json
M languages/i18n/tt-cyrl.json
M languages/i18n/vi.json
M languages/i18n/war.json
52 files changed, 174 insertions(+), 174 deletions(-)

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



diff --git a/languages/i18n/anp.json b/languages/i18n/anp.json
index 08523b5..3012c14 100644
--- a/languages/i18n/anp.json
+++ b/languages/i18n/anp.json
@@ -686,9 +686,9 @@
"whatlinkshere-prev": "{{PLURAL:$1|पिछला|पिछला सीनी $1}}",
"whatlinkshere-next": "{{PLURAL:$1|अगला|अगला $1}}",
"whatlinkshere-links": "← लिंक",
-   "whatlinkshere-hideredirs": "अनुप्रेषण क॑ छुपाबऽ",
-   "whatlinkshere-hidetrans": "ट्रान्सक्लूसन  छुपाबऽ",
-   "whatlinkshere-hidelinks": "लिंक छुपाबऽ ।",
+   "whatlinkshere-hideredirs": "$1 अनुप्रेषितें",
+   "whatlinkshere-hidetrans": "$1 ट्रान्स्क्ल्युजन्स",
+   "whatlinkshere-hidelinks": "$1 लिंक",
"whatlinkshere-filters": "फिल्टर्स",
"blockip": "अवरोधित करॊ",
"ipboptions": "२ घंटा:2 hours,१ दिन:1 day,३ दिन:3 days,१ हफ्ता:1 week,२ 
हफ्ता:2 weeks,१ महिना:1 month,३ महिना:3 months,६ महिना:6 months,१ साल:1 
year,अनंत:infinite",
diff --git a/languages/i18n/ast.json b/languages/i18n/ast.json
index a8ab056..0a6fab4 100644
--- a/languages/i18n/ast.json
+++ b/languages/i18n/ast.json
@@ -2153,10 +2153,10 @@
"whatlinkshere-prev": "{{PLURAL:$1|anterior|anteriores $1}}",
"whatlinkshere-next": "{{PLURAL:$1|siguiente|siguientes $1}}",
"whatlinkshere-links": "← enllaces",
-   "whatlinkshere-hideredirs": "Anubrir redireiciones",
-   "whatlinkshere-hidetrans": "Anubrir tresclusiones",
-   "whatlinkshere-hidelinks": "Tapecer enllaces",
-   "whatlinkshere-hideimages": "Anubrir los enllaces al ficheru",
+   "whatlinkshere-hideredirs": "$1 redireiciones",
+   "whatlinkshere-hidetrans": "$1 tresclusiones",
+   "whatlinkshere-hidelinks": "$1 enllaces",
+   "whatlinkshere-hideimages": "$1 los enllaces al ficheru",
"whatlinkshere-filters": "Peñeres",
"whatlinkshere-submit": "Dir",
"autoblockid": "Autobloquiar #$1",
diff --git a/languages/i18n/azb.json b/languages/i18n/azb.json
index 40e47b4..4ce3c93 100644
--- a/languages/i18n/azb.json
+++ b/languages/i18n/azb.json
@@ -1932,7 +1932,7 @@
"whatlinkshere-prev": "{{PLURAL:$1|قاباقکی|قاباقکی $1}}",
"whatlinkshere-next": "{{PLURAL:$1|سونراکی|سونراکی $1}}",
"whatlinkshere-links": "← باغلانتیلار",
-   "whatlinkshere-hideredirs": "یول‌لاندیرمالاری گیزلت",
+   "whatlinkshere-hideredirs": "یول‌لاندیرمالاری $1",
"whatlinkshere-hidetrans": "علاوه‌لری $1",
"whatlinkshere-hidelinks": "باغلانتیلاری $1",
"whatlinkshere-hideimages": "فایل باغلانتیلارینی $1",
diff --git a/languages/i18n/be-tarask.json b/languages/i18n/be-tarask.json
index e9a054c..b53b8cb 100644
--- a/languages/i18n/be-tarask.json
+++ b/languages/i18n/be-tarask.json
@@ -2153,10 +2153,10 @@
"whatlinkshere-prev": 

[MediaWiki-commits] [Gerrit] Persist risk score array in session - change (mediawiki...DonationInterface)

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

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

Change subject: Persist risk score array in session
..

Persist risk score array in session

Allows combining scores from different custom filters that fire
on different requests.  For each custom filter, the latest score
is the one that contributes to the total.

Change-Id: Ie628b22d37dc602edf199c0750b4ce4f606899d3
---
M extras/custom_filters/custom_filters.body.php
M gateway_common/gateway.adapter.php
2 files changed, 6 insertions(+), 0 deletions(-)


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

diff --git a/extras/custom_filters/custom_filters.body.php 
b/extras/custom_filters/custom_filters.body.php
index c584d61..e8ff1a1 100644
--- a/extras/custom_filters/custom_filters.body.php
+++ b/extras/custom_filters/custom_filters.body.php
@@ -31,6 +31,10 @@
parent::__construct( $gateway_adapter ); //gateway_adapter is 
set in there. 
// load user action ranges and risk score   
$this->action_ranges = $this->gateway_adapter->getGlobal( 
'CustomFiltersActionRanges' );
+   $this->risk_score = 
$this->gateway_adapter->getRequest()->getSessionData( 'risk_scores' );
+   if ( !$this->risk_score ) {
+   $this->risk_score = array();
+   }
$this->risk_score['initial'] = 
$this->gateway_adapter->getGlobal( 'CustomFiltersRiskScore' );
}
 
@@ -71,6 +75,7 @@
$log_message = "\"$source added a score of $score\"";
$this->fraud_logger->info( '"addRiskScore" ' . $log_message );
$this->risk_score[$source] = $score;
+   $this->gateway_adapter->getRequest()->setSessionData( 
'risk_scores', $this->risk_score );
}

 
diff --git a/gateway_common/gateway.adapter.php 
b/gateway_common/gateway.adapter.php
index 9c431de..744ad04 100644
--- a/gateway_common/gateway.adapter.php
+++ b/gateway_common/gateway.adapter.php
@@ -2904,6 +2904,7 @@
'numAttempt',
'order_status', //for post-payment activities
'sequence',
+   'risk_score',
);
$preservedData = array();
$msg = '';

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie628b22d37dc602edf199c0750b4ce4f606899d3
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] Don't show tab preference dialog again if it's already been ... - change (mediawiki...VisualEditor)

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

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

Change subject: Don't show tab preference dialog again if it's already been 
shown
..

Don't show tab preference dialog again if it's already been shown

Bug: T135534
Change-Id: Ifecac607a0e18e61b07e8456566d4671aa1b
---
M modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.init.js
M modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js
2 files changed, 2 insertions(+), 0 deletions(-)


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

diff --git a/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.init.js 
b/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.init.js
index f339c6b..53cae13 100644
--- a/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.init.js
+++ b/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.init.js
@@ -823,6 +823,7 @@
 
// Duplicate of this code in 
ve.init.mw.DesktopArticleTarget.js
if ( $( '#ca-edit' ).hasClass( 
'visualeditor-showtabdialog' ) ) {
+   $( '#ca-edit' 
).removeClass( 'visualeditor-showtabdialog' );
// Set up a temporary 
window manager
windowManager = new 
OO.ui.WindowManager();
$( 'body' ).append( 
windowManager.$element );
diff --git a/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js 
b/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js
index 1debd0b..5a4e023 100644
--- a/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js
+++ b/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js
@@ -266,6 +266,7 @@
 
// Duplicate of this code in ve.init.mw.DesktopArticleTarget.init.js
if ( $( '#ca-edit' ).hasClass( 'visualeditor-showtabdialog' ) ) {
+   $( '#ca-edit' ).removeClass( 'visualeditor-showtabdialog' );
// Set up a temporary window manager
windowManager = new OO.ui.WindowManager();
$( 'body' ).append( windowManager.$element );

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

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

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


[MediaWiki-commits] [Gerrit] RT: do not ensure=>latest, install perldoc - change (operations/puppet)

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

Change subject: RT: do not ensure=>latest,install perldoc
..


RT: do not ensure=>latest,install perldoc

The comments claimed it was changed to "present"
to avoid surprise upgrades, but the code said otherwise.

Actually change it to 'present'.

Also, add perl-doc package which it told me i needed
when i looked at docs on the new server.

Bug:T119112
Change-Id: I8539519ee76cd69cab3556620f4abf3bcbca
---
M modules/requesttracker/manifests/packages.pp
1 file changed, 10 insertions(+), 6 deletions(-)

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



diff --git a/modules/requesttracker/manifests/packages.pp 
b/modules/requesttracker/manifests/packages.pp
index 9b07c7d..2f10ae7 100644
--- a/modules/requesttracker/manifests/packages.pp
+++ b/modules/requesttracker/manifests/packages.pp
@@ -1,23 +1,27 @@
 # installs required packages for Request Tracker
-# changed from 'latest' to 'present' to avoid
-# surprise upgrades
+# changed from 'latest' to 'present' to avoid surprise upgrades
 
 class requesttracker::packages {
 
 package { 'request-tracker4':
-ensure => 'latest',
+ensure => 'present',
 }
 
 package { 'rt4-db-mysql':
-ensure => 'latest',
+ensure => 'present',
 }
 
 package { 'rt4-clients':
-ensure => 'latest',
+ensure => 'present',
 }
 
 package { 'libdbd-pg-perl':
-ensure => 'latest',
+ensure => 'present',
 }
+
+package { 'perl-doc':
+ensure => 'present',
+}
+
 }
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8539519ee76cd69cab3556620f4abf3bcbca
Gerrit-PatchSet: 4
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] DONOTMERGE: tests - change (mediawiki...Popups)

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

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

Change subject: DONOTMERGE: tests
..

DONOTMERGE: tests

Change-Id: I8eea0c6f43eb14db1201c4d1149e08e4ebde67b8
---
M resources/ext.popups.targets/mobileTarget.js
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/resources/ext.popups.targets/mobileTarget.js 
b/resources/ext.popups.targets/mobileTarget.js
index a7fadb4..3e276a6 100644
--- a/resources/ext.popups.targets/mobileTarget.js
+++ b/resources/ext.popups.targets/mobileTarget.js
@@ -5,7 +5,7 @@
/**
 * Triggers when a popup should be rendered.
 */
-   mw.popups.triggers = 'click';
+   mw.popups.triggers = 'click foo';
 
mw.hook( 'wikipage.content' ).add( function ( $content ) {
mw.popups.$content = $content;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8eea0c6f43eb14db1201c4d1149e08e4ebde67b8
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] Update install instructions - change (mediawiki...mathoid)

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

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

Change subject: Update install instructions
..

Update install instructions

* librsvg needs special attention

Change-Id: I743adebd4f04677cc884ed80136a81b966781310
---
M README.md
1 file changed, 5 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/mathoid 
refs/changes/99/289799/1

diff --git a/README.md b/README.md
index 1740ddd..09fb4ec 100644
--- a/README.md
+++ b/README.md
@@ -11,6 +11,11 @@
 
 ## Installation
 Install node 4.2.3, iojs-v2.5.0 or a compatible node version and npm version 
2.14.7 or similar.
+In addition the prerequisites from 
[librsvg](https://www.npmjs.com/package/librsvg#installation) are needed.
+For Debian based systems installing the `librsvg2-dev` should be sufficient.
+```bash
+sudo apt-get install librsvg2-dev
+```
 Thereafter, install mathoid by running
 ```bash
 npm install mathoid

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I743adebd4f04677cc884ed80136a81b966781310
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/mathoid
Gerrit-Branch: master
Gerrit-Owner: Physikerwelt 

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


[MediaWiki-commits] [Gerrit] Reset title related services for asserting prefixed special ... - change (mediawiki...Wikibase)

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

Change subject: Reset title related services for asserting prefixed special 
page names
..


Reset title related services for asserting prefixed special page names

In order to makes the tests pass on non-English wikis.

Change-Id: Iaa7387815108d0c3b70ad52e4f0b397197ed30bf
---
M repo/tests/phpunit/includes/Specials/SpecialListDatatypesTest.php
M repo/tests/phpunit/includes/View/RepoSpecialPageLinkerTest.php
2 files changed, 33 insertions(+), 0 deletions(-)

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



diff --git a/repo/tests/phpunit/includes/Specials/SpecialListDatatypesTest.php 
b/repo/tests/phpunit/includes/Specials/SpecialListDatatypesTest.php
index 911eb6e..8a428b7 100644
--- a/repo/tests/phpunit/includes/Specials/SpecialListDatatypesTest.php
+++ b/repo/tests/phpunit/includes/Specials/SpecialListDatatypesTest.php
@@ -3,6 +3,7 @@
 namespace Wikibase\Repo\Tests\Specials;
 
 use Language;
+use MediaWiki\MediaWikiServices;
 use SpecialPageTestBase;
 use Wikibase\Repo\Specials\SpecialListDatatypes;
 
@@ -26,6 +27,19 @@
$this->setMwGlobals( array(
'wgContLang' => Language::factory( 'qqx' )
) );
+   $services = MediaWikiServices::getInstance();
+   $services->resetServiceForTesting( 'TitleFormatter' );
+   $services->resetServiceForTesting( 'TitleParser' );
+   $services->resetServiceForTesting( '_MediaWikiTitleCodec' );
+   }
+
+   protected function tearDown() {
+   parent::tearDown();
+
+   $services = MediaWikiServices::getInstance();
+   $services->resetServiceForTesting( 'TitleFormatter' );
+   $services->resetServiceForTesting( 'TitleParser' );
+   $services->resetServiceForTesting( '_MediaWikiTitleCodec' );
}
 
protected function newSpecialPage() {
diff --git a/repo/tests/phpunit/includes/View/RepoSpecialPageLinkerTest.php 
b/repo/tests/phpunit/includes/View/RepoSpecialPageLinkerTest.php
index 18002e3..b4ecd8c 100644
--- a/repo/tests/phpunit/includes/View/RepoSpecialPageLinkerTest.php
+++ b/repo/tests/phpunit/includes/View/RepoSpecialPageLinkerTest.php
@@ -3,6 +3,7 @@
 namespace Wikibase\Test;
 
 use MediaWikiLangTestCase;
+use MediaWiki\MediaWikiServices;
 use Wikibase\Repo\View\RepoSpecialPageLinker;
 
 /**
@@ -15,6 +16,24 @@
  */
 class RepoSpecialPageLinkerTest extends MediaWikiLangTestCase {
 
+   protected function setUp() {
+   parent::setUp();
+
+   $services = MediaWikiServices::getInstance();
+   $services->resetServiceForTesting( 'TitleFormatter' );
+   $services->resetServiceForTesting( 'TitleParser' );
+   $services->resetServiceForTesting( '_MediaWikiTitleCodec' );
+   }
+
+   protected function tearDown() {
+   parent::tearDown();
+
+   $services = MediaWikiServices::getInstance();
+   $services->resetServiceForTesting( 'TitleFormatter' );
+   $services->resetServiceForTesting( 'TitleParser' );
+   $services->resetServiceForTesting( '_MediaWikiTitleCodec' );
+   }
+
/**
 * @dataProvider getLinkProvider
 *

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iaa7387815108d0c3b70ad52e4f0b397197ed30bf
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Hoo man 
Gerrit-Reviewer: Addshore 
Gerrit-Reviewer: Aude 
Gerrit-Reviewer: Daniel Kinzler 
Gerrit-Reviewer: Hoo man 
Gerrit-Reviewer: JanZerebecki 
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 request data for missing groups - change (mediawiki...Kartographer)

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

Change subject: Don't request data for missing groups
..


Don't request data for missing groups

Change-Id: Ida263365bcefc105bfa7f137fa096ab15ff9af0b
---
M includes/Tag/TagHandler.php
1 file changed, 15 insertions(+), 3 deletions(-)

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



diff --git a/includes/Tag/TagHandler.php b/includes/Tag/TagHandler.php
index 900511b..1b89c6c 100644
--- a/includes/Tag/TagHandler.php
+++ b/includes/Tag/TagHandler.php
@@ -256,6 +256,10 @@
 
 
protected function saveData( ParserOutput $output ) {
+   $requestedGroups = $output->getExtensionData( 
'kartographer_requested' ) ?: [];
+   $requestedGroups = array_merge( $requestedGroups, 
$this->showGroups );
+   $output->setExtensionData( 'kartographer_requested', 
$requestedGroups );
+
if ( !$this->geometries ) {
return;
}
@@ -309,10 +313,18 @@
$output->addTrackingCategory( 
'kartographer-tracking-category', $parser->getTitle() );
}
 
-   $interact = $output->getExtensionData( 'kartographer_interact' 
);
-   if ( $interact ) {
-   $interact = array_flip( array_unique( $interact ) );
+   $interact = $output->getExtensionData( 'kartographer_interact' 
) ?: [];
+   $requested = $output->getExtensionData( 
'kartographer_requested' ) ?: [];
+   if ( $interact || $requested ) {
+   $interact = array_flip( $interact );
$liveData = array_intersect_key( (array)$data, 
$interact );
+   $requested = array_unique( $requested );
+   // Prevent pointless API requests for missing groups
+   foreach ( $requested as $group ) {
+   if ( !isset( $data->$group ) ) {
+   $liveData[$group] = [];
+   }
+   }
$output->addJsConfigVars( 'wgKartographerLiveData', 
$liveData );
}
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ida263365bcefc105bfa7f137fa096ab15ff9af0b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Kartographer
Gerrit-Branch: master
Gerrit-Owner: MaxSem 
Gerrit-Reviewer: Yurik 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Move role::oauthauthentication OAuth config to hiera - change (mediawiki/vagrant)

2016-05-19 Thread Code Review
Gergő Tisza has uploaded a new change for review.

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

Change subject: Move role::oauthauthentication OAuth config to hiera
..

Move role::oauthauthentication OAuth config to hiera

Change-Id: Iace02f3d81700ca962a05922ac48b7bae6a97ac3
---
M puppet/hieradata/common.yaml
M puppet/modules/role/manifests/oauthauthentication.pp
2 files changed, 12 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant 
refs/changes/97/289797/1

diff --git a/puppet/hieradata/common.yaml b/puppet/hieradata/common.yaml
index de12187..93bd14a 100644
--- a/puppet/hieradata/common.yaml
+++ b/puppet/hieradata/common.yaml
@@ -337,6 +337,10 @@
 # result of 
MediaWiki\Extensions\OAuth\MWOAuthUtils::hmacDBSecret(role::oauth::example_secret_key);
 role::oauth::example_consumer_secret: b7cd84d1c419c8e62c1cd106afc4bc959fcf48c8
 
+role::oauthauthentication::consumer_key: 0fde3e1e451907e9653ea612f7b30a5a
+role::oauthauthentication::consumer_secret: 
143a7e53fe1e0fe7f42a2aed77b8e6fc9f38112a
+role::oauthauthentication::callback_url: 
"http://dev.wiki.local.wmftest.net%{::port_fragment}/wiki/Special:OAuthLogin/finish;
+
 role::sentry::dsn: "%{hiera('sentry::dsn_file')}"
 
 role::wikimetrics::dir: "%{hiera('mwv::services_dir')}/wikimetrics"
diff --git a/puppet/modules/role/manifests/oauthauthentication.pp 
b/puppet/modules/role/manifests/oauthauthentication.pp
index ac7f561..697e877 100644
--- a/puppet/modules/role/manifests/oauthauthentication.pp
+++ b/puppet/modules/role/manifests/oauthauthentication.pp
@@ -4,17 +4,21 @@
 #
 # [1] https://www.mediawiki.org/wiki/Extension:OAuthAuthentication
 #
-class role::oauthauthentication {
+class role::oauthauthentication (
+$consumer_key,
+$consumer_secret,
+$callback_url,
+) {
 mediawiki::extension { 'OAuthAuthentication':
 needs_update => true,
 composer => true,
 settings => {
 wgOAuthAuthenticationUrl=> 
'https://meta.wikimedia.org/w/index.php?title=Special:OAuth',
-wgOAuthAuthenticationConsumerKey=> 
'0fde3e1e451907e9653ea612f7b30a5a',
-wgOAuthAuthenticationConsumerSecret => 
'143a7e53fe1e0fe7f42a2aed77b8e6fc9f38112a',
+wgOAuthAuthenticationConsumerKey=> $consumer_key,
+wgOAuthAuthenticationConsumerSecret => $consumer_secret,
 wgOAuthAuthenticationCanonicalUrl   => 
'https://meta.wikimedia.org',
 wgOAuthAuthenticationRemoteName => 'Wikimedia',
-wgOAuthAuthenticationCallbackUrl=> 
"http://dev.wiki.local.wmftest.net${::port_fragment}/wiki/Special:OAuthLogin/finish;,
+wgOAuthAuthenticationCallbackUrl=> $callback_url,
 }
 }
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iace02f3d81700ca962a05922ac48b7bae6a97ac3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: master
Gerrit-Owner: Gergő Tisza 

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


[MediaWiki-commits] [Gerrit] RT: do not ensure=>latest, install perldoc - change (operations/puppet)

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

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

Change subject: RT: do not ensure=>latest,install perldoc
..

RT: do not ensure=>latest,install perldoc

Change-Id: I8539519ee76cd69cab3556620f4abf3bcbca
---
M modules/requesttracker/manifests/packages.pp
1 file changed, 10 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/96/289796/1

diff --git a/modules/requesttracker/manifests/packages.pp 
b/modules/requesttracker/manifests/packages.pp
index 9b07c7d..f329802 100644
--- a/modules/requesttracker/manifests/packages.pp
+++ b/modules/requesttracker/manifests/packages.pp
@@ -1,23 +1,28 @@
 # installs required packages for Request Tracker
-# changed from 'latest' to 'present' to avoid
+# changed from 'present' to 'present' to avoid
 # surprise upgrades
 
 class requesttracker::packages {
 
 package { 'request-tracker4':
-ensure => 'latest',
+ensure => 'present',
 }
 
 package { 'rt4-db-mysql':
-ensure => 'latest',
+ensure => 'present',
 }
 
 package { 'rt4-clients':
-ensure => 'latest',
+ensure => 'present',
 }
 
 package { 'libdbd-pg-perl':
-ensure => 'latest',
+ensure => 'present',
 }
+
+package { 'perldoc':
+ensure => 'present',
+}
+
 }
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8539519ee76cd69cab3556620f4abf3bcbca
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] RT: loading mod_fcgi wasnt puppetized - change (operations/puppet)

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

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

Change subject: RT: loading mod_fcgi wasnt puppetized
..

RT: loading mod_fcgi wasnt puppetized

Change-Id: I1823777b30c4e461985b560c58b0ae382358bbe2
---
M modules/requesttracker/manifests/apache.pp
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/95/289795/1

diff --git a/modules/requesttracker/manifests/apache.pp 
b/modules/requesttracker/manifests/apache.pp
index 05e3fdd..d02fcff 100644
--- a/modules/requesttracker/manifests/apache.pp
+++ b/modules/requesttracker/manifests/apache.pp
@@ -5,6 +5,7 @@
 include ::apache::mod::perl
 include ::apache::mod::rewrite
 include ::apache::mod::headers
+include ::apache::mod::fcgi
 
 if os_version('debian >= jessie') {
 $rt_apache_conf = 'requesttracker/rt4.apache.httponly.erb'

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1823777b30c4e461985b560c58b0ae382358bbe2
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] Vagrant role for OAuthAuthentication - change (mediawiki/vagrant)

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

Change subject: Vagrant role for OAuthAuthentication
..


Vagrant role for OAuthAuthentication

For convenience, this relies on a common consumer registration
for all instances, thus making the consumer secret public:
https://meta.wikimedia.org/wiki/Special:OAuthListConsumers/view/7e5461e6907ad6ed43684793046fd3a9

This is somewhat unsafe, so user identities provided by the
extension should not be trusted. Using it for development is
fine though.

Depends on Ic1d3d9ad20da5b5aeb9d49ff0844d4b7070ce596.

Change-Id: I88a55acdfb8e03ada6dfe27aad7f6ea5282a9e05
---
A 
puppet/modules/role/files/oauthauthentication/VagrantRoleOAuthAuthentication.wiki
A puppet/modules/role/manifests/oauthauthentication.pp
2 files changed, 36 insertions(+), 0 deletions(-)

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



diff --git 
a/puppet/modules/role/files/oauthauthentication/VagrantRoleOAuthAuthentication.wiki
 
b/puppet/modules/role/files/oauthauthentication/VagrantRoleOAuthAuthentication.wiki
new file mode 100644
index 000..fe228a2
--- /dev/null
+++ 
b/puppet/modules/role/files/oauthauthentication/VagrantRoleOAuthAuthentication.wiki
@@ -0,0 +1,11 @@
+Use Wikimedia identities to log in. This uses a predefined consumer
+([https://meta.wikimedia.org/wiki/Special:OAuthListConsumers/view/7e5461e6907ad6ed43684793046fd3a9
 7e5461e6907ad6ed43684793046fd3a9])
+and the secret key of that consumer is part of the MediaWiki-Vagrant
+code and thus public, which makes it somewhat insecure. It should
+be good enough for development, though (the consumer does not have
+permissions to do anything, and the only information it can leak 
+is the fact that you have authorized it).
+
+The Vagrant box must be available at the IP address 127.0.0.1 for the
+role to work (the port number can be arbitrary).
+
diff --git a/puppet/modules/role/manifests/oauthauthentication.pp 
b/puppet/modules/role/manifests/oauthauthentication.pp
new file mode 100644
index 000..ac7f561
--- /dev/null
+++ b/puppet/modules/role/manifests/oauthauthentication.pp
@@ -0,0 +1,25 @@
+# == Class: role::oauthauthentication
+# Provisions the OAuthAuthentication[1] extension, which allows login
+# via OAuth, using accounts at a remote wiki.
+#
+# [1] https://www.mediawiki.org/wiki/Extension:OAuthAuthentication
+#
+class role::oauthauthentication {
+mediawiki::extension { 'OAuthAuthentication':
+needs_update => true,
+composer => true,
+settings => {
+wgOAuthAuthenticationUrl=> 
'https://meta.wikimedia.org/w/index.php?title=Special:OAuth',
+wgOAuthAuthenticationConsumerKey=> 
'0fde3e1e451907e9653ea612f7b30a5a',
+wgOAuthAuthenticationConsumerSecret => 
'143a7e53fe1e0fe7f42a2aed77b8e6fc9f38112a',
+wgOAuthAuthenticationCanonicalUrl   => 
'https://meta.wikimedia.org',
+wgOAuthAuthenticationRemoteName => 'Wikimedia',
+wgOAuthAuthenticationCallbackUrl=> 
"http://dev.wiki.local.wmftest.net${::port_fragment}/wiki/Special:OAuthLogin/finish;,
+}
+}
+
+mediawiki::import::text { 'VagrantRoleOAuthAuthentication':
+source => 
'puppet:///modules/role/oauthauthentication/VagrantRoleOAuthAuthentication.wiki',
+}
+}
+

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

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

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


[MediaWiki-commits] [Gerrit] Drop already-enabled VisualEditorNewAccountEnableProportion ... - change (operations/mediawiki-config)

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

Change subject: Drop already-enabled VisualEditorNewAccountEnableProportion 
wikis
..


Drop already-enabled VisualEditorNewAccountEnableProportion wikis

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

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



diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 27fc5f4..9ed6c1b 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -13580,9 +13580,6 @@
 // 1 => 100% of new accounts; 2 => 50%; 10 => 10%; 20 => 5%; etc.
 'wmgVisualEditorNewAccountEnableProportion' => [
'default' => false,
-   'dewiki' => 1,
-   'enwiki' => 1,
-   'eswiki' => 1,
 ],
 
 // Whether VisualEditor should be enabled for a proportion of non accounts 
(IPs).

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibe5c68f73c755a24578caf00a353d1091ac6c243
Gerrit-PatchSet: 3
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Jforrester 
Gerrit-Reviewer: Dereckson 
Gerrit-Reviewer: Florianschmidtwelzow 
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] Follow-up 6dbf876: Move VisualEditor to secondary status on ... - change (operations/mediawiki-config)

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

Change subject: Follow-up 6dbf876: Move VisualEditor to secondary status on 
English Wikipedia
..


Follow-up 6dbf876: Move VisualEditor to secondary status on English Wikipedia

Bug: T132806
Change-Id: Icb0e9c6167e01558383efbc78b93c39c506a55a9
---
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 e4449f9..27fc5f4 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -13435,6 +13435,7 @@
 // Whether the wikitext editor should be the default (first-open) editor on 
SET wikis
 'wmgVisualEditorSingleEditTabSecondaryEditor' => [
'default' => false,
+   'enwiki' => true, // T132806
 ],
 
 // Whether VisualEditor's second tab and section link come after those for 
wikitext (on non-SET wikis)

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Icb0e9c6167e01558383efbc78b93c39c506a55a9
Gerrit-PatchSet: 3
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Jforrester 
Gerrit-Reviewer: Dereckson 
Gerrit-Reviewer: Florianschmidtwelzow 
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] Reset title related services for asserting prefixed special ... - change (mediawiki...Wikibase)

2016-05-19 Thread Hoo man (Code Review)
Hoo man has uploaded a new change for review.

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

Change subject: Reset title related services for asserting prefixed special 
page names
..

Reset title related services for asserting prefixed special page names

In order to makes the tests pass on non-English wikis.

Change-Id: Iaa7387815108d0c3b70ad52e4f0b397197ed30bf
---
M repo/tests/phpunit/includes/Specials/SpecialListDatatypesTest.php
M repo/tests/phpunit/includes/View/RepoSpecialPageLinkerTest.php
2 files changed, 33 insertions(+), 0 deletions(-)


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

diff --git a/repo/tests/phpunit/includes/Specials/SpecialListDatatypesTest.php 
b/repo/tests/phpunit/includes/Specials/SpecialListDatatypesTest.php
index 911eb6e..8a428b7 100644
--- a/repo/tests/phpunit/includes/Specials/SpecialListDatatypesTest.php
+++ b/repo/tests/phpunit/includes/Specials/SpecialListDatatypesTest.php
@@ -3,6 +3,7 @@
 namespace Wikibase\Repo\Tests\Specials;
 
 use Language;
+use MediaWiki\MediaWikiServices;
 use SpecialPageTestBase;
 use Wikibase\Repo\Specials\SpecialListDatatypes;
 
@@ -26,6 +27,19 @@
$this->setMwGlobals( array(
'wgContLang' => Language::factory( 'qqx' )
) );
+   $services = MediaWikiServices::getInstance();
+   $services->resetServiceForTesting( 'TitleFormatter' );
+   $services->resetServiceForTesting( 'TitleParser' );
+   $services->resetServiceForTesting( '_MediaWikiTitleCodec' );
+   }
+
+   protected function tearDown() {
+   parent::tearDown();
+
+   $services = MediaWikiServices::getInstance();
+   $services->resetServiceForTesting( 'TitleFormatter' );
+   $services->resetServiceForTesting( 'TitleParser' );
+   $services->resetServiceForTesting( '_MediaWikiTitleCodec' );
}
 
protected function newSpecialPage() {
diff --git a/repo/tests/phpunit/includes/View/RepoSpecialPageLinkerTest.php 
b/repo/tests/phpunit/includes/View/RepoSpecialPageLinkerTest.php
index 18002e3..b4ecd8c 100644
--- a/repo/tests/phpunit/includes/View/RepoSpecialPageLinkerTest.php
+++ b/repo/tests/phpunit/includes/View/RepoSpecialPageLinkerTest.php
@@ -3,6 +3,7 @@
 namespace Wikibase\Test;
 
 use MediaWikiLangTestCase;
+use MediaWiki\MediaWikiServices;
 use Wikibase\Repo\View\RepoSpecialPageLinker;
 
 /**
@@ -15,6 +16,24 @@
  */
 class RepoSpecialPageLinkerTest extends MediaWikiLangTestCase {
 
+   protected function setUp() {
+   parent::setUp();
+
+   $services = MediaWikiServices::getInstance();
+   $services->resetServiceForTesting( 'TitleFormatter' );
+   $services->resetServiceForTesting( 'TitleParser' );
+   $services->resetServiceForTesting( '_MediaWikiTitleCodec' );
+   }
+
+   protected function tearDown() {
+   parent::tearDown();
+
+   $services = MediaWikiServices::getInstance();
+   $services->resetServiceForTesting( 'TitleFormatter' );
+   $services->resetServiceForTesting( 'TitleParser' );
+   $services->resetServiceForTesting( '_MediaWikiTitleCodec' );
+   }
+
/**
 * @dataProvider getLinkProvider
 *

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

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

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


[MediaWiki-commits] [Gerrit] Add Feed Activity, Fragment, & card aggregator UI - change (apps...wikipedia)

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

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

Change subject: Add Feed Activity, Fragment, & card aggregator UI
..

Add Feed Activity, Fragment, & card aggregator UI

• Add FeedActivity and wire it to the nav drawer. An Activity is used
  to help enforce separation of concerns. It's sparse and may be removed
  for a pure View or Fragment implementation at any time.

• Add bare bones FeedFragment with a FeedView and a button to add
  dummy cards.

• Add supporting components (a couple placeholders and
  AutoFitRecyclerView).

Bug: T129078
Change-Id: Icd6f10097d6b32f40f27b1409ead4ec803acb7ea
---
M app/src/main/AndroidManifest.xml
A app/src/main/java/org/wikipedia/feed/FeedActivity.java
A app/src/main/java/org/wikipedia/feed/FeedFragment.java
A app/src/main/java/org/wikipedia/feed/model/FeedCard.java
A app/src/main/java/org/wikipedia/feed/view/FeedCardView.java
A app/src/main/java/org/wikipedia/feed/view/FeedView.java
M app/src/main/java/org/wikipedia/page/NavDrawerHelper.java
A app/src/main/java/org/wikipedia/views/AutoFitRecyclerView.java
A app/src/main/java/org/wikipedia/views/DefaultViewHolder.java
A app/src/main/res/layout/fragment_feed.xml
A app/src/main/res/layout/view_feed.xml
A app/src/main/res/layout/view_feed_card.xml
M app/src/main/res/values/attrs.xml
M app/src/main/res/values/dimens.xml
M app/src/main/res/values/strings_no_translate.xml
15 files changed, 432 insertions(+), 5 deletions(-)


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

diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 2d34780..61a5cd3 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -54,6 +54,12 @@
 
 
+
+
  {
+public static Intent newIntent(Context context) {
+return new Intent(context, FeedActivity.class);
+}
+
+@Override protected FeedFragment createFragment() {
+return FeedFragment.newInstance();
+}
+}
\ No newline at end of file
diff --git a/app/src/main/java/org/wikipedia/feed/FeedFragment.java 
b/app/src/main/java/org/wikipedia/feed/FeedFragment.java
new file mode 100644
index 000..8774b5f
--- /dev/null
+++ b/app/src/main/java/org/wikipedia/feed/FeedFragment.java
@@ -0,0 +1,62 @@
+package org.wikipedia.feed;
+
+import android.os.Bundle;
+import android.support.annotation.NonNull;
+import android.support.annotation.Nullable;
+import android.support.v4.app.Fragment;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+
+import org.wikipedia.R;
+import org.wikipedia.activity.CallbackFragment;
+import org.wikipedia.activity.FragmentUtil;
+import org.wikipedia.feed.model.FeedCard;
+import org.wikipedia.feed.view.FeedView;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import butterknife.BindView;
+import butterknife.ButterKnife;
+import butterknife.OnClick;
+import butterknife.Unbinder;
+
+public class FeedFragment extends Fragment
+implements CallbackFragment {
+@BindView(R.id.fragment_feed_feed) FeedView feedView;
+private Unbinder unbinder;
+
+@NonNull private final List cards = new ArrayList<>();
+
+public static FeedFragment newInstance() {
+return new FeedFragment();
+}
+
+@Nullable @Override public View onCreateView(LayoutInflater inflater,
+ @Nullable ViewGroup container,
+ @Nullable Bundle 
savedInstanceState) {
+super.onCreateView(inflater, container, savedInstanceState);
+
+View view = inflater.inflate(R.layout.fragment_feed, container, false);
+
+unbinder = ButterKnife.bind(this, view);
+feedView.cards(cards);
+
+return view;
+}
+
+@Override public void onDestroyView() {
+unbinder.unbind();
+super.onDestroyView();
+}
+
+@Override @Nullable public Callback getCallback() {
+return FragmentUtil.getCallback(this, Callback.class);
+}
+
+@OnClick(R.id.fragment_feed_add_card) void addCard() {
+cards.add(new FeedCard());
+feedView.update();
+}
+}
\ No newline at end of file
diff --git a/app/src/main/java/org/wikipedia/feed/model/FeedCard.java 
b/app/src/main/java/org/wikipedia/feed/model/FeedCard.java
new file mode 100644
index 000..a9dccd8
--- /dev/null
+++ b/app/src/main/java/org/wikipedia/feed/model/FeedCard.java
@@ -0,0 +1,5 @@
+package org.wikipedia.feed.model;
+
+public class FeedCard {
+// TODO: [Feed] fill in model data.
+}
\ No newline at end of file
diff --git a/app/src/main/java/org/wikipedia/feed/view/FeedCardView.java 
b/app/src/main/java/org/wikipedia/feed/view/FeedCardView.java
new file mode 100644
index 000..60f072c
--- /dev/null
+++ b/app/src/main/java/org/wikipedia/feed/view/FeedCardView.java
@@ -0,0 +1,79 

[MediaWiki-commits] [Gerrit] Add Feed nav drawer entry and dev setting - change (apps...wikipedia)

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

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

Change subject: Add Feed nav drawer entry and dev setting
..

Add Feed nav drawer entry and dev setting

Add Feed navigation drawer entry, a developer toggle (defaults true for
dev flavor), and TODOs for missing tie ins. Text and icon are not final.

Bug: T129078
Change-Id: Ib30623d9b6980ffa07b0ce4051e552201dfd859a
---
M app/src/main/java/org/wikipedia/page/NavDrawerHelper.java
M app/src/main/java/org/wikipedia/settings/Prefs.java
M app/src/main/res/menu/menu_nav_drawer.xml
M app/src/main/res/values/preference_keys.xml
M app/src/main/res/values/strings.xml
M app/src/main/res/values/strings_no_translate.xml
M app/src/main/res/xml/developer_preferences.xml
7 files changed, 35 insertions(+), 1 deletion(-)


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

diff --git a/app/src/main/java/org/wikipedia/page/NavDrawerHelper.java 
b/app/src/main/java/org/wikipedia/page/NavDrawerHelper.java
index c2fd99d..776334a 100644
--- a/app/src/main/java/org/wikipedia/page/NavDrawerHelper.java
+++ b/app/src/main/java/org/wikipedia/page/NavDrawerHelper.java
@@ -24,6 +24,7 @@
 import org.wikipedia.nearby.NearbyFragment;
 import org.wikipedia.random.RandomHandler;
 import org.wikipedia.readinglist.ReadingListsFragment;
+import org.wikipedia.settings.Prefs;
 import org.wikipedia.settings.SettingsActivity;
 import org.wikipedia.util.FeedbackUtil;
 import org.wikipedia.util.UriUtil;
@@ -63,6 +64,10 @@
 updateWikipediaZeroStatus();
 accountToggle = false;
 updateMenuGroupToggle();
+
+if (!Prefs.enableFeed()) {
+
activity.getNavMenu().findItem(R.id.nav_item_feed).setVisible(false);
+}
 }
 
 public NavigationView.OnNavigationItemSelectedListener getNewListener() {
@@ -70,6 +75,10 @@
 @Override
 public boolean onNavigationItemSelected(MenuItem menuItem) {
 switch (menuItem.getItemId()) {
+case R.id.nav_item_feed:
+// TODO: [Feed] show Feed Fragment.
+// TODO: [Feed] add Feed logging.
+break;
 case R.id.nav_item_today:
 activity.loadMainPageInCurrentTab();
 funnel.logToday();
@@ -189,7 +198,10 @@
 }
 
 @Nullable @IdRes private Integer fragmentToMenuId(Class fragment) {
-if (fragment == PageFragment.class) {
+// TODO: [Feed] add Feed Fragment.
+/*if (fragment == FeedFragment.class) {
+return R.id.nav_item_feed;
+} else*/ if (fragment == PageFragment.class) {
 return R.id.nav_item_today;
 } else if (fragment == HistoryFragment.class) {
 return R.id.nav_item_history;
diff --git a/app/src/main/java/org/wikipedia/settings/Prefs.java 
b/app/src/main/java/org/wikipedia/settings/Prefs.java
index 794c9b1..b1ab708 100644
--- a/app/src/main/java/org/wikipedia/settings/Prefs.java
+++ b/app/src/main/java/org/wikipedia/settings/Prefs.java
@@ -138,6 +138,10 @@
 remove(getEditTokenForWikiKey(wiki));
 }
 
+public static boolean enableFeed() {
+return getBoolean(R.string.preference_key_enable_feed, isDevRelease());
+}
+
 public static void removeLoginUsername() {
 remove(R.string.preference_key_login_username);
 }
diff --git a/app/src/main/res/menu/menu_nav_drawer.xml 
b/app/src/main/res/menu/menu_nav_drawer.xml
index 2f692dd..85e4622 100644
--- a/app/src/main/res/menu/menu_nav_drawer.xml
+++ b/app/src/main/res/menu/menu_nav_drawer.xml
@@ -3,6 +3,11 @@
 http://schemas.android.com/apk/res/android;
   xmlns:tools="http://schemas.android.com/tools;>
 
+
 remoteLog
 
 always_send_crash_reports
+enableFeed
 
diff --git a/app/src/main/res/values/strings.xml 
b/app/src/main/res/values/strings.xml
index 4fdea9d..06dd0e6 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -310,4 +310,8 @@
 
 Preferences
 
+
+
+
+
 
diff --git a/app/src/main/res/values/strings_no_translate.xml 
b/app/src/main/res/values/strings_no_translate.xml
index 02a6123..a9b74d2 100644
--- a/app/src/main/res/values/strings_no_translate.xml
+++ b/app/src/main/res/values/strings_no_translate.xml
@@ -40,4 +40,8 @@
 @string/crash_report_dialog_send_button
 
 
+
+
+Home
+
 
diff --git a/app/src/main/res/xml/developer_preferences.xml 
b/app/src/main/res/xml/developer_preferences.xml
index e0f2c72..f260265 100644
--- a/app/src/main/res/xml/developer_preferences.xml
+++ b/app/src/main/res/xml/developer_preferences.xml
@@ -151,6 +151,10 @@
 android:key="@string/preference_key_show_developer_settings"
 android:title="@string/preference_key_show_developer_settings" />
 
+   

[MediaWiki-commits] [Gerrit] Hygiene: move Fragment callbacks into Fragments - change (apps...wikipedia)

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

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

Change subject: Hygiene: move Fragment callbacks into Fragments
..

Hygiene: move Fragment callbacks into Fragments

Fragment callbacks are often tiny interfaces and not worth distinct
files. Roll the callbacks into their Fragments:

• FragmentCallback -> CallbackFragment.Callback

• CrashReportFragmentCallback -> CrashReportFragment.Callback

No functional changes intended.

Change-Id: If3d8f6b31d3ce61b9ddcf56b1185640eea512627
---
M app/src/main/java/org/wikipedia/activity/CallbackFragment.java
D app/src/main/java/org/wikipedia/activity/FragmentCallback.java
M app/src/main/java/org/wikipedia/activity/FragmentUtil.java
M app/src/main/java/org/wikipedia/activity/SingleFragmentActivity.java
M app/src/main/java/org/wikipedia/crash/CrashReportActivity.java
M app/src/main/java/org/wikipedia/crash/CrashReportFragment.java
D app/src/main/java/org/wikipedia/crash/CrashReportFragmentCallback.java
M app/src/main/java/org/wikipedia/settings/PreferenceLoaderFragment.java
M app/src/main/java/org/wikipedia/useroption/ui/UserOptionRowActivity.java
M app/src/main/java/org/wikipedia/useroption/ui/UserOptionRowFragment.java
10 files changed, 35 insertions(+), 32 deletions(-)


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

diff --git a/app/src/main/java/org/wikipedia/activity/CallbackFragment.java 
b/app/src/main/java/org/wikipedia/activity/CallbackFragment.java
index c35aa62..dffa787 100644
--- a/app/src/main/java/org/wikipedia/activity/CallbackFragment.java
+++ b/app/src/main/java/org/wikipedia/activity/CallbackFragment.java
@@ -2,6 +2,10 @@
 
 import android.support.annotation.Nullable;
 
-public interface CallbackFragment {
+import org.wikipedia.activity.CallbackFragment.Callback;
+
+public interface CallbackFragment {
+interface Callback { }
+
 @Nullable T getCallback();
 }
\ No newline at end of file
diff --git a/app/src/main/java/org/wikipedia/activity/FragmentCallback.java 
b/app/src/main/java/org/wikipedia/activity/FragmentCallback.java
deleted file mode 100644
index 52b0976..000
--- a/app/src/main/java/org/wikipedia/activity/FragmentCallback.java
+++ /dev/null
@@ -1,3 +0,0 @@
-package org.wikipedia.activity;
-
-public interface FragmentCallback { }
\ No newline at end of file
diff --git a/app/src/main/java/org/wikipedia/activity/FragmentUtil.java 
b/app/src/main/java/org/wikipedia/activity/FragmentUtil.java
index 17a9440..167c3a8 100644
--- a/app/src/main/java/org/wikipedia/activity/FragmentUtil.java
+++ b/app/src/main/java/org/wikipedia/activity/FragmentUtil.java
@@ -4,13 +4,15 @@
 import android.support.annotation.Nullable;
 import android.support.v4.app.Fragment;
 
+import org.wikipedia.activity.CallbackFragment.Callback;
+
 public final class FragmentUtil {
-@Nullable public static FragmentCallback getCallback(@NonNull Fragment 
fragment) {
-return getCallback(fragment, FragmentCallback.class);
+@Nullable public static Callback getCallback(@NonNull Fragment fragment) {
+return getCallback(fragment, Callback.class);
 }
 
-@Nullable public static  T 
getCallback(@NonNull Fragment fragment,
-   
@NonNull Class callback) {
+@Nullable public static  T getCallback(@NonNull 
Fragment fragment,
+   @NonNull 
Class callback) {
 if (callback.isInstance(fragment.getTargetFragment())) {
 //noinspection unchecked
 return (T) fragment.getTargetFragment();
@@ -23,4 +25,4 @@
 }
 
 private FragmentUtil() { }
-}
\ No newline at end of file
+}
diff --git 
a/app/src/main/java/org/wikipedia/activity/SingleFragmentActivity.java 
b/app/src/main/java/org/wikipedia/activity/SingleFragmentActivity.java
index 672b583..00c5af0 100644
--- a/app/src/main/java/org/wikipedia/activity/SingleFragmentActivity.java
+++ b/app/src/main/java/org/wikipedia/activity/SingleFragmentActivity.java
@@ -7,12 +7,13 @@
 import android.view.MenuItem;
 
 import org.wikipedia.R;
+import org.wikipedia.activity.CallbackFragment.Callback;
 
 /**
  * Boilerplate for a {@link android.support.v4.app.FragmentActivity} 
containing a single stack of
  * Fragments.
  */
-public abstract class SingleFragmentActivity>
+public abstract class SingleFragmentActivity>
 extends ThemedActionBarActivity {
 @Override
 public void onCreate(Bundle savedInstanceState) {
diff --git a/app/src/main/java/org/wikipedia/crash/CrashReportActivity.java 
b/app/src/main/java/org/wikipedia/crash/CrashReportActivity.java
index 4fc3489..e3a27ff 100644
--- a/app/src/main/java/org/wikipedia/crash/CrashReportActivity.java
+++ b/app/src/main/java/org/wikipedia/crash/CrashReportActivity.java
@@ -8,7 +8,7 @@
 import org.wikipedia.activity.SingleFragmentActivity;
 
 

[MediaWiki-commits] [Gerrit] Add authmanager to dev settings hints - change (apps...wikipedia)

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

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

Change subject: Add authmanager to dev settings hints
..

Add authmanager to dev settings hints

We're doing lots of testing with authmanager. I can't remember the URL.
Note the setting in the mediaWikiBaseUri dialog text. We can remove it
later if the server disappears.

Change-Id: I7737eabc88e27f24b185a88e9c7263bb14623337
---
M app/src/main/res/xml/developer_preferences.xml
1 file changed, 1 insertion(+), 0 deletions(-)


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

diff --git a/app/src/main/res/xml/developer_preferences.xml 
b/app/src/main/res/xml/developer_preferences.xml
index e0f2c72..c63a6e5 100644
--- a/app/src/main/res/xml/developer_preferences.xml
+++ b/app/src/main/res/xml/developer_preferences.xml
@@ -51,6 +51,7 @@
 android:dialogMessage="Prod (default if blank): 
https://wikipedia.org
 \nDev: http://host:8080
 \nBeta cluster (switch app language to Simple English): 
http://wikipedia.beta.wmflabs.org
+\nAuth manager (disable language code): 
http://authmanager.wmflabs.org
 \nNote: change requires restart." />
 
 https://gerrit.wikimedia.org/r/289789
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7737eabc88e27f24b185a88e9c7263bb14623337
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 Mapbox to v4.0.1 - change (apps...wikipedia)

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

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

Change subject: Upgrade Mapbox to v4.0.1
..

Upgrade Mapbox to v4.0.1

https://github.com/mapbox/mapbox-gl-native/blob/master/platform/android/CHANGELOG.md#401

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


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

diff --git a/app/build.gradle b/app/build.gradle
index a9826a1..5bff54b 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -184,7 +184,7 @@
 compile 'com.github.ryanjohn1:onboarding:1.0.3'
 compile "com.jakewharton:butterknife:$butterKnifeVersion"
 compile 'com.jakewharton:disklrucache:2.0.2'
-compile('com.mapbox.mapboxsdk:mapbox-android-sdk:4.0.0@aar') {
+compile('com.mapbox.mapboxsdk:mapbox-android-sdk:4.0.1@aar') {
 transitive = true
 }
 compile 'net.hockeyapp.android:HockeySDK:4.0.1'

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib33854bae0aab15f7275f57863471df39b359131
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] Revert "Convert Special:WhatLinksHere from XML form to OOUI ... - change (mediawiki/core)

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

Change subject: Revert "Convert Special:WhatLinksHere from XML form to OOUI 
form"
..


Revert "Convert Special:WhatLinksHere from XML form to OOUI form"

This cannot be the design that was intended here...

This reverts commit 6ffabb260b60497a732b9b46610ec9fd0f9f71f9.

Bug: T135773
Change-Id: Id6ab2ba04c443981cc406c4372c9a809c937c566
---
M includes/specials/SpecialWhatlinkshere.php
M languages/i18n/en.json
2 files changed, 85 insertions(+), 49 deletions(-)

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



diff --git a/includes/specials/SpecialWhatlinkshere.php 
b/includes/specials/SpecialWhatlinkshere.php
index b4ea732..baa55f0 100644
--- a/includes/specials/SpecialWhatlinkshere.php
+++ b/includes/specials/SpecialWhatlinkshere.php
@@ -75,7 +75,7 @@
$this->target = Title::newFromText( $opts->getValue( 'target' ) 
);
if ( !$this->target ) {
if ( !$this->including() ) {
-   $this->buildForm();
+   $out->addHTML( $this->whatlinkshereForm() );
}
 
return;
@@ -200,8 +200,12 @@
) {
if ( 0 == $level ) {
if ( !$this->including() ) {
-   $this->buildForm();
+   $out->addHTML( 
$this->whatlinkshereForm() );
 
+   // Show filters only if there are links
+   if ( $hidelinks || $hidetrans || 
$hideredirs || $hideimages ) {
+   $out->addHTML( 
$this->getFilterPanel() );
+   }
$errMsg = is_int( $namespace ) ? 
'nolinkshere-ns' : 'nolinkshere';
$out->addWikiMsg( $errMsg, 
$this->target->getPrefixedText() );
$out->setStatusCode( 404 );
@@ -265,7 +269,8 @@
 
if ( $level == 0 ) {
if ( !$this->including() ) {
-   $this->buildForm();
+   $out->addHTML( $this->whatlinkshereForm() );
+   $out->addHTML( $this->getFilterPanel() );
$out->addWikiMsg( 'linkshere', 
$this->target->getPrefixedText() );
 
$prevnext = $this->getPrevNext( $prevId, 
$nextId );
@@ -439,7 +444,7 @@
return $this->msg( 'viewprevnext' )->rawParams( $prev, $next, 
$nums )->escaped();
}
 
-   protected function buildForm() {
+   function whatlinkshereForm() {
// We get nicer value from the title object
$this->opts->consumeValue( 'target' );
// Reset these for new requests
@@ -450,57 +455,88 @@
$nsinvert = $this->opts->consumeValue( 'invert' );
 
# Build up the form
+   $f = Xml::openElement( 'form', [ 'action' => wfScript() ] );
 
-   $hiddenFields = [
-   'title' => $this->getPageTitle()->getPrefixedDBkey(),
-   ];
+   # Values that should not be forgotten
+   $f .= Html::hidden( 'title', 
$this->getPageTitle()->getPrefixedText() );
+   foreach ( $this->opts->getUnconsumedValues() as $name => $value 
) {
+   $f .= Html::hidden( $name, $value );
+   }
 
-   $formDescriptor = [
-   'target' => [
-   'type' => 'title',
-   'name' => 'target',
-   'label-message' => 'whatlinkshere-page',
-   'default' => $this->opts->getValue( 'target' ),
-   ],
+   $f .= Xml::fieldset( $this->msg( 'whatlinkshere' )->text() );
 
-   'namespace' => [
-   'type' => 'namespaceselect',
-   'name' => 'namespace',
-   'label-message' => 'namespace',
+   # Target input (.mw-searchInput enables suggestions)
+   $f .= Xml::inputLabel( $this->msg( 'whatlinkshere-page' 
)->text(), 'target',
+   'mw-whatlinkshere-target', 40, $target, [ 'class' => 
'mw-searchInput' ] );
+
+   $f .= ' ';
+
+   # Namespace selector
+   $f .= Html::namespaceSelector(
+   [
+   'selected' => $namespace,
'all' => '',
-   ],
+   'label' => $this->msg( 'namespace' )->text()
+   ], [
+   

[MediaWiki-commits] [Gerrit] WIP run some fraud filters on gateway ready - change (mediawiki...DonationInterface)

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

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

Change subject: WIP run some fraud filters on gateway ready
..

WIP run some fraud filters on gateway ready

Lets you run initial filters as soon as you have data, then the
rest in another hook.

Bug: T135745
Change-Id: Iac943197a780f505de843f21685a0231abcb44f0
---
M DonationInterface.php
M extras/custom_filters/custom_filters.body.php
M gateway_common/GatewayType.php
M gateway_common/gateway.adapter.php
4 files changed, 29 insertions(+), 11 deletions(-)


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

diff --git a/DonationInterface.php b/DonationInterface.php
index 072baea..5dbea05 100644
--- a/DonationInterface.php
+++ b/DonationInterface.php
@@ -890,7 +890,10 @@
 $wgDonationInterfaceGatewayAdapters[] = 'WorldpayAdapter';
 
 //Custom Filters hooks
-$wgHooks['GatewayReady'][] = array( 
'BannerHistoryLogIdProcessor::onGatewayReady' );
+$wgHooks['GatewayReady'][] = array(
+   'BannerHistoryLogIdProcessor::onGatewayReady',
+   'Gateway_Extras_CustomFilters::onGatewayReady'
+);
 
 $wgHooks['GatewayValidate'][] = array( 
'Gateway_Extras_CustomFilters::onValidate' );
 
diff --git a/extras/custom_filters/custom_filters.body.php 
b/extras/custom_filters/custom_filters.body.php
index 4e86dd8..e8ff1a1 100644
--- a/extras/custom_filters/custom_filters.body.php
+++ b/extras/custom_filters/custom_filters.body.php
@@ -31,6 +31,10 @@
parent::__construct( $gateway_adapter ); //gateway_adapter is 
set in there. 
// load user action ranges and risk score   
$this->action_ranges = $this->gateway_adapter->getGlobal( 
'CustomFiltersActionRanges' );
+   $this->risk_score = 
$this->gateway_adapter->getRequest()->getSessionData( 'risk_scores' );
+   if ( !$this->risk_score ) {
+   $this->risk_score = array();
+   }
$this->risk_score['initial'] = 
$this->gateway_adapter->getGlobal( 'CustomFiltersRiskScore' );
}
 
@@ -71,8 +75,7 @@
$log_message = "\"$source added a score of $score\"";
$this->fraud_logger->info( '"addRiskScore" ' . $log_message );
$this->risk_score[$source] = $score;
-
-   $this->gateway_adapter->addRiskScore( $score );
+   $this->gateway_adapter->getRequest()->setSessionData( 
'risk_scores', $this->risk_score );
}

 
@@ -100,13 +103,16 @@
/**
 * Run the transaction through the custom filters
 */
-   public function validate() {
+   public function validate( $hook ) {
// expose a hook for custom filters
-   WmfFramework::runHooks( 'GatewayCustomFilter', array( 
$this->gateway_adapter, $this ) );
+   WmfFramework::runHooks( $hook, array( $this->gateway_adapter, 
$this ) );
+   $score = $this->getRiskScore();
+   $this->gateway_adapter->setRiskScore( $score );
$localAction = $this->determineAction();
$this->gateway_adapter->setValidationAction( $localAction );
 
-   $log_message = '"' . $localAction . "\"\t\"" . 
$this->getRiskScore() . "\"";
+   $log_message = '"' . $localAction . "\"\t\"" . $score . "\"";
+
$this->fraud_logger->info( '"Filtered" ' . $log_message );
 
$log_message = '"' . addslashes( json_encode( $this->risk_score 
) ) . '"';
@@ -129,7 +135,15 @@
return true;
}
$gateway_adapter->debugarray[] = 'custom filters onValidate 
hook!';
-   return self::singleton( $gateway_adapter )->validate();
+   return self::singleton( $gateway_adapter )->validate( 
'GatewayCustomFilter' );
+   }
+
+   static function onGatewayReady( GatewayType $gateway_adapter ) {
+   if ( !$gateway_adapter->getGlobal( 'EnableCustomFilters' ) ){
+   return true;
+   }
+   $gateway_adapter->debugarray[] = 'custom filters onGatewayReady 
hook!';
+   return self::singleton( $gateway_adapter )->validate( 
'GatewayInitialFilter' );
}
 
static function singleton( GatewayType $gateway_adapter ) {
diff --git a/gateway_common/GatewayType.php b/gateway_common/GatewayType.php
index 2684972..26927c6 100644
--- a/gateway_common/GatewayType.php
+++ b/gateway_common/GatewayType.php
@@ -282,11 +282,11 @@
public function getDataConstraints( $field );
 
/**
-* Add the given amount to our fraud score
+* Set the fraud score
 *
 * @param float $score
 */
-   public function addRiskScore( $score );
+   public function setRiskScore( $score );
 
/**
 * Get the current HTTP request

[MediaWiki-commits] [Gerrit] Internationalize the tooltip pieces - change (mediawiki...RevisionSlider)

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

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

Change subject: Internationalize the tooltip pieces
..

Internationalize the tooltip pieces

Make sure that username and comment fields are bidi-isolated and
add an i18n message to "bytes".

Change-Id: I6a27cd7fdebf775dd86ccfc6084505aad4e931d2
---
M extension.json
M i18n/en.json
M i18n/he.json
M i18n/qqq.json
M modules/ext.RevisionSlider.RevisionListView.js
5 files changed, 10 insertions(+), 4 deletions(-)


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

diff --git a/extension.json b/extension.json
index 929f58e..b719eb2 100755
--- a/extension.json
+++ b/extension.json
@@ -101,6 +101,9 @@
"ext.RevisionSlider.RevisionListView": {
"scripts": [
"modules/ext.RevisionSlider.RevisionListView.js"
+   ],
+   "messages": [
+   "revisionslider-revision-bytes"
]
},
"ext.RevisionSlider.pointers.lower": {
diff --git a/i18n/en.json b/i18n/en.json
index 2de9149..e62411e 100755
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -8,8 +8,9 @@
 "revisionslider-desc": "Shows a slider allowing selecting and comparing of 
revisions on a diff page",
 "revisionslider-beta-feature-message": "Revision Slider",
 "revisionslider-beta-feature-description": "Show a revision slider when 
comparing two revisions of a page.",
+"revisionslider-revision-bytes": "$1 {{PLURAL:$1|byte|bytes}}",
 "revisionslider-loading-placeholder": "The revision slider is loading.",
 "revisionslider-loading-failed": "The revision slider failed to load.",
 "revisionslider-loading-out-of-range": "The revision slider failed to load 
as the requested revisions are not in the top 500 versions of the page.",
 "revisionslider-loading-noscript": "As you have JavaScript disabled the 
revision slider will not be able to load."
-}
\ No newline at end of file
+}
diff --git a/i18n/he.json b/i18n/he.json
index 10c8e72..58c1048 100644
--- a/i18n/he.json
+++ b/i18n/he.json
@@ -5,6 +5,7 @@
]
},
"revisionslider": "מחוון הגרסה",
+"revisionslider-revision-bytes": "$1 {{PLURAL:$1|בייט|בייטים}}",
"revisionslider-loading-placeholder": "מחוון הגרסה נמצא בטעינה.",
"revisionslider-loading-noscript": "מכיוון שתכונות ה־JavaScript מבוטלת 
בדפדפן שלך, מחוון הגרסה לא יכול להיטען."
 }
diff --git a/i18n/qqq.json b/i18n/qqq.json
index cc25405..923edd7 100755
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -8,6 +8,7 @@
"revisionslider-desc": 
"{{desc|name=RevisionSlider|url=https://www.mediawiki.org/wiki/Extension:RevisionSlider}};,
"revisionslider-beta-feature-message": "Label for the revision slider 
Beta Feature.",
"revisionslider-beta-feature-description": "Description for the 
revision slider Beta Feature, describing the feature that will be enabled.",
+"revisionslider-revision-bytes": "Label describing the amount of bytes 
changed in this revision.\nParameters:\n* $1 - Revision size in bytes",
"revisionslider-loading-placeholder": "Message shown while the 
RevisionSlider is still loading on a diff page. Once loaded the message is 
removed.",
"revisionslider-loading-failed": "Message shown if the RevisionSlider 
fails to initially load.",
"revisionslider-loading-out-of-range": "Message shown if the 
RevisionSlider fails to initially load due to revisions being requested that 
are not in the most recent 500 revisions.",
diff --git a/modules/ext.RevisionSlider.RevisionListView.js 
b/modules/ext.RevisionSlider.RevisionListView.js
index 6ffda8b..5f6a3fb 100644
--- a/modules/ext.RevisionSlider.RevisionListView.js
+++ b/modules/ext.RevisionSlider.RevisionListView.js
@@ -55,9 +55,9 @@
makeTooltip: function ( rev ) {
var $tooltip = $( '' )
.append( '' + rev.getFormattedDate() + 
'' )
-   .append( $( '' ).text( mw.html.escape( 
rev.getUser() ) ) )
-   .append( rev.getComment() ? $( '' ).append( 
'' ).text( mw.html.escape( rev.getComment() ) ) : '' )
-   .append( $( '' ).html( rev.getSize() + ' 
bytes' ) )
+   .append( $( '' ).append( $( '' 
).text( mw.html.escape( rev.getUser() ) ) ) )
+   .append( rev.getComment() ? $( '' 
).append( $( '' ).append( '' ).text( mw.html.escape( rev.getComment() ) 
) ) : '' )
+   .append( $( '' ).html( mw.msg( 
'revisionslider-revision-bytes', rev.getSize() ) ) )
.append( rev.isMinor() ? $( '' ).html( 
mw.message( 'minoredit' ).text() ) : '' );
 

[MediaWiki-commits] [Gerrit] Use momentjs to display internationalized timestamps - change (mediawiki...RevisionSlider)

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

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

Change subject: Use momentjs to display internationalized timestamps
..

Use momentjs to display internationalized timestamps

MediaWiki uses the momentJS module to display standard timestamps;
this means you can avoid calculating the user offset, but also, it
means that all timestamps are internationalized and translated, and
use the standard view that MW uses in its interfaces.

Change-Id: I67d9859b8f33ab8a217128822e246e7ab67f6511
---
M extension.json
M modules/ext.RevisionSlider.Revision.js
2 files changed, 5 insertions(+), 11 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/RevisionSlider 
refs/changes/85/289785/1

diff --git a/extension.json b/extension.json
index 929f58e..db86b39 100755
--- a/extension.json
+++ b/extension.json
@@ -49,6 +49,9 @@
"ext.RevisionSlider.Revision": {
"scripts": [
"modules/ext.RevisionSlider.Revision.js"
+   ],
+   "dependencies": [
+   "moment"
]
},
"ext.RevisionSlider.Pointer": {
diff --git a/modules/ext.RevisionSlider.Revision.js 
b/modules/ext.RevisionSlider.Revision.js
index 6ccb3c7..3f041e1 100644
--- a/modules/ext.RevisionSlider.Revision.js
+++ b/modules/ext.RevisionSlider.Revision.js
@@ -1,5 +1,5 @@
 ( function ( mw, $ ) {
-
+   /*global moment:false */
var Revision = function ( data ) {
this.id = data.revid;
this.size = data.size;
@@ -86,16 +86,7 @@
},
 
formatDate: function ( rawDate ) {
-   var MONTHS = [ 'Jan', 'Feb', 'Mar', 'Apr', 'May', 
'June', 'July', 'Aug', 'Sept', 'Oct', 'Nov', 'Dec' ],
-   offset = mw.user.options.values.timecorrection 
? mw.user.options.values.timecorrection.split( '|' )[ 1 ] : 
mw.config.values.extRevisionSliderTimeOffset,
-   f = new Date( ( new Date( rawDate ) ).getTime() 
+ ( offset * 60 * 1000 ) ),
-   fDate = f.getUTCDate(),
-   fMonth = f.getUTCMonth(),
-   fYear = f.getUTCFullYear(),
-   fHours = ( '0' + f.getUTCHours() ).slice( -2 ),
-   fMinutes = ( '0' + f.getUTCMinutes() ).slice( 
-2 );
-
-   return fHours + ':' + fMinutes + ', ' + fDate + ' ' + 
MONTHS[ fMonth ] + ' ' + fYear;
+   return moment( rawDate ).format( 'LLL' );
},
 
getFormattedDate: function () {

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

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

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


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

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

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

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(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/81/289781/1

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: newchange
Gerrit-Change-Id: Ia5a4c2f18ec780627146617a1498bd04fcfbb3ee
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
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] Add tests for Linker::getLinkColour() - change (mediawiki/core)

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

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

Change subject: Add tests for Linker::getLinkColour()
..

Add tests for Linker::getLinkColour()

Change-Id: Ic1553e21def47f5c4923ba747146b36b0b3ffdfc
---
M tests/phpunit/includes/LinkerTest.php
1 file changed, 51 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/82/289782/1

diff --git a/tests/phpunit/includes/LinkerTest.php 
b/tests/phpunit/includes/LinkerTest.php
index 1bf8729..2005cce 100644
--- a/tests/phpunit/includes/LinkerTest.php
+++ b/tests/phpunit/includes/LinkerTest.php
@@ -1,5 +1,7 @@
 assertEquals( $expected, $out );
}
+
+   /**
+* @covers Linker::getLinkColour
+*/
+   public function testGetLinkColour() {
+   $linkCache = MediaWikiServices::getInstance()->getLinkCache();
+   $foobarTitle = Title::makeTitle( NS_MAIN, 'FooBar' );
+   $redirectTitle = Title::makeTitle( NS_MAIN, 'Redirect' );
+   $userTitle = Title::makeTitle( NS_USER, 'Someuser' );
+   $linkCache->addGoodLinkObj(
+   1, // id
+   $foobarTitle,
+   10, // len
+   0 // redir
+   );
+   $linkCache->addGoodLinkObj(
+   2, // id
+   $redirectTitle,
+   10, // len
+   1 // redir
+   );
+
+   $linkCache->addGoodLinkObj(
+   3, // id
+   $userTitle,
+   10, // len
+   0 // redir
+   );
+
+   $this->assertEquals(
+   '',
+   Linker::getLinkColour( $foobarTitle, 0 )
+   );
+
+   $this->assertEquals(
+   'stub',
+   Linker::getLinkColour( $foobarTitle, 20 )
+   );
+
+   $this->assertEquals(
+   'mw-redirect',
+   Linker::getLinkColour( $redirectTitle, 0 )
+   );
+
+   $this->assertEquals(
+   '',
+   Linker::getLinkColour( $userTitle, 20 )
+   );
+   }
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic1553e21def47f5c4923ba747146b36b0b3ffdfc
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
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] More reliable post sorting - change (mediawiki...Flow)

2016-05-19 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
---
M includes/Data/Index/BoardHistoryIndex.php
M maintenance/FlowRemoveOldTopics.php
2 files changed, 29 insertions(+), 8 deletions(-)

Approvals:
  Mattflaschen: Looks good to me, approved
  Catrope: 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/289663
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: master
Gerrit-Owner: Matthias Mullie 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: Mattflaschen 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Redo local password enforcement - change (operations/mediawiki-config)

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

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

Change subject: Redo local password enforcement
..

Redo local password enforcement

Use https://gerrit.wikimedia.org/r/#/c/289778/ to move much of the
special handling logic for local groups into CentralAuth.

Also get rid of LoginAuthenticateAudit hook, since policies for those
groups are now enforced.

Bug: T119736
Change-Id: I534127f8a9d2934e91d8cd08cfda2d30567f0de9
---
M wmf-config/CommonSettings.php
1 file changed, 11 insertions(+), 51 deletions(-)


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

diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index 7aae128..f1d4b61 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -391,19 +391,6 @@
'PasswordCannotBePopular' => 1,
];
 
-   if ( array_intersect(
-   [ 'bureaucrat', 'sysop', 'checkuser', 'oversight', 
'interface-editor' ],
-   $central->getLocalGroups()
-   ) ) {
-   $effectivePolicy = UserPasswordPolicy::maxOfPolicies(
-   $effectivePolicy,
-   $privilegedPolicy
-   );
-   return true;
-   }
-
-   // Result should be cached by getLocalGroups() above
-   $attachInfo = $central->queryAttached();
$enforceWikiGroups = [
'centralnoticeadmin' => [ 'metawiki', 'testwiki' ],
'templateeditor' => [ 'fawiki', 'rowiki' ],
@@ -411,21 +398,19 @@
'translator' => [ 'incubatorwiki' ],
'technician' => [ 'trwiki' ],
'wikidata-staff' => [ 'wikidata' ],
+   'bureaucrat' => '*',
+   'sysop' => '*',
+   'checkuser' => '*',
+   'oversight' => '*',
+   'interface-editor' => '*',
];
 
-   foreach ( $enforceWikiGroups as $group => $wikis ) {
-   foreach ( $wikis as $wiki ) {
-   if ( isset( $attachInfo[$wiki]['groups'] )
-   && in_array( $group, 
$attachInfo[$wiki]['groups'] ) )
-   {
-   $effectivePolicy = 
UserPasswordPolicy::maxOfPolicies(
-   $effectivePolicy,
-   $privilegedPolicy
-   );
-   return true;
-   }
-   }
-   }
+   $effectivePolicy = 
CentralAuthUtils::enforcePasswordPolicyIfInLocalWikiGroup(
+   $central,
+   $enforceWikiGroups,
+   $privilegedPolicy,
+   $effectivePolicy
+   );
 
return true;
};
@@ -1452,31 +1437,6 @@
" - " . @$headers['X-Forwarded-For'] .
' - ' . @$headers['User-Agent']
);
-   }
-   return true;
-};
-
-// Estimate users affected if we increase the minimum
-// password length to 8 for privileged groups, i.e.
-// T104370, T104371, T104372, T104373
-$wgHooks['LoginAuthenticateAudit'][] = function( $user, $pass, $retval ) {
-   global $wmgUseCentralAuth;
-   if ( $retval == LoginForm::SUCCESS
-   && strlen( $pass ) < 8
-   ) {
-   if ( $wmgUseCentralAuth ) {
-   $central = CentralAuthUser::getInstance( $user );
-   if ( $central->exists() && array_intersect(
-   [ 'staff', 'sysadmin', 'steward', 'ombudsman', 
'checkuser' ],
-   array_merge(
-   $central->getLocalGroups(),
-   $central->getGlobalGroups()
-   )
-   ) ) {
-   $logger = LoggerFactory::getInstance( 'badpass' 
);
-   $logger->info( "Login by privileged user 
'{$user->getName()}' with too short password" );
-   }
-   }
}
return true;
 };

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

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


[MediaWiki-commits] [Gerrit] Safely handle policies for local groups - change (mediawiki...CentralAuth)

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

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

Change subject: Safely handle policies for local groups
..

Safely handle policies for local groups

Add helper functions in CentralAuth to apply password policies based on
the user's local group membership on particular wikis. Also account for
CentralAuthUser objects where the localuser table has an entry, but the
local account does not exist, causing CentralAuthUser::localUserData()
to throw an exception.

Bug: T119736
Change-Id: I6eb014af44364640de74c32ae4603c0571d42aff
---
M includes/CentralAuthHooks.php
M includes/CentralAuthUser.php
M includes/CentralAuthUtils.php
3 files changed, 85 insertions(+), 29 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CentralAuth 
refs/changes/78/289778/1

diff --git a/includes/CentralAuthHooks.php b/includes/CentralAuthHooks.php
index 76e3352..e506694 100644
--- a/includes/CentralAuthHooks.php
+++ b/includes/CentralAuthHooks.php
@@ -1508,40 +1508,22 @@
$central = CentralAuthUser::getInstance( $user );
 
if ( $central->exists() ) {
-   try {
-   $localPolicyGroups = array_intersect(
-   array_keys( 
$wgCentralAuthGlobalPasswordPolicies ),
-   $central->getLocalGroups()
-   );
-   } catch ( Exception $e ) {
-   // T104615 - race condition in attaching user 
and creating local
-   // wiki account can cause this Exception from
-   // CentralAuthUser::localUserData. Allow the 
password for now, and
-   // we'll catch them next login if their 
password isn't valid.
-   // And T119736 - if localuser table gets out of 
sync, don't
-   // deny logins
-   if ( substr( $e->getMessage(), 0 , 34 )
-   === 'Could not find local user data for'
-   ) {
-   wfDebugLog(
-   'CentralAuth',
-   sprintf( 'Bug T104615 hit for 
%s@%s',
-   $user->getName(),
-   wfWikiId()
-   )
-   );
-   return true;
-   }
-
-   throw $e;
-   }
-
$effectivePolicy = 
UserPasswordPolicy::getPoliciesForGroups(
$wgCentralAuthGlobalPasswordPolicies,
-   array_merge( $central->getGlobalGroups(), 
$localPolicyGroups ),
+   $central->getGlobalGroups(),
$effectivePolicy
);
+
+   foreach ( $wgCentralAuthGlobalPasswordPolicies as 
$group => $policy ) {
+   $effectivePolicy = 
CentralAuthUtils::enforcePasswordPolicyIfInLocalWikiGroup(
+   $central,
+   [ $group => '*' ],
+   $policy,
+   $effectivePolicy
+   );
+   }
}
+
return true;
}
 
diff --git a/includes/CentralAuthUser.php b/includes/CentralAuthUser.php
index 1e8264a..68291c9 100644
--- a/includes/CentralAuthUser.php
+++ b/includes/CentralAuthUser.php
@@ -2215,6 +2215,38 @@
}
 
/**
+* Returns true if a user is a member of a particular group, on a 
particular set
+* of wikis.
+* @param array $wikiGroups list of groups (keys) and either an array 
of wiki
+*  names, or the string '*' for any wiki. E.g., if a user is a 
sysop on enwiki,
+*  and $wikiGroups=['sysop'=>'*'] or 
$wikiGroups=['sysop'=>['enwiki','dewiki']]
+*  then this function will return true.
+* @return array of group names where the user is a member on at least 
one wiki
+*/
+   public function inLocalWikiGroups( array $wikiGroups ) {
+   $allGroups = $this->getLocalGroups();
+   $attachInfo = $this->queryAttached();
+   foreach ( $wikiGroups as $group => $wikis ) {
+   if ( $wikis === '*' ) {
+   if ( in_array( $group, $allGroups ) ) {
+   return true;
+   }
+   

[MediaWiki-commits] [Gerrit] Remove sanitizeEmptyProtection - change (mediawiki...mobileapps)

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

Change subject: Remove sanitizeEmptyProtection
..


Remove sanitizeEmptyProtection

No longer needed as the mobileview API no longer returns empty arrays
for unprotected pages.

Bug: T135070
Change-Id: I65dc3b75847c5d580e8d11c1c94dff4110fc6758
---
M routes/mobile-sections.js
1 file changed, 1 insertion(+), 8 deletions(-)

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



diff --git a/routes/mobile-sections.js b/routes/mobile-sections.js
index 943d1b6..70a05b1 100644
--- a/routes/mobile-sections.js
+++ b/routes/mobile-sections.js
@@ -77,13 +77,6 @@
 return out;
 }
 
-function sanitizeEmptyProtection(protection) {
-if (Array.isArray(protection)) {
-return undefined; // MediaWiki API returns an empty array instead of 
an empty object, ouch!
-}
-return protection;
-}
-
 function buildLead(input) {
 var lead = domino.createDocument(input.page.sections[0].text);
 return {
@@ -94,7 +87,7 @@
 normalizedtitle: input.meta.normalizedtitle,
 redirected: input.meta.redirected,
 description: input.meta.description,
-protection: sanitizeEmptyProtection(input.meta.protection),
+protection: input.meta.protection,
 editable: input.meta.editable,
 mainpage: input.meta.mainpage,
 languagecount: input.meta.languagecount,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I65dc3b75847c5d580e8d11c1c94dff4110fc6758
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/mobileapps
Gerrit-Branch: master
Gerrit-Owner: Mholloway 
Gerrit-Reviewer: BearND 
Gerrit-Reviewer: Dbrant 
Gerrit-Reviewer: Fjalapeno 
Gerrit-Reviewer: GWicke 
Gerrit-Reviewer: Jhernandez 
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] Minor post-API change patch cleanup - change (apps...wikipedia)

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

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

Change subject: Minor post-API change patch cleanup
..

Minor post-API change patch cleanup

-Remove methods where implementation is identical to that in superclass
-Rename flag param from 'i' to 'flags' in Parcelable.writeToParcel impl's
-Remove unused method

Change-Id: I57f775ce0e74c437c7a8a663b2bfc1a2a8bb2622
---
M app/src/main/java/org/wikipedia/createaccount/CreateAccountResult.java
M app/src/main/java/org/wikipedia/createaccount/CreateAccountSuccessResult.java
M 
app/src/main/java/org/wikipedia/createaccount/authmanager/AMCreateAccountInfoResult.java
M 
app/src/main/java/org/wikipedia/createaccount/authmanager/AMCreateAccountResult.java
M 
app/src/main/java/org/wikipedia/createaccount/authmanager/AMCreateAccountSuccessResult.java
5 files changed, 6 insertions(+), 21 deletions(-)


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

diff --git 
a/app/src/main/java/org/wikipedia/createaccount/CreateAccountResult.java 
b/app/src/main/java/org/wikipedia/createaccount/CreateAccountResult.java
index 96646b8..401ae02 100644
--- a/app/src/main/java/org/wikipedia/createaccount/CreateAccountResult.java
+++ b/app/src/main/java/org/wikipedia/createaccount/CreateAccountResult.java
@@ -15,7 +15,7 @@
 }
 
 @Override
-public void writeToParcel(Parcel parcel, int i) {
+public void writeToParcel(Parcel parcel, int flags) {
 parcel.writeString(result);
 }
 
diff --git 
a/app/src/main/java/org/wikipedia/createaccount/CreateAccountSuccessResult.java 
b/app/src/main/java/org/wikipedia/createaccount/CreateAccountSuccessResult.java
index 5e136f4..e6ad938 100644
--- 
a/app/src/main/java/org/wikipedia/createaccount/CreateAccountSuccessResult.java
+++ 
b/app/src/main/java/org/wikipedia/createaccount/CreateAccountSuccessResult.java
@@ -16,13 +16,8 @@
 }
 
 @Override
-public int describeContents() {
-return 0;
-}
-
-@Override
-public void writeToParcel(Parcel parcel, int i) {
-super.writeToParcel(parcel, i);
+public void writeToParcel(Parcel parcel, int flags) {
+super.writeToParcel(parcel, flags);
 parcel.writeString(username);
 }
 
diff --git 
a/app/src/main/java/org/wikipedia/createaccount/authmanager/AMCreateAccountInfoResult.java
 
b/app/src/main/java/org/wikipedia/createaccount/authmanager/AMCreateAccountInfoResult.java
index 0514872..869dd23 100644
--- 
a/app/src/main/java/org/wikipedia/createaccount/authmanager/AMCreateAccountInfoResult.java
+++ 
b/app/src/main/java/org/wikipedia/createaccount/authmanager/AMCreateAccountInfoResult.java
@@ -25,9 +25,4 @@
 public String getCaptchaId() {
 return captchaId;
 }
-
-@Nullable
-public List getSessionCookie() {
-return sessionCookie;
-}
 }
diff --git 
a/app/src/main/java/org/wikipedia/createaccount/authmanager/AMCreateAccountResult.java
 
b/app/src/main/java/org/wikipedia/createaccount/authmanager/AMCreateAccountResult.java
index 31bc2c2..dc90e79 100644
--- 
a/app/src/main/java/org/wikipedia/createaccount/authmanager/AMCreateAccountResult.java
+++ 
b/app/src/main/java/org/wikipedia/createaccount/authmanager/AMCreateAccountResult.java
@@ -26,7 +26,7 @@
 }
 
 @Override
-public void writeToParcel(Parcel parcel, int i) {
+public void writeToParcel(Parcel parcel, int flags) {
 parcel.writeString(status);
 parcel.writeString(message);
 }
diff --git 
a/app/src/main/java/org/wikipedia/createaccount/authmanager/AMCreateAccountSuccessResult.java
 
b/app/src/main/java/org/wikipedia/createaccount/authmanager/AMCreateAccountSuccessResult.java
index 903bc7a..8340114 100644
--- 
a/app/src/main/java/org/wikipedia/createaccount/authmanager/AMCreateAccountSuccessResult.java
+++ 
b/app/src/main/java/org/wikipedia/createaccount/authmanager/AMCreateAccountSuccessResult.java
@@ -16,13 +16,8 @@
 }
 
 @Override
-public int describeContents() {
-return 0;
-}
-
-@Override
-public void writeToParcel(Parcel parcel, int i) {
-super.writeToParcel(parcel, i);
+public void writeToParcel(Parcel parcel, int flags) {
+super.writeToParcel(parcel, flags);
 parcel.writeString(username);
 }
 

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

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

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


[MediaWiki-commits] [Gerrit] Update AuthManagerStatsdHandler - change (mediawiki...WikimediaEvents)

2016-05-19 Thread Code Review
Gergő Tisza has uploaded a new change for review.

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

Change subject: Update AuthManagerStatsdHandler
..

Update AuthManagerStatsdHandler

* handle status objects with multiple errors
* accept new channel name (authevents)
* use MediaWikiServices
* add tests

Change-Id: Iae1395cd25c6747e56d163287238af6d4c6ab014
---
M WikimediaEventsHooks.php
M extension.json
M includes/AuthManagerStatsdHandler.php
A tests/phpunit/AuthManagerStatsdHandlerTest.php
4 files changed, 141 insertions(+), 7 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikimediaEvents 
refs/changes/75/289775/1

diff --git a/WikimediaEventsHooks.php b/WikimediaEventsHooks.php
index cbc4d89..9c3f2c3 100644
--- a/WikimediaEventsHooks.php
+++ b/WikimediaEventsHooks.php
@@ -542,4 +542,23 @@
$builder['vars']['user_wpzero'] = 'user-wpzero';
}
 
+   public static function onUnitTestsList( array &$files ) {
+   // @codeCoverageIgnoreStart
+   $directoryIterator = new RecursiveDirectoryIterator( __DIR__ . 
'/tests/phpunit/' );
+
+   /**
+* @var SplFileInfo $fileInfo
+*/
+   $ourFiles = array();
+   foreach ( new RecursiveIteratorIterator( $directoryIterator ) 
as $fileInfo ) {
+   if ( substr( $fileInfo->getFilename(), -8 ) === 
'Test.php' ) {
+   $ourFiles[] = $fileInfo->getPathname();
+   }
+   }
+
+   $files = array_merge( $files, $ourFiles );
+   return true;
+   // @codeCoverageIgnoreEnd
+   }
+
 }
diff --git a/extension.json b/extension.json
index 4003ed3..75c8a54 100644
--- a/extension.json
+++ b/extension.json
@@ -69,6 +69,9 @@
],
"AbuseFilter-builder": [
"WikimediaEventsHooks::onAbuseFilterBuilder"
+   ],
+   "UnitTestsList": [
+   "WikimediaEventsHooks::onUnitTestsList"
]
},
"MessagesDirs": {
diff --git a/includes/AuthManagerStatsdHandler.php 
b/includes/AuthManagerStatsdHandler.php
index a6333d4..f8436da 100644
--- a/includes/AuthManagerStatsdHandler.php
+++ b/includes/AuthManagerStatsdHandler.php
@@ -22,6 +22,7 @@
  * @file
  */
 
+use MediaWiki\MediaWikiServices;
 use Monolog\Handler\AbstractHandler;
 
 /**
@@ -39,28 +40,28 @@
public function handle( array $record ) {
$event = isset( $record['context']['event'] ) ? 
$record['context']['event'] : null;
$type = isset( $record['context']['type'] ) ? 
$record['context']['type'] : null;
-   $entrypoint = defined( 'MW_API' ) ? 'api' : 'web';
-   if ( $entrypoint === 'web' && wfWikiID() === 'loginwiki' ) {
-   $entrypoint = 'centrallogin';
-   }
+   $entrypoint = $this->getEntryPoint();
$status = isset( $record['context']['status'] ) ? 
$record['context']['status'] : null;
$successful = isset( $record['context']['successful'] ) ? 
$record['context']['successful'] : null;
$error = null;
if ( $status instanceof Status || $status instanceof 
StatusValue ) {
$successful = $status->isGood();
if ( !$successful ) {
-   $error = $status->getMessage()->getKey();
+   $errorArray = $status->getErrorsArray() ?: 
$status->getWarningsArray();
+   $error = $errorArray[0][0];
}
} elseif ( is_string( $status ) && $successful === false ) {
$error = $status;
} elseif ( is_numeric( $status ) && $successful === false ) {
$error = strval( $status );
+   } elseif( is_bool( $status ) ) {
+   $successful = $status;
}
 
// sanity check in case this was invoked from some 
non-metrics-related
// code by accident
if (
-   $record['channel'] !== 'authmanager'
+   $record['channel'] !== 'authmanager' && 
$record['channel'] !== 'authevents'
|| !$event || !is_string( $event )
|| ( $type && !is_string( $type ) )
|| ( $error && !is_string( $error ) )
@@ -77,9 +78,21 @@
$keyParts[] = $error;
}
$key = implode( '.', array_filter( $keyParts ) );
-   RequestContext::getMain()->getStats()->increment( $key );
+
+
+   // use of this class is set up in operations/mediawiki-config 
so no nice dependency injection
+   $stats = 

[MediaWiki-commits] [Gerrit] Botadmin group should not be allowed to assign or remove use... - change (operations/mediawiki-config)

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

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

Change subject: Botadmin group should not be allowed to assign or remove user 
groups in FA WP
..

Botadmin group should not be allowed to assign or remove user groups in FA WP

Bug: T135774
Change-Id: Ia40fef53aa991d981ff1477fa8e9469e04183f72
---
M wmf-config/InitialiseSettings.php
1 file changed, 1 insertion(+), 12 deletions(-)


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index cd60468..a3d8d05 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -9149,18 +9149,7 @@
'uploader', // T71171
'confirmed', // T87348
'patroller', // T118847
-   ],
-   'botadmin' => [
-   'patroller',
-   'Image-reviewer',
-   'rollbacker',
-   'autopatrol',
-   'uploader',
-   'templateeditor', // T74146
-   'abusefilter', // T74502
-   'confirmed', // T87348
-   'eliminator' // T87558
-   ], // T71411
+   ]
],
'+fawikibooks' => [
'sysop' => [

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

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

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


[MediaWiki-commits] [Gerrit] Remove sanitizeEmptyProtection - change (mediawiki...mobileapps)

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

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

Change subject: Remove sanitizeEmptyProtection
..

Remove sanitizeEmptyProtection

No longer needed as the mobileview API no longer returns empty arrays
for unprotected pages.

Bug: T135070
Change-Id: I65dc3b75847c5d580e8d11c1c94dff4110fc6758
---
M routes/mobile-sections.js
1 file changed, 1 insertion(+), 8 deletions(-)


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

diff --git a/routes/mobile-sections.js b/routes/mobile-sections.js
index 943d1b6..70a05b1 100644
--- a/routes/mobile-sections.js
+++ b/routes/mobile-sections.js
@@ -77,13 +77,6 @@
 return out;
 }
 
-function sanitizeEmptyProtection(protection) {
-if (Array.isArray(protection)) {
-return undefined; // MediaWiki API returns an empty array instead of 
an empty object, ouch!
-}
-return protection;
-}
-
 function buildLead(input) {
 var lead = domino.createDocument(input.page.sections[0].text);
 return {
@@ -94,7 +87,7 @@
 normalizedtitle: input.meta.normalizedtitle,
 redirected: input.meta.redirected,
 description: input.meta.description,
-protection: sanitizeEmptyProtection(input.meta.protection),
+protection: input.meta.protection,
 editable: input.meta.editable,
 mainpage: input.meta.mainpage,
 languagecount: input.meta.languagecount,

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

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

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


[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: 4729078..cd37cc8 - change (mediawiki/extensions)

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

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

Change subject: Syncronize VisualEditor: 4729078..cd37cc8
..

Syncronize VisualEditor: 4729078..cd37cc8

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


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

diff --git a/VisualEditor b/VisualEditor
index 4729078..cd37cc8 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit 4729078593051c0cb98f0fa061b9029cc3e37858
+Subproject commit cd37cc8cbbc502a74d9f8e683d0efa99f16a57dd

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I724315f6ebeb9454f0f281a7537b4e5d3df36b33
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] RevDel: Fix ChangeTags for archived items - change (mediawiki/core)

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

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

Change subject: RevDel: Fix ChangeTags for archived items
..

RevDel: Fix ChangeTags for archived items

Bug: T128980
Change-Id: Ibc9ec57da16e1b71c9efa0d2c062f8d7965f59bc
---
M includes/revisiondelete/RevDelArchiveList.php
M includes/revisiondelete/RevDelRevisionList.php
2 files changed, 51 insertions(+), 14 deletions(-)


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

diff --git a/includes/revisiondelete/RevDelArchiveList.php 
b/includes/revisiondelete/RevDelArchiveList.php
index 9bb1dc5..72c460e 100644
--- a/includes/revisiondelete/RevDelArchiveList.php
+++ b/includes/revisiondelete/RevDelArchiveList.php
@@ -41,15 +41,32 @@
$timestamps[] = $db->timestamp( $id );
}
 
-   return $db->select( 'archive', Revision::selectArchiveFields(),
-   [
-   'ar_namespace' => 
$this->title->getNamespace(),
-   'ar_title' => $this->title->getDBkey(),
-   'ar_timestamp' => $timestamps
-   ],
-   __METHOD__,
-   [ 'ORDER BY' => 'ar_timestamp DESC' ]
-   );
+   $tables = [ 'archive' ];
+   $fields = Revision::selectArchiveFields();
+   $conds = [
+   'ar_namespace' => $this->title->getNamespace(),
+   'ar_title' => $this->title->getDBkey(),
+   'ar_timestamp' => $timestamps,
+   ];
+   $join_conds = [];
+   $options = [ 'ORDER BY' => 'ar_timestamp DESC' ];
+
+   ChangeTags::modifyDisplayQuery(
+   $tables,
+   $fields,
+   $conds,
+   $join_conds,
+   $options,
+   ''
+   );
+
+   return $db->select( $tables,
+   $fields,
+   $conds,
+   __METHOD__,
+   $options,
+   $join_conds
+   );
}
 
public function newItem( $row ) {
diff --git a/includes/revisiondelete/RevDelRevisionList.php 
b/includes/revisiondelete/RevDelRevisionList.php
index bc2b2e9..27e5148 100644
--- a/includes/revisiondelete/RevDelRevisionList.php
+++ b/includes/revisiondelete/RevDelRevisionList.php
@@ -94,13 +94,33 @@
return $live;
}
 
-   // Check if any requested revisions are available fully deleted.
-   $archived = $db->select( [ 'archive' ], 
Revision::selectArchiveFields(),
-   [
-   'ar_rev_id' => $ids
+   $archiveQueryInfo = [
+   'tables' => [ 'archive' ],
+   'fields' => Revision::selectArchiveFields(),
+   'conds' => [
+   'ar_rev_id' => $ids,
],
+   'options' => [ 'ORDER BY' => 'ar_rev_id DESC' ],
+   'join_conds' => [],
+   ];
+
+   ChangeTags::modifyDisplayQuery(
+   $archiveQueryInfo['tables'],
+   $archiveQueryInfo['fields'],
+   $archiveQueryInfo['conds'],
+   $archiveQueryInfo['join_conds'],
+   $archiveQueryInfo['options'],
+   ''
+   );
+
+   // Check if any requested revisions are available fully deleted.
+   $archived = $db->select(
+   $archiveQueryInfo['tables'],
+   $archiveQueryInfo['fields'],
+   $archiveQueryInfo['conds'],
__METHOD__,
-   [ 'ORDER BY' => 'ar_rev_id DESC' ]
+   $archiveQueryInfo['options'],
+   $archiveQueryInfo['join_conds']
);
 
if ( $archived->numRows() == 0 ) {

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

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

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


[MediaWiki-commits] [Gerrit] Convert isUserInCondition from async to sync - change (mediawiki...Popups)

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

Change subject: Convert isUserInCondition from async to sync
..


Convert isUserInCondition from async to sync

As there are an unmanageable amount of synchronous checks of
mw.popups.enabled, convert mw.popups.experiment.isUserInCondition to a
synchronous method.

Follow on I4959749.

Bug: T132604
Change-Id: Ide07e62868c77bfcd78af58dcec7303a35a72157
---
M resources/ext.popups.experiment.js
M tests/qunit/ext.popups.experiment.test.js
2 files changed, 68 insertions(+), 100 deletions(-)

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



diff --git a/resources/ext.popups.experiment.js 
b/resources/ext.popups.experiment.js
index 91996d8..4812b1b 100644
--- a/resources/ext.popups.experiment.js
+++ b/resources/ext.popups.experiment.js
@@ -58,38 +58,33 @@
 * N.B. that the user isn't entered into the experiment, i.e. they 
aren't assigned or a bucket,
 * if the experiment isn't configured.
 *
-* @return {jQuery.Promise}
+* @return {boolean}
 */
mw.popups.experiment.isUserInCondition = function isUserInCondition() {
-   var deferred = $.Deferred(),
-   config = mw.config.get( 
'wgPopupsExperimentConfig' ),
-   result;
+   var config = mw.config.get( 'wgPopupsExperimentConfig' );
 
// The first two tests deal with whether the user has 
/explicitly/ enable or disabled via its
// settings.
if ( hasUserEnabledFeature() ) {
-   deferred.resolve( true );
-   } else if ( hasUserDisabledFeature() ) {
-   deferred.resolve( false );
-   } else if (
-
-   // Users with the beta feature enabled are already in 
the experimental condition.
-   mw.config.get( 
'wgPopupsExperimentIsBetaFeatureEnabled', false )
-   ) {
-   deferred.resolve( true );
-   } else if ( !config ) {
-   deferred.resolve( false );
-   } else {
-   mw.requestIdleCallback( function () {
-   // FIXME: mw.experiments should expose the 
CONTROL_BUCKET constant, e.g.
-   // `mw.experiments.CONTROL_BUCKET`.
-   result = mw.experiments.getBucket( config, 
getToken() ) !== 'control';
-
-   deferred.resolve( result );
-   } );
+   return true;
}
 
-   return deferred.promise();
+   if ( hasUserDisabledFeature() ) {
+   return false;
+   }
+
+   // Users with the beta feature enabled are already in the 
experimental condition.
+   if ( mw.config.get( 'wgPopupsExperimentIsBetaFeatureEnabled', 
false ) ) {
+   return true;
+   }
+
+   if ( !config ) {
+   return false;
+   }
+
+   // FIXME: mw.experiments should expose the CONTROL_BUCKET 
constant, e.g.
+   // `mw.experiments.CONTROL_BUCKET`.
+   return mw.experiments.getBucket( config, getToken() ) !== 
'control';
};
 
 }( mediaWiki, jQuery ) );
diff --git a/tests/qunit/ext.popups.experiment.test.js 
b/tests/qunit/ext.popups.experiment.test.js
index 0056bb5..bdee981 100644
--- a/tests/qunit/ext.popups.experiment.test.js
+++ b/tests/qunit/ext.popups.experiment.test.js
@@ -9,7 +9,8 @@
control: 0.5,
A: 0.5
}
-   }
+   },
+   wgPopupsExperimentIsBetaFeatureEnabled: null
},
setup: function () {
$.jStorage.deleteKey( 'mwe-popups-enabled' );
@@ -19,114 +20,86 @@
}
} ) );
 
-   QUnit.test( '#isUserInCondition: user has beta feature enabled', 
function ( assert ) {
-   var done = assert.async();
-
+   QUnit.test( '#isUserInCondition: user has beta feature enabled', 1, 
function ( assert ) {
mw.config.set( 'wgPopupsExperimentConfig', null );
mw.config.set( 'wgPopupsExperimentIsBetaFeatureEnabled', true );
 
-   mw.popups.experiment.isUserInCondition().then( function ( 
result ) {
-   assert.strictEqual(
-   result,
-   true,
-   'If the user has the beta feature enabled, then 
they aren\'t in the condition.'
-   );
-
-   done();
-   } );
+   assert.strictEqual(
+   

[MediaWiki-commits] [Gerrit] requesttracker: use test db if on jessie - change (operations/puppet)

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

Change subject: requesttracker: use test db if on jessie
..


requesttracker: use test db if on jessie

If on jessie, use the test db server to test
upgrading without touching current prod server.

Also, include standard in test role to avoid icinga config issue.

Bug:T119112
Change-Id: I8fc4f873e6bd3ab1364e9925ee3dfa88a8dfa491
---
M modules/role/manifests/requesttracker/server.pp
M modules/role/manifests/requesttracker/upgradetest.pp
2 files changed, 8 insertions(+), 1 deletion(-)

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



diff --git a/modules/role/manifests/requesttracker/server.pp 
b/modules/role/manifests/requesttracker/server.pp
index e2f01b8..bf3df2a 100644
--- a/modules/role/manifests/requesttracker/server.pp
+++ b/modules/role/manifests/requesttracker/server.pp
@@ -26,9 +26,15 @@
 }
 }
 
+if os_version('debian >= jessie') {
+$rt_dbhost = 'db2007.codfw.wmnet'
+} else {
+$rt_dbhost = 'm1-master.eqiad.wmnet'
+}
+
 class { '::requesttracker':
 apache_site => 'rt.wikimedia.org',
-dbhost  => 'm1-master.eqiad.wmnet',
+dbhost  => $rt_dbhost,
 dbport  => '',
 dbuser  => $passwords::misc::rt::rt_mysql_user,
 dbpass  => $passwords::misc::rt::rt_mysql_pass,
diff --git a/modules/role/manifests/requesttracker/upgradetest.pp 
b/modules/role/manifests/requesttracker/upgradetest.pp
index 073acaa..d2c8923 100644
--- a/modules/role/manifests/requesttracker/upgradetest.pp
+++ b/modules/role/manifests/requesttracker/upgradetest.pp
@@ -2,6 +2,7 @@
 class role::requesttracker::upgradetest {
 system::role { 'role::requesttracker::upgradetest': description => 'temp 
test setup for RT migration to jessie' }
 
+include standard
 include base::firewall
 include rsync::server
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8fc4f873e6bd3ab1364e9925ee3dfa88a8dfa491
Gerrit-PatchSet: 4
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Update tilerator to 6a992be - change (maps...deploy)

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

Change subject: Update tilerator to 6a992be
..


Update tilerator to 6a992be

List of changes:
52d9e9b File import fixes, job tracking is now off
6a992be added v2 cassandra store to prod sources

Change-Id: I626b15a998c513995f76c4189ee4025cb238206d
---
M src
1 file changed, 0 insertions(+), 0 deletions(-)

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



diff --git a/src b/src
index 24b47c1..6a992be 16
--- a/src
+++ b/src
-Subproject commit 24b47c19daa71b99f62964dd4b656b5f2831978d
+Subproject commit 6a992be1b1249877f19c3b6381786060ecfc85f1

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I626b15a998c513995f76c4189ee4025cb238206d
Gerrit-PatchSet: 1
Gerrit-Project: maps/tilerator/deploy
Gerrit-Branch: master
Gerrit-Owner: Yurik 
Gerrit-Reviewer: Yurik 

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


[MediaWiki-commits] [Gerrit] Generalize the SubGroupListWidget - change (mediawiki...Echo)

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

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

Change subject: Generalize the SubGroupListWidget
..

Generalize the SubGroupListWidget

Allow for the widget to have a mark-as-read button to its individual
groups, as well as change the event listening from 'remove' to 'discard'

The problem with 'remove' event is that it is triggered when an item
is either intentionally removed from the list *and* when an item is
changing its position in the list (move event includes 'remove' and
then 'add' event)

If we listen to 'remove' events we will get both cases, which is
unhelpful. Instead, a new event - 'discard' - was introduced so
we are certain it is used with the clear intention of removing the
item completely.

Change-Id: Ia08720bf4c547fa41edf62331eeb1a45ff4965b7
---
M modules/controller/mw.echo.Controller.js
M modules/model/mw.echo.dm.NotificationItem.js
M modules/model/mw.echo.dm.NotificationsList.js
M modules/styles/mw.echo.ui.CrossWikiNotificationItemWidget.less
M modules/styles/mw.echo.ui.SubGroupListWidget.less
M modules/ui/mw.echo.ui.SubGroupListWidget.js
6 files changed, 184 insertions(+), 31 deletions(-)


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

diff --git a/modules/controller/mw.echo.Controller.js 
b/modules/controller/mw.echo.Controller.js
index 41f6a06..adbd5ed 100644
--- a/modules/controller/mw.echo.Controller.js
+++ b/modules/controller/mw.echo.Controller.js
@@ -202,7 +202,7 @@
items.push(
new 
mw.echo.dm.NotificationItem( groupItems[ i ].id, $.extend( notifData, {
source: 
group,
-   bundle: 
true,
+   
bundled: true,

foreign: true
} ) )
);
@@ -293,7 +293,7 @@
 
sourceModel = xwikiModel.getList().getGroupBySource( 
modelSource );
notifs = sourceModel.findByIds( itemIds );
-   sourceModel.removeItems( notifs );
+   sourceModel.discardItems( notifs );
 
return this.api.markItemsRead( itemIds, modelSource, true )
.then( this.refreshUnreadCount.bind( this ) );
diff --git a/modules/model/mw.echo.dm.NotificationItem.js 
b/modules/model/mw.echo.dm.NotificationItem.js
index 9cfa7d9..06ab66e 100644
--- a/modules/model/mw.echo.dm.NotificationItem.js
+++ b/modules/model/mw.echo.dm.NotificationItem.js
@@ -23,6 +23,7 @@
 * @cfg {string} [timestamp] Notification timestamp in Mediawiki 
timestamp format
 * @cfg {string} [primaryUrl] Notification primary link in raw url 
format
 * @cfg {boolean} [foreign=false] This notification is from a foreign 
source
+* @cfg {boolean} [bundled=false] This notification is part of a bundle
 * @cfg {string} [source] The source this notification is coming from, 
if it is foreign
 * @cfg {Object[]} [secondaryUrls] An array of objects defining the 
secondary URLs
 *  for this notification. The secondary URLs are expected to have this 
structure:
@@ -58,6 +59,7 @@
this.category = config.category || '';
this.type = config.type || 'message';
this.foreign = !!config.foreign;
+   this.bundled = !!config.bundled;
this.source = config.source || '';
this.iconType = config.iconType;
this.iconURL = config.iconURL;
@@ -158,6 +160,15 @@
};
 
/**
+* Check whether this notification item is part of a bundle
+*
+* @return {boolean} Notification item is part of a bundle
+*/
+   mw.echo.dm.NotificationItem.prototype.isBundled = function () {
+   return this.bundled;
+   };
+
+   /**
 * Set this notification item as foreign
 *
 * @param {boolean} isForeign Notification item is foreign
diff --git a/modules/model/mw.echo.dm.NotificationsList.js 
b/modules/model/mw.echo.dm.NotificationsList.js
index faa0f1f..f6529a6 100644
--- a/modules/model/mw.echo.dm.NotificationsList.js
+++ b/modules/model/mw.echo.dm.NotificationsList.js
@@ -72,13 +72,29 @@
/**
 * Set the items in this list
 *
-* @param {mw.echo.dm.NotificationItem} items Items to insert into the 
list
+* @param {mw.echo.dm.NotificationItem[]} items Items to insert into 
the list
 * @fires update
 */
mw.echo.dm.NotificationsList.prototype.setItems = function ( 

[MediaWiki-commits] [Gerrit] Fix SecurePoll_VoterEligibilityPage::saveList visibility - change (mediawiki...SecurePoll)

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

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

Change subject: Fix SecurePoll_VoterEligibilityPage::saveList visibility
..

Fix SecurePoll_VoterEligibilityPage::saveList visibility

SecurePoll_VoterEligibilityPage::saveList can now be private
as we don't support PHP 5.3 anymore.

This reverts commit 27e620df25d881ca9e5413eb6101e0f451e1bf20.

Change-Id: Ib9517fe2255fb8546934ab7fbf120cff32ac0bd2
---
M includes/pages/VoterEligibilityPage.php
1 file changed, 1 insertion(+), 5 deletions(-)


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

diff --git a/includes/pages/VoterEligibilityPage.php 
b/includes/pages/VoterEligibilityPage.php
index 1754f70..f9e7bd6 100644
--- a/includes/pages/VoterEligibilityPage.php
+++ b/includes/pages/VoterEligibilityPage.php
@@ -200,11 +200,7 @@
return $names;
}
 
-   /**
-* @todo Make this really private when we don't support PHP 5.3 anymore
-* @private
-*/
-   public function saveList( $property, $names, $comment ) {
+   private function saveList( $property, $names, $comment ) {
global $wgSecurePollUseNamespace;
 
$wikis = $this->election->getProperty( 'wikis' );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib9517fe2255fb8546934ab7fbf120cff32ac0bd2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SecurePoll
Gerrit-Branch: master
Gerrit-Owner: Dereckson 

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


[MediaWiki-commits] [Gerrit] labs bastions cgroup for /shared/bin/node - change (operations/puppet)

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

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

Change subject: labs bastions cgroup for /shared/bin/node
..

labs bastions cgroup for /shared/bin/node

Bug: T131541

Change-Id: I720a11e79a88d192c7c70a9bb035bb8706c6b845
---
M modules/toollabs/manifests/bastion.pp
1 file changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/34/289734/1

diff --git a/modules/toollabs/manifests/bastion.pp 
b/modules/toollabs/manifests/bastion.pp
index 5a45c98..c81230a 100644
--- a/modules/toollabs/manifests/bastion.pp
+++ b/modules/toollabs/manifests/bastion.pp
@@ -98,6 +98,8 @@
 '%  memory   /scripts',
 '*:/usr/bin/tclsh8.6cpu  /scripts',
 '%  memory   /scripts',
+'*:/shared/bin/node cpu  /scripts',
+'%  memory   /scripts',
 ],
 }
 

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

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

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


[MediaWiki-commits] [Gerrit] PHPUnit: turn off verbose option - change (mediawiki/core)

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

Change subject: PHPUnit: turn off verbose option
..


PHPUnit: turn off verbose option

It's very common these days for test runs on ordinary rigs to skip hundreds of
tests, which makes getting the part of the results you care about (the test
failures) an arduous trip up hundreds of lines in your terminal buffer.

Change-Id: Iaf714b86473379e1ad32e4d2d93e83018a757782
---
M tests/phpunit/suite.xml
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Aaron Schulz: Looks good to me, but someone else must approve
  Hashar: Looks good to me, but someone else must approve
  Addshore: Looks good to me, but someone else must approve
  JanZerebecki: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/tests/phpunit/suite.xml b/tests/phpunit/suite.xml
index 63f5de0..ed18205 100644
--- a/tests/phpunit/suite.xml
+++ b/tests/phpunit/suite.xml
@@ -16,7 +16,7 @@
beStrictAboutTestsThatDoNotTestAnything="true"
beStrictAboutOutputDuringTests="true"
beStrictAboutTestSize="true"
-   verbose="true">
+   verbose="false">


includes

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iaf714b86473379e1ad32e4d2d93e83018a757782
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Ori.livneh 
Gerrit-Reviewer: Aaron Schulz 
Gerrit-Reviewer: Addshore 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: JanZerebecki 
Gerrit-Reviewer: Krinkle 
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] Add config and messages for filtering globalauth and suppres... - change (mediawiki...CentralAuth)

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

Change subject: Add config and messages for filtering globalauth and 
suppression logs by action
..


Add config and messages for filtering globalauth and suppression logs by action

Bug: T109269
Change-Id: I443b8397ea047c62dfab5663c33730e6fdc5c6d9
---
M extension.json
M i18n/en.json
M i18n/qqq.json
3 files changed, 35 insertions(+), 2 deletions(-)

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



diff --git a/extension.json b/extension.json
index 89d9882..e8b2e73 100644
--- a/extension.json
+++ b/extension.json
@@ -85,6 +85,29 @@
"globalauth": "centralauth-log-header",
"gblrights": "centralauth-rightslog-header"
},
+   "ActionFilteredLogs": {
+   "suppress": {
+   "setstatus": [
+   "setstatus"
+   ],
+   "cadelete": [
+   "cadelete"
+   ]
+   },
+   "globalauth": {
+   "delete": [
+   "delete"
+   ],
+   "setstatus": [
+   "setstatus",
+   "lock",
+   "unlock",
+   "hide",
+   "unhide",
+   "lockandhid"
+   ]
+   }
+   },
"LogActions": {
"globalauth/delete": "centralauth-log-entry-delete",
"globalauth/lock": "centralauth-log-entry-lock",
diff --git a/i18n/en.json b/i18n/en.json
index c5c9e9b..b1ac7e9 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -557,5 +557,10 @@
"centralauth-uwbr-intro": "This page lists users registered with this 
wiki who will be renamed.",
"centralauth-delete-empty-account": "Empty account",
"sessionprovider-centralauthsessionprovider": "central cookie-based 
sessions",
-   "sessionprovider-centralauthtokensessionprovider": "centralauthtoken 
sessions"
+   "sessionprovider-centralauthtokensessionprovider": "centralauthtoken 
sessions",
+   "log-action-filter-globalauth": "Type of change:",
+   "log-action-filter-globalauth-delete": "Global account deletion",
+   "log-action-filter-globalauth-setstatus": "Global account status 
change",
+   "log-action-filter-suppress-setstatus": "Global account status change",
+   "log-action-filter-suppress-cadelete": "Global account deletion"
 }
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 22aebdb..2d2476b 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -573,5 +573,10 @@
"centralauth-uwbr-intro": "Text above table which lists users who will 
be renamed.",
"centralauth-delete-empty-account": "Used as the reason by the 
deleteEmptyAccounts.php maintenance script when deleting an account with no 
attached local accounts.",
"sessionprovider-centralauthsessionprovider": "Description of the 
sessions provided by the CentralAuthSessionProvider class, which use HTTP 
cookies. Should be phrased to make sense when added to a message such as 
{{msg-mw|cannotloginnow-text}}.",
-   "sessionprovider-centralauthtokensessionprovider": "Description of the 
sessions provided by the CentralAuthTokenSessionProvider class, which uses the 
'centralauthtoken' parameter on API requests. Should be phrased to make sense 
when added to a message such as {{msg-mw|cannotloginnow-text}}."
+   "sessionprovider-centralauthtokensessionprovider": "Description of the 
sessions provided by the CentralAuthTokenSessionProvider class, which uses the 
'centralauthtoken' parameter on API requests. Should be phrased to make sense 
when added to a message such as {{msg-mw|cannotloginnow-text}}.",
+   "log-action-filter-globalauth": 
"{{doc-log-action-filter-type|globalauth}}",
+   "log-action-filter-globalauth-delete": 
"{{doc-log-action-filter-action|globalauth|delete}}",
+   "log-action-filter-globalauth-setstatus": 
"{{doc-log-action-filter-action|globalauth|setstatus}}",
+   "log-action-filter-suppress-setstatus": 
"{{doc-log-action-filter-action|suppress|setstatus}}",
+   "log-action-filter-suppress-cadelete": 
"{{doc-log-action-filter-action|suppress|cadelete}}"
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I443b8397ea047c62dfab5663c33730e6fdc5c6d9
Gerrit-PatchSet: 8
Gerrit-Project: mediawiki/extensions/CentralAuth
Gerrit-Branch: master
Gerrit-Owner: Alex Monk 
Gerrit-Reviewer: Alex Monk 
Gerrit-Reviewer: Glaisher 
Gerrit-Reviewer: Jdlrobson 
Gerrit-Reviewer: Legoktm 

[MediaWiki-commits] [Gerrit] Hygiene: consolidate URL usage - change (apps...wikipedia)

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

Change subject: Hygiene: consolidate URL usage
..


Hygiene: consolidate URL usage

Rename new Wikipedia URL constant and replace duplicate string in Prefs.
No functional changes intended.

Change-Id: I794d7e37ed415d2f6d505c255e1f76882fc9dfc2
---
M app/src/main/java/org/wikipedia/Constants.java
M 
app/src/main/java/org/wikipedia/createaccount/authmanager/AMCreateAccountTask.java
M app/src/main/java/org/wikipedia/login/authmanager/AMLoginTask.java
M app/src/main/java/org/wikipedia/settings/Prefs.java
4 files changed, 6 insertions(+), 6 deletions(-)

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



diff --git a/app/src/main/java/org/wikipedia/Constants.java 
b/app/src/main/java/org/wikipedia/Constants.java
index 7e5a5f2..4cd40ad 100644
--- a/app/src/main/java/org/wikipedia/Constants.java
+++ b/app/src/main/java/org/wikipedia/Constants.java
@@ -7,7 +7,7 @@
 public static final int RECENT_SEARCHES_FRAGMENT_LOADER_ID = 101;
 public static final int USER_OPTION_ROW_FRAGMENT_LOADER_ID = 102;
 
-public static final String DEFAULT_AUTH_MANAGER_RETURN_URL = 
"https://www.wikipedia.org;;
+public static final String WIKIPEDIA_URL = "https://wikipedia.org/;;
 
 private Constants() { }
 }
diff --git 
a/app/src/main/java/org/wikipedia/createaccount/authmanager/AMCreateAccountTask.java
 
b/app/src/main/java/org/wikipedia/createaccount/authmanager/AMCreateAccountTask.java
index 5c82981..4928dcc 100644
--- 
a/app/src/main/java/org/wikipedia/createaccount/authmanager/AMCreateAccountTask.java
+++ 
b/app/src/main/java/org/wikipedia/createaccount/authmanager/AMCreateAccountTask.java
@@ -51,7 +51,7 @@
 .param("password", password)
 .param("retype", repeatPassword)
 .param("createtoken", token)
-.param("createreturnurl", 
Constants.DEFAULT_AUTH_MANAGER_RETURN_URL);
+.param("createreturnurl", Constants.WIKIPEDIA_URL);
 if (email != null) {
 builder.param("email", email);
 }
diff --git a/app/src/main/java/org/wikipedia/login/authmanager/AMLoginTask.java 
b/app/src/main/java/org/wikipedia/login/authmanager/AMLoginTask.java
index 3fcaf47..8a01bdd 100644
--- a/app/src/main/java/org/wikipedia/login/authmanager/AMLoginTask.java
+++ b/app/src/main/java/org/wikipedia/login/authmanager/AMLoginTask.java
@@ -44,7 +44,7 @@
 .param("username", username)
 .param("password", password)
 .param("logintoken", token)
-.param("loginreturnurl", 
Constants.DEFAULT_AUTH_MANAGER_RETURN_URL);
+.param("loginreturnurl", Constants.WIKIPEDIA_URL);
 }
 
 @Override
diff --git a/app/src/main/java/org/wikipedia/settings/Prefs.java 
b/app/src/main/java/org/wikipedia/settings/Prefs.java
index 6e6296a..794c9b1 100644
--- a/app/src/main/java/org/wikipedia/settings/Prefs.java
+++ b/app/src/main/java/org/wikipedia/settings/Prefs.java
@@ -4,6 +4,7 @@
 import android.support.annotation.NonNull;
 import android.support.annotation.Nullable;
 
+import org.wikipedia.Constants;
 import org.wikipedia.R;
 import org.wikipedia.SharedPreferenceCookieManager;
 import org.wikipedia.WikipediaApp;
@@ -237,8 +238,7 @@
 
 public static int getSessionTimeout() {
 // return the timeout, but don't let it be less than the minimum
-return Math.max(getInt(R.string.preference_key_session_timeout,
-SessionFunnel.DEFAULT_SESSION_TIMEOUT), 
SessionFunnel.MIN_SESSION_TIMEOUT);
+return Math.max(getInt(R.string.preference_key_session_timeout, 
SessionFunnel.DEFAULT_SESSION_TIMEOUT), SessionFunnel.MIN_SESSION_TIMEOUT);
 }
 
 public static int getTextSizeMultiplier() {
@@ -308,7 +308,7 @@
 @NonNull
 public static Uri getMediaWikiBaseUri() {
 return 
Uri.parse(StringUtil.defaultIfBlank(getString(R.string.preference_key_mediawiki_base_uri,
 null),
-"https://wikipedia.org/;));
+Constants.WIKIPEDIA_URL));
 }
 
 public static boolean getMediaWikiBaseUriSupportsLangCode() {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I794d7e37ed415d2f6d505c255e1f76882fc9dfc2
Gerrit-PatchSet: 3
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

[MediaWiki-commits] [Gerrit] Add style to the NotificationsWrapper - change (mediawiki...Echo)

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

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

Change subject: Add style to the NotificationsWrapper
..

Add style to the NotificationsWrapper

We have to make sure that any notifications wrapper has the css
term overflow-y: auto; so that the popup menus behave properly.

Change-Id: I14a1a9f1c3610ef27fe04aa4b1e7197c08d1dfd4
---
M Resources.php
A modules/styles/mw.echo.ui.NotificationsWrapper.less
M modules/ui/mw.echo.ui.NotificationsWrapper.js
3 files changed, 5 insertions(+), 0 deletions(-)


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

diff --git a/Resources.php b/Resources.php
index 1049734..7347559 100644
--- a/Resources.php
+++ b/Resources.php
@@ -90,6 +90,7 @@
'styles/mw.echo.ui.SubGroupListWidget.less',
'styles/mw.echo.ui.MenuItemWidget.less',
'styles/mw.echo.ui.FooterNoticeWidget.less',
+   'styles/mw.echo.ui.NotificationsWrapper.less',
),
'skinStyles' => array(
'monobook' => array(
diff --git a/modules/styles/mw.echo.ui.NotificationsWrapper.less 
b/modules/styles/mw.echo.ui.NotificationsWrapper.less
new file mode 100644
index 000..0cea05c
--- /dev/null
+++ b/modules/styles/mw.echo.ui.NotificationsWrapper.less
@@ -0,0 +1,3 @@
+.mw-echo-notificationsWrapper {
+   overflow-y: auto;
+}
diff --git a/modules/ui/mw.echo.ui.NotificationsWrapper.js 
b/modules/ui/mw.echo.ui.NotificationsWrapper.js
index 00d98c5..cc54515 100644
--- a/modules/ui/mw.echo.ui.NotificationsWrapper.js
+++ b/modules/ui/mw.echo.ui.NotificationsWrapper.js
@@ -37,6 +37,7 @@
 
// Initialize
this.$element
+   .addClass( 'mw-echo-notificationsWrapper' )
.append( this.notificationsWidget.$element );
};
 

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

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

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


[MediaWiki-commits] [Gerrit] Disallow setting contribution tracking ID from request - change (mediawiki...DonationInterface)

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

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

Change subject: Disallow setting contribution tracking ID from request
..

Disallow setting contribution tracking ID from request

Should be OK since we don't generate that on donatewiki any more.

It will be generated fresh whenever it's not in session.

Bug: T135745
Change-Id: I92c90f20069b1633d21032be30e6770a65d24a14
---
M gateway_common/DonationData.php
M tests/Adapter/GatewayAdapterTest.php
2 files changed, 7 insertions(+), 4 deletions(-)


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

diff --git a/gateway_common/DonationData.php b/gateway_common/DonationData.php
index 02064d0..b8d3f0d 100644
--- a/gateway_common/DonationData.php
+++ b/gateway_common/DonationData.php
@@ -71,7 +71,6 @@
'language',
'uselang',
'wmf_token',
-   'contribution_tracking_id',
'data_hash',
'action',
'gateway',
@@ -486,6 +485,10 @@
 * @return bool True if a new record was created
 */
protected function handleContributionTrackingID() {
+   $ctid = $this->gateway->session_getData( 'Donor', 
'contribution_tracking_id' );
+   if ( $ctid ) {
+   $this->setVal( 'contribution_tracking_id', $ctid );
+   }
if ( !$this->isSomething( 'contribution_tracking_id' ) ) {
$ctid = $this->saveContributionTrackingData();
if ( $ctid ) {
diff --git a/tests/Adapter/GatewayAdapterTest.php 
b/tests/Adapter/GatewayAdapterTest.php
index d5700b3..49d9847 100644
--- a/tests/Adapter/GatewayAdapterTest.php
+++ b/tests/Adapter/GatewayAdapterTest.php
@@ -133,15 +133,15 @@
public function testResetOnGatewaySwitch() {
// Fill the session with some GlobalCollect stuff
$init = $this->getDonorTestData( 'FR' );
-   $init['contribution_tracking_id'] = mt_rand();
$firstRequest = $this->setUpRequest( $init );
$globalcollect_gateway = new TestingGlobalCollectAdapter();
$globalcollect_gateway->do_transaction( 'Donate' );
 
$session = $firstRequest->getSessionArray();
+   $ctId = $session['contribution_tracking_id'];
$this->assertEquals( 'globalcollect', 
$session['Donor']['gateway'], 'Test setup failed.' );
 
-   //Then simpulate switching to Worldpay
+   //Then simulate switching to Worldpay
$session['sequence'] = 2;
unset( $init['order_id'] );
 
@@ -150,7 +150,7 @@
$worldpay_gateway->batch_mode = true;
 
$session = $secondRequest->getSessionArray();
-   $expected_order_id = 
"{$init['contribution_tracking_id']}.{$session['sequence']}";
+   $expected_order_id = "$ctId.{$session['sequence']}";
$this->assertEquals( $expected_order_id, 
$worldpay_gateway->getData_Unstaged_Escaped( 'order_id' ),
'Order ID was not regenerated on gateway switch!' );
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I92c90f20069b1633d21032be30e6770a65d24a14
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] Avoid master queries on GET in showPermissionError() - change (mediawiki...Wikibase)

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

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

Change subject: Avoid master queries on GET in showPermissionError()
..

Avoid master queries on GET in showPermissionError()

Bug: T92357
Change-Id: I87e48326732d4e207c421e5e1d07de1a4f6ec28a
---
M repo/includes/Actions/EditEntityAction.php
1 file changed, 5 insertions(+), 2 deletions(-)


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

diff --git a/repo/includes/Actions/EditEntityAction.php 
b/repo/includes/Actions/EditEntityAction.php
index f6228a3..c44a7a7 100644
--- a/repo/includes/Actions/EditEntityAction.php
+++ b/repo/includes/Actions/EditEntityAction.php
@@ -123,9 +123,12 @@
 * @return bool true if there were permission errors
 */
protected function showPermissionError( $action ) {
-   if ( !$this->getTitle()->userCan( $action, $this->getUser() ) ) 
{
+   $rigor = $this->getRequest()->wasPosted() ? 'secure' : 'full';
+
+   if ( !$this->getTitle()->userCan( $action, $this->getUser(), 
$rigor ) ) {
$this->getOutput()->showPermissionsErrorPage(
-   array( 
$this->getTitle()->getUserPermissionsErrors( $action, $this->getUser() ) ),
+   [ $this->getTitle()
+   ->getUserPermissionsErrors( $action, 
$this->getUser(), $rigor ) ],
$action
);
 

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

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

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


[MediaWiki-commits] [Gerrit] Add phplint to composer - change (mediawiki...CentralAuth)

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

Change subject: Add phplint to composer
..


Add phplint to composer

This adds the composer.json file so we can run phplint from composer.

Change-Id: I539fbf3ea952f95a2dd0d3ce2c12ea3901bd7960
---
M .gitignore
A composer.json
2 files changed, 11 insertions(+), 1 deletion(-)

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



diff --git a/.gitignore b/.gitignore
index dddadef..7bbb100 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,6 +1,6 @@
-.svn
 *~
 *.kate-swp
 .*.swp
 /nbproject/private/
 node_modules/
+vendor/
diff --git a/composer.json b/composer.json
new file mode 100644
index 000..1c63f9e
--- /dev/null
+++ b/composer.json
@@ -0,0 +1,10 @@
+{
+   "require-dev": {
+   "jakub-onderka/php-parallel-lint": "0.9.2"
+   },
+   "scripts": {
+   "test": [
+   "parallel-lint . --exclude vendor"
+   ]
+   }
+}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I539fbf3ea952f95a2dd0d3ce2c12ea3901bd7960
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/CentralAuth
Gerrit-Branch: master
Gerrit-Owner: Paladox 
Gerrit-Reviewer: Aude 
Gerrit-Reviewer: CSteipp 
Gerrit-Reviewer: Gergő Tisza 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: JanZerebecki 
Gerrit-Reviewer: Jdlrobson 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Paladox 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Update login and account creation to work with AuthManager - change (apps...wikipedia)

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

Change subject: Update login and account creation to work with AuthManager
..


Update login and account creation to work with AuthManager

This updates the app's API calls to work with changes to the API
associated with the launch of AuthManager.

This does not remove any code but rather detects whether AuthManager is
enabled for the app site so that login and account creation can be handled
appropriately.  When legacy login and account creation are disabled on all
Wikipedias, the code to handle them can be removed accordingly.

Bug: T124229
Change-Id: Idcb8c8c05a8fa8321ce7bc67d3b4bea6393419f8
---
M app/build.gradle
M app/src/androidTest/java/org/wikipedia/test/CreateAccountTaskTest.java
M app/src/androidTest/java/org/wikipedia/test/LoginTaskTest.java
M app/src/main/java/org/wikipedia/Constants.java
M app/src/main/java/org/wikipedia/OkHttpConnectionFactory.java
M app/src/main/java/org/wikipedia/WikipediaApp.java
A app/src/main/java/org/wikipedia/createaccount/CompatCreateAccountResult.java
M app/src/main/java/org/wikipedia/createaccount/CreateAccountActivity.java
M app/src/main/java/org/wikipedia/createaccount/CreateAccountResult.java
A 
app/src/main/java/org/wikipedia/createaccount/authmanager/AMCreateAccountCaptchaResult.java
A 
app/src/main/java/org/wikipedia/createaccount/authmanager/AMCreateAccountInfoResult.java
A 
app/src/main/java/org/wikipedia/createaccount/authmanager/AMCreateAccountInfoTask.java
A 
app/src/main/java/org/wikipedia/createaccount/authmanager/AMCreateAccountResult.java
A 
app/src/main/java/org/wikipedia/createaccount/authmanager/AMCreateAccountSuccessResult.java
A 
app/src/main/java/org/wikipedia/createaccount/authmanager/AMCreateAccountTask.java
M app/src/main/java/org/wikipedia/editing/CaptchaHandler.java
M app/src/main/java/org/wikipedia/editing/EditSectionActivity.java
M app/src/main/java/org/wikipedia/login/LoginActivity.java
A app/src/main/java/org/wikipedia/login/authmanager/AMLoginInfoResult.java
A app/src/main/java/org/wikipedia/login/authmanager/AMLoginInfoTask.java
A app/src/main/java/org/wikipedia/login/authmanager/AMLoginResult.java
A app/src/main/java/org/wikipedia/login/authmanager/AMLoginTask.java
22 files changed, 918 insertions(+), 90 deletions(-)

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



diff --git a/app/build.gradle b/app/build.gradle
index 6b7a586..a9826a1 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -173,6 +173,7 @@
 compile "com.android.support:preference-v14:$supportVersion"
 compile "com.facebook.fresco:animated-gif:$frescoVersion"
 compile "com.facebook.fresco:fresco:$frescoVersion"
+compile "com.facebook.fresco:imagepipeline-okhttp3:$frescoVersion"
 compile 'com.google.code.gson:gson:2.6.2'
 compile "com.squareup.okhttp3:okhttp-urlconnection:$okHttpVersion" // for 
JavaNetCookieJar
 compile "com.squareup.okhttp3:logging-interceptor:$okHttpVersion"
diff --git 
a/app/src/androidTest/java/org/wikipedia/test/CreateAccountTaskTest.java 
b/app/src/androidTest/java/org/wikipedia/test/CreateAccountTaskTest.java
index 5b54ae7..8d69a01 100644
--- a/app/src/androidTest/java/org/wikipedia/test/CreateAccountTaskTest.java
+++ b/app/src/androidTest/java/org/wikipedia/test/CreateAccountTaskTest.java
@@ -7,13 +7,21 @@
 import org.junit.runner.RunWith;
 import org.wikipedia.Site;
 import org.wikipedia.WikipediaApp;
+import org.wikipedia.createaccount.CompatCreateAccountResult;
 import org.wikipedia.createaccount.CreateAccountCaptchaResult;
+import org.wikipedia.createaccount.authmanager.AMCreateAccountResult;
+import org.wikipedia.createaccount.authmanager.AMCreateAccountSuccessResult;
+import org.wikipedia.createaccount.authmanager.AMCreateAccountTask;
 import org.wikipedia.createaccount.CreateAccountResult;
 import org.wikipedia.createaccount.CreateAccountSuccessResult;
 import org.wikipedia.createaccount.CreateAccountTask;
 import org.wikipedia.editing.CaptchaResult;
+import org.wikipedia.login.authmanager.AMLoginInfoResult;
+import org.wikipedia.login.authmanager.AMLoginInfoTask;
 import org.wikipedia.testlib.TestLatch;
+import org.wikipedia.util.log.L;
 
+import static junit.framework.Assert.fail;
 import static android.support.test.InstrumentationRegistry.getTargetContext;
 import static org.hamcrest.MatcherAssert.assertThat;
 import static org.hamcrest.Matchers.instanceOf;
@@ -24,33 +32,110 @@
 
 @RunWith(AndroidJUnit4.class)
 public class CreateAccountTaskTest {
+private static Site TEST_WIKI = new Site("test.wikipedia.org");
+private boolean isAuthManagerEnabled = false;
+
+private LoginInfo loginInfo = new LoginInfo() {
+@Override
+public void onCatch(Throwable caught) {
+L.e(caught);
+fail();
+}
+
+@Override
+public void onFinish(AMLoginInfoResult result) {
+

[MediaWiki-commits] [Gerrit] temp. setup to use db2007 for RT upgrade test - change (operations/puppet)

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

Change subject: temp. setup to use db2007 for RT upgrade test
..


temp. setup to use db2007 for RT upgrade test

This is a temp. setup to use db2007 with a copy
of the RT database to test changes during a version
upgrade. The server is in the process of being decom'ed
and this will be removed again.

Bug:T119112
Bug:T125827
Change-Id: Iebdbebd7aacb07051785afcb795a652c505e19ba
---
M manifests/site.pp
A modules/role/manifests/requesttracker/upgradetest.pp
2 files changed, 43 insertions(+), 0 deletions(-)

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



diff --git a/manifests/site.pp b/manifests/site.pp
index 54954d3..e4475cd 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -708,6 +708,11 @@
 include base::firewall
 }
 
+# temp. used by dzahn for RT upgrade test
+node 'db2007.codfw.wmnet' {
+role requesttracker::upgradetest
+}
+
 node /^db20(08|09)\.codfw\.wmnet/ {
 class { 'role::mariadb::core':
 shard => 'x1',
diff --git a/modules/role/manifests/requesttracker/upgradetest.pp 
b/modules/role/manifests/requesttracker/upgradetest.pp
new file mode 100644
index 000..073acaa
--- /dev/null
+++ b/modules/role/manifests/requesttracker/upgradetest.pp
@@ -0,0 +1,38 @@
+#  temp. setup for testing RT migration to jessie
+class role::requesttracker::upgradetest {
+system::role { 'role::requesttracker::upgradetest': description => 'temp 
test setup for RT migration to jessie' }
+
+include base::firewall
+include rsync::server
+
+# copy db dump from slave via rsync
+$sourceip='10.64.0.20' # m1-slave.eqiad
+
+ferm::service { 'rt-db-rsync':
+proto  => 'tcp',
+port   => '873',
+srange => "${sourceip}/32",
+}
+
+rsync::server::module { 'rtdb':
+path=> '/srv/rt',
+read_only   => 'no',
+hosts_allow => $sourceip,
+}
+
+# allow mysql connect from new jessie box
+ferm::service { 'rt-db-mysql':
+proto  => 'tcp',
+port   => '3306',
+srange => '208.80.154.84/32', # ununpentium
+}
+
+package { 'mariadb-server':
+ensure => 'present',
+}
+
+service { 'mysql':
+ensure => 'running',
+}
+
+}

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

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

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


[MediaWiki-commits] [Gerrit] Lowered $wgMaxUserDBWriteDuration to 5 - change (operations/mediawiki-config)

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

Change subject: Lowered $wgMaxUserDBWriteDuration to 5
..


Lowered $wgMaxUserDBWriteDuration to 5

Bug: T95501
Change-Id: I1d26719844adbb12be1590c89d149121615ba48d
---
M wmf-config/CommonSettings.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index 7aae128..84720d3 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -217,7 +217,7 @@
 }
 
 # Disallow web request DB transactions slower than this
-$wgMaxUserDBWriteDuration = 6.0;
+$wgMaxUserDBWriteDuration = 5;
 # Activate read-only mode for bots when lag is getting high.
 # This should be lower than 'max lag' in the LBFactory conf.
 $wgAPIMaxLagThreshold = 6;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1d26719844adbb12be1590c89d149121615ba48d
Gerrit-PatchSet: 5
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz 
Gerrit-Reviewer: Aaron Schulz 
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: Gilles 
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] Use inNamespace in CategoryPage - change (mediawiki/core)

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

Change subject: Use inNamespace in CategoryPage
..


Use inNamespace in CategoryPage

Change-Id: I55dae5163d62c25536fb040764cab99cd4deb9b7
---
M includes/page/CategoryPage.php
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/includes/page/CategoryPage.php b/includes/page/CategoryPage.php
index 55fe156..d493002 100644
--- a/includes/page/CategoryPage.php
+++ b/includes/page/CategoryPage.php
@@ -71,13 +71,13 @@
}
 
$title = $this->getTitle();
-   if ( NS_CATEGORY == $title->getNamespace() ) {
+   if ( $title->inNamespace( NS_CATEGORY ) ) {
$this->openShowCategory();
}
 
parent::view();
 
-   if ( NS_CATEGORY == $title->getNamespace() ) {
+   if ( $title->inNamespace( NS_CATEGORY ) ) {
$this->closeShowCategory();
}
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I55dae5163d62c25536fb040764cab99cd4deb9b7
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Nikerabbit 
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] mv files/misc/udp2log.init into modules/udp2log - change (operations/puppet)

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

Change subject: mv files/misc/udp2log.init into modules/udp2log
..


mv files/misc/udp2log.init into modules/udp2log

Same here,just to move things out of files/misc/.

Change-Id: Ibc1488401b03e6b2ae252d5c0aae92d8aba22278
---
R modules/udp2log/files/udp2log.init
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Ottomata: Looks good to me, but someone else must approve
  Dzahn: Verified; Looks good to me, approved



diff --git a/files/misc/udp2log.init b/modules/udp2log/files/udp2log.init
similarity index 93%
rename from files/misc/udp2log.init
rename to modules/udp2log/files/udp2log.init
index d361356..1587378 100755
--- a/files/misc/udp2log.init
+++ b/modules/udp2log/files/udp2log.init
@@ -1,7 +1,7 @@
 #!/bin/sh
 #
-### THIS FILE IS MANAGED BY PUPPET 
-### puppet:///files/misc/udp2log.init
+### THIS FILE IS MANAGED BY PUPPET
+### puppet:///modules/udp2log/udp2log.init
 #
 
 # Start/stop the udp2log daemon.

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibc1488401b03e6b2ae252d5c0aae92d8aba22278
Gerrit-PatchSet: 4
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: Ottomata 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Upgrade remaining RESTBase staging nodes to 2.2.6 - change (operations/puppet)

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

Change subject: Upgrade remaining RESTBase staging nodes to 2.2.6
..


Upgrade remaining RESTBase staging nodes to 2.2.6

Bug: T126629
Change-Id: I2aecc4701588238a0310226e390430de67579104
---
M hieradata/hosts/xenon.yaml
M hieradata/regex.yaml
2 files changed, 2 insertions(+), 1 deletion(-)

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



diff --git a/hieradata/hosts/xenon.yaml b/hieradata/hosts/xenon.yaml
index 16e916e..bbb2f42 100644
--- a/hieradata/hosts/xenon.yaml
+++ b/hieradata/hosts/xenon.yaml
@@ -7,4 +7,3 @@
 listen_address: 10.64.0.202
 rpc_address: 10.64.0.202
 rpc_interface: eth0
-cassandra::target_version: '2.2'
diff --git a/hieradata/regex.yaml b/hieradata/regex.yaml
index 837750a..9601fe1 100644
--- a/hieradata/regex.yaml
+++ b/hieradata/regex.yaml
@@ -151,6 +151,7 @@
   - .*\.stddev$
   restbase::logging_name: restbase-test
   cassandra::start_rpc: 'true'
+  cassandra::target_version: '2.2'
 
 cassandra_test_codfw:
   __regex: !ruby/regexp /^restbase-test200[1-3]\.codfw\.wmnet$/
@@ -229,6 +230,7 @@
   - .*\.stddev$
   restbase::logging_name: restbase-test
   cassandra::start_rpc: 'true'
+  cassandra::target_version: '2.2'
 
 swift_be_codfw_dell:
   __regex: !ruby/regexp /^ms-be20(0[0-9]|1[0-5])\.codfw\.wmnet$/

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2aecc4701588238a0310226e390430de67579104
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Eevans 
Gerrit-Reviewer: GWicke 
Gerrit-Reviewer: Mobrovac 
Gerrit-Reviewer: Ottomata 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Install heirloom-mailx on analytics clients - change (operations/puppet)

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

Change subject: Install heirloom-mailx on analytics clients
..


Install heirloom-mailx on analytics clients

Change-Id: I16aee86a29403b4813d9e378a0e4c921b2a2d26e
---
M modules/role/manifests/analytics_cluster/client.pp
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/modules/role/manifests/analytics_cluster/client.pp 
b/modules/role/manifests/analytics_cluster/client.pp
index 7237a37..5561133 100644
--- a/modules/role/manifests/analytics_cluster/client.pp
+++ b/modules/role/manifests/analytics_cluster/client.pp
@@ -26,6 +26,7 @@
 ensure_packages([
 'ipython-notebook',
 'kafkacat',
+'heirloom-mailx',
 ])
 
 # include maven to build jars for Hadoop.

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I16aee86a29403b4813d9e378a0e4c921b2a2d26e
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ottomata 
Gerrit-Reviewer: Ottomata 

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


[MediaWiki-commits] [Gerrit] Upgrade remaining RESTBase staging nodes to 2.2.6 - change (operations/puppet)

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

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

Change subject: Upgrade remaining RESTBase staging nodes to 2.2.6
..

Upgrade remaining RESTBase staging nodes to 2.2.6

Bug: T126629
Change-Id: I2aecc4701588238a0310226e390430de67579104
---
M hieradata/hosts/xenon.yaml
M hieradata/regex.yaml
2 files changed, 2 insertions(+), 1 deletion(-)


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

diff --git a/hieradata/hosts/xenon.yaml b/hieradata/hosts/xenon.yaml
index 16e916e..bbb2f42 100644
--- a/hieradata/hosts/xenon.yaml
+++ b/hieradata/hosts/xenon.yaml
@@ -7,4 +7,3 @@
 listen_address: 10.64.0.202
 rpc_address: 10.64.0.202
 rpc_interface: eth0
-cassandra::target_version: '2.2'
diff --git a/hieradata/regex.yaml b/hieradata/regex.yaml
index 837750a..9601fe1 100644
--- a/hieradata/regex.yaml
+++ b/hieradata/regex.yaml
@@ -151,6 +151,7 @@
   - .*\.stddev$
   restbase::logging_name: restbase-test
   cassandra::start_rpc: 'true'
+  cassandra::target_version: '2.2'
 
 cassandra_test_codfw:
   __regex: !ruby/regexp /^restbase-test200[1-3]\.codfw\.wmnet$/
@@ -229,6 +230,7 @@
   - .*\.stddev$
   restbase::logging_name: restbase-test
   cassandra::start_rpc: 'true'
+  cassandra::target_version: '2.2'
 
 swift_be_codfw_dell:
   __regex: !ruby/regexp /^ms-be20(0[0-9]|1[0-5])\.codfw\.wmnet$/

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

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

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


[MediaWiki-commits] [Gerrit] Remove stray "gerrit" - change (translatewiki)

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

Change subject: Remove stray "gerrit"
..


Remove stray "gerrit"

Change-Id: Ib713178b33ddff7a4a4c60027695e1ba683d703d
---
M bin/merge-wmgerrit-patches
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/bin/merge-wmgerrit-patches b/bin/merge-wmgerrit-patches
index 9d39db2..cbc97f4 100755
--- a/bin/merge-wmgerrit-patches
+++ b/bin/merge-wmgerrit-patches
@@ -5,5 +5,5 @@
 
 for i in `ssh $GERRIT query --format=TEXT owner:$U status:open | grep '  url:' 
|cut -d/ -f5 |sort`
 do
-ssh $GERRIT gerrit review $i,1 --code-review 2 --verified 2 --submit
+ssh $GERRIT review $i,1 --code-review 2 --verified 2 --submit
 done

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib713178b33ddff7a4a4c60027695e1ba683d703d
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Siebrand 
Gerrit-Reviewer: Siebrand 

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


[MediaWiki-commits] [Gerrit] Hygiene: Remove wildcard imports - change (apps...wikipedia)

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

Change subject: Hygiene: Remove wildcard imports
..


Hygiene: Remove wildcard imports

Change-Id: Ic6b82ac64cd510bc8e3f5d24baa7640bbc5687a5
---
M app/src/main/java/org/wikipedia/createaccount/CreateAccountActivity.java
M app/src/main/java/org/wikipedia/editing/EditPreviewFragment.java
M app/src/main/java/org/wikipedia/interlanguage/LangLinksActivity.java
M app/src/main/java/org/wikipedia/login/LoginActivity.java
4 files changed, 17 insertions(+), 4 deletions(-)

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



diff --git 
a/app/src/main/java/org/wikipedia/createaccount/CreateAccountActivity.java 
b/app/src/main/java/org/wikipedia/createaccount/CreateAccountActivity.java
index 694635c..44fd00f 100644
--- a/app/src/main/java/org/wikipedia/createaccount/CreateAccountActivity.java
+++ b/app/src/main/java/org/wikipedia/createaccount/CreateAccountActivity.java
@@ -21,7 +21,10 @@
 import org.mediawiki.api.json.Api;
 import org.mediawiki.api.json.ApiException;
 import org.mediawiki.api.json.RequestBuilder;
-import org.wikipedia.*;
+import org.wikipedia.NonEmptyValidator;
+import org.wikipedia.R;
+import org.wikipedia.ViewAnimations;
+import org.wikipedia.WikipediaApp;
 import org.wikipedia.activity.ActivityUtil;
 import org.wikipedia.activity.ThemedActionBarActivity;
 import org.wikipedia.analytics.CreateAccountFunnel;
diff --git a/app/src/main/java/org/wikipedia/editing/EditPreviewFragment.java 
b/app/src/main/java/org/wikipedia/editing/EditPreviewFragment.java
index d3d8a39..11b8fd8 100644
--- a/app/src/main/java/org/wikipedia/editing/EditPreviewFragment.java
+++ b/app/src/main/java/org/wikipedia/editing/EditPreviewFragment.java
@@ -18,7 +18,11 @@
 import org.json.JSONException;
 import org.json.JSONObject;
 import org.mediawiki.api.json.ApiException;
-import org.wikipedia.*;
+import org.wikipedia.NightModeHandler;
+import org.wikipedia.R;
+import org.wikipedia.Site;
+import org.wikipedia.ViewAnimations;
+import org.wikipedia.WikipediaApp;
 import org.wikipedia.analytics.EditFunnel;
 import org.wikipedia.bridge.StyleBundle;
 import org.wikipedia.page.PageTitle;
diff --git 
a/app/src/main/java/org/wikipedia/interlanguage/LangLinksActivity.java 
b/app/src/main/java/org/wikipedia/interlanguage/LangLinksActivity.java
index 2a9304c..f4afc00 100644
--- a/app/src/main/java/org/wikipedia/interlanguage/LangLinksActivity.java
+++ b/app/src/main/java/org/wikipedia/interlanguage/LangLinksActivity.java
@@ -14,7 +14,10 @@
 import android.widget.ListView;
 import android.widget.TextView;
 
-import org.wikipedia.*;
+import org.wikipedia.R;
+import org.wikipedia.Site;
+import org.wikipedia.ViewAnimations;
+import org.wikipedia.WikipediaApp;
 import org.wikipedia.activity.ActivityUtil;
 import org.wikipedia.activity.ThemedActionBarActivity;
 import org.wikipedia.history.HistoryEntry;
diff --git a/app/src/main/java/org/wikipedia/login/LoginActivity.java 
b/app/src/main/java/org/wikipedia/login/LoginActivity.java
index bfaee56..099a166 100644
--- a/app/src/main/java/org/wikipedia/login/LoginActivity.java
+++ b/app/src/main/java/org/wikipedia/login/LoginActivity.java
@@ -15,7 +15,10 @@
 import android.view.inputmethod.EditorInfo;
 import android.widget.EditText;
 import android.widget.TextView;
-import org.wikipedia.*;
+
+import org.wikipedia.NonEmptyValidator;
+import org.wikipedia.R;
+import org.wikipedia.WikipediaApp;
 import org.wikipedia.activity.ActivityUtil;
 import org.wikipedia.activity.ThemedActionBarActivity;
 import org.wikipedia.analytics.LoginFunnel;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic6b82ac64cd510bc8e3f5d24baa7640bbc5687a5
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Mholloway 
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] all wikis to 1.28.0-wmf.2 - change (operations/mediawiki-config)

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

Change subject: all wikis to 1.28.0-wmf.2
..


all wikis to 1.28.0-wmf.2

Change-Id: I64c53ad634406760cf0c70fe53ba7de4b2fe60d4
---
M wikiversions.json
1 file changed, 297 insertions(+), 297 deletions(-)

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



diff --git a/wikiversions.json b/wikiversions.json
index 6ca937b..e01bc85 100644
--- a/wikiversions.json
+++ b/wikiversions.json
@@ -1,39 +1,39 @@
 {
-"aawiki": "php-1.28.0-wmf.1",
+"aawiki": "php-1.28.0-wmf.2",
 "aawikibooks": "php-1.28.0-wmf.2",
 "aawiktionary": "php-1.28.0-wmf.2",
-"abwiki": "php-1.28.0-wmf.1",
+"abwiki": "php-1.28.0-wmf.2",
 "abwiktionary": "php-1.28.0-wmf.2",
-"acewiki": "php-1.28.0-wmf.1",
+"acewiki": "php-1.28.0-wmf.2",
 "advisorywiki": "php-1.28.0-wmf.2",
-"adywiki": "php-1.28.0-wmf.1",
-"afwiki": "php-1.28.0-wmf.1",
+"adywiki": "php-1.28.0-wmf.2",
+"afwiki": "php-1.28.0-wmf.2",
 "afwikibooks": "php-1.28.0-wmf.2",
 "afwikiquote": "php-1.28.0-wmf.2",
 "afwiktionary": "php-1.28.0-wmf.2",
-"akwiki": "php-1.28.0-wmf.1",
+"akwiki": "php-1.28.0-wmf.2",
 "akwikibooks": "php-1.28.0-wmf.2",
 "akwiktionary": "php-1.28.0-wmf.2",
-"alswiki": "php-1.28.0-wmf.1",
+"alswiki": "php-1.28.0-wmf.2",
 "alswikibooks": "php-1.28.0-wmf.2",
 "alswikiquote": "php-1.28.0-wmf.2",
 "alswiktionary": "php-1.28.0-wmf.2",
-"amwiki": "php-1.28.0-wmf.1",
+"amwiki": "php-1.28.0-wmf.2",
 "amwikiquote": "php-1.28.0-wmf.2",
 "amwiktionary": "php-1.28.0-wmf.2",
-"angwiki": "php-1.28.0-wmf.1",
+"angwiki": "php-1.28.0-wmf.2",
 "angwikibooks": "php-1.28.0-wmf.2",
 "angwikiquote": "php-1.28.0-wmf.2",
 "angwikisource": "php-1.28.0-wmf.2",
 "angwiktionary": "php-1.28.0-wmf.2",
-"anwiki": "php-1.28.0-wmf.1",
+"anwiki": "php-1.28.0-wmf.2",
 "anwiktionary": "php-1.28.0-wmf.2",
-"arbcom_dewiki": "php-1.28.0-wmf.1",
-"arbcom_enwiki": "php-1.28.0-wmf.1",
-"arbcom_fiwiki": "php-1.28.0-wmf.1",
-"arbcom_nlwiki": "php-1.28.0-wmf.1",
-"arcwiki": "php-1.28.0-wmf.1",
-"arwiki": "php-1.28.0-wmf.1",
+"arbcom_dewiki": "php-1.28.0-wmf.2",
+"arbcom_enwiki": "php-1.28.0-wmf.2",
+"arbcom_fiwiki": "php-1.28.0-wmf.2",
+"arbcom_nlwiki": "php-1.28.0-wmf.2",
+"arcwiki": "php-1.28.0-wmf.2",
+"arwiki": "php-1.28.0-wmf.2",
 "arwikibooks": "php-1.28.0-wmf.2",
 "arwikimedia": "php-1.28.0-wmf.2",
 "arwikinews": "php-1.28.0-wmf.2",
@@ -41,80 +41,80 @@
 "arwikisource": "php-1.28.0-wmf.2",
 "arwikiversity": "php-1.28.0-wmf.2",
 "arwiktionary": "php-1.28.0-wmf.2",
-"arzwiki": "php-1.28.0-wmf.1",
-"astwiki": "php-1.28.0-wmf.1",
+"arzwiki": "php-1.28.0-wmf.2",
+"astwiki": "php-1.28.0-wmf.2",
 "astwikibooks": "php-1.28.0-wmf.2",
 "astwikiquote": "php-1.28.0-wmf.2",
 "astwiktionary": "php-1.28.0-wmf.2",
-"aswiki": "php-1.28.0-wmf.1",
+"aswiki": "php-1.28.0-wmf.2",
 "aswikibooks": "php-1.28.0-wmf.2",
 "aswikisource": "php-1.28.0-wmf.2",
 "aswiktionary": "php-1.28.0-wmf.2",
 "auditcomwiki": "php-1.28.0-wmf.2",
-"avwiki": "php-1.28.0-wmf.1",
+"avwiki": "php-1.28.0-wmf.2",
 "avwiktionary": "php-1.28.0-wmf.2",
-"aywiki": "php-1.28.0-wmf.1",
+"aywiki": "php-1.28.0-wmf.2",
 "aywikibooks": "php-1.28.0-wmf.2",
 "aywiktionary": "php-1.28.0-wmf.2",
-"azbwiki": "php-1.28.0-wmf.1",
-"azwiki": "php-1.28.0-wmf.1",
+"azbwiki": "php-1.28.0-wmf.2",
+"azwiki": "php-1.28.0-wmf.2",
 "azwikibooks": "php-1.28.0-wmf.2",
 "azwikiquote": "php-1.28.0-wmf.2",
 "azwikisource": "php-1.28.0-wmf.2",
 "azwiktionary": "php-1.28.0-wmf.2",
-"barwiki": "php-1.28.0-wmf.1",
-"bat_smgwiki": "php-1.28.0-wmf.1",
-"bawiki": "php-1.28.0-wmf.1",
+"barwiki": "php-1.28.0-wmf.2",
+"bat_smgwiki": "php-1.28.0-wmf.2",
+"bawiki": "php-1.28.0-wmf.2",
 "bawikibooks": "php-1.28.0-wmf.2",
-"bclwiki": "php-1.28.0-wmf.1",
+"bclwiki": "php-1.28.0-wmf.2",
 "bdwikimedia": "php-1.28.0-wmf.2",
-"be_x_oldwiki": "php-1.28.0-wmf.1",
+"be_x_oldwiki": "php-1.28.0-wmf.2",
 "betawikiversity": "php-1.28.0-wmf.2",
-"bewiki": "php-1.28.0-wmf.1",
+"bewiki": "php-1.28.0-wmf.2",
 "bewikibooks": "php-1.28.0-wmf.2",
 "bewikimedia": "php-1.28.0-wmf.2",
 "bewikiquote": "php-1.28.0-wmf.2",
 "bewikisource": "php-1.28.0-wmf.2",
 "bewiktionary": "php-1.28.0-wmf.2",
-"bgwiki": "php-1.28.0-wmf.1",
+"bgwiki": "php-1.28.0-wmf.2",
 "bgwikibooks": "php-1.28.0-wmf.2",
 "bgwikinews": "php-1.28.0-wmf.2",
 "bgwikiquote": "php-1.28.0-wmf.2",
 "bgwikisource": "php-1.28.0-wmf.2",
 "bgwiktionary": "php-1.28.0-wmf.2",
-"bhwiki": "php-1.28.0-wmf.1",
+"bhwiki": "php-1.28.0-wmf.2",
 "bhwiktionary": 

[MediaWiki-commits] [Gerrit] Merge patch sets when any gerrit repos were involved - change (translatewiki)

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

Change subject: Merge patch sets when any gerrit repos were involved
..


Merge patch sets when any gerrit repos were involved

Change-Id: I1130d2e01591f2b4d7259350837b7a836f808e0f
---
A bin/merge-wmgerrit-patches
M repong/repong.php
2 files changed, 29 insertions(+), 3 deletions(-)

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



diff --git a/bin/merge-wmgerrit-patches b/bin/merge-wmgerrit-patches
new file mode 100755
index 000..9d39db2
--- /dev/null
+++ b/bin/merge-wmgerrit-patches
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+U="l10n-bot"
+GERRIT="$u...@gerrit.wikimedia.org -p 29418 gerrit"
+
+for i in `ssh $GERRIT query --format=TEXT owner:$U status:open | grep '  url:' 
|cut -d/ -f5 |sort`
+do
+ssh $GERRIT gerrit review $i,1 --code-review 2 --verified 2 --submit
+done
diff --git a/repong/repong.php b/repong/repong.php
index bc0d773..27477a4 100644
--- a/repong/repong.php
+++ b/repong/repong.php
@@ -5,25 +5,31 @@
 require_once __DIR__ . '/vendor/autoload.php';
 
 class RepoNg {
+   protected $bindir;
protected $meta;
protected $config;
 
public function __construct( array $meta, array $config ) {
+   $this->bindir = realpath( __DIR__ . '/../bin' );
+
+   if ( $this->bindir === false ) {
+   throw new RuntimeException( __DIR__ . '/../bin/ does 
not exist' );
+   }
+
$this->meta = $meta;
$this->config = $config;
}
 
public function update() {
-   $bindir = realpath( __DIR__ . '/../bin' );
$base = $this->meta['basepath'];
 
foreach ( $this->config['repos'] as $name => $repo ) {
if ( $repo['type'] === 'git' ) {
$branch = isset( $repo['branch'] ) ? 
$repo['branch'] : 'master';
-   $command = "$bindir/clupdate-git-repo 
'{$repo['url']}' '$base/$name' '$branch'";
+   $command = $this->bindir . "/clupdate-git-repo 
'{$repo['url']}' '$base/$name' '$branch'";
} elseif ( $repo['type'] === 'wmgerrit' ) {
$branch = isset( $repo['branch'] ) ? 
$repo['branch'] : 'master';
-   $command = "$bindir/clupdate-gerrit-repo 
'{$repo['url']}' '$base/$name' '$branch'";
+   $command = $this->bindir . 
"/clupdate-gerrit-repo '{$repo['url']}' '$base/$name' '$branch'";
} else {
throw new RuntimeException( 'Unknown repo rype' 
);
}
@@ -68,6 +74,7 @@
public function commit() {
$message = 'Localisation updates from 
https://translatewiki.net.';
$base = $this->meta['basepath'];
+   $gerritCommitted = false;
 
foreach ( $this->config['repos'] as $name => $repo ) {
if ( $repo['type'] === 'git' ) {
@@ -81,6 +88,8 @@
$command = "cd $dir; git add .; " .
"git commit -m '$message' || :; " .
'git review -r origin -t L10n';
+
+   $gerritCommitted = true;
} else {
throw new RuntimeException( "Unknown repo type" 
);
}
@@ -91,6 +100,14 @@
$process->setTimeout( 120 );
print $process->getOutput();
}
+
+   // Merge patch sets submitted to Wikimedia's Gerrit.
+   if ( $gerritCommitted ) {
+   $process = new Process( $this->bindir . 
'/merge-wmgerrit-patches' );
+   $process->mustRun();
+   $process->setTimeout( 120 );
+   print $process->getOutput();
+   }
}
 }
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1130d2e01591f2b4d7259350837b7a836f808e0f
Gerrit-PatchSet: 11
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Siebrand 
Gerrit-Reviewer: Nikerabbit 
Gerrit-Reviewer: Siebrand 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] API: Handle shorthand "all groups" configuration in ApiQuery... - change (mediawiki/core)

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

Change subject: API: Handle shorthand "all groups" configuration in 
ApiQuerySiteInfo
..


API: Handle shorthand "all groups" configuration in ApiQuerySiteInfo

In $wgAddGroups, $wgRemoveGroups, $wgGroupsAddToSelf, and
$wgGroupsRemoveFromSelf, boolean true in place of an array of groups to
allow adding/removing is shorthand for "all groups". Handle this
appropriately in action=query=siteinfo=usergroups.

Bug: T135467
Change-Id: I6ae61ef14ac7932e3369155c56bad60a9d72060d
---
M includes/api/ApiQuerySiteinfo.php
1 file changed, 6 insertions(+), 2 deletions(-)

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



diff --git a/includes/api/ApiQuerySiteinfo.php 
b/includes/api/ApiQuerySiteinfo.php
index a08740a..0774651 100644
--- a/includes/api/ApiQuerySiteinfo.php
+++ b/includes/api/ApiQuerySiteinfo.php
@@ -485,7 +485,7 @@
 
$data = [];
$result = $this->getResult();
-   $allGroups = User::getAllGroups();
+   $allGroups = array_values( User::getAllGroups() );
foreach ( $config->get( 'GroupPermissions' ) as $group => 
$permissions ) {
$arr = [
'name' => $group,
@@ -512,7 +512,11 @@
 
foreach ( $groupArr as $type => $rights ) {
if ( isset( $rights[$group] ) ) {
-   $groups = array_intersect( 
$rights[$group], $allGroups );
+   if ( $rights[$group] === true ) {
+   $groups = $allGroups;
+   } else {
+   $groups = array_intersect( 
$rights[$group], $allGroups );
+   }
if ( $groups ) {
$arr[$type] = $groups;
ApiResult::setArrayType( 
$arr[$type], 'BCarray' );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6ae61ef14ac7932e3369155c56bad60a9d72060d
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Anomie 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Nikerabbit 
Gerrit-Reviewer: Reedy 
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] exception: Create generic BadRequestError based on ErrorPage... - change (mediawiki/core)

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

Change subject: exception: Create generic BadRequestError based on 
ErrorPageError
..


exception: Create generic BadRequestError based on ErrorPageError

Ideally this would be an option in ErrorPageError (perhaps even the default),
but its constructor isn't very suitable for that.

After this lands, uses of ErrorPageError should be audited to see if it makes
sense to emit a 400 status code.

Change-Id: I4beb6a4f256446b98b66d5e4bcdbab8f247441a8
---
M autoload.php
A includes/exception/BadRequestError.php
M includes/exception/BadTitleError.php
3 files changed, 39 insertions(+), 16 deletions(-)

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



diff --git a/autoload.php b/autoload.php
index cf0e417..e16708f 100644
--- a/autoload.php
+++ b/autoload.php
@@ -164,6 +164,7 @@
'BacklinkJobUtils' => __DIR__ . 
'/includes/jobqueue/utils/BacklinkJobUtils.php',
'BackupDumper' => __DIR__ . '/maintenance/backup.inc',
'BackupReader' => __DIR__ . '/maintenance/importDump.php',
+   'BadRequestError' => __DIR__ . 
'/includes/exception/BadRequestError.php',
'BadTitleError' => __DIR__ . '/includes/exception/BadTitleError.php',
'BagOStuff' => __DIR__ . '/includes/libs/objectcache/BagOStuff.php',
'BaseDump' => __DIR__ . '/maintenance/backupPrefetch.inc',
diff --git a/includes/exception/BadRequestError.php 
b/includes/exception/BadRequestError.php
new file mode 100644
index 000..5fcf0e6
--- /dev/null
+++ b/includes/exception/BadRequestError.php
@@ -0,0 +1,34 @@
+http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ */
+
+/**
+ * An error page that emits an HTTP 400 Bad Request status code.
+ *
+ * @since 1.28
+ * @ingroup Exception
+ */
+class BadRequestError extends ErrorPageError {
+
+   public function report() {
+   global $wgOut;
+   $wgOut->setStatusCode( 400 );
+   parent::report();
+   }
+}
diff --git a/includes/exception/BadTitleError.php 
b/includes/exception/BadTitleError.php
index 3f4c213..40c18a4 100644
--- a/includes/exception/BadTitleError.php
+++ b/includes/exception/BadTitleError.php
@@ -20,13 +20,14 @@
 
 /**
  * Show an error page on a badtitle.
- * Similar to ErrorPage, but emit a 400 HTTP error code to let mobile
- * browser it is not really a valid content.
+ *
+ * Uses BadRequestError to emit a 400 HTTP error code to ensure caching 
proxies and
+ * mobile browsers know not to cache it as valid content. (T35646)
  *
  * @since 1.19
  * @ingroup Exception
  */
-class BadTitleError extends ErrorPageError {
+class BadTitleError extends BadRequestError {
/**
 * @param string|Message|MalformedTitleException $msg A message key 
(default: 'badtitletext'), or
 * a MalformedTitleException to figure out things from
@@ -44,18 +45,5 @@
} else {
parent::__construct( 'badtitle', $msg, $params );
}
-   }
-
-   /**
-* Just like ErrorPageError::report() but additionally set
-* a 400 HTTP status code (bug 33646).
-*/
-   public function report() {
-   global $wgOut;
-
-   // bug 33646: a badtitle error page need to return an error code
-   // to let mobile browser now that it is not a normal page.
-   $wgOut->setStatusCode( 400 );
-   parent::report();
}
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4beb6a4f256446b98b66d5e4bcdbab8f247441a8
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Krinkle 
Gerrit-Reviewer: Aaron Schulz 
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 `@` whitespace and name case rules to stylelint - change (oojs/ui)

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

Change subject: Add `@` whitespace and name case rules to stylelint
..


Add `@` whitespace and name case rules to stylelint

Change-Id: I7c36ca81a963110fd2a7f7c2cc8ffcac45fdafc1
---
M .stylelintrc
1 file changed, 3 insertions(+), 0 deletions(-)

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



diff --git a/.stylelintrc b/.stylelintrc
index 3e7608d..dce33b9 100644
--- a/.stylelintrc
+++ b/.stylelintrc
@@ -1,5 +1,8 @@
 {
"rules": {
+   "at-rule-name-case": "lower",
+   "at-rule-name-space-after": "always-single-line",
+
"color-hex-case": [ "lower" ],
"color-hex-length": [ "short" ],
"color-named": [ "never" ],

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

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

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


[MediaWiki-commits] [Gerrit] Build lego message for HTML email footer - change (mediawiki...Echo)

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

Change subject: Build lego message for HTML email footer
..


Build lego message for HTML email footer

Change-Id: Ic750ff3eb4e97c0cd23dd39a998c60860a49cf45
---
M i18n/en.json
M i18n/qqq.json
M includes/formatters/EchoHtmlEmailFormatter.php
3 files changed, 20 insertions(+), 8 deletions(-)

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



diff --git a/i18n/en.json b/i18n/en.json
index 16a99e2..d74a4ae 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -197,7 +197,8 @@
"echo-email-footer-default-html": "To control which emails we send you, 
check your 
preferences.\n$1",
"echo-email-footer-default": "$2\n\nTo control which emails we send 
you, check your 
preferences:\n{{canonicalurl:{{#special:Preferences}}#mw-prefsection-echo}}\n\n$1",
"echo-email-plain-footer": "To control which emails we send you, check 
your preferences:",
-   "echo-email-html-footer": "To control which emails we send you, check your 
preferences.\n$1",
+   "echo-email-html-footer-preference-link-text": "check your preferences",
+   "echo-email-html-footer-with-link": "To control which emails we send 
you, $1.",
"echo-notification-alert": "{{PLURAL:$1|Alert ($1)|Alerts 
($1)|100=Alerts (99+)}}",
"echo-notification-message": "{{PLURAL:$1|Message ($1)|Messages 
($1)|100=Messages (99+)}}",
"echo-notification-alert-text-only": "Alerts",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index bb0233e..51c540e 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -188,7 +188,8 @@
"echo-email-footer-default-html": "Default footer content for Echo html 
e-mail notifications. Parameters:\n* $1 - the address of the organization that 
sent the email\n* $2 - the URL to the notification preference page\nFor 
plain-text version, see {{msg-mw|Echo-email-footer-default}}.",
"echo-email-footer-default": "Default footer content for Echo text 
e-mail notifications. Parameters:\n* $1 - the address of the organization that 
sent the email\n* $2 - \"---...\" 
({{msg-mw|echo-email-batch-separator}})\n\nFor HTML version, see 
{{msg-mw|echo-email-footer-default-html}}.",
"echo-email-plain-footer": "Footer content for Echo text e-mail 
notifications.\n\nFor HTML version, see {{msg-mw|echo-email-html-footer}}.",
-   "echo-email-html-footer": "Default footer content for Echo html e-mail 
notifications. Parameters:\n* $1 - the address of the organization that sent 
the email\n* $2 - the URL to the notification preference page\nFor plain-text 
version, see {{msg-mw|Echo-email-footer-default}}.",
+   "echo-email-html-footer-preference-link-text": "Text of link to the 
preference page in the footer of HTML emails.",
+   "echo-email-html-footer-with-link": "Footer content of the HTML 
email.\n* $1 - complete HTML link to the preference page.\n\nSee 
{{msg-mw|echo-email-html-footer-preference-link-text}} for the text of the 
link.",
"echo-notification-alert": "Label for alert notifications (= non 
discussion notifications) tab in Echo overlay. Parameters:\n* $1 - the number 
of unread alerts. The number cannot be higher than 100.\nSee also:\n* 
{{msg-mw|Echo-notification-message}}\n{{Identical|Alert}}",
"echo-notification-message": "Label for message notifications (= 
discussion notifications) tab in Echo overlay. Parameters:\n* $1 - the number 
of unread messages. The number cannot be higher than 100.\nSee also:\n* 
{{msg-mw|Echo-notification-alert}}\n{{Identical|Message}}",
"echo-notification-alert-text-only": "Label for alert notifications (= 
non discussion notifications) tab in Echo overlay without alert notification 
count next to it\n{{Identical|Alert}}",
diff --git a/includes/formatters/EchoHtmlEmailFormatter.php 
b/includes/formatters/EchoHtmlEmailFormatter.php
index c97c217..ef622ad 100644
--- a/includes/formatters/EchoHtmlEmailFormatter.php
+++ b/includes/formatters/EchoHtmlEmailFormatter.php
@@ -125,13 +125,23 @@
public function getFooter() {
global $wgEchoEmailFooterAddress;
 
-   $prefsUrl = SpecialPage::getTitleFor( 'Preferences', false, 
'mw-prefsection-echo' )
-   ->getFullURL( '', false, PROTO_CANONICAL );
+   $preferenceLink = $this->renderLink(
+   array(
+   'label' => $this->msg( 
'echo-email-html-footer-preference-link-text' )->text(),
+   'url' => SpecialPage::getTitleFor( 
'Preferences', false, 'mw-prefsection-echo' )->getFullURL( '', false, 
PROTO_CANONICAL ),
+   ),
+   'text-decoration: none; color: #3868B0;'
+   );
 
-   return $this->msg( 'echo-email-html-footer' )
-   ->params( $wgEchoEmailFooterAddress, $prefsUrl )
-   // This is a raw 

[MediaWiki-commits] [Gerrit] Add selector whitespace to stylelint - change (oojs/ui)

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

Change subject: Add selector whitespace to stylelint
..


Add selector whitespace to stylelint

Adding selector whitespace rules, compare
https://www.mediawiki.org/wiki/Manual:Coding_conventions/CSS#Whitespace
Leaving single colon in to make IE 6-8 happy.

Change-Id: Ic0a3e39f47aeb110ef0b04743ecb71aab84e62e4
---
M .stylelintrc
M build/tasks/colorize-svg.js
M demos/styles/demo.css
M src/styles/common.less
M src/themes/apex/widgets.less
5 files changed, 22 insertions(+), 8 deletions(-)

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



diff --git a/.stylelintrc b/.stylelintrc
index 47e6ba3..6c88add 100644
--- a/.stylelintrc
+++ b/.stylelintrc
@@ -42,6 +42,17 @@
"function-url-quotes": [ "none" ],
"function-whitespace-after": [ "always" ],
 
+   "selector-combinator-space-after": [ "always" ],
+   "selector-combinator-space-before": [ "always" ],
+   "selector-no-vendor-prefix": true,
+   "selector-root-no-composition": true,
+   "selector-pseudo-element-colon-notation": [ "single" ],
+
+   "selector-list-comma-newline-after": [ "always" ],
+   "selector-list-comma-newline-before": [ "never-multi-line" ],
+   "selector-list-comma-space-after": [ "always-single-line" ],
+   "selector-list-comma-space-before": [ "never" ],
+
"string-no-newline": true,
 
"value-list-comma-newline-after": [ "never-multi-line" ],
diff --git a/build/tasks/colorize-svg.js b/build/tasks/colorize-svg.js
index 9eb11c7..28b2d8d 100644
--- a/build/tasks/colorize-svg.js
+++ b/build/tasks/colorize-svg.js
@@ -181,7 +181,7 @@
function getDeclarations( primary ) {
// If 'primary' is not a SVG file, 'fallback' and 
'primary' are intentionally the same
var fallback = primary.replace( /\.svg$/, '.png' );
-   return '.oo-ui-background-image-svg2(' +
+   return '.oo-ui-background-image-svg-internal(' +
'\'' + ( cssPrependPath || '' ) + primary + 
'\', ' +
'\'' + ( cssPrependPath || '' ) + fallback + 
'\'' +
')';
diff --git a/demos/styles/demo.css b/demos/styles/demo.css
index be9dc89..b2a432d 100644
--- a/demos/styles/demo.css
+++ b/demos/styles/demo.css
@@ -97,7 +97,7 @@
 }
 
 /* Console */
-
+/* stylelint-disable selector-pseudo-element-colon-notation */
 .oo-ui-demo-console {
clear: both;
position: relative;
@@ -241,3 +241,4 @@
background: #eee;
color: #333;
 }
+/* stylelint-enable selector-pseudo-element-colon-notation */
\ No newline at end of file
diff --git a/src/styles/common.less b/src/styles/common.less
index 9ca943f..0f45c39 100644
--- a/src/styles/common.less
+++ b/src/styles/common.less
@@ -15,23 +15,23 @@
background-image: e( '/* @embed */' ) url( ~'@{url}' ); // 
stylelint-disable-line function-url-quotes
 }
 
-.oo-ui-background-image-svg2( @svg, @fallback ) when ( @oo-ui-distribution = 
mixed ) {
+.oo-ui-background-image-svg-internal( @svg, @fallback ) when ( 
@oo-ui-distribution = mixed ) {
background-image: url( @fallback );
background-image: -webkit-linear-gradient( transparent, transparent ), 
e( '/* @embed */' ) url( @svg );
background-image: linear-gradient( transparent, transparent ), e( '/* 
@embed */' ) url( @svg );
background-image: -o-linear-gradient( transparent, transparent ), url( 
@fallback );
 }
-.oo-ui-background-image-svg2( @svg, @fallback ) when ( @oo-ui-distribution = 
vector ) {
+.oo-ui-background-image-svg-internal( @svg, @fallback ) when ( 
@oo-ui-distribution = vector ) {
.oo-ui-background-image( @svg );
 }
-.oo-ui-background-image-svg2( @svg, @fallback ) when ( @oo-ui-distribution = 
raster ) {
+.oo-ui-background-image-svg-internal( @svg, @fallback ) when ( 
@oo-ui-distribution = raster ) {
.oo-ui-background-image( @fallback );
 }
 
 .oo-ui-background-image-svg( @url-without-extension ) {
@svg: '@{url-without-extension}.svg';
@fallback: '@{url-without-extension}.@{oo-ui-default-image-ext}';
-   .oo-ui-background-image-svg2( @svg, @fallback );
+   .oo-ui-background-image-svg-internal( @svg, @fallback );
 }
 
 .oo-ui-force-webkit-gpu() {
diff --git a/src/themes/apex/widgets.less b/src/themes/apex/widgets.less
index 63bd10b..19e1627 100644
--- a/src/themes/apex/widgets.less
+++ b/src/themes/apex/widgets.less
@@ -274,7 +274,8 @@
}
 
// No close, no indicator:
-   &-empty, &-notsupported {
+   &-empty,
+   &-notsupported {
.oo-ui-selectFileWidget-info {
.oo-ui-selectFileWidget-label {

[MediaWiki-commits] [Gerrit] Introduce stylelint - change (mediawiki...SyntaxHighlight_GeSHi)

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

Change subject: Introduce stylelint
..


Introduce stylelint

Change-Id: Iea4d20abb8aa9d656639c8e128df0e963291cace
---
D .csslintrc
A .stylelintrc
M Gruntfile.js
M modules/ve-syntaxhighlight/ve.ce.MWSyntaxHighlightNode.css
M modules/ve-syntaxhighlight/ve.ui.MWSyntaxHighlightDialog.css
M modules/ve-syntaxhighlight/ve.ui.MWSyntaxHighlightInspector.css
M package.json
7 files changed, 26 insertions(+), 33 deletions(-)

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



diff --git a/.csslintrc b/.csslintrc
deleted file mode 100644
index 68d60d2..000
--- a/.csslintrc
+++ /dev/null
@@ -1,13 +0,0 @@
-{
-   "adjoining-classes": false,
-   "box-model": false,
-   "box-sizing": false,
-   "fallback-colors": false,
-   "important": false,
-   "outline-none": false,
-   "qualified-headings": false,
-   "unique-headings": false,
-   "universal-selector": false,
-   "unqualified-attributes": false,
-   "gradients": false
-}
diff --git a/.stylelintrc b/.stylelintrc
new file mode 100644
index 000..2c90730
--- /dev/null
+++ b/.stylelintrc
@@ -0,0 +1,3 @@
+{
+   "extends": "stylelint-config-wikimedia"
+}
diff --git a/Gruntfile.js b/Gruntfile.js
index b52dfe4..ecb0138 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -7,11 +7,11 @@
 /*jshint node:true */
 module.exports = function ( grunt ) {
grunt.loadNpmTasks( 'grunt-banana-checker' );
-   grunt.loadNpmTasks( 'grunt-contrib-csslint' );
grunt.loadNpmTasks( 'grunt-contrib-jshint' );
grunt.loadNpmTasks( 'grunt-contrib-watch' );
grunt.loadNpmTasks( 'grunt-jscs' );
grunt.loadNpmTasks( 'grunt-jsonlint' );
+   grunt.loadNpmTasks( 'grunt-stylelint' );
 
grunt.initConfig( {
jshint: {
@@ -33,11 +33,13 @@
jscs: {
src: '<%= jshint.all %>'
},
-   csslint: {
-   options: {
-   csslintrc: '.csslintrc'
-   },
-   all: 'modules/**/*.css'
+   stylelint: {
+   src: [
+   '**/*.css',
+   '!**/*.generated.css',
+   '!vendor/**',
+   '!node_modules/**'
+   ]
},
banana: {
options: {
@@ -47,14 +49,14 @@
},
watch: {
files: [
-   '.{csslintrc,jscsrc,jshintignore,jshintrc}',
+   '.{stylelintrc,jscsrc,jshintignore,jshintrc}',
'<%= jshint.all %>',
-   '<%= csslint.all %>'
+   '<%= stylelint.all %>'
],
tasks: 'test'
}
} );
 
-   grunt.registerTask( 'test', [ 'jshint', 'jsonlint', 'jscs', 'csslint', 
'banana' ] );
+   grunt.registerTask( 'test', [ 'jshint', 'jsonlint', 'jscs', 
'stylelint', 'banana' ] );
grunt.registerTask( 'default', 'test' );
 };
diff --git a/modules/ve-syntaxhighlight/ve.ce.MWSyntaxHighlightNode.css 
b/modules/ve-syntaxhighlight/ve.ce.MWSyntaxHighlightNode.css
index 2c5bb4a..d768b23 100644
--- a/modules/ve-syntaxhighlight/ve.ce.MWSyntaxHighlightNode.css
+++ b/modules/ve-syntaxhighlight/ve.ce.MWSyntaxHighlightNode.css
@@ -5,7 +5,7 @@
  * @license The MIT License (MIT); see LICENSE.txt
  */
 
- .ve-ce-mwSyntaxHighlightNode pre {
+.ve-ce-mwSyntaxHighlightNode pre {
/* Prevent silly wrapping on Safari and Chrome 
(https://bugs.webkit.org/show_bug.cgi?id=35935) */
word-wrap: normal;
 }
diff --git a/modules/ve-syntaxhighlight/ve.ui.MWSyntaxHighlightDialog.css 
b/modules/ve-syntaxhighlight/ve.ui.MWSyntaxHighlightDialog.css
index dd7591d..e4c07c4 100644
--- a/modules/ve-syntaxhighlight/ve.ui.MWSyntaxHighlightDialog.css
+++ b/modules/ve-syntaxhighlight/ve.ui.MWSyntaxHighlightDialog.css
@@ -10,7 +10,7 @@
 }
 
 .ve-ui-mwSyntaxHighlightDialog-content .ve-ui-mwExtensionWindow-input textarea 
{
-   font-family: monospace, Courier;
+   font-family: monospace, 'Courier';
 }
 
 .ve-ui-mwSyntaxHighlightDialog-content .oo-ui-comboBoxWidget > 
.oo-ui-menuSelectWidget {
diff --git a/modules/ve-syntaxhighlight/ve.ui.MWSyntaxHighlightInspector.css 
b/modules/ve-syntaxhighlight/ve.ui.MWSyntaxHighlightInspector.css
index 8850155..e4dff7a 100644
--- a/modules/ve-syntaxhighlight/ve.ui.MWSyntaxHighlightInspector.css
+++ b/modules/ve-syntaxhighlight/ve.ui.MWSyntaxHighlightInspector.css
@@ -6,5 +6,5 @@
  */
 
 .ve-ui-mwSyntaxHighlightInspector-content .ve-ui-mwExtensionWindow-input 
textarea {
-   font-family: monospace, Courier;
+   font-family: 

[MediaWiki-commits] [Gerrit] Move jQuery.splitter files into lib folder - change (mediawiki...Graph)

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

Change subject: Move jQuery.splitter files into lib folder
..


Move jQuery.splitter files into lib folder

Change-Id: Id64f3b310d2ef7a412ab174faa51bde7a106c9ff
---
M extension.json
R lib/jquery.splitter/jquery.splitter.css
R lib/jquery.splitter/jquery.splitter.js
3 files changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/extension.json b/extension.json
index 11b39af..a0327f9 100644
--- a/extension.json
+++ b/extension.json
@@ -84,11 +84,11 @@
},
"ext.graph.sandbox": {
"scripts": [
-   "lib/jquery.splitter.js",
+   "lib/jquery.splitter/jquery.splitter.js",
"modules/graph.sandbox.js"
],
"styles": [
-   "styles/jquery.splitter.css",
+   "lib/jquery.splitter/jquery.splitter.css",
"styles/sandbox.css"
],
"dependencies": [
diff --git a/styles/jquery.splitter.css 
b/lib/jquery.splitter/jquery.splitter.css
similarity index 100%
rename from styles/jquery.splitter.css
rename to lib/jquery.splitter/jquery.splitter.css
diff --git a/lib/jquery.splitter.js b/lib/jquery.splitter/jquery.splitter.js
similarity index 100%
rename from lib/jquery.splitter.js
rename to lib/jquery.splitter/jquery.splitter.js

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id64f3b310d2ef7a412ab174faa51bde7a106c9ff
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Graph
Gerrit-Branch: master
Gerrit-Owner: Esanders 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Highlight new requirement - change (mediawiki/core)

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

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

Change subject: Highlight new requirement
..

Highlight new requirement

Change-Id: I45f9b5f4d355eae889a3cd8725d1188ff9ca8720
---
M RELEASE-NOTES-1.27
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/RELEASE-NOTES-1.27 b/RELEASE-NOTES-1.27
index 7c50e4f..e644ae4 100644
--- a/RELEASE-NOTES-1.27
+++ b/RELEASE-NOTES-1.27
@@ -11,7 +11,7 @@
 * ctype
 * iconv
 * json
-* mbstring
+* mbstring (new requirement in 1.27)
 * xml
 The following PHP extensions are strongly recommended:
 * openssl

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

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

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


[MediaWiki-commits] [Gerrit] Highlight new requirement - change (mediawiki/core)

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

Change subject: Highlight new requirement
..


Highlight new requirement

Change-Id: I45f9b5f4d355eae889a3cd8725d1188ff9ca8720
---
M RELEASE-NOTES-1.27
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/RELEASE-NOTES-1.27 b/RELEASE-NOTES-1.27
index 9b77cd1..039aa05 100644
--- a/RELEASE-NOTES-1.27
+++ b/RELEASE-NOTES-1.27
@@ -11,7 +11,7 @@
 * ctype
 * iconv
 * json
-* mbstring
+* mbstring (new requirement in 1.27)
 * xml
 
 === Configuration changes in 1.27 ===

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

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

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


[MediaWiki-commits] [Gerrit] Log number of rows exported - change (wikimedia...tools)

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

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

Change subject: Log number of rows exported
..

Log number of rows exported

Change-Id: I60a4d943596c8890906f4f57b1073bdefc6a3a3d
---
M silverpop_export/export.py
1 file changed, 4 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/tools 
refs/changes/14/289714/1

diff --git a/silverpop_export/export.py b/silverpop_export/export.py
index e4cbd9d..e707efe 100644
--- a/silverpop_export/export.py
+++ b/silverpop_export/export.py
@@ -52,6 +52,7 @@
 # Make sure we've got the table headers
 try:
 first = gen.next()
+num_rows = 1
 
 # Get the order of keys and sort them alphabetically so it doesn't come
 # out as complete soup
@@ -61,12 +62,14 @@
 
 for row in gen:
 w.writerow(order_keyed_row(keys, row))
+num_rows += 1
+
 except StopIteration:
 pass
 
 output.flush()
 output.close()
-
+log.info("Wrote %d rows" % num_rows)
 
 def export_data(output_path=None):
 db = DbConnection(**config.silverpop_db)

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I60a4d943596c8890906f4f57b1073bdefc6a3a3d
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/tools
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] Update location of wikidata/query/gui repo - change (translatewiki)

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

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

Change subject: Update location of wikidata/query/gui repo
..

Update location of wikidata/query/gui repo

Change-Id: Ia0f1566642feb6b0d676d438db168f40616d9f96
---
M repoconfig.commit.json
M repoconfig.json
2 files changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/translatewiki 
refs/changes/13/289713/1

diff --git a/repoconfig.commit.json b/repoconfig.commit.json
index b2aa70b..6ec2328 100644
--- a/repoconfig.commit.json
+++ b/repoconfig.commit.json
@@ -212,7 +212,7 @@
"wikidata": {
"group": "wikidata-*",
"repos": {
-   "mwgerrit/wikidata/query/gui": {
+   "wikidata/query/gui": {
"type": "wmgerrit",
"url": 
"ssh://l10n-...@gerrit.wikimedia.org:29418/wikidata/query/gui"
}
diff --git a/repoconfig.json b/repoconfig.json
index 519634c..c94ef73 100644
--- a/repoconfig.json
+++ b/repoconfig.json
@@ -212,7 +212,7 @@
"wikidata": {
"group": "wikidata-*",
"repos": {
-   "mwgerrit/wikidata/query/gui": {
+   "wikidata/query/gui": {
"type": "wmgerrit",
"url": 
"https://gerrit.wikimedia.org/r/wikidata/query/gui;
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia0f1566642feb6b0d676d438db168f40616d9f96
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Siebrand 

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


[MediaWiki-commits] [Gerrit] Introduce stylelint - change (mediawiki...Score)

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

Change subject: Introduce stylelint
..


Introduce stylelint

Change-Id: Ibc3f391d1f890b0d05f095efdabd775b2d2a43c6
---
D .csslintrc
A .stylelintrc
M Gruntfile.js
M modules/ve-score/ve.ui.MWScoreInspector.css
M package.json
5 files changed, 21 insertions(+), 30 deletions(-)

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



diff --git a/.csslintrc b/.csslintrc
deleted file mode 100644
index 68d60d2..000
--- a/.csslintrc
+++ /dev/null
@@ -1,13 +0,0 @@
-{
-   "adjoining-classes": false,
-   "box-model": false,
-   "box-sizing": false,
-   "fallback-colors": false,
-   "important": false,
-   "outline-none": false,
-   "qualified-headings": false,
-   "unique-headings": false,
-   "universal-selector": false,
-   "unqualified-attributes": false,
-   "gradients": false
-}
diff --git a/.stylelintrc b/.stylelintrc
new file mode 100644
index 000..2c90730
--- /dev/null
+++ b/.stylelintrc
@@ -0,0 +1,3 @@
+{
+   "extends": "stylelint-config-wikimedia"
+}
diff --git a/Gruntfile.js b/Gruntfile.js
index 3a57983..44ec5cd 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -1,11 +1,11 @@
 /*jshint node:true */
 module.exports = function ( grunt ) {
-   grunt.loadNpmTasks( 'grunt-contrib-csslint' );
grunt.loadNpmTasks( 'grunt-contrib-jshint' );
grunt.loadNpmTasks( 'grunt-contrib-watch' );
grunt.loadNpmTasks( 'grunt-banana-checker' );
grunt.loadNpmTasks( 'grunt-jsonlint' );
grunt.loadNpmTasks( 'grunt-jscs' );
+   grunt.loadNpmTasks( 'grunt-stylelint' );
 
grunt.initConfig( {
jshint: {
@@ -21,15 +21,15 @@
jscs: {
src: '<%= jshint.all %>'
},
-   csslint: {
-   options: {
-   csslintrc: '.csslintrc'
-   },
-   all: 'modules/ve-score/**/*.css'
+   stylelint: {
+   src: [
+   '**/*.css',
+   '!node_modules/**'
+   ]
},
watch: {
files: [
-   '.{jscsrc,jshintignore,jshintrc}',
+   '.{stylelintrc,jscsrc,jshintignore,jshintrc}',
'<%= jshint.all %>'
],
tasks: 'lint'
@@ -45,7 +45,7 @@
}
} );
 
-   grunt.registerTask( 'lint', [ 'jshint', 'jscs', 'jsonlint', 'csslint', 
'banana' ] );
+   grunt.registerTask( 'lint', [ 'jshint', 'jscs', 'jsonlint', 
'stylelint', 'banana' ] );
grunt.registerTask( 'test', 'lint' );
grunt.registerTask( 'default', 'test' );
 };
diff --git a/modules/ve-score/ve.ui.MWScoreInspector.css 
b/modules/ve-score/ve.ui.MWScoreInspector.css
index 1b3ec20..5716e1f 100644
--- a/modules/ve-score/ve.ui.MWScoreInspector.css
+++ b/modules/ve-score/ve.ui.MWScoreInspector.css
@@ -6,5 +6,5 @@
  */
 
 .ve-ui-mwScoreInspector-content .ve-ui-mwExtensionWindow-input textarea {
-   font-family: monospace, Courier;
+   font-family: monospace, 'Courier';
 }
diff --git a/package.json b/package.json
index 262aa03..ceb3c60 100644
--- a/package.json
+++ b/package.json
@@ -4,13 +4,14 @@
 "test": "grunt test"
   },
   "devDependencies": {
-"grunt": "0.4.5",
-"grunt-cli": "0.1.13",
-"grunt-contrib-csslint": "0.5.0",
-"grunt-contrib-jshint": "0.11.3",
-"grunt-contrib-watch": "0.6.1",
-"grunt-jscs": "2.1.0",
-"grunt-banana-checker": "0.4.0",
-"grunt-jsonlint": "1.0.7"
+"grunt": "1.0.1",
+"grunt-banana-checker": "0.5.0",
+"grunt-cli": "1.2.0",
+"grunt-contrib-jshint": "1.0.0",
+"grunt-contrib-watch": "1.0.0",
+"grunt-jscs": "2.8.0",
+"grunt-jsonlint": "1.0.7",
+"grunt-stylelint": "0.2.0",
+"stylelint-config-wikimedia": "0.1.0"
   }
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibc3f391d1f890b0d05f095efdabd775b2d2a43c6
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Score
Gerrit-Branch: master
Gerrit-Owner: Esanders 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Add support for Wikidata Query GUI - change (translatewiki)

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

Change subject: Add support for Wikidata Query GUI
..


Add support for Wikidata Query GUI

Bug: T133154
Depends-On: I5a7724b993f109837b16ee0b6ce705fffbef3948
Change-Id: I9eca20f89f35e9ecfe21fd7f5f9d78b789acc2c7
---
M bin/EXTERNAL-PROJECTS
M bin/REPONG-PROJECTS
A groups/wikidata/wikidata.yaml
M repoconfig.commit.json
M repoconfig.json
5 files changed, 48 insertions(+), 0 deletions(-)

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



diff --git a/bin/EXTERNAL-PROJECTS b/bin/EXTERNAL-PROJECTS
index 4c1062e..890efe6 100644
--- a/bin/EXTERNAL-PROJECTS
+++ b/bin/EXTERNAL-PROJECTS
@@ -34,5 +34,6 @@
 waymarked-trails-site
 wiki-ai
 wikiblame
+wikidata
 wikiedudashboard
 wikimania
diff --git a/bin/REPONG-PROJECTS b/bin/REPONG-PROJECTS
index 1382c55..eec6e22 100644
--- a/bin/REPONG-PROJECTS
+++ b/bin/REPONG-PROJECTS
@@ -8,5 +8,6 @@
 mwgithub
 pageviews
 wiki-ai
+wikidata
 wikipedia-android
 wikipedia-ios
diff --git a/groups/wikidata/wikidata.yaml b/groups/wikidata/wikidata.yaml
new file mode 100644
index 000..3eb61f7
--- /dev/null
+++ b/groups/wikidata/wikidata.yaml
@@ -0,0 +1,28 @@
+TEMPLATE:
+  BASIC:
+icon: wiki://Wikidata-logo.svg
+namespace: NS_WIKIMEDIA
+class: FileBasedMessageGroup
+description: "{{Special:MyLanguage/Translations:Group 
descriptions/wikidata/en}}"
+
+  FILES:
+class: JsonFFS
+
+---
+BASIC:
+  id: wikidata-0-all
+  label: Wikidata
+  meta: yes
+  class: AggregateMessageGroup
+
+GROUPS:
+  - wikidata-*
+
+---
+BASIC:
+  id: wikidata-query-gui
+  label: Wikidata Query GUI
+  description: "{{Special:MyLanguage/Translations:Group 
descriptions/wikidata-query-gui/en}}"
+
+FILES:
+  sourcePattern: "%GROUPROOT%/wikidata/query/gui/i18n/%CODE%.json"
diff --git a/repoconfig.commit.json b/repoconfig.commit.json
index a176e7d..b2aa70b 100644
--- a/repoconfig.commit.json
+++ b/repoconfig.commit.json
@@ -209,6 +209,15 @@
}
}
},
+   "wikidata": {
+   "group": "wikidata-*",
+   "repos": {
+   "mwgerrit/wikidata/query/gui": {
+   "type": "wmgerrit",
+   "url": 
"ssh://l10n-...@gerrit.wikimedia.org:29418/wikidata/query/gui"
+   }
+   }
+   },
"wikipedia-android": {
"group": "out-wikimedia-mobile-wikipedia-android-*",
"repos": {
diff --git a/repoconfig.json b/repoconfig.json
index d89a514..519634c 100644
--- a/repoconfig.json
+++ b/repoconfig.json
@@ -209,6 +209,15 @@
}
}
},
+   "wikidata": {
+   "group": "wikidata-*",
+   "repos": {
+   "mwgerrit/wikidata/query/gui": {
+   "type": "wmgerrit",
+   "url": 
"https://gerrit.wikimedia.org/r/wikidata/query/gui;
+   }
+   }
+   },
"wikipedia-android": {
"group": "out-wikimedia-mobile-wikipedia-android-*",
"repos": {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9eca20f89f35e9ecfe21fd7f5f9d78b789acc2c7
Gerrit-PatchSet: 4
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Siebrand 
Gerrit-Reviewer: Amire80 
Gerrit-Reviewer: Jonas Kress (WMDE) 
Gerrit-Reviewer: Nikerabbit 
Gerrit-Reviewer: Siebrand 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Gate Android patches on instrumentation test cc too - change (integration/config)

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

Change subject: Gate Android patches on instrumentation test cc too
..


Gate Android patches on instrumentation test cc too

It takes a little longer but it's reasonable to require that Android
(longer running) instrumentation tests must at least compile.

Change-Id: I666c75bb4072470bb13f807e8741cc1195e2d707
---
M jjb/mobile.yaml
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/jjb/mobile.yaml b/jjb/mobile.yaml
index 547e52c..88a0246 100644
--- a/jjb/mobile.yaml
+++ b/jjb/mobile.yaml
@@ -44,7 +44,7 @@
 builders:
  - shell: |
  scripts/missing-qq.py
- ./gradlew clean checkstyle assembleAlphaRelease testAlphaRelease
+ ./gradlew clean checkstyle assembleAlphaRelease testAlphaRelease 
compileAlphaReleaseAndroidTestSources
 publishers:
  - archive:
  # Capture generated .apk, ProGuard mappings, checkstyle.xml, and test 
results

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I666c75bb4072470bb13f807e8741cc1195e2d707
Gerrit-PatchSet: 2
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Niedzielski 
Gerrit-Reviewer: BearND 
Gerrit-Reviewer: Dbrant 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: Mholloway 
Gerrit-Reviewer: Niedzielski 
Gerrit-Reviewer: Thcipriani 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Upgrade xenon to Cassandra 2.2 - change (operations/puppet)

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

Change subject: Upgrade xenon to Cassandra 2.2
..


Upgrade xenon to Cassandra 2.2

Bug: T126629
Change-Id: I1b5999bcee60e05b087cfd6c11887ca3ca917960
---
M hieradata/hosts/xenon.yaml
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/hieradata/hosts/xenon.yaml b/hieradata/hosts/xenon.yaml
index bbb2f42..16e916e 100644
--- a/hieradata/hosts/xenon.yaml
+++ b/hieradata/hosts/xenon.yaml
@@ -7,3 +7,4 @@
 listen_address: 10.64.0.202
 rpc_address: 10.64.0.202
 rpc_interface: eth0
+cassandra::target_version: '2.2'

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1b5999bcee60e05b087cfd6c11887ca3ca917960
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Eevans 
Gerrit-Reviewer: Ottomata 
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 leftover conf file from media upload dirs cron job on... - change (operations/puppet)

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

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

Change subject: remove leftover conf file from media upload dirs cron job on 
snapshots
..

remove leftover conf file from media upload dirs cron job on snapshots

Change-Id: I4e3401046151e3abaa99cd062c07bbdad55165fa
---
D modules/snapshot/templates/cron/wq.conf.media.erb
1 file changed, 0 insertions(+), 25 deletions(-)


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

diff --git a/modules/snapshot/templates/cron/wq.conf.media.erb 
b/modules/snapshot/templates/cron/wq.conf.media.erb
deleted file mode 100644
index ab92840..000
--- a/modules/snapshot/templates/cron/wq.conf.media.erb
+++ /dev/null
@@ -1,25 +0,0 @@
-#
-# This file is maintained by puppet!
-# modules/snapshot/templates/cron/wq.conf.media.erb
-#
-[wiki]
-mediawiki=<%= @apachedir %>
-allwikislist=<%= @apachedir -%>/dblists/all.dblist
-privatewikislist=<%= @apachedir -%>/dblists/private.dblist
-closedwikislist=<%= @apachedir -%>/dblists/closed.dblist
-adminsettings=private/PrivateSettings.php
-skipwikislist=<%= scope.lookupvar('snapshot::dumps::dirs::wikiqueriesdir') 
-%>/dblists/skip.dblist
-
-[output]
-wikiqueriesdir=<%= scope.lookupvar('snapshot::dumps::dirs::datadir') 
-%>/public/other/imageinfo
-temp=<%= scope.lookupvar('snapshot::dumps::dirs::datadir') -%>/temp
-fileperms=0644
-
-[database]
-
-[tools]
-php=/usr/bin/php5
-mysql=/usr/bin/mysql
-gzip=/bin/gzip
-bzip2=/bin/bzip2
-multiversion=<%= @apachedir -%>/multiversion/MWScript.php

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

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

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


[MediaWiki-commits] [Gerrit] build: Bump grunt-stylelint to v0.3.0 - change (oojs/ui)

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

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

Change subject: build: Bump grunt-stylelint to v0.3.0
..

build: Bump grunt-stylelint to v0.3.0

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


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/07/289707/1

diff --git a/package.json b/package.json
index 96d985e..be0ba29 100644
--- a/package.json
+++ b/package.json
@@ -45,7 +45,7 @@
 "grunt-jsonlint": "1.0.7",
 "grunt-karma": "0.12.2",
 "grunt-promise-q": "0.1.1",
-"grunt-stylelint": "0.2.0",
+"grunt-stylelint": "0.3.0",
 "grunt-svg2png": 
"git://github.com/jdforrester/grunt-svg2png.git#v0.2.7-wmf.1",
 "grunt-tyops": "0.1.0",
 "grunt": "0.4.5",

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3976ab1d2838b2c98d60367646113db169df7f1a
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] Enable wikidata project - change (translatewiki)

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

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

Change subject: Enable wikidata project
..

Enable wikidata project

Change-Id: Iad49ca5365597c28d0a9e1f6393f7c9f6a9b50c1
---
M TranslateSettings.php
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/translatewiki 
refs/changes/10/289710/1

diff --git a/TranslateSettings.php b/TranslateSettings.php
index 594edd4..ebbf120 100644
--- a/TranslateSettings.php
+++ b/TranslateSettings.php
@@ -230,6 +230,7 @@
 $wgTranslateGroupFiles[] = "$GROUPS/Nocc/Nocc.yaml";
 
 wfAddNamespace( 1206, 'Wikimedia' );
+$wgTranslateGroupFiles[] = "$GROUPS/wikidata/wikidata.yaml";
 $wgTranslateGroupFiles[] = "$GROUPS/Wikimedia/jquery.uls.yaml";
 $wgTranslateGroupFiles[] = "$GROUPS/Wikimedia/WikiBlame.yaml";
 $wgTranslateGroupFiles[] = "$GROUPS/Wikimedia/WikiEduDashboard.yaml";

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iad49ca5365597c28d0a9e1f6393f7c9f6a9b50c1
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Siebrand 

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


[MediaWiki-commits] [Gerrit] Handle user explicitly enabling/disabling feature - change (mediawiki...Popups)

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

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

Change subject: Handle user explicitly enabling/disabling feature
..

Handle user explicitly enabling/disabling feature

Follow on I4959749.

Bug: T132604
Change-Id: I4e6780f17b0423823295be9410a4343150e1e562
---
M resources/ext.popups.experiment.js
M tests/qunit/ext.popups.experiment.test.js
2 files changed, 39 insertions(+), 3 deletions(-)


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

diff --git a/resources/ext.popups.experiment.js 
b/resources/ext.popups.experiment.js
index 3f42efa..91996d8 100644
--- a/resources/ext.popups.experiment.js
+++ b/resources/ext.popups.experiment.js
@@ -30,6 +30,17 @@
}
 
/**
+* Has the user previously disabled Popups by clicking "Disable 
previews" in the settings
+* overlay?
+*
+* @return {boolean}
+* @ignore
+*/
+   function hasUserDisabledFeature() {
+   return $.jStorage.get( 'mwe-popups-enabled' ) === 'false';
+   }
+
+   /**
 * @class mw.popups.experiment
 * @singleton
 */
@@ -54,8 +65,13 @@
config = mw.config.get( 
'wgPopupsExperimentConfig' ),
result;
 
-   if (
-   hasUserEnabledFeature() ||
+   // The first two tests deal with whether the user has 
/explicitly/ enable or disabled via its
+   // settings.
+   if ( hasUserEnabledFeature() ) {
+   deferred.resolve( true );
+   } else if ( hasUserDisabledFeature() ) {
+   deferred.resolve( false );
+   } else if (
 
// Users with the beta feature enabled are already in 
the experimental condition.
mw.config.get( 
'wgPopupsExperimentIsBetaFeatureEnabled', false )
diff --git a/tests/qunit/ext.popups.experiment.test.js 
b/tests/qunit/ext.popups.experiment.test.js
index e71f679..0056bb5 100644
--- a/tests/qunit/ext.popups.experiment.test.js
+++ b/tests/qunit/ext.popups.experiment.test.js
@@ -11,6 +11,9 @@
}
}
},
+   setup: function () {
+   $.jStorage.deleteKey( 'mwe-popups-enabled' );
+   },
teardown: function () {
mw.storage.remove( 'PopupsExperimentID' );
}
@@ -103,7 +106,24 @@
'If the experiment has enabled the feature, 
then the user is in the condition.'
);
 
-   $.jStorage.deleteKey( 'mwe-popups-enabled' );
+   done();
+   } );
+   } );
+
+   QUnit.test( '#isUserInCondition: user has disabled the feature', 
function ( assert ) {
+   var done = assert.async();
+
+   // This should be read as follows: the user has enabled the 
beta feature but has since
+   // disabled the feature via its settings.
+   mw.config.set( 'wgPopupsExperimentIsBetaFeatureEnabled', true );
+   $.jStorage.set( 'mwe-popups-enabled', 'false' );
+
+   mw.popups.experiment.isUserInCondition().then( function ( 
result ) {
+   assert.strictEqual(
+   result,
+   false,
+   'If the experiment has enabled the feature, 
then the user is in the condition.'
+   );
 
done();
} );

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

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

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


[MediaWiki-commits] [Gerrit] Filter on selection_weight=0 earlier - change (mediawiki...DonationInterface)

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

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

Change subject: Filter on selection_weight=0 earlier
..

Filter on selection_weight=0 earlier

We were still choosing those if they had more submethods, or if
they more specifically matched the supplied parameters.

Bug: T135520
Change-Id: Ib63ded7013e31a31b93226efeb3e849ba2d75d8d
---
M special/GatewayFormChooser.php
1 file changed, 20 insertions(+), 1 deletion(-)


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

diff --git a/special/GatewayFormChooser.php b/special/GatewayFormChooser.php
index f8339b2..dbd086b 100644
--- a/special/GatewayFormChooser.php
+++ b/special/GatewayFormChooser.php
@@ -410,7 +410,26 @@
reset( $valid_forms );
return key ( $valid_forms );
}
-   
+
+   // We know there are multiple options for the donor at this 
point.
+   // selection_weight = 0 is interpreted as meaning "don't pick 
this
+   // form unless we asked for it by name", so remove those forms 
before
+   // we apply any other criteria.
+   $failforms = array();
+   foreach ( $valid_forms as $form_name => $meta ) {
+   if (
+   isset( $meta['selection_weight'] ) &&
+   $meta['selection_weight'] === 0
+   ) {
+   $failforms[] = $form_name;
+   }
+   }
+   if ( !empty( $failforms ) && count( $failforms ) != count( 
$valid_forms ) ) {
+   // Remove any forms with selection_weight 0, unless 
that's all of them
+   foreach ( $failforms as $failform ){
+   unset( $valid_forms[$failform] );
+   }
+   }
//general idea: If one form has constraints for the following 
ordered
//keys, and some forms do not have that constraint, prefer the 
one with 
//the explicit constraints. 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib63ded7013e31a31b93226efeb3e849ba2d75d8d
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] Make dumps.wikimedia.org access logs readable on stat1002 de... - change (operations/puppet)

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

Change subject: Make dumps.wikimedia.org access logs readable on stat1002 dest, 
also only rsync *.gz files
..


Make dumps.wikimedia.org access logs readable on stat1002 dest, also only rsync 
*.gz files

Bug: T134776
Change-Id: I322120538cce77f8b512e403cf6d251b6a283be5
---
M modules/dataset/manifests/cron/rsync/nginxlogs.pp
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/modules/dataset/manifests/cron/rsync/nginxlogs.pp 
b/modules/dataset/manifests/cron/rsync/nginxlogs.pp
index 2b93fca..6bbd3bf 100644
--- a/modules/dataset/manifests/cron/rsync/nginxlogs.pp
+++ b/modules/dataset/manifests/cron/rsync/nginxlogs.pp
@@ -11,13 +11,13 @@
 default => 'absent',
 }
 
-$rsync_args = '-rt --bwlimit=5'
+$rsync_args = '-rt --perms --chmod=go+r --bwlimit=5'
 cron { 'rsync_nginxlogs':
 ensure  => $ensure,
 user=> $user,
 minute  => 55,
 hour=> 4,
-command => "/usr/bin/rsync ${rsync_args} /var/log/nginx/ ${dest}",
+command => "/usr/bin/rsync ${rsync_args} /var/log/nginx/*.gz 
${dest}",
 environment => 'MAILTO=ops-du...@wikimedia.org',
 require => User[$user],
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I322120538cce77f8b512e403cf6d251b6a283be5
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ottomata 
Gerrit-Reviewer: Ottomata 
Gerrit-Reviewer: jenkins-bot <>

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


  1   2   3   >